Skip to content

Commit

Permalink
feat(admin-ui): Add phoneNumber to customer detail form
Browse files Browse the repository at this point in the history
Closes #359
  • Loading branch information
michaelbromley committed Jun 2, 2020
1 parent 2da3c16 commit 768c838
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@
>
<input id="lastName" type="text" formControlName="lastName" />
</vdr-form-field>
<vdr-form-field
[label]="'customer.phone-number' | translate"
for="phoneNumber"
[readOnlyToggle]="!(isNew$ | async)"
>
<input id="phoneNumber" type="text" formControlName="phoneNumber" />
</vdr-form-field>
<vdr-form-field
[label]="'customer.email-address' | translate"
for="emailAddress"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ export class CustomerDetailComponent extends BaseDetailComponent<CustomerWithOrd
emailAddress: formValue.emailAddress,
firstName: formValue.firstName,
lastName: formValue.lastName,
phoneNumber: formValue.phoneNumber,
};
this.dataService.customer.createCustomer(customer, formValue.password).subscribe(
(data) => {
Expand Down Expand Up @@ -187,6 +188,7 @@ export class CustomerDetailComponent extends BaseDetailComponent<CustomerWithOrd
emailAddress: formValue.emailAddress,
firstName: formValue.firstName,
lastName: formValue.lastName,
phoneNumber: formValue.phoneNumber,
};
saveOperations.push(this.dataService.customer.updateCustomer(customer));
}
Expand Down

0 comments on commit 768c838

Please sign in to comment.