allow all users to report boat damage

This commit is contained in:
philipp 2023-10-23 21:38:08 +02:00
parent 51860ded27
commit 88af24db7b
2 changed files with 3 additions and 3 deletions

View File

@ -26,7 +26,7 @@ async fn index_kiosk(
) -> Template {
let boatdamages = BoatDamage::all(db).await;
let boats = Boat::all(db).await;
let coxes = User::cox(db).await;
let user = User::all(db).await;
let mut context = Context::new();
if let Some(msg) = flash {
@ -35,7 +35,7 @@ async fn index_kiosk(
context.insert("boatdamages", &boatdamages);
context.insert("boats", &boats);
context.insert("coxes", &coxes);
context.insert("user", &user);
context.insert("show_kiosk_header", &true);
Template::render("boatdamages", context.into_json())

View File

@ -27,7 +27,7 @@
<form action="/boatdamage" method="post" class="grid gap-3">
{{ log::boat_select(only_ones=false, id='boat') }}
{% if not loggedin_user %}
{{ macros::select(label='Gemeldet von', data=coxes, name='user_id') }}
{{ macros::select(label='Gemeldet von', data=user, name='user_id') }}
{% endif %}
{{ macros::input(label='Beschreibung des Schadens', name='desc', type='text', required=true, wrapper_class='col-span-4') }}
<div class="col-span-4">