2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-17 12:35:46 +00:00

Prevent deletion of part which is used in an assembly (#7260)

* Prevent deletion of part which is used in an assembly

* add 'validate_model_deletion' option to ValidationMixin plugun

* Add global setting to control part delete behaviour

* Update settings location

* Unit test updates

* Further unit test updates

* Fix typos
This commit is contained in:
Oliver
2024-05-20 12:51:56 +10:00
committed by GitHub
parent b26640fb36
commit c540b12c97
12 changed files with 75 additions and 18 deletions

View File

@ -497,7 +497,7 @@ export function ApiForm({
{/* Form Fields */}
<Stack gap="sm">
{(!isValid || nonFieldErrors.length > 0) && (
<Alert radius="sm" color="red" title={t`Form Errors Exist`}>
<Alert radius="sm" color="red" title={t`Error`}>
{nonFieldErrors.length > 0 && (
<Stack gap="xs">
{nonFieldErrors.map((message) => (

View File

@ -173,6 +173,7 @@ export default function SystemSettings() {
'PART_IPN_REGEX',
'PART_ALLOW_DUPLICATE_IPN',
'PART_ALLOW_EDIT_IPN',
'PART_ALLOW_DELETE_FROM_ASSEMBLY',
'PART_NAME_FORMAT',
'PART_SHOW_RELATED',
'PART_CREATE_INITIAL',