From 0b29dc10bf70718a9e1cd6d08674068cd99ad5ee Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Fri, 27 Jul 2018 23:37:36 -0400 Subject: [PATCH] cipher view revision dates --- src/models/view/cipherView.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/models/view/cipherView.ts b/src/models/view/cipherView.ts index 73a8d062e49..6290993f590 100644 --- a/src/models/view/cipherView.ts +++ b/src/models/view/cipherView.ts @@ -30,6 +30,7 @@ export class CipherView implements View { fields: FieldView[]; passwordHistory: PasswordHistoryView[]; collectionIds: string[]; + revisionDate: Date; constructor(c?: Cipher) { if (!c) { @@ -45,6 +46,7 @@ export class CipherView implements View { this.type = c.type; this.localData = c.localData; this.collectionIds = c.collectionIds; + this.revisionDate = c.revisionDate; } get subTitle(): string { @@ -79,4 +81,13 @@ export class CipherView implements View { get login_username(): string { return this.login != null ? this.login.username : null; } + + get passwordRevisionDisplayDate(): Date { + if (this.login == null) { + return null; + } else if (this.login.password == null || this.login.password === '') { + return null; + } + return this.login.passwordRevisionDate != null ? this.login.passwordRevisionDate : this.revisionDate; + } }