From aff0f28cae688bd9f10f390bf4cd38fd69dc4382 Mon Sep 17 00:00:00 2001 From: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> Date: Thu, 3 Aug 2023 14:07:37 +0530 Subject: [PATCH 1/6] MOSIP-26354 : PMP UI: All active policies should be display in Policy group dropdown Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- .../mater-data-common-body.component.html | 10 +++++---- .../mater-data-common-body.component.scss | 5 +++++ .../mater-data-common-body.component.ts | 21 +++++++++++++++++-- 3 files changed, 30 insertions(+), 6 deletions(-) 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 448f5cd00..a30923ca6 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 @@ -53,15 +53,17 @@ placeholder="{{ field.label[primaryLang] }}" required > + - {{ data.fieldValue }} + {{ data.fieldCode }} 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 8301a6f7b..b75021861 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,4 +9,9 @@ mat-form-field{ .mat-card-content>:first-child { margin-top: 14px; +} + +.example-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 a4c85523d..1ce739137 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,6 +44,7 @@ export class MaterDataCommonBodyComponent implements OnInit { disableForms: boolean; copyPrimaryWord: any; copySecondaryWord: any; + searchResult: any[] = []; @Input() primaryData: any = {}; @Input() secondaryData: any; @@ -419,9 +420,12 @@ export class MaterDataCommonBodyComponent implements OnInit { getDeviceType(key) { const filterObject = new FilterValuesModel('name', 'unique', ''); + console.log("filterObject" + filterObject); let filterRequest = new FilterRequest([filterObject], this.primaryLang, []); filterRequest["purpose"] = "REGISTRATION"; + console.log("filterRequest" + filterRequest); let request = new RequestModel('', null, filterRequest); + console.log("request" + request); this.dataStorageService .getFiltersForAllDropDown('partnermanager/devicedetail/deviceType', request) .subscribe(response => { @@ -456,8 +460,19 @@ export class MaterDataCommonBodyComponent implements OnInit { }); } + onKey(value) { + this.searchResult = this.search(value); + } + + search(value: string) { + let filter = value.toLowerCase(); + console.log("seachAPITriger" + filter); + console.log(this.dropDownValues.partnerTypeCode.primary); + return this.dropDownValues.partnerTypeCode.primary.filter(option => option.fieldCode.toLowerCase().startsWith(filter)); + } + getPolicyGroup(key) { - const filterObject = new FilterValuesModel('name', 'unique', ''); + const filterObject = new FilterValuesModel('id', 'unique', ''); let optinalFilterObject = new OptionalFilterValuesModel('isActive', 'equals', 'true'); let filterRequest = new FilterRequest([filterObject], this.primaryLang, [optinalFilterObject]); filterRequest["purpose"] = "REGISTRATION"; @@ -465,7 +480,9 @@ export class MaterDataCommonBodyComponent implements OnInit { this.dataStorageService .getFiltersForAllDropDown('policymanager/policies/group', request) .subscribe(response => { - this.dropDownValues[key] = response.response.filters; + 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); }); } From 11a0016da7aca0cc025bb76df3d57a4c244f15a0 Mon Sep 17 00:00:00 2001 From: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> Date: Mon, 11 Sep 2023 10:56:09 +0530 Subject: [PATCH 2/6] Removed console.log statements Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- .../mater-data-common-body.component.ts | 5 ----- 1 file changed, 5 deletions(-) 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 1ce739137..ac52cfd58 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 @@ -420,12 +420,9 @@ export class MaterDataCommonBodyComponent implements OnInit { getDeviceType(key) { const filterObject = new FilterValuesModel('name', 'unique', ''); - console.log("filterObject" + filterObject); let filterRequest = new FilterRequest([filterObject], this.primaryLang, []); filterRequest["purpose"] = "REGISTRATION"; - console.log("filterRequest" + filterRequest); let request = new RequestModel('', null, filterRequest); - console.log("request" + request); this.dataStorageService .getFiltersForAllDropDown('partnermanager/devicedetail/deviceType', request) .subscribe(response => { @@ -466,8 +463,6 @@ export class MaterDataCommonBodyComponent implements OnInit { search(value: string) { let filter = value.toLowerCase(); - console.log("seachAPITriger" + filter); - console.log(this.dropDownValues.partnerTypeCode.primary); return this.dropDownValues.partnerTypeCode.primary.filter(option => option.fieldCode.toLowerCase().startsWith(filter)); } From 331ce69c9d7baf3a1e34474d879422256a49c30f Mon Sep 17 00:00:00 2001 From: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> Date: Mon, 5 Feb 2024 12:14:31 +0530 Subject: [PATCH 3/6] Removed slice method Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- .../mater-data-common-body.component.html | 4 ++-- .../mater-data-common-body.component.scss | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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 a30923ca6..eec53f941 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 @@ -53,9 +53,9 @@ placeholder="{{ field.label[primaryLang] }}" required > - + Date: Mon, 5 Feb 2024 12:32:29 +0530 Subject: [PATCH 4/6] Removed input parameter key Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- pmp-ui/src/app/core/services/data-storage.service.ts | 2 +- pmp-ui/src/app/core/services/misp.service.ts | 2 +- pmp-ui/src/app/core/services/policy.service.ts | 2 +- .../mater-data-common-body/mater-data-common-body.component.ts | 2 +- pmp-ui/src/assets/config.json | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pmp-ui/src/app/core/services/data-storage.service.ts b/pmp-ui/src/app/core/services/data-storage.service.ts index 116c40a66..5f674df48 100644 --- a/pmp-ui/src/app/core/services/data-storage.service.ts +++ b/pmp-ui/src/app/core/services/data-storage.service.ts @@ -134,7 +134,7 @@ export class DataStorageService { createMisp(data: RequestModel): Observable { return this.http.post( - "https://dev.mosip.net/partnermanagement/v1/misps/misps",data + "https://api-internal.dev2.mosip.net/partnermanagement/v1/misps/misps",data ); } createPolicy(data: RequestModel): Observable { diff --git a/pmp-ui/src/app/core/services/misp.service.ts b/pmp-ui/src/app/core/services/misp.service.ts index d53996aa7..633538595 100644 --- a/pmp-ui/src/app/core/services/misp.service.ts +++ b/pmp-ui/src/app/core/services/misp.service.ts @@ -11,7 +11,7 @@ export class MispService { constructor(public http: HttpClient, public appService: AppConfigService) { } - public BASE_URL = "https://dev.mosip.net/partnermanagement/v1/misps"; + public BASE_URL = "https://api-internal.dev2.mosip.net/partnermanagement/v1/misps"; getRegistrationMispDetails(request: RequestModel): Observable { return this.http.get(this.BASE_URL +"/misps");; diff --git a/pmp-ui/src/app/core/services/policy.service.ts b/pmp-ui/src/app/core/services/policy.service.ts index 7d4aa0a44..afe037421 100644 --- a/pmp-ui/src/app/core/services/policy.service.ts +++ b/pmp-ui/src/app/core/services/policy.service.ts @@ -16,7 +16,7 @@ export class PolicyService{ constructor(public http:HttpClient, public appService:AppConfigService){} - public BASE_URL = "https://dev.mosip.net/partnermanagement/v1/policies"; + public BASE_URL = "https://api-internal.dev2.mosip.net/partnermanagement/v1/policies"; getPolicyDetails(request: RequestModel): Observable { console.log("request>>>"+JSON.stringify(request)); 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 ac52cfd58..537fb4d90 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 @@ -466,7 +466,7 @@ export class MaterDataCommonBodyComponent implements OnInit { return this.dropDownValues.partnerTypeCode.primary.filter(option => option.fieldCode.toLowerCase().startsWith(filter)); } - getPolicyGroup(key) { + getPolicyGroup() { const filterObject = new FilterValuesModel('id', 'unique', ''); let optinalFilterObject = new OptionalFilterValuesModel('isActive', 'equals', 'true'); let filterRequest = new FilterRequest([filterObject], this.primaryLang, [optinalFilterObject]); diff --git a/pmp-ui/src/assets/config.json b/pmp-ui/src/assets/config.json index 20eee8a67..fba351492 100644 --- a/pmp-ui/src/assets/config.json +++ b/pmp-ui/src/assets/config.json @@ -1,7 +1,7 @@ { "primaryLangCode": "eng", "secondaryLangCode": "ara", - "baseUrl": "https://dev.mosip.net/", + "baseUrl": "https://api-internal.dev2.mosip.net/", "pmpUrl":"/", "version":"v1/" } From f30e3429f5af695e8aeb121aa6515c78e03388b0 Mon Sep 17 00:00:00 2001 From: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> Date: Mon, 5 Feb 2024 12:34:33 +0530 Subject: [PATCH 5/6] changed the input as per the input parameter Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- pmp-ui/src/app/core/services/data-storage.service.ts | 2 +- pmp-ui/src/app/core/services/misp.service.ts | 2 +- pmp-ui/src/app/core/services/policy.service.ts | 2 +- .../mater-data-common-body.component.ts | 4 ++-- pmp-ui/src/assets/config.json | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pmp-ui/src/app/core/services/data-storage.service.ts b/pmp-ui/src/app/core/services/data-storage.service.ts index 5f674df48..3c5a6c057 100644 --- a/pmp-ui/src/app/core/services/data-storage.service.ts +++ b/pmp-ui/src/app/core/services/data-storage.service.ts @@ -134,7 +134,7 @@ export class DataStorageService { createMisp(data: RequestModel): Observable { return this.http.post( - "https://api-internal.dev2.mosip.net/partnermanagement/v1/misps/misps",data + "https://dev..mosip.net/partnermanagement/v1/misps/misps",data ); } createPolicy(data: RequestModel): Observable { diff --git a/pmp-ui/src/app/core/services/misp.service.ts b/pmp-ui/src/app/core/services/misp.service.ts index 633538595..ea07d0238 100644 --- a/pmp-ui/src/app/core/services/misp.service.ts +++ b/pmp-ui/src/app/core/services/misp.service.ts @@ -11,7 +11,7 @@ export class MispService { constructor(public http: HttpClient, public appService: AppConfigService) { } - public BASE_URL = "https://api-internal.dev2.mosip.net/partnermanagement/v1/misps"; + public BASE_URL = "https://dev..mosip.net/partnermanagement/v1/misps"; getRegistrationMispDetails(request: RequestModel): Observable { return this.http.get(this.BASE_URL +"/misps");; diff --git a/pmp-ui/src/app/core/services/policy.service.ts b/pmp-ui/src/app/core/services/policy.service.ts index afe037421..6afd8aff1 100644 --- a/pmp-ui/src/app/core/services/policy.service.ts +++ b/pmp-ui/src/app/core/services/policy.service.ts @@ -16,7 +16,7 @@ export class PolicyService{ constructor(public http:HttpClient, public appService:AppConfigService){} - public BASE_URL = "https://api-internal.dev2.mosip.net/partnermanagement/v1/policies"; + public BASE_URL = "https://dev..mosip.net/partnermanagement/v1/policies"; getPolicyDetails(request: RequestModel): Observable { console.log("request>>>"+JSON.stringify(request)); 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 537fb4d90..0490f37b9 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 @@ -132,12 +132,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("policyGroupName"); + this.getPolicyGroup(); } else if(url === "authpolicy"){ this.pageName = "Auth Policy"; this.primaryData = {"name": "", "desc": "", "policies": "", "policyGroupName": "", "policyType": "Auth", "version": "1.1"}; - this.getPolicyGroup("policyGroupName"); + this.getPolicyGroup(); } else if(url === "policymapping"){ this.pageName = "Map Policy"; diff --git a/pmp-ui/src/assets/config.json b/pmp-ui/src/assets/config.json index fba351492..2db38bcba 100644 --- a/pmp-ui/src/assets/config.json +++ b/pmp-ui/src/assets/config.json @@ -1,7 +1,7 @@ { "primaryLangCode": "eng", "secondaryLangCode": "ara", - "baseUrl": "https://api-internal.dev2.mosip.net/", + "baseUrl": "https://dev..mosip.net/", "pmpUrl":"/", "version":"v1/" } From e7b6e2d71836acc691babb5182d33c57f5078ffd Mon Sep 17 00:00:00 2001 From: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> Date: Mon, 5 Feb 2024 12:35:28 +0530 Subject: [PATCH 6/6] config changes Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com> --- pmp-ui/src/app/core/services/data-storage.service.ts | 2 +- pmp-ui/src/app/core/services/misp.service.ts | 2 +- pmp-ui/src/app/core/services/policy.service.ts | 2 +- pmp-ui/src/assets/config.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pmp-ui/src/app/core/services/data-storage.service.ts b/pmp-ui/src/app/core/services/data-storage.service.ts index 3c5a6c057..116c40a66 100644 --- a/pmp-ui/src/app/core/services/data-storage.service.ts +++ b/pmp-ui/src/app/core/services/data-storage.service.ts @@ -134,7 +134,7 @@ export class DataStorageService { createMisp(data: RequestModel): Observable { return this.http.post( - "https://dev..mosip.net/partnermanagement/v1/misps/misps",data + "https://dev.mosip.net/partnermanagement/v1/misps/misps",data ); } createPolicy(data: RequestModel): Observable { diff --git a/pmp-ui/src/app/core/services/misp.service.ts b/pmp-ui/src/app/core/services/misp.service.ts index ea07d0238..d53996aa7 100644 --- a/pmp-ui/src/app/core/services/misp.service.ts +++ b/pmp-ui/src/app/core/services/misp.service.ts @@ -11,7 +11,7 @@ export class MispService { constructor(public http: HttpClient, public appService: AppConfigService) { } - public BASE_URL = "https://dev..mosip.net/partnermanagement/v1/misps"; + public BASE_URL = "https://dev.mosip.net/partnermanagement/v1/misps"; getRegistrationMispDetails(request: RequestModel): Observable { return this.http.get(this.BASE_URL +"/misps");; diff --git a/pmp-ui/src/app/core/services/policy.service.ts b/pmp-ui/src/app/core/services/policy.service.ts index 6afd8aff1..7d4aa0a44 100644 --- a/pmp-ui/src/app/core/services/policy.service.ts +++ b/pmp-ui/src/app/core/services/policy.service.ts @@ -16,7 +16,7 @@ export class PolicyService{ constructor(public http:HttpClient, public appService:AppConfigService){} - public BASE_URL = "https://dev..mosip.net/partnermanagement/v1/policies"; + public BASE_URL = "https://dev.mosip.net/partnermanagement/v1/policies"; getPolicyDetails(request: RequestModel): Observable { console.log("request>>>"+JSON.stringify(request)); diff --git a/pmp-ui/src/assets/config.json b/pmp-ui/src/assets/config.json index 2db38bcba..20eee8a67 100644 --- a/pmp-ui/src/assets/config.json +++ b/pmp-ui/src/assets/config.json @@ -1,7 +1,7 @@ { "primaryLangCode": "eng", "secondaryLangCode": "ara", - "baseUrl": "https://dev..mosip.net/", + "baseUrl": "https://dev.mosip.net/", "pmpUrl":"/", "version":"v1/" }