...
This commit is contained in:
parent
43170cdd49
commit
11af22215e
3 changed files with 321 additions and 4 deletions
|
|
@ -233,19 +233,31 @@
|
|||
|
||||
public function edit(Tour $tour)
|
||||
{
|
||||
Log::info("TourController::edit");
|
||||
|
||||
if (Auth::user()->role != 'ADMIN') {
|
||||
return redirect('/tour');
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Log::info("start: $tour->start , now: ". Carbon::now());
|
||||
if ($tour->start < Carbon::now()) {
|
||||
Log::info("TourController::showing tour.edit_old view");
|
||||
$tour->start = Tour::toGermanDate($tour->start);
|
||||
$tour->deadline = Tour::toGermanDate($tour->deadline);
|
||||
|
||||
if ($tour->start < Carbon::now()) {
|
||||
return view('tour.edit_old')->with('tour', $tour);
|
||||
}
|
||||
|
||||
$rooms = $this->fetch_rooms($tour->id);
|
||||
|
||||
$tour->start = Tour::toGermanDate($tour->start);
|
||||
$tour->deadline = Tour::toGermanDate($tour->deadline);
|
||||
|
||||
Log::info("TourController::showing tour.edit view");
|
||||
Log::info("TourController::edit =>");
|
||||
Log::info("$tour");
|
||||
|
||||
return view('tour.edit')
|
||||
->with('tour', $tour)
|
||||
|
|
|
|||
|
|
@ -85,8 +85,7 @@
|
|||
|
||||
|
||||
<div class="form-group">
|
||||
<textarea class="col-12" name="beschreibung" rows="10" cols="50">{{ $tour->beschreibung }}
|
||||
</textarea>
|
||||
<textarea class="col-12" name="beschreibung" rows="10" cols="50">{{ $tour->beschreibung }}</textarea>
|
||||
</div>
|
||||
|
||||
|
||||
|
|
|
|||
306
tools/motorradig_2023-11-11_123805.sql
Normal file
306
tools/motorradig_2023-11-11_123805.sql
Normal file
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue