Skip to content

fix(parking): conservar el origen y la referencia externa de la reserva - #14

Merged
bpstack merged 2 commits into
claude/compassionate-planck-gh6aoffrom
opencode/fix-parking-source
Oct 12, 2026
Merged

bpstack merged 2 commits into
claude/compassionate-planck-gh6aoffrom
opencode/fix-parking-source

Conversation

@bpstack

@bpstack bpstack commented Oct 12, 2026

Copy link
Copy Markdown
Owner

Cambios

  • Al crear una reserva se guardan el origen y la referencia externa.
  • La pantalla solo ofrece los valores del ENUM de la base de datos.
  • docs/TODO.md: se borra el punto, ya resuelto.

Por qué

El origen (p. ej. Airbnb) y la referencia se perdían al crear la reserva.

- bookings.controller.ts: createBooking hands booking_source and
  external_booking_id to Zod under the schema's own names.
- booking-validation.ts: BOOKING_SOURCES lists the ENUM values; create and
  update accept only those, and the create external id is capped at 64.
- useBookingWizard.ts, types.ts: the wizard sends booking_source and
  external_booking_id, the names of the API and the table.
- DateOnlyStep.tsx, EditBookingModal.tsx: offer direct, booking_com,
  expedia, airbnb and agency_other, like DateSpotStep already did.
- booking.json, parking.json (es, en): drop the phone, email, walk-in and
  other labels; add "agency_other" to bookingSources.
- booking-source.test.ts: create keeps source and reference, defaults to
  direct, refuses other values; the three forms offer the ENUM only.

Why: every booking was stored as direct and lost its external reference,
and phone, email or walk-in had no column value to land in. Decided on
2026-10-11: the forms follow the ENUM. Checked in the browser: a booking
created with Airbnb and a reference keeps both, and the edit modal offers
the five values.
- Remove the "Parking: the source and the external reference are lost on
  create" entry.

Why: create keeps both and the forms offer only the ENUM values, as
decided on 2026-10-11.
@vercel

vercel Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
four-points Ready Ready Preview Oct 12, 2026 8:04am UTC

@bpstack
bpstack merged commit d9efd01 into claude/compassionate-planck-gh6aof Oct 12, 2026
6 checks passed
@bpstack
bpstack deleted the opencode/fix-parking-source branch October 12, 2026 19:02

This branch was successfully deployed

1 active deployment
Preview — 25d46f7b Deployed Oct 12, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant