2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-11-14 03:46:44 +00:00

Allocated stock table fix (#7636)

* Expose batch code field to StockItemSerializerBrief

* Expose more fields to PartBriefSerializer

* Additional export fields to BuildItemSerializer

* Bump API version

* Fix playwright test
This commit is contained in:
Oliver
2024-07-14 20:49:46 +10:00
committed by GitHub
parent 0db280ad74
commit 750e6d81fa
7 changed files with 29 additions and 5 deletions

View File

@@ -2,6 +2,7 @@ import { t } from '@lingui/macro';
import { useCallback, useMemo, useState } from 'react';
import { ApiEndpoints } from '../../enums/ApiEndpoints';
import { ModelType } from '../../enums/ModelType';
import { UserRoles } from '../../enums/Roles';
import {
useDeleteApiFormModal,
@@ -58,6 +59,13 @@ export default function BuildAllocatedStockTable({
sortable: true,
switchable: false
},
{
accessor: 'serial',
title: t`Serial Number`,
sortable: false,
switchable: true,
render: (record: any) => record?.stock_item_detail?.serial
},
{
accessor: 'batch',
title: t`Batch Code`,
@@ -150,7 +158,9 @@ export default function BuildAllocatedStockTable({
enableDownload: true,
enableSelection: true,
rowActions: rowActions,
tableFilters: tableFilters
tableFilters: tableFilters,
modelField: 'stock_item',
modelType: ModelType.stockitem
}}
/>
</>