2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-09-13 14:11:37 +00:00

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

View File

@@ -8,6 +8,7 @@ import { ApiEndpoints } from '@lib/enums/ApiEndpoints';
import { ModelType } from '@lib/enums/ModelType'; import { ModelType } from '@lib/enums/ModelType';
import { UserRoles } from '@lib/enums/Roles'; import { UserRoles } from '@lib/enums/Roles';
import { apiUrl } from '@lib/functions/Api'; import { apiUrl } from '@lib/functions/Api';
import { formatDecimal } from '@lib/functions/Formatting';
import type { TableColumn } from '@lib/types/Tables'; import type { TableColumn } from '@lib/types/Tables';
import { import {
useStockItemInstallFields, useStockItemInstallFields,
@@ -59,13 +60,13 @@ export default function InstalledItemsTable({
const tableColumns: TableColumn[] = useMemo(() => { const tableColumns: TableColumn[] = useMemo(() => {
return [ return [
PartColumn({ PartColumn({
part: 'part' part: 'part_detail'
}), }),
{ {
accessor: 'quantity', accessor: 'quantity',
switchable: false, switchable: false,
render: (record: any) => { render: (record: any) => {
let text = record.quantity; let text = formatDecimal(record.quantity);
if (record.serial && record.quantity == 1) { if (record.serial && record.quantity == 1) {
text = `# ${record.serial}`; text = `# ${record.serial}`;