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

Table formatting (#10104)

* Format <BuildLineTable />

* More formatting

* Add helper function for running playwright tests

* Fix playwright test

* Further formatting updates

* Adjust order tables
This commit is contained in:
Oliver
2025-07-31 16:39:19 +10:00
committed by GitHub
parent b8ea75b2b4
commit 4794c6d860
13 changed files with 76 additions and 39 deletions

View File

@@ -10,6 +10,7 @@ import { ApiEndpoints } from '@lib/enums/ApiEndpoints';
import { ModelType } from '@lib/enums/ModelType';
import { UserRoles } from '@lib/enums/Roles';
import { apiUrl } from '@lib/functions/Api';
import { formatDecimal } from '@lib/functions/Formatting';
import type { TableFilter } from '@lib/types/Filters';
import type { TableColumn } from '@lib/types/Tables';
import type { StockOperationProps } from '../../forms/StockForms';
@@ -133,13 +134,15 @@ export default function BuildAllocatedStockTable({
{
accessor: 'available',
title: t`Available Quantity`,
render: (record: any) => record?.stock_item_detail?.quantity
render: (record: any) =>
formatDecimal(record?.stock_item_detail?.quantity)
},
{
accessor: 'quantity',
title: t`Allocated Quantity`,
sortable: true,
switchable: false
switchable: false,
render: (record: any) => formatDecimal(record?.quantity)
},
LocationColumn({
accessor: 'location_detail',