// Allow the selected entry ID to be passed via the template
// This does NOT not emit onChange events.
@Input() set selectedId(id: any) {
- if (id) {
+ if (id) {
if (this.entrylist.length) {
this.selected = this.entrylist.filter(e => e.id === id)[0];
}
['billing_address', 'holds_address', 'mailing_address', 'ill_address'];
@Component({
- selector: 'eg-admin-org-address',
+ selector: 'eg-admin-org-address',
templateUrl: './org-addr.component.html'
})
export class OrgAddressComponent {
if (!this.orgId) { return; }
return this.pcrud.retrieve('aou', this.orgId,
- {flesh : 1, flesh_fields : {aou : ADDR_TYPES}},
+ {flesh : 1, flesh_fields : {aou : ADDR_TYPES}},
{authoritative: true}
).subscribe(org => {
this.orgUnit = org;
// Find the address
let fromAddr: IdlObject;
ADDR_TYPES.forEach(aType => {
- if (aType !== addrType &&
+ if (aType !== addrType &&
this.addr(aType).id() === this.addr(addrType).id()) {
fromAddr = this.addr(aType);
}