Compare commits

...

5 Commits

Author SHA1 Message Date
b774acf9ae Merge pull request 'show info, if scheckbuch is not yet paid' (#499) from show-scheckbuch-info into main
All checks were successful
CI/CD Pipeline / test (push) Successful in 9m13s
CI/CD Pipeline / deploy-staging (push) Has been skipped
CI/CD Pipeline / deploy-main (push) Successful in 9m8s
Reviewed-on: #499
2024-05-16 22:07:00 +02:00
77a90a8086 Merge branch 'staging' into show-scheckbuch-info
All checks were successful
CI/CD Pipeline / test (push) Successful in 9m18s
CI/CD Pipeline / deploy-staging (push) Has been skipped
CI/CD Pipeline / deploy-main (push) Has been skipped
2024-05-16 21:31:12 +02:00
ca5a932ae5 show info, if scheckbuch is not yet paid
Some checks failed
CI/CD Pipeline / deploy-staging (push) Blocked by required conditions
CI/CD Pipeline / deploy-main (push) Blocked by required conditions
CI/CD Pipeline / test (push) Has been cancelled
2024-05-16 21:28:36 +02:00
626be1c9fb Merge pull request 'no rain level -> 0; round values' (#497) from show-waterlevel into staging
All checks were successful
CI/CD Pipeline / test (push) Successful in 10m0s
CI/CD Pipeline / deploy-staging (push) Successful in 5m58s
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #497
2024-05-16 16:36:39 +02:00
65068e44a5 Merge pull request 'show-waterlevel' (#496) from show-waterlevel into staging
All checks were successful
CI/CD Pipeline / test (push) Successful in 9m44s
CI/CD Pipeline / deploy-staging (push) Successful in 5m59s
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #496
2024-05-16 14:59:05 +02:00
3 changed files with 10 additions and 4 deletions

View File

@ -28,7 +28,7 @@ const STUDENT_OR_PUPIL: i32 = 8000;
const REGULAR: i32 = 22000; const REGULAR: i32 = 22000;
const UNTERSTUETZEND: i32 = 2500; const UNTERSTUETZEND: i32 = 2500;
const FOERDERND: i32 = 8500; const FOERDERND: i32 = 8500;
const SCHECKBUCH: i32 = 3000; pub const SCHECKBUCH: i32 = 3000;
#[derive(FromRow, Serialize, Deserialize, Clone, Debug, Eq, Hash, PartialEq)] #[derive(FromRow, Serialize, Deserialize, Clone, Debug, Eq, Hash, PartialEq)]
pub struct User { pub struct User {

View File

@ -13,7 +13,7 @@ use crate::model::{
logbook::Logbook, logbook::Logbook,
tripdetails::TripDetails, tripdetails::TripDetails,
triptype::TripType, triptype::TripType,
user::{AllowedForPlannedTripsUser, User, UserWithDetails}, user::{AllowedForPlannedTripsUser, User, UserWithDetails, SCHECKBUCH},
usertrip::{UserTrip, UserTripDeleteError, UserTripError}, usertrip::{UserTrip, UserTripDeleteError, UserTripError},
}; };
@ -46,6 +46,7 @@ async fn index(
context.insert("fee", &user.fee(db).await); context.insert("fee", &user.fee(db).await);
context.insert("loggedin_user", &UserWithDetails::from_user(user, db).await); context.insert("loggedin_user", &UserWithDetails::from_user(user, db).await);
context.insert("days", &days); context.insert("days", &days);
context.insert("costs_scheckbuch", &SCHECKBUCH);
Template::render("planned", context.into_json()) Template::render("planned", context.into_json())
} }

View File

@ -8,6 +8,11 @@
<div class="bg-white dark:bg-primary-900 text-black dark:text-white rounded-md block shadow mt-5" <div class="bg-white dark:bg-primary-900 text-black dark:text-white rounded-md block shadow mt-5"
role="alert"> role="alert">
<h2 class="h2">Scheckbuch</h2> <h2 class="h2">Scheckbuch</h2>
{% if "paid" not in loggedin_user.roles %}
<div class="bg-gray-300 text-center text-black">
Bitte nimm zur nächsten Ausfahrt die {{ costs_scheckbuch / 100 }}&nbsp;€ für das Scheckbuch mit. Falls du das bereits gemacht hast, gibt uns bitte kurz Bescheid, dass dies noch nicht eingetragen wurde.
</div>
{% endif %}
<div class="text-sm p-3"> <div class="text-sm p-3">
<h3>Du hast bisher {{ last_trips | length }} deiner 5 Scheckbuch-Ausfahrten gemacht:</h3> <h3>Du hast bisher {{ last_trips | length }} deiner 5 Scheckbuch-Ausfahrten gemacht:</h3>
<ol> <ol>
@ -100,8 +105,8 @@
</small> </small>
</h2> </h2>
{% if day.weather %} {% if day.weather %}
<div class="bg-gray-300 rounded text-center"> <div class="bg-gray-300 text-center">
Max temp: {{ day.weather.max_temp | round }}° &bullet; Windböe: {{ day.weather.wind_gust | round }} km/h &bullet; Regen: {{ day.weather.rain_mm | round }} mm Max temp:&nbsp;{{ day.weather.max_temp | round }}° &bullet; Windböe:&nbsp;{{ day.weather.wind_gust | round }}&nbsp;km/h &bullet; Regen:&nbsp;{{ day.weather.rain_mm | round }}&nbsp;mm
</div> </div>
{% endif %} {% endif %}
{% if day.planned_events | length > 0 or day.trips | length > 0 %} {% if day.planned_events | length > 0 or day.trips | length > 0 %}