Commit 40e1a044 authored by Jacob Priddy's avatar Jacob Priddy 👌

Make cancel buttons on the builder pages redirect back and add

schedule_id linking in table
parent a36e6777
......@@ -24,7 +24,7 @@
@else
<button type="submit" class="btn btn-primary">Update {{ ucfirst($resource) }}</button>
@endif
<a href="{{ route('web.admin.' . \Illuminate\Support\Str::plural($resource) . '.index') }}" class="btn btn-secondary float-right">
<a href="{{ url()->previous() }}" class="btn btn-secondary float-right">
Cancel
</a>
</form>
......
......@@ -38,6 +38,12 @@
{{ door($row[$header])['name'] }} (ID: {{ $row[$header] }})
</a>
</td>
@elseif($header === 'schedule_id')
<td>
<a href="{{ route('web.admin.schedules.edit', ['scheduleId' => $row[$header]]) }}">
{{ $row[$header] }}
</a>
</td>
@else
<td>
{{ $row[$header] }}
......
......@@ -24,6 +24,7 @@ class WebPresenter extends BasePresenter implements Presenter
return [
'id' => $schedule->getId(),
'schedule_id' => $schedule->getId(),
'type' => $type,
'description' => $schedule->getDescription(),
'start_date' => self::formatDateTime($schedule->getStart(), self::HUMAN_DATE_FORMAT),
......@@ -39,7 +40,7 @@ class WebPresenter extends BasePresenter implements Presenter
'tableParams' => [
'paginatedData' => $this->webPaginate($this->schedules),
'headers' => [
'ID' => 'id',
'Schedule' => 'schedule_id',
'Type' => 'type',
'Description' => 'description',
'Start' => 'start_date',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment