Pocro Vento Documentation

Adding new reservation

Figma Component: https://www.figma.com/design/NWu7ssnTfTJHFNDy13CnUt/Aplikacija-Vento---UI?node-id=2451-15853

GitHub Issue: #179

Last modified with commit 374306c on by Aljaž.

The "Nova rezervacija" page, opened from "+ NOVA REZERVACIJA" on the Kalendar zauzetosti (empty) or by clicking an empty calendar cell (Vozilo and Od prefilled). Fields are Vozilo, Od and Do (all mandatory; whole days, 00:00–23:59), and Tvrtka, Ime i prezime and Email / Telefon (optional, but Tvrtka or Ime i prezime must be filled in). The period cannot overlap another reservation or event of the same vehicle, and a Neispravno vehicle cannot be reserved from today on ("Vozilo nije dostupno u odabranom razdoblju."). Saving returns to the calendar with a success toast and a new blue bar.

Users with access to Vozni park can add a reservation. The page can be opened in two ways from the Kalendar zauzetosti:

Figma (note on the empty-cell click): https://www.figma.com/design/NWu7ssnTfTJHFNDy13CnUt/Aplikacija-Vento---UI?node-id=2055-7250

Conflict for the assignee to check: the Figma note says the empty-cell click opens a “Nova rezervacija” modal window, but the Figma screen is a full page with a back arrow. These docs follow the screen: a full page in both cases.

Page title: “Nova rezervacija”, with a back arrow that returns to the calendar. Breadcrumb: Kalendar zauzetosti.

Podaci o rezervaciji

(Figma has the section title “Podaci rezervacija”, which is not correct Croatian.)

Reservations are stored as date-times. The form has dates only, so the reservation starts at 00:00 on the Od day and ends at 23:59 on the Do day.

Not specified: date validation. Recommended: Do cannot be before Od. A one-day reservation (Od = Do) is allowed. Past dates are allowed, because past reservations can also be edited.

Podaci o vozaču

(In Figma, the Ime i prezime placeholder repeats “Unesite naziv”, and the Email / Telefon placeholder has the English “eg.” instead of “npr.”.)

At least one of Tvrtka or Ime i prezime must be filled in. If both are empty, the error message is: “Barem jedno od polja Tvrtka ili Ime i prezime mora biti ispunjeno.”

To mark a vehicle as out of order for a set period, the user adds a normal reservation for that period and writes “Odjava” / “Out of order” or similar in Ime i prezime. It is shown in blue like any other reservation. (A vehicle that is out of order with no end date is set to “Neispravno” in the inventory instead.)

Availability

A vehicle is not available in the selected period if:

Then the reservation is not saved and the error message is: “Vozilo nije dostupno u odabranom razdoblju.”

Vozni park reservations and event bookings are kept together as vehicle reservations, and no two vehicle reservations of the same vehicle can overlap. Because a reservation without times runs from 00:00 to 23:59, the next reservation of the same vehicle can start on the day after the previous one ends, not on the same day.

Saving

Conflict for the assignee to check: the spec calls the button “Spremi rezervaciju”, but Figma shows “PRIHVATI REZERVACIJU”. These docs follow Figma.