RED-7041 - filtered types by the new rules
This commit is contained in:
parent
24092713cd
commit
9fb08bde8f
@ -54,7 +54,9 @@ export class RedactTextDialogComponent
|
||||
.valueChanges.pipe(
|
||||
tap((option: DetailsRadioOption<RedactOrHintOption>) => {
|
||||
this.dictionaryRequest = option.value === RedactOrHintOptions.IN_DOSSIER;
|
||||
this.#setDictionaries();
|
||||
if (this.dictionaryRequest) {
|
||||
this.#setDictionaries();
|
||||
}
|
||||
this.#resetValues();
|
||||
}),
|
||||
takeUntilDestroyed(),
|
||||
@ -78,7 +80,6 @@ export class RedactTextDialogComponent
|
||||
}
|
||||
|
||||
async ngOnInit(): Promise<void> {
|
||||
this.#setDictionaries();
|
||||
const data = await firstValueFrom(this._justificationsService.getForDossierTemplate(this.#dossier.dossierTemplateId));
|
||||
this.legalOptions = data.map(lbm => ({
|
||||
legalBasis: lbm.reason,
|
||||
|
||||
@ -152,13 +152,14 @@ export class DictionaryService extends EntitiesService<IDictionary, Dictionary>
|
||||
const dictionaries: Dictionary[] = [];
|
||||
|
||||
this._dictionariesMapService.get(dossierTemplateId).forEach((d: Dictionary) => {
|
||||
if (
|
||||
!d.hint &&
|
||||
d.addToDictionaryAction &&
|
||||
((!d.virtual && !d.systemManaged && d.hasDictionary && !d.dossierDictionaryOnly) ||
|
||||
(dossierDictionaryOnly && d.dossierDictionaryOnly))
|
||||
) {
|
||||
dictionaries.push(d);
|
||||
if (!d.hint && d.addToDictionaryAction) {
|
||||
if (dossierDictionaryOnly) {
|
||||
dictionaries.push(d);
|
||||
} else {
|
||||
if (!d.dossierDictionaryOnly) {
|
||||
dictionaries.push(d);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@ -187,7 +188,7 @@ export class DictionaryService extends EntitiesService<IDictionary, Dictionary>
|
||||
dictionaries.push(d);
|
||||
}
|
||||
}
|
||||
} else if (!d.dossierDictionaryOnly && !IMAGE_TYPES.includes(d.type)) {
|
||||
} else if (!IMAGE_TYPES.includes(d.type)) {
|
||||
dictionaries.push(d);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user