61 lines
2.6 KiB
JavaScript
61 lines
2.6 KiB
JavaScript
import { api } from "../utils/axiosClient";
|
|
|
|
export const ActivityeRepository = {
|
|
getActivities: () => api.get(`/api/task/activities`),
|
|
createActivity: (data) => api.post("/users", data),
|
|
updateActivity: (id, data) => api.put(`/users/${id}`, data),
|
|
deleteActivity: (id) => api.delete(`/users/${id}`),
|
|
};
|
|
|
|
export const RolesRepository = {
|
|
getRoles: () => api.get(`/api/employee/roles`),
|
|
createRoles: (data) => api.post("/users", data),
|
|
updateRoles: (id, data) => api.put(`/users/${id}`, data),
|
|
deleteRoles: (id) => api.delete(`/users/${id}`),
|
|
|
|
|
|
getEmployeeRoles:(id)=>api.get(`/api/employee/roles/${id}`),
|
|
createEmployeeRoles:(data)=>api.post("/api/roles/assign-roles",data)
|
|
};
|
|
|
|
|
|
export const MasterRespository = {
|
|
getRoles: () => api.get("/api/roles"),
|
|
createRole: (data) => api.post("/api/roles", data),
|
|
updateRoles:(id,data) => api.put(`/api/roles/${id}`,data),
|
|
getFeatures: () => api.get( `/api/feature` ),
|
|
|
|
|
|
createJobRole:(data)=>api.post('api/roles/jobrole',data),
|
|
getJobRole :()=>api.get("/api/roles/jobrole"),
|
|
updateJobRole: ( id, data ) => api.put( `/api/roles/jobrole/${ id }`, data ),
|
|
|
|
|
|
getActivites: () => api.get( 'api/master/activities' ),
|
|
createActivity: (data) => api.post( 'api/master/activity',data ),
|
|
updateActivity:(id,data) =>api.post(`api/master/activity/edit/${id}`,data),
|
|
getIndustries: () => api.get( 'api/master/industries' ),
|
|
|
|
// delete
|
|
"Job Role": ( id ) => api.delete( `/api/roles/jobrole/${ id }` ),
|
|
"Activity": ( id ) => api.delete( `/api/master/activity/delete/${ id }` ),
|
|
"Application Role":(id)=>api.delete(`/api/roles/${id}`),
|
|
"Work Category": ( id ) => api.delete( `api/master/work-category/${ id }` ),
|
|
"Contact Category": ( id ) => api.delete( `/api/master/contact-category/${id}` ),
|
|
"Contact Tag" :(id)=>api.delete(`/api/master/contact-tag/${id}`),
|
|
|
|
getWorkCategory:() => api.get(`/api/master/work-categories`),
|
|
createWorkCategory: (data) => api.post(`/api/master/work-category`,data),
|
|
updateWorkCategory: ( id, data ) => api.post( `/api/master/work-category/edit/${ id }`, data ),
|
|
|
|
getContactCategory: () => api.get( `/api/master/contact-categories` ),
|
|
createContactCategory: (data ) => api.post( `/api/master/contact-category`, data ),
|
|
updateContactCategory: ( id, data ) => api.post( `/api/master/contact-category/edit/${ id }`, data ),
|
|
|
|
getContactTag: () => api.get( `/api/master/contact-tags` ),
|
|
createContactTag: (data ) => api.post( `/api/master/contact-tag`, data ),
|
|
updateContactTag: ( id, data ) => api.post( `/api/master/contact-tag/edit/${ id }`, data ),
|
|
|
|
getAuditStatus:()=>api.get('/api/Master/work-status')
|
|
|
|
} |