feat(frontend): add inline component addition to bom dialog (#11781)

* feat(frontend): add inline component addition to BOM dialog

closes https://github.com/invenhost/InvenTree/issues/311

* adapt to new var name
This commit is contained in:
Matthias Mair 2026-04-23 01:27:50 +02:00 committed by GitHub
parent 8830d506b9
commit 91977bd070
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 1 deletions

View File

@ -12,6 +12,7 @@ import { RenderPart } from '../components/render/Part';
import { showApiErrorMessage } from '../functions/notifications';
import { useCreateApiFormModal } from '../hooks/UseForm';
import { useUserState } from '../states/UserState';
import { usePartFields } from './PartForms';
/**
* Field set for BomItem form
@ -21,6 +22,10 @@ export function bomItemFields({
}: {
showAssembly?: boolean;
}): ApiFormFieldSet {
const newPartFields = usePartFields({
create: true
});
return {
part: {
disabled: true,
@ -30,7 +35,8 @@ export function bomItemFields({
filters: {
active: true, // Only show active parts when creating a new BOM item
component: true
}
},
addCreateFields: newPartFields
},
quantity: {},
reference: {},