This commit is contained in:
2026-04-11 12:40:03 +02:00
parent a485d79460
commit 9f154afe9e
15 changed files with 522 additions and 12 deletions

View File

@@ -5,6 +5,7 @@ import 'package:flux/core/theme/theme.dart';
import 'package:flux/features/customers/blocs/customer_bloc.dart';
import 'package:flux/features/customers/models/customer_model.dart';
import 'package:flux/features/customers/ui/customer_form.dart';
import 'package:go_router/go_router.dart';
class CustomersContent extends StatefulWidget {
const CustomersContent({super.key});
@@ -147,7 +148,10 @@ class _CustomersContentState extends State<CustomersContent> {
final customer = state.customers[index];
return _CustomerTile(
customer: customer,
onTap: () => _openCustomerForm(customer: customer),
onTap: () => context.push(
'/customer/${customer.id}',
extra: customer,
),
);
},
);
@@ -222,6 +226,27 @@ class _CustomerTile extends StatelessWidget {
customer.telefono,
style: TextStyle(color: context.secondaryText),
),
if (customer.email.isNotEmpty) ...[
Text(' - ', style: TextStyle(color: context.secondaryText)),
Icon(Icons.email, size: 14, color: context.secondaryText),
const SizedBox(width: 4),
Text(
customer.email,
style: TextStyle(color: context.secondaryText),
),
],
if (customer.fileCount > 0) ...[
Text(' - ', style: TextStyle(color: context.secondaryText)),
Icon(Icons.attach_file, size: 14, color: context.accent),
Text(
'${customer.fileCount} doc',
style: TextStyle(
color: context.accent,
fontWeight: FontWeight.bold,
fontSize: 12,
),
),
],
],
),
),