added new endpoint for employee list that return basic info of employee
This commit is contained in:
parent
71376c7706
commit
317f99e2a4
@ -1,17 +1,26 @@
|
|||||||
import { api } from "../utils/axiosClient";
|
import { api } from "../utils/axiosClient";
|
||||||
|
|
||||||
const EmployeeRepository = {
|
const EmployeeRepository = {
|
||||||
getAllEmployeeList:(showInactive)=>api.get(`api/employee/list?showInactive=${showInactive}`),
|
getAllEmployeeList: (showInactive) =>
|
||||||
|
api.get(`api/employee/list?showInactive=${showInactive}`),
|
||||||
getEmployeeListByproject: (projectid) =>
|
getEmployeeListByproject: (projectid) =>
|
||||||
api.get(`/api/employee/list/${projectid}`),
|
api.get(`/api/employee/list/${projectid}`),
|
||||||
searchEmployees: (query) =>
|
searchEmployees: (query) => api.get(`/api/employee/search/${query}`),
|
||||||
api.get(`/api/employee/search/${query}`),
|
manageEmployee: (data) => api.post("/api/employee/manage", data),
|
||||||
manageEmployee: (data) =>
|
|
||||||
api.post("/api/employee/manage", data),
|
|
||||||
updateEmployee: (id, data) => api.put(`/users/${id}`, data),
|
updateEmployee: (id, data) => api.put(`/users/${id}`, data),
|
||||||
// deleteEmployee: ( id ) => api.delete( `/users/${ id }` ),
|
// deleteEmployee: ( id ) => api.delete( `/users/${ id }` ),
|
||||||
getEmployeeProfile: (id) => api.get(`/api/employee/profile/get/${id}`),
|
getEmployeeProfile: (id) => api.get(`/api/employee/profile/get/${id}`),
|
||||||
deleteEmployee:(id)=>api.delete(`/api/employee/${id}`)
|
deleteEmployee: (id) => api.delete(`/api/employee/${id}`),
|
||||||
|
getEmployeeName: (projectId, search) => {
|
||||||
|
const params = new URLSearchParams();
|
||||||
|
|
||||||
|
if (projectId) params.append("projectId", projectId);
|
||||||
|
if (search) params.append("searchString", search);
|
||||||
|
|
||||||
|
const query = params.toString();
|
||||||
|
return api.get(`/api/Employee/basic${query ? `?${query}` : ""}`);
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export default EmployeeRepository;
|
export default EmployeeRepository;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user