mirror of
https://github.com/inventree/InvenTree.git
synced 2025-12-17 09:48:30 +00:00
@@ -1,3 +1,4 @@
|
|||||||
|
import { ApiEndpoints, ModelType, apiUrl } from '@lib/index';
|
||||||
import type { ApiFormFieldSet } from '@lib/types/Forms';
|
import type { ApiFormFieldSet } from '@lib/types/Forms';
|
||||||
import { t } from '@lingui/core/macro';
|
import { t } from '@lingui/core/macro';
|
||||||
import { IconBuildingStore, IconCopy, IconPackages } from '@tabler/icons-react';
|
import { IconBuildingStore, IconCopy, IconPackages } from '@tabler/icons-react';
|
||||||
@@ -53,6 +54,13 @@ export function usePartFields({
|
|||||||
structural: false
|
structural: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
default_supplier: {
|
||||||
|
model: ModelType.company,
|
||||||
|
api_url: apiUrl(ApiEndpoints.company_list),
|
||||||
|
filters: {
|
||||||
|
is_supplier: true
|
||||||
|
}
|
||||||
|
},
|
||||||
default_expiry: {},
|
default_expiry: {},
|
||||||
minimum_stock: {},
|
minimum_stock: {},
|
||||||
responsible: {
|
responsible: {
|
||||||
|
|||||||
@@ -501,6 +501,13 @@ export default function PartDetail() {
|
|||||||
model: ModelType.stocklocation,
|
model: ModelType.stocklocation,
|
||||||
hidden: part.default_location || !part.category_default_location
|
hidden: part.default_location || !part.category_default_location
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
type: 'link',
|
||||||
|
name: 'default_supplier',
|
||||||
|
label: t`Default Supplier`,
|
||||||
|
model: ModelType.company,
|
||||||
|
hidden: !part.default_supplier
|
||||||
|
},
|
||||||
{
|
{
|
||||||
type: 'string',
|
type: 'string',
|
||||||
name: 'units',
|
name: 'units',
|
||||||
|
|||||||
Reference in New Issue
Block a user