Răsfoiți Sursa

fix(admin-ui): Add support for custom fields on CustomerGroup list

Michael Bromley 1 an în urmă
părinte
comite
7128a33095

+ 1 - 0
packages/admin-ui/src/lib/customer/src/components/customer-group-list/customer-group-list.component.html

@@ -69,6 +69,7 @@
                     </a>
                 </ng-template>
             </vdr-dt2-column>
+            <vdr-dt2-custom-field-column *ngFor="let field of customFields" [customField]="field" [sorts]="sorts" />
             <vdr-dt2-column
                 [heading]="'common.view-contents' | translate" id="view-contents"
                 [optional]="false"

+ 1 - 0
packages/admin-ui/src/lib/customer/src/components/customer-group-list/customer-group-list.component.ts

@@ -41,6 +41,7 @@ export class CustomerGroupListComponent
     extends TypedBaseListComponent<typeof GetCustomerGroupListDocument, 'customerGroups'>
     implements OnInit
 {
+    readonly customFields = this.getCustomFieldConfig('CustomerGroup');
     activeGroup$: Observable<ItemOf<GetCustomerGroupsQuery, 'customerGroups'> | undefined>;
     activeIndex$: Observable<number>;
     listIsEmpty$: Observable<boolean>;