Add flight log to both frontend and admin pirep edit view
This commit is contained in:
parent
77055991af
commit
9dfdc8195d
@ -5,9 +5,11 @@ namespace App\Http\Controllers\Frontend;
|
|||||||
use App\Facades\Utils;
|
use App\Facades\Utils;
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
use App\Http\Requests\CreatePirepRequest;
|
use App\Http\Requests\CreatePirepRequest;
|
||||||
|
use App\Models\Enums\AcarsType;
|
||||||
use App\Models\Enums\PirepSource;
|
use App\Models\Enums\PirepSource;
|
||||||
use App\Models\Enums\PirepState;
|
use App\Models\Enums\PirepState;
|
||||||
use App\Models\Pirep;
|
use App\Models\Pirep;
|
||||||
|
use App\Repositories\AcarsRepository;
|
||||||
use App\Repositories\AirlineRepository;
|
use App\Repositories\AirlineRepository;
|
||||||
use App\Repositories\AirportRepository;
|
use App\Repositories\AirportRepository;
|
||||||
use App\Repositories\Criteria\WhereCriteria;
|
use App\Repositories\Criteria\WhereCriteria;
|
||||||
@ -182,11 +184,11 @@ class PirepController extends Controller
|
|||||||
return redirect(route('frontend.pirep.index'));
|
return redirect(route('frontend.pirep.index'));
|
||||||
}
|
}
|
||||||
|
|
||||||
$map_featuers = $this->geoSvc->pirepGeoJson($pirep);
|
$map_features = $this->geoSvc->pirepGeoJson($pirep);
|
||||||
|
|
||||||
return $this->view('pireps.show', [
|
return $this->view('pireps.show', [
|
||||||
'pirep' => $pirep,
|
'pirep' => $pirep,
|
||||||
'map_features' => $map_featuers,
|
'map_features' => $map_features,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -41,6 +41,14 @@
|
|||||||
@include('admin.pireps.comments')
|
@include('admin.pireps.comments')
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="card border-blue-bottom">
|
||||||
|
<div class="content">
|
||||||
|
<h4>flight log</h4>
|
||||||
|
@include('admin.pireps.flight_log')
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
|
14
resources/views/admin/pireps/flight_log.blade.php
Normal file
14
resources/views/admin/pireps/flight_log.blade.php
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
@if(count($pirep->acars_logs) > 0)
|
||||||
|
<div class="col-12">
|
||||||
|
<table class="table table-hover" id="users-table">
|
||||||
|
<tbody>
|
||||||
|
@foreach($pirep->acars_logs as $log)
|
||||||
|
<tr>
|
||||||
|
<td nowrap="true">{!! show_datetime($log->created_at) !!}</td>
|
||||||
|
<td>{!! $log->log !!}</td>
|
||||||
|
</tr>
|
||||||
|
@endforeach
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
@endif
|
@ -94,5 +94,26 @@
|
|||||||
@endif
|
@endif
|
||||||
|
|
||||||
@include("layouts.${SKIN_NAME}.pireps.map")
|
@include("layouts.${SKIN_NAME}.pireps.map")
|
||||||
|
|
||||||
|
@if(count($pirep->acars_logs) > 0)
|
||||||
|
<br /><br />
|
||||||
|
<div class="row clear">
|
||||||
|
<div class="col-12">
|
||||||
|
<h3 class="description">flight log</h3>
|
||||||
|
</div>
|
||||||
|
<div class="col-12">
|
||||||
|
<table class="table table-hover" id="users-table">
|
||||||
|
<tbody>
|
||||||
|
@foreach($pirep->acars_logs as $log)
|
||||||
|
<tr>
|
||||||
|
<td nowrap="true">{!! show_datetime($log->created_at) !!}</td>
|
||||||
|
<td>{!! $log->log !!}</td>
|
||||||
|
</tr>
|
||||||
|
@endforeach
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user