hide reservations if there are none; clean code #330
@ -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;
|
||||||
|
@ -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,
|
||||||
};
|
};
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
{% macro boatreservation() %}
|
{% macro boatreservation() %}
|
||||||
|
{% if reservations %}
|
||||||
<div class="bg-white dark:bg-primary-900 text-black dark:text-white rounded-md block shadow grid gap-3"
|
<div class="bg-white dark:bg-primary-900 text-black dark:text-white rounded-md block shadow grid gap-3"
|
||||||
style="margin-top: 10px">
|
style="margin-top: 10px">
|
||||||
<h2 class="h2">Bootsreservierungen</h2>
|
<h2 class="h2">Bootsreservierungen</h2>
|
||||||
@ -14,6 +15,7 @@
|
|||||||
</ul>
|
</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">
|
||||||
|
Loading…
Reference in New Issue
Block a user