From 4813320abc7d65ed813bb1cbcc50370324bd2b17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rui=20Tom=C3=A9?= <108268980+r-tome@users.noreply.github.com> Date: Wed, 9 Nov 2022 12:01:55 +0000 Subject: [PATCH] =?UTF-8?q?[EC-675]=20Display=20the=20Event=20for=20?= =?UTF-8?q?=E2=80=9CViewed=20Card=20Number=20for=20item=20item-identifier?= =?UTF-8?q?=E2=80=9D=20(#3976)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [EC-675] Add missing Event capture for viewing item Card Number * [EC-675] Fix correct event type for viewing item Card Number * Update apps/web/src/locales/en/messages.json Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com> Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com> --- apps/web/src/app/core/event.service.ts | 7 +++++++ apps/web/src/locales/en/messages.json | 9 +++++++++ libs/angular/src/components/view.component.ts | 2 +- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/apps/web/src/app/core/event.service.ts b/apps/web/src/app/core/event.service.ts index a13e5500f3..4556140afb 100644 --- a/apps/web/src/app/core/event.service.ts +++ b/apps/web/src/app/core/event.service.ts @@ -138,6 +138,13 @@ export class EventService { this.getShortId(ev.cipherId) ); break; + case EventType.Cipher_ClientToggledCardNumberVisible: + msg = this.i18nService.t("viewedCardNumberItemId", this.formatCipherId(ev, options)); + humanReadableMsg = this.i18nService.t( + "viewedCardNumberItemId", + this.getShortId(ev.cipherId) + ); + break; case EventType.Cipher_ClientToggledCardCodeVisible: msg = this.i18nService.t("viewedSecurityCodeItemId", this.formatCipherId(ev, options)); humanReadableMsg = this.i18nService.t( diff --git a/apps/web/src/locales/en/messages.json b/apps/web/src/locales/en/messages.json index 906ea89dba..d126bb611d 100644 --- a/apps/web/src/locales/en/messages.json +++ b/apps/web/src/locales/en/messages.json @@ -2596,6 +2596,15 @@ } } }, + "viewedCardNumberItemId": { + "message": "Viewed Card Number for item $ID$.", + "placeholders": { + "id": { + "content": "$1", + "example": "Unique ID" + } + } + }, "viewedSecurityCodeItemId": { "message": "Viewed security code for item $ID$.", "placeholders": { diff --git a/libs/angular/src/components/view.component.ts b/libs/angular/src/components/view.component.ts index 2d4f384199..8e724b9186 100644 --- a/libs/angular/src/components/view.component.ts +++ b/libs/angular/src/components/view.component.ts @@ -257,7 +257,7 @@ export class ViewComponent implements OnDestroy, OnInit { this.showCardNumber = !this.showCardNumber; if (this.showCardNumber) { - this.eventService.collect(EventType.Cipher_ClientToggledCardCodeVisible, this.cipherId); + this.eventService.collect(EventType.Cipher_ClientToggledCardNumberVisible, this.cipherId); } }