mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-17 12:35:46 +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:
@ -57,7 +57,6 @@ import {
|
||||
useEditApiFormModal
|
||||
} from '../../hooks/UseForm';
|
||||
import { useInstance } from '../../hooks/UseInstance';
|
||||
import { apiUrl } from '../../states/ApiState';
|
||||
import { useUserState } from '../../states/UserState';
|
||||
import { AttachmentTable } from '../../tables/general/AttachmentTable';
|
||||
import InstalledItemsTable from '../../tables/stock/InstalledItemsTable';
|
||||
|
@ -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
|
||||
}}
|
||||
/>
|
||||
</>
|
||||
|
@ -19,10 +19,10 @@ test('PUI - Pages - Build Order', async ({ page }) => {
|
||||
await page.getByRole('tab', { name: 'Allocated Stock' }).click();
|
||||
|
||||
// Check for expected text in the table
|
||||
await page.getByText('R_10R_0402_1%').click();
|
||||
await page.getByText('R_10R_0402_1%').waitFor();
|
||||
await page
|
||||
.getByRole('cell', { name: 'R38, R39, R40, R41, R42, R43' })
|
||||
.click();
|
||||
.waitFor();
|
||||
|
||||
// Click through to the "parent" build
|
||||
await page.getByRole('tab', { name: 'Build Details' }).click();
|
||||
|
Reference in New Issue
Block a user