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 { Utils } from '../../misc/utils';
|
||||
|
||||
export class IdentityView implements View {
|
||||
title: string = null;
|
||||
middleName: string;
|
||||
|
@ -83,4 +85,21 @@ export class IdentityView implements View {
|
|||
|
||||
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