new newbie flag

This commit is contained in:
2026-06-04 19:49:16 +02:00
parent 0e1973fbac
commit c940ce0fdc
17 changed files with 114 additions and 28 deletions
+6
View File
@@ -52,6 +52,7 @@ struct EditTripForm<'r> {
notes: Option<&'r str>,
trip_type: Option<i64>,
is_locked: bool,
allow_guests: bool,
}
#[post("/trip/<trip_id>", data = "<data>")]
@@ -69,6 +70,7 @@ async fn update(
notes: data.notes,
trip_type: data.trip_type,
is_locked: data.is_locked,
allow_guests: data.allow_guests,
};
match Trip::update_own(db, &update).await {
Ok(_) => Flash::success(
@@ -85,6 +87,10 @@ async fn update(
Err(TripUpdateError::TripDetailsDoesNotExist) => {
Flash::error(Redirect::to("/planned"), "Ausfahrt gibt's nicht")
}
Err(TripUpdateError::NeulingAlreadyRegistered) => Flash::error(
Redirect::to("/planned"),
"Es sind bereits Neulinge angemeldet — 'Neulinge willkommen' kann nicht deaktiviert werden.",
),
}
} else {
Flash::error(Redirect::to("/planned"), "Ausfahrt gibt's nicht")