Managing reservations
Last modified with commit a995415 on
by hip3r.
New reservation page can be opened in two ways:
- The “+ Nova rezervacija” button at the top of the Kalendar zauzetosti page opens with vehicle and dates empty, to be filled in manually.
- Clicking an empty cell on the calendar pre-fills vehicle from the row and start date from the day clicked.
Form fields:
- Vehicle (Vozilo) - searchable dropdown, mandatory. Shows brand, model and registration plate together, for example “Seat Leon FR ST-789-CC”. Archived vehicles are not shown.
- Period (Od / Do) - date fields, mandatory. Defines the reservation period.
- Company name (Tvrtka) - text field, optional. Company the vehicle is reserved for.
- Name and surname (Ime i prezime) - text field, optional. Name of the person the vehicle is reserved for.
- Contact info (Email / Telefon) - text field, optional.
At least one of the fields Company name or Name and surname must be filled in. If both fields are left empty, we show error message: “Barem jedno od polja Tvrtka ili Ime i prezime mora biti ispunjeno.”
If the vehicle is not available in the selected period, we show error message “Vozilo nije dostupno u odabranom razdoblju.”
Clicking “Spremi rezervaciju” saves the reservation, which then appears as a new bar on the calendar for that vehicle and date range.
User can edit existing reservations. Same page as for new reservation opens, with the title “Rezervacija” and pre-filled fields.
User can delete reservation. Modal window for confirmation appears.