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