Refactor navigation and remove unused navigator extensions across staff features
- Removed background color from CreateOrderView, OneTimeOrderView, and RapidOrderView. - Updated navigation paths in OneTimeOrderView and other staff authentication pages to use new constants. - Deleted unused navigator extensions for staff authentication, home, profile, and shifts. - Refactored navigation in StaffMainModule to use new path constants. - Cleaned up imports and adjusted navigation calls in various staff-related pages and widgets.
This commit is contained in:
@@ -16,7 +16,6 @@ class PermanentOrderPage extends StatelessWidget {
|
||||
t.client_create_order.permanent;
|
||||
|
||||
return Scaffold(
|
||||
backgroundColor: UiColors.bgPrimary,
|
||||
appBar: UiAppBar(
|
||||
title: labels.title,
|
||||
onLeadingPressed: () => Modular.to.navigate(ClientPaths.createOrder),
|
||||
|
||||
@@ -16,7 +16,6 @@ class RecurringOrderPage extends StatelessWidget {
|
||||
t.client_create_order.recurring;
|
||||
|
||||
return Scaffold(
|
||||
backgroundColor: UiColors.bgPrimary,
|
||||
appBar: UiAppBar(
|
||||
title: labels.title,
|
||||
onLeadingPressed: () => Modular.to.toClientHome(),
|
||||
|
||||
@@ -40,7 +40,6 @@ class CreateOrderView extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: UiColors.bgPrimary,
|
||||
appBar: UiAppBar(
|
||||
title: t.client_create_order.title,
|
||||
onLeadingPressed: () => Modular.to.toClientHome(),
|
||||
|
||||
@@ -33,7 +33,7 @@ class OneTimeOrderView extends StatelessWidget {
|
||||
message: labels.success_message,
|
||||
buttonLabel: labels.back_to_orders,
|
||||
onDone: () => Modular.to.pushNamedAndRemoveUntil(
|
||||
'/client-main/orders/',
|
||||
ClientPaths.orders,
|
||||
(_) => false,
|
||||
arguments: <String, dynamic>{
|
||||
'initialDate': state.date.toIso8601String(),
|
||||
@@ -45,7 +45,6 @@ class OneTimeOrderView extends StatelessWidget {
|
||||
if (state.vendors.isEmpty &&
|
||||
state.status != OneTimeOrderStatus.loading) {
|
||||
return Scaffold(
|
||||
backgroundColor: UiColors.bgPrimary,
|
||||
body: Column(
|
||||
children: <Widget>[
|
||||
OneTimeOrderHeader(
|
||||
@@ -84,7 +83,6 @@ class OneTimeOrderView extends StatelessWidget {
|
||||
}
|
||||
|
||||
return Scaffold(
|
||||
backgroundColor: UiColors.bgPrimary,
|
||||
body: Column(
|
||||
children: <Widget>[
|
||||
OneTimeOrderHeader(
|
||||
|
||||
@@ -75,7 +75,6 @@ class _RapidOrderFormState extends State<_RapidOrderForm> {
|
||||
}
|
||||
},
|
||||
child: Scaffold(
|
||||
backgroundColor: UiColors.bgPrimary,
|
||||
body: Column(
|
||||
children: <Widget>[
|
||||
RapidOrderHeader(
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:flutter_modular/flutter_modular.dart';
|
||||
import 'package:krow_core/core.dart';
|
||||
|
||||
import '../blocs/client_settings_bloc.dart';
|
||||
import '../widgets/client_settings_page/settings_actions.dart';
|
||||
@@ -26,7 +27,7 @@ class ClientSettingsPage extends StatelessWidget {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
const SnackBar(content: Text('Signed out successfully')),
|
||||
);
|
||||
Modular.to.navigate('/');
|
||||
Modular.to.toClientRoot();
|
||||
}
|
||||
if (state is ClientSettingsError) {
|
||||
ScaffoldMessenger.of(
|
||||
|
||||
Reference in New Issue
Block a user