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:
@@ -1,10 +0,0 @@
|
||||
import 'package:flutter_modular/flutter_modular.dart';
|
||||
|
||||
/// Extension on [IModularNavigator] to provide strongly-typed navigation
|
||||
/// for the staff certificates feature.
|
||||
extension CertificatesNavigator on IModularNavigator {
|
||||
/// Navigates back.
|
||||
void popCertificates() {
|
||||
pop();
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,3 @@
|
||||
library staff_certificates;
|
||||
|
||||
export 'src/staff_certificates_module.dart';
|
||||
export 'src/presentation/navigation/certificates_navigator.dart'; // Export navigator extension
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
import 'package:flutter_modular/flutter_modular.dart';
|
||||
|
||||
/// Extension on [IModularNavigator] to provide strongly-typed navigation
|
||||
/// for the staff documents feature.
|
||||
extension DocumentsNavigator on IModularNavigator {
|
||||
/// Navigates to the document upload/view page.
|
||||
/// [documentId] is the ID of the document to view or upload.
|
||||
void pushDocumentDetails(String documentId) {
|
||||
pushNamed('./details', arguments: documentId);
|
||||
}
|
||||
}
|
||||
@@ -8,7 +8,7 @@ import 'package:core_localization/core_localization.dart';
|
||||
|
||||
import '../blocs/documents/documents_cubit.dart';
|
||||
import '../blocs/documents/documents_state.dart';
|
||||
import '../navigation/documents_navigator.dart';
|
||||
import 'package:krow_core/core.dart';
|
||||
import '../widgets/document_card.dart';
|
||||
import '../widgets/documents_progress_card.dart';
|
||||
|
||||
@@ -81,7 +81,7 @@ class DocumentsPage extends StatelessWidget {
|
||||
...state.documents.map(
|
||||
(StaffDocument doc) => DocumentCard(
|
||||
document: doc,
|
||||
onTap: () => Modular.to.pushDocumentDetails(doc.id),
|
||||
onTap: () => Modular.to.pushNamed('./details', arguments: doc.id),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user