From af10399797c8761e6ac625100e44596d85cb8b78 Mon Sep 17 00:00:00 2001 From: Philipp Hofer Date: Tue, 17 Dec 2024 08:56:48 +0100 Subject: [PATCH 01/24] add renntrainer role --- src/model/user.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/model/user.rs b/src/model/user.rs index f03b0b4..97fc4bc 100644 --- a/src/model/user.rs +++ b/src/model/user.rs @@ -384,7 +384,7 @@ ASKÖ Ruderverein Donau Linz", self.name), if self.has_role(db, "Rennrudern").await { if self.has_role(db, "half-rennrudern").await { fee.add("Rennruderbeitrag (1/2 Preis) ".into(), RENNRUDERBEITRAG / 2); - } else { + } else if !self.has_role(db, "renntrainer").await { fee.add("Rennruderbeitrag".into(), RENNRUDERBEITRAG); } } -- 2.47.1 From 1ad4c3197968d822dd32d3bd37a6dd0913355cb7 Mon Sep 17 00:00:00 2001 From: Philipp Hofer Date: Thu, 19 Dec 2024 21:15:27 +0100 Subject: [PATCH 02/24] allow lazy people to mark all notifcations as read --- src/model/notification.rs | 9 +++++++++ src/tera/notification.rs | 10 ++++++++-- templates/index.html.tera | 2 +- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/model/notification.rs b/src/model/notification.rs index 4a3d274..b7dce96 100644 --- a/src/model/notification.rs +++ b/src/model/notification.rs @@ -194,6 +194,15 @@ ORDER BY read_at DESC, created_at DESC; } } } + + pub(crate) async fn mark_all_read(db: &SqlitePool, user: &User) { + let notifications = Self::for_user(db, user).await; + + for notification in notifications { + notification.mark_read(db).await; + } + } + pub(crate) async fn delete_by_action(db: &sqlx::Pool, action: &str) { sqlx::query!( "DELETE FROM notification WHERE action_after_reading=? and read_at is null", diff --git a/src/tera/notification.rs b/src/tera/notification.rs index da59ccc..e7c0069 100644 --- a/src/tera/notification.rs +++ b/src/tera/notification.rs @@ -27,6 +27,12 @@ async fn mark_read(db: &State, user: User, notification_id: i64) -> } } -pub fn routes() -> Vec { - routes![mark_read] +#[get("/read/all")] +async fn mark_all_read(db: &State, user: User) -> Flash { + Notification::mark_all_read(db, &user).await; + Flash::success(Redirect::to("/"), "Alle Nachrichten als gelesen markiert") +} + +pub fn routes() -> Vec { + routes![mark_read, mark_all_read] } diff --git a/templates/index.html.tera b/templates/index.html.tera index 573166f..4e57bd5 100644 --- a/templates/index.html.tera +++ b/templates/index.html.tera @@ -32,7 +32,7 @@

Nachrichten

