update versions
This commit is contained in:
parent
ca427153d9
commit
48b8ff7bd7
1572
Cargo.lock
generated
1572
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,8 @@
|
||||
[workspace]
|
||||
members = ["terminwahl_back", "terminwahl_front"]
|
||||
workspace.resolver = "2"
|
||||
|
||||
[workspace.dependencies]
|
||||
serde = {version="1.0", features = ["derive"]}
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde_json = "1.0"
|
||||
chrono = {version="*", features = ["serde"]}
|
||||
chrono = { version = "*", features = ["serde"] }
|
||||
|
46
README.md
46
README.md
@ -25,34 +25,34 @@ insert into teachers (ansprache, last_name, subject_id) values ('Frau', 'Wörner
|
||||
to make a teacher available in the current year:
|
||||
|
||||
```sql
|
||||
insert into teacher_dates values (1,2);
|
||||
insert into teacher_dates values (2,2);
|
||||
insert into teacher_dates values (3,2);
|
||||
insert into teacher_dates values (4,2);
|
||||
insert into teacher_dates values (5,2);
|
||||
insert into teacher_dates values (7,2);
|
||||
insert into teacher_dates values (12,2);
|
||||
insert into teacher_dates values (8,2);
|
||||
insert into teacher_dates values (9,2);
|
||||
insert into teacher_dates values (10,2);
|
||||
insert into teacher_dates values (11,2);
|
||||
insert into teacher_dates values (13,2);
|
||||
insert into teacher_dates values (14,2);
|
||||
insert into teacher_dates values (15,2);
|
||||
insert into teacher_dates values (16,2);
|
||||
insert into teacher_dates values (1,3);
|
||||
insert into teacher_dates values (2,3);
|
||||
insert into teacher_dates values (3,3);
|
||||
insert into teacher_dates values (4,3);
|
||||
insert into teacher_dates values (5,3);
|
||||
insert into teacher_dates values (7,3);
|
||||
insert into teacher_dates values (12,3);
|
||||
insert into teacher_dates values (8,3);
|
||||
insert into teacher_dates values (9,3);
|
||||
insert into teacher_dates values (10,3);
|
||||
insert into teacher_dates values (11,3);
|
||||
insert into teacher_dates values (13,3);
|
||||
insert into teacher_dates values (14,3);
|
||||
insert into teacher_dates values (15,3);
|
||||
insert into teacher_dates values (16,3);
|
||||
```
|
||||
|
||||
to generate slots use:
|
||||
|
||||
```sql
|
||||
insert into appointment_slots (start_time, end_time, date_id) values ('2023-02-28 14:00:00', '2023-02-28 14:15:00', 2);
|
||||
insert into appointment_slots (start_time, end_time, date_id) values ('2023-02-28 14:15:00', '2023-02-28 14:30:00', 2);
|
||||
insert into appointment_slots (start_time, end_time, date_id) values ('2023-02-28 14:30:00', '2023-02-28 14:45:00', 2);
|
||||
insert into appointment_slots (start_time, end_time, date_id) values ('2023-02-28 14:45:00', '2023-02-28 15:00:00', 2);
|
||||
insert into appointment_slots (start_time, end_time, date_id) values ('2023-02-28 15:15:00', '2023-02-28 15:30:00', 2);
|
||||
insert into appointment_slots (start_time, end_time, date_id) values ('2023-02-28 15:30:00', '2023-02-28 15:45:00', 2);
|
||||
insert into appointment_slots (start_time, end_time, date_id) values ('2023-02-28 15:45:00', '2023-02-28 16:00:00', 2);
|
||||
insert into appointment_slots (start_time, end_time, date_id) values ('2023-02-28 16:00:00', '2023-02-28 16:15:00', 2);
|
||||
insert into appointment_slots (start_time, end_time, date_id) values ('2023-02-28 14:00:00', '2023-02-28 14:15:00', 3);
|
||||
insert into appointment_slots (start_time, end_time, date_id) values ('2023-02-28 14:15:00', '2023-02-28 14:30:00', 3);
|
||||
insert into appointment_slots (start_time, end_time, date_id) values ('2023-02-28 14:30:00', '2023-02-28 14:45:00', 3);
|
||||
insert into appointment_slots (start_time, end_time, date_id) values ('2023-02-28 14:45:00', '2023-02-28 15:00:00', 3);
|
||||
insert into appointment_slots (start_time, end_time, date_id) values ('2023-02-28 15:15:00', '2023-02-28 15:30:00', 3);
|
||||
insert into appointment_slots (start_time, end_time, date_id) values ('2023-02-28 15:30:00', '2023-02-28 15:45:00', 3);
|
||||
insert into appointment_slots (start_time, end_time, date_id) values ('2023-02-28 15:45:00', '2023-02-28 16:00:00', 3);
|
||||
insert into appointment_slots (start_time, end_time, date_id) values ('2023-02-28 16:00:00', '2023-02-28 16:15:00', 3);
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "terminwahl_back"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
edition = "2024"
|
||||
default-run = "terminwahl_back"
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
|
@ -7,7 +7,7 @@ use lettre::{
|
||||
message::header::ContentType, AsyncSmtpTransport, AsyncTransport, Message, Tokio1Executor,
|
||||
};
|
||||
use log::debug;
|
||||
use rand::{distributions::Alphanumeric, thread_rng, Rng};
|
||||
use rand::{distr::Alphanumeric, rng, Rng};
|
||||
use serde::Serialize;
|
||||
use serde_json::json;
|
||||
use terminwahl_typen::{AppointmentSlot, Nutzer, PlannedAppointment, RequestState, Teacher};
|
||||
@ -48,7 +48,7 @@ pub async fn save_appointments_json(
|
||||
.await
|
||||
.map_err(error::ErrorInternalServerError)?;
|
||||
debug!("Saving appointments");
|
||||
let validation_key: String = thread_rng()
|
||||
let validation_key: String = rng()
|
||||
.sample_iter(&Alphanumeric)
|
||||
.take(30)
|
||||
.map(char::from)
|
||||
|
@ -1,17 +1,17 @@
|
||||
[package]
|
||||
name = "terminwahl_front"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
edition = "2024"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
|
||||
yew = { version = "0.20.0", features = ["csr"] }
|
||||
gloo="*"
|
||||
js-sys="*"
|
||||
web-sys="*"
|
||||
terminwahl_typen = {path="../terminwahl_typen/"}
|
||||
serde = {workspace = true}
|
||||
serde_json={workspace=true}
|
||||
chrono={workspace=true}
|
||||
gloo = "*"
|
||||
js-sys = "*"
|
||||
web-sys = "*"
|
||||
terminwahl_typen = { path = "../terminwahl_typen/" }
|
||||
serde = { workspace = true }
|
||||
serde_json = { workspace = true }
|
||||
chrono = { workspace = true }
|
||||
|
@ -12,4 +12,6 @@
|
||||
<meta name="description" content="Termine buchen für den Lehrersprechtag der Waldorfschule Uhlandshöhe" />
|
||||
</head>
|
||||
|
||||
<body></body>
|
||||
|
||||
</html>
|
@ -265,7 +265,7 @@ impl App {
|
||||
<img src="/logoheader.png" />
|
||||
</figure>
|
||||
<div class="box mt-3 is-light">
|
||||
<p>{"Anmeldung zum Elternsprechtag!"}</p><p>{"Bitte geben Sie unbedingt eine gültige E-Mail-Adresse an,
|
||||
<p>{"Anmeldung zum "} {&self.dates.as_ref().expect("termin").first().expect("termin").name}{" am "}{&self.dates.as_ref().expect("termin").first().expect("termin").start_time.format("%d.%m.%Y")}{"!"}</p><p>{"Bitte geben Sie unbedingt eine gültige E-Mail-Adresse an,
|
||||
da die Termine erst nach Bestätigung über den per E-Mail zugesandten Link gebucht werden."}</p>
|
||||
</div>
|
||||
<div class="field">
|
||||
|
@ -1,12 +1,12 @@
|
||||
[package]
|
||||
name = "terminwahl_typen"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
edition = "2024"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
|
||||
serde = {workspace = true}
|
||||
serde_json={workspace=true}
|
||||
chrono={workspace=true}
|
||||
serde = { workspace = true }
|
||||
serde_json = { workspace = true }
|
||||
chrono = { workspace = true }
|
||||
|
Loading…
x
Reference in New Issue
Block a user