don't lose trip_type on event cancellation; don't add empty notes in cal
This commit is contained in:
@ -98,6 +98,7 @@ FROM trip WHERE planned_event_id = ?
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct EventUpdate<'a> {
|
||||
pub name: &'a str,
|
||||
pub planned_amount_cox: i32,
|
||||
@ -361,7 +362,7 @@ WHERE trip_details.id=?
|
||||
)));
|
||||
let mut name = String::new();
|
||||
if event.is_cancelled() {
|
||||
name.push_str("ABGESAGT :-( ");
|
||||
name.push_str("ABGESAGT! :-( ");
|
||||
}
|
||||
name.push_str(&format!("{} ", event.name));
|
||||
|
||||
@ -370,7 +371,9 @@ WHERE trip_details.id=?
|
||||
name.push_str(&format!("• {} ", triptype.name))
|
||||
}
|
||||
if let Some(notes) = tripdetails.notes {
|
||||
name.push_str(&format!("({notes}) "))
|
||||
if !notes.is_empty() {
|
||||
name.push_str(&format!("({notes}) "))
|
||||
}
|
||||
}
|
||||
vevent.push(Summary::new(name));
|
||||
calendar.add_event(vevent);
|
||||
|
Reference in New Issue
Block a user