[EC-675] Display the Event for “Viewed Card Number for item item-identifier” (#3976)

* [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>
This commit is contained in:
Rui Tomé 2022-11-09 12:01:55 +00:00 committed by GitHub
parent d6a6dedbba
commit 4813320abc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 1 deletions

View File

@ -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(

View File

@ -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": {

View File

@ -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);
}
}