diff --git a/src/hooks/useAttendance.js b/src/hooks/useAttendance.js
index cbee0b8f..e4955f7e 100644
--- a/src/hooks/useAttendance.js
+++ b/src/hooks/useAttendance.js
@@ -32,7 +32,6 @@ export const useAttendance = (projectId, organizationId, includeInactive = false
);
return response.data;
},
- enabled: !!projectId,
onError: (error) => {
showToast(error.message || "Error while fetching Attendance", "error");
},
diff --git a/src/pages/Activities/AttendancePage.jsx b/src/pages/Activities/AttendancePage.jsx
index 36414fe5..9fce3fec 100644
--- a/src/pages/Activities/AttendancePage.jsx
+++ b/src/pages/Activities/AttendancePage.jsx
@@ -210,41 +210,36 @@ const AttendancePage = () => {
- {selectedProject ? (
- <>
- {activeTab === "all" && (
-
- )}
- {activeTab === "logs" && (
-
- )}
- {activeTab === "regularization" && DoRegularized && (
-
-
-
- )}
- >
- ) : (
-
- Please Select Project!
-
- )}
+
+ <>
+ {activeTab === "all" && (
+
+ )}
+ {activeTab === "logs" && (
+
+ )}
+ {activeTab === "regularization" && DoRegularized && (
+
+
+
+ )}
+ >
diff --git a/src/repositories/AttendanceRepository.jsx b/src/repositories/AttendanceRepository.jsx
index 8d2fce4e..15d18af8 100644
--- a/src/repositories/AttendanceRepository.jsx
+++ b/src/repositories/AttendanceRepository.jsx
@@ -4,9 +4,10 @@ const AttendanceRepository = {
markAttendance: (data) => api.post("/api/attendance/record", data),
getAttendance: (projectId, organizationId, includeInactive,date) => {
- let url = `/api/attendance/project/team?projectId=${projectId}`;
+ let url = `/api/attendance/project/team`;
const params = [];
+ if (projectId) params.push(`projectId=${projectId}`);
if (organizationId) params.push(`organizationId=${organizationId}`);
if (includeInactive) params.push(`includeInactive=${includeInactive}`);
if (date) params.push(`date=${date}`);