refactor: streamline shift navigation calls and set default shifts tab to 'myshifts'.
This commit is contained in:
@@ -113,11 +113,7 @@ extension StaffNavigator on IModularNavigator {
|
|||||||
if (refreshAvailable == true) {
|
if (refreshAvailable == true) {
|
||||||
args['refreshAvailable'] = true;
|
args['refreshAvailable'] = true;
|
||||||
}
|
}
|
||||||
pushNamedAndRemoveUntil(
|
navigate(StaffPaths.shifts, arguments: args.isEmpty ? null : args);
|
||||||
StaffPaths.shifts,
|
|
||||||
(_) => false,
|
|
||||||
arguments: args.isEmpty ? null : args,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Navigates to the Payments tab.
|
/// Navigates to the Payments tab.
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ class _ShiftDetailsPageState extends State<ShiftDetailsPage> {
|
|||||||
);
|
);
|
||||||
Modular.to.toShifts(
|
Modular.to.toShifts(
|
||||||
selectedDate: state.shiftDate,
|
selectedDate: state.shiftDate,
|
||||||
initialTab: 'find',
|
initialTab: 'myshifts',
|
||||||
refreshAvailable: true,
|
refreshAvailable: true,
|
||||||
);
|
);
|
||||||
} else if (state is ShiftDetailsError) {
|
} else if (state is ShiftDetailsError) {
|
||||||
|
|||||||
@@ -161,10 +161,7 @@ class _MyShiftCardState extends State<MyShiftCard> {
|
|||||||
|
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Modular.to.pushNamed(
|
Modular.to.toShiftDetails(widget.shift);
|
||||||
StaffPaths.shiftDetails(widget.shift.id),
|
|
||||||
arguments: widget.shift,
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
margin: const EdgeInsets.only(bottom: UiConstants.space3),
|
margin: const EdgeInsets.only(bottom: UiConstants.space3),
|
||||||
|
|||||||
Reference in New Issue
Block a user