2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-02 03:30:54 +00:00

[Feature] Part lock (#7527)

* Add "locked" field to Part model

- Default = false

* Add "locked" field to PartSerializer

- Allow filtering in API

* Filter CUI tables by "locked" status

* Add "locked" filter to part table

* Update PUI table

* PUI: Update display of part details  page

* Add "locked" element

* Ensmallen the gap

* Edit "locked" field in CUI

* Check BomItem before editing or deleting

* Prevent bulk delete of BOM items

* Check part lock for PartParameter model

* Prevent deletion of a locked part

* Add option to prevent build order creation for unlocked part

* Bump API version

* Hide actions from BOM table if part is locked

* Fix for boolean form field

* Update <PartParameterTable>

* Add unit test for 'BUILDORDER_REQUIRE_LOCKED_PART' setting

* Add unit test for part deletion

* add bom item test

* unit test for part parameter

* Update playwright tests

* Update docs

* Remove defunct setting

* Update playwright tests
This commit is contained in:
Oliver
2024-07-07 11:35:30 +10:00
committed by GitHub
parent 97b6258797
commit 8309eb628f
30 changed files with 448 additions and 119 deletions

View File

@ -38,6 +38,7 @@ import {
IconLink,
IconList,
IconListTree,
IconLock,
IconMail,
IconMapPin,
IconMapPinHeart,
@ -152,6 +153,8 @@ const icons = {
inactive: IconX,
part: IconBox,
supplier_part: IconPackageImport,
lock: IconLock,
locked: IconLock,
calendar: IconCalendar,
external: IconExternalLink,