integrated activity api and fetch in master seaction.
This commit is contained in:
parent
4a5d9c05e6
commit
2428f15f35
@ -1,4 +1,4 @@
|
|||||||
export const mastersList = [{id:1, name: "Role"},{id:2, name: "Job Role"}]
|
export const mastersList = [{id:1, name: "Role"},{id:2, name: "Job Role"},{id:3,name:"Activity"}]
|
||||||
|
|
||||||
export const dailyTask = [
|
export const dailyTask = [
|
||||||
{
|
{
|
||||||
|
|||||||
@ -43,8 +43,9 @@ const useMaster = () => {
|
|||||||
response = await MasterRespository.getJobRole();
|
response = await MasterRespository.getJobRole();
|
||||||
response = response.data
|
response = response.data
|
||||||
break;
|
break;
|
||||||
case "Module":
|
case "Activity":
|
||||||
response = [{description: null,module:"Module 1",featurePermission: null,id: "08dd4761-363c-49ed-8851-3d2489a3e98d"},{description: null,module:"Module 2",featurePermission: null,id: "08dy9761-363c-49ed-8851-3d2489a3e98d"},{description: null,module:"Module 3",featurePermission: null,id: "08dy7761-263c-49ed-8851-3d2489a3e98d"}];
|
response = await MasterRespository.getActivites();
|
||||||
|
response = response.data
|
||||||
break;
|
break;
|
||||||
case "Status":
|
case "Status":
|
||||||
response = [{description: null,featurePermission: null,id: "02dd4761-363c-49ed-8851-3d2489a3e98d",status:"status 1"},{description: null,featurePermission: null,id: "03dy9761-363c-49ed-8851-3d2489a3e98d",status:"status 2"},{description: null,featurePermission: null,id: "03dy7761-263c-49ed-8851-3d2489a3e98d",status:"Status 3"}];
|
response = [{description: null,featurePermission: null,id: "02dd4761-363c-49ed-8851-3d2489a3e98d",status:"status 1"},{description: null,featurePermission: null,id: "03dy9761-363c-49ed-8851-3d2489a3e98d",status:"status 2"},{description: null,featurePermission: null,id: "03dy7761-263c-49ed-8851-3d2489a3e98d",status:"Status 3"}];
|
||||||
|
|||||||
@ -28,7 +28,7 @@ const MasterTable = ( {data, columns, loading, handleModalData} ) =>
|
|||||||
.map((col) => ({
|
.map((col) => ({
|
||||||
...col,
|
...col,
|
||||||
label:
|
label:
|
||||||
col.key === "role" || col.key === "module" || col.key === "status" ? "Name" : col.label,
|
col.key === "role" || col.key === "Activity" || col.key === "status" ? "Name" : col.label,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -46,7 +46,7 @@ const MasterTable = ( {data, columns, loading, handleModalData} ) =>
|
|||||||
<tr>
|
<tr>
|
||||||
<th></th>
|
<th></th>
|
||||||
<th>{ selectedMaster} Name</th>
|
<th>{ selectedMaster} Name</th>
|
||||||
<th>{selectedMaster } Description</th>
|
<th>{selectedMaster} {selectedMaster === "Activity" ? "Unit":"Description" }</th>
|
||||||
<th className={` ${!hasMasterPermission && 'd-none'}`}>Actions</th>
|
<th className={` ${!hasMasterPermission && 'd-none'}`}>Actions</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|||||||
@ -27,7 +27,9 @@ export const MasterRespository = {
|
|||||||
|
|
||||||
createJobRole:(data)=>api.post('api/roles/jobrole',data),
|
createJobRole:(data)=>api.post('api/roles/jobrole',data),
|
||||||
getJobRole :()=>api.get("/api/roles/jobrole"),
|
getJobRole :()=>api.get("/api/roles/jobrole"),
|
||||||
updateJobRole:(id,data)=>api.put(`/api/roles/jobrole/${id}`,data)
|
updateJobRole: ( id, data ) => api.put( `/api/roles/jobrole/${ id }`, data ),
|
||||||
|
|
||||||
|
getActivites: () => api.get( 'api/task/activities' ),
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user