Skip to content

Commit 5814e17

Browse files
committed
Show leave by start date
1 parent 5430112 commit 5814e17

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/ui/admin/leaves/leave_screen/bloc /admin_leaves_bloc.dart

+3-3
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class AdminLeavesBloc extends Bloc<AdminLeavesEvents, AdminLeavesState> {
5959
leavesFetchStatus: Status.success,
6060
leaveApplicationMap: getLeaveApplicationFromLeaveEmployee(
6161
leaves: paginatedData.leaves, members: _members)
62-
.groupByMonth((la) => la.leave.appliedOn)));
62+
.groupByMonth((la) => la.leave.startDate)));
6363
} on Exception {
6464
_isLoadedMax = true;
6565
emit(state.copyWith(
@@ -86,7 +86,7 @@ class AdminLeavesBloc extends Bloc<AdminLeavesEvents, AdminLeavesState> {
8686
emit(state.copyWith(
8787
fetchMoreData: Status.success,
8888
leaveApplicationMap:
89-
leaveApplications.groupByMonth((la) => la.leave.appliedOn)));
89+
leaveApplications.groupByMonth((la) => la.leave.startDate)));
9090
} on Exception {
9191
emit(state.copyWith(
9292
error: firestoreFetchDataError, fetchMoreData: Status.error));
@@ -121,7 +121,7 @@ class AdminLeavesBloc extends Bloc<AdminLeavesEvents, AdminLeavesState> {
121121
(element) => element.leave.leaveId == leave.leaveId);
122122
emit(state.copyWith(
123123
leaveApplicationMap:
124-
leaveApplications.groupByMonth((la) => la.leave.appliedOn)));
124+
leaveApplications.groupByMonth((la) => la.leave.startDate)));
125125
}
126126
}
127127

0 commit comments

Comments
 (0)