b
This commit is contained in:
@@ -15,7 +15,8 @@ import 'package:flux/features/company/ui/company_settings_screen.dart';
|
||||
import 'package:flux/features/customers/blocs/customers_cubit.dart';
|
||||
import 'package:flux/features/customers/models/customer_model.dart';
|
||||
import 'package:flux/features/customers/ui/customer_detail_screen.dart';
|
||||
import 'package:flux/features/customers/ui/customers_content.dart';
|
||||
import 'package:flux/features/customers/ui/customer_form.dart';
|
||||
import 'package:flux/features/customers/ui/customers_list_screen.dart';
|
||||
import 'package:flux/features/home/ui/home_screen.dart';
|
||||
import 'package:flux/features/master_data/master_data_hub_content.dart';
|
||||
import 'package:flux/features/master_data/products/blocs/product_cubit.dart';
|
||||
@@ -191,7 +192,7 @@ class AppRouter {
|
||||
path: '/customers',
|
||||
name: Routes.customers,
|
||||
builder: (context, state) =>
|
||||
const CustomersContent(), // O come si chiama il tuo widget della lista!
|
||||
const CustomersListScreen(), // O come si chiama il tuo widget della lista!
|
||||
),
|
||||
GoRoute(
|
||||
path: '/tickets',
|
||||
@@ -310,8 +311,8 @@ class AppRouter {
|
||||
builder: (context, state) => const UploadSuccessScreen(),
|
||||
),
|
||||
GoRoute(
|
||||
path: '/customer/form/:id',
|
||||
name: 'customer-form',
|
||||
path: '/customer/details/:id',
|
||||
name: Routes.customerDetails,
|
||||
builder: (context, state) {
|
||||
final customer = state.extra as CustomerModel;
|
||||
return BlocProvider(
|
||||
@@ -323,6 +324,20 @@ class AppRouter {
|
||||
);
|
||||
},
|
||||
),
|
||||
GoRoute(
|
||||
path: '/customer/form/:id',
|
||||
name: Routes.customerForm,
|
||||
builder: (context, state) {
|
||||
final customer = state.extra as CustomerModel?;
|
||||
return BlocProvider(
|
||||
create: (context) => AttachmentsBloc(
|
||||
parentType: AttachmentParentType.customer,
|
||||
parentId: customer.id,
|
||||
),
|
||||
child: CustomerForm(customer: customer),
|
||||
);
|
||||
},
|
||||
),
|
||||
|
||||
GoRoute(
|
||||
path: '/operations/form/:id',
|
||||
|
||||
@@ -19,6 +19,7 @@ class Routes {
|
||||
static const String operationForm = 'operation-form';
|
||||
static const String uploadSuccess = 'upload-success';
|
||||
static const String customerForm = 'customer-form';
|
||||
static const String customerDetails = 'customer-details';
|
||||
static const String upload = 'upload';
|
||||
static const String ticketWorkspace = 'ticket-workspace';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user