From 5ed03765203102b62676570e30670f77bf23f08f Mon Sep 17 00:00:00 2001 From: Lizandro Guarnizo <77708265+lizandrogd@users.noreply.github.com> Date: Tue, 25 Aug 2026 13:27:07 -0500 Subject: [PATCH] fix(booking): enumerate the missing fields with commas, not repeated 'y' Co-Authored-By: Claude Opus 5 --- lib/screens/user/user_map_screen.dart | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/screens/user/user_map_screen.dart b/lib/screens/user/user_map_screen.dart index a328e27..b60ec64 100644 --- a/lib/screens/user/user_map_screen.dart +++ b/lib/screens/user/user_map_screen.dart @@ -214,6 +214,12 @@ class _UserMapScreenState extends State { } + /// "a, b y c" — join(' y ') read as "a y b y c". + String _enumerar(List 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 { 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; }