[PM-12724] - fix logic for showing new password (#11512)

* fix logic for showing new password

* fix logic
This commit is contained in:
Jordan Aasen 2024-10-14 06:22:22 -07:00 committed by GitHub
parent e8f7cdfeed
commit 1459c06d17
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 6 deletions

View File

@ -12,8 +12,8 @@
>
</bit-form-field>
<bit-form-field>
<bit-label *ngIf="!originalSendView || !hasPassword">{{ "password" | i18n }}</bit-label>
<bit-label *ngIf="originalSendView && hasPassword">{{ "newPassword" | i18n }}</bit-label>
<bit-label *ngIf="!shouldShowNewPassword">{{ "password" | i18n }}</bit-label>
<bit-label *ngIf="shouldShowNewPassword">{{ "newPassword" | i18n }}</bit-label>
<input bitInput type="password" formControlName="password" />
<button
data-testid="toggle-visibility-for-password"

View File

@ -53,10 +53,8 @@ export class SendOptionsComponent implements OnInit {
hideEmail: [false as boolean],
});
get hasPassword(): boolean {
return (
this.sendOptionsForm.value.password !== null && this.sendOptionsForm.value.password !== ""
);
get shouldShowNewPassword(): boolean {
return this.originalSendView && this.originalSendView.password !== null;
}
get shouldShowCount(): boolean {