diff --git a/apps/mobile/packages/features/staff/shifts/lib/src/presentation/widgets/tabs/my_shifts_tab.dart b/apps/mobile/packages/features/staff/shifts/lib/src/presentation/widgets/tabs/my_shifts_tab.dart index 67063ce3..aeed0436 100644 --- a/apps/mobile/packages/features/staff/shifts/lib/src/presentation/widgets/tabs/my_shifts_tab.dart +++ b/apps/mobile/packages/features/staff/shifts/lib/src/presentation/widgets/tabs/my_shifts_tab.dart @@ -112,76 +112,6 @@ class _MyShiftsTabState extends State { return a.year == b.year && a.month == b.month && a.day == b.day; } - void _confirmShift(String id) { - showDialog( - context: context, - builder: (BuildContext ctx) => AlertDialog( - title: - Text(context.t.staff_shifts.my_shifts_tab.confirm_dialog.title), - content: - Text(context.t.staff_shifts.my_shifts_tab.confirm_dialog.message), - actions: [ - TextButton( - onPressed: () => Navigator.of(ctx).pop(), - child: Text(context.t.common.cancel), - ), - TextButton( - onPressed: () { - Navigator.of(ctx).pop(); - ReadContext(context).read().add(AcceptShiftEvent(id)); - UiSnackbar.show( - context, - message: context - .t.staff_shifts.my_shifts_tab.confirm_dialog.success, - type: UiSnackbarType.success, - ); - }, - style: TextButton.styleFrom( - foregroundColor: UiColors.success, - ), - child: - Text(context.t.staff_shifts.shift_details.accept_shift), - ), - ], - ), - ); - } - - void _declineShift(String id) { - showDialog( - context: context, - builder: (BuildContext ctx) => AlertDialog( - title: - Text(context.t.staff_shifts.my_shifts_tab.decline_dialog.title), - content: Text( - context.t.staff_shifts.my_shifts_tab.decline_dialog.message, - ), - actions: [ - TextButton( - onPressed: () => Navigator.of(ctx).pop(), - child: Text(context.t.common.cancel), - ), - TextButton( - onPressed: () { - Navigator.of(ctx).pop(); - ReadContext(context).read().add(DeclineShiftEvent(id)); - UiSnackbar.show( - context, - message: context - .t.staff_shifts.my_shifts_tab.decline_dialog.success, - type: UiSnackbarType.error, - ); - }, - style: TextButton.styleFrom( - foregroundColor: UiColors.destructive, - ), - child: Text(context.t.staff_shifts.shift_details.decline), - ), - ], - ), - ); - } - @override Widget build(BuildContext context) { final List calendarDays = _getCalendarDays(); @@ -352,10 +282,6 @@ class _MyShiftsTabState extends State { data: ShiftCardData.fromPending(assignment), onTap: () => Modular.to .toShiftDetailsById(assignment.shiftId), - onAccept: () => - _confirmShift(assignment.shiftId), - onDecline: () => - _declineShift(assignment.shiftId), ), ), ),