Skip to content

Commit

Permalink
Fix Inactive members events- shown on the home screen
Browse files Browse the repository at this point in the history
  • Loading branch information
cp-sneha-s committed Mar 29, 2024
1 parent c32db46 commit 8bc7958
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/ui/shared/events/bloc/celebrations_bloc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ class CelebrationsBloc extends Bloc<CelebrationEvent, CelebrationsState> {
try {
emit(state.copyWith(status: Status.loading));
final List<Employee> allEmployees = await _employeeService.getEmployees();
employees = allEmployees.map((e) {
employees = allEmployees.where((employee) => employee.status == EmployeeStatus.active).
map((e) {
if (e.dateOfBirth != null) {
final birthdate = e.dateOfBirth!.convertToUpcomingDay();
final Event event = Event(
Expand Down

0 comments on commit 8bc7958

Please sign in to comment.