From a7f393c5c2bcee870266ad8781baf7f8b02f97cb Mon Sep 17 00:00:00 2001 From: Nicoleta Panaghiu Date: Tue, 19 Sep 2023 17:19:26 +0300 Subject: [PATCH] RED-7562: Disabled dictionary tab for dossierDictionaryOnly. --- .../base-entity-screen/base-entity-screen.component.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/apps/red-ui/src/app/modules/admin/base-entity-screen/base-entity-screen.component.ts b/apps/red-ui/src/app/modules/admin/base-entity-screen/base-entity-screen.component.ts index d7580b24b..e00af9029 100644 --- a/apps/red-ui/src/app/modules/admin/base-entity-screen/base-entity-screen.component.ts +++ b/apps/red-ui/src/app/modules/admin/base-entity-screen/base-entity-screen.component.ts @@ -35,7 +35,13 @@ export class BaseEntityScreenComponent implements OnInit { const entity$ = dictionaryMapService.watch$(this.#dossierTemplateId, this.#entityType); this.canDeleteEntity$ = entity$.pipe(map(entity => this._permissionsService.canDeleteEntities(entity))); this.disabledItems$ = entity$.pipe( - map(entity => (entity.hasDictionary ? [] : ['dictionary', 'false-positive', 'false-recommendations'])), + map(entity => + entity.hasDictionary + ? !entity.dossierDictionaryOnly + ? [] + : ['dictionary'] + : ['dictionary', 'false-positive', 'false-recommendations'], + ), ); }