diff --git a/src/tera/mod.rs b/src/tera/mod.rs index c47c7f1..c38206c 100644 --- a/src/tera/mod.rs +++ b/src/tera/mod.rs @@ -21,9 +21,10 @@ use sqlx::SqlitePool; use tera::Context; use crate::model::{ + logbook::Logbook, notification::Notification, role::Role, - user::{User, UserWithDetails}, + user::{User, UserWithDetails, SCHECKBUCH}, }; pub(crate) mod admin; @@ -52,8 +53,15 @@ async fn index(db: &State, user: User, flash: Option -

- Ruder - - assistent -

+

Ruder­assistent

- +
+ Vergangene Nachrichten (14 Tage) +
+ {% for notification in notifications %} + {% if notification.read_at %} +
+ + {{ notification.category }} • {{ notification.created_at | date(format="%d.%m.%Y %H:%M") }} + +
{{ notification.message | safe }}
+
+ {% endif %} + {% endfor %} +
+
+
+ {% endif %} {% if "Donau Linz" in loggedin_user.roles and "Unterstützend" not in loggedin_user.roles and "Förderndes Mitglied" not in loggedin_user.roles %} {% endif %} {% if "scheckbuch" in loggedin_user.roles %} -