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 a57161826..e66c51bbd 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,14 @@ placeholder="{{ field.label[primaryLang] }}" required > - - {{ data.fieldCode }} + {{ data.fieldValue }} diff --git a/pmp-ui/src/app/features/resources/shared/mater-data-common-body/mater-data-common-body.component.scss b/pmp-ui/src/app/features/resources/shared/mater-data-common-body/mater-data-common-body.component.scss index f6a57f3f5..8301a6f7b 100644 --- a/pmp-ui/src/app/features/resources/shared/mater-data-common-body/mater-data-common-body.component.scss +++ b/pmp-ui/src/app/features/resources/shared/mater-data-common-body/mater-data-common-body.component.scss @@ -9,9 +9,4 @@ mat-form-field{ .mat-card-content>:first-child { margin-top: 14px; -} - -.search-input { - height: 35px; - width: 50px; } \ No newline at end of file diff --git a/pmp-ui/src/app/features/resources/shared/mater-data-common-body/mater-data-common-body.component.ts b/pmp-ui/src/app/features/resources/shared/mater-data-common-body/mater-data-common-body.component.ts index c7d27229d..e3ec058aa 100644 --- a/pmp-ui/src/app/features/resources/shared/mater-data-common-body/mater-data-common-body.component.ts +++ b/pmp-ui/src/app/features/resources/shared/mater-data-common-body/mater-data-common-body.component.ts @@ -44,7 +44,6 @@ export class MaterDataCommonBodyComponent implements OnInit { disableForms: boolean; copyPrimaryWord: any; copySecondaryWord: any; - searchResult: any[] = []; @Input() primaryData: any = {}; @Input() secondaryData: any; @@ -132,12 +131,12 @@ export class MaterDataCommonBodyComponent implements OnInit { else if(url === "datasharepolicy"){ this.pageName = "Data Share Policy"; this.primaryData = {"name": "", "desc": "", "policies": "", "policyGroupName": "", "policyType": "DataShare", "version": "1.1"}; - this.getPolicyGroup(); + this.getPolicyGroup("policyGroupName"); } else if(url === "authpolicy"){ this.pageName = "Auth Policy"; this.primaryData = {"name": "", "desc": "", "policies": "", "policyGroupName": "", "policyType": "Auth", "version": "1.1"}; - this.getPolicyGroup(); + this.getPolicyGroup("policyGroupName"); } else if(url === "policymapping"){ this.pageName = "Map Policy"; @@ -459,17 +458,8 @@ 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 +467,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; }); }