mirror of
https://github.com/bitwarden/browser.git
synced 2025-01-23 21:31:29 +01:00
full address
This commit is contained in:
parent
80c0da766e
commit
cbcf0adad5
@ -2,6 +2,8 @@ import { View } from './view';
|
|||||||
|
|
||||||
import { Identity } from '../domain/identity';
|
import { Identity } from '../domain/identity';
|
||||||
|
|
||||||
|
import { Utils } from '../../misc/utils';
|
||||||
|
|
||||||
export class IdentityView implements View {
|
export class IdentityView implements View {
|
||||||
title: string = null;
|
title: string = null;
|
||||||
middleName: string;
|
middleName: string;
|
||||||
@ -83,4 +85,21 @@ export class IdentityView implements View {
|
|||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get fullAddress(): string {
|
||||||
|
let address = this.address1;
|
||||||
|
if (Utils.isNullOrWhitespace(this.address2)) {
|
||||||
|
if (Utils.isNullOrWhitespace(address)) {
|
||||||
|
address += ', ';
|
||||||
|
}
|
||||||
|
address += this.address2;
|
||||||
|
}
|
||||||
|
if (Utils.isNullOrWhitespace(this.address3)) {
|
||||||
|
if (Utils.isNullOrWhitespace(address)) {
|
||||||
|
address += ', ';
|
||||||
|
}
|
||||||
|
address += this.address3;
|
||||||
|
}
|
||||||
|
return address;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user