Changes in Attendance module for all projects.
This commit is contained in:
parent
bc933f4c64
commit
0511ed6d82
@ -32,7 +32,6 @@ export const useAttendance = (projectId, organizationId, includeInactive = false
|
|||||||
);
|
);
|
||||||
return response.data;
|
return response.data;
|
||||||
},
|
},
|
||||||
enabled: !!projectId,
|
|
||||||
onError: (error) => {
|
onError: (error) => {
|
||||||
showToast(error.message || "Error while fetching Attendance", "error");
|
showToast(error.message || "Error while fetching Attendance", "error");
|
||||||
},
|
},
|
||||||
|
@ -210,41 +210,36 @@ const AttendancePage = () => {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="tab-content attedanceTabs py-0 px-1 px-sm-3 pb-10">
|
<div className="tab-content attedanceTabs py-0 px-1 px-sm-3 pb-10">
|
||||||
{selectedProject ? (
|
|
||||||
<>
|
<>
|
||||||
{activeTab === "all" && (
|
{activeTab === "all" && (
|
||||||
<div className="tab-pane fade show active py-0 mx-5">
|
<div className="tab-pane fade show active py-0 mx-5">
|
||||||
<Attendance
|
<Attendance
|
||||||
handleModalData={handleModalData}
|
handleModalData={handleModalData}
|
||||||
getRole={getRole}
|
getRole={getRole}
|
||||||
searchTerm={searchTerm}
|
searchTerm={searchTerm}
|
||||||
organizationId={appliedFilters.selectedOrganization}
|
organizationId={appliedFilters.selectedOrganization}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{activeTab === "logs" && (
|
{activeTab === "logs" && (
|
||||||
<div className="tab-pane fade show active py-0">
|
<div className="tab-pane fade show active py-0">
|
||||||
<AttendanceLog
|
<AttendanceLog
|
||||||
handleModalData={handleModalData}
|
handleModalData={handleModalData}
|
||||||
searchTerm={searchTerm}
|
searchTerm={searchTerm}
|
||||||
organizationId={appliedFilters.selectedOrganization}
|
organizationId={appliedFilters.selectedOrganization}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{activeTab === "regularization" && DoRegularized && (
|
{activeTab === "regularization" && DoRegularized && (
|
||||||
<div className="tab-pane fade show active py-0">
|
<div className="tab-pane fade show active py-0">
|
||||||
<Regularization
|
<Regularization
|
||||||
searchTerm={searchTerm}
|
searchTerm={searchTerm}
|
||||||
organizationId={appliedFilters.selectedOrganization}
|
organizationId={appliedFilters.selectedOrganization}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
) : (
|
|
||||||
<div className="py-2">
|
|
||||||
<small>Please Select Project!</small>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -4,9 +4,10 @@ const AttendanceRepository = {
|
|||||||
markAttendance: (data) => api.post("/api/attendance/record", data),
|
markAttendance: (data) => api.post("/api/attendance/record", data),
|
||||||
|
|
||||||
getAttendance: (projectId, organizationId, includeInactive,date) => {
|
getAttendance: (projectId, organizationId, includeInactive,date) => {
|
||||||
let url = `/api/attendance/project/team?projectId=${projectId}`;
|
let url = `/api/attendance/project/team`;
|
||||||
|
|
||||||
const params = [];
|
const params = [];
|
||||||
|
if (projectId) params.push(`projectId=${projectId}`);
|
||||||
if (organizationId) params.push(`organizationId=${organizationId}`);
|
if (organizationId) params.push(`organizationId=${organizationId}`);
|
||||||
if (includeInactive) params.push(`includeInactive=${includeInactive}`);
|
if (includeInactive) params.push(`includeInactive=${includeInactive}`);
|
||||||
if (date) params.push(`date=${date}`);
|
if (date) params.push(`date=${date}`);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user