@@ -9,9 +9,11 @@ import { map } from "rxjs/operators";
9
9
10
10
import { CollectionView } from "@bitwarden/admin-console/common" ;
11
11
import { ApiService } from "@bitwarden/common/abstractions/api.service" ;
12
+ import { EventCollectionService } from "@bitwarden/common/abstractions/event/event-collection.service" ;
12
13
import { Organization } from "@bitwarden/common/admin-console/models/domain/organization" ;
13
14
import { AccountService } from "@bitwarden/common/auth/abstractions/account.service" ;
14
15
import { BillingAccountProfileStateService } from "@bitwarden/common/billing/abstractions" ;
16
+ import { EventType } from "@bitwarden/common/enums" ;
15
17
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service" ;
16
18
import { LogService } from "@bitwarden/common/platform/abstractions/log.service" ;
17
19
import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service" ;
@@ -237,6 +239,7 @@ export class VaultItemDialogComponent implements OnInit, OnDestroy {
237
239
private premiumUpgradeService : PremiumUpgradePromptService ,
238
240
private cipherAuthorizationService : CipherAuthorizationService ,
239
241
private apiService : ApiService ,
242
+ private eventCollectionService : EventCollectionService ,
240
243
) {
241
244
this . updateTitle ( ) ;
242
245
}
@@ -257,6 +260,13 @@ export class VaultItemDialogComponent implements OnInit, OnDestroy {
257
260
[ this . params . activeCollectionId ] ,
258
261
this . params . isAdminConsoleAction ,
259
262
) ;
263
+
264
+ await this . eventCollectionService . collect (
265
+ EventType . Cipher_ClientViewed ,
266
+ this . cipher . id ,
267
+ false ,
268
+ this . cipher . organizationId ,
269
+ ) ;
260
270
}
261
271
262
272
this . performingInitialLoad = false ;
0 commit comments