aggiunta scelta business o privato

This commit is contained in:
2026-05-19 11:54:59 +02:00
parent 2bdba523ad
commit 4e03d52a5d
11 changed files with 173 additions and 38 deletions

View File

@@ -64,11 +64,17 @@ class SharedCustomerSection extends StatelessWidget {
if (hasCustomer) ...[
const SizedBox(width: 12),
IconButton(
onPressed: () => context.pushNamed(
Routes.customerForm,
pathParameters: {'id': customer!.id!},
extra: customer,
),
onPressed: () async {
final updatedCustomer = await context.pushNamed(
Routes.customerForm,
pathParameters: {'id': customer!.id!},
extra: customer,
);
if (updatedCustomer != null &&
updatedCustomer is CustomerModel) {
onCustomerSelected(updatedCustomer);
}
},
icon: const Icon(Icons.edit),
),
],