mirror of
https://github.com/inventree/InvenTree.git
synced 2026-09-27 22:26:00 +00:00
Reintroduce setting for project codes (#8920)
* Re-introducde old setting * Optionally hide project code column * Control visibility of table filters * Hide fields from forms
This commit is contained in:
@@ -147,6 +147,8 @@ export function usePurchaseOrderFields({
|
||||
supplierId?: number;
|
||||
duplicateOrderId?: number;
|
||||
}): ApiFormFieldSet {
|
||||
const globalSettings = useGlobalSettingsState();
|
||||
|
||||
return useMemo(() => {
|
||||
const fields: ApiFormFieldSet = {
|
||||
reference: {
|
||||
@@ -217,8 +219,12 @@ export function usePurchaseOrderFields({
|
||||
};
|
||||
}
|
||||
|
||||
if (!globalSettings.isSet('PROJECT_CODES_ENABLED', true)) {
|
||||
delete fields.project_code;
|
||||
}
|
||||
|
||||
return fields;
|
||||
}, [duplicateOrderId, supplierId]);
|
||||
}, [duplicateOrderId, supplierId, globalSettings]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user