Fixed tour storno flagging
This commit is contained in:
parent
1b6dc17ead
commit
ebd663e842
6 changed files with 936 additions and 7 deletions
|
|
@ -274,7 +274,7 @@
|
|||
public function update(Request $request, Tour $tour)
|
||||
{
|
||||
|
||||
Log::info("Tour:update");
|
||||
Log::info("Tour:update !");
|
||||
$tour = Tour::find($request->input('tour_id'));
|
||||
|
||||
$request->validate(
|
||||
|
|
@ -313,13 +313,22 @@
|
|||
*/
|
||||
}
|
||||
|
||||
|
||||
|
||||
$tour->name = $request->input('name');
|
||||
if ($request->beschreibung) $tour->beschreibung = $request->input('beschreibung');
|
||||
if ($request->start) $tour->start = Tour::toDBDate($request->input('start'));
|
||||
if ($request->deadline) $tour->deadline = Tour::toDBDate($request->input('deadline'));
|
||||
if ($request->max_participants) $tour->max_participants = $request->input('max_participants');
|
||||
$tour->is_cancelled = ($request->has('is_cancelled'));
|
||||
if ($request->is_cancelled) {
|
||||
$tour->is_cancelled = true;
|
||||
$tour->status="STORNIERT";
|
||||
} else {
|
||||
$tour->is_cancelled=false;
|
||||
$tour->status="FINDET STATT";
|
||||
}
|
||||
if ($request->bericht) $tour->bericht = $request->bericht;
|
||||
|
||||
$tour->save();
|
||||
|
||||
|
||||
|
|
@ -460,4 +469,4 @@
|
|||
Log::info("Image saved as $dirPath/$name" . '.jpg');
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue