diff --git a/src/app/core/services/param/param.service.ts b/src/app/core/services/param/param.service.ts index 053d703..a5a8432 100644 --- a/src/app/core/services/param/param.service.ts +++ b/src/app/core/services/param/param.service.ts @@ -21,6 +21,12 @@ export class ParamService { ) } + getValidParameters(P_PARAMTYPE: string): Observable { + return this.http.get(`${this.apiUrl}/${this.apiDb}/GetParamValues?P_SPID=${this.userService.getUserSpid()}&P_PARAMTYPE=${P_PARAMTYPE}`).pipe( + map(response => this.mapToParamValue(response)) + ) + } + private mapToParamValue(data: any[]): ParamProperties[] { return data.map((paramValue: any) => ({ paramId: paramValue.PARAMID, diff --git a/src/app/param/manage-country/manage-country.component.ts b/src/app/param/manage-country/manage-country.component.ts index 37bada1..7fc591a 100644 --- a/src/app/param/manage-country/manage-country.component.ts +++ b/src/app/param/manage-country/manage-country.component.ts @@ -71,8 +71,8 @@ export class ManageCountryComponent { this.isLoading = true; forkJoin({ - countries: this.paramService.getParameters('002'), - countriesWithMessages: this.paramService.getParameters('014') + countries: this.paramService.getValidParameters('002'), + countriesWithMessages: this.paramService.getValidParameters('014') }).pipe(finalize(() => { this.isLoading = false; })).subscribe({