better-text #562

Merged
philipp merged 5 commits from better-text into staging 2024-05-30 11:12:04 +02:00
Showing only changes of commit 562c32939d - Show all commits

View File

@ -282,16 +282,17 @@ WHERE trip_details.id=?
let rower = Registration::all_rower(db, self.trip_details_id).await;
for user in rower {
if let Some(user) = User::find_by_name(db, &user.name).await {
let notes = match update.notes {
Some(n) if !n.is_empty() => n,
_ => ".",
let notes = if let Some(notes) = update.notes {
format!("Grund der Absage: {notes}")
} else {
String::from("")
};
Notification::create(
db,
&user,
&format!(
"Die Ausfahrt {} am {} um {} wurde abgesagt{}",
"Die Ausfahrt {} am {} um {} wurde abgesagt. {}",
self.name, self.day, self.planned_starting_time, notes
),
"Absage Ausfahrt",