Fix "Installed Items" table (#10280)

* Fix for "Installed Items" table

- Fix broken part column

* Format quantity column
This commit is contained in:
Oliver 2025-09-08 11:31:39 +10:00 committed by GitHub
parent fe8aa187c4
commit e8b56e58ac
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 2 deletions

View File

@ -8,6 +8,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 { TableColumn } from '@lib/types/Tables';
import {
useStockItemInstallFields,
@ -59,13 +60,13 @@ export default function InstalledItemsTable({
const tableColumns: TableColumn[] = useMemo(() => {
return [
PartColumn({
part: 'part'
part: 'part_detail'
}),
{
accessor: 'quantity',
switchable: false,
render: (record: any) => {
let text = record.quantity;
let text = formatDecimal(record.quantity);
if (record.serial && record.quantity == 1) {
text = `# ${record.serial}`;