Compare commits

...

3 Commits

Author SHA1 Message Date
853f9d901e Merge pull request 'staging' (#338) from staging into main
All checks were successful
CI/CD Pipeline / test (push) Successful in 10m39s
CI/CD Pipeline / deploy-staging (push) Has been skipped
CI/CD Pipeline / deploy-main (push) Successful in 5m22s
Reviewed-on: #338
2024-04-03 18:07:59 +02:00
d0c2b4d703 don't show duplicate boats for rennrowing
All checks were successful
CI/CD Pipeline / test (push) Successful in 17m45s
CI/CD Pipeline / deploy-staging (push) Successful in 12m1s
CI/CD Pipeline / deploy-main (push) Has been skipped
2024-04-03 18:07:20 +02:00
1af3838ebc use proper timezone
All checks were successful
CI/CD Pipeline / test (push) Successful in 11m3s
CI/CD Pipeline / deploy-staging (push) Successful in 4m53s
CI/CD Pipeline / deploy-main (push) Has been skipped
2024-04-03 08:13:32 +02:00
4 changed files with 7 additions and 3 deletions

1
Cargo.lock generated
View File

@ -2204,6 +2204,7 @@ dependencies = [
"env_logger", "env_logger",
"futures", "futures",
"ics", "ics",
"itertools",
"lettre", "lettre",
"log", "log",
"openssl", "openssl",

View File

@ -24,6 +24,7 @@ ics = "0.5"
futures = "0.3" futures = "0.3"
lettre = "0.11" lettre = "0.11"
csv = "1.3" csv = "1.3"
itertools = "0.12"
[target.'cfg(not(windows))'.dependencies] [target.'cfg(not(windows))'.dependencies]
openssl = { version = "0.10", features = [ "vendored" ] } openssl = { version = "0.10", features = [ "vendored" ] }

View File

@ -1,5 +1,6 @@
use std::ops::DerefMut; use std::ops::DerefMut;
use itertools::Itertools;
use rocket::serde::{Deserialize, Serialize}; use rocket::serde::{Deserialize, Serialize};
use rocket::FromForm; use rocket::FromForm;
use sqlx::{FromRow, Sqlite, SqlitePool, Transaction}; use sqlx::{FromRow, Sqlite, SqlitePool, Transaction};
@ -7,7 +8,7 @@ use sqlx::{FromRow, Sqlite, SqlitePool, Transaction};
use super::location::Location; use super::location::Location;
use super::user::User; use super::user::User;
#[derive(FromRow, Debug, Serialize, Deserialize)] #[derive(FromRow, Debug, Serialize, Deserialize, Eq, Hash, PartialEq, Clone)]
pub struct Boat { pub struct Boat {
pub id: i64, pub id: i64,
pub name: String, pub name: String,
@ -279,6 +280,7 @@ ORDER BY amount_seats DESC
.unwrap(); //TODO: fixme .unwrap(); //TODO: fixme
boats.extend(boats_in_ottensheim.into_iter()); boats.extend(boats_in_ottensheim.into_iter());
} }
let boats = boats.into_iter().unique().collect();
Self::boats_to_details(db, boats).await Self::boats_to_details(db, boats).await
} }

View File

@ -20,7 +20,7 @@
<div class="relative flex justify-between items-center p-3"> <div class="relative flex justify-between items-center p-3">
<div class="grow me-4"> <div class="grow me-4">
<small class="uppercase text-gray-600 dark:text-gray-100"> <small class="uppercase text-gray-600 dark:text-gray-100">
<strong>{{ notification.category }}</strong> &bullet; {{ notification.created_at | date(format="%d.%m.%Y %H:%M") }} <strong>{{ notification.category }}</strong> &bullet; {{ notification.created_at | date(timezone="Europe/Vienna", format="%d.%m.%Y %H:%M", ) }}
</small> </small>
<div class="mt-1">{{ notification.message }}</div> <div class="mt-1">{{ notification.message }}</div>
</div> </div>
@ -45,7 +45,7 @@
{% if notification.read_at %} {% if notification.read_at %}
<div class="p-3 relative"> <div class="p-3 relative">
<small class="uppercase text-gray-600 dark:text-gray-100"> <small class="uppercase text-gray-600 dark:text-gray-100">
<strong>{{ notification.category }}</strong> &bullet; {{ notification.created_at | date(format="%d.%m.%Y %H:%M") }} <strong>{{ notification.category }}</strong> &bullet; {{ notification.created_at | date(timezone="Europe/Vienna", format="%d.%m.%Y %H:%M") }}
</small> </small>
<div class="mt-1">{{ notification.message }}</div> <div class="mt-1">{{ notification.message }}</div>
</div> </div>