forked from Ruderverein-Donau-Linz/rowt
Merge pull request 'allow vorstand to see all old logs' (#848) from vorstand-show-old-logs into main
Reviewed-on: Ruderverein-Donau-Linz/rowt#848
This commit is contained in:
commit
87de3859a2
@ -27,7 +27,7 @@ use crate::{
|
|||||||
},
|
},
|
||||||
logtype::LogType,
|
logtype::LogType,
|
||||||
trip::Trip,
|
trip::Trip,
|
||||||
user::{AdminUser, DonauLinzUser, User, UserWithDetails, VorstandUser},
|
user::{DonauLinzUser, User, UserWithDetails, VorstandUser},
|
||||||
},
|
},
|
||||||
tera::Config,
|
tera::Config,
|
||||||
};
|
};
|
||||||
@ -118,7 +118,7 @@ async fn show(db: &State<SqlitePool>, user: DonauLinzUser) -> Template {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[get("/show?<year>", rank = 2)]
|
#[get("/show?<year>", rank = 2)]
|
||||||
async fn show_for_year(db: &State<SqlitePool>, user: AdminUser, year: i32) -> Template {
|
async fn show_for_year(db: &State<SqlitePool>, user: VorstandUser, year: i32) -> Template {
|
||||||
let logs = Logbook::completed_in_year(db, year).await;
|
let logs = Logbook::completed_in_year(db, year).await;
|
||||||
|
|
||||||
Template::render(
|
Template::render(
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<div class="max-w-screen-lg w-full">
|
<div class="max-w-screen-lg w-full">
|
||||||
<h1 class="h1">
|
<h1 class="h1">
|
||||||
Logbuch
|
Logbuch
|
||||||
{% if loggedin_user and "admin" in loggedin_user.roles %}
|
{% if loggedin_user and "Vorstand" in loggedin_user.roles %}
|
||||||
<select id="yearSelect"
|
<select id="yearSelect"
|
||||||
onchange="changeYear()"
|
onchange="changeYear()"
|
||||||
style="background: transparent;
|
style="background: transparent;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user