Compare commits
No commits in common. "24667e56a43c156e565c74fd720e5df05a9d78cb" and "29486ac7a29e3ab9358190502e56fbf182fcdddc" have entirely different histories.
24667e56a4
...
29486ac7a2
@ -210,7 +210,6 @@ INNER JOIN trip_details ON planned_event.trip_details_id = trip_details.id",
|
|||||||
pub async fn update(
|
pub async fn update(
|
||||||
&self,
|
&self,
|
||||||
db: &SqlitePool,
|
db: &SqlitePool,
|
||||||
name: &str,
|
|
||||||
planned_amount_cox: i32,
|
planned_amount_cox: i32,
|
||||||
max_people: i32,
|
max_people: i32,
|
||||||
notes: Option<&str>,
|
notes: Option<&str>,
|
||||||
@ -218,8 +217,7 @@ INNER JOIN trip_details ON planned_event.trip_details_id = trip_details.id",
|
|||||||
is_locked: bool,
|
is_locked: bool,
|
||||||
) {
|
) {
|
||||||
sqlx::query!(
|
sqlx::query!(
|
||||||
"UPDATE planned_event SET name = ?, planned_amount_cox = ? WHERE id = ?",
|
"UPDATE planned_event SET planned_amount_cox = ? WHERE id = ?",
|
||||||
name,
|
|
||||||
planned_amount_cox,
|
planned_amount_cox,
|
||||||
self.id
|
self.id
|
||||||
)
|
)
|
||||||
|
@ -43,7 +43,6 @@ async fn create(
|
|||||||
#[derive(FromForm)]
|
#[derive(FromForm)]
|
||||||
struct UpdatePlannedEventForm<'r> {
|
struct UpdatePlannedEventForm<'r> {
|
||||||
id: i64,
|
id: i64,
|
||||||
name: &'r str,
|
|
||||||
planned_amount_cox: i32,
|
planned_amount_cox: i32,
|
||||||
max_people: i32,
|
max_people: i32,
|
||||||
notes: Option<&'r str>,
|
notes: Option<&'r str>,
|
||||||
@ -62,7 +61,6 @@ async fn update(
|
|||||||
planned_event
|
planned_event
|
||||||
.update(
|
.update(
|
||||||
db,
|
db,
|
||||||
data.name,
|
|
||||||
data.planned_amount_cox,
|
data.planned_amount_cox,
|
||||||
data.max_people,
|
data.max_people,
|
||||||
data.notes,
|
data.notes,
|
||||||
|
@ -181,7 +181,6 @@
|
|||||||
<form action="/admin/planned-event" method="post" class="grid gap-3">
|
<form action="/admin/planned-event" method="post" class="grid gap-3">
|
||||||
<input type="hidden" name="_method" value="put"/>
|
<input type="hidden" name="_method" value="put"/>
|
||||||
<input type="hidden" name="id" value="{{ planned_event.id }}"/>
|
<input type="hidden" name="id" value="{{ planned_event.id }}"/>
|
||||||
{{ macros::input(label='Titel', name='name', type='input', value=planned_event.name) }}
|
|
||||||
{{ macros::input(label='Anzahl Ruderer', name='max_people', type='number', required=true, value=planned_event.max_people, min='0') }}
|
{{ macros::input(label='Anzahl Ruderer', name='max_people', type='number', required=true, value=planned_event.max_people, min='0') }}
|
||||||
{{ macros::input(label='Anzahl Steuerleute', name='planned_amount_cox', type='number', value=planned_event.planned_amount_cox, required=true, min='0') }}
|
{{ macros::input(label='Anzahl Steuerleute', name='planned_amount_cox', type='number', value=planned_event.planned_amount_cox, required=true, min='0') }}
|
||||||
{{ macros::checkbox(label='Immer anzeigen', name='always_show', id=planned_event.id,checked=planned_event.always_show) }}
|
{{ macros::checkbox(label='Immer anzeigen', name='always_show', id=planned_event.id,checked=planned_event.always_show) }}
|
||||||
|
Loading…
Reference in New Issue
Block a user