{ "version": 3, "sources": ["src/app/services/admin/admin.service.ts"], "sourcesContent": ["import { Injectable } from '@angular/core';\r\nimport { HttpClient, HttpErrorResponse, HttpParams } from '@angular/common/http';\r\nimport { Observable, throwError } from 'rxjs';\r\nimport { environment } from 'src/environments/environment';\r\nimport { EmployerStatusUpdateDto } from 'src/app/model/employerStatusUpdateDto';\r\nimport { CboStatusUpdateDto } from 'src/app/model/cboStatusUpdateDto';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class AdminService {\r\n\r\n private apiUrl = environment.apiUrl;\r\n\r\n constructor(private http: HttpClient ) { \r\n \r\n }\r\n\r\n // get user list for admin\r\n getUserList(searchText: string, sortColumn: string, sortOrder: string, pageNumber: number, pageSize: number, roleId: string): Observable {\r\n\r\n var result = this.http.get(`${this.apiUrl}/admin/userlist`, { params: new HttpParams()\r\n .set(\"searchText\", searchText.toString())\r\n .set(\"sortColumn\", sortColumn)\r\n .set(\"sortDirection\", sortOrder)\r\n .set(\"pageIndex\", pageNumber.toString())\r\n .set(\"pageSize\", pageSize.toString())\r\n .set(\"roleId\", roleId.toString())\r\n });\r\n\r\n return result;\r\n }\r\n\r\n // get cbo list for admin\r\n getCboList(searchText: string, sortColumn: string, sortOrder: string, pageNumber: number, pageSize: number): Observable {\r\n\r\n var result = this.http.get(`${this.apiUrl}/cbo/list`, { params: new HttpParams()\r\n .set(\"searchText\", searchText.toString())\r\n .set(\"sortColumn\", sortColumn)\r\n .set(\"sortDirection\", sortOrder)\r\n .set(\"pageIndex\", pageNumber.toString())\r\n .set(\"pageSize\", pageSize.toString())\r\n });\r\n\r\n return result;\r\n\r\n }\r\n\r\n\r\n // get cbo details\r\n getCboDetails(organizationId: string): Observable {\r\n return this.http.get(`${this.apiUrl}/cbo/${organizationId}`);\r\n }\r\n\r\n // update employer status\r\n updateEmployerStatus(data: EmployerStatusUpdateDto): Observable {\r\n return this.http.put(`${this.apiUrl}/admin/employer/statusupdate`, data);\r\n }\r\n\r\n // update cob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