From 388a33bbd661f141e8b92aa3735cf3ab43aca307 Mon Sep 17 00:00:00 2001 From: Matej Gerek Date: Sun, 6 Oct 2024 19:02:31 +0200 Subject: [PATCH] Add filter on init to assistant component --- libs/ui/src/lib/assistant/assistant.component.ts | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/libs/ui/src/lib/assistant/assistant.component.ts b/libs/ui/src/lib/assistant/assistant.component.ts index e66f1accb..7cc293dd2 100644 --- a/libs/ui/src/lib/assistant/assistant.component.ts +++ b/libs/ui/src/lib/assistant/assistant.component.ts @@ -164,13 +164,15 @@ export class GfAssistantComponent implements OnChanges, OnDestroy, OnInit { type: 'ASSET_CLASS' }; }); - this.tags = this.user?.tags.map(({ id, name }) => { - return { - id, - label: translate(name), - type: 'TAG' - }; - }); + this.tags = this.user?.tags + .filter((tag) => tag.isUsed) + .map(({ id, name }) => { + return { + id, + label: translate(name), + type: 'TAG' + }; + }); this.searchFormControl.valueChanges .pipe(