Repository navigation
fix(parking): conservar el origen y la referencia externa de la reserva - #14
Merged
bpstack merged 2 commits intoOct 12, 2026
Merged
Conversation
- 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.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cambios
ENUMde 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.