reservations #327

Merged
philipp merged 14 commits from reservations into main 2024-04-02 21:46:21 +02:00
3 changed files with 17 additions and 17 deletions
Showing only changes of commit 0ba2590bfd - Show all commits

View File

@ -2,7 +2,6 @@ use crate::model::{boat::Boat, user::User};
use chrono::NaiveDate; use chrono::NaiveDate;
use chrono::NaiveDateTime; use chrono::NaiveDateTime;
use rocket::serde::{Deserialize, Serialize}; use rocket::serde::{Deserialize, Serialize};
use rocket::FromForm;
use sqlx::{FromRow, SqlitePool}; use sqlx::{FromRow, SqlitePool};
use super::log::Log; use super::log::Log;

View File

@ -13,9 +13,8 @@ use tera::Context;
use crate::{ use crate::{
model::{ model::{
boat::Boat, boat::Boat,
boatdamage::{BoatDamage, BoatDamageFixed, BoatDamageToAdd, BoatDamageVerified},
boatreservation::{BoatReservation, BoatReservationToAdd}, boatreservation::{BoatReservation, BoatReservationToAdd},
user::{AdminUser, CoxUser, DonauLinzUser, TechUser, User, UserWithRoles}, user::{DonauLinzUser, User, UserWithRoles},
}, },
tera::log::KioskCookie, tera::log::KioskCookie,
}; };

View File

@ -1,19 +1,21 @@
{% macro boatreservation() %} {% macro boatreservation() %}
<div class="bg-white dark:bg-primary-900 text-black dark:text-white rounded-md block shadow grid gap-3" {% if reservations %}
style="margin-top: 10px"> <div class="bg-white dark:bg-primary-900 text-black dark:text-white rounded-md block shadow grid gap-3"
<h2 class="h2">Bootsreservierungen</h2> style="margin-top: 10px">
<div class="p2 text-center" style="margin-bottom: 10px;"> <h2 class="h2">Bootsreservierungen</h2>
<ul style=" justify-content: space-around; padding: 0; list-style: none"> <div class="p2 text-center" style="margin-bottom: 10px;">
{% for reservation in reservations %} <ul style=" justify-content: space-around; padding: 0; list-style: none">
<li> {% for reservation in reservations %}
{{ reservation.boat.name }} &bullet; {{ reservation.start_date }} <li>
{% if reservation.end_date != reservation.start_date %}- {{ reservation.end_date }}{% endif %} {{ reservation.boat.name }} &bullet; {{ reservation.start_date }}
&bullet; Uhrzeit: {{ reservation.time_desc }} &bullet; Zweck: {{ reservation.usage }} {% if reservation.end_date != reservation.start_date %}- {{ reservation.end_date }}{% endif %}
</li> &bullet; Uhrzeit: {{ reservation.time_desc }} &bullet; Zweck: {{ reservation.usage }}
{% endfor %} </li>
</ul> {% endfor %}
</ul>
</div>
</div> </div>
</div> {% endif %}
{% endmacro boatreservation %} {% endmacro boatreservation %}
{% macro header(loggedin_user) %} {% macro header(loggedin_user) %}
<header class="bg-primary-900 text-white flex justify-center p-3 fixed w-full z-10"> <header class="bg-primary-900 text-white flex justify-center p-3 fixed w-full z-10">