Skip to content

fix(parking): rechazar una salida anterior a la entrada - #13

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

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

Conversation

@bpstack

@bpstack bpstack commented Oct 12, 2026

Copy link
Copy Markdown
Owner

Cambios

  • El check-out rechaza una fecha de salida anterior a la de entrada.
  • docs/TODO.md: se borra el punto, ya decidido (sin límite de años).

Por qué

Se podía cerrar una reserva con una salida antes de la entrada, lo que estropeaba duraciones e importes.

- bookings.repository.ts: checkOut compares the real check-out with the
  stored check-in, inside its transaction, and throws
  PARKING_INVALID_DATES when it is earlier.
- bookings.controller.ts: that error answers 400 with its code.
- checkout-dates.test.ts: an earlier check-out is refused and writes
  nothing; an equal or later one commits.

Why: the handler only rejected an unreadable date, so a check-out before
the check-in was stored. Checked in the browser: the check-out modal with
the day before is refused, with a later time it completes. Any year is
still accepted: the owner chose to only enforce the order.
- Remove the "Parking: check-in and check-out accept arbitrary real dates"
  entry.

Why: a check-out earlier than its check-in is now refused; the owner
decided not to bound the year, so nothing else is left.
@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:05am UTC

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

This branch was successfully deployed

1 active deployment
Preview — abe35ce5 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