better-text #564
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user