even nicer cal entries
This commit is contained in:
parent
bb48ddb3de
commit
fca19745f8
@ -360,21 +360,23 @@ WHERE trip_details.id=?
|
|||||||
event.day.replace('-', ""),
|
event.day.replace('-', ""),
|
||||||
event.planned_starting_time.replace(':', "")
|
event.planned_starting_time.replace(':', "")
|
||||||
)));
|
)));
|
||||||
|
let tripdetails = event.trip_details(db).await;
|
||||||
let mut name = String::new();
|
let mut name = String::new();
|
||||||
if event.is_cancelled() {
|
if event.is_cancelled() {
|
||||||
name.push_str("ABGESAGT! :-( ");
|
name.push_str("ABGESAGT");
|
||||||
|
if let Some(notes) = &tripdetails.notes {
|
||||||
|
if !notes.is_empty() {
|
||||||
|
name.push_str(&format!(" (Grund: {notes})"))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
name.push_str("! :-( ");
|
||||||
}
|
}
|
||||||
name.push_str(&format!("{} ", event.name));
|
name.push_str(&format!("{} ", event.name));
|
||||||
|
|
||||||
let tripdetails = event.trip_details(db).await;
|
|
||||||
if let Some(triptype) = tripdetails.triptype(db).await {
|
if let Some(triptype) = tripdetails.triptype(db).await {
|
||||||
name.push_str(&format!("• {} ", triptype.name))
|
name.push_str(&format!("• {} ", triptype.name))
|
||||||
}
|
}
|
||||||
if let Some(notes) = tripdetails.notes {
|
|
||||||
if !notes.is_empty() && event.is_cancelled() {
|
|
||||||
name.push_str(&format!("({notes}) "))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
vevent.push(Summary::new(name));
|
vevent.push(Summary::new(name));
|
||||||
calendar.add_event(vevent);
|
calendar.add_event(vevent);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user