fix(booking): enumerate the missing fields with commas, not repeated 'y'
ci-651288 / run (push) Waiting to run
ci-946620 / run (push) Waiting to run

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Lizandro Guarnizo
2026-08-25 13:27:07 -05:00
co-authored by Claude Opus 5
parent 6cb2755858
commit 5ed0376520
+7 -1
View File
@@ -214,6 +214,12 @@ class _UserMapScreenState extends State<UserMapScreen> {
}
/// "a, b y c" — join(' y ') read as "a y b y c".
String _enumerar(List<String> items) {
if (items.length <= 1) return items.join();
return '${items.sublist(0, items.length - 1).join(', ')} y ${items.last}';
}
/// Re-reads the professional's agenda right before creating the service.
///
/// Returns true when the slot is still free, or when the agenda cannot be
@@ -596,7 +602,7 @@ class _UserMapScreenState extends State<UserMapScreen> {
ScaffoldMessenger.of(context).clearSnackBars();
ScaffoldMessenger.of(context).showSnackBar(SnackBar(
content: Text(
'Falta ${faltan.join(' y ')} para pedir la cita'),
'Falta ${_enumerar(faltan)} para pedir la cita'),
));
return;
}