Editing existing reservation
Figma Component: https://www.figma.com/design/NWu7ssnTfTJHFNDy13CnUt/Aplikacija-Vento---UI?node-id=2451-16265
GitHub Issue: #183
Last modified with commit e90a924 on
by Aljaž.
The "Uredi rezervaciju" page, opened from "Uredi rezervaciju" in the reservation menu on the Kalendar zauzetosti. Same fields and validation as Adding new reservation (Vozilo, Od, Do mandatory; Tvrtka or Ime i prezime required; Email / Telefon optional; no overlap with other reservations or events of the vehicle; Neispravno vehicles not available), prefilled. The availability check ignores the reservation itself. Past reservations can be edited too. Saving returns to the calendar with a success toast and the updated bar. Changes do not affect Zapisnici.
Users with access to Vozni park edit a reservation by clicking the reservation bar on the Kalendar zauzetosti and choosing “Uredi rezervaciju”.
Past reservations can also be edited. This is how the Manager of Vozni park keeps the calendar accurate when the actual pickup or return differs from the reservation.
The page has the same fields and validation as Adding new reservation, prefilled with the current data. The availability check (“Vozilo nije dostupno u odabranom razdoblju.”) ignores the reservation that is being edited, so it only fails on overlaps with other reservations or events of the vehicle, or on Neispravno. Page title: “Uredi rezervaciju”, with a back arrow that returns to the calendar. Breadcrumb: Kalendar zauzetosti.
Changing a reservation does not change any Zapisnik started from it: records are not linked to reservations.
Saving
- The “PRIHVATI REZERVACIJU” button in the sticky footer saves the changes.
- After saving, the user returns to the calendar (in the month it showed), a success toast is shown, and the bar is shown at the new dates (or on the new vehicle’s row).
Deleting
The edit page has no delete button. A reservation is deleted from the reservation menu on the calendar (“Ukloni rezervaciju”), with a confirmation modal. See Kalendar zauzetosti.