enhanced the api calling

This commit is contained in:
Vaibhav Surve 2025-05-03 11:15:07 +05:30
parent bf003bac63
commit 5a86f242f9

View File

@ -46,6 +46,11 @@ class _AttendanceScreenState extends State<AttendanceScreen> with UIMixin {
attendanceController.selectedProjectId!); attendanceController.selectedProjectId!);
await attendanceController await attendanceController
.fetchAttendanceLogs(attendanceController.selectedProjectId!); .fetchAttendanceLogs(attendanceController.selectedProjectId!);
await attendanceController
.fetchProjectData(attendanceController.selectedProjectId!);
await attendanceController
.fetchProjectData(attendanceController.selectedProjectId!);
attendanceController.update();
} else { } else {
await attendanceController.fetchProjects(); await attendanceController.fetchProjects();
} }
@ -95,7 +100,8 @@ class _AttendanceScreenState extends State<AttendanceScreen> with UIMixin {
.fetchAttendanceLogs(value); .fetchAttendanceLogs(value);
await attendanceController await attendanceController
.fetchRegularizationLogs(value); .fetchRegularizationLogs(value);
await attendanceController.fetchProjectData(value); await attendanceController
.fetchProjectData(value);
attendanceController.update(); attendanceController.update();
}, },
itemBuilder: (BuildContext context) { itemBuilder: (BuildContext context) {
@ -707,6 +713,10 @@ class _AttendanceScreenState extends State<AttendanceScreen> with UIMixin {
attendanceController.selectedProjectId!); attendanceController.selectedProjectId!);
attendanceController.fetchAttendanceLogs( attendanceController.fetchAttendanceLogs(
attendanceController.selectedProjectId!); attendanceController.selectedProjectId!);
await attendanceController.fetchRegularizationLogs(
attendanceController.selectedProjectId!);
await attendanceController.fetchProjectData(
attendanceController.selectedProjectId!);
} }
}, },
style: ElevatedButton.styleFrom( style: ElevatedButton.styleFrom(
@ -756,6 +766,10 @@ class _AttendanceScreenState extends State<AttendanceScreen> with UIMixin {
attendanceController.selectedProjectId!); attendanceController.selectedProjectId!);
attendanceController.fetchAttendanceLogs( attendanceController.fetchAttendanceLogs(
attendanceController.selectedProjectId!); attendanceController.selectedProjectId!);
await attendanceController.fetchRegularizationLogs(
attendanceController.selectedProjectId!);
await attendanceController.fetchProjectData(
attendanceController.selectedProjectId!);
} }
}, },
style: ElevatedButton.styleFrom( style: ElevatedButton.styleFrom(