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