feat: address missing features and bugs identified during Milestone 3 demo; improve localization, error handling, and navigation
This commit is contained in:
@@ -9,7 +9,6 @@ import 'src/presentation/blocs/client_home_bloc.dart';
|
||||
import 'src/presentation/pages/client_home_page.dart';
|
||||
|
||||
export 'src/presentation/pages/client_home_page.dart';
|
||||
export 'src/presentation/navigation/client_home_navigator.dart';
|
||||
|
||||
/// A [Module] for the client home feature.
|
||||
///
|
||||
|
||||
@@ -2,10 +2,10 @@ import 'package:design_system/design_system.dart';
|
||||
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_home_bloc.dart';
|
||||
import '../blocs/client_home_event.dart';
|
||||
import '../blocs/client_home_state.dart';
|
||||
import '../navigation/client_home_navigator.dart';
|
||||
import 'header_icon_button.dart';
|
||||
|
||||
/// The header section of the client home page.
|
||||
@@ -95,7 +95,7 @@ class ClientHomeHeader extends StatelessWidget {
|
||||
),
|
||||
HeaderIconButton(
|
||||
icon: UiIcons.settings,
|
||||
onTap: () => Modular.to.pushSettings(),
|
||||
onTap: () => Modular.to.toClientSettings(),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -1,20 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_modular/flutter_modular.dart';
|
||||
import '../widgets/shift_order_form_sheet.dart';
|
||||
|
||||
extension ClientHomeNavigator on IModularNavigator {
|
||||
void pushSettings() {
|
||||
pushNamed('/client-settings/');
|
||||
}
|
||||
|
||||
void pushCreateOrder() {
|
||||
pushNamed('/client/create-order/');
|
||||
}
|
||||
|
||||
void pushRapidOrder() {
|
||||
pushNamed('/client/create-order/rapid');
|
||||
}
|
||||
}
|
||||
import 'shift_order_form_sheet.dart';
|
||||
|
||||
/// Helper class for showing modal sheets in the client home feature.
|
||||
class ClientHomeSheets {
|
||||
@@ -1,14 +1,15 @@
|
||||
import 'package:core_localization/core_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_modular/flutter_modular.dart';
|
||||
import 'package:krow_core/core.dart';
|
||||
import '../blocs/client_home_state.dart';
|
||||
import '../navigation/client_home_navigator.dart';
|
||||
import '../widgets/actions_widget.dart';
|
||||
import '../widgets/coverage_widget.dart';
|
||||
import '../widgets/draggable_widget_wrapper.dart';
|
||||
import '../widgets/live_activity_widget.dart';
|
||||
import '../widgets/reorder_widget.dart';
|
||||
import '../widgets/spending_widget.dart';
|
||||
import 'client_home_sheets.dart';
|
||||
|
||||
/// A widget that builds dashboard content based on widget ID.
|
||||
///
|
||||
@@ -62,8 +63,8 @@ class DashboardWidgetBuilder extends StatelessWidget {
|
||||
switch (id) {
|
||||
case 'actions':
|
||||
return ActionsWidget(
|
||||
onRapidPressed: () => Modular.to.pushRapidOrder(),
|
||||
onCreateOrderPressed: () => Modular.to.pushCreateOrder(),
|
||||
onRapidPressed: () => Modular.to.toCreateOrderRapid(),
|
||||
onCreateOrderPressed: () => Modular.to.toCreateOrder(),
|
||||
subtitle: subtitle,
|
||||
);
|
||||
case 'reorder':
|
||||
@@ -116,7 +117,7 @@ class DashboardWidgetBuilder extends StatelessWidget {
|
||||
);
|
||||
case 'liveActivity':
|
||||
return LiveActivityWidget(
|
||||
onViewAllPressed: () => Modular.to.navigate('/client-main/coverage/'),
|
||||
onViewAllPressed: () => Modular.to.toClientCoverage(),
|
||||
subtitle: subtitle,
|
||||
);
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user