{% if loggedin_user.amount_unread_notifications > 10 %}
- Du hast viele ungelesene Benachrichtigungen. Um deine Oberfläche übersichtlich zu halten und wichtige Updates nicht zu verpassen, nimm dir bitte einen Moment Zeit sie zu überprüfen und als gelesen zu markieren (✓). + Du hast viele ungelesene Benachrichtigungen. Um deine Oberfläche übersichtlich zu halten und wichtige Updates nicht zu verpassen, nimm dir bitte in Zukunft einen kurzen Moment Zeit sie zu überprüfen und als gelesen zu markieren (✓).
Du kannst hier ausnahmsweise alle als gelesen markieren.
{% endif %}
-- 2.47.1 From 2ac8a3155c18c196de805f4d009e9fa82b1ac358 Mon Sep 17 00:00:00 2001 From: Philipp Hofer Date: Wed, 1 Jan 2025 17:44:48 +0100 Subject: [PATCH 03/24] fix no 'donau linz' group --- src/model/user.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/model/user.rs b/src/model/user.rs index 97fc4bc..3c544d7 100644 --- a/src/model/user.rs +++ b/src/model/user.rs @@ -342,7 +342,10 @@ ASKÖ Ruderverein Donau Linz", self.name), } pub async fn fee(&self, db: &SqlitePool) -> Option { - if !self.has_role(db, "Donau Linz").await { + if !self.has_role(db, "Donau Linz").await + && !self.has_role(db, "Unterstützend").await + && !self.has_role(db, "Förderndes Mitglied").await + { return None; } if self.deleted { @@ -378,7 +381,10 @@ ASKÖ Ruderverein Donau Linz", self.name), async fn fee_without_families(&self, db: &SqlitePool) -> Fee { let mut fee = Fee::new(); - if !self.has_role(db, "Donau Linz").await { + if !self.has_role(db, "Donau Linz").await + && !self.has_role(db, "Unterstützend").await + && !self.has_role(db, "Förderndes Mitglied").await + { return fee; } if self.has_role(db, "Rennrudern").await { -- 2.47.1 From b560233acf0818dbcdb246a265a339e343196341 Mon Sep 17 00:00:00 2001 From: Philipp Hofer Date: Wed, 1 Jan 2025 19:05:20 +0100 Subject: [PATCH 04/24] show boatreservations in planned --- src/model/boatreservation.rs | 50 +++++++++++++++++++++++++++++++++--- src/model/mod.rs | 9 +++++++ templates/planned.html.tera | 24 ++++++++++++++++- 3 files changed, 79 insertions(+), 4 deletions(-) diff --git a/src/model/boatreservation.rs b/src/model/boatreservation.rs index 8a2a2b9..036dd21 100644 --- a/src/model/boatreservation.rs +++ b/src/model/boatreservation.rs @@ -56,6 +56,44 @@ impl BoatReservation { .await .ok() } + pub async fn for_day(db: &SqlitePool, day: NaiveDate) -> Vec { + let boatreservations = sqlx::query_as!( + Self, + " +SELECT id, boat_id, start_date, end_date, time_desc, usage, user_id_applicant, user_id_confirmation, created_at +FROM boat_reservation +WHERE end_date >= ? AND start_date <= ? + ", day, day + ) + .fetch_all(db) + .await + .unwrap(); //TODO: fixme + + let mut res = Vec::new(); + for reservation in boatreservations { + let user_confirmation = match reservation.user_id_confirmation { + Some(id) => { + let user = User::find_by_id(db, id as i32).await; + Some(user.unwrap()) + } + None => None, + }; + let user_applicant = User::find_by_id(db, reservation.user_id_applicant as i32) + .await + .unwrap(); + let boat = Boat::find_by_id(db, reservation.boat_id as i32) + .await + .unwrap(); + + res.push(BoatReservationWithDetails { + reservation, + boat, + user_applicant, + user_confirmation, + }); + } + res + } pub async fn all_future(db: &SqlitePool) -> Vec { let boatreservations = sqlx::query_as!( @@ -95,13 +133,13 @@ WHERE end_date >= CURRENT_DATE ORDER BY end_date } res } - pub async fn all_future_with_groups( - db: &SqlitePool, + + pub fn with_groups( + reservations: Vec, ) -> HashMap> { let mut grouped_reservations: HashMap> = HashMap::new(); - let reservations = Self::all_future(db).await; for reservation in reservations { let key = format!( "{}-{}-{}-{}-{}", @@ -120,6 +158,12 @@ WHERE end_date >= CURRENT_DATE ORDER BY end_date grouped_reservations } + pub async fn all_future_with_groups( + db: &SqlitePool, + ) -> HashMap> { + let reservations = Self::all_future(db).await; + Self::with_groups(reservations) + } pub async fn create( db: &SqlitePool, diff --git a/src/model/mod.rs b/src/model/mod.rs index 46446db..3a76436 100644 --- a/src/model/mod.rs +++ b/src/model/mod.rs @@ -11,6 +11,8 @@ use self::{ waterlevel::Waterlevel, weather::Weather, }; +use boatreservation::{BoatReservation, BoatReservationWithDetails}; +use std::collections::HashMap; pub mod boat; pub mod boatdamage; @@ -48,6 +50,7 @@ pub struct Day { regular_sees_this_day: bool, max_waterlevel: Option, weather: Option, + boat_reservations: HashMap>, } impl Day { @@ -64,6 +67,9 @@ impl Day { regular_sees_this_day, max_waterlevel: Waterlevel::max_waterlevel_for_day(db, day).await, weather: Weather::find_by_day(db, day).await, + boat_reservations: BoatReservation::with_groups( + BoatReservation::for_day(db, day).await, + ), } } else { Self { @@ -74,6 +80,9 @@ impl Day { regular_sees_this_day, max_waterlevel: Waterlevel::max_waterlevel_for_day(db, day).await, weather: Weather::find_by_day(db, day).await, + boat_reservations: BoatReservation::with_groups( + BoatReservation::for_day(db, day).await, + ), } } } diff --git a/templates/planned.html.tera b/templates/planned.html.tera index 02c328a..f4747e6 100644 --- a/templates/planned.html.tera +++ b/templates/planned.html.tera @@ -89,8 +89,30 @@ {% endif %} - {% if day.events | length > 0 or day.trips | length > 0 %} + {% if day.events | length > 0 or day.trips | length > 0 or day.boat_reservations | length > 0 %}
+ {# --- START Boatreservations--- #} + + {% for _, reservations_for_event in day.boat_reservations %} + {% set reservation = reservations_for_event[0] %} +
+
+
+ + Reservierung + {% for reservation in reservations_for_event -%} + {{ reservation.boat.name }} + {%- if not loop.last %} + {% endif -%} + {% endfor -%} + : {{ reservation.time_desc }} + + (von {{ reservation.user_applicant.name }}, Grund: {{ reservation.usage}}) +
+
+
+
+ {% endfor %} + {# --- END Boatreservations--- #} {# --- START Events --- #} {% if day.events | length > 0 %} {% for event in day.events | sort(attribute="planned_starting_time") %} -- 2.47.1 From 213e9faad4bef9038fcb6fa9b8358954696063d5 Mon Sep 17 00:00:00 2001 From: Marie Birner Date: Thu, 2 Jan 2025 11:22:41 +0100 Subject: [PATCH 05/24] [TASK] idea reservation styling in planned events view --- templates/planned.html.tera | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/templates/planned.html.tera b/templates/planned.html.tera index f4747e6..70897c3 100644 --- a/templates/planned.html.tera +++ b/templates/planned.html.tera @@ -92,26 +92,25 @@ {% if day.events | length > 0 or day.trips | length > 0 or day.boat_reservations | length > 0 %}
{# --- START Boatreservations--- #} - - {% for _, reservations_for_event in day.boat_reservations %} - {% set reservation = reservations_for_event[0] %} -
-
-
- - Reservierung - {% for reservation in reservations_for_event -%} - {{ reservation.boat.name }} - {%- if not loop.last %} + {% endif -%} - {% endfor -%} - : {{ reservation.time_desc }} - - (von {{ reservation.user_applicant.name }}, Grund: {{ reservation.usage}}) -
-
+ {% for _, reservations_for_event in day.boat_reservations %} + {% set reservation = reservations_for_event[0] %} +
+
+
+ + 📅 {{ reservation.time_desc }} ({{ reservation.user_applicant.name }})
+ + {% for reservation in reservations_for_event -%} + {{ reservation.boat.name }} + {%- if not loop.last %} + {% endif -%} + {% endfor -%} + +
+ ({{ reservation.usage}})
- {% endfor %} +
+ {% endfor %} {# --- END Boatreservations--- #} {# --- START Events --- #} {% if day.events | length > 0 %} -- 2.47.1 From 8a4d98a90f48b3ce473197d8d48ed24216e3a8b7 Mon Sep 17 00:00:00 2001 From: Philipp Hofer Date: Fri, 3 Jan 2025 12:36:29 +0100 Subject: [PATCH 06/24] nicer mail text --- src/model/mail.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/model/mail.rs b/src/model/mail.rs index 2a07024..3d3794b 100644 --- a/src/model/mail.rs +++ b/src/model/mail.rs @@ -298,7 +298,7 @@ Dein Vereinsbeitrag für das aktuelle Jahr beträgt {}€", } if is_family { content.push_str(&format!( - "Dieser gilt für die gesamte Familie ({}).\n", + "Dieser gilt für die gesamte Familie ({}). Diese Mail wird an alle Familienmitglieder verschickt, bezahlen müsst ihr natürlich nur 1x.\n", fees.name )) } -- 2.47.1 From d3bb05053469050f1f6fcabc4df2a9c75fb15b1b Mon Sep 17 00:00:00 2001 From: Philipp Hofer Date: Sat, 4 Jan 2025 10:56:32 +0100 Subject: [PATCH 07/24] fix count in statistic --- templates/stat.people.html.tera | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/stat.people.html.tera b/templates/stat.people.html.tera index 1431af0..3c8e361 100644 --- a/templates/stat.people.html.tera +++ b/templates/stat.people.html.tera @@ -39,21 +39,21 @@
{% endfor %}
Summe Vereinsmitglieder {{ club_km }} km
Summe {{ guest_km.name }} {{ guest_km.rowed_km }} km
Gesamtsumme -- 2.47.1 From 3232a03d75e90b0e8571fa873f202906888938f8 Mon Sep 17 00:00:00 2001 From: Philipp Hofer Date: Mon, 6 Jan 2025 13:14:19 +0100 Subject: [PATCH 08/24] show amount of trips in stat --- src/model/stat.rs | 45 ++++++++++++++++++++++++--------- src/tera/stat.rs | 3 ++- templates/stat.people.html.tera | 6 ++++- 3 files changed, 40 insertions(+), 14 deletions(-) diff --git a/src/model/stat.rs b/src/model/stat.rs index dad5ca0..6ec6b16 100644 --- a/src/model/stat.rs +++ b/src/model/stat.rs @@ -98,6 +98,7 @@ ORDER BY #[derive(FromRow, Serialize, Clone)] pub struct Stat { name: String, + pub(crate) amount_trips: i32, pub(crate) rowed_km: i32, } @@ -108,9 +109,11 @@ impl Stat { None => chrono::Local::now().year(), }; //TODO: switch to query! macro again (once upgraded to sqlite 3.42 on server) - let rowed_km = sqlx::query(&format!( + // proper guests + let guests = sqlx::query(&format!( " -SELECT SUM((b.amount_seats - COALESCE(m.member_count, 0)) * l.distance_in_km) as total_guest_km +SELECT SUM((b.amount_seats - COALESCE(m.member_count, 0)) * l.distance_in_km) as total_guest_km, + SUM(b.amount_seats - COALESCE(m.member_count, 0)) AS amount_trips FROM logbook l JOIN boat b ON l.boat_id = b.id LEFT JOIN ( @@ -123,12 +126,15 @@ WHERE l.distance_in_km IS NOT NULL AND l.arrival LIKE '{year}-%' AND not b.exter )) .fetch_one(db) .await - .unwrap() - .get::(0) as i32; + .unwrap(); - let rowed_km_guests = sqlx::query(&format!( + let guest_km: i32 = guests.get(0); + let guest_amount_trips: i32 = guests.get(1); + + // e.g. scheckbücher + let guest_user = sqlx::query(&format!( " -SELECT CAST(SUM(l.distance_in_km) AS INTEGER) AS rowed_km +SELECT CAST(SUM(l.distance_in_km) AS INTEGER) AS rowed_km, COUNT(*) AS amount_trips FROM user u INNER JOIN rower r ON u.id = r.rower_id INNER JOIN logbook l ON r.logbook_id = l.id @@ -145,15 +151,27 @@ AND u.name != 'Externe Steuerperson'; )) .fetch_one(db) .await - .unwrap() - .get::(0) as i32; + .unwrap(); + + let guest_user_km: i32 = guest_user.get(0); + let guest_user_amount_trips: i32 = guest_user.get(1); Stat { name: "Gäste".into(), - rowed_km: rowed_km + rowed_km_guests, + amount_trips: guest_amount_trips + guest_user_amount_trips, + rowed_km: guest_km + guest_user_km, } } + pub async fn trips_people(db: &SqlitePool, year: Option) -> i32 { + let stats = Self::people(db, year).await; + let mut sum = 0; + for stat in stats { + sum += stat.amount_trips; + } + + sum + } pub async fn sum_people(db: &SqlitePool, year: Option) -> i32 { let stats = Self::people(db, year).await; let mut sum = 0; @@ -172,7 +190,7 @@ AND u.name != 'Externe Steuerperson'; //TODO: switch to query! macro again (once upgraded to sqlite 3.42 on server) sqlx::query(&format!( " -SELECT u.name, CAST(SUM(l.distance_in_km) AS INTEGER) AS rowed_km +SELECT u.name, CAST(SUM(l.distance_in_km) AS INTEGER) AS rowed_km, COUNT(*) AS amount_trips FROM ( SELECT * FROM user WHERE id IN ( @@ -194,6 +212,7 @@ ORDER BY rowed_km DESC, u.name; .into_iter() .map(|row| Stat { name: row.get("name"), + amount_trips: row.get("amount_trips"), rowed_km: row.get("rowed_km"), }) .collect() @@ -203,7 +222,7 @@ ORDER BY rowed_km DESC, u.name; //TODO: switch to query! macro again (once upgraded to sqlite 3.42 on server) let row = sqlx::query(&format!( " -SELECT u.name, CAST(SUM(l.distance_in_km) AS INTEGER) AS rowed_km +SELECT u.name, CAST(SUM(l.distance_in_km) AS INTEGER) AS rowed_km, COUNT(*) AS amount_trips FROM ( SELECT * FROM user WHERE id={} @@ -220,6 +239,7 @@ WHERE l.distance_in_km IS NOT NULL; Stat { name: row.get("name"), + amount_trips: row.get("amount_trips"), rowed_km: row.get("rowed_km"), } } @@ -232,7 +252,7 @@ WHERE l.distance_in_km IS NOT NULL; //TODO: switch to query! macro again (once upgraded to sqlite 3.42 on server) let row = sqlx::query(&format!( " -SELECT u.name, CAST(SUM(l.distance_in_km) AS INTEGER) AS rowed_km +SELECT u.name, CAST(SUM(l.distance_in_km) AS INTEGER) AS rowed_km, COUNT(*) AS amount_trips FROM ( SELECT * FROM user WHERE id={} @@ -249,6 +269,7 @@ WHERE l.distance_in_km IS NOT NULL AND l.arrival LIKE '{year}-%'; Stat { name: row.get("name"), + amount_trips: row.get("amount_trips"), rowed_km: row.get("rowed_km"), } } diff --git a/src/tera/stat.rs b/src/tera/stat.rs index 5c7217c..f1823bf 100644 --- a/src/tera/stat.rs +++ b/src/tera/stat.rs @@ -32,13 +32,14 @@ async fn index_boat_kiosk(db: &State, _kiosk: KioskCookie) -> Templa async fn index(db: &State, user: DonauLinzUser, year: Option) -> Template { let stat = Stat::people(db, year).await; let club_km = Stat::sum_people(db, year).await; + let club_trips = Stat::trips_people(db, year).await; let guest_km = Stat::guest(db, year).await; let personal = stat::get_personal(db, &user).await; let kiosk = false; Template::render( "stat.people", - context!(loggedin_user: &UserWithDetails::from_user(user.into_inner(), db).await, stat, personal, kiosk, guest_km, club_km), + context!(loggedin_user: &UserWithDetails::from_user(user.into_inner(), db).await, stat, personal, kiosk, guest_km, club_km, club_trips), ) } diff --git a/templates/stat.people.html.tera b/templates/stat.people.html.tera index 3c8e361..9856dd6 100644 --- a/templates/stat.people.html.tera +++ b/templates/stat.people.html.tera @@ -20,7 +20,7 @@
- {% set_global km = 0 %} {% set_global index = 1 %} + {% set_global km = 0 %} {% set_global km = 0 %} {% set_global index = 1 %} {% for s in stat %}
{{ s.name }} {{ s.rowed_km }} km + {{ s.amount_trips }} Fahrt{{ s.amount_trips | pluralize(plural="en") }} {% set_global km = s.rowed_km %}
{% endfor %} @@ -44,6 +45,7 @@ Summe Vereinsmitglieder {{ club_km }} km + {{ club_trips }} Fahrt{{ club_trips | pluralize(plural="en") }}
Summe {{ guest_km.name }} {{ guest_km.rowed_km }} km + {{ guest_km.amount_trips }} Fahrt{{ guest_km.amount_trips | pluralize(plural="en") }}
Gesamtsumme {{ club_km + guest_km.rowed_km }} km + {{ guest_km.amount_trips + club_trips }} Fahrt{{ guest_km.amount_trips + club_trips | pluralize(plural="en") }}
-- 2.47.1 From 022ec6bd5bf5885e25c372dce1ca54b5b56aae6f Mon Sep 17 00:00:00 2001 From: Marie Birner Date: Tue, 7 Jan 2025 10:52:46 +0100 Subject: [PATCH 09/24] [TASK] make stats more beautiful --- templates/stat.people.html.tera | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/templates/stat.people.html.tera b/templates/stat.people.html.tera index 9856dd6..dee4e08 100644 --- a/templates/stat.people.html.tera +++ b/templates/stat.people.html.tera @@ -20,6 +20,14 @@
+
+ # + Name + km + Fahrten +
{% set_global km = 0 %} {% set_global km = 0 %} {% set_global index = 1 %} {% for s in stat %}
{{ s.name }} - {{ s.rowed_km }} km - {{ s.amount_trips }} Fahrt{{ s.amount_trips | pluralize(plural="en") }} + {{ s.rowed_km }} + {{ s.amount_trips }} {% set_global km = s.rowed_km %}
{% endfor %} -
Summe Vereinsmitglieder - {{ club_km }} km - {{ club_trips }} Fahrt{{ club_trips | pluralize(plural="en") }} + {{ club_km }} + {{ club_trips }}
Summe {{ guest_km.name }} - {{ guest_km.rowed_km }} km - {{ guest_km.amount_trips }} Fahrt{{ guest_km.amount_trips | pluralize(plural="en") }} + {{ guest_km.rowed_km }} + {{ guest_km.amount_trips }}
Gesamtsumme - {{ club_km + guest_km.rowed_km }} km - {{ guest_km.amount_trips + club_trips }} Fahrt{{ guest_km.amount_trips + club_trips | pluralize(plural="en") }} + {{ club_km + guest_km.rowed_km }} + {{ guest_km.amount_trips + club_trips }}
-- 2.47.1 From 5b013fe389923b41660a446c0ee8f0a8842fe7c6 Mon Sep 17 00:00:00 2001 From: Marie Birner Date: Tue, 7 Jan 2025 10:54:15 +0100 Subject: [PATCH 10/24] [TASK] rm unnecessary personal stat --- templates/stat.people.html.tera | 39 +-------------------------------- 1 file changed, 1 insertion(+), 38 deletions(-) diff --git a/templates/stat.people.html.tera b/templates/stat.people.html.tera index dee4e08..fbc5284 100644 --- a/templates/stat.people.html.tera +++ b/templates/stat.people.html.tera @@ -72,42 +72,5 @@ {{ guest_km.amount_trips + club_trips }}
-
- - -{% endblock content %} + \ No newline at end of file -- 2.47.1 From 6237340f722663a39aa1aa6dd7fb0c1490d83592 Mon Sep 17 00:00:00 2001 From: Philipp Hofer Date: Tue, 7 Jan 2025 11:39:36 +0100 Subject: [PATCH 11/24] fix ci --- templates/stat.people.html.tera | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/stat.people.html.tera b/templates/stat.people.html.tera index fbc5284..de4430a 100644 --- a/templates/stat.people.html.tera +++ b/templates/stat.people.html.tera @@ -73,4 +73,4 @@ - \ No newline at end of file +{% endblock content %} -- 2.47.1 From 0ebcd5a284d3d60c3d2cc3d11687ca1504abadd2 Mon Sep 17 00:00:00 2001 From: Philipp Hofer Date: Tue, 7 Jan 2025 11:44:56 +0100 Subject: [PATCH 12/24] allow changing the year in stats again --- templates/stat.people.html.tera | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/templates/stat.people.html.tera b/templates/stat.people.html.tera index de4430a..cc02d1d 100644 --- a/templates/stat.people.html.tera +++ b/templates/stat.people.html.tera @@ -73,4 +73,31 @@ + {% endblock content %} -- 2.47.1 From be4f302a4c123e394b79e061d40707907328e048 Mon Sep 17 00:00:00 2001 From: Marie Birner Date: Tue, 7 Jan 2025 14:07:52 +0100 Subject: [PATCH 13/24] [TASK] make stats more beautiful --- templates/stat.people.html.tera | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/templates/stat.people.html.tera b/templates/stat.people.html.tera index cc02d1d..ce947a7 100644 --- a/templates/stat.people.html.tera +++ b/templates/stat.people.html.tera @@ -25,7 +25,7 @@ data-filter="Header"> # Name - km + km Fahrten {% set_global km = 0 %} {% set_global km = 0 %} {% set_global index = 1 %} @@ -42,7 +42,7 @@ {% endif %} {{ s.name }} - {{ s.rowed_km }} + {{ s.rowed_km }} {{ s.amount_trips }} {% set_global km = s.rowed_km %} @@ -52,7 +52,7 @@ data-filter="Summe Vereinsmitglieder"> Summe Vereinsmitglieder - {{ club_km }} + {{ club_km }} {{ club_trips }}
Summe {{ guest_km.name }} - {{ guest_km.rowed_km }} + {{ guest_km.rowed_km }} {{ guest_km.amount_trips }}
Gesamtsumme - {{ club_km + guest_km.rowed_km }} + {{ club_km + guest_km.rowed_km }} {{ guest_km.amount_trips + club_trips }}
-- 2.47.1 From 1a850535edd9d2bad55424eea98e1d9af6b6eb66 Mon Sep 17 00:00:00 2001 From: Philipp Hofer Date: Wed, 8 Jan 2025 14:46:11 +0100 Subject: [PATCH 14/24] switch from date to time icon + add 'Reservierung' --- templates/planned.html.tera | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/planned.html.tera b/templates/planned.html.tera index 70897c3..4310925 100644 --- a/templates/planned.html.tera +++ b/templates/planned.html.tera @@ -98,7 +98,7 @@
- 📅 {{ reservation.time_desc }} ({{ reservation.user_applicant.name }})
+ ⏳ {{ reservation.time_desc }} ({{ reservation.user_applicant.name }})
{% for reservation in reservations_for_event -%} {{ reservation.boat.name }} @@ -106,7 +106,7 @@ {% endfor -%}
- ({{ reservation.usage}}) + (Reservierung - {{ reservation.usage}})
-- 2.47.1 From af4163a065fc5a67f392aa6e447e1a7532207afb Mon Sep 17 00:00:00 2001 From: Philipp Hofer Date: Thu, 9 Jan 2025 10:21:44 +0100 Subject: [PATCH 15/24] add confirm dialog before creating a new user --- templates/admin/user/index.html.tera | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/admin/user/index.html.tera b/templates/admin/user/index.html.tera index da383ec..c50e64f 100644 --- a/templates/admin/user/index.html.tera +++ b/templates/admin/user/index.html.tera @@ -5,6 +5,7 @@

Users

{% if allowed_to_edit %}
-- 2.47.1 From 97dd7794fb257cb241c8f04020099f399f6a6bab Mon Sep 17 00:00:00 2001 From: Philipp Hofer Date: Thu, 9 Jan 2025 10:37:15 +0100 Subject: [PATCH 16/24] split to separate fee file --- src/model/user/fee.rs | 55 ++++++++++++++++++++++++++++ src/model/{user.rs => user/mod.rs} | 58 ++---------------------------- 2 files changed, 57 insertions(+), 56 deletions(-) create mode 100644 src/model/user/fee.rs rename src/model/{user.rs => user/mod.rs} (97%) diff --git a/src/model/user/fee.rs b/src/model/user/fee.rs new file mode 100644 index 0000000..d4d8f79 --- /dev/null +++ b/src/model/user/fee.rs @@ -0,0 +1,55 @@ +#[derive(Debug, Serialize)] +pub struct Fee { + pub sum_in_cents: i32, + pub parts: Vec<(String, i32)>, + pub name: String, + pub user_ids: String, + pub paid: bool, + pub users: Vec, +} + +impl Default for Fee { + fn default() -> Self { + Self::new() + } +} + +impl Fee { + pub fn new() -> Self { + Self { + sum_in_cents: 0, + name: "".into(), + parts: Vec::new(), + user_ids: "".into(), + users: Vec::new(), + paid: false, + } + } + + pub fn add(&mut self, desc: String, price_in_cents: i32) { + self.sum_in_cents += price_in_cents; + + self.parts.push((desc, price_in_cents)); + } + + pub fn add_person(&mut self, user: &User) { + if !self.name.is_empty() { + self.name.push_str(" + "); + self.user_ids.push('&'); + } + self.name.push_str(&user.name); + + self.user_ids.push_str(&format!("user_ids[]={}", user.id)); + self.users.push(user.clone()); + } + + pub fn paid(&mut self) { + self.paid = true; + } + + pub fn merge(&mut self, fee: Fee) { + for (desc, price_in_cents) in fee.parts { + self.add(desc, price_in_cents); + } + } +} diff --git a/src/model/user.rs b/src/model/user/mod.rs similarity index 97% rename from src/model/user.rs rename to src/model/user/mod.rs index 3c544d7..2bb97e4 100644 --- a/src/model/user.rs +++ b/src/model/user/mod.rs @@ -24,6 +24,8 @@ use crate::{ SCHECKBUCH, STUDENT_OR_PUPIL, UNTERSTUETZEND, }; +mod fee; + #[derive(FromRow, Serialize, Deserialize, Clone, Debug, Eq, Hash, PartialEq)] pub struct User { pub id: i64, @@ -83,62 +85,6 @@ pub enum LoginError { DeserializationError, } -#[derive(Debug, Serialize)] -pub struct Fee { - pub sum_in_cents: i32, - pub parts: Vec<(String, i32)>, - pub name: String, - pub user_ids: String, - pub paid: bool, - pub users: Vec, -} - -impl Default for Fee { - fn default() -> Self { - Self::new() - } -} - -impl Fee { - pub fn new() -> Self { - Self { - sum_in_cents: 0, - name: "".into(), - parts: Vec::new(), - user_ids: "".into(), - users: Vec::new(), - paid: false, - } - } - - pub fn add(&mut self, desc: String, price_in_cents: i32) { - self.sum_in_cents += price_in_cents; - - self.parts.push((desc, price_in_cents)); - } - - pub fn add_person(&mut self, user: &User) { - if !self.name.is_empty() { - self.name.push_str(" + "); - self.user_ids.push('&'); - } - self.name.push_str(&user.name); - - self.user_ids.push_str(&format!("user_ids[]={}", user.id)); - self.users.push(user.clone()); - } - - pub fn paid(&mut self) { - self.paid = true; - } - - pub fn merge(&mut self, fee: Fee) { - for (desc, price_in_cents) in fee.parts { - self.add(desc, price_in_cents); - } - } -} - impl User { pub async fn allowed_to_steer(&self, db: &SqlitePool) -> bool { self.has_role(db, "cox").await || self.has_role(db, "Bootsführer").await -- 2.47.1 From d21272d4bb83da2703f2d7a799bc1f3e5f6f20b3 Mon Sep 17 00:00:00 2001 From: Philipp Hofer Date: Thu, 9 Jan 2025 11:45:24 +0100 Subject: [PATCH 17/24] =?UTF-8?q?send=20notifiation=20to=20user=20+=20vors?= =?UTF-8?q?tand=20if=20user=20completes=20'=C3=A4quatorpreis'=20or=20'fahr?= =?UTF-8?q?tenabzeichen';=20Fixes=20#746?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/model/logbook.rs | 21 ++++--- src/model/personal/equatorprice.rs | 17 ++++++ src/model/personal/rowingbadge.rs | 97 +++++++++++++++++++++++------- src/model/stat.rs | 30 +++++++-- src/model/trip.rs | 6 +- src/model/user/fee.rs | 3 + src/model/user/mod.rs | 50 +++++++++++++-- 7 files changed, 181 insertions(+), 43 deletions(-) diff --git a/src/model/logbook.rs b/src/model/logbook.rs index a85ab46..076f2a6 100644 --- a/src/model/logbook.rs +++ b/src/model/logbook.rs @@ -33,7 +33,7 @@ impl PartialEq for Logbook { pub(crate) enum Filter { SingleDayOnly, - MultiDazOnly, + MultiDayOnly, None, } @@ -362,12 +362,13 @@ ORDER BY departure DESC } } - pub(crate) async fn completed_wanderfahrten_with_user_over_km_in_year( - db: &SqlitePool, + pub(crate) async fn completed_wanderfahrten_with_user_over_km_in_year_tx( + db: &mut Transaction<'_, Sqlite>, user: &User, min_distance: i32, year: i32, filter: Filter, + exclude_last_log: bool, ) -> Vec { let logs: Vec = sqlx::query_as( &format!(" @@ -378,7 +379,7 @@ ORDER BY departure DESC ORDER BY arrival DESC ", user.id, min_distance, year) ) - .fetch_all(db) + .fetch_all(db.deref_mut()) .await .unwrap(); //TODO: fixme @@ -389,19 +390,23 @@ ORDER BY departure DESC match filter { Filter::SingleDayOnly => { if trip_days == 0 { - ret.push(LogbookWithBoatAndRowers::from(db, log).await); + ret.push(LogbookWithBoatAndRowers::from_tx(db, log).await); } } - Filter::MultiDazOnly => { + Filter::MultiDayOnly => { if trip_days > 0 { - ret.push(LogbookWithBoatAndRowers::from(db, log).await); + ret.push(LogbookWithBoatAndRowers::from_tx(db, log).await); } } Filter::None => { - ret.push(LogbookWithBoatAndRowers::from(db, log).await); + ret.push(LogbookWithBoatAndRowers::from_tx(db, log).await); } } } + if exclude_last_log { + ret.pop(); + } + ret } diff --git a/src/model/personal/equatorprice.rs b/src/model/personal/equatorprice.rs index 97a489a..a03d9eb 100644 --- a/src/model/personal/equatorprice.rs +++ b/src/model/personal/equatorprice.rs @@ -1,3 +1,4 @@ +use crate::model::{logbook::Logbook, stat::Stat, user::User}; use serde::Serialize; #[derive(Serialize, PartialEq, Debug)] @@ -85,3 +86,19 @@ impl Next { } } } + +pub(crate) async fn new_level_with_last_log( + db: &mut sqlx::Transaction<'_, sqlx::Sqlite>, + user: &User, +) -> Option { + let rowed_km = Stat::total_km_tx(db, user).await.rowed_km; + + if let Some(last_logbookentry) = Logbook::completed_with_user_tx(db, user).await.last() { + let last_trip_km = last_logbookentry.logbook.distance_in_km.unwrap(); + if Level::curr_level(rowed_km) != Level::curr_level(rowed_km - last_trip_km as i32) { + return Some(Level::curr_level(rowed_km).desc().to_string()); + } + } + + None +} diff --git a/src/model/personal/rowingbadge.rs b/src/model/personal/rowingbadge.rs index 446b886..93a969a 100644 --- a/src/model/personal/rowingbadge.rs +++ b/src/model/personal/rowingbadge.rs @@ -2,7 +2,7 @@ use std::cmp; use chrono::{Datelike, Local, NaiveDate}; use serde::Serialize; -use sqlx::SqlitePool; +use sqlx::{Sqlite, SqlitePool, Transaction}; use crate::model::{ logbook::{Filter, Logbook, LogbookWithBoatAndRowers}, @@ -111,11 +111,44 @@ pub(crate) struct Status { } impl Status { - pub(crate) async fn for_user(db: &SqlitePool, user: &User) -> Option { + fn calc( + agebracket: &AgeBracket, + rowed_km: i32, + single_day_trips_over_required_distance: usize, + multi_day_trips_over_required_distance: usize, + year: i32, + ) -> Self { + let category = agebracket.cat().to_string(); + + let required_km = agebracket.dist_in_km(); + let missing_km = cmp::max(required_km - rowed_km, 0); + + let achieved = missing_km == 0 + && (multi_day_trips_over_required_distance >= 1 + || single_day_trips_over_required_distance >= 2); + + Self { + year, + rowed_km, + category, + required_km, + missing_km, + multi_day_trips_over_required_distance: vec![], + single_day_trips_over_required_distance: vec![], + multi_day_trips_required_distance: agebracket.required_dist_multi_day_in_km(), + single_day_trips_required_distance: agebracket.required_dist_single_day_in_km(), + achieved, + } + } + + pub(crate) async fn for_user_tx( + db: &mut Transaction<'_, Sqlite>, + user: &User, + exclude_last_log: bool, + ) -> Option { let Ok(agebracket) = AgeBracket::try_from(user) else { return None; }; - let category = agebracket.cat().to_string(); let year = if Local::now().month() == 1 { Local::now().year() - 1 @@ -123,44 +156,66 @@ impl Status { Local::now().year() }; - let rowed_km = Stat::person(db, Some(year), user).await.rowed_km; - let required_km = agebracket.dist_in_km(); - let missing_km = cmp::max(required_km - rowed_km, 0); - + let rowed_km = Stat::person_tx(db, Some(year), user).await.rowed_km; let single_day_trips_over_required_distance = - Logbook::completed_wanderfahrten_with_user_over_km_in_year( + Logbook::completed_wanderfahrten_with_user_over_km_in_year_tx( db, user, agebracket.required_dist_single_day_in_km(), year, Filter::SingleDayOnly, + exclude_last_log, ) .await; let multi_day_trips_over_required_distance = - Logbook::completed_wanderfahrten_with_user_over_km_in_year( + Logbook::completed_wanderfahrten_with_user_over_km_in_year_tx( db, user, agebracket.required_dist_multi_day_in_km(), year, - Filter::MultiDazOnly, + Filter::MultiDayOnly, + exclude_last_log, ) .await; - let achieved = missing_km == 0 - && (multi_day_trips_over_required_distance.len() >= 1 - || single_day_trips_over_required_distance.len() >= 2); + let ret = Self::calc( + &agebracket, + rowed_km, + single_day_trips_over_required_distance.len(), + multi_day_trips_over_required_distance.len(), + year, + ); Some(Self { - year, - rowed_km, - category, - required_km, - missing_km, multi_day_trips_over_required_distance, single_day_trips_over_required_distance, - multi_day_trips_required_distance: agebracket.required_dist_multi_day_in_km(), - single_day_trips_required_distance: agebracket.required_dist_single_day_in_km(), - achieved, + ..ret }) } + + pub(crate) async fn for_user(db: &SqlitePool, user: &User) -> Option { + let mut tx = db.begin().await.unwrap(); + let ret = Self::for_user_tx(&mut tx, user, false).await; + tx.commit().await.unwrap(); + ret + } + + pub(crate) async fn completed_with_last_log( + db: &mut Transaction<'_, Sqlite>, + user: &User, + ) -> bool { + if let Some(status) = Self::for_user_tx(db, user, false).await { + // if user has agebracket... + if status.achieved { + // ... and has achieved the 'Fahrtenabzeichen' + let without_last_entry = Self::for_user_tx(db, user, true).await.unwrap(); + if !without_last_entry.achieved { + // ... and this wasn't the case before the last logentry + return true; + } + } + } + + false + } } diff --git a/src/model/stat.rs b/src/model/stat.rs index 6ec6b16..2ed663a 100644 --- a/src/model/stat.rs +++ b/src/model/stat.rs @@ -1,9 +1,9 @@ -use std::collections::HashMap; +use std::{collections::HashMap, ops::DerefMut}; use crate::model::user::User; use chrono::Datelike; use serde::Serialize; -use sqlx::{FromRow, Row, SqlitePool}; +use sqlx::{FromRow, Row, Sqlite, SqlitePool, Transaction}; use super::boat::Boat; @@ -218,7 +218,7 @@ ORDER BY rowed_km DESC, u.name; .collect() } - pub async fn total_km(db: &SqlitePool, user: &User) -> Stat { + pub async fn total_km_tx(db: &mut Transaction<'_, Sqlite>, user: &User) -> Stat { //TODO: switch to query! macro again (once upgraded to sqlite 3.42 on server) let row = sqlx::query(&format!( " @@ -233,7 +233,7 @@ WHERE l.distance_in_km IS NOT NULL; ", user.id )) - .fetch_one(db) + .fetch_one(db.deref_mut()) .await .unwrap(); @@ -244,7 +244,18 @@ WHERE l.distance_in_km IS NOT NULL; } } - pub async fn person(db: &SqlitePool, year: Option, user: &User) -> Stat { + pub async fn total_km(db: &SqlitePool, user: &User) -> Stat { + let mut tx = db.begin().await.unwrap(); + let ret = Self::total_km_tx(&mut tx, user).await; + tx.commit().await.unwrap(); + ret + } + + pub async fn person_tx( + db: &mut Transaction<'_, Sqlite>, + year: Option, + user: &User, + ) -> Stat { let year = match year { Some(year) => year, None => chrono::Local::now().year(), @@ -263,7 +274,7 @@ WHERE l.distance_in_km IS NOT NULL AND l.arrival LIKE '{year}-%'; ", user.id )) - .fetch_one(db) + .fetch_one(db.deref_mut()) .await .unwrap(); @@ -273,6 +284,13 @@ WHERE l.distance_in_km IS NOT NULL AND l.arrival LIKE '{year}-%'; rowed_km: row.get("rowed_km"), } } + + pub async fn person(db: &SqlitePool, year: Option, user: &User) -> Stat { + let mut tx = db.begin().await.unwrap(); + let ret = Self::person_tx(&mut tx, year, user).await; + tx.commit().await.unwrap(); + ret + } } #[derive(Debug, Serialize)] diff --git a/src/model/trip.rs b/src/model/trip.rs index 71d98df..b8178fa 100644 --- a/src/model/trip.rs +++ b/src/model/trip.rs @@ -287,10 +287,8 @@ WHERE day=? return Err(TripUpdateError::NotYourTrip); } - if update.trip_type != Some(4) { - if !update.cox.allowed_to_steer(db).await { - return Err(TripUpdateError::TripTypeNotAllowed); - } + if update.trip_type != Some(4) && !update.cox.allowed_to_steer(db).await { + return Err(TripUpdateError::TripTypeNotAllowed); } let Some(trip_details_id) = update.trip.trip_details_id else { diff --git a/src/model/user/fee.rs b/src/model/user/fee.rs index d4d8f79..1fa9841 100644 --- a/src/model/user/fee.rs +++ b/src/model/user/fee.rs @@ -1,3 +1,6 @@ +use super::User; +use serde::Serialize; + #[derive(Debug, Serialize)] pub struct Fee { pub sum_in_cents: i32, diff --git a/src/model/user/mod.rs b/src/model/user/mod.rs index 2bb97e4..6f27ea8 100644 --- a/src/model/user/mod.rs +++ b/src/model/user/mod.rs @@ -15,14 +15,23 @@ use serde::{Deserialize, Serialize}; use sqlx::{FromRow, Sqlite, SqlitePool, Transaction}; use super::{ - family::Family, log::Log, logbook::Logbook, mail::Mail, notification::Notification, role::Role, - stat::Stat, tripdetails::TripDetails, Day, + family::Family, + log::Log, + logbook::Logbook, + mail::Mail, + notification::Notification, + personal::{equatorprice, rowingbadge}, + role::Role, + stat::Stat, + tripdetails::TripDetails, + Day, }; use crate::{ tera::admin::user::UserEditForm, AMOUNT_DAYS_TO_SHOW_TRIPS_AHEAD, BOAT_STORAGE, EINSCHREIBGEBUEHR, FAMILY_THREE_OR_MORE, FAMILY_TWO, FOERDERND, REGULAR, RENNRUDERBEITRAG, SCHECKBUCH, STUDENT_OR_PUPIL, UNTERSTUETZEND, }; +use fee::Fee; mod fee; @@ -1016,8 +1025,41 @@ ORDER BY last_access DESC } } - // TODO: check fahrtenabzeichen fertig? - // TODO: check äquatorpreis geschafft? + // check fahrtenabzeichen fertig + if rowingbadge::Status::completed_with_last_log(db, &self).await { + let board = Role::find_by_name_tx(db, "Vorstand").await.unwrap(); + Notification::create_for_role_tx( + db, + &board, + &format!( + "Lieber Vorstand, zur Info: {} hat gerade alle Anforderungen für das diesjährige Fahrtenabzeichen erfüllt.", + self.name + ), + "Fahrtenabzeichen geschafft", + None,None + ) + .await; + + Notification::create_with_tx(db, self, "Mit deiner letzten Ausfahrt hast du nun alle Anforderungen für das heurige Fahrtenzeichen erfüllt. Gratuliere! 🎉", "Fahrtenabzeichen geschafft", None, None).await; + } + + // check äquatorpreis geschafft? + if let Some(level) = equatorprice::new_level_with_last_log(db, self).await { + let board = Role::find_by_name_tx(db, "Vorstand").await.unwrap(); + Notification::create_for_role_tx( + db, + &board, + &format!( + "Lieber Vorstand, zur Info: {} hat gerade alle Anforderungen für den Äquatorpreis in {level} geschafft.", + self.name + ), + "Äquatorpreis", + None,None + ) + .await; + + Notification::create_with_tx(db, self, &format!("Mit deiner letzten Ausfahrt erfüllst du nun alle Anforderungen für den Äquatorpreis in {level}. Gratuliere! 🎉"), "Äquatorpreis", None, None).await; + } } } -- 2.47.1 From f7d109f1b226611a187b5cc66340c3287efa7c06 Mon Sep 17 00:00:00 2001 From: Philipp Hofer Date: Thu, 9 Jan 2025 15:31:05 +0100 Subject: [PATCH 18/24] cargo clippy --- src/model/boathouse.rs | 154 ++++++++++++++++------------ src/model/logbook.rs | 4 - src/model/personal/equatorprice.rs | 72 ++++++------- src/model/user/mod.rs | 68 ++++++------ src/tera/admin/user.rs | 4 +- src/tera/board/achievement.rs | 6 +- src/tera/boatdamage.rs | 4 +- src/tera/ergo.rs | 4 +- src/tera/log.rs | 2 +- src/tera/misc.rs | 2 +- templates/board/boathouse.html.tera | 7 +- 11 files changed, 174 insertions(+), 153 deletions(-) diff --git a/src/model/boathouse.rs b/src/model/boathouse.rs index 0e96caf..03d0f78 100644 --- a/src/model/boathouse.rs +++ b/src/model/boathouse.rs @@ -1,5 +1,3 @@ -use std::collections::HashMap; - use rocket::serde::{Deserialize, Serialize}; use sqlx::{FromRow, SqlitePool}; @@ -7,6 +5,93 @@ use crate::tera::board::boathouse::FormBoathouseToAdd; use super::boat::Boat; +#[derive(Debug, Serialize, Deserialize)] +pub struct BoathousePlace { + boat: Boat, + boathouse_id: i64, +} + +#[derive(Debug, Serialize, Deserialize)] +pub struct BoathouseRack { + boats: [Option; 12], +} + +impl BoathouseRack { + fn new() -> Self { + let boats = [ + None, None, None, None, None, None, None, None, None, None, None, None, + ]; + Self { boats } + } + + async fn add(&mut self, db: &SqlitePool, boathouse: Boathouse) { + self.boats[boathouse.level as usize] = Some(BoathousePlace { + boat: Boat::find_by_id(db, boathouse.boat_id as i32) + .await + .unwrap(), + boathouse_id: boathouse.id, + }); + } +} + +#[derive(Debug, Serialize, Deserialize)] +pub struct BoathouseSide { + mountain: BoathouseRack, + water: BoathouseRack, +} + +impl BoathouseSide { + fn new() -> Self { + Self { + mountain: BoathouseRack::new(), + water: BoathouseRack::new(), + } + } + + async fn add(&mut self, db: &SqlitePool, boathouse: Boathouse) { + match boathouse.side.as_str() { + "mountain" => self.mountain.add(db, boathouse).await, + "water" => self.water.add(db, boathouse).await, + _ => panic!("db constraint failed"), + } + } +} + +#[derive(Debug, Serialize, Deserialize)] +pub struct BoathouseAisles { + mountain: BoathouseSide, + middle: BoathouseSide, + water: BoathouseSide, +} + +impl BoathouseAisles { + fn new() -> Self { + Self { + mountain: BoathouseSide::new(), + middle: BoathouseSide::new(), + water: BoathouseSide::new(), + } + } + + async fn add(&mut self, db: &SqlitePool, boathouse: Boathouse) { + match boathouse.aisle.as_str() { + "water" => self.water.add(db, boathouse).await, + "middle" => self.middle.add(db, boathouse).await, + "mountain" => self.mountain.add(db, boathouse).await, + _ => panic!("db constraint failed"), + }; + } + + pub async fn from(db: &SqlitePool, boathouses: Vec) -> Self { + let mut ret = BoathouseAisles::new(); + + for boathouse in boathouses { + ret.add(db, boathouse).await; + } + ret + } +} + #[derive(FromRow, Debug, Serialize, Deserialize)] pub struct Boathouse { pub id: i64, @@ -17,54 +102,7 @@ pub struct Boathouse { } impl Boathouse { - pub async fn get(db: &SqlitePool) -> HashMap<&str, HashMap<&str, [Option<(i64, Boat)>; 12]>> { - let mut ret: HashMap<&str, HashMap<&str, [Option<(i64, Boat)>; 12]>> = HashMap::new(); - - let mut mountain = HashMap::new(); - mountain.insert( - "mountain", - [ - None, None, None, None, None, None, None, None, None, None, None, None, - ], - ); - mountain.insert( - "water", - [ - None, None, None, None, None, None, None, None, None, None, None, None, - ], - ); - ret.insert("mountain-aisle", mountain); - - let mut middle = HashMap::new(); - middle.insert( - "mountain", - [ - None, None, None, None, None, None, None, None, None, None, None, None, - ], - ); - middle.insert( - "water", - [ - None, None, None, None, None, None, None, None, None, None, None, None, - ], - ); - ret.insert("middle-aisle", middle); - - let mut water = HashMap::new(); - water.insert( - "mountain", - [ - None, None, None, None, None, None, None, None, None, None, None, None, - ], - ); - water.insert( - "water", - [ - None, None, None, None, None, None, None, None, None, None, None, None, - ], - ); - ret.insert("water-aisle", water); - + pub async fn get(db: &SqlitePool) -> BoathouseAisles { let boathouses = sqlx::query_as!( Boathouse, "SELECT id, boat_id, aisle, side, level FROM boathouse" @@ -73,21 +111,7 @@ impl Boathouse { .await .unwrap(); //TODO: fixme - for boathouse in boathouses { - let aisle = ret - .get_mut(format!("{}-aisle", boathouse.aisle).as_str()) - .unwrap(); - let side = aisle.get_mut(boathouse.side.as_str()).unwrap(); - - side[boathouse.level as usize] = Some(( - boathouse.id, - Boat::find_by_id(db, boathouse.boat_id as i32) - .await - .unwrap(), - )); - } - - ret + BoathouseAisles::from(db, boathouses).await } pub async fn create(db: &SqlitePool, data: FormBoathouseToAdd) -> Result<(), String> { diff --git a/src/model/logbook.rs b/src/model/logbook.rs index 076f2a6..4b104bf 100644 --- a/src/model/logbook.rs +++ b/src/model/logbook.rs @@ -34,7 +34,6 @@ impl PartialEq for Logbook { pub(crate) enum Filter { SingleDayOnly, MultiDayOnly, - None, } #[derive(FromForm, Debug, Clone)] @@ -398,9 +397,6 @@ ORDER BY departure DESC ret.push(LogbookWithBoatAndRowers::from_tx(db, log).await); } } - Filter::None => { - ret.push(LogbookWithBoatAndRowers::from_tx(db, log).await); - } } } if exclude_last_log { diff --git a/src/model/personal/equatorprice.rs b/src/model/personal/equatorprice.rs index a03d9eb..6190163 100644 --- a/src/model/personal/equatorprice.rs +++ b/src/model/personal/equatorprice.rs @@ -3,62 +3,62 @@ use serde::Serialize; #[derive(Serialize, PartialEq, Debug)] pub(crate) enum Level { - NONE, - BRONZE, - SILVER, - GOLD, - DIAMOND, - DONE, + None, + Bronze, + Silver, + Gold, + Diamond, + Done, } impl Level { fn required_km(&self) -> i32 { match self { - Level::BRONZE => 40000, - Level::SILVER => 80000, - Level::GOLD => 100000, - Level::DIAMOND => 200000, - Level::DONE => 0, - Level::NONE => 0, + Level::Bronze => 40000, + Level::Silver => 80000, + Level::Gold => 100000, + Level::Diamond => 200000, + Level::Done => 0, + Level::None => 0, } } fn next_level(km: i32) -> Self { - if km < Level::BRONZE.required_km() { - Level::BRONZE - } else if km < Level::SILVER.required_km() { - Level::SILVER - } else if km < Level::GOLD.required_km() { - Level::GOLD - } else if km < Level::DIAMOND.required_km() { - Level::DIAMOND + if km < Level::Bronze.required_km() { + Level::Bronze + } else if km < Level::Silver.required_km() { + Level::Silver + } else if km < Level::Gold.required_km() { + Level::Gold + } else if km < Level::Diamond.required_km() { + Level::Diamond } else { - Level::DONE + Level::Done } } pub(crate) fn curr_level(km: i32) -> Self { - if km < Level::BRONZE.required_km() { - Level::NONE - } else if km < Level::SILVER.required_km() { - Level::BRONZE - } else if km < Level::GOLD.required_km() { - Level::SILVER - } else if km < Level::DIAMOND.required_km() { - Level::GOLD + if km < Level::Bronze.required_km() { + Level::None + } else if km < Level::Silver.required_km() { + Level::Bronze + } else if km < Level::Gold.required_km() { + Level::Silver + } else if km < Level::Diamond.required_km() { + Level::Gold } else { - Level::DIAMOND + Level::Diamond } } pub(crate) fn desc(&self) -> &str { match self { - Level::BRONZE => "Bronze", - Level::SILVER => "Silber", - Level::GOLD => "Gold", - Level::DIAMOND => "Diamant", - Level::DONE => "", - Level::NONE => "-", + Level::Bronze => "Bronze", + Level::Silver => "Silber", + Level::Gold => "Gold", + Level::Diamond => "Diamant", + Level::Done => "", + Level::None => "-", } } } diff --git a/src/model/user/mod.rs b/src/model/user/mod.rs index 6f27ea8..a72ed3b 100644 --- a/src/model/user/mod.rs +++ b/src/model/user/mod.rs @@ -395,12 +395,10 @@ ASKÖ Ruderverein Donau Linz", self.name), } } else if self.has_role(db, "Ehrenmitglied").await { fee.add("Ehrenmitglied".into(), 0); + } else if halfprice { + fee.add("Mitgliedsbeitrag (Halbpreis)".into(), REGULAR / 2); } else { - if halfprice { - fee.add("Mitgliedsbeitrag (Halbpreis)".into(), REGULAR / 2); - } else { - fee.add("Mitgliedsbeitrag".into(), REGULAR); - } + fee.add("Mitgliedsbeitrag".into(), REGULAR); } } @@ -994,39 +992,43 @@ ORDER BY last_access DESC smtp_pw: &str, ) { if self.has_role_tx(db, "scheckbuch").await { - let amount_trips = Logbook::completed_with_user_tx(db, &self).await.len(); - if amount_trips == 5 { - if let Some(mail) = &self.mail { - let _ = self.send_end_mail_scheckbuch(db, mail, smtp_pw).await; + let amount_trips = Logbook::completed_with_user_tx(db, self).await.len(); + match amount_trips { + 5 => { + if let Some(mail) = &self.mail { + let _ = self.send_end_mail_scheckbuch(db, mail, smtp_pw).await; + } + Notification::create_for_steering_people_tx( + db, + &format!( + "Liebe Steuerberechtigte, {} hat alle Ausfahrten des Scheckbuchs absolviert. Hoffentlich können wir uns bald über ein neues Mitglied freuen :-)", + self.name + ), + "Scheckbuch fertig", + None,None + ) + .await; } - Notification::create_for_steering_people_tx( - db, - &format!( - "Liebe Steuerberechtigte, {} hat alle Ausfahrten des Scheckbuchs absolviert. Hoffentlich können wir uns bald über ein neues Mitglied freuen :-)", - self.name - ), - "Scheckbuch fertig", - None,None - ) - .await; - } else if amount_trips > 5 { - let board = Role::find_by_name_tx(db, "Vorstand").await.unwrap(); - Notification::create_for_role_tx( - db, - &board, - &format!( - "Lieber Vorstand, {} hat nun bereits die {}. seiner 5 Scheckbuchausfahrten absolviert.", - self.name, amount_trips - ), - "Scheckbuch überfertig", - None,None - ) - .await; + a if a > 5 => { + let board = Role::find_by_name_tx(db, "Vorstand").await.unwrap(); + Notification::create_for_role_tx( + db, + &board, + &format!( + "Lieber Vorstand, {} hat nun bereits die {}. seiner 5 Scheckbuchausfahrten absolviert.", + self.name, amount_trips + ), + "Scheckbuch überfertig", + None,None + ) + .await; + } + _ => {} } } // check fahrtenabzeichen fertig - if rowingbadge::Status::completed_with_last_log(db, &self).await { + if rowingbadge::Status::completed_with_last_log(db, self).await { let board = Role::find_by_name_tx(db, "Vorstand").await.unwrap(); Notification::create_for_role_tx( db, diff --git a/src/tera/admin/user.rs b/src/tera/admin/user.rs index 3c7564d..8cea3d8 100644 --- a/src/tera/admin/user.rs +++ b/src/tera/admin/user.rs @@ -408,7 +408,7 @@ async fn create_scheckbuch( format!("{} created new scheckbuch: {data:?}", admin.name), ) .await; - Flash::success(Redirect::to("/admin/user/scheckbuch"), &format!("Scheckbuch erfolgreich erstellt. Eine E-Mail in der alles erklärt wird, wurde an {mail} verschickt.")) + Flash::success(Redirect::to("/admin/user/scheckbuch"), format!("Scheckbuch erfolgreich erstellt. Eine E-Mail in der alles erklärt wird, wurde an {mail} verschickt.")) } #[get("/user/move/schnupperant//to/scheckbuch")] @@ -458,7 +458,7 @@ async fn schnupper_to_scheckbuch( ), ) .await; - Flash::success(Redirect::to("/admin/schnupper"), &format!("Scheckbuch erfolgreich erstellt. Eine E-Mail in der alles erklärt wird, wurde an {} verschickt.", user.mail.unwrap())) + Flash::success(Redirect::to("/admin/schnupper"), format!("Scheckbuch erfolgreich erstellt. Eine E-Mail in der alles erklärt wird, wurde an {} verschickt.", user.mail.unwrap())) } pub fn routes() -> Vec { diff --git a/src/tera/board/achievement.rs b/src/tera/board/achievement.rs index 0ac17c3..750ab25 100644 --- a/src/tera/board/achievement.rs +++ b/src/tera/board/achievement.rs @@ -18,12 +18,12 @@ async fn index( context.insert("flash", &msg.into_inner()); } - let role = Role::find_by_name(&db, "Donau Linz").await.unwrap(); - let users = User::all_with_role(&db, &role).await; + let role = Role::find_by_name(db, "Donau Linz").await.unwrap(); + let users = User::all_with_role(db, &role).await; let mut people = Vec::new(); let mut rowingbadge_year = None; for user in users { - let achievement = Achievements::for_user(&db, &user).await; + let achievement = Achievements::for_user(db, &user).await; if let Some(badge) = &achievement.rowingbadge { rowingbadge_year = Some(badge.year); } diff --git a/src/tera/boatdamage.rs b/src/tera/boatdamage.rs index ec80954..2e345ac 100644 --- a/src/tera/boatdamage.rs +++ b/src/tera/boatdamage.rs @@ -148,13 +148,13 @@ async fn fixed<'r>( #[derive(FromForm)] pub struct FormBoatDamageVerified<'r> { - pub desc: &'r str, + desc: &'r str, } #[post("//verified", data = "")] async fn verified<'r>( db: &State, - data: Form>, + data: Form>, boatdamage_id: i32, techuser: TechUser, ) -> Flash { diff --git a/src/tera/ergo.rs b/src/tera/ergo.rs index e3c4f1f..31b3d0d 100644 --- a/src/tera/ergo.rs +++ b/src/tera/ergo.rs @@ -217,7 +217,7 @@ async fn new_thirty( eprintln!("Failed to persist file: {:?}", e); } - let result = data.result.trim_start_matches(|c| c == '0' || c == ' '); + let result = data.result.trim_start_matches(['0', ' ']); sqlx::query!( "UPDATE user SET dirty_thirty = ? where id = ?", @@ -318,7 +318,7 @@ async fn new_dozen( if let Err(e) = data.proof.move_copy_to(file_path).await { eprintln!("Failed to persist file: {:?}", e); } - let result = data.result.trim_start_matches(|c| c == '0' || c == ' '); + let result = data.result.trim_start_matches(['0', ' ']); let result = if result.contains(":") || result.contains(".") { format_time(result) } else { diff --git a/src/tera/log.rs b/src/tera/log.rs index e9f3746..ae82c3b 100644 --- a/src/tera/log.rs +++ b/src/tera/log.rs @@ -312,7 +312,7 @@ async fn update( let data = data.into_inner(); let Some(logbook) = Logbook::find_by_id(db, data.id).await else { - return Flash::error(Redirect::to("/log"), &format!("Logbucheintrag kann nicht bearbeitet werden, da es einen Logbuch-Eintrag mit ID={} nicht gibt", data.id)); + return Flash::error(Redirect::to("/log"), format!("Logbucheintrag kann nicht bearbeitet werden, da es einen Logbuch-Eintrag mit ID={} nicht gibt", data.id)); }; match logbook.update(db, data.clone(), &user.user).await { diff --git a/src/tera/misc.rs b/src/tera/misc.rs index 4d0e76e..929694e 100644 --- a/src/tera/misc.rs +++ b/src/tera/misc.rs @@ -19,7 +19,7 @@ async fn cal_registered( return Err("Invalid".into()); }; - if &user.user_token != uuid { + if user.user_token != uuid { return Err("Invalid".into()); } diff --git a/templates/board/boathouse.html.tera b/templates/board/boathouse.html.tera index 29e5665..9223dd3 100644 --- a/templates/board/boathouse.html.tera +++ b/templates/board/boathouse.html.tera @@ -4,13 +4,12 @@ {% extends "base" %} {% macro show_place(aisle_name, side_name, level) %}
  • - {% set aisle = aisle_name ~ "-aisle" %} - {% set place = boathouse[aisle][side_name] %} + {% set place = boathouse[aisle_name][side_name].boats %} {% if place[level] %} - {{ place[level].1.name }} + {{ place[level].boat.name }} {% if "admin" in loggedin_user.roles %} X + href="/board/boathouse/{{ place[level].boathouse_id }}/delete">X {% endif %} {% elif boats | length > 0 %} {% if "admin" in loggedin_user.roles %} -- 2.47.1 From a90c4fc07e3f15e527fd132efd055d03505e2353 Mon Sep 17 00:00:00 2001 From: Philipp Hofer Date: Thu, 9 Jan 2025 15:35:57 +0100 Subject: [PATCH 19/24] ped clippy --- src/model/personal/equatorprice.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/model/personal/equatorprice.rs b/src/model/personal/equatorprice.rs index 6190163..2568987 100644 --- a/src/model/personal/equatorprice.rs +++ b/src/model/personal/equatorprice.rs @@ -14,10 +14,10 @@ pub(crate) enum Level { impl Level { fn required_km(&self) -> i32 { match self { - Level::Bronze => 40000, - Level::Silver => 80000, - Level::Gold => 100000, - Level::Diamond => 200000, + Level::Bronze => 40_000, + Level::Silver => 80_000, + Level::Gold => 100_000, + Level::Diamond => 200_000, Level::Done => 0, Level::None => 0, } -- 2.47.1 From 0dfceec737ad70f94a8afe87f989e5dbb0df60a5 Mon Sep 17 00:00:00 2001 From: Philipp Hofer Date: Thu, 9 Jan 2025 16:22:08 +0100 Subject: [PATCH 20/24] update deps --- Cargo.lock | 981 ++++++++++++++++++++++++++++++++++------------------- Cargo.toml | 4 +- 2 files changed, 636 insertions(+), 349 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 719a171..23ea94a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,22 +1,16 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "addr2line" -version = "0.22.0" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" dependencies = [ "gimli", ] -[[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - [[package]] name = "adler2" version = "2.0.0" @@ -82,9 +76,9 @@ dependencies = [ [[package]] name = "allocator-api2" -version = "0.2.18" +version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" +checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" [[package]] name = "android-tzdata" @@ -103,9 +97,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.15" +version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" +checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b" dependencies = [ "anstyle", "anstyle-parse", @@ -118,36 +112,36 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.8" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" +checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" [[package]] name = "anstyle-parse" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" +checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" +checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.4" +version = "3.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" +checksum = "2109dbce0e72be3ec00bed26e6a7479ca384ad226efdd66db8fa2e3a38c83125" dependencies = [ "anstyle", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -164,9 +158,9 @@ dependencies = [ [[package]] name = "async-stream" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" +checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476" dependencies = [ "async-stream-impl", "futures-core", @@ -175,24 +169,24 @@ dependencies = [ [[package]] name = "async-stream-impl" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" +checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.95", ] [[package]] name = "async-trait" -version = "0.1.82" +version = "0.1.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a27b8a3a6e1a44fa4c8baf1f653e4172e81486d4941f2237e20dc2d0cf4ddff1" +checksum = "3f934833b4b7233644e5848f235df3f57ed8c80f1528a26c3dfa13d2147fa056" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.95", ] [[package]] @@ -221,23 +215,23 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "backtrace" -version = "0.3.73" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" dependencies = [ "addr2line", - "cc", "cfg-if", "libc", - "miniz_oxide 0.7.4", + "miniz_oxide", "object", "rustc-demangle", + "windows-targets 0.52.6", ] [[package]] @@ -299,9 +293,9 @@ dependencies = [ [[package]] name = "bstr" -version = "1.10.0" +version = "1.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40723b8fb387abc38f4f4a37c09073622e41dd12327033091ef8950659e6dc0c" +checksum = "531a9155a481e2ee699d4f98f43c0ca4ff8ee1bfd55c31e9e98fb29d2b176fe0" dependencies = [ "memchr", "serde", @@ -315,9 +309,9 @@ checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "bytemuck" -version = "1.17.1" +version = "1.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773d90827bc3feecfb67fab12e24de0749aad83c74b9504ecde46237b5cd24e2" +checksum = "ef657dfab802224e671f5818e9a4935f9b1957ed18e58292690cc39e7a4092a3" [[package]] name = "byteorder" @@ -327,15 +321,15 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.7.1" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" +checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b" [[package]] name = "cc" -version = "1.1.15" +version = "1.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57b6a275aa2903740dc87da01c62040406b8812552e97129a63ea8850a17c6e6" +checksum = "a012a0df96dd6d06ba9a1b29d6402d1a5d77c6befd2566afdc26e10603dc93d7" dependencies = [ "shlex", ] @@ -348,9 +342,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.38" +version = "0.4.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" +checksum = "7e36cc9d416881d2e24f9a963be5fb1cd90966419ac844274161d10488b3e825" dependencies = [ "android-tzdata", "iana-time-zone", @@ -369,7 +363,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93698b29de5e97ad0ae26447b344c482a7284c737d9ddc5f9e52b74a336671bb" dependencies = [ "chrono", - "chrono-tz-build", + "chrono-tz-build 0.3.0", + "phf", +] + +[[package]] +name = "chrono-tz" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd6dd8046d00723a59a2f8c5f295c515b9bb9a331ee4f8f3d4dd49e428acd3b6" +dependencies = [ + "chrono", + "chrono-tz-build 0.4.0", "phf", ] @@ -384,13 +389,23 @@ dependencies = [ "phf_codegen", ] +[[package]] +name = "chrono-tz-build" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e94fea34d77a245229e7746bd2beb786cd2a896f306ff491fb8cecb3074b10a7" +dependencies = [ + "parse-zoneinfo", + "phf_codegen", +] + [[package]] name = "chumsky" version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8eebd66744a15ded14960ab4ccdbfb51ad3b81f51f3f04a80adac98c985396c9" dependencies = [ - "hashbrown", + "hashbrown 0.14.5", "stacker", ] @@ -406,9 +421,9 @@ dependencies = [ [[package]] name = "colorchoice" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" +checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" [[package]] name = "const-oid" @@ -451,9 +466,9 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" -version = "0.2.13" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51e852e6dc9a5bed1fae92dd2375037bf2b768725bf3be87811edee3249d09ad" +checksum = "16b80225097f2e5ae4e7179dd2266824648f3e2f49d9134d584b76389d31c4c3" dependencies = [ "libc", ] @@ -495,18 +510,18 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.13" +version = "0.5.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2" +checksum = "06ba6d68e24814cb8de6bb986db8222d3a027d15872cabc0d18817bc3c0e4471" dependencies = [ "crossbeam-utils", ] [[package]] name = "crossbeam-deque" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" +checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" dependencies = [ "crossbeam-epoch", "crossbeam-utils", @@ -523,18 +538,18 @@ dependencies = [ [[package]] name = "crossbeam-queue" -version = "0.3.11" +version = "0.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df0346b5d5e76ac2fe4e327c5fd1118d6be7c51dfb18f9b7922923f287471e35" +checksum = "0f58bbc28f91df819d0aa2a2c00cd19754769c2fad90579b3592b1c9ba7a3115" dependencies = [ "crossbeam-utils", ] [[package]] name = "crossbeam-utils" -version = "0.8.20" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" [[package]] name = "crypto-common" @@ -549,9 +564,9 @@ dependencies = [ [[package]] name = "csv" -version = "1.3.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac574ff4d437a7b5ad237ef331c17ccca63c46479e5b5453eb8e10bb99a759fe" +checksum = "acdc4883a9c96732e4733212c01447ebd805833b7275a73ca3ee080fd77afdaf" dependencies = [ "csv-core", "itoa", @@ -633,7 +648,7 @@ dependencies = [ "proc-macro2", "proc-macro2-diagnostics", "quote", - "syn 2.0.77", + "syn 2.0.95", ] [[package]] @@ -648,6 +663,17 @@ dependencies = [ "subtle", ] +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", +] + [[package]] name = "dotenvy" version = "0.15.7" @@ -665,9 +691,9 @@ dependencies = [ [[package]] name = "email-encoding" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60d1d33cdaede7e24091f039632eb5d3c7469fe5b066a985281a34fc70fa317f" +checksum = "ea3d894bbbab314476b265f9b2d46bf24b123a36dd0e96b06a1b49545b9d9dcc" dependencies = [ "base64 0.22.1", "memchr", @@ -681,18 +707,18 @@ checksum = "e079f19b08ca6239f47f8ba8509c11cf3ea30095831f7fed61441475edd8c449" [[package]] name = "encoding_rs" -version = "0.8.34" +version = "0.8.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" dependencies = [ "cfg-if", ] [[package]] name = "env_filter" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f2c92ceda6ceec50f43169f9ee8424fe2db276791afde7b2cd8bc084cb376ab" +checksum = "186e05a59d4c50738528153b83b0b0194d3a29507dfec16eccd4b342903397d0" dependencies = [ "log", "regex", @@ -700,9 +726,9 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.11.5" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13fa619b91fb2381732789fc5de83b45675e882f66623b7d8cb4f643017018d" +checksum = "dcaee3d8e3cfc3fd92428d477bc97fc29ec8716d180c0d74c643bb26166660e0" dependencies = [ "anstream", "anstyle", @@ -719,12 +745,12 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.9" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -746,9 +772,9 @@ checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] name = "fastrand" -version = "2.1.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" [[package]] name = "figment" @@ -778,19 +804,19 @@ dependencies = [ [[package]] name = "flate2" -version = "1.0.33" +version = "1.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "324a1be68054ef05ad64b861cc9eaf1d623d2d8cb25b4bf2cb9cdd902b4bf253" +checksum = "c936bfdafb507ebbf50b8074c54fa31c5be9a1e7e5f467dd659697041407d07c" dependencies = [ "crc32fast", - "miniz_oxide 0.8.0", + "miniz_oxide", ] [[package]] name = "flume" -version = "0.11.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55ac459de2512911e4b674ce33cf20befaba382d05b62b008afc1c8b57cbf181" +checksum = "da0e4dd2a88388a1f4ccc7c9ce104604dab68d9f408dc34cd45823d5a9069095" dependencies = [ "futures-core", "futures-sink", @@ -838,9 +864,9 @@ dependencies = [ [[package]] name = "futures" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" dependencies = [ "futures-channel", "futures-core", @@ -853,9 +879,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", "futures-sink", @@ -863,15 +889,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-executor" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" dependencies = [ "futures-core", "futures-task", @@ -891,38 +917,38 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-macro" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.95", ] [[package]] name = "futures-sink" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" [[package]] name = "futures-task" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-util" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-channel", "futures-core", @@ -982,27 +1008,27 @@ dependencies = [ [[package]] name = "gimli" -version = "0.29.0" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "glob" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" +checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" [[package]] name = "globset" -version = "0.4.14" +version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57da3b9b5b85bd66f31093f8c408b90a74431672542466497dcbdfdc02034be1" +checksum = "15f1ce686646e7f1e19bf7d5533fe443a45dbfb990e00629110797578b42fb19" dependencies = [ "aho-corasick", "bstr", "log", - "regex-automata 0.4.7", - "regex-syntax 0.8.4", + "regex-automata 0.4.9", + "regex-syntax 0.8.5", ] [[package]] @@ -1045,13 +1071,19 @@ dependencies = [ "allocator-api2", ] +[[package]] +name = "hashbrown" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" + [[package]] name = "hashlink" version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" dependencies = [ - "hashbrown", + "hashbrown 0.14.5", ] [[package]] @@ -1101,11 +1133,11 @@ dependencies = [ [[package]] name = "home" -version = "0.5.9" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" +checksum = "589533453244b0995c858700322199b2becb13b627df2851f64a2775d024abcf" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -1132,9 +1164,9 @@ dependencies = [ [[package]] name = "http" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" +checksum = "f16ca2af56261c99fba8bac40a10251ce8188205a4c448fbb745a2e4daa76fea" dependencies = [ "bytes", "fnv", @@ -1154,9 +1186,9 @@ dependencies = [ [[package]] name = "httparse" -version = "1.9.4" +version = "1.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" +checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" [[package]] name = "httpdate" @@ -1181,9 +1213,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.30" +version = "0.14.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" +checksum = "41dfc780fdec9373c01bae43289ea34c972e40ee3c9f6b3c8801a35f35586ce7" dependencies = [ "bytes", "futures-channel", @@ -1205,9 +1237,9 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.60" +version = "0.1.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" +checksum = "235e081f3925a06703c2d0117ea8b91f042756fd6e7a6e5d901e8ca1a996b220" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -1233,26 +1265,155 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3ebec52f461ade2d19e7b594ecbcd0723ba0ab0eefa8aae2281b78ff461a91fa" [[package]] -name = "idna" -version = "0.5.0" +name = "icu_collections" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "displaydoc", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locid" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_locid_transform" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_locid_transform_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" + +[[package]] +name = "icu_normalizer" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" + +[[package]] +name = "icu_properties" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" + +[[package]] +name = "icu_provider" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_provider_macros" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", +] + +[[package]] +name = "idna" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" +dependencies = [ + "icu_normalizer", + "icu_properties", ] [[package]] name = "ignore" -version = "0.4.22" +version = "0.4.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b46810df39e66e925525d6e38ce1e7f6e1d208f72dc39757880fcb66e2c58af1" +checksum = "6d89fd380afde86567dfba715db065673989d6253f42b88179abd3eae47bda4b" dependencies = [ "crossbeam-deque", "globset", "log", "memchr", - "regex-automata 0.4.7", + "regex-automata 0.4.9", "same-file", "walkdir", "winapi-util", @@ -1260,12 +1421,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.5.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b900aa2f7301e21c36462b170ee99994de34dff39a4a6a528e80e7376d07e5" +checksum = "62f822373a4fe84d4bb149bf54e584a7f4abec90e072ed49cda0edea5b95471f" dependencies = [ "equivalent", - "hashbrown", + "hashbrown 0.15.2", "serde", ] @@ -1323,18 +1484,18 @@ checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" [[package]] name = "itertools" -version = "0.13.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" dependencies = [ "either", ] [[package]] name = "itoa" -version = "1.0.11" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" [[package]] name = "job_scheduler_ng" @@ -1349,10 +1510,11 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.70" +version = "0.3.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" +checksum = "6717b6b5b077764fb5966237269cb3c64edddde4b14ce42647430a78ced9e7b7" dependencies = [ + "once_cell", "wasm-bindgen", ] @@ -1387,9 +1549,9 @@ dependencies = [ [[package]] name = "lettre" -version = "0.11.7" +version = "0.11.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a62049a808f1c4e2356a2a380bd5f2aca3b011b0b482cf3b914ba1731426969" +checksum = "ab4c9a167ff73df98a5ecc07e8bf5ce90b583665da3d1762eb1f775ad4d0d6f5" dependencies = [ "base64 0.22.1", "chumsky", @@ -1412,15 +1574,15 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.158" +version = "0.2.169" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" +checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" [[package]] name = "libm" -version = "0.2.8" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" +checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa" [[package]] name = "libredox" @@ -1430,7 +1592,7 @@ checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ "bitflags 2.6.0", "libc", - "redox_syscall 0.5.3", + "redox_syscall", ] [[package]] @@ -1446,9 +1608,15 @@ dependencies = [ [[package]] name = "linux-raw-sys" -version = "0.4.14" +version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" +checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" + +[[package]] +name = "litemap" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104" [[package]] name = "lock_api" @@ -1520,18 +1688,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.4" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" -dependencies = [ - "adler", -] - -[[package]] -name = "miniz_oxide" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" +checksum = "4ffbe83022cedc1d264172192511ae958937694cd57ce297164951b8b3568394" dependencies = [ "adler2", ] @@ -1550,11 +1709,10 @@ dependencies = [ [[package]] name = "mio" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" +checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" dependencies = [ - "hermit-abi 0.3.9", "libc", "wasi", "windows-sys 0.52.0", @@ -1569,7 +1727,7 @@ dependencies = [ "bytes", "encoding_rs", "futures-util", - "http 1.1.0", + "http 1.2.0", "httparse", "memchr", "mime", @@ -1709,18 +1867,18 @@ dependencies = [ [[package]] name = "object" -version = "0.36.4" +version = "0.36.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "084f1a5821ac4c651660a94a7153d27ac9d8a53736203f58b31945ded098070a" +checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.19.0" +version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] name = "opaque-debug" @@ -1730,9 +1888,9 @@ checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] name = "openssl" -version = "0.10.66" +version = "0.10.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" +checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5" dependencies = [ "bitflags 2.6.0", "cfg-if", @@ -1751,7 +1909,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.95", ] [[package]] @@ -1762,18 +1920,18 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-src" -version = "300.3.1+3.3.1" +version = "300.4.1+3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7259953d42a81bf137fbbd73bd30a8e1914d6dce43c2b90ed575783a22608b91" +checksum = "faa4eac4138c62414b5622d1b31c5c304f34b406b013c079c2bbc652fdd6678c" dependencies = [ "cc", ] [[package]] name = "openssl-sys" -version = "0.9.103" +version = "0.9.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f9e8deee91df40a943c71b917e5874b951d32a802526c85721ce3b776c929d6" +checksum = "45abf306cbf99debc8195b66b7346498d7b10c210de50418b5ccd7ceba08c741" dependencies = [ "cc", "libc", @@ -1806,7 +1964,7 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.5.3", + "redox_syscall", "smallvec", "windows-targets 0.52.6", ] @@ -1857,7 +2015,7 @@ dependencies = [ "proc-macro2", "proc-macro2-diagnostics", "quote", - "syn 2.0.77", + "syn 2.0.95", ] [[package]] @@ -1877,20 +2035,20 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pest" -version = "2.7.11" +version = "2.7.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd53dff83f26735fdc1ca837098ccf133605d794cdae66acfc2bfac3ec809d95" +checksum = "8b7cafe60d6cf8e62e1b9b2ea516a089c008945bb5a275416789e7db0bc199dc" dependencies = [ "memchr", - "thiserror", + "thiserror 2.0.10", "ucd-trie", ] [[package]] name = "pest_derive" -version = "2.7.11" +version = "2.7.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a548d2beca6773b1c244554d36fcf8548a8a58e74156968211567250e48e49a" +checksum = "816518421cfc6887a0d62bf441b6ffb4536fcc926395a69e1a85852d4363f57e" dependencies = [ "pest", "pest_generator", @@ -1898,22 +2056,22 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.7.11" +version = "2.7.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c93a82e8d145725dcbaf44e5ea887c8a869efdcc28706df2d08c69e17077183" +checksum = "7d1396fd3a870fc7838768d171b4616d5c91f6cc25e377b673d714567d99377b" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.95", ] [[package]] name = "pest_meta" -version = "2.7.11" +version = "2.7.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a941429fea7e08bedec25e4f6785b6ffaacc6b755da98df5ef3e7dcf4a124c4f" +checksum = "e1e58089ea25d717bfd31fb534e4f3afcc2cc569c70de3e239778991ea3b7dea" dependencies = [ "once_cell", "pest", @@ -1922,18 +2080,18 @@ dependencies = [ [[package]] name = "phf" -version = "0.11.2" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" +checksum = "1fd6780a80ae0c52cc120a26a1a42c1ae51b247a253e4e06113d23d2c2edd078" dependencies = [ "phf_shared", ] [[package]] name = "phf_codegen" -version = "0.11.2" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8d39688d359e6b34654d328e262234662d16cc0f60ec8dcbe5e718709342a5a" +checksum = "aef8048c789fa5e851558d709946d6d79a8ff88c0440c587967f8e94bfb1216a" dependencies = [ "phf_generator", "phf_shared", @@ -1941,9 +2099,9 @@ dependencies = [ [[package]] name = "phf_generator" -version = "0.11.2" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" +checksum = "3c80231409c20246a13fddb31776fb942c38553c51e871f8cbd687a4cfb5843d" dependencies = [ "phf_shared", "rand", @@ -1951,18 +2109,18 @@ dependencies = [ [[package]] name = "phf_shared" -version = "0.11.2" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" +checksum = "67eabc2ef2a60eb7faa00097bd1ffdb5bd28e62bf39990626a582201b7a754e5" dependencies = [ "siphasher", ] [[package]] name = "pin-project-lite" -version = "0.2.14" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" [[package]] name = "pin-utils" @@ -1993,9 +2151,9 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" +checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" [[package]] name = "polyval" @@ -2026,9 +2184,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" dependencies = [ "unicode-ident", ] @@ -2041,16 +2199,16 @@ checksum = "af066a9c399a26e020ada66a034357a868728e72cd426f3adcd35f80d88d88c8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.95", "version_check", "yansi", ] [[package]] name = "psm" -version = "0.1.22" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b1f9bf148c15500d44581654fb9260bc9d82970f3ef777a79a40534f6aa784f" +checksum = "200b9ff220857e53e184257720a14553b2f4aa02577d2ed9842d45d4b9654810" dependencies = [ "cc", ] @@ -2063,9 +2221,9 @@ checksum = "1190fd18ae6ce9e137184f207593877e70f39b015040156b1e05081cdfe3733a" [[package]] name = "quote" -version = "1.0.37" +version = "1.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" +checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc" dependencies = [ "proc-macro2", ] @@ -2108,18 +2266,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.4.1" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" -dependencies = [ - "bitflags 1.3.2", -] - -[[package]] -name = "redox_syscall" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" +checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834" dependencies = [ "bitflags 2.6.0", ] @@ -2141,19 +2290,19 @@ checksum = "bcc303e793d3734489387d205e9b186fac9c6cfacedd98cbb2e8a5943595f3e6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.95", ] [[package]] name = "regex" -version = "1.10.6" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.4.7", - "regex-syntax 0.8.4", + "regex-automata 0.4.9", + "regex-syntax 0.8.5", ] [[package]] @@ -2167,13 +2316,13 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.7" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.4", + "regex-syntax 0.8.5", ] [[package]] @@ -2184,9 +2333,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "ring" @@ -2252,7 +2401,7 @@ dependencies = [ "proc-macro2", "quote", "rocket_http", - "syn 2.0.77", + "syn 2.0.95", "unicode-xid", "version_check", ] @@ -2303,7 +2452,7 @@ version = "0.1.0" dependencies = [ "argon2", "chrono", - "chrono-tz", + "chrono-tz 0.10.0", "csv", "env_logger", "futures", @@ -2326,9 +2475,9 @@ dependencies = [ [[package]] name = "rsa" -version = "0.9.6" +version = "0.9.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d0e5124fcb30e76a7e79bfee683a2746db83784b86289f6251b54b7950a0dfc" +checksum = "47c75d7c5c6b673e58bf54d8544a9f432e3a925b0e80f7cd3602ab5c50c55519" dependencies = [ "const-oid", "digest", @@ -2352,15 +2501,15 @@ checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustix" -version = "0.38.35" +version = "0.38.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a85d50532239da68e9addb745ba38ff4612a242c1c7ceea689c4bc7c2f43c36f" +checksum = "a78891ee6bf2340288408954ac787aa063d8e8817e9f53abb37c695c6d834ef6" dependencies = [ "bitflags 2.6.0", "errno", "libc", "linux-raw-sys", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -2376,15 +2525,15 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.12" +version = "0.23.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c58f8c84392efc0a126acce10fa59ff7b3d2ac06ab451a33f2741989b806b044" +checksum = "5065c3f250cbd332cd894be57c40fa52387247659b14a2d6041d121547903b1b" dependencies = [ "log", "once_cell", "ring", "rustls-pki-types", - "rustls-webpki 0.102.7", + "rustls-webpki 0.102.8", "subtle", "zeroize", ] @@ -2400,9 +2549,9 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.8.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc0a2ce646f8655401bb81e7927b812614bd5d91dbc968696be50603510fcaf0" +checksum = "d2bf47e6ff922db3825eb750c4e2ff784c6ff8fb9e13046ef6a1d1c5401b0b37" [[package]] name = "rustls-webpki" @@ -2416,9 +2565,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.102.7" +version = "0.102.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84678086bd54edf2b415183ed7a94d0efb049f1b646a33e22a36f3794be6ae56" +checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" dependencies = [ "ring", "rustls-pki-types", @@ -2427,9 +2576,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.17" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" +checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4" [[package]] name = "ryu" @@ -2448,11 +2597,11 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.23" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" +checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -2492,9 +2641,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.11.1" +version = "2.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" +checksum = "49db231d56a190491cb4aeda9527f1ad45345af50b0851622a7adb8c03b01c32" dependencies = [ "core-foundation-sys", "libc", @@ -2502,29 +2651,29 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.209" +version = "1.0.217" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99fce0ffe7310761ca6bf9faf5115afbc19688edd00171d81b1bb1b116c63e09" +checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.209" +version = "1.0.217" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170" +checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.95", ] [[package]] name = "serde_json" -version = "1.0.127" +version = "1.0.135" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8043c06d9f82bd7271361ed64f415fe5e12a77fdb52e573e7f06a516dea329ad" +checksum = "2b0d7ba2887406110130a978386c4e1befb98c674b4fba677954e4db976630d9" dependencies = [ "itoa", "memchr", @@ -2534,9 +2683,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.7" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" +checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" dependencies = [ "serde", ] @@ -2599,9 +2748,9 @@ dependencies = [ [[package]] name = "siphasher" -version = "0.3.11" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" +checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d" [[package]] name = "slab" @@ -2630,9 +2779,9 @@ checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "socket2" -version = "0.5.7" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" +checksum = "c970269d99b64e60ec3bd6ad27270092a5394c4e309314b18ae3fe575695fbe8" dependencies = [ "libc", "windows-sys 0.52.0", @@ -2659,9 +2808,9 @@ dependencies = [ [[package]] name = "sqlformat" -version = "0.2.4" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f895e3734318cc55f1fe66258926c9b910c124d47520339efecbb6c59cec7c1f" +checksum = "7bba3a93db0cc4f7bdece8bb09e77e2e785c20bfebf79eb8340ed80708048790" dependencies = [ "nom", "unicode_categories", @@ -2715,7 +2864,7 @@ dependencies = [ "sha2", "smallvec", "sqlformat", - "thiserror", + "thiserror 1.0.69", "time", "tokio", "tokio-stream", @@ -2801,7 +2950,7 @@ dependencies = [ "smallvec", "sqlx-core", "stringprep", - "thiserror", + "thiserror 1.0.69", "time", "tracing", "whoami", @@ -2841,7 +2990,7 @@ dependencies = [ "smallvec", "sqlx-core", "stringprep", - "thiserror", + "thiserror 1.0.69", "time", "tracing", "whoami", @@ -2881,6 +3030,12 @@ dependencies = [ "memchr", ] +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + [[package]] name = "stacker" version = "0.1.17" @@ -2933,9 +3088,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.77" +version = "2.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" +checksum = "46f71c0377baf4ef1cc3e3402ded576dccc315800fbc62dfc7fe04b009773b4a" dependencies = [ "proc-macro2", "quote", @@ -2943,13 +3098,25 @@ dependencies = [ ] [[package]] -name = "tempfile" -version = "3.12.0" +name = "synstructure" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", +] + +[[package]] +name = "tempfile" +version = "3.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a8a559c81686f576e8cd0290cd2a24a2a9ad80c98b3478856500fcbd7acd704" dependencies = [ "cfg-if", "fastrand", + "getrandom", "once_cell", "rustix", "windows-sys 0.59.0", @@ -2962,7 +3129,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab9d851b45e865f178319da0abdbfe6acbc4328759ff18dafc3a41c16b4cd2ee" dependencies = [ "chrono", - "chrono-tz", + "chrono-tz 0.9.0", "globwalk", "humansize", "lazy_static", @@ -2979,22 +3146,42 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.63" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" dependencies = [ - "thiserror-impl", + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3ac7f54ca534db81081ef1c1e7f6ea8a3ef428d2fc069097c079443d24124d3" +dependencies = [ + "thiserror-impl 2.0.10", ] [[package]] name = "thiserror-impl" -version = "1.0.63" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.95", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e9465d30713b56a37ede7185763c3492a91be2f5fa68d958c44e41ab9248beb" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", ] [[package]] @@ -3009,9 +3196,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.36" +version = "0.3.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" +checksum = "35e7868883861bd0e56d9ac6efcaaca0d6d5d82a2a7ec8209ff492c07cf37b21" dependencies = [ "deranged", "itoa", @@ -3030,19 +3217,29 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" [[package]] name = "time-macros" -version = "0.2.18" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" +checksum = "2834e6017e3e5e4b9834939793b282bc03b37a3336245fa820e35e233e2a85de" dependencies = [ "num-conv", "time-core", ] [[package]] -name = "tinyvec" -version = "1.8.0" +name = "tinystr" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +dependencies = [ + "displaydoc", + "zerovec", +] + +[[package]] +name = "tinyvec" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "022db8904dfa342efe721985167e9fcd16c29b226db4397ed752a761cfce81e8" dependencies = [ "tinyvec_macros", ] @@ -3055,14 +3252,14 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.40.0" +version = "1.43.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" +checksum = "3d61fa4ffa3de412bfea335c6ecff681de2b609ba3c77ef3e00e521813a9ed9e" dependencies = [ "backtrace", "bytes", "libc", - "mio 1.0.2", + "mio 1.0.3", "pin-project-lite", "signal-hook-registry", "socket2", @@ -3072,20 +3269,20 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" +checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.95", ] [[package]] name = "tokio-stream" -version = "0.1.15" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" +checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047" dependencies = [ "futures-core", "pin-project-lite", @@ -3094,9 +3291,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.11" +version = "0.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" +checksum = "d7fcaa8d55a2bdd6b83ace262b016eca0d79ee02818c5c1bcdf0305114081078" dependencies = [ "bytes", "futures-core", @@ -3128,9 +3325,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.20" +version = "0.22.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" +checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" dependencies = [ "indexmap", "serde", @@ -3147,9 +3344,9 @@ checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" -version = "0.1.40" +version = "0.1.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" dependencies = [ "log", "pin-project-lite", @@ -3159,20 +3356,20 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.27" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.95", ] [[package]] name = "tracing-core" -version = "0.1.32" +version = "0.1.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" dependencies = [ "once_cell", "valuable", @@ -3191,9 +3388,9 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.18" +version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" +checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" dependencies = [ "matchers", "nu-ansi-term", @@ -3230,9 +3427,9 @@ dependencies = [ [[package]] name = "ucd-trie" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" +checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" [[package]] name = "uncased" @@ -3296,42 +3493,42 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.15" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" +checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5" [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" [[package]] name = "unicode-normalization" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" +checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" dependencies = [ "tinyvec", ] [[package]] name = "unicode-properties" -version = "0.1.2" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52ea75f83c0137a9b98608359a5f1af8144876eb67bcb1ce837368e906a9f524" +checksum = "e70f2a8b45122e719eb623c01822704c4e0907e7e426a05927e1a1cfff5b75d0" [[package]] name = "unicode-segmentation" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" [[package]] name = "unicode-xid" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "229730647fbc343e3a80e463c1db7f78f3855d3f3739bee0dda773c9a037c90a" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" [[package]] name = "unicode_categories" @@ -3357,27 +3554,27 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "ureq" -version = "2.10.1" +version = "2.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b74fc6b57825be3373f7054754755f03ac3a8f5d70015ccad699ba2029956f4a" +checksum = "02d1a66277ed75f640d608235660df48c8e3c19f3b4edb6a263315626cc3c01d" dependencies = [ "base64 0.22.1", "flate2", "log", "once_cell", - "rustls 0.23.12", + "rustls 0.23.20", "rustls-pki-types", "serde", "serde_json", "url", - "webpki-roots 0.26.5", + "webpki-roots 0.26.7", ] [[package]] name = "url" -version = "2.5.2" +version = "2.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" +checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" dependencies = [ "form_urlencoded", "idna", @@ -3390,6 +3587,18 @@ version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" +[[package]] +name = "utf16_iter" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + [[package]] name = "utf8parse" version = "0.2.2" @@ -3398,9 +3607,9 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" +checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" dependencies = [ "getrandom", ] @@ -3456,9 +3665,9 @@ checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b" [[package]] name = "wasm-bindgen" -version = "0.2.93" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" +checksum = "a474f6281d1d70c17ae7aa6a613c87fce69a127e2624002df63dcb39d6cf6396" dependencies = [ "cfg-if", "once_cell", @@ -3467,24 +3676,23 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.93" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" +checksum = "5f89bb38646b4f81674e8f5c3fb81b562be1fd936d84320f3264486418519c79" dependencies = [ "bumpalo", "log", - "once_cell", "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.95", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.93" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" +checksum = "2cc6181fd9a7492eef6fef1f33961e3695e4579b9872a6f7c83aee556666d4fe" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3492,22 +3700,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.93" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" +checksum = "30d7a95b763d3c45903ed6c81f156801839e5ee968bb07e534c44df0fcd330c2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.95", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.93" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" +checksum = "943aab3fdaaa029a6e0271b35ea10b72b943135afe9bffca82384098ad0e06a6" [[package]] name = "webpki-roots" @@ -3517,20 +3725,20 @@ checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" [[package]] name = "webpki-roots" -version = "0.26.5" +version = "0.26.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bd24728e5af82c6c4ec1b66ac4844bdf8156257fccda846ec58b42cd0cdbe6a" +checksum = "5d642ff16b7e79272ae451b7322067cdc17cadf68c23264be9d94a32319efe7e" dependencies = [ "rustls-pki-types", ] [[package]] name = "whoami" -version = "1.5.1" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44ab49fad634e88f55bf8f9bb3abd2f27d7204172a112c7c9987e01c1c94ea9" +checksum = "372d5b87f58ec45c384ba03563b03544dc5fadc3983e434b286913f5b4a9bb6d" dependencies = [ - "redox_syscall 0.4.1", + "redox_syscall", "wasite", ] @@ -3743,13 +3951,25 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.6.18" +version = "0.6.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f" +checksum = "39281189af81c07ec09db316b302a3e67bf9bd7cbf6c820b50e35fee9c2fa980" dependencies = [ "memchr", ] +[[package]] +name = "write16" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" + +[[package]] +name = "writeable" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" + [[package]] name = "yansi" version = "1.0.1" @@ -3759,6 +3979,30 @@ dependencies = [ "is-terminal", ] +[[package]] +name = "yoke" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", + "synstructure", +] + [[package]] name = "zerocopy" version = "0.7.35" @@ -3777,7 +4021,28 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.77", + "syn 2.0.95", +] + +[[package]] +name = "zerofrom" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", + "synstructure", ] [[package]] @@ -3785,3 +4050,25 @@ name = "zeroize" version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" + +[[package]] +name = "zerovec" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.95", +] diff --git a/Cargo.toml b/Cargo.toml index d75e236..6ada6b1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,13 +18,13 @@ argon2 = "0.5" serde = { version = "1.0", features = [ "derive" ]} serde_json = "1.0" chrono = { version = "0.4", features = ["serde"]} -chrono-tz = "0.9" +chrono-tz = "0.10" tera = { version = "1.18", features = ["date-locale"], optional = true} ics = "0.5" futures = "0.3" lettre = "0.11" csv = "1.3" -itertools = "0.13" +itertools = "0.14" job_scheduler_ng = "2.0" ureq = { version = "2.9", features = ["json"] } regex = "1.10" -- 2.47.1 From f9c9f7c523739ac5d9e2dcd0f3b36f3612471ef5 Mon Sep 17 00:00:00 2001 From: Philipp Hofer Date: Thu, 9 Jan 2025 16:31:53 +0100 Subject: [PATCH 21/24] update to sqlx 0.8 --- Cargo.lock | 301 ++++++++++++++++-------------------------- Cargo.toml | 2 +- src/lib.rs | 20 +-- src/model/event.rs | 4 +- src/model/family.rs | 2 +- src/model/user/fee.rs | 6 +- src/model/user/mod.rs | 6 +- 7 files changed, 135 insertions(+), 206 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 23ea94a..58a4b80 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -59,7 +59,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", - "getrandom", "once_cell", "version_check", "zerocopy", @@ -175,7 +174,7 @@ checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.95", + "syn", ] [[package]] @@ -186,7 +185,7 @@ checksum = "3f934833b4b7233644e5848f235df3f57ed8c80f1528a26c3dfa13d2147fa056" dependencies = [ "proc-macro2", "quote", - "syn 2.0.95", + "syn", ] [[package]] @@ -234,12 +233,6 @@ dependencies = [ "windows-targets 0.52.6", ] -[[package]] -name = "base64" -version = "0.21.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" - [[package]] name = "base64" version = "0.22.1" @@ -425,6 +418,15 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" +[[package]] +name = "concurrent-queue" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" +dependencies = [ + "crossbeam-utils", +] + [[package]] name = "const-oid" version = "0.9.6" @@ -438,7 +440,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ddef33a339a91ea89fb53151bd0a4689cfce27055c291dfa69945475d22c747" dependencies = [ "aes-gcm", - "base64 0.22.1", + "base64", "hkdf", "percent-encoding", "rand", @@ -648,7 +650,7 @@ dependencies = [ "proc-macro2", "proc-macro2-diagnostics", "quote", - "syn 2.0.95", + "syn", ] [[package]] @@ -671,7 +673,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.95", + "syn", ] [[package]] @@ -695,7 +697,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea3d894bbbab314476b265f9b2d46bf24b123a36dd0e96b06a1b49545b9d9dcc" dependencies = [ - "base64 0.22.1", + "base64", "memchr", ] @@ -766,9 +768,14 @@ dependencies = [ [[package]] name = "event-listener" -version = "2.5.3" +version = "5.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" +checksum = "3492acde4c3fc54c845eaab3eed8bd00c7a7d881f78bfc801e43a93dec1331ae" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite", +] [[package]] name = "fastrand" @@ -829,6 +836,12 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "foldhash" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0d2fde1f7b3d48b8395d5f2de76c18a528bd6a9cdde438df747bfcba3e05d6f" + [[package]] name = "foreign-types" version = "0.3.2" @@ -929,7 +942,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.95", + "syn", ] [[package]] @@ -1076,24 +1089,26 @@ name = "hashbrown" version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" +dependencies = [ + "allocator-api2", + "equivalent", + "foldhash", +] [[package]] name = "hashlink" -version = "0.8.4" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" +checksum = "7382cf6263419f2d8df38c55d7da83da5c18aef87fc7a7fc1fb1e344edfe14c1" dependencies = [ - "hashbrown 0.14.5", + "hashbrown 0.15.2", ] [[package]] name = "heck" -version = "0.4.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" -dependencies = [ - "unicode-segmentation", -] +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "hermit-abi" @@ -1379,7 +1394,7 @@ checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.95", + "syn", ] [[package]] @@ -1553,7 +1568,7 @@ version = "0.11.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab4c9a167ff73df98a5ecc07e8bf5ce90b583665da3d1762eb1f775ad4d0d6f5" dependencies = [ - "base64 0.22.1", + "base64", "chumsky", "email-encoding", "email_address", @@ -1597,9 +1612,9 @@ dependencies = [ [[package]] name = "libsqlite3-sys" -version = "0.27.0" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4e226dcd58b4be396f7bd3c20da8fdee2911400705297ba7d2d7cc2c30f716" +checksum = "2e99fb7a497b1e3339bc746195567ed8d3e24945ecd636e3619d20b9de9e9149" dependencies = [ "cc", "pkg-config", @@ -1909,7 +1924,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.95", + "syn", ] [[package]] @@ -1946,6 +1961,12 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" +[[package]] +name = "parking" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" + [[package]] name = "parking_lot" version = "0.12.3" @@ -1989,12 +2010,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "paste" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" - [[package]] name = "pear" version = "0.2.9" @@ -2015,7 +2030,7 @@ dependencies = [ "proc-macro2", "proc-macro2-diagnostics", "quote", - "syn 2.0.95", + "syn", ] [[package]] @@ -2040,7 +2055,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b7cafe60d6cf8e62e1b9b2ea516a089c008945bb5a275416789e7db0bc199dc" dependencies = [ "memchr", - "thiserror 2.0.10", + "thiserror", "ucd-trie", ] @@ -2064,7 +2079,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.95", + "syn", ] [[package]] @@ -2199,7 +2214,7 @@ checksum = "af066a9c399a26e020ada66a034357a868728e72cd426f3adcd35f80d88d88c8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.95", + "syn", "version_check", "yansi", ] @@ -2290,7 +2305,7 @@ checksum = "bcc303e793d3734489387d205e9b186fac9c6cfacedd98cbb2e8a5943595f3e6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.95", + "syn", ] [[package]] @@ -2401,7 +2416,7 @@ dependencies = [ "proc-macro2", "quote", "rocket_http", - "syn 2.0.95", + "syn", "unicode-xid", "version_check", ] @@ -2512,17 +2527,6 @@ dependencies = [ "windows-sys 0.59.0", ] -[[package]] -name = "rustls" -version = "0.21.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" -dependencies = [ - "ring", - "rustls-webpki 0.101.7", - "sct", -] - [[package]] name = "rustls" version = "0.23.20" @@ -2533,18 +2537,18 @@ dependencies = [ "once_cell", "ring", "rustls-pki-types", - "rustls-webpki 0.102.8", + "rustls-webpki", "subtle", "zeroize", ] [[package]] name = "rustls-pemfile" -version = "1.0.4" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" +checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" dependencies = [ - "base64 0.21.7", + "rustls-pki-types", ] [[package]] @@ -2553,16 +2557,6 @@ version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2bf47e6ff922db3825eb750c4e2ff784c6ff8fb9e13046ef6a1d1c5401b0b37" -[[package]] -name = "rustls-webpki" -version = "0.101.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" -dependencies = [ - "ring", - "untrusted", -] - [[package]] name = "rustls-webpki" version = "0.102.8" @@ -2616,16 +2610,6 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" -[[package]] -name = "sct" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" -dependencies = [ - "ring", - "untrusted", -] - [[package]] name = "security-framework" version = "2.11.1" @@ -2666,7 +2650,7 @@ checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.95", + "syn", ] [[package]] @@ -2690,6 +2674,18 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + [[package]] name = "sha1" version = "0.10.6" @@ -2776,6 +2772,9 @@ name = "smallvec" version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" +dependencies = [ + "serde", +] [[package]] name = "socket2" @@ -2806,21 +2805,11 @@ dependencies = [ "der", ] -[[package]] -name = "sqlformat" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bba3a93db0cc4f7bdece8bb09e77e2e785c20bfebf79eb8340ed80708048790" -dependencies = [ - "nom", - "unicode_categories", -] - [[package]] name = "sqlx" -version = "0.7.4" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9a2ccff1a000a5a59cd33da541d9f2fdcd9e6e8229cc200565942bff36d0aaa" +checksum = "4410e73b3c0d8442c5f99b425d7a435b5ee0ae4167b3196771dd3f7a01be745f" dependencies = [ "sqlx-core", "sqlx-macros", @@ -2831,66 +2820,59 @@ dependencies = [ [[package]] name = "sqlx-core" -version = "0.7.4" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24ba59a9342a3d9bab6c56c118be528b27c9b60e490080e9711a04dccac83ef6" +checksum = "6a007b6936676aa9ab40207cde35daab0a04b823be8ae004368c0793b96a61e0" dependencies = [ - "ahash", - "atoi", - "byteorder", "bytes", "chrono", "crc", "crossbeam-queue", "either", "event-listener", - "futures-channel", "futures-core", "futures-intrusive", "futures-io", "futures-util", + "hashbrown 0.15.2", "hashlink", - "hex", "indexmap", "log", "memchr", "once_cell", - "paste", "percent-encoding", - "rustls 0.21.12", + "rustls", "rustls-pemfile", "serde", "serde_json", "sha2", "smallvec", - "sqlformat", - "thiserror 1.0.69", - "time", + "thiserror", "tokio", "tokio-stream", "tracing", "url", - "webpki-roots 0.25.4", + "webpki-roots", ] [[package]] name = "sqlx-macros" -version = "0.7.4" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ea40e2345eb2faa9e1e5e326db8c34711317d2b5e08d0d5741619048a803127" +checksum = "3112e2ad78643fef903618d78cf0aec1cb3134b019730edb039b69eaf531f310" dependencies = [ "proc-macro2", "quote", "sqlx-core", "sqlx-macros-core", - "syn 1.0.109", + "syn", ] [[package]] name = "sqlx-macros-core" -version = "0.7.4" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5833ef53aaa16d860e92123292f1f6a3d53c34ba8b1969f152ef1a7bb803f3c8" +checksum = "4e9f90acc5ab146a99bf5061a7eb4976b573f560bc898ef3bf8435448dd5e7ad" dependencies = [ "dotenvy", "either", @@ -2906,7 +2888,7 @@ dependencies = [ "sqlx-mysql", "sqlx-postgres", "sqlx-sqlite", - "syn 1.0.109", + "syn", "tempfile", "tokio", "url", @@ -2914,12 +2896,12 @@ dependencies = [ [[package]] name = "sqlx-mysql" -version = "0.7.4" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ed31390216d20e538e447a7a9b959e06ed9fc51c37b514b46eb758016ecd418" +checksum = "4560278f0e00ce64938540546f59f590d60beee33fffbd3b9cd47851e5fff233" dependencies = [ "atoi", - "base64 0.21.7", + "base64", "bitflags 2.6.0", "byteorder", "bytes", @@ -2950,20 +2932,19 @@ dependencies = [ "smallvec", "sqlx-core", "stringprep", - "thiserror 1.0.69", - "time", + "thiserror", "tracing", "whoami", ] [[package]] name = "sqlx-postgres" -version = "0.7.4" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c824eb80b894f926f89a0b9da0c7f435d27cdd35b8c655b114e58223918577e" +checksum = "c5b98a57f363ed6764d5b3a12bfedf62f07aa16e1856a7ddc2a0bb190a959613" dependencies = [ "atoi", - "base64 0.21.7", + "base64", "bitflags 2.6.0", "byteorder", "chrono", @@ -2972,7 +2953,6 @@ dependencies = [ "etcetera", "futures-channel", "futures-core", - "futures-io", "futures-util", "hex", "hkdf", @@ -2990,17 +2970,16 @@ dependencies = [ "smallvec", "sqlx-core", "stringprep", - "thiserror 1.0.69", - "time", + "thiserror", "tracing", "whoami", ] [[package]] name = "sqlx-sqlite" -version = "0.7.4" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b244ef0a8414da0bed4bb1910426e890b19e5e9bccc27ada6b797d05c55ae0aa" +checksum = "f85ca71d3a5b24e64e1d08dd8fe36c6c95c339a896cc33068148906784620540" dependencies = [ "atoi", "chrono", @@ -3014,11 +2993,10 @@ dependencies = [ "log", "percent-encoding", "serde", + "serde_urlencoded", "sqlx-core", - "time", "tracing", "url", - "urlencoding", ] [[package]] @@ -3075,17 +3053,6 @@ version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" -[[package]] -name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - [[package]] name = "syn" version = "2.0.95" @@ -3105,7 +3072,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "syn 2.0.95", + "syn", ] [[package]] @@ -3144,33 +3111,13 @@ dependencies = [ "unic-segment", ] -[[package]] -name = "thiserror" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" -dependencies = [ - "thiserror-impl 1.0.69", -] - [[package]] name = "thiserror" version = "2.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a3ac7f54ca534db81081ef1c1e7f6ea8a3ef428d2fc069097c079443d24124d3" dependencies = [ - "thiserror-impl 2.0.10", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.95", + "thiserror-impl", ] [[package]] @@ -3181,7 +3128,7 @@ checksum = "9e9465d30713b56a37ede7185763c3492a91be2f5fa68d958c44e41ab9248beb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.95", + "syn", ] [[package]] @@ -3275,7 +3222,7 @@ checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.95", + "syn", ] [[package]] @@ -3362,7 +3309,7 @@ checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.95", + "syn", ] [[package]] @@ -3518,24 +3465,12 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e70f2a8b45122e719eb623c01822704c4e0907e7e426a05927e1a1cfff5b75d0" -[[package]] -name = "unicode-segmentation" -version = "1.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" - [[package]] name = "unicode-xid" version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" -[[package]] -name = "unicode_categories" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" - [[package]] name = "universal-hash" version = "0.5.1" @@ -3558,16 +3493,16 @@ version = "2.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "02d1a66277ed75f640d608235660df48c8e3c19f3b4edb6a263315626cc3c01d" dependencies = [ - "base64 0.22.1", + "base64", "flate2", "log", "once_cell", - "rustls 0.23.20", + "rustls", "rustls-pki-types", "serde", "serde_json", "url", - "webpki-roots 0.26.7", + "webpki-roots", ] [[package]] @@ -3684,7 +3619,7 @@ dependencies = [ "log", "proc-macro2", "quote", - "syn 2.0.95", + "syn", "wasm-bindgen-shared", ] @@ -3706,7 +3641,7 @@ checksum = "30d7a95b763d3c45903ed6c81f156801839e5ee968bb07e534c44df0fcd330c2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.95", + "syn", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -3717,12 +3652,6 @@ version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "943aab3fdaaa029a6e0271b35ea10b72b943135afe9bffca82384098ad0e06a6" -[[package]] -name = "webpki-roots" -version = "0.25.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" - [[package]] name = "webpki-roots" version = "0.26.7" @@ -3999,7 +3928,7 @@ checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" dependencies = [ "proc-macro2", "quote", - "syn 2.0.95", + "syn", "synstructure", ] @@ -4021,7 +3950,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.95", + "syn", ] [[package]] @@ -4041,7 +3970,7 @@ checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" dependencies = [ "proc-macro2", "quote", - "syn 2.0.95", + "syn", "synstructure", ] @@ -4070,5 +3999,5 @@ checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.95", + "syn", ] diff --git a/Cargo.toml b/Cargo.toml index 6ada6b1..3ce31d9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ rocket = { version = "0.5.0", features = ["secrets"]} rocket_dyn_templates = {version = "0.2", features = [ "tera" ], optional = true } log = "0.4" env_logger = "0.11" -sqlx = { version = "0.7", features = ["sqlite", "runtime-tokio-rustls", "macros", "chrono", "time"] } +sqlx = { version = "0.8", features = ["sqlite", "runtime-tokio-rustls", "macros", "chrono"] } argon2 = "0.5" serde = { version = "1.0", features = [ "derive" ]} serde_json = "1.0" diff --git a/src/lib.rs b/src/lib.rs index 29c2d01..61615f9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -11,16 +11,16 @@ pub mod rest; pub mod scheduled; pub(crate) const AMOUNT_DAYS_TO_SHOW_TRIPS_AHEAD: i64 = 10; -pub(crate) const RENNRUDERBEITRAG: i32 = 11000; -pub(crate) const BOAT_STORAGE: i32 = 4500; -pub(crate) const FAMILY_TWO: i32 = 30000; -pub(crate) const FAMILY_THREE_OR_MORE: i32 = 35000; -pub(crate) const STUDENT_OR_PUPIL: i32 = 8000; -pub(crate) const REGULAR: i32 = 22000; -pub(crate) const UNTERSTUETZEND: i32 = 2500; -pub(crate) const FOERDERND: i32 = 8500; -pub(crate) const SCHECKBUCH: i32 = 3000; -pub(crate) const EINSCHREIBGEBUEHR: i32 = 3000; +pub(crate) const RENNRUDERBEITRAG: i64 = 11000; +pub(crate) const BOAT_STORAGE: i64 = 4500; +pub(crate) const FAMILY_TWO: i64 = 30000; +pub(crate) const FAMILY_THREE_OR_MORE: i64 = 35000; +pub(crate) const STUDENT_OR_PUPIL: i64 = 8000; +pub(crate) const REGULAR: i64 = 22000; +pub(crate) const UNTERSTUETZEND: i64 = 2500; +pub(crate) const FOERDERND: i64 = 8500; +pub(crate) const SCHECKBUCH: i64 = 3000; +pub(crate) const EINSCHREIBGEBUEHR: i64 = 3000; #[cfg(test)] #[macro_export] diff --git a/src/model/event.rs b/src/model/event.rs index c8af6ad..5a640d4 100644 --- a/src/model/event.rs +++ b/src/model/event.rs @@ -96,8 +96,8 @@ FROM trip WHERE planned_event_id = ? .unwrap() .into_iter() .map(|r| Registration { - name: r.name, - registered_at: r.registered_at, + name: r.name.unwrap(), + registered_at: r.registered_at.unwrap(), is_guest: false, is_real_guest: false, }) diff --git a/src/model/family.rs b/src/model/family.rs index 6821d33..55aa5eb 100644 --- a/src/model/family.rs +++ b/src/model/family.rs @@ -74,7 +74,7 @@ GROUP BY family.id;" } } - pub async fn amount_family_members(&self, db: &SqlitePool) -> i32 { + pub async fn amount_family_members(&self, db: &SqlitePool) -> i64 { sqlx::query!( "SELECT COUNT(*) as count FROM user WHERE family_id = ?", self.id diff --git a/src/model/user/fee.rs b/src/model/user/fee.rs index 1fa9841..0228892 100644 --- a/src/model/user/fee.rs +++ b/src/model/user/fee.rs @@ -3,8 +3,8 @@ use serde::Serialize; #[derive(Debug, Serialize)] pub struct Fee { - pub sum_in_cents: i32, - pub parts: Vec<(String, i32)>, + pub sum_in_cents: i64, + pub parts: Vec<(String, i64)>, pub name: String, pub user_ids: String, pub paid: bool, @@ -29,7 +29,7 @@ impl Fee { } } - pub fn add(&mut self, desc: String, price_in_cents: i32) { + pub fn add(&mut self, desc: String, price_in_cents: i64) { self.sum_in_cents += price_in_cents; self.parts.push((desc, price_in_cents)); diff --git a/src/model/user/mod.rs b/src/model/user/mod.rs index a72ed3b..55ba4bb 100644 --- a/src/model/user/mod.rs +++ b/src/model/user/mod.rs @@ -60,7 +60,7 @@ pub struct User { pub struct UserWithDetails { #[serde(flatten)] pub user: User, - pub amount_unread_notifications: i32, + pub amount_unread_notifications: i64, pub allowed_to_steer: bool, pub on_water: bool, pub roles: Vec, @@ -405,7 +405,7 @@ ASKÖ Ruderverein Donau Linz", self.name), fee } - pub async fn amount_boats(&self, db: &SqlitePool) -> i32 { + pub async fn amount_boats(&self, db: &SqlitePool) -> i64 { sqlx::query!( "SELECT COUNT(*) as count FROM boat WHERE owner = ?", self.id @@ -416,7 +416,7 @@ ASKÖ Ruderverein Donau Linz", self.name), .count } - pub async fn amount_unread_notifications(&self, db: &SqlitePool) -> i32 { + pub async fn amount_unread_notifications(&self, db: &SqlitePool) -> i64 { sqlx::query!( "SELECT COUNT(*) as count FROM notification WHERE user_id = ? AND read_at IS NULL", self.id -- 2.47.1 From b8aaf5ba2ecfdd98ca0151507255df32308aedb4 Mon Sep 17 00:00:00 2001 From: Philipp Hofer Date: Fri, 10 Jan 2025 09:51:43 +0100 Subject: [PATCH 22/24] allow vorstand to see all old logs --- src/tera/log.rs | 4 ++-- templates/log.completed.html.tera | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tera/log.rs b/src/tera/log.rs index ae82c3b..bf83e4e 100644 --- a/src/tera/log.rs +++ b/src/tera/log.rs @@ -27,7 +27,7 @@ use crate::{ }, logtype::LogType, trip::Trip, - user::{AdminUser, DonauLinzUser, User, UserWithDetails, VorstandUser}, + user::{DonauLinzUser, User, UserWithDetails, VorstandUser}, }, tera::Config, }; @@ -118,7 +118,7 @@ async fn show(db: &State, user: DonauLinzUser) -> Template { } #[get("/show?", rank = 2)] -async fn show_for_year(db: &State, user: AdminUser, year: i32) -> Template { +async fn show_for_year(db: &State, user: VorstandUser, year: i32) -> Template { let logs = Logbook::completed_in_year(db, year).await; Template::render( diff --git a/templates/log.completed.html.tera b/templates/log.completed.html.tera index 6f16fa6..622a34b 100644 --- a/templates/log.completed.html.tera +++ b/templates/log.completed.html.tera @@ -5,7 +5,7 @@

    Logbuch - {% if loggedin_user and "admin" in loggedin_user.roles %} + {% if loggedin_user and "Vorstand" in loggedin_user.roles %}