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

Order table variants (#8295)

* BuildOrderTable: Show variants

- Allow filtering of build orders by part variant

* Add "include_variants" filter for SalesOrder table

- A bit tricker!

* Add "include_variants" filter to PartPurchaseOrdersTable

* Enable filtering ReturnOrder by "part" attribute

* Add similiar functionality for SalesOrderAllocation

* Add similar filter for BuildAllocation table

* Add migration file
This commit is contained in:
Oliver
2024-10-16 20:19:11 +11:00
committed by GitHub
parent 0c9e986796
commit 59fa3bb4ff
13 changed files with 338 additions and 40 deletions

View File

@@ -45,17 +45,30 @@ export default function BuildAllocatedStockTable({
modelField?: string;
}>) {
const user = useUserState();
const table = useTable('buildallocatedstock');
const table = useTable(
!!partId ? 'buildallocatedstock-part' : 'buildallocatedstock'
);
const tableFilters: TableFilter[] = useMemo(() => {
return [
let filters: TableFilter[] = [
{
name: 'tracked',
label: t`Allocated to Output`,
description: t`Show items allocated to a build output`
}
];
}, []);
if (!!partId) {
filters.push({
name: 'include_variants',
type: 'boolean',
label: t`Include Variants`,
description: t`Include orders for part variants`
});
}
return filters;
}, [partId]);
const tableColumns: TableColumn[] = useMemo(() => {
return [