From 220a25a2566c90bc540e7190342f73824d2ff54a Mon Sep 17 00:00:00 2001 From: mravula Date: Mon, 31 Aug 2020 12:29:32 -0400 Subject: Raptor UI Changes, user profile, folder restructure Issue-ID: PORTAL-902 Change-Id: Ib76bb3fce7efe55504b75d2fc4764bafb9f8e908 Signed-off-by: mravula --- .../app/user-profile/profile/profile.service.ts | 73 ++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 ecomp-sdk/epsdk-app-os/ngappsrc/src/app/user-profile/profile/profile.service.ts (limited to 'ecomp-sdk/epsdk-app-os/ngappsrc/src/app/user-profile/profile/profile.service.ts') diff --git a/ecomp-sdk/epsdk-app-os/ngappsrc/src/app/user-profile/profile/profile.service.ts b/ecomp-sdk/epsdk-app-os/ngappsrc/src/app/user-profile/profile/profile.service.ts new file mode 100644 index 00000000..c40e7618 --- /dev/null +++ b/ecomp-sdk/epsdk-app-os/ngappsrc/src/app/user-profile/profile/profile.service.ts @@ -0,0 +1,73 @@ +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); + } + + getAllUsers(){ + return this.http.get(environment.getAllUsers); + } + + getPostSearch(postSearchBean:any) + { + return this.http.post(environment.postSearch,JSON.stringify({postSearchBean: postSearchBean})); + + } + + importUser(postSearchBean:any) + { + return this.http.post(environment.importSearch,JSON.stringify({postSearchBean: postSearchBean})); + + } + + getPostProfile() + { + return this.http.get(environment.getPostProfile); + + } + + getSelfProfile() + { + return this.http.get(environment.getSelfProfile); + + } + + getProfileById(profileId){ + return this.http.get(environment.getProfileById+"?profile_id="+profileId); + } + + removeRole(data,profileId) + { + return this.http.post(environment.removeUserRole+'?profile_id='+profileId,JSON.stringify({role: data})); + } + + addUserRole(data,profileId) + { + return this.http.post(environment.addUserRole+'?profile_id='+profileId,JSON.stringify({role: data})); + } + + 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 + })); + + } + + toggleProfileActive(profileId){ + return this.http.get(environment.toggleProfileActive+profileId); + } + +} -- cgit 1.2.3-korg