diff --git a/pmp-ui/src/app/features/resources/shared/mater-data-common-body/mater-data-common-body.component.html b/pmp-ui/src/app/features/resources/shared/mater-data-common-body/mater-data-common-body.component.html index 25c90ee65..a43d7879d 100644 --- a/pmp-ui/src/app/features/resources/shared/mater-data-common-body/mater-data-common-body.component.html +++ b/pmp-ui/src/app/features/resources/shared/mater-data-common-body/mater-data-common-body.component.html @@ -55,17 +55,15 @@ placeholder="{{ field.label[primaryLang] }}" required > - - {{ data.fieldCode }} + {{ data.fieldValue }} @@ -77,9 +75,8 @@ required disabled="{{setreadonly}}" > - { - if(response.response.filters) - this.searchResult = response.response.filters.sort((a, b) => (a.name && b.name) ? a.id.localeCompare(b.name) : 0); - this.dropDownValues.partnerTypeCode.primary = response.response.filters.sort((a, b) => (a.name && b.name) ? a.name.localeCompare(b.name) : 0); + this.dropDownValues[key] = response.response.filters; }); } @@ -459,17 +456,9 @@ export class MaterDataCommonBodyComponent implements OnInit { }); } - onKey(value) { - this.searchResult = this.search(value); - } - - search(value: string) { - let filter = value.toLowerCase(); - return this.dropDownValues.partnerTypeCode.primary.filter(option => option.fieldCode.toLowerCase().startsWith(filter)); - } - getPolicyGroup() { - const filterObject = new FilterValuesModel('id', 'unique', ''); + getPolicyGroup(key) { + const filterObject = new FilterValuesModel('name', 'unique', ''); let optinalFilterObject = new OptionalFilterValuesModel('isActive', 'equals', 'true'); let filterRequest = new FilterRequest([filterObject], this.primaryLang, [optinalFilterObject]); filterRequest["purpose"] = "REGISTRATION"; @@ -477,9 +466,7 @@ export class MaterDataCommonBodyComponent implements OnInit { this.dataStorageService .getFiltersForAllDropDown('policymanager/policies/group', request) .subscribe(response => { - if(response.response.filters) - this.searchResult = response.response.filters.sort((a, b) => (a.id && b.id) ? a.id.localeCompare(b.id) : 0); - this.dropDownValues.partnerTypeCode.primary = response.response.filters.sort((a, b) => (a.id && b.id) ? a.id.localeCompare(b.id) : 0); + this.dropDownValues[key] = response.response.filters; }); } diff --git a/pmp-ui/src/assets/entity-spec/policy-mapping.json b/pmp-ui/src/assets/entity-spec/policy-mapping.json index 371cbe83d..f00e0a2b3 100644 --- a/pmp-ui/src/assets/entity-spec/policy-mapping.json +++ b/pmp-ui/src/assets/entity-spec/policy-mapping.json @@ -95,7 +95,7 @@ "showAsLink": "", "linkType": "", "LinkURL": "", - "inputType": "dropdown", + "inputType": "dropdownpartner", "ismandatory": "true", "showInListView": "false", "showInSingleView": "true"