Skip to content

Commit

Permalink
Show leave by start date
Browse files Browse the repository at this point in the history
  • Loading branch information
cp-sneha-s committed Dec 3, 2024
1 parent 5430112 commit 5814e17
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/ui/admin/leaves/leave_screen/bloc /admin_leaves_bloc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class AdminLeavesBloc extends Bloc<AdminLeavesEvents, AdminLeavesState> {
leavesFetchStatus: Status.success,
leaveApplicationMap: getLeaveApplicationFromLeaveEmployee(
leaves: paginatedData.leaves, members: _members)
.groupByMonth((la) => la.leave.appliedOn)));
.groupByMonth((la) => la.leave.startDate)));
} on Exception {
_isLoadedMax = true;
emit(state.copyWith(
Expand All @@ -86,7 +86,7 @@ class AdminLeavesBloc extends Bloc<AdminLeavesEvents, AdminLeavesState> {
emit(state.copyWith(
fetchMoreData: Status.success,
leaveApplicationMap:
leaveApplications.groupByMonth((la) => la.leave.appliedOn)));
leaveApplications.groupByMonth((la) => la.leave.startDate)));
} on Exception {
emit(state.copyWith(
error: firestoreFetchDataError, fetchMoreData: Status.error));
Expand Down Expand Up @@ -121,7 +121,7 @@ class AdminLeavesBloc extends Bloc<AdminLeavesEvents, AdminLeavesState> {
(element) => element.leave.leaveId == leave.leaveId);
emit(state.copyWith(
leaveApplicationMap:
leaveApplications.groupByMonth((la) => la.leave.appliedOn)));
leaveApplications.groupByMonth((la) => la.leave.startDate)));
}
}

Expand Down

0 comments on commit 5814e17

Please sign in to comment.