diff --git a/local-dev-2.sh b/local-dev-2.sh index 2e3b10c..5926d92 100755 --- a/local-dev-2.sh +++ b/local-dev-2.sh @@ -728,32 +728,35 @@ count_guest=0 if [[ -n "$GUEST1_ID" ]]; then echo "${C_GREEN}✅ Created guest: Nina ($GUEST1_ID)${C_RESET}" - # Book tomorrow at slot B - GUEST1_TIME=$(format_london_time "$TOMORROW" "$SLOT_B") + # Book 3 days out — SLOT_B is free that day (upcoming pattern puts Isla in SLOT_B on day 5) + D_G1=$(open_day "$(TZ=Europe/London date -d "$TODAY +3 days" +%Y-%m-%d)") + GUEST1_TIME=$(format_london_time "$D_G1" "$SLOT_B") GUEST1_JSON="{\"user_id\":\"$GUEST1_ID\",\"start_time\":\"$GUEST1_TIME\",\"service_ids\":[\"$(get_svc 0)\"]}" G1_RESP=$(curl -s -w "\n%{http_code}" -X POST -H 'Content-Type: application/json' -d "$GUEST1_JSON" "$BASE_URL/bookings") G1_CODE=$(echo "$G1_RESP" | tail -n1) - if [[ "$G1_CODE" =~ ^2 ]]; then count_guest=$((count_guest+1)); echo "${C_GREEN}✅ Guest booking: Nina - Classic Manicure${C_RESET}"; fi + if [[ "$G1_CODE" =~ ^2 ]]; then count_guest=$((count_guest+1)); echo "${C_GREEN}✅ Guest booking: Nina - Classic Manicure ($D_G1)${C_RESET}"; fi fi if [[ -n "$GUEST2_ID" ]]; then echo "${C_GREEN}✅ Created guest: Bob ($GUEST2_ID)${C_RESET}" - D_G2=$(open_day "$(TZ=Europe/London date -d "$TODAY +3 days" +%Y-%m-%d)") + # 5 days out — SLOT_C is free (upcoming pattern puts Ava in SLOT_A that day) + D_G2=$(open_day "$(TZ=Europe/London date -d "$TODAY +5 days" +%Y-%m-%d)") GUEST2_TIME=$(format_london_time "$D_G2" "$SLOT_C") GUEST2_JSON="{\"user_id\":\"$GUEST2_ID\",\"start_time\":\"$GUEST2_TIME\",\"service_ids\":[\"$(get_svc 3)\"]}" G2_RESP=$(curl -s -w "\n%{http_code}" -X POST -H 'Content-Type: application/json' -d "$GUEST2_JSON" "$BASE_URL/bookings") G2_CODE=$(echo "$G2_RESP" | tail -n1) - if [[ "$G2_CODE" =~ ^2 ]]; then count_guest=$((count_guest+1)); echo "${C_GREEN}✅ Guest booking: Bob - Express Mani & Pedi${C_RESET}"; fi + if [[ "$G2_CODE" =~ ^2 ]]; then count_guest=$((count_guest+1)); echo "${C_GREEN}✅ Guest booking: Bob - Express Mani & Pedi ($D_G2)${C_RESET}"; fi fi if [[ -n "$GUEST3_ID" ]]; then echo "${C_GREEN}✅ Created guest: Carol ($GUEST3_ID)${C_RESET}" - D_G3=$(open_day "$(TZ=Europe/London date -d "$TODAY +5 days" +%Y-%m-%d)") + # 3 days out, SLOT_D — free (different slot from Nina, same day) + D_G3=$(open_day "$(TZ=Europe/London date -d "$TODAY +3 days" +%Y-%m-%d)") GUEST3_TIME=$(format_london_time "$D_G3" "$SLOT_D") GUEST3_JSON="{\"user_id\":\"$GUEST3_ID\",\"start_time\":\"$GUEST3_TIME\",\"service_ids\":[\"$(get_svc 1)\"]}" G3_RESP=$(curl -s -w "\n%{http_code}" -X POST -H 'Content-Type: application/json' -d "$GUEST3_JSON" "$BASE_URL/bookings") G3_CODE=$(echo "$G3_RESP" | tail -n1) - if [[ "$G3_CODE" =~ ^2 ]]; then count_guest=$((count_guest+1)); echo "${C_GREEN}✅ Guest booking: Carol - Gel Manicure${C_RESET}"; fi + if [[ "$G3_CODE" =~ ^2 ]]; then count_guest=$((count_guest+1)); echo "${C_GREEN}✅ Guest booking: Carol - Gel Manicure ($D_G3)${C_RESET}"; fi fi if [[ -n "$GUEST4_ID" && "$GUEST4_ID" != "$GUEST1_ID" ]]; then