diff --git a/lib/presentation/modules/screens/customers_view.dart b/lib/presentation/modules/screens/customers_view.dart index e489a62..c18fed8 100644 --- a/lib/presentation/modules/screens/customers_view.dart +++ b/lib/presentation/modules/screens/customers_view.dart @@ -7,6 +7,7 @@ import '../../../core/theme/app_dimens.dart'; import '../../../core/utils/formatters.dart'; import '../../../core/widgets/status_pill.dart'; import '../../../domain/entities/customer.dart'; +import '../../customer/widgets/customer_capture_sheet.dart'; import '../widgets/module_widgets.dart'; /// Full customer book, independent of the six shown during billing. @@ -108,7 +109,13 @@ class _CustomersViewState extends ConsumerState { title: 'Customer book', subtitle: '${filtered.length} shown', action: FilledButton.icon( - onPressed: () {}, + // Reuses the sheet the till already opens at checkout, so a + // customer added here is validated the same way — including the + // duplicate-mobile guard. + onPressed: () async { + await showCustomerCaptureSheet(context); + ref.invalidate(allCustomersProvider); + }, icon: const Icon(Icons.person_add_alt_1_rounded, size: 17), label: const Text('Add customer'), style: FilledButton.styleFrom(