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:
@@ -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}`;
|
||||||
|
Reference in New Issue
Block a user