fix(booking): enumerate the missing fields with commas, not repeated 'y'
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
6cb2755858
commit
5ed0376520
@@ -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.
|
/// 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
|
/// 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).clearSnackBars();
|
||||||
ScaffoldMessenger.of(context).showSnackBar(SnackBar(
|
ScaffoldMessenger.of(context).showSnackBar(SnackBar(
|
||||||
content: Text(
|
content: Text(
|
||||||
'Falta ${faltan.join(' y ')} para pedir la cita'),
|
'Falta ${_enumerar(faltan)} para pedir la cita'),
|
||||||
));
|
));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user