Browse Source

fix(admin-ui): Fix CustomerDetail display of custom fields

Michael Bromley 6 years ago
parent
commit
02757eaf74

+ 1 - 1
packages/admin-ui/src/app/customer/components/customer-detail/customer-detail.component.html

@@ -63,7 +63,7 @@
             <vdr-custom-field-control
             <vdr-custom-field-control
                 *ngIf="customFieldIsSet(customField.name)"
                 *ngIf="customFieldIsSet(customField.name)"
                 entityName="Customer"
                 entityName="Customer"
-                [customFieldsFormGroup]="detailForm.get('customFields')"
+                [customFieldsFormGroup]="detailForm.get(['customer', 'customFields'])"
                 [customField]="customField"
                 [customField]="customField"
             ></vdr-custom-field-control>
             ></vdr-custom-field-control>
         </ng-container>
         </ng-container>

+ 1 - 1
packages/admin-ui/src/app/customer/components/customer-detail/customer-detail.component.ts

@@ -273,7 +273,7 @@ export class CustomerDetailComponent extends BaseDetailComponent<CustomerWithOrd
         }
         }
 
 
         if (this.customFields.length) {
         if (this.customFields.length) {
-            const customFieldsGroup = this.detailForm.get(['customFields']) as FormGroup;
+            const customFieldsGroup = this.detailForm.get(['customer', 'customFields']) as FormGroup;
 
 
             for (const fieldDef of this.customFields) {
             for (const fieldDef of this.customFields) {
                 const key = fieldDef.name;
                 const key = fieldDef.name;