add trailer reservation funcitonality; Fixes #443 #588

Merged
philipp merged 3 commits from trailer-reservation into main 2024-06-10 20:00:27 +02:00
3 changed files with 6 additions and 3 deletions
Showing only changes of commit f56da43723 - Show all commits

View File

@ -134,7 +134,7 @@ WHERE end_date >= CURRENT_DATE ORDER BY end_date
) )
.await .await
{ {
return Err("Boot in diesem Zeitraum bereits reserviert.".into()); return Err("Hänger in diesem Zeitraum bereits reserviert.".into());
} }
Log::create( Log::create(
@ -172,14 +172,14 @@ WHERE end_date >= CURRENT_DATE ORDER BY end_date
db, db,
&user, &user,
&format!( &format!(
"{} hat eine neue Bootsreservierung für Boot '{}' {} angelegt. Zeit: {}; Zweck: {}", "{} hat eine neue Hängerreservierung für Hänger '{}' {} angelegt. Zeit: {}; Zweck: {}",
trailerreservation.user_applicant.name, trailerreservation.user_applicant.name,
trailerreservation.trailer.name, trailerreservation.trailer.name,
date, date,
trailerreservation.time_desc, trailerreservation.time_desc,
trailerreservation.usage trailerreservation.usage
), ),
"Neue Bootsreservierung", "Neue Hängerreservierung",
None,None None,None
) )
.await; .await;

View File

@ -36,6 +36,7 @@
<a href="/stat/boats" class="px-2">Bootsauswertung</a> <a href="/stat/boats" class="px-2">Bootsauswertung</a>
<a href="/boatdamage" class="px-2">Bootsschaden</a> <a href="/boatdamage" class="px-2">Bootsschaden</a>
<a href="/boatreservation" class="px-2">Bootsreservierung</a> <a href="/boatreservation" class="px-2">Bootsreservierung</a>
<a href="/trailerreservation" class="px-2">Hängerreservierung</a>
</div> </div>
</header> </header>
{% endif %} {% endif %}

View File

@ -78,6 +78,8 @@
class="block w-100 py-2 hover:text-primary-600 border-t">Bootsschaden</a> class="block w-100 py-2 hover:text-primary-600 border-t">Bootsschaden</a>
<a href="/boatreservation" <a href="/boatreservation"
class="block w-100 py-2 hover:text-primary-600 border-t">Bootsreservierung</a> class="block w-100 py-2 hover:text-primary-600 border-t">Bootsreservierung</a>
<a href="/trailerreservation"
class="block w-100 py-2 hover:text-primary-600 border-t">Hängerreservierung</a>
{% endif %} {% endif %}
{% if loggedin_user.weight and loggedin_user.sex and loggedin_user.dob %} {% if loggedin_user.weight and loggedin_user.sex and loggedin_user.dob %}
<a href="/ergo" class="block w-100 py-2 hover:text-primary-600 border-t">Ergo</a> <a href="/ergo" class="block w-100 py-2 hover:text-primary-600 border-t">Ergo</a>