From e3636b96e9938cb89bb90672cf70fff3ae790186 Mon Sep 17 00:00:00 2001 From: Muni Mohan Kunchi Date: Thu, 6 Feb 2020 13:51:45 -0500 Subject: adding sdk changes adding sdk changes Issue-ID: PORTAL-830 Signed-off-by: Muni Mohan Kunchi Change-Id: I0c99d3ab15fcf4c3b34d84658b64114dadbe2577 --- .../src/app/pages/ext/profile/profile.service.ts | 62 ++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 ecomp-sdk/epsdk-app-os/ngappsrc/src/app/pages/ext/profile/profile.service.ts (limited to 'ecomp-sdk/epsdk-app-os/ngappsrc/src/app/pages/ext/profile/profile.service.ts') diff --git a/ecomp-sdk/epsdk-app-os/ngappsrc/src/app/pages/ext/profile/profile.service.ts b/ecomp-sdk/epsdk-app-os/ngappsrc/src/app/pages/ext/profile/profile.service.ts new file mode 100644 index 00000000..111cf3f4 --- /dev/null +++ b/ecomp-sdk/epsdk-app-os/ngappsrc/src/app/pages/ext/profile/profile.service.ts @@ -0,0 +1,62 @@ +import { Injectable } from '@angular/core'; +import { HttpClient, HttpHeaders } from '@angular/common/http'; +import { environment } from 'src/environments/environment'; + +@Injectable({ + providedIn: 'root' +}) +export class ProfileService { + + constructor(private http:HttpClient) { } + + getUserPagination(){ + return this.http.get(environment.getUserPagination,{ withCredentials: true }); + } + + + getPostSearch(postSearchBean:any) + { + return this.http.post(environment.postSearch,JSON.stringify({postSearchBean: postSearchBean}),{ withCredentials: true }); + + } + + importUser(postSearchBean:any) + { + return this.http.post(environment.importSearch,JSON.stringify({postSearchBean: postSearchBean}),{ withCredentials: true }); + + } + + getPostProfile() + { + return this.http.get(environment.getPostProfile,{ withCredentials: true }); + + } + + getSelfProfile() + { + return this.http.get(environment.getSelfProfile,{ withCredentials: true }); + + } + + removeRole(data,profileId) + { + return this.http.post(environment.removeUserRole+'?profile_id='+profileId,JSON.stringify({role: data}),{ withCredentials: true }); + } + + addUserRole(data,profileId) + { + return this.http.post(environment.addUserRole+'?profile_id='+profileId,JSON.stringify({role: data}),{ withCredentials: true }); + } + + saveProfile(data,profileId) + { + return this.http.post(environment.saveProfile+'?profile_id='+profileId,JSON.stringify({profile: data.profile,selectedCountry:data.selectedCountry, selectedState:data.selectedState, selectedTimeZone:data.selectedTimeZone}),{ withCredentials: true }); + + } + + toggleProfileActive(profileId){ + return this.http.get(environment.toggleProfileActive+profileId,{ withCredentials: true }); + } + + +} -- cgit 1.2.3-korg