chore: Update client navigation routes and exports
Standardized navigation route paths for client home, hubs, and settings to use '/client-home', '/client-hubs', and '/client-settings'. Added missing module imports and exports in main.dart and krow_data_connect.dart, including business_repository_mock.
This commit is contained in:
@@ -7,6 +7,8 @@ import 'package:flutter_modular/flutter_modular.dart';
|
|||||||
import 'package:client_authentication/client_authentication.dart'
|
import 'package:client_authentication/client_authentication.dart'
|
||||||
as client_authentication;
|
as client_authentication;
|
||||||
import 'package:client_home/client_home.dart' as client_home;
|
import 'package:client_home/client_home.dart' as client_home;
|
||||||
|
import 'package:client_settings/client_settings.dart' as client_settings;
|
||||||
|
import 'package:client_hubs/client_hubs.dart' as client_hubs;
|
||||||
import 'package:firebase_core/firebase_core.dart';
|
import 'package:firebase_core/firebase_core.dart';
|
||||||
|
|
||||||
void main() async {
|
void main() async {
|
||||||
@@ -27,6 +29,15 @@ class AppModule extends Module {
|
|||||||
|
|
||||||
// Client home route
|
// Client home route
|
||||||
r.module('/client-home', module: client_home.ClientHomeModule());
|
r.module('/client-home', module: client_home.ClientHomeModule());
|
||||||
|
|
||||||
|
// Client settings route
|
||||||
|
r.module(
|
||||||
|
'/client-settings',
|
||||||
|
module: client_settings.ClientSettingsModule(),
|
||||||
|
);
|
||||||
|
|
||||||
|
// Client hubs route
|
||||||
|
r.module('/client-hubs', module: client_hubs.ClientHubsModule());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
/// TODO: These mocks currently do not implement any specific interfaces.
|
/// TODO: These mocks currently do not implement any specific interfaces.
|
||||||
/// They will implement interfaces defined in feature packages once those are created.
|
/// They will implement interfaces defined in feature packages once those are created.
|
||||||
|
|
||||||
// export 'src/mocks/auth_repository_mock.dart'; // Comentado, usaremos la implementación real
|
export 'src/mocks/auth_repository_mock.dart';
|
||||||
export 'src/mocks/staff_repository_mock.dart';
|
export 'src/mocks/staff_repository_mock.dart';
|
||||||
export 'src/mocks/event_repository_mock.dart';
|
export 'src/mocks/event_repository_mock.dart';
|
||||||
export 'src/mocks/skill_repository_mock.dart';
|
export 'src/mocks/skill_repository_mock.dart';
|
||||||
@@ -14,6 +14,7 @@ export 'src/mocks/financial_repository_mock.dart';
|
|||||||
export 'src/mocks/rating_repository_mock.dart';
|
export 'src/mocks/rating_repository_mock.dart';
|
||||||
export 'src/mocks/support_repository_mock.dart';
|
export 'src/mocks/support_repository_mock.dart';
|
||||||
export 'src/mocks/home_repository_mock.dart';
|
export 'src/mocks/home_repository_mock.dart';
|
||||||
|
export 'src/mocks/business_repository_mock.dart';
|
||||||
export 'src/data_connect_module.dart';
|
export 'src/data_connect_module.dart';
|
||||||
|
|
||||||
// Export the generated Data Connect SDK
|
// Export the generated Data Connect SDK
|
||||||
|
|||||||
@@ -5,16 +5,11 @@ import 'package:flutter_modular/flutter_modular.dart';
|
|||||||
extension ClientHomeNavigator on IModularNavigator {
|
extension ClientHomeNavigator on IModularNavigator {
|
||||||
/// Navigates to the client home page.
|
/// Navigates to the client home page.
|
||||||
void pushClientHome() {
|
void pushClientHome() {
|
||||||
pushNamed('/client/home/');
|
pushNamed('/client-home/');
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Navigates to the settings page.
|
/// Navigates to the settings page.
|
||||||
void pushSettings() {
|
void pushSettings() {
|
||||||
pushNamed('/client-settings/');
|
pushNamed('/client-settings/');
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Navigates to the hubs page.
|
|
||||||
void pushHubs() {
|
|
||||||
pushNamed('/client/hubs');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -324,7 +324,6 @@ class ClientHomePage extends StatelessWidget {
|
|||||||
return ActionsWidget(
|
return ActionsWidget(
|
||||||
onRapidPressed: () {},
|
onRapidPressed: () {},
|
||||||
onCreateOrderPressed: () => _openOrderFormSheet(context, null),
|
onCreateOrderPressed: () => _openOrderFormSheet(context, null),
|
||||||
onHubsPressed: () => Modular.to.pushHubs(),
|
|
||||||
);
|
);
|
||||||
case 'reorder':
|
case 'reorder':
|
||||||
return ReorderWidget(
|
return ReorderWidget(
|
||||||
|
|||||||
@@ -10,15 +10,11 @@ class ActionsWidget extends StatelessWidget {
|
|||||||
/// Callback when Create Order is pressed.
|
/// Callback when Create Order is pressed.
|
||||||
final VoidCallback onCreateOrderPressed;
|
final VoidCallback onCreateOrderPressed;
|
||||||
|
|
||||||
/// Callback when Hubs is pressed.
|
|
||||||
final VoidCallback onHubsPressed;
|
|
||||||
|
|
||||||
/// Creates an [ActionsWidget].
|
/// Creates an [ActionsWidget].
|
||||||
const ActionsWidget({
|
const ActionsWidget({
|
||||||
super.key,
|
super.key,
|
||||||
required this.onRapidPressed,
|
required this.onRapidPressed,
|
||||||
required this.onCreateOrderPressed,
|
required this.onCreateOrderPressed,
|
||||||
required this.onHubsPressed,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -57,21 +53,6 @@ class ActionsWidget extends StatelessWidget {
|
|||||||
onTap: onCreateOrderPressed,
|
onTap: onCreateOrderPressed,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(width: UiConstants.space2),
|
|
||||||
Expanded(
|
|
||||||
child: _ActionCard(
|
|
||||||
title: i18n.hubs,
|
|
||||||
subtitle: i18n.hubs_subtitle,
|
|
||||||
icon: UiIcons.nfc,
|
|
||||||
color: const Color(0xFFF0FDF4),
|
|
||||||
borderColor: const Color(0xFFBBF7D0),
|
|
||||||
iconBgColor: const Color(0xFFDCFCE7),
|
|
||||||
iconColor: const Color(0xFF16A34A),
|
|
||||||
textColor: const Color(0xFF064E3B),
|
|
||||||
subtitleColor: const Color(0xFF15803D),
|
|
||||||
onTap: onHubsPressed,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,6 @@ import 'package:flutter_modular/flutter_modular.dart';
|
|||||||
extension ClientHubsNavigator on IModularNavigator {
|
extension ClientHubsNavigator on IModularNavigator {
|
||||||
/// Navigates to the client hubs page.
|
/// Navigates to the client hubs page.
|
||||||
Future<void> pushClientHubs() async {
|
Future<void> pushClientHubs() async {
|
||||||
await pushNamed('/client/hubs');
|
await pushNamed('/client-hubs/');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,6 @@ extension ClientSettingsNavigator on IModularNavigator {
|
|||||||
|
|
||||||
/// Navigates to the hubs page.
|
/// Navigates to the hubs page.
|
||||||
void pushHubs() {
|
void pushHubs() {
|
||||||
pushNamed('/client/hubs');
|
pushNamed('/client-hubs/');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user