RED-7041 - Take into consideration if entity type only has dossier dictionaries

This commit is contained in:
Valentin Mihai 2023-07-10 15:22:10 +03:00
parent 3f55a466f2
commit dd6d41a967
3 changed files with 10 additions and 1 deletions

View File

@ -52,6 +52,7 @@
*ngFor="let dictionary of dictionaries"
[matTooltip]="dictionary.description"
[value]="dictionary.type"
(click)="typeChanged()"
matTooltipPosition="after"
>
<span> {{ dictionary.label }} </span>

View File

@ -141,6 +141,14 @@ export class RedactTextDialogComponent
}
}
typeChanged() {
if (!this.#applyToAllDossiers) {
const selectedDictionaryType = this.form.get('dictionary').value;
const selectedDictionary = this.dictionaries.find(d => d.type === selectedDictionaryType);
this.options[1].extraOption.disabled = selectedDictionary.dossierDictionaryOnly;
}
}
save(): void {
this.#enhanceManualRedaction(this.data.manualRedactionEntryWrapper.manualRedactionEntry);
const redaction = this.data.manualRedactionEntryWrapper.manualRedactionEntry;

@ -1 +1 @@
Subproject commit eb58e96d01290051858613dcfaed0288adaa3d53
Subproject commit a8f5fb2e25cd1f150c1099d387b4f9dece3b922c