Fix schedules with no names being uneditable

This commit is contained in:
Dane Everitt 2018-02-24 12:04:14 -06:00
parent c6a91e2764
commit 807521b97c
No known key found for this signature in database
GPG Key ID: EEA66103B3D71F53
3 changed files with 5 additions and 2 deletions

View File

@ -7,6 +7,7 @@ This project follows [Semantic Versioning](http://semver.org) guidelines.
### Fixed ### Fixed
* Fixes an exception thrown when trying to access the `/nests/:id/eggs/:id` API endpoint. * Fixes an exception thrown when trying to access the `/nests/:id/eggs/:id` API endpoint.
* Fixes search on server listing page. * Fixes search on server listing page.
* Schedules with no names are now clickable to allow editing.
### Added ### Added
* Adds ability to include egg variables on an API request. * Adds ability to include egg variables on an API request.

View File

@ -33,7 +33,7 @@ class ScheduleCreationFormRequest extends ServerFormRequest
public function rules() public function rules()
{ {
return [ return [
'name' => 'string|max:255', 'name' => 'nullable|string|max:255',
'cron_day_of_week' => 'required|string', 'cron_day_of_week' => 'required|string',
'cron_day_of_month' => 'required|string', 'cron_day_of_month' => 'required|string',
'cron_hour' => 'required|string', 'cron_hour' => 'required|string',

View File

@ -43,7 +43,9 @@
<tr @if(! $schedule->is_active)class="muted muted-hover"@endif> <tr @if(! $schedule->is_active)class="muted muted-hover"@endif>
<td class="middle"> <td class="middle">
@can('edit-schedule', $server) @can('edit-schedule', $server)
<a href="{{ route('server.schedules.view', ['server' => $server->uuidShort, '$schedule' => $schedule->hashid]) }}">{{ $schedule->name }}</a> <a href="{{ route('server.schedules.view', ['server' => $server->uuidShort, '$schedule' => $schedule->hashid]) }}">
{{ $schedule->name ?? trans('server.schedule.unnamed') }}
</a>
@else @else
{{ $schedule->name ?? trans('server.schedule.unnamed') }} {{ $schedule->name ?? trans('server.schedule.unnamed') }}
@endcan @endcan