Crop reports
@if(Auth::check() && (auth()->user()->hasRole('admin') | auth()->user()->hasRole('editor') | auth()->user()->hasRole('agric_editor'))) @endauth
{{ Form::open(array('id' => 'cropreport-query', 'class' => 'form-inline')) }}
{!! Form::close() !!}
| {!! Form::Label('query', 'Crop:') !!} | {!! Form::select('crop', $crops, null, ['id' => 'crop', 'class' => 'form-control']); !!} | {!! Form::Label('query', 'Region:') !!} | {!! Form::select('region', $regions, null, ['id' => 'region', 'class' => 'form-control']); !!} | {!! Form::Label('query', 'Station:') !!} | {!! Form::select('station', $stations, null, ['id' => 'station', 'class' => 'form-control']); !!} |
| {!! Form::Label('query', 'Start date:') !!} | {!! Form::text('start_date', null, ['id' => 'start_date', 'class' => 'date form-control']); !!} | {!! Form::Label('query', 'End date:') !!} | {!! Form::text('end_date', null, ['id' => 'end_date', 'class' => 'date form-control']); !!} |
| Region | Station | Observation date | Crop | Crop Stage | Crop Condition | Actions | ||
|---|---|---|---|---|---|---|---|---|
| {{$cropreport->region->region_name }} | {{$cropreport->station->station_name }} | {{substr($cropreport->observation_date,0,10) }} | {{$cropreport->crop->crop_name }} | {{$cropreport->crop->phenology[$cropreport->crop_stage_number - 1]->stage_name }} | {{$cropreport->cropassessment->general_state }} | Details | @if(Auth::check() && (auth()->user()->hasRole('admin') | auth()->user()->hasRole('editor') | auth()->user()->hasRole('agric_editor')))Edit | @endauth |
{!! $cropreports->links() !!}