From de31be252b02667560a4aea899c470b4038fa934 Mon Sep 17 00:00:00 2001 From: Dan Percic Date: Mon, 4 Dec 2023 18:54:38 +0200 Subject: [PATCH] RED-7989 update edit entity form --- .gitignore | 2 ++ .../components/add-edit-entity/add-edit-entity.component.ts | 4 ++-- apps/red-ui/src/assets/i18n/redact/de.json | 2 +- apps/red-ui/src/assets/i18n/redact/en.json | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 25a9b675f..4a4ddeddb 100644 --- a/.gitignore +++ b/.gitignore @@ -48,3 +48,5 @@ migrations.json *.iml docker-compose.yml + +.nx/cache/ diff --git a/apps/red-ui/src/app/modules/shared/components/add-edit-entity/add-edit-entity.component.ts b/apps/red-ui/src/app/modules/shared/components/add-edit-entity/add-edit-entity.component.ts index d4f38a378..8b5cab047 100644 --- a/apps/red-ui/src/app/modules/shared/components/add-edit-entity/add-edit-entity.component.ts +++ b/apps/red-ui/src/app/modules/shared/components/add-edit-entity/add-edit-entity.component.ts @@ -149,7 +149,7 @@ export class AddEditEntityComponent extends BaseFormComponent implements OnInit caseSensitive: [{ value: !this.entity?.caseInsensitive, disabled: this.#isSystemManaged }], manageEntriesInDictionaryEditorOnly: [ { - value: !this.entity?.addToDictionaryAction, + value: this.entity?.addToDictionaryAction, disabled: this.#isSystemManaged && !this.#isDossierRedaction, }, ], @@ -216,7 +216,7 @@ export class AddEditEntityComponent extends BaseFormComponent implements OnInit #formToObject(): IDictionary { // Fields which aren't set for hints, need additional check - const addToDictionaryAction = !this.form.get('manageEntriesInDictionaryEditorOnly')?.value; + const addToDictionaryAction = !!this.form.get('manageEntriesInDictionaryEditorOnly')?.value; const hasDictionary = !!this.form.get('hasDictionary')?.value; const dossierDictionaryOnly = !!this.form.get('dossierDictionaryOnly')?.value; diff --git a/apps/red-ui/src/assets/i18n/redact/de.json b/apps/red-ui/src/assets/i18n/redact/de.json index 2818281c8..541b9f975 100644 --- a/apps/red-ui/src/assets/i18n/redact/de.json +++ b/apps/red-ui/src/assets/i18n/redact/de.json @@ -133,7 +133,7 @@ "dossier-dictionary-only": "Dossier dictionary only", "has-dictionary": "Has dictionary", "hint": "Hint", - "manage-entries-in-dictionary-editor-only": "Manage entries in Dictionary editor only", + "manage-entries-in-dictionary-editor-only": "Available in add/remove dialogs", "name": "Display Name", "name-placeholder": "Enter Name", "rank": "Rank", diff --git a/apps/red-ui/src/assets/i18n/redact/en.json b/apps/red-ui/src/assets/i18n/redact/en.json index e46727ced..d7c6b684f 100644 --- a/apps/red-ui/src/assets/i18n/redact/en.json +++ b/apps/red-ui/src/assets/i18n/redact/en.json @@ -133,7 +133,7 @@ "dossier-dictionary-only": "Dossier dictionary only", "has-dictionary": "Has dictionary", "hint": "Hint", - "manage-entries-in-dictionary-editor-only": "Manage entries in Dictionary editor only", + "manage-entries-in-dictionary-editor-only": "Available in add/remove dialogs", "name": "Display Name", "name-placeholder": "Enter Name", "rank": "Rank",