@ -10,6 +10,7 @@ use tera::Context;
|
||||
|
||||
use crate::model::{
|
||||
log::Log,
|
||||
logbook::Logbook,
|
||||
tripdetails::TripDetails,
|
||||
triptype::TripType,
|
||||
user::{AllowedForPlannedTripsUser, User, UserWithRoles},
|
||||
@ -31,6 +32,11 @@ async fn index(
|
||||
context.insert("trip_types", &triptypes);
|
||||
}
|
||||
|
||||
if user.has_role(db, "scheckbuch").await {
|
||||
let last_trips = Logbook::completed_with_user(db, &user).await;
|
||||
context.insert("last_trips", &last_trips);
|
||||
}
|
||||
|
||||
let days = user.get_days(db).await;
|
||||
|
||||
if let Some(msg) = flash {
|
||||
|
Reference in New Issue
Block a user