@@ -1,17 +1,17 @@
|
||||
@extends('admin.app')
|
||||
@section('title', 'Add Aircraft')
|
||||
@section('content')
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
@if(!filled($subfleets))
|
||||
<p class="text-center">
|
||||
You must add a subfleet before you can add an aircraft!
|
||||
</p>
|
||||
@else
|
||||
{{ Form::open(['route' => 'admin.aircraft.store']) }}
|
||||
@include('admin.aircraft.fields')
|
||||
{{ Form::close() }}
|
||||
@endif
|
||||
</div>
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
@if(!filled($subfleets))
|
||||
<p class="text-center">
|
||||
You must add a subfleet before you can add an aircraft!
|
||||
</p>
|
||||
@else
|
||||
{{ Form::open(['route' => 'admin.aircraft.store']) }}
|
||||
@include('admin.aircraft.fields')
|
||||
{{ Form::close() }}
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
@extends('admin.app')
|
||||
@section('title', "Edit \"$aircraft->name\"")
|
||||
@section('content')
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
{{ Form::model($aircraft, ['route' => ['admin.aircraft.update', $aircraft->id], 'method' => 'patch']) }}
|
||||
@include('admin.aircraft.fields')
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
{{ Form::model($aircraft, ['route' => ['admin.aircraft.update', $aircraft->id], 'method' => 'patch']) }}
|
||||
@include('admin.aircraft.fields')
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
@include('admin.aircraft.expenses')
|
||||
</div>
|
||||
</div>
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
@include('admin.aircraft.expenses')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
@include('admin.common.file_upload', ['model' => $aircraft])
|
||||
</div>
|
||||
</div>
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
@include('admin.common.file_upload', ['model' => $aircraft])
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@include('admin.aircraft.script')
|
||||
|
||||
@@ -1,78 +1,78 @@
|
||||
<div id="expenses-wrapper" class="col-12">
|
||||
<div class="header">
|
||||
<h3>expenses</h3>
|
||||
@component('admin.components.info')
|
||||
These expenses are only applied to this aircraft.
|
||||
@endcomponent
|
||||
</div>
|
||||
<div class="header">
|
||||
<h3>expenses</h3>
|
||||
@component('admin.components.info')
|
||||
These expenses are only applied to this aircraft.
|
||||
@endcomponent
|
||||
</div>
|
||||
|
||||
@if(count($aircraft->expenses) === 0)
|
||||
@include('admin.common.none_added', ['type' => 'expenses'])
|
||||
@if(count($aircraft->expenses) === 0)
|
||||
@include('admin.common.none_added', ['type' => 'expenses'])
|
||||
@endif
|
||||
|
||||
<table class="table table-responsive" id="expenses">
|
||||
@if(count($aircraft->expenses) > 0)
|
||||
<thead>
|
||||
<th>Name</th>
|
||||
<th>Cost <span class="small">{{ currency(config('phpvms.currency')) }}</span></th>
|
||||
<th>Type</th>
|
||||
<th></th>
|
||||
</thead>
|
||||
@endif
|
||||
|
||||
<table class="table table-responsive" id="expenses">
|
||||
@if(count($aircraft->expenses) > 0)
|
||||
<thead>
|
||||
<th>Name</th>
|
||||
<th>Cost <span class="small">{{ currency(config('phpvms.currency')) }}</span></th>
|
||||
<th>Type</th>
|
||||
<th></th>
|
||||
</thead>
|
||||
@endif
|
||||
<tbody>
|
||||
@foreach($aircraft->expenses as $expense)
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<a class="text" href="#" data-pk="{{ $expense->id }}"
|
||||
data-name="name">{{ $expense->name }}</a>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<a class="text" href="#" data-pk="{{ $expense->id }}"
|
||||
data-name="amount">{{ $expense->amount }}</a>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<a href="#"
|
||||
class="dropdown"
|
||||
data-pk="{{ $expense->id }}"
|
||||
data-name="type">{{ \App\Models\Enums\ExpenseType::label($expense->type) }}</a>
|
||||
</p>
|
||||
</td>
|
||||
<td align="right">
|
||||
{{ Form::open(['url' => url('/admin/aircraft/'.$aircraft->id.'/expenses'),
|
||||
'method' => 'delete', 'class' => 'modify_expense form-inline']) }}
|
||||
{{ Form::hidden('expense_id', $expense->id) }}
|
||||
{{ Form::button('<i class="fa fa-times"></i>', ['type' => 'submit',
|
||||
'class' => 'btn btn-sm btn-danger btn-icon',
|
||||
'onclick' => "return confirm('Are you sure?')",
|
||||
]) }}
|
||||
{{ Form::close() }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<hr/>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="text-right">
|
||||
{{ Form::open(['url' => url('/admin/aircraft/'.$aircraft->id.'/expenses'),
|
||||
'method' => 'post', 'class' => 'modify_expense form-inline']) }}
|
||||
{{ Form::input('text', 'name', null, ['class' => 'form-control input-sm', 'placeholder' => 'Name']) }}
|
||||
{{ Form::number('amount', null, ['class' => 'form-control input-sm', 'placeholder' => 'Amount', 'step' => '0.01']) }}
|
||||
{{ Form::select('type', \App\Models\Enums\ExpenseType::select(), null, ['class' => 'select2']) }}
|
||||
{{ Form::button('<i class="fa fa-plus"></i> Add', ['type' => 'submit',
|
||||
'class' => 'btn btn-success btn-small']) }}
|
||||
{{ Form::close() }}
|
||||
|
||||
<tbody>
|
||||
@foreach($aircraft->expenses as $expense)
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<a class="text" href="#" data-pk="{{ $expense->id }}"
|
||||
data-name="name">{{ $expense->name }}</a>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<a class="text" href="#" data-pk="{{ $expense->id }}"
|
||||
data-name="amount">{{ $expense->amount }}</a>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<a href="#"
|
||||
class="dropdown"
|
||||
data-pk="{{ $expense->id }}"
|
||||
data-name="type">{{ \App\Models\Enums\ExpenseType::label($expense->type) }}</a>
|
||||
</p>
|
||||
</td>
|
||||
<td align="right">
|
||||
{{ Form::open(['url' => url('/admin/aircraft/'.$aircraft->id.'/expenses'),
|
||||
'method' => 'delete', 'class' => 'modify_expense form-inline']) }}
|
||||
{{ Form::hidden('expense_id', $expense->id) }}
|
||||
{{ Form::button('<i class="fa fa-times"></i>', ['type' => 'submit',
|
||||
'class' => 'btn btn-sm btn-danger btn-icon',
|
||||
'onclick' => "return confirm('Are you sure?')",
|
||||
]) }}
|
||||
{{ Form::close() }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<hr/>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="text-right">
|
||||
{{ Form::open(['url' => url('/admin/aircraft/'.$aircraft->id.'/expenses'),
|
||||
'method' => 'post', 'class' => 'modify_expense form-inline']) }}
|
||||
{{ Form::input('text', 'name', null, ['class' => 'form-control input-sm', 'placeholder' => 'Name']) }}
|
||||
{{ Form::number('amount', null, ['class' => 'form-control input-sm', 'placeholder' => 'Amount', 'step' => '0.01']) }}
|
||||
{{ Form::select('type', \App\Models\Enums\ExpenseType::select(), null, ['class' => 'select2']) }}
|
||||
{{ Form::button('<i class="fa fa-plus"></i> Add', ['type' => 'submit',
|
||||
'class' => 'btn btn-success btn-small']) }}
|
||||
{{ Form::close() }}
|
||||
|
||||
<p class="text-danger">{{ $errors->first('name') }}</p>
|
||||
<p class="text-danger">{{ $errors->first('amount') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<p class="text-danger">{{ $errors->first('name') }}</p>
|
||||
<p class="text-danger">{{ $errors->first('amount') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,42 +1,42 @@
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="form-container">
|
||||
<h6><i class="fas fa-clock"></i>
|
||||
Subfleet and Status
|
||||
</h6>
|
||||
<div class="form-container-body row">
|
||||
<div class="form-group col-sm-4">
|
||||
{{ Form::label('subfleet_id', 'Subfleet:') }}
|
||||
{{ Form::select('subfleet_id', $subfleets, $subfleet_id ?? null, [
|
||||
'class' => 'form-control select2',
|
||||
'placeholder' => 'Select Subfleet'
|
||||
])
|
||||
}}
|
||||
<p class="text-danger">{{ $errors->first('subfleet_id') }}</p>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-4">
|
||||
{{ Form::label('status', 'Status:') }}
|
||||
{{ Form::select('status', $statuses, null, ['class' => 'form-control select2', 'placeholder' => 'Select Status']) }}
|
||||
<p class="text-danger">{{ $errors->first('subfleet_id') }}</p>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-4">
|
||||
{{ Form::label('airport_id', 'Location:') }}
|
||||
{{ Form::select('airport_id', $airports, null, [
|
||||
'class' => 'form-control select2'
|
||||
]) }}
|
||||
<p class="text-danger">{{ $errors->first('airport_id') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<div class="form-container">
|
||||
<h6><i class="fas fa-clock"></i>
|
||||
Subfleet and Status
|
||||
</h6>
|
||||
<div class="form-container-body row">
|
||||
<div class="form-group col-sm-4">
|
||||
{{ Form::label('subfleet_id', 'Subfleet:') }}
|
||||
{{ Form::select('subfleet_id', $subfleets, $subfleet_id ?? null, [
|
||||
'class' => 'form-control select2',
|
||||
'placeholder' => 'Select Subfleet'
|
||||
])
|
||||
}}
|
||||
<p class="text-danger">{{ $errors->first('subfleet_id') }}</p>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-4">
|
||||
{{ Form::label('status', 'Status:') }}
|
||||
{{ Form::select('status', $statuses, null, ['class' => 'form-control select2', 'placeholder' => 'Select Status']) }}
|
||||
<p class="text-danger">{{ $errors->first('subfleet_id') }}</p>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-4">
|
||||
{{ Form::label('airport_id', 'Location:') }}
|
||||
{{ Form::select('airport_id', $airports, null, [
|
||||
'class' => 'form-control select2'
|
||||
]) }}
|
||||
<p class="text-danger">{{ $errors->first('airport_id') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="form-container">
|
||||
<h6>
|
||||
<div class="col-12">
|
||||
<div class="form-container">
|
||||
<h6>
|
||||
<span style="float:right">
|
||||
View list of
|
||||
<a href="https://en.wikipedia.org/wiki/List_of_ICAO_aircraft_type_designators"
|
||||
@@ -44,47 +44,47 @@
|
||||
IATA and ICAO Type Designators
|
||||
</a>
|
||||
</span>
|
||||
<i class="fas fa-plane"></i>
|
||||
Aircraft Information
|
||||
<i class="fas fa-plane"></i>
|
||||
Aircraft Information
|
||||
|
||||
</h6>
|
||||
<div class="form-container-body">
|
||||
<div class="row">
|
||||
<div class="form-group col-sm-12">
|
||||
{{ Form::label('name', 'Name:') }} <span class="required">*</span>
|
||||
{{ Form::text('name', null, ['class' => 'form-control']) }}
|
||||
<p class="text-danger">{{ $errors->first('name') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-group col-sm-3">
|
||||
{{ Form::label('iata', 'IATA:') }}
|
||||
{{ Form::text('iata', null, ['class' => 'form-control']) }}
|
||||
<p class="text-danger">{{ $errors->first('iata') }}</p>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-3">
|
||||
{{ Form::label('icao', 'ICAO:') }}
|
||||
{{ Form::text('icao', null, ['class' => 'form-control']) }}
|
||||
<p class="text-danger">{{ $errors->first('icao') }}</p>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-3">
|
||||
{{ Form::label('registration', 'Registration:') }}
|
||||
{{ Form::text('registration', null, ['class' => 'form-control']) }}
|
||||
<p class="text-danger">{{ $errors->first('registration') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</h6>
|
||||
<div class="form-container-body">
|
||||
<div class="row">
|
||||
<div class="form-group col-sm-12">
|
||||
{{ Form::label('name', 'Name:') }} <span class="required">*</span>
|
||||
{{ Form::text('name', null, ['class' => 'form-control']) }}
|
||||
<p class="text-danger">{{ $errors->first('name') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-group col-sm-3">
|
||||
{{ Form::label('iata', 'IATA:') }}
|
||||
{{ Form::text('iata', null, ['class' => 'form-control']) }}
|
||||
<p class="text-danger">{{ $errors->first('iata') }}</p>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-3">
|
||||
{{ Form::label('icao', 'ICAO:') }}
|
||||
{{ Form::text('icao', null, ['class' => 'form-control']) }}
|
||||
<p class="text-danger">{{ $errors->first('icao') }}</p>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-3">
|
||||
{{ Form::label('registration', 'Registration:') }}
|
||||
{{ Form::text('registration', null, ['class' => 'form-control']) }}
|
||||
<p class="text-danger">{{ $errors->first('registration') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<!-- Submit Field -->
|
||||
<div class="form-group col-sm-12">
|
||||
<div class="pull-right">
|
||||
{{ Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-success']) }}
|
||||
<a href="{{ route('admin.aircraft.index') }}" class="btn btn-default">Cancel</a>
|
||||
</div>
|
||||
<!-- Submit Field -->
|
||||
<div class="form-group col-sm-12">
|
||||
<div class="pull-right">
|
||||
{{ Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-success']) }}
|
||||
<a href="{{ route('admin.aircraft.index') }}" class="btn btn-default">Cancel</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
@extends('admin.app')
|
||||
@section('title', 'Import Aircraft')
|
||||
@section('content')
|
||||
@include('admin.common.import', ['route' => 'admin.aircraft.import'])
|
||||
@include('admin.common.import', ['route' => 'admin.aircraft.import'])
|
||||
@endsection
|
||||
|
||||
@@ -2,18 +2,19 @@
|
||||
@section('title', 'Aircraft')
|
||||
|
||||
@section('actions')
|
||||
<li><a href="{{ route('admin.aircraft.export') }}"><i class="ti-plus"></i>Export to CSV</a></li>
|
||||
<li><a href="{{ route('admin.aircraft.import') }}"><i class="ti-plus"></i>Import from CSV</a></li>
|
||||
{{--<li><a href="{{ url('/admin/subfleets') }}"><i class="ti-files"></i>Subfleets</a></li>--}}
|
||||
<li><a href="{{ route('admin.aircraft.create') }}?subfleet={{$subfleet_id}}">
|
||||
<i class="ti-plus"></i>New Aircraft</a></li>
|
||||
<li><a href="{{ route('admin.aircraft.export') }}"><i class="ti-plus"></i>Export to CSV</a></li>
|
||||
<li><a href="{{ route('admin.aircraft.import') }}"><i class="ti-plus"></i>Import from CSV</a></li>
|
||||
{{--<li><a href="{{ url('/admin/subfleets') }}"><i class="ti-files"></i>Subfleets</a></li>--}}
|
||||
<li><a href="{{ route('admin.aircraft.create') }}?subfleet={{$subfleet_id}}">
|
||||
<i class="ti-plus"></i>New Aircraft</a>
|
||||
</li>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
@include('admin.aircraft.table')
|
||||
</div>
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
@include('admin.aircraft.table')
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
|
||||
@@ -1,70 +1,70 @@
|
||||
@section('scripts')
|
||||
<script>
|
||||
function setEditable() {
|
||||
const token = $('meta[name="csrf-token"]').attr('content');
|
||||
const api_key = $('meta[name="api-key"]').attr('content');
|
||||
<script>
|
||||
function setEditable() {
|
||||
const token = $('meta[name="csrf-token"]').attr('content');
|
||||
const api_key = $('meta[name="api-key"]').attr('content');
|
||||
|
||||
@if(isset($aircraft))
|
||||
$('#expenses a.text').editable({
|
||||
@if(isset($aircraft))
|
||||
$('#expenses a.text').editable({
|
||||
emptytext: '0',
|
||||
url: '{{ url('/admin/aircraft/'.$aircraft->id.'/expenses') }}',
|
||||
title: 'Enter override value',
|
||||
ajaxOptions: {
|
||||
type: 'post',
|
||||
headers: {
|
||||
'x-api-key': api_key,
|
||||
'X-CSRF-TOKEN': token,
|
||||
}
|
||||
type: 'post',
|
||||
headers: {
|
||||
'x-api-key': api_key,
|
||||
'X-CSRF-TOKEN': token,
|
||||
}
|
||||
},
|
||||
params: function (params) {
|
||||
return {
|
||||
_method: 'put',
|
||||
expense_id: params.pk,
|
||||
name: params.name,
|
||||
value: params.value
|
||||
}
|
||||
return {
|
||||
_method: 'put',
|
||||
expense_id: params.pk,
|
||||
name: params.name,
|
||||
value: params.value
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#expenses a.dropdown').editable({
|
||||
$('#expenses a.dropdown').editable({
|
||||
type: 'select',
|
||||
emptytext: '0',
|
||||
source: {!! json_encode(list_to_editable(\App\Models\Enums\ExpenseType::select())) !!},
|
||||
url: '{{ url('/admin/aircraft/'.$aircraft->id.'/expenses') }}',
|
||||
title: 'Enter override value',
|
||||
ajaxOptions: {
|
||||
type: 'post',
|
||||
headers: {
|
||||
'x-api-key': api_key,
|
||||
'X-CSRF-TOKEN': token,
|
||||
}
|
||||
type: 'post',
|
||||
headers: {
|
||||
'x-api-key': api_key,
|
||||
'X-CSRF-TOKEN': token,
|
||||
}
|
||||
},
|
||||
params: function (params) {
|
||||
return {
|
||||
_method: 'put',
|
||||
expense_id: params.pk,
|
||||
name: params.name,
|
||||
value: params.value
|
||||
}
|
||||
return {
|
||||
_method: 'put',
|
||||
expense_id: params.pk,
|
||||
name: params.name,
|
||||
value: params.value
|
||||
}
|
||||
}
|
||||
});
|
||||
@endif
|
||||
}
|
||||
});
|
||||
@endif
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
$(document).ready(function () {
|
||||
|
||||
setEditable();
|
||||
setEditable();
|
||||
|
||||
$(document).on('submit', 'form.modify_expense', function (event) {
|
||||
$(document).on('submit', 'form.modify_expense', function (event) {
|
||||
event.preventDefault();
|
||||
console.log(event);
|
||||
$.pjax.submit(event, '#expenses-wrapper', {push: false});
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('pjax:complete', function () {
|
||||
initPlugins();
|
||||
setEditable();
|
||||
$(document).on('pjax:complete', function () {
|
||||
initPlugins();
|
||||
setEditable();
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
@endsection
|
||||
|
||||
@@ -1,43 +1,44 @@
|
||||
@extends('admin.app')
|
||||
|
||||
@section('content')
|
||||
<section class="content-header">
|
||||
<section class="content-header">
|
||||
<h1 class="pull-left">{{ $aircraft->name }}</h1>
|
||||
<h1 class="pull-right">
|
||||
<a class="btn btn-primary pull-right" style="margin-top: -10px;margin-bottom: 5px" href="{{ route('admin.aircraft.edit', $aircraft->id) }}">Edit</a>
|
||||
<a class="btn btn-primary pull-right" style="margin-top: -10px;margin-bottom: 5px"
|
||||
href="{{ route('admin.aircraft.edit', $aircraft->id) }}">Edit</a>
|
||||
</h1>
|
||||
</section>
|
||||
<section class="content">
|
||||
</section>
|
||||
<section class="content">
|
||||
<div class="clearfix"></div>
|
||||
<div class="row">
|
||||
@include('admin.aircraft.show_fields')
|
||||
@include('admin.aircraft.show_fields')
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
@endsection
|
||||
@section('scripts')
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$(".ac-fare-dropdown").select2();
|
||||
$('#aircraft_fares a').editable({
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$(".ac-fare-dropdown").select2();
|
||||
$('#aircraft_fares a').editable({
|
||||
type: 'text',
|
||||
mode: 'inline',
|
||||
emptytext: 'default',
|
||||
url: '/admin/aircraft/{{ $aircraft->id }}/fares',
|
||||
title: 'Enter override value',
|
||||
ajaxOptions: { 'type': 'put'},
|
||||
params: function(params) {
|
||||
ajaxOptions: {'type': 'put'},
|
||||
params: function (params) {
|
||||
return {
|
||||
fare_id: params.pk,
|
||||
name: params.name,
|
||||
value: params.value
|
||||
fare_id: params.pk,
|
||||
name: params.name,
|
||||
value: params.value
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('submit', 'form.rm_fare', function(event) {
|
||||
$(document).on('submit', 'form.rm_fare', function (event) {
|
||||
event.preventDefault();
|
||||
$.pjax.submit(event, '#aircraft_fares_wrapper', {push: false});
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
@endsection
|
||||
|
||||
@@ -1,47 +1,47 @@
|
||||
<!-- Icao Field -->
|
||||
<div class="form-group col-sm-6">
|
||||
<div class="box box-solid">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ Form::label('airport_id', 'Location') }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<p class="lead">
|
||||
@if($aircraft->airport)
|
||||
{{ $aircraft->airport->icao }}</p>
|
||||
@endif
|
||||
</div>
|
||||
<div class="box box-solid">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ Form::label('airport_id', 'Location') }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<p class="lead">
|
||||
@if($aircraft->airport)
|
||||
{{ $aircraft->airport->icao }}</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Name Field -->
|
||||
<div class="form-group col-sm-6">
|
||||
<div class="box box-solid">
|
||||
<div class="box-header with-border">
|
||||
{{--<i class="fa fa-text-width"></i>--}}
|
||||
<h3 class="box-title">{{ Form::label('name', 'Name') }}</h3>
|
||||
</div>
|
||||
<div class="box-body"><p class="lead">{{ $aircraft->name }}</p></div>
|
||||
<div class="box box-solid">
|
||||
<div class="box-header with-border">
|
||||
{{--<i class="fa fa-text-width"></i>--}}
|
||||
<h3 class="box-title">{{ Form::label('name', 'Name') }}</h3>
|
||||
</div>
|
||||
<div class="box-body"><p class="lead">{{ $aircraft->name }}</p></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Registration Field -->
|
||||
<div class="form-group col-sm-6">
|
||||
<div class="box box-solid">
|
||||
<div class="box-header with-border">
|
||||
{{--<i class="fa fa-text-width"></i>--}}
|
||||
<h3 class="box-title">{{ Form::label('registration', 'Registration') }}</h3>
|
||||
</div>
|
||||
<div class="box-body"><p class="lead">{{ $aircraft->registration }}</p></div>
|
||||
<div class="box box-solid">
|
||||
<div class="box-header with-border">
|
||||
{{--<i class="fa fa-text-width"></i>--}}
|
||||
<h3 class="box-title">{{ Form::label('registration', 'Registration') }}</h3>
|
||||
</div>
|
||||
<div class="box-body"><p class="lead">{{ $aircraft->registration }}</p></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Active Field -->
|
||||
<div class="form-group col-sm-6">
|
||||
<div class="box box-solid">
|
||||
<div class="box-header with-border">
|
||||
{{--<i class="fa fa-text-width"></i>--}}
|
||||
<h3 class="box-title">{{ Form::label('active', 'Active:') }}</h3>
|
||||
</div>
|
||||
<div class="box-body"><p class="lead">@if ($aircraft->active == '1') yes @else no @endif</p></div>
|
||||
<div class="box box-solid">
|
||||
<div class="box-header with-border">
|
||||
{{--<i class="fa fa-text-width"></i>--}}
|
||||
<h3 class="box-title">{{ Form::label('active', 'Active:') }}</h3>
|
||||
</div>
|
||||
<div class="box-body"><p class="lead">@if ($aircraft->active == '1') yes @else no @endif</p></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,49 +1,49 @@
|
||||
<table class="table table-hover table-responsive" id="aircrafts-table">
|
||||
<thead>
|
||||
<th>Name</th>
|
||||
<th style="text-align: center;">Registration</th>
|
||||
<th>Subfleet</th>
|
||||
<th style="text-align: center;">Location</th>
|
||||
<th style="text-align: center;">Hours</th>
|
||||
<th style="text-align: center;">Active</th>
|
||||
<th style="text-align: right;"></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($aircraft as $ac)
|
||||
<tr>
|
||||
<td><a href="{{ route('admin.aircraft.edit', [$ac->id]) }}">{{ $ac->name }}</a></td>
|
||||
<td style="text-align: center;">{{ $ac->registration }}</td>
|
||||
<td>
|
||||
@if($ac->subfleet_id && $ac->subfleet)
|
||||
<a href="{{ route('admin.subfleets.edit', [$ac->subfleet_id]) }}">
|
||||
{{ $ac->subfleet->name }}
|
||||
</a>
|
||||
@else
|
||||
-
|
||||
@endif
|
||||
</td>
|
||||
<td style="text-align: center;">{{ $ac->airport_id }}</td>
|
||||
<td style="text-align: center;">
|
||||
{{ Utils::minutesToTimeString($ac->flight_hours) }}
|
||||
</td>
|
||||
<td style="text-align: center;">
|
||||
@if($ac->status == \App\Models\Enums\AircraftStatus::ACTIVE)
|
||||
<span class="label label-success">{{ \App\Models\Enums\AircraftStatus::label($ac->status) }}</span>
|
||||
@else
|
||||
<span class="label label-default">
|
||||
<thead>
|
||||
<th>Name</th>
|
||||
<th style="text-align: center;">Registration</th>
|
||||
<th>Subfleet</th>
|
||||
<th style="text-align: center;">Location</th>
|
||||
<th style="text-align: center;">Hours</th>
|
||||
<th style="text-align: center;">Active</th>
|
||||
<th style="text-align: right;"></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($aircraft as $ac)
|
||||
<tr>
|
||||
<td><a href="{{ route('admin.aircraft.edit', [$ac->id]) }}">{{ $ac->name }}</a></td>
|
||||
<td style="text-align: center;">{{ $ac->registration }}</td>
|
||||
<td>
|
||||
@if($ac->subfleet_id && $ac->subfleet)
|
||||
<a href="{{ route('admin.subfleets.edit', [$ac->subfleet_id]) }}">
|
||||
{{ $ac->subfleet->name }}
|
||||
</a>
|
||||
@else
|
||||
-
|
||||
@endif
|
||||
</td>
|
||||
<td style="text-align: center;">{{ $ac->airport_id }}</td>
|
||||
<td style="text-align: center;">
|
||||
{{ Utils::minutesToTimeString($ac->flight_hours) }}
|
||||
</td>
|
||||
<td style="text-align: center;">
|
||||
@if($ac->status == \App\Models\Enums\AircraftStatus::ACTIVE)
|
||||
<span class="label label-success">{{ \App\Models\Enums\AircraftStatus::label($ac->status) }}</span>
|
||||
@else
|
||||
<span class="label label-default">
|
||||
{{ \App\Models\Enums\AircraftStatus::label($ac->status) }}
|
||||
</span>
|
||||
@endif
|
||||
</td>
|
||||
<td style="width: 10%; text-align: right;">
|
||||
{{ Form::open(['route' => ['admin.aircraft.destroy', $ac->id], 'method' => 'delete']) }}
|
||||
<a href="{{ route('admin.aircraft.edit', [$ac->id]) }}" class='btn btn-sm btn-success btn-icon'>
|
||||
<i class="fas fa-pencil-alt"></i>
|
||||
</a>
|
||||
{{ Form::button('<i class="fa fa-times"></i>', ['type' => 'submit', 'class' => 'btn btn-sm btn-danger btn-icon', 'onclick' => "return confirm('Are you sure?')"]) }}
|
||||
{{ Form::close() }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
@endif
|
||||
</td>
|
||||
<td style="width: 10%; text-align: right;">
|
||||
{{ Form::open(['route' => ['admin.aircraft.destroy', $ac->id], 'method' => 'delete']) }}
|
||||
<a href="{{ route('admin.aircraft.edit', [$ac->id]) }}" class='btn btn-sm btn-success btn-icon'>
|
||||
<i class="fas fa-pencil-alt"></i>
|
||||
</a>
|
||||
{{ Form::button('<i class="fa fa-times"></i>', ['type' => 'submit', 'class' => 'btn btn-sm btn-danger btn-icon', 'onclick' => "return confirm('Are you sure?')"]) }}
|
||||
{{ Form::close() }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
@extends('admin.app')
|
||||
@section('title', 'Add Airline')
|
||||
@section('content')
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
{{ Form::open(['route' => 'admin.airlines.store']) }}
|
||||
@include('admin.airlines.fields')
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
{{ Form::open(['route' => 'admin.airlines.store']) }}
|
||||
@include('admin.airlines.fields')
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
@extends('admin.app')
|
||||
@section('title', "Edit \"$airline->name\"")
|
||||
@section('content')
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
{{ Form::model($airline, ['route' => ['admin.airlines.update', $airline->id], 'method' => 'patch']) }}
|
||||
@include('admin.airlines.fields')
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
{{ Form::model($airline, ['route' => ['admin.airlines.update', $airline->id], 'method' => 'patch']) }}
|
||||
@include('admin.airlines.fields')
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
@include('admin.common.file_upload', ['model' => $airline])
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@@ -1,55 +1,55 @@
|
||||
<div class="row">
|
||||
<!-- Code Field -->
|
||||
<div class="form-group col-sm-6">
|
||||
{{ Form::label('icao', 'Code:') }} <span class="required">*</span>
|
||||
{{ Form::text('icao', null, ['class' => 'form-control']) }}
|
||||
<p class="text-danger">{{ $errors->first('icao') }}</p>
|
||||
</div>
|
||||
<!-- Code Field -->
|
||||
<div class="form-group col-sm-6">
|
||||
{{ Form::label('icao', 'Code:') }} <span class="required">*</span>
|
||||
{{ Form::text('icao', null, ['class' => 'form-control']) }}
|
||||
<p class="text-danger">{{ $errors->first('icao') }}</p>
|
||||
</div>
|
||||
|
||||
<!-- Name Field -->
|
||||
<div class="form-group col-sm-6">
|
||||
{{ Form::label('name', 'Name:') }} <span class="required">*</span>
|
||||
{{ Form::text('name', null, ['class' => 'form-control']) }}
|
||||
<p class="text-danger">{{ $errors->first('name') }}</p>
|
||||
</div>
|
||||
<!-- Name Field -->
|
||||
<div class="form-group col-sm-6">
|
||||
{{ Form::label('name', 'Name:') }} <span class="required">*</span>
|
||||
{{ Form::text('name', null, ['class' => 'form-control']) }}
|
||||
<p class="text-danger">{{ $errors->first('name') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-group col-sm-6">
|
||||
{{ Form::label('iata', 'IATA:') }}
|
||||
{{ Form::text('iata', null, ['class' => 'form-control']) }}
|
||||
<p class="text-danger">{{ $errors->first('iata') }}</p>
|
||||
</div>
|
||||
<div class="form-group col-sm-6">
|
||||
{{ Form::label('iata', 'IATA:') }}
|
||||
{{ Form::text('iata', null, ['class' => 'form-control']) }}
|
||||
<p class="text-danger">{{ $errors->first('iata') }}</p>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-6">
|
||||
{{ Form::label('logo', 'Logo URL:') }}
|
||||
{{ Form::text('logo', null, ['class' => 'form-control']) }}
|
||||
<p class="text-danger">{{ $errors->first('logo') }}</p>
|
||||
</div>
|
||||
<div class="form-group col-sm-6">
|
||||
{{ Form::label('logo', 'Logo URL:') }}
|
||||
{{ Form::text('logo', null, ['class' => 'form-control']) }}
|
||||
<p class="text-danger">{{ $errors->first('logo') }}</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group col-sm-6">
|
||||
{{ Form::label('country', 'Country:') }} <br/>
|
||||
{{ Form::select('country', $countries, null, ['class' => 'form-control select2' ]) }}
|
||||
<p class="text-danger">{{ $errors->first('country') }}</p>
|
||||
</div>
|
||||
<div class="form-group col-sm-6">
|
||||
{{ Form::label('country', 'Country:') }} <br/>
|
||||
{{ Form::select('country', $countries, null, ['class' => 'form-control select2' ]) }}
|
||||
<p class="text-danger">{{ $errors->first('country') }}</p>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-6">
|
||||
{{ Form::label('active', 'Active:') }}
|
||||
<br />
|
||||
<label class="checkbox-inline">
|
||||
{{ Form::hidden('active', 0, false) }}
|
||||
{{ Form::checkbox('active', 1, null) }}
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-group col-sm-6">
|
||||
{{ Form::label('active', 'Active:') }}
|
||||
<br/>
|
||||
<label class="checkbox-inline">
|
||||
{{ Form::hidden('active', 0, false) }}
|
||||
{{ Form::checkbox('active', 1, null) }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<!-- Submit Field -->
|
||||
<div class="form-group col-sm-12">
|
||||
<div class="pull-right">
|
||||
{{ Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-success']) }}
|
||||
<a href="{{ route('admin.airlines.index') }}" class="btn btn-default">Cancel</a>
|
||||
</div>
|
||||
<!-- Submit Field -->
|
||||
<div class="form-group col-sm-12">
|
||||
<div class="pull-right">
|
||||
{{ Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-success']) }}
|
||||
<a href="{{ route('admin.airlines.index') }}" class="btn btn-default">Cancel</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -2,18 +2,18 @@
|
||||
|
||||
@section('title', 'Airlines')
|
||||
@section('actions')
|
||||
<li>
|
||||
<a href="{{ route('admin.airlines.create') }}">
|
||||
<i class="ti-plus"></i>
|
||||
Add New</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ route('admin.airlines.create') }}">
|
||||
<i class="ti-plus"></i>
|
||||
Add New</a>
|
||||
</li>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
@include('admin.airlines.table')
|
||||
</div>
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
@include('admin.airlines.table')
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
@extends('admin.app')
|
||||
|
||||
@section('content')
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
Airlines
|
||||
</h1>
|
||||
</section>
|
||||
<div class="content">
|
||||
<div class="box box-primary">
|
||||
<div class="box-body">
|
||||
<div class="row" style="padding-left: 20px">
|
||||
@include('admin.airlines.show_fields')
|
||||
<a href="{{ route('admin.airlines.index') }}" class="btn btn-default">Back</a>
|
||||
</div>
|
||||
</div>
|
||||
<section class="content-header">
|
||||
<h1>
|
||||
Airlines
|
||||
</h1>
|
||||
</section>
|
||||
<div class="content">
|
||||
<div class="box box-primary">
|
||||
<div class="box-body">
|
||||
<div class="row" style="padding-left: 20px">
|
||||
@include('admin.airlines.show_fields')
|
||||
<a href="{{ route('admin.airlines.index') }}" class="btn btn-default">Back</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@@ -1,40 +1,40 @@
|
||||
<!-- Code Field -->
|
||||
<div class="form-group">
|
||||
{{ Form::label('icao', 'ICAO:') }}
|
||||
<p>{{ $airlines->icao }}</p>
|
||||
{{ Form::label('icao', 'ICAO:') }}
|
||||
<p>{{ $airlines->icao }}</p>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('iata', 'IATA:') }}
|
||||
<p>{{ $airlines->iata }}</p>
|
||||
{{ Form::label('iata', 'IATA:') }}
|
||||
<p>{{ $airlines->iata }}</p>
|
||||
</div>
|
||||
|
||||
<!-- Name Field -->
|
||||
<div class="form-group">
|
||||
{{ Form::label('name', 'Name:') }}
|
||||
<p>{{ $airlines->name }}</p>
|
||||
{{ Form::label('name', 'Name:') }}
|
||||
<p>{{ $airlines->name }}</p>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{{ Form::label('logo', 'Logo URL:') }}
|
||||
<p>{{ $airlines->logo }}</p>
|
||||
{{ Form::label('logo', 'Logo URL:') }}
|
||||
<p>{{ $airlines->logo }}</p>
|
||||
</div>
|
||||
|
||||
<!-- Active Field -->
|
||||
<div class="form-group">
|
||||
{{ Form::label('active', 'Active:') }}
|
||||
<p>{{ $airlines->active }}</p>
|
||||
{{ Form::label('active', 'Active:') }}
|
||||
<p>{{ $airlines->active }}</p>
|
||||
</div>
|
||||
|
||||
<!-- Created At Field -->
|
||||
<div class="form-group">
|
||||
{{ Form::label('created_at', 'Created At:') }}
|
||||
<p>{{ show_datetime($airlines->created_at) }}</p>
|
||||
{{ Form::label('created_at', 'Created At:') }}
|
||||
<p>{{ show_datetime($airlines->created_at) }}</p>
|
||||
</div>
|
||||
|
||||
<!-- Updated At Field -->
|
||||
<div class="form-group">
|
||||
{{ Form::label('updated_at', 'Updated At:') }}
|
||||
<p>{{ show_datetime($airlines->updated_at) }}</p>
|
||||
{{ Form::label('updated_at', 'Updated At:') }}
|
||||
<p>{{ show_datetime($airlines->updated_at) }}</p>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,36 +1,36 @@
|
||||
<table class="table table-hover table-responsive" id="airlines-table">
|
||||
<thead>
|
||||
<th>Code</th>
|
||||
<th>Name</th>
|
||||
<th class="text-center">Active</th>
|
||||
<th></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($airlines as $al)
|
||||
<tr>
|
||||
<td nowrap="true">
|
||||
@if(filled($al->country))
|
||||
<span class="flag-icon flag-icon-{{ $al->country }}"></span>
|
||||
|
||||
@endif
|
||||
<a href="{{ route('admin.airlines.edit', [$al->id]) }}">{{ $al->iata }}/{{ $al->icao }}</a>
|
||||
</td>
|
||||
<td>{{ $al->name }}</td>
|
||||
<td class="text-center">
|
||||
@if($al->active == 1)
|
||||
<span class="label label-success">Active</span>
|
||||
@else
|
||||
<span class="label label-default">Inactive</span>
|
||||
@endif
|
||||
</td>
|
||||
<td class="text-right">
|
||||
{{ Form::open(['route' => ['admin.airlines.destroy', $al->id], 'method' => 'delete']) }}
|
||||
<a href="{{ route('admin.airlines.edit', [$al->id]) }}"
|
||||
class='btn btn-sm btn-success btn-icon'><i class="fas fa-pencil-alt"></i></a>
|
||||
{{ Form::button('<i class="fa fa-times"></i>', ['type' => 'submit', 'class' => 'btn btn-sm btn-danger btn-icon', 'onclick' => "return confirm('Are you sure?')"]) }}
|
||||
{{ Form::close() }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
<thead>
|
||||
<th>Code</th>
|
||||
<th>Name</th>
|
||||
<th class="text-center">Active</th>
|
||||
<th></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($airlines as $al)
|
||||
<tr>
|
||||
<td nowrap="true">
|
||||
@if(filled($al->country))
|
||||
<span class="flag-icon flag-icon-{{ $al->country }}"></span>
|
||||
|
||||
@endif
|
||||
<a href="{{ route('admin.airlines.edit', [$al->id]) }}">{{ $al->iata }}/{{ $al->icao }}</a>
|
||||
</td>
|
||||
<td>{{ $al->name }}</td>
|
||||
<td class="text-center">
|
||||
@if($al->active == 1)
|
||||
<span class="label label-success">Active</span>
|
||||
@else
|
||||
<span class="label label-default">Inactive</span>
|
||||
@endif
|
||||
</td>
|
||||
<td class="text-right">
|
||||
{{ Form::open(['route' => ['admin.airlines.destroy', $al->id], 'method' => 'delete']) }}
|
||||
<a href="{{ route('admin.airlines.edit', [$al->id]) }}"
|
||||
class='btn btn-sm btn-success btn-icon'><i class="fas fa-pencil-alt"></i></a>
|
||||
{{ Form::button('<i class="fa fa-times"></i>', ['type' => 'submit', 'class' => 'btn btn-sm btn-danger btn-icon', 'onclick' => "return confirm('Are you sure?')"]) }}
|
||||
{{ Form::close() }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
@section('title', 'Add Airport')
|
||||
|
||||
@section('content')
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
{{ Form::open(['route' => 'admin.airports.store', 'id' => 'airportForm']) }}
|
||||
@include('admin.airports.fields')
|
||||
{{ Form::close() }}
|
||||
{{ Form::open(['route' => 'admin.airports.store', 'id' => 'airportForm']) }}
|
||||
@include('admin.airports.fields')
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@include('admin.airports.script')
|
||||
|
||||
@@ -1,28 +1,28 @@
|
||||
@extends('admin.app')
|
||||
@section('title', "Edit \"$airport->name\"")
|
||||
@section('content')
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
{{ Form::model($airport, [
|
||||
'route' => ['admin.airports.update', $airport->id],
|
||||
'method' => 'patch',
|
||||
'id' => 'airportForm'])
|
||||
}}
|
||||
@include('admin.airports.fields')
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
{{ Form::model($airport, [
|
||||
'route' => ['admin.airports.update', $airport->id],
|
||||
'method' => 'patch',
|
||||
'id' => 'airportForm'])
|
||||
}}
|
||||
@include('admin.airports.fields')
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
@include('admin.airports.expenses')
|
||||
</div>
|
||||
</div>
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
@include('admin.airports.expenses')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
@include('admin.common.file_upload', ['model' => $airport])
|
||||
</div>
|
||||
</div>
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
@include('admin.common.file_upload', ['model' => $airport])
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@include('admin.airports.script')
|
||||
|
||||
@@ -1,75 +1,75 @@
|
||||
<div id="airport-expenses-wrapper" class="col-12">
|
||||
<div class="header">
|
||||
<h3>expenses</h3>
|
||||
@component('admin.components.info')
|
||||
These expenses are only applied to this airport.
|
||||
@endcomponent
|
||||
</div>
|
||||
<br/>
|
||||
<table class="table table-responsive" id="airport-expenses">
|
||||
|
||||
@if(count($airport->expenses))
|
||||
<thead>
|
||||
<th>Name</th>
|
||||
<th>Cost <span class="small">{{ currency(config('phpvms.currency')) }}</span></th>
|
||||
<th>Type</th>
|
||||
<th></th>
|
||||
</thead>
|
||||
@endif
|
||||
|
||||
<tbody>
|
||||
@foreach($airport->expenses as $expense)
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<a class="text" href="#" data-pk="{{ $expense->id }}"
|
||||
data-name="name">{{ $expense->name }}</a>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<a class="text" href="#" data-pk="{{ $expense->id }}"
|
||||
data-name="amount">{{ $expense->amount }}</a>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<a href="#"
|
||||
class="dropdown"
|
||||
data-pk="{{ $expense->id }}"
|
||||
data-name="type">{{ \App\Models\Enums\ExpenseType::label($expense->type) }}</a>
|
||||
</p>
|
||||
</td>
|
||||
<td align="right">
|
||||
{{ Form::open(['url' => url('/admin/airports/'.$airport->id.'/expenses'),
|
||||
'method' => 'delete', 'class' => 'modify_expense form-inline']) }}
|
||||
{{ Form::hidden('expense_id', $expense->id) }}
|
||||
{{ Form::button('<i class="fa fa-times"></i>', ['type' => 'submit',
|
||||
'class' => 'btn btn-sm btn-danger btn-icon',
|
||||
'onclick' => "return confirm('Are you sure?')",
|
||||
]) }}
|
||||
{{ Form::close() }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<hr/>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="text-right">
|
||||
{{ Form::open(['url' => url('/admin/airports/'.$airport->id.'/expenses'),
|
||||
'method' => 'post', 'class' => 'modify_expense form-inline']) }}
|
||||
{{ Form::input('text', 'name', null, ['class' => 'form-control input-sm', 'placeholder' => 'Name']) }}
|
||||
{{ Form::number('amount', null, ['class' => 'form-control input-sm', 'placeholder' => 'Amount', 'step' => '0.01']) }}
|
||||
{{ Form::select('type', \App\Models\Enums\ExpenseType::select(), null, ['class' => 'select2']) }}
|
||||
{{ Form::button('<i class="fa fa-plus"></i> Add', ['type' => 'submit',
|
||||
'class' => 'btn btn-success btn-small']) }}
|
||||
{{ Form::close() }}
|
||||
|
||||
<p class="text-danger">{{ $errors->first('name') }}</p>
|
||||
<p class="text-danger">{{ $errors->first('amount') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header">
|
||||
<h3>expenses</h3>
|
||||
@component('admin.components.info')
|
||||
These expenses are only applied to this airport.
|
||||
@endcomponent
|
||||
</div>
|
||||
<br/>
|
||||
<table class="table table-responsive" id="airport-expenses">
|
||||
|
||||
@if(count($airport->expenses))
|
||||
<thead>
|
||||
<th>Name</th>
|
||||
<th>Cost <span class="small">{{ currency(config('phpvms.currency')) }}</span></th>
|
||||
<th>Type</th>
|
||||
<th></th>
|
||||
</thead>
|
||||
@endif
|
||||
|
||||
<tbody>
|
||||
@foreach($airport->expenses as $expense)
|
||||
<tr>
|
||||
<td>
|
||||
<p>
|
||||
<a class="text" href="#" data-pk="{{ $expense->id }}"
|
||||
data-name="name">{{ $expense->name }}</a>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<a class="text" href="#" data-pk="{{ $expense->id }}"
|
||||
data-name="amount">{{ $expense->amount }}</a>
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>
|
||||
<a href="#"
|
||||
class="dropdown"
|
||||
data-pk="{{ $expense->id }}"
|
||||
data-name="type">{{ \App\Models\Enums\ExpenseType::label($expense->type) }}</a>
|
||||
</p>
|
||||
</td>
|
||||
<td align="right">
|
||||
{{ Form::open(['url' => url('/admin/airports/'.$airport->id.'/expenses'),
|
||||
'method' => 'delete', 'class' => 'modify_expense form-inline']) }}
|
||||
{{ Form::hidden('expense_id', $expense->id) }}
|
||||
{{ Form::button('<i class="fa fa-times"></i>', ['type' => 'submit',
|
||||
'class' => 'btn btn-sm btn-danger btn-icon',
|
||||
'onclick' => "return confirm('Are you sure?')",
|
||||
]) }}
|
||||
{{ Form::close() }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<hr/>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="text-right">
|
||||
{{ Form::open(['url' => url('/admin/airports/'.$airport->id.'/expenses'),
|
||||
'method' => 'post', 'class' => 'modify_expense form-inline']) }}
|
||||
{{ Form::input('text', 'name', null, ['class' => 'form-control input-sm', 'placeholder' => 'Name']) }}
|
||||
{{ Form::number('amount', null, ['class' => 'form-control input-sm', 'placeholder' => 'Amount', 'step' => '0.01']) }}
|
||||
{{ Form::select('type', \App\Models\Enums\ExpenseType::select(), null, ['class' => 'select2']) }}
|
||||
{{ Form::button('<i class="fa fa-plus"></i> Add', ['type' => 'submit',
|
||||
'class' => 'btn btn-success btn-small']) }}
|
||||
{{ Form::close() }}
|
||||
|
||||
<p class="text-danger">{{ $errors->first('name') }}</p>
|
||||
<p class="text-danger">{{ $errors->first('amount') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,101 +1,101 @@
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="col-lg-12">
|
||||
<!-- Icao Field -->
|
||||
<div class="row">
|
||||
<div class="form-group col-sm-6">
|
||||
{{ Form::label('icao', 'ICAO:') }} <span class="required">*</span>
|
||||
<a href="#" class="airport_data_lookup">Lookup</a>
|
||||
{{ Form::text('icao', null, [
|
||||
'id' => 'airport_icao', 'class' => 'form-control'
|
||||
]) }}
|
||||
<p class="text-danger">{{ $errors->first('icao') }}</p>
|
||||
</div>
|
||||
<div class="form-group col-sm-6">
|
||||
{{ Form::label('icao', 'ICAO:') }} <span class="required">*</span>
|
||||
<a href="#" class="airport_data_lookup">Lookup</a>
|
||||
{{ Form::text('icao', null, [
|
||||
'id' => 'airport_icao', 'class' => 'form-control'
|
||||
]) }}
|
||||
<p class="text-danger">{{ $errors->first('icao') }}</p>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-6">
|
||||
{{ Form::label('iata', 'IATA:') }}
|
||||
{{ Form::text('iata', null, ['class' => 'form-control']) }}
|
||||
<p class="text-danger">{{ $errors->first('iata') }}</p>
|
||||
</div>
|
||||
<div class="form-group col-sm-6">
|
||||
{{ Form::label('iata', 'IATA:') }}
|
||||
{{ Form::text('iata', null, ['class' => 'form-control']) }}
|
||||
<p class="text-danger">{{ $errors->first('iata') }}</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group col-sm-4">
|
||||
{{ Form::label('name', 'Name:') }} <span class="required">*</span>
|
||||
{{ Form::text('name', null, ['class' => 'form-control']) }}
|
||||
<p class="text-danger">{{ $errors->first('name') }}</p>
|
||||
</div>
|
||||
<div class="form-group col-sm-4">
|
||||
{{ Form::label('lat', 'Latitude:') }} <span class="required">*</span>
|
||||
{{ Form::text('lat', null, ['class' => 'form-control', 'rv-value' => 'airport.lat']) }}
|
||||
<p class="text-danger">{{ $errors->first('lat') }}</p>
|
||||
</div>
|
||||
<div class="form-group col-sm-4">
|
||||
{{ Form::label('name', 'Name:') }} <span class="required">*</span>
|
||||
{{ Form::text('name', null, ['class' => 'form-control']) }}
|
||||
<p class="text-danger">{{ $errors->first('name') }}</p>
|
||||
</div>
|
||||
<div class="form-group col-sm-4">
|
||||
{{ Form::label('lat', 'Latitude:') }} <span class="required">*</span>
|
||||
{{ Form::text('lat', null, ['class' => 'form-control', 'rv-value' => 'airport.lat']) }}
|
||||
<p class="text-danger">{{ $errors->first('lat') }}</p>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-4">
|
||||
{{ Form::label('lon', 'Longitude:') }} <span class="required">*</span>
|
||||
{{ Form::text('lon', null, ['class' => 'form-control', 'rv-value' => 'airport.lon']) }}
|
||||
<p class="text-danger">{{ $errors->first('lon') }}</p>
|
||||
</div>
|
||||
<div class="form-group col-sm-4">
|
||||
{{ Form::label('lon', 'Longitude:') }} <span class="required">*</span>
|
||||
{{ Form::text('lon', null, ['class' => 'form-control', 'rv-value' => 'airport.lon']) }}
|
||||
<p class="text-danger">{{ $errors->first('lon') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="form-group col-sm-4">
|
||||
{{ Form::label('country', 'Country:') }}
|
||||
{{ Form::text('country', null, ['class' => 'form-control']) }}
|
||||
<p class="text-danger">{{ $errors->first('country') }}</p>
|
||||
</div>
|
||||
<div class="form-group col-sm-4">
|
||||
{{ Form::label('country', 'Country:') }}
|
||||
{{ Form::text('country', null, ['class' => 'form-control']) }}
|
||||
<p class="text-danger">{{ $errors->first('country') }}</p>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-4">
|
||||
{{ Form::label('location', 'Location:') }}
|
||||
{{ Form::text('location', null, ['class' => 'form-control']) }}
|
||||
<p class="text-danger">{{ $errors->first('location') }}</p>
|
||||
</div>
|
||||
<div class="form-group col-sm-4">
|
||||
{{ Form::label('location', 'Location:') }}
|
||||
{{ Form::text('location', null, ['class' => 'form-control']) }}
|
||||
<p class="text-danger">{{ $errors->first('location') }}</p>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-4">
|
||||
{{ Form::label('timezone', 'Timezone:') }}
|
||||
{{ Form::select('timezone', $timezones, null, ['id' => 'timezone', 'class' => 'select2']) }}
|
||||
<p class="text-danger">{{ $errors->first('timezone') }}</p>
|
||||
</div>
|
||||
<div class="form-group col-sm-4">
|
||||
{{ Form::label('timezone', 'Timezone:') }}
|
||||
{{ Form::select('timezone', $timezones, null, ['id' => 'timezone', 'class' => 'select2']) }}
|
||||
<p class="text-danger">{{ $errors->first('timezone') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group col-sm-6">
|
||||
{{ Form::label('ground_handling_cost', 'Ground Handling Cost:') }}
|
||||
{{ Form::number('ground_handling_cost', null, ['class' => 'form-control', 'step' => '0.01']) }}
|
||||
<p class="text-danger">{{ $errors->first('ground_handling_cost') }}</p>
|
||||
<div class="form-group col-sm-6">
|
||||
{{ Form::label('ground_handling_cost', 'Ground Handling Cost:') }}
|
||||
{{ Form::number('ground_handling_cost', null, ['class' => 'form-control', 'step' => '0.01']) }}
|
||||
<p class="text-danger">{{ $errors->first('ground_handling_cost') }}</p>
|
||||
|
||||
@component('admin.components.info')
|
||||
This is the base rate per-flight. A multiplier for this rate can be
|
||||
set in the subfleet, so you can modulate those costs from there.
|
||||
@endcomponent
|
||||
</div>
|
||||
@component('admin.components.info')
|
||||
This is the base rate per-flight. A multiplier for this rate can be
|
||||
set in the subfleet, so you can modulate those costs from there.
|
||||
@endcomponent
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-6">
|
||||
{{ Form::label('fuel_jeta_cost', 'Jet A Fuel Cost:') }}
|
||||
{{ Form::number('fuel_jeta_cost', null, ['class' => 'form-control', 'step' => '0.01']) }}
|
||||
<p class="text-danger">{{ $errors->first('fuel_jeta_cost') }}</p>
|
||||
<div class="form-group col-md-6">
|
||||
{{ Form::label('fuel_jeta_cost', 'Jet A Fuel Cost:') }}
|
||||
{{ Form::number('fuel_jeta_cost', null, ['class' => 'form-control', 'step' => '0.01']) }}
|
||||
<p class="text-danger">{{ $errors->first('fuel_jeta_cost') }}</p>
|
||||
|
||||
@component('admin.components.info')
|
||||
This is the cost per {{ config('phpvms.internal_units.fuel') }}
|
||||
@endcomponent
|
||||
</div>
|
||||
@component('admin.components.info')
|
||||
This is the cost per {{ config('phpvms.internal_units.fuel') }}
|
||||
@endcomponent
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group col-sm-4">
|
||||
{{ Form::label('hub', 'Hub:') }}
|
||||
{{ Form::hidden('hub', 0) }}
|
||||
{{ Form::checkbox('hub', null) }}
|
||||
</div>
|
||||
<!-- Submit Field -->
|
||||
<div class="form-group col-sm-8">
|
||||
<div class="text-right">
|
||||
{{ Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-success']) }}
|
||||
<a href="{{ route('admin.airports.index') }}" class="btn btn-default">Cancel</a>
|
||||
</div>
|
||||
<div class="form-group col-sm-4">
|
||||
{{ Form::label('hub', 'Hub:') }}
|
||||
{{ Form::hidden('hub', 0) }}
|
||||
{{ Form::checkbox('hub', null) }}
|
||||
</div>
|
||||
<!-- Submit Field -->
|
||||
<div class="form-group col-sm-8">
|
||||
<div class="text-right">
|
||||
{{ Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-success']) }}
|
||||
<a href="{{ route('admin.airports.index') }}" class="btn btn-default">Cancel</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
@extends('admin.app')
|
||||
@section('title', 'Import Airports')
|
||||
@section('content')
|
||||
@include('admin.common.import', ['route' => 'admin.airports.import'])
|
||||
@include('admin.common.import', ['route' => 'admin.airports.import'])
|
||||
@endsection
|
||||
|
||||
@@ -2,26 +2,26 @@
|
||||
@section('title', 'Airports')
|
||||
|
||||
@section('actions')
|
||||
<li><a href="{{ route('admin.airports.export') }}"><i class="ti-plus"></i>Export to CSV</a></li>
|
||||
<li><a href="{{ route('admin.airports.import') }}"><i class="ti-plus"></i>Import from CSV</a></li>
|
||||
<li><a href="{{ route('admin.airports.create') }}"><i class="ti-plus"></i>Add New</a></li>
|
||||
<li><a href="{{ route('admin.airports.export') }}"><i class="ti-plus"></i>Export to CSV</a></li>
|
||||
<li><a href="{{ route('admin.airports.import') }}"><i class="ti-plus"></i>Import from CSV</a></li>
|
||||
<li><a href="{{ route('admin.airports.create') }}"><i class="ti-plus"></i>Add New</a></li>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="card">
|
||||
@include('admin.airports.search')
|
||||
</div>
|
||||
<div class="card">
|
||||
@include('admin.airports.search')
|
||||
</div>
|
||||
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
@include('admin.airports.table')
|
||||
</div>
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
@include('admin.airports.table')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12 text-center">
|
||||
{{ $airports->links('admin.pagination.default') }}
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12 text-center">
|
||||
{{ $airports->links('admin.pagination.default') }}
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@include('admin.airports.script')
|
||||
|
||||
@@ -1,126 +1,126 @@
|
||||
@section('scripts')
|
||||
<script>
|
||||
'use strict';
|
||||
<script>
|
||||
'use strict';
|
||||
|
||||
function setEditable() {
|
||||
const csrf_token = $('meta[name="csrf-token"]').attr('content');
|
||||
const api_key = $('meta[name="api-key"]').attr('content');
|
||||
function setEditable() {
|
||||
const csrf_token = $('meta[name="csrf-token"]').attr('content');
|
||||
const api_key = $('meta[name="api-key"]').attr('content');
|
||||
|
||||
@if(isset($airport))
|
||||
$('#airport-expenses a.text').editable({
|
||||
@if(isset($airport))
|
||||
$('#airport-expenses a.text').editable({
|
||||
emptytext: '0',
|
||||
url: '{{ url('/admin/airports/'.$airport->id.'/expenses') }}',
|
||||
title: 'Enter override value',
|
||||
ajaxOptions: {
|
||||
type: 'post',
|
||||
headers: {
|
||||
'x-api-key': api_key,
|
||||
'X-CSRF-TOKEN': csrf_token
|
||||
}
|
||||
type: 'post',
|
||||
headers: {
|
||||
'x-api-key': api_key,
|
||||
'X-CSRF-TOKEN': csrf_token
|
||||
}
|
||||
},
|
||||
params: function (params) {
|
||||
return {
|
||||
_method: 'put',
|
||||
expense_id: params.pk,
|
||||
name: params.name,
|
||||
value: params.value
|
||||
}
|
||||
return {
|
||||
_method: 'put',
|
||||
expense_id: params.pk,
|
||||
name: params.name,
|
||||
value: params.value
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#airport-expenses a.dropdown').editable({
|
||||
$('#airport-expenses a.dropdown').editable({
|
||||
type: 'select',
|
||||
emptytext: '0',
|
||||
source: {!! json_encode(list_to_editable(\App\Models\Enums\ExpenseType::select())) !!},
|
||||
url: '{{ url('/admin/airports/'.$airport->id.'/expenses') }}',
|
||||
title: 'Enter override value',
|
||||
ajaxOptions: {
|
||||
type: 'post',
|
||||
headers: {
|
||||
'x-api-key': api_key,
|
||||
'X-CSRF-TOKEN': csrf_token
|
||||
}
|
||||
type: 'post',
|
||||
headers: {
|
||||
'x-api-key': api_key,
|
||||
'X-CSRF-TOKEN': csrf_token
|
||||
}
|
||||
},
|
||||
params: function (params) {
|
||||
return {
|
||||
_method: 'put',
|
||||
expense_id: params.pk,
|
||||
name: params.name,
|
||||
value: params.value
|
||||
}
|
||||
return {
|
||||
_method: 'put',
|
||||
expense_id: params.pk,
|
||||
name: params.name,
|
||||
value: params.value
|
||||
}
|
||||
}
|
||||
});
|
||||
@endif
|
||||
}
|
||||
});
|
||||
@endif
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
const api_key = $('meta[name="api-key"]').attr('content');
|
||||
const csrf_token = $('meta[name="csrf-token"]').attr('content');
|
||||
$(document).ready(function () {
|
||||
const api_key = $('meta[name="api-key"]').attr('content');
|
||||
const csrf_token = $('meta[name="csrf-token"]').attr('content');
|
||||
|
||||
setEditable();
|
||||
setEditable();
|
||||
|
||||
$('#airports-table a.inline').editable({
|
||||
$('#airports-table a.inline').editable({
|
||||
type: 'text',
|
||||
mode: 'inline',
|
||||
emptytext: '0',
|
||||
url: '{{ url('/admin/airports/fuel') }}',
|
||||
title: 'Enter price per unit of fuel',
|
||||
ajaxOptions: {
|
||||
type: 'post',
|
||||
headers: {
|
||||
'x-api-key': api_key,
|
||||
'X-CSRF-TOKEN': csrf_token
|
||||
}
|
||||
type: 'post',
|
||||
headers: {
|
||||
'x-api-key': api_key,
|
||||
'X-CSRF-TOKEN': csrf_token
|
||||
}
|
||||
},
|
||||
params: function(params) {
|
||||
return {
|
||||
_method: 'put',
|
||||
id: params.pk,
|
||||
name: params.name,
|
||||
value: params.value
|
||||
}
|
||||
params: function (params) {
|
||||
return {
|
||||
_method: 'put',
|
||||
id: params.pk,
|
||||
name: params.name,
|
||||
value: params.value
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('a.airport_data_lookup').click(async function(e) {
|
||||
$('a.airport_data_lookup').click(async function (e) {
|
||||
e.preventDefault();
|
||||
const icao = $("input#airport_icao").val();
|
||||
if(icao === '') {
|
||||
return;
|
||||
if (icao === '') {
|
||||
return;
|
||||
}
|
||||
|
||||
let response;
|
||||
try {
|
||||
response = await phpvms.airport_lookup(icao);
|
||||
response = await phpvms.airport_lookup(icao);
|
||||
} catch (e) {
|
||||
console.log('Error looking up airport!', e);
|
||||
return;
|
||||
console.log('Error looking up airport!', e);
|
||||
return;
|
||||
}
|
||||
|
||||
_.forEach(response.data, function (value, key) {
|
||||
if (key === 'city') {
|
||||
key = 'location';
|
||||
}
|
||||
if (key === 'city') {
|
||||
key = 'location';
|
||||
}
|
||||
|
||||
$("#" + key).val(value);
|
||||
$("#" + key).val(value);
|
||||
|
||||
if (key === 'tz') {
|
||||
$("#timezone").val(value);
|
||||
$("#timezone").trigger('change');
|
||||
}
|
||||
if (key === 'tz') {
|
||||
$("#timezone").val(value);
|
||||
$("#timezone").trigger('change');
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('submit', 'form.modify_expense', function (event) {
|
||||
$(document).on('submit', 'form.modify_expense', function (event) {
|
||||
event.preventDefault();
|
||||
console.log(event);
|
||||
$.pjax.submit(event, '#airport-expenses-wrapper', {push: false});
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('pjax:complete', function () {
|
||||
$(document).on('pjax:complete', function () {
|
||||
initPlugins();
|
||||
setEditable();
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
@endsection
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
<div class="content">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group">
|
||||
{{ Form::open(['route' => 'admin.airports.index', 'method' => 'GET', 'class'=>'form-inline pull-right']) }}
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group">
|
||||
{{ Form::open(['route' => 'admin.airports.index', 'method' => 'GET', 'class'=>'form-inline pull-right']) }}
|
||||
|
||||
{{ Form::label('icao', 'ICAO:') }}
|
||||
{{ Form::text('icao', null, ['class' => 'form-control']) }}
|
||||
|
||||
<a href="{{ route('admin.airports.index') }}">clear</a>
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
{{ Form::label('icao', 'ICAO:') }}
|
||||
{{ Form::text('icao', null, ['class' => 'form-control']) }}
|
||||
|
||||
<a href="{{ route('admin.airports.index') }}">clear</a>
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,35 +1,36 @@
|
||||
@extends('admin.app')
|
||||
|
||||
@section('content')
|
||||
<section class="content-header">
|
||||
<section class="content-header">
|
||||
<h1 class="pull-left">{{ $airport->name }} - {{ $airport->location }}</h1>
|
||||
<h1 class="pull-right">
|
||||
<a class="btn btn-primary pull-right" style="margin-top: -10px;margin-bottom: 5px" href="{{ route('admin.airports.edit', $airport->id) }}">Edit</a>
|
||||
<a class="btn btn-primary pull-right" style="margin-top: -10px;margin-bottom: 5px"
|
||||
href="{{ route('admin.airports.edit', $airport->id) }}">Edit</a>
|
||||
</h1>
|
||||
</section>
|
||||
<section class="content">
|
||||
</section>
|
||||
<section class="content">
|
||||
<div class="clearfix"></div>
|
||||
<div class="row">
|
||||
@include('admin.airports.show_fields')
|
||||
@include('admin.airports.show_fields')
|
||||
</div>
|
||||
<div class="box box-primary">
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box-body">
|
||||
<div id="map" style="width: 100%; height: 800px"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="box-body">
|
||||
<div id="map" style="width: 100%; height: 800px"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
@endsection
|
||||
@section('scripts')
|
||||
<script type="text/javascript">
|
||||
phpvms_render_airspace_map({
|
||||
lat: {{ $airport->lat }},
|
||||
lon: {{ $airport->lon }},
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
phpvms_render_airspace_map({
|
||||
lat: {{ $airport->lat }},
|
||||
lon: {{ $airport->lon }},
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
|
||||
@@ -1,22 +1,21 @@
|
||||
|
||||
<div class="form-group col-sm-6">
|
||||
<div class="box box-solid">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">ICAO</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<p class="lead">{{ $airport->icao }}<strong></p>
|
||||
</div>
|
||||
<div class="box box-solid">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">ICAO</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<p class="lead">{{ $airport->icao }}<strong></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-6">
|
||||
<div class="box box-solid">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Coordinates</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<p class="lead">{{ $airport->lat}}/{{ $airport->lon }}</p>
|
||||
</div>
|
||||
<div class="box box-solid">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Coordinates</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<p class="lead">{{ $airport->lat}}/{{ $airport->lon }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,39 +1,41 @@
|
||||
<div id="airports_table_wrapper">
|
||||
<table class="table table-hover table-responsive" id="airports-table">
|
||||
<thead>
|
||||
<th>ICAO</th>
|
||||
<th>Name</th>
|
||||
<th>Location</th>
|
||||
<th>Hub</th>
|
||||
<th style="text-align: center;">GH Cost</th>
|
||||
<th style="text-align: center;">JetA</th>
|
||||
<th></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($airports as $airport)
|
||||
<tr>
|
||||
<td><a href="{{ route('admin.airports.edit', [$airport->id]) }}">{{ $airport->icao }}</a></td>
|
||||
<td>{{ $airport->name }}</td>
|
||||
<td>{{ $airport->location }}</td>
|
||||
<td style="text-align: center;">
|
||||
@if($airport->hub === true)
|
||||
<span class="label label-success">Hub</span>
|
||||
@endif
|
||||
</td>
|
||||
<td style="text-align: center;">
|
||||
{{ $airport->ground_handling_cost }}
|
||||
</td>
|
||||
<td style="text-align: center;">
|
||||
<a class="inline" href="#" data-pk="{{ $airport->id }}" data-name="fuel_jeta_cost">{{ $airport->fuel_jeta_cost }}</a>
|
||||
</td>
|
||||
<td style="text-align: right;">
|
||||
{{ Form::open(['route' => ['admin.airports.destroy', $airport->id], 'method' => 'delete']) }}
|
||||
<a href="{{ route('admin.airports.edit', [$airport->id]) }}" class='btn btn-sm btn-success btn-icon'><i class="fas fa-pencil-alt"></i></a>
|
||||
{{ Form::button('<i class="fa fa-times"></i>', ['type' => 'submit', 'class' => 'btn btn-sm btn-danger btn-icon', 'onclick' => "return confirm('Are you sure?')"]) }}
|
||||
{{ Form::close() }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<table class="table table-hover table-responsive" id="airports-table">
|
||||
<thead>
|
||||
<th>ICAO</th>
|
||||
<th>Name</th>
|
||||
<th>Location</th>
|
||||
<th>Hub</th>
|
||||
<th style="text-align: center;">GH Cost</th>
|
||||
<th style="text-align: center;">JetA</th>
|
||||
<th></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($airports as $airport)
|
||||
<tr>
|
||||
<td><a href="{{ route('admin.airports.edit', [$airport->id]) }}">{{ $airport->icao }}</a></td>
|
||||
<td>{{ $airport->name }}</td>
|
||||
<td>{{ $airport->location }}</td>
|
||||
<td style="text-align: center;">
|
||||
@if($airport->hub === true)
|
||||
<span class="label label-success">Hub</span>
|
||||
@endif
|
||||
</td>
|
||||
<td style="text-align: center;">
|
||||
{{ $airport->ground_handling_cost }}
|
||||
</td>
|
||||
<td style="text-align: center;">
|
||||
<a class="inline" href="#" data-pk="{{ $airport->id }}"
|
||||
data-name="fuel_jeta_cost">{{ $airport->fuel_jeta_cost }}</a>
|
||||
</td>
|
||||
<td style="text-align: right;">
|
||||
{{ Form::open(['route' => ['admin.airports.destroy', $airport->id], 'method' => 'delete']) }}
|
||||
<a href="{{ route('admin.airports.edit', [$airport->id]) }}" class='btn btn-sm btn-success btn-icon'><i
|
||||
class="fas fa-pencil-alt"></i></a>
|
||||
{{ Form::button('<i class="fa fa-times"></i>', ['type' => 'submit', 'class' => 'btn btn-sm btn-danger btn-icon', 'onclick' => "return confirm('Are you sure?')"]) }}
|
||||
{{ Form::close() }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
@extends('admin.app')
|
||||
@section('title', 'Add Award')
|
||||
@section('content')
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
{{ Form::open(['route' => 'admin.awards.store']) }}
|
||||
@include('admin.awards.fields')
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
{{ Form::open(['route' => 'admin.awards.store']) }}
|
||||
@include('admin.awards.fields')
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@include('admin.awards.scripts')
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
@extends('admin.app')
|
||||
@section('title', "Edit \"$award->title\" Award")
|
||||
@section('content')
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
{{ Form::model($award, ['route' => ['admin.awards.update', $award->id], 'method' => 'patch']) }}
|
||||
@include('admin.awards.fields')
|
||||
{{ Form::close() }}
|
||||
{{ Form::model($award, ['route' => ['admin.awards.update', $award->id], 'method' => 'patch']) }}
|
||||
@include('admin.awards.fields')
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@include('admin.awards.scripts')
|
||||
|
||||
@@ -1,78 +1,78 @@
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
@component('admin.components.info')
|
||||
These are the awards that pilots can earn. Each award is assigned an
|
||||
award class, which will be run whenever a pilot's stats are changed,
|
||||
including after a PIREP is accepted.
|
||||
@endcomponent
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
@component('admin.components.info')
|
||||
These are the awards that pilots can earn. Each award is assigned an
|
||||
award class, which will be run whenever a pilot's stats are changed,
|
||||
including after a PIREP is accepted.
|
||||
@endcomponent
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-group col-sm-6">
|
||||
{!! Form::label('name', 'Name:') !!} <span class="required">*</span>
|
||||
<div class="callout callout-info">
|
||||
<i class="icon fa fa-info"> </i>
|
||||
This will be the title of the award
|
||||
</div>
|
||||
{!! Form::text('name', null, ['class' => 'form-control']) !!}
|
||||
<p class="text-danger">{{ $errors->first('name') }}</p>
|
||||
<div class="form-group col-sm-6">
|
||||
{!! Form::label('name', 'Name:') !!} <span class="required">*</span>
|
||||
<div class="callout callout-info">
|
||||
<i class="icon fa fa-info"> </i>
|
||||
This will be the title of the award
|
||||
</div>
|
||||
{!! Form::text('name', null, ['class' => 'form-control']) !!}
|
||||
<p class="text-danger">{{ $errors->first('name') }}</p>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group col-sm-6">
|
||||
{!! Form::label('image', 'Image:') !!}
|
||||
<div class="callout callout-info">
|
||||
<i class="icon fa fa-info"> </i>
|
||||
This is the image of the award. Be creative!
|
||||
</div>
|
||||
{!! Form::text('image_url', null, [
|
||||
'class' => 'form-control',
|
||||
'placeholder' => 'Enter the url of the image location'
|
||||
]) !!}
|
||||
<p class="text-danger">{{ $errors->first('image_url') }}</p>
|
||||
<div class="form-group col-sm-6">
|
||||
{!! Form::label('image', 'Image:') !!}
|
||||
<div class="callout callout-info">
|
||||
<i class="icon fa fa-info"> </i>
|
||||
This is the image of the award. Be creative!
|
||||
</div>
|
||||
{!! Form::text('image_url', null, [
|
||||
'class' => 'form-control',
|
||||
'placeholder' => 'Enter the url of the image location'
|
||||
]) !!}
|
||||
<p class="text-danger">{{ $errors->first('image_url') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group col-sm-6">
|
||||
{!! Form::label('description', 'Description:') !!} 
|
||||
<div class="callout callout-info">
|
||||
<i class="icon fa fa-info"> </i>
|
||||
This is the description of the award.
|
||||
</div>
|
||||
{!! Form::textarea('description', null, ['class' => 'form-control']) !!}
|
||||
<p class="text-danger">{{ $errors->first('description') }}</p>
|
||||
<div class="form-group col-sm-6">
|
||||
{!! Form::label('description', 'Description:') !!} 
|
||||
<div class="callout callout-info">
|
||||
<i class="icon fa fa-info"> </i>
|
||||
This is the description of the award.
|
||||
</div>
|
||||
{!! Form::textarea('description', null, ['class' => 'form-control']) !!}
|
||||
<p class="text-danger">{{ $errors->first('description') }}</p>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-6">
|
||||
<div>
|
||||
{{ Form::label('ref_model', 'Award Class:') }}
|
||||
{{ Form::select('ref_model', $award_classes, null , [
|
||||
'class' => 'form-control select2',
|
||||
'id' => 'award_class_select',
|
||||
]) }}
|
||||
<p class="text-danger">{{ $errors->first('ref_model') }}</p>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-6">
|
||||
<div>
|
||||
{{ Form::label('ref_model', 'Award Class:') }}
|
||||
{{ Form::select('ref_model', $award_classes, null , [
|
||||
'class' => 'form-control select2',
|
||||
'id' => 'award_class_select',
|
||||
]) }}
|
||||
<p class="text-danger">{{ $errors->first('ref_model') }}</p>
|
||||
</div>
|
||||
<div>
|
||||
{{ Form::label('ref_model_params', 'Award Class parameters') }}
|
||||
{{ Form::text('ref_model_params', null, ['class' => 'form-control']) }}
|
||||
<p class="text-danger">{{ $errors->first('ref_model_params') }}</p>
|
||||
|
||||
<div>
|
||||
{{ Form::label('ref_model_params', 'Award Class parameters') }}
|
||||
{{ Form::text('ref_model_params', null, ['class' => 'form-control']) }}
|
||||
<p class="text-danger">{{ $errors->first('ref_model_params') }}</p>
|
||||
|
||||
<p id="ref_model_param_description">
|
||||
|
||||
</p>
|
||||
</div>
|
||||
<p id="ref_model_param_description">
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<!-- Submit Field -->
|
||||
<div class="form-group col-sm-12">
|
||||
<div class="pull-right">
|
||||
{!! Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-success']) !!}
|
||||
<a href="{!! route('admin.awards.index') !!}" class="btn btn-warn">Cancel</a>
|
||||
</div>
|
||||
<!-- Submit Field -->
|
||||
<div class="form-group col-sm-12">
|
||||
<div class="pull-right">
|
||||
{!! Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-success']) !!}
|
||||
<a href="{!! route('admin.awards.index') !!}" class="btn btn-warn">Cancel</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -2,17 +2,17 @@
|
||||
|
||||
@section('title', 'Awards')
|
||||
@section('actions')
|
||||
<li>
|
||||
<a href="{!! route('admin.awards.create') !!}">
|
||||
<i class="ti-plus"></i>
|
||||
Add New
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{!! route('admin.awards.create') !!}">
|
||||
<i class="ti-plus"></i>
|
||||
Add New
|
||||
</a>
|
||||
</li>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="card">
|
||||
@include('admin.awards.table')
|
||||
</div>
|
||||
<div class="card">
|
||||
@include('admin.awards.table')
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
|
||||
@@ -1,30 +1,30 @@
|
||||
@section('scripts')
|
||||
<script>
|
||||
@if(isset($award_descriptions))
|
||||
<script>
|
||||
@if(isset($award_descriptions))
|
||||
const award_descriptions = {!! json_encode($award_descriptions) !!};
|
||||
@else
|
||||
@else
|
||||
const award_descriptions = {};
|
||||
@endif
|
||||
@endif
|
||||
|
||||
const changeParamDescription = (award_class) => {
|
||||
const descrip = award_descriptions[award_class];
|
||||
console.log('Found description: ', descrip);
|
||||
$("p#ref_model_param_description").text(descrip);
|
||||
};
|
||||
const changeParamDescription = (award_class) => {
|
||||
const descrip = award_descriptions[award_class];
|
||||
console.log('Found description: ', descrip);
|
||||
$("p#ref_model_param_description").text(descrip);
|
||||
};
|
||||
|
||||
$(document).ready(() => {
|
||||
const select_id = "select#award_class_select";
|
||||
console.log('award descriptions', award_descriptions);
|
||||
$(select_id).change((e) => {
|
||||
$(document).ready(() => {
|
||||
const select_id = "select#award_class_select";
|
||||
console.log('award descriptions', award_descriptions);
|
||||
$(select_id).change((e) => {
|
||||
const award_class = $(select_id + " option:selected").val();
|
||||
console.log('award class selected: ', award_class);
|
||||
changeParamDescription(award_class);
|
||||
});
|
||||
});
|
||||
|
||||
// on load
|
||||
const award_class = $(select_id + " option:selected").val();
|
||||
changeParamDescription(award_class);
|
||||
});
|
||||
</script>
|
||||
// on load
|
||||
const award_class = $(select_id + " option:selected").val();
|
||||
changeParamDescription(award_class);
|
||||
});
|
||||
</script>
|
||||
|
||||
@endsection
|
||||
|
||||
@@ -1,40 +1,40 @@
|
||||
<table class="table table-hover table-responsive" id="awards-table">
|
||||
<thead>
|
||||
<th>Name</th>
|
||||
<th>Description</th>
|
||||
<th>Image</th>
|
||||
<th class="text-right">Action</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($awards as $award)
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{ route('admin.awards.edit', [$award->id]) }}">
|
||||
{{ $award->name }}</a>
|
||||
</td>
|
||||
<td>{{ $award->description }}</td>
|
||||
<td>
|
||||
<thead>
|
||||
<th>Name</th>
|
||||
<th>Description</th>
|
||||
<th>Image</th>
|
||||
<th class="text-right">Action</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($awards as $award)
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{ route('admin.awards.edit', [$award->id]) }}">
|
||||
{{ $award->name }}</a>
|
||||
</td>
|
||||
<td>{{ $award->description }}</td>
|
||||
<td>
|
||||
|
||||
@if($award->image)
|
||||
<img src="{{ $award->image }}" name="{{ $award->name }}" alt="No Image Available" />
|
||||
@else
|
||||
-
|
||||
@endif
|
||||
</td>
|
||||
<td class="text-right">
|
||||
{{ Form::open(['route' => ['admin.awards.destroy', $award->id], 'method' => 'delete']) }}
|
||||
<a href="{{ route('admin.awards.edit', [$award->id]) }}" class='btn btn-sm btn-success btn-icon'>
|
||||
<i class="fas fa-pencil-alt"></i></a>
|
||||
@if($award->image)
|
||||
<img src="{{ $award->image }}" name="{{ $award->name }}" alt="No Image Available"/>
|
||||
@else
|
||||
-
|
||||
@endif
|
||||
</td>
|
||||
<td class="text-right">
|
||||
{{ Form::open(['route' => ['admin.awards.destroy', $award->id], 'method' => 'delete']) }}
|
||||
<a href="{{ route('admin.awards.edit', [$award->id]) }}" class='btn btn-sm btn-success btn-icon'>
|
||||
<i class="fas fa-pencil-alt"></i></a>
|
||||
|
||||
{{ Form::button('<i class="fa fa-times"></i>', [
|
||||
'type' => 'submit',
|
||||
'class' => 'btn btn-sm btn-danger btn-icon',
|
||||
'onclick' => "return confirm('Are you sure you want to delete this award?')"
|
||||
]) }}
|
||||
{{ Form::button('<i class="fa fa-times"></i>', [
|
||||
'type' => 'submit',
|
||||
'class' => 'btn btn-sm btn-danger btn-icon',
|
||||
'onclick' => "return confirm('Are you sure you want to delete this award?')"
|
||||
]) }}
|
||||
|
||||
{{ Form::close() }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
{{ Form::close() }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -6,87 +6,87 @@ Pass in:
|
||||
|
||||
--}}
|
||||
<div id="airport-files-wrapper" class="col-12">
|
||||
<div class="header">
|
||||
<h3>files</h3>
|
||||
@component('admin.components.info')
|
||||
Add a download link or upload a file to make available
|
||||
@endcomponent
|
||||
</div>
|
||||
<div class="header">
|
||||
<h3>files</h3>
|
||||
@component('admin.components.info')
|
||||
Add a download link or upload a file to make available
|
||||
@endcomponent
|
||||
</div>
|
||||
|
||||
@if(count($model->files) === 0)
|
||||
@include('admin.common.none_added', ['type' => 'files'])
|
||||
@if(count($model->files) === 0)
|
||||
@include('admin.common.none_added', ['type' => 'files'])
|
||||
@endif
|
||||
|
||||
{{-- Show all the files here --}}
|
||||
<table class="table table-hover table-responsive">
|
||||
@if(count($model->files))
|
||||
<thead>
|
||||
<tr>
|
||||
<td>Name</td>
|
||||
<td>Direct Link</td>
|
||||
<td>Downloads</td>
|
||||
<td class="text-right"></td>
|
||||
</tr>
|
||||
</thead>
|
||||
@endif
|
||||
<tbody>
|
||||
@foreach($model->files as $file)
|
||||
<tr>
|
||||
<td>{{ $file->name }}</td>
|
||||
<td><a href="{{ $file->url }}" target="_blank">Link to file</a></td>
|
||||
<td>{{$file->download_count}}</td>
|
||||
<td class="text-right">
|
||||
{{ Form::open(['route' => ['admin.files.delete', $file->id], 'method' => 'delete']) }}
|
||||
{{ Form::hidden('id', $file->id) }}
|
||||
{{ Form::button('<i class="fa fa-times"></i>', [
|
||||
'type' => 'submit',
|
||||
'class' => 'btn btn-sm btn-danger btn-icon',
|
||||
'onclick' => "return confirm('Are you sure?')"])
|
||||
}}
|
||||
{{ Form::close() }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="text-right">
|
||||
{{ Form::open([
|
||||
'url' => route('admin.files.store'),
|
||||
'method' => 'POST',
|
||||
'class' => 'form-inline',
|
||||
'files' => true
|
||||
])
|
||||
}}
|
||||
|
||||
{{-- Show all the files here --}}
|
||||
<table class="table table-hover table-responsive">
|
||||
@if(count($model->files))
|
||||
<thead>
|
||||
<tr>
|
||||
<td>Name</td>
|
||||
<td>Direct Link</td>
|
||||
<td>Downloads</td>
|
||||
<td class="text-right"></td>
|
||||
</tr>
|
||||
</thead>
|
||||
@endif
|
||||
<tbody>
|
||||
@foreach($model->files as $file)
|
||||
<tr>
|
||||
<td>{{ $file->name }}</td>
|
||||
<td><a href="{{ $file->url }}" target="_blank">Link to file</a></td>
|
||||
<td>{{$file->download_count}}</td>
|
||||
<td class="text-right">
|
||||
{{ Form::open(['route' => ['admin.files.delete', $file->id], 'method' => 'delete']) }}
|
||||
{{ Form::hidden('id', $file->id) }}
|
||||
{{ Form::button('<i class="fa fa-times"></i>', [
|
||||
'type' => 'submit',
|
||||
'class' => 'btn btn-sm btn-danger btn-icon',
|
||||
'onclick' => "return confirm('Are you sure?')"])
|
||||
}}
|
||||
{{ Form::close() }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<hr>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="text-right">
|
||||
{{ Form::open([
|
||||
'url' => route('admin.files.store'),
|
||||
'method' => 'POST',
|
||||
'class' => 'form-inline',
|
||||
'files' => true
|
||||
])
|
||||
}}
|
||||
{{ Form::token() }}
|
||||
|
||||
{{ Form::token() }}
|
||||
<span class="required">*</span>
|
||||
{{ Form::text('file_name', null, ['class' => 'form-control', 'placeholder' => 'Name']) }}
|
||||
{{ Form::text('file_description', null, ['class' => 'form-control', 'placeholder' => 'Description']) }}
|
||||
{{ Form::text('url', null, ['class' => 'form-control', 'placeholder' => 'URL']) }}
|
||||
{{ Form::file('file', ['class' => 'form-control']) }}
|
||||
|
||||
<span class="required">*</span>
|
||||
{{ Form::text('file_name', null, ['class' => 'form-control', 'placeholder' => 'Name']) }}
|
||||
{{ Form::text('file_description', null, ['class' => 'form-control', 'placeholder' => 'Description']) }}
|
||||
{{ Form::text('url', null, ['class' => 'form-control', 'placeholder' => 'URL']) }}
|
||||
{{ Form::file('file', ['class' => 'form-control']) }}
|
||||
{{-- Fields for the model --}}
|
||||
{{ Form::hidden('ref_model', get_class($model)) }}
|
||||
{{ Form::hidden('ref_model_id', $model->id) }}
|
||||
|
||||
{{-- Fields for the model --}}
|
||||
{{ Form::hidden('ref_model', get_class($model)) }}
|
||||
{{ Form::hidden('ref_model_id', $model->id) }}
|
||||
|
||||
{{ Form::submit('Save', [
|
||||
'id' => 'save_file_upload',
|
||||
'class' => 'btn btn-success'
|
||||
])
|
||||
}}
|
||||
<div class="text-danger" style="padding-top: 10px;">
|
||||
<span>{{ $errors->first('filename') }}</span>
|
||||
<span>{{ $errors->first('url') }}</span>
|
||||
<span>{{ $errors->first('file') }}</span>
|
||||
</div>
|
||||
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
{{ Form::submit('Save', [
|
||||
'id' => 'save_file_upload',
|
||||
'class' => 'btn btn-success'
|
||||
])
|
||||
}}
|
||||
<div class="text-danger" style="padding-top: 10px;">
|
||||
<span>{{ $errors->first('filename') }}</span>
|
||||
<span>{{ $errors->first('url') }}</span>
|
||||
<span>{{ $errors->first('file') }}</span>
|
||||
</div>
|
||||
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -1,37 +1,37 @@
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
<div class="row">
|
||||
<div class="content">
|
||||
<div class="row">
|
||||
|
||||
{{ Form::open(['method' => 'post', 'route' => $route, 'files' => true]) }}
|
||||
<div class="form-group col-12">
|
||||
{{ Form::label('csv_file', 'Choose a CSV file to import') }}
|
||||
{{ Form::file('csv_file', ['accept' => '.csv']) }}
|
||||
<p class="text-danger">{{ $errors->first('csv_file') }}</p>
|
||||
</div>
|
||||
{{ Form::open(['method' => 'post', 'route' => $route, 'files' => true]) }}
|
||||
<div class="form-group col-12">
|
||||
{{ Form::label('csv_file', 'Choose a CSV file to import') }}
|
||||
{{ Form::file('csv_file', ['accept' => '.csv']) }}
|
||||
<p class="text-danger">{{ $errors->first('csv_file') }}</p>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-md-12">
|
||||
<div class="text-right">
|
||||
{{ Form::button('Start Import', ['type' => 'submit', 'class' => 'btn btn-success']) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ Form::close() }}
|
||||
|
||||
<div class="form-group col-md-12">
|
||||
@if($logs['success'])
|
||||
<h4>Logs</h4>
|
||||
@foreach($logs['success'] as $line)
|
||||
<p>{{ $line }}</p>
|
||||
@endforeach
|
||||
@endif
|
||||
|
||||
@if($logs['errors'])
|
||||
<h4>Errors</h4>
|
||||
@foreach($logs['errors'] as $line)
|
||||
<p>{{ $line }}</p>
|
||||
@endforeach
|
||||
@endif
|
||||
</div>
|
||||
<div class="form-group col-md-12">
|
||||
<div class="text-right">
|
||||
{{ Form::button('Start Import', ['type' => 'submit', 'class' => 'btn btn-success']) }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ Form::close() }}
|
||||
|
||||
<div class="form-group col-md-12">
|
||||
@if($logs['success'])
|
||||
<h4>Logs</h4>
|
||||
@foreach($logs['success'] as $line)
|
||||
<p>{{ $line }}</p>
|
||||
@endforeach
|
||||
@endif
|
||||
|
||||
@if($logs['errors'])
|
||||
<h4>Errors</h4>
|
||||
@foreach($logs['errors'] as $line)
|
||||
<p>{{ $line }}</p>
|
||||
@endforeach
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<div class="jumbotron">
|
||||
<p class="text-center">
|
||||
No {{ $type }} have been added
|
||||
</p>
|
||||
<p class="text-center">
|
||||
No {{ $type }} have been added
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<div>
|
||||
<p style="float:left; margin-right: 10px; margin-left: 2px;">
|
||||
<p style="float:left; margin-right: 10px; margin-left: 2px;">
|
||||
<span style="font-size: 1.0em;">
|
||||
<i class="fas fa-info-circle" style="color: #067ec1"></i>
|
||||
</span>
|
||||
</p>
|
||||
<p class="category" style="text-transform:none;">
|
||||
{{ $slot }}
|
||||
</p>
|
||||
</p>
|
||||
<p class="category" style="text-transform:none;">
|
||||
{{ $slot }}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -1,32 +1,32 @@
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
<div class="row">
|
||||
<div class="col-xs-5">
|
||||
<div class="icon-big icon-info text-center">
|
||||
<i class="{{$icon}}"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-7">
|
||||
<div class="numbers">
|
||||
<p>{{$type}}</p>
|
||||
@if(isset($link))
|
||||
<a href="{{ $link }}">
|
||||
@endif
|
||||
{{$pending}} pending
|
||||
@if(isset($link))
|
||||
</a>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="row">
|
||||
<div class="col-xs-5">
|
||||
<div class="icon-big icon-info text-center">
|
||||
<i class="{{$icon}}"></i>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<hr>
|
||||
@if(isset($total))
|
||||
<div class="stats">
|
||||
<i class="ti-medall"></i> {{$total}} total
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-xs-7">
|
||||
<div class="numbers">
|
||||
<p>{{$type}}</p>
|
||||
@if(isset($link))
|
||||
<a href="{{ $link }}">
|
||||
@endif
|
||||
{{$pending}} pending
|
||||
@if(isset($link))
|
||||
</a>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<hr>
|
||||
@if(isset($total))
|
||||
<div class="stats">
|
||||
<i class="ti-medall"></i> {{$total}} total
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -1,66 +1,66 @@
|
||||
<div id="pjax_news_wrapper">
|
||||
<div class="card border-blue-bottom">
|
||||
@if($news->count() === 0)
|
||||
<div class="text-center text-muted" style="padding: 30px;">
|
||||
no news items
|
||||
</div>
|
||||
@endif
|
||||
@foreach($news as $item)
|
||||
<div class="content">
|
||||
<div class="header">
|
||||
<h4 class="title">{{ $item->subject }}</h4>
|
||||
<p class="category">{{ $item->user->name }} - {{ show_datetime($item->created_at) }}</p>
|
||||
</div>
|
||||
|
||||
{{ $item->body }}
|
||||
|
||||
<div class="text-right">
|
||||
{{ Form::open(['route' => 'admin.dashboard.news',
|
||||
'method' => 'delete',
|
||||
'class' => 'pjax_news_form',
|
||||
]) }}
|
||||
{{ Form::hidden('news_id', $item->id) }}
|
||||
{{
|
||||
Form::button('<i class="far fa-trash-alt"></i> delete',
|
||||
['type' => 'submit',
|
||||
'class' => ' btn btn-danger btn-xs text-small',
|
||||
'onclick' => "return confirm('Are you sure?')"
|
||||
])
|
||||
|
||||
}}
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
<div class="card border-blue-bottom">
|
||||
@if($news->count() === 0)
|
||||
<div class="text-center text-muted" style="padding: 30px;">
|
||||
no news items
|
||||
</div>
|
||||
@endif
|
||||
@foreach($news as $item)
|
||||
<div class="content">
|
||||
<div class="header">
|
||||
<h4 class="title">{{ $item->subject }}</h4>
|
||||
<p class="category">{{ $item->user->name }} - {{ show_datetime($item->created_at) }}</p>
|
||||
</div>
|
||||
<hr />
|
||||
@endforeach
|
||||
<div class="content">
|
||||
<div class="header">
|
||||
<h4 class="title">Add News</h4>
|
||||
</div>
|
||||
{{ Form::open(['route' => 'admin.dashboard.news',
|
||||
'method' => 'post',
|
||||
'class' => 'pjax_news_form',
|
||||
]) }}
|
||||
<table class="table">
|
||||
<tr>
|
||||
<td>{{ Form::label('subject', 'Subject:') }}</td>
|
||||
<td>{{ Form::text('subject', '', ['class' => 'form-control']) }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>{{ Form::label('body', 'Body:') }}</td>
|
||||
<td>{{ Form::textarea('body', '', ['class' => 'form-control']) }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="text-right">
|
||||
{{
|
||||
Form::button('<i class="fas fa-plus-circle"></i> add',
|
||||
['type' => 'submit',
|
||||
'class' => 'btn btn-success btn-s'])
|
||||
{{ $item->body }}
|
||||
|
||||
}}
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
<div class="text-right">
|
||||
{{ Form::open(['route' => 'admin.dashboard.news',
|
||||
'method' => 'delete',
|
||||
'class' => 'pjax_news_form',
|
||||
]) }}
|
||||
{{ Form::hidden('news_id', $item->id) }}
|
||||
{{
|
||||
Form::button('<i class="far fa-trash-alt"></i> delete',
|
||||
['type' => 'submit',
|
||||
'class' => ' btn btn-danger btn-xs text-small',
|
||||
'onclick' => "return confirm('Are you sure?')"
|
||||
])
|
||||
|
||||
}}
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
<hr/>
|
||||
@endforeach
|
||||
<div class="content">
|
||||
<div class="header">
|
||||
<h4 class="title">Add News</h4>
|
||||
</div>
|
||||
{{ Form::open(['route' => 'admin.dashboard.news',
|
||||
'method' => 'post',
|
||||
'class' => 'pjax_news_form',
|
||||
]) }}
|
||||
<table class="table">
|
||||
<tr>
|
||||
<td>{{ Form::label('subject', 'Subject:') }}</td>
|
||||
<td>{{ Form::text('subject', '', ['class' => 'form-control']) }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>{{ Form::label('body', 'Body:') }}</td>
|
||||
<td>{{ Form::textarea('body', '', ['class' => 'form-control']) }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="text-right">
|
||||
{{
|
||||
Form::button('<i class="fas fa-plus-circle"></i> add',
|
||||
['type' => 'submit',
|
||||
'class' => 'btn btn-success btn-s'])
|
||||
|
||||
}}
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,11 +1,11 @@
|
||||
@extends('admin.app')
|
||||
@section('title', 'Add Expense')
|
||||
@section('content')
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
{{ Form::open(['route' => 'admin.expenses.store']) }}
|
||||
@include('admin.expenses.fields')
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
{{ Form::open(['route' => 'admin.expenses.store']) }}
|
||||
@include('admin.expenses.fields')
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
@extends('admin.app')
|
||||
@section('title', "Edit \"$expense->name\"")
|
||||
@section('content')
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
{{ Form::model($expense, ['route' => ['admin.expenses.update', $expense->id], 'method' => 'patch']) }}
|
||||
@include('admin.expenses.fields')
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
{{ Form::model($expense, ['route' => ['admin.expenses.update', $expense->id], 'method' => 'patch']) }}
|
||||
@include('admin.expenses.fields')
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@@ -1,64 +1,64 @@
|
||||
<div class="row">
|
||||
<!-- Code Field -->
|
||||
<div class="form-group col-sm-6">
|
||||
{{ Form::label('airline_id', 'Airline:') }}
|
||||
<!-- Code Field -->
|
||||
<div class="form-group col-sm-6">
|
||||
{{ Form::label('airline_id', 'Airline:') }}
|
||||
|
||||
{{ Form::select('airline_id', $airlines_list, null , ['class' => 'form-control select2']) }}
|
||||
<p class="text-danger">{{ $errors->first('airline_id') }}</p>
|
||||
@component('admin.components.info')
|
||||
If an airline is selected, then the expense will only be applied
|
||||
to the selected airline, or flights in that airline.
|
||||
@endcomponent
|
||||
</div>
|
||||
{{ Form::select('airline_id', $airlines_list, null , ['class' => 'form-control select2']) }}
|
||||
<p class="text-danger">{{ $errors->first('airline_id') }}</p>
|
||||
@component('admin.components.info')
|
||||
If an airline is selected, then the expense will only be applied
|
||||
to the selected airline, or flights in that airline.
|
||||
@endcomponent
|
||||
</div>
|
||||
|
||||
<!-- Name Field -->
|
||||
<div class="form-group col-sm-6">
|
||||
{{ Form::label('type', 'Expense Type:') }} <span class="required">*</span>
|
||||
{{ Form::select('type', $expense_types, null , ['class' => 'form-control select2']) }}
|
||||
<p class="text-danger">{{ $errors->first('type') }}</p>
|
||||
</div>
|
||||
<!-- Name Field -->
|
||||
<div class="form-group col-sm-6">
|
||||
{{ Form::label('type', 'Expense Type:') }} <span class="required">*</span>
|
||||
{{ Form::select('type', $expense_types, null , ['class' => 'form-control select2']) }}
|
||||
<p class="text-danger">{{ $errors->first('type') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-group col-sm-6">
|
||||
{{ Form::label('name', 'Expense Name:') }}
|
||||
{{ Form::text('name', null, ['class' => 'form-control']) }}
|
||||
<p class="text-danger">{{ $errors->first('name') }}</p>
|
||||
</div>
|
||||
<div class="form-group col-sm-6">
|
||||
{{ Form::label('name', 'Expense Name:') }}
|
||||
{{ Form::text('name', null, ['class' => 'form-control']) }}
|
||||
<p class="text-danger">{{ $errors->first('name') }}</p>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-6">
|
||||
{{ Form::label('amount', 'Amount:') }}
|
||||
{{ Form::number('amount', null, ['class' => 'form-control', 'min' => 0, 'step' => '0.01']) }}
|
||||
<p class="text-danger">{{ $errors->first('amount') }}</p>
|
||||
</div>
|
||||
<div class="form-group col-sm-6">
|
||||
{{ Form::label('amount', 'Amount:') }}
|
||||
{{ Form::number('amount', null, ['class' => 'form-control', 'min' => 0, 'step' => '0.01']) }}
|
||||
<p class="text-danger">{{ $errors->first('amount') }}</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-sm-5">
|
||||
{{ Form::label('multiplier', 'Multiplier:') }}
|
||||
<label class="checkbox-inline">
|
||||
{{ Form::hidden('multiplier', 0, false) }}
|
||||
{{ Form::checkbox('multiplier', 1, null) }}
|
||||
</label>
|
||||
@component('admin.components.info')
|
||||
If checked, with a PIREP, this expense can be modified by a multiplier
|
||||
on the subfleet. This is ignored for daily and monthly expenses
|
||||
@endcomponent
|
||||
</div>
|
||||
<div class="col-sm-5">
|
||||
{{ Form::label('multiplier', 'Multiplier:') }}
|
||||
<label class="checkbox-inline">
|
||||
{{ Form::hidden('multiplier', 0, false) }}
|
||||
{{ Form::checkbox('multiplier', 1, null) }}
|
||||
</label>
|
||||
@component('admin.components.info')
|
||||
If checked, with a PIREP, this expense can be modified by a multiplier
|
||||
on the subfleet. This is ignored for daily and monthly expenses
|
||||
@endcomponent
|
||||
</div>
|
||||
|
||||
<div class="col-sm-3">
|
||||
{{ Form::label('active', 'Active:') }}
|
||||
<label class="checkbox-inline">
|
||||
{{ Form::hidden('active', 0, false) }}
|
||||
{{ Form::checkbox('active', 1, null) }}
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
{{ Form::label('active', 'Active:') }}
|
||||
<label class="checkbox-inline">
|
||||
{{ Form::hidden('active', 0, false) }}
|
||||
{{ Form::checkbox('active', 1, null) }}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-4">
|
||||
<div class="pull-right">
|
||||
{{ Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-success']) }}
|
||||
<a href="{{ route('admin.expenses.index') }}" class="btn btn-default">Cancel</a>
|
||||
</div>
|
||||
<div class="form-group col-sm-4">
|
||||
<div class="pull-right">
|
||||
{{ Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-success']) }}
|
||||
<a href="{{ route('admin.expenses.index') }}" class="btn btn-default">Cancel</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -2,5 +2,5 @@
|
||||
@section('title', 'Import Expenses')
|
||||
|
||||
@section('content')
|
||||
@include('admin.common.import', ['route' => 'admin.expenses.import'])
|
||||
@include('admin.common.import', ['route' => 'admin.expenses.import'])
|
||||
@endsection
|
||||
|
||||
@@ -2,22 +2,22 @@
|
||||
@section('title', 'Expenses')
|
||||
|
||||
@section('actions')
|
||||
<li><a href="{{ route('admin.expenses.export') }}"><i class="ti-plus"></i>Export to CSV</a></li>
|
||||
<li><a href="{{ route('admin.expenses.import') }}"><i class="ti-plus"></i>Import from CSV</a></li>
|
||||
<li><a href="{{ route('admin.expenses.create') }}"><i class="ti-plus"></i>Add New</a></li>
|
||||
<li><a href="{{ route('admin.expenses.export') }}"><i class="ti-plus"></i>Export to CSV</a></li>
|
||||
<li><a href="{{ route('admin.expenses.import') }}"><i class="ti-plus"></i>Import from CSV</a></li>
|
||||
<li><a href="{{ route('admin.expenses.create') }}"><i class="ti-plus"></i>Add New</a></li>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
@if(!filled($expenses))
|
||||
<p class="text-center">
|
||||
There are no expenses
|
||||
</p>
|
||||
@else
|
||||
@include('admin.expenses.table')
|
||||
@endif
|
||||
@if(!filled($expenses))
|
||||
<p class="text-center">
|
||||
There are no expenses
|
||||
</p>
|
||||
@else
|
||||
@include('admin.expenses.table')
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
|
||||
@@ -1,40 +1,40 @@
|
||||
<table class="table table-hover table-responsive" id="expenses-table">
|
||||
<thead>
|
||||
<th>Name</th>
|
||||
<th>Type</th>
|
||||
<th style="text-align: center;">Amount</th>
|
||||
<th>Airline</th>
|
||||
<th class="text-center">Active</th>
|
||||
<th></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($expenses as $expense)
|
||||
<tr>
|
||||
<td><a href="{{ route('admin.expenses.edit', [$expense->id]) }}">
|
||||
{{ $expense->name }}</a>
|
||||
</td>
|
||||
<td>{{ \App\Models\Enums\ExpenseType::label($expense->type) }}</td>
|
||||
<td style="text-align: center;">{{ $expense->amount }}</td>
|
||||
<td>
|
||||
@if(filled($expense->airline))
|
||||
{{ $expense->airline->name }}
|
||||
@else
|
||||
<span class="description">-</span>
|
||||
@endif
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<thead>
|
||||
<th>Name</th>
|
||||
<th>Type</th>
|
||||
<th style="text-align: center;">Amount</th>
|
||||
<th>Airline</th>
|
||||
<th class="text-center">Active</th>
|
||||
<th></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($expenses as $expense)
|
||||
<tr>
|
||||
<td><a href="{{ route('admin.expenses.edit', [$expense->id]) }}">
|
||||
{{ $expense->name }}</a>
|
||||
</td>
|
||||
<td>{{ \App\Models\Enums\ExpenseType::label($expense->type) }}</td>
|
||||
<td style="text-align: center;">{{ $expense->amount }}</td>
|
||||
<td>
|
||||
@if(filled($expense->airline))
|
||||
{{ $expense->airline->name }}
|
||||
@else
|
||||
<span class="description">-</span>
|
||||
@endif
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<span class="label label-{{ $expense->active?'success':'default' }}">
|
||||
{{ \App\Models\Enums\ActiveState::label($expense->active) }}
|
||||
</span>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
{{ Form::open(['route' => ['admin.expenses.destroy', $expense->id], 'method' => 'delete']) }}
|
||||
<a href="{{ route('admin.expenses.edit', [$expense->id]) }}"
|
||||
class='btn btn-sm btn-success btn-icon'><i class="fas fa-pencil-alt"></i></a>
|
||||
{{ Form::button('<i class="fa fa-times"></i>', ['type' => 'submit', 'class' => 'btn btn-sm btn-danger btn-icon', 'onclick' => "return confirm('Are you sure?')"]) }}
|
||||
{{ Form::close() }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
{{ Form::open(['route' => ['admin.expenses.destroy', $expense->id], 'method' => 'delete']) }}
|
||||
<a href="{{ route('admin.expenses.edit', [$expense->id]) }}"
|
||||
class='btn btn-sm btn-success btn-icon'><i class="fas fa-pencil-alt"></i></a>
|
||||
{{ Form::button('<i class="fa fa-times"></i>', ['type' => 'submit', 'class' => 'btn btn-sm btn-danger btn-icon', 'onclick' => "return confirm('Are you sure?')"]) }}
|
||||
{{ Form::close() }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
@extends('admin.app')
|
||||
@section('title', 'Add Fare')
|
||||
@section('content')
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
{{ Form::open(['route' => 'admin.fares.store']) }}
|
||||
@include('admin.fares.fields')
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
{{ Form::open(['route' => 'admin.fares.store']) }}
|
||||
@include('admin.fares.fields')
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
@extends('admin.app')
|
||||
@section('title', "Edit \"$fare->name\"")
|
||||
@section('content')
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
{{ Form::model($fare, ['route' => ['admin.fares.update', $fare->id], 'method' => 'patch']) }}
|
||||
@include('admin.fares.fields')
|
||||
{{ Form::close() }}
|
||||
{{ Form::model($fare, ['route' => ['admin.fares.update', $fare->id], 'method' => 'patch']) }}
|
||||
@include('admin.fares.fields')
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@@ -1,79 +1,79 @@
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="callout callout-success">
|
||||
When a fare is assigned to a subfleet, the price, cost and capacity can be overridden,
|
||||
so you can create default values that will apply to most of your subfleets, and change
|
||||
them where they will differ.
|
||||
</div>
|
||||
<br />
|
||||
<div class="col-md-12">
|
||||
<div class="callout callout-success">
|
||||
When a fare is assigned to a subfleet, the price, cost and capacity can be overridden,
|
||||
so you can create default values that will apply to most of your subfleets, and change
|
||||
them where they will differ.
|
||||
</div>
|
||||
<br/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-group col-sm-6">
|
||||
<div class="form-group col-sm-6">
|
||||
{{ Form::label('code', 'Code:') }} <span class="required">*</span>
|
||||
@component('admin.components.info')
|
||||
How this fare class will show up on a ticket
|
||||
How this fare class will show up on a ticket
|
||||
@endcomponent
|
||||
{{ Form::text('code', null, ['class' => 'form-control']) }}
|
||||
<p class="text-danger">{{ $errors->first('code') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-6">
|
||||
<div class="form-group col-sm-6">
|
||||
{{ Form::label('name', 'Name:') }} <span class="required">*</span>
|
||||
@component('admin.components.info')
|
||||
The fare class name, E.g, "Economy" or "First"
|
||||
The fare class name, E.g, "Economy" or "First"
|
||||
@endcomponent
|
||||
{{ Form::text('name', null, ['class' => 'form-control']) }}
|
||||
<p class="text-danger">{{ $errors->first('name') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-6">
|
||||
<div class="form-group col-sm-6">
|
||||
{{ Form::label('price', 'Price:') }}
|
||||
@component('admin.components.info')
|
||||
This is the price of a ticket for a passenger
|
||||
This is the price of a ticket for a passenger
|
||||
@endcomponent
|
||||
{{ Form::text('price', null, ['class' => 'form-control', 'placeholder' => 0]) }}
|
||||
<p class="text-danger">{{ $errors->first('price') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-6">
|
||||
<div class="form-group col-sm-6">
|
||||
{{ Form::label('cost', 'Cost:') }}
|
||||
@component('admin.components.info')
|
||||
The operating cost
|
||||
The operating cost
|
||||
@endcomponent
|
||||
{{ Form::number('cost', null, ['class' => 'form-control', 'placeholder' => 0, 'step' => '0.01']) }}
|
||||
<p class="text-danger">{{ $errors->first('cost') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-6">
|
||||
<div class="form-group col-sm-6">
|
||||
{{ Form::label('capacity', 'Capacity:') }}
|
||||
@component('admin.components.info')
|
||||
The number of seats available in this class.
|
||||
The number of seats available in this class.
|
||||
@endcomponent
|
||||
{{ Form::number('capacity', null, ['class' => 'form-control', 'min' => 0]) }}
|
||||
<p class="text-danger">{{ $errors->first('capacity') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-6">
|
||||
<div class="form-group col-sm-6">
|
||||
{{ Form::label('notes', 'Notes:') }}
|
||||
{{ Form::text('notes', null, ['class' => 'form-control']) }}
|
||||
<p class="text-danger">{{ $errors->first('notes') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Active Field -->
|
||||
<div class="form-group col-sm-12">
|
||||
<!-- Active Field -->
|
||||
<div class="form-group col-sm-12">
|
||||
{{ Form::label('active', 'Active:') }}
|
||||
<label class="checkbox-inline">
|
||||
{{ Form::hidden('active', 0, false) }}
|
||||
{{ Form::checkbox('active', 1, null) }}
|
||||
{{ Form::hidden('active', 0, false) }}
|
||||
{{ Form::checkbox('active', 1, null) }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Submit Field -->
|
||||
<div class="form-group col-sm-12">
|
||||
<!-- Submit Field -->
|
||||
<div class="form-group col-sm-12">
|
||||
<div class="pull-right">
|
||||
{{ Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-success']) }}
|
||||
<a href="{{ route('admin.fares.index') }}" class="btn btn-warn">Cancel</a>
|
||||
{{ Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-success']) }}
|
||||
<a href="{{ route('admin.fares.index') }}" class="btn btn-warn">Cancel</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
@extends('admin.app')
|
||||
@section('title', 'Import Fares')
|
||||
@section('content')
|
||||
@include('admin.common.import', ['route' => 'admin.fares.import'])
|
||||
@include('admin.common.import', ['route' => 'admin.fares.import'])
|
||||
@endsection
|
||||
|
||||
@@ -2,16 +2,16 @@
|
||||
|
||||
@section('title', 'Fares')
|
||||
@section('actions')
|
||||
<li><a href="{{ route('admin.fares.export') }}"><i class="ti-plus"></i>Export to CSV</a></li>
|
||||
<li><a href="{{ route('admin.fares.import') }}"><i class="ti-plus"></i>Import from CSV</a></li>
|
||||
<li><a href="{{ route('admin.fares.create') }}"><i class="ti-plus"></i>Add New</a></li>
|
||||
<li><a href="{{ route('admin.fares.export') }}"><i class="ti-plus"></i>Export to CSV</a></li>
|
||||
<li><a href="{{ route('admin.fares.import') }}"><i class="ti-plus"></i>Import from CSV</a></li>
|
||||
<li><a href="{{ route('admin.fares.create') }}"><i class="ti-plus"></i>Add New</a></li>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
@include('admin.fares.table')
|
||||
</div>
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
@include('admin.fares.table')
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
@extends('admin.app')
|
||||
|
||||
@section('content')
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
@include('admin.fares.show_fields')
|
||||
@include('admin.fares.show_fields')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@@ -1,35 +1,35 @@
|
||||
<!-- Code Field -->
|
||||
<div class="form-group">
|
||||
{{ Form::label('code', 'Code:') }}
|
||||
<p>{{ $fare->code }}</p>
|
||||
{{ Form::label('code', 'Code:') }}
|
||||
<p>{{ $fare->code }}</p>
|
||||
</div>
|
||||
|
||||
<!-- Name Field -->
|
||||
<div class="form-group">
|
||||
{{ Form::label('name', 'Name:') }}
|
||||
<p>{{ $fare->name }}</p>
|
||||
{{ Form::label('name', 'Name:') }}
|
||||
<p>{{ $fare->name }}</p>
|
||||
</div>
|
||||
|
||||
<!-- Price Field -->
|
||||
<div class="form-group">
|
||||
{{ Form::label('price', 'Price:') }}
|
||||
<p>{{ $fare->price }}</p>
|
||||
{{ Form::label('price', 'Price:') }}
|
||||
<p>{{ $fare->price }}</p>
|
||||
</div>
|
||||
|
||||
<!-- Cost Field -->
|
||||
<div class="form-group">
|
||||
{{ Form::label('cost', 'Cost:') }}
|
||||
<p>{{ $fare->cost }}</p>
|
||||
{{ Form::label('cost', 'Cost:') }}
|
||||
<p>{{ $fare->cost }}</p>
|
||||
</div>
|
||||
|
||||
<!-- Notes Field -->
|
||||
<div class="form-group">
|
||||
{{ Form::label('notes', 'Notes:') }}
|
||||
<p>{{ $fare->notes }}</p>
|
||||
{{ Form::label('notes', 'Notes:') }}
|
||||
<p>{{ $fare->notes }}</p>
|
||||
</div>
|
||||
|
||||
<!-- Active Field -->
|
||||
<div class="form-group">
|
||||
{{ Form::label('active', 'Active:') }}
|
||||
<p>{{ $fare->active }}</p>
|
||||
{{ Form::label('active', 'Active:') }}
|
||||
<p>{{ $fare->active }}</p>
|
||||
</div>
|
||||
|
||||
@@ -1,36 +1,36 @@
|
||||
<table class="table table-hover table-responsive" id="fares-table">
|
||||
<thead>
|
||||
<th>Code</th>
|
||||
<th>Name</th>
|
||||
<th>Price</th>
|
||||
<th>Cost</th>
|
||||
<th>Notes</th>
|
||||
<th class="text-center">Active</th>
|
||||
<th class="text-right">Action</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($fares as $fare)
|
||||
<tr>
|
||||
<td><a href="{{ route('admin.fares.edit', [$fare->id]) }}">{{ $fare->code }}</a></td>
|
||||
<td>{{ $fare->name }}</td>
|
||||
<td>{{ $fare->price }}</td>
|
||||
<td>{{ $fare->cost }}</td>
|
||||
<td>{{ $fare->notes }}</td>
|
||||
<td class="text-center">
|
||||
@if($fare->active == 1)
|
||||
<span class="label label-success">Active</span>
|
||||
@else
|
||||
<span class="label label-default">Inactive</span>
|
||||
@endif
|
||||
</td>
|
||||
<td class="text-right">
|
||||
{{ Form::open(['route' => ['admin.fares.destroy', $fare->id], 'method' => 'delete']) }}
|
||||
<a href="{{ route('admin.fares.edit', [$fare->id]) }}" class='btn btn-sm btn-success btn-icon'>
|
||||
<i class="fas fa-pencil-alt"></i></a>
|
||||
{{ Form::button('<i class="fa fa-times"></i>', ['type' => 'submit', 'class' => 'btn btn-sm btn-danger btn-icon', 'onclick' => "return confirm('Are you sure?')"]) }}
|
||||
{{ Form::close() }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
<thead>
|
||||
<th>Code</th>
|
||||
<th>Name</th>
|
||||
<th>Price</th>
|
||||
<th>Cost</th>
|
||||
<th>Notes</th>
|
||||
<th class="text-center">Active</th>
|
||||
<th class="text-right">Action</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($fares as $fare)
|
||||
<tr>
|
||||
<td><a href="{{ route('admin.fares.edit', [$fare->id]) }}">{{ $fare->code }}</a></td>
|
||||
<td>{{ $fare->name }}</td>
|
||||
<td>{{ $fare->price }}</td>
|
||||
<td>{{ $fare->cost }}</td>
|
||||
<td>{{ $fare->notes }}</td>
|
||||
<td class="text-center">
|
||||
@if($fare->active == 1)
|
||||
<span class="label label-success">Active</span>
|
||||
@else
|
||||
<span class="label label-default">Inactive</span>
|
||||
@endif
|
||||
</td>
|
||||
<td class="text-right">
|
||||
{{ Form::open(['route' => ['admin.fares.destroy', $fare->id], 'method' => 'delete']) }}
|
||||
<a href="{{ route('admin.fares.edit', [$fare->id]) }}" class='btn btn-sm btn-success btn-icon'>
|
||||
<i class="fas fa-pencil-alt"></i></a>
|
||||
{{ Form::button('<i class="fa fa-times"></i>', ['type' => 'submit', 'class' => 'btn btn-sm btn-danger btn-icon', 'onclick' => "return confirm('Are you sure?')"]) }}
|
||||
{{ Form::close() }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -2,23 +2,23 @@
|
||||
|
||||
@section('title', 'Financial Reports')
|
||||
@section('actions')
|
||||
<li><a href="{{ route('admin.finances.index') }}"><i class="ti-menu-alt"></i>Overview</a></li>
|
||||
<li><a href="{{ route('admin.finances.index') }}"><i class="ti-menu-alt"></i>Overview</a></li>
|
||||
@endsection
|
||||
@section('content')
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
<div style="float:right;">
|
||||
{{ Form::select(
|
||||
'month_select',
|
||||
$months_list,
|
||||
$current_month,
|
||||
['id' => 'month_select']
|
||||
) }}
|
||||
</div>
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
<div style="float:right;">
|
||||
{{ Form::select(
|
||||
'month_select',
|
||||
$months_list,
|
||||
$current_month,
|
||||
['id' => 'month_select']
|
||||
) }}
|
||||
</div>
|
||||
|
||||
@include('admin.finances.table')
|
||||
@include('admin.finances.table')
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@include('admin.finances.scripts')
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
@section('scripts')
|
||||
<script>
|
||||
$(document).ready(() => {
|
||||
const select_id = "select#month_select";
|
||||
$(select_id).change((e) => {
|
||||
<script>
|
||||
$(document).ready(() => {
|
||||
const select_id = "select#month_select";
|
||||
$(select_id).change((e) => {
|
||||
const date = $(select_id + " option:selected").val();
|
||||
const location = window.location.toString().split('?')[0];
|
||||
window.location = location + '?month='+date;
|
||||
window.location = location + '?month=' + date;
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
@endsection
|
||||
|
||||
@@ -1,63 +1,62 @@
|
||||
|
||||
@foreach($transaction_groups as $group)
|
||||
|
||||
<h3>{{ $group['airline']->icao }} - {{ $group['airline']->name }}</h3>
|
||||
<h3>{{ $group['airline']->icao }} - {{ $group['airline']->name }}</h3>
|
||||
|
||||
<table
|
||||
id="finances-table"
|
||||
style="width: 95%; margin: 0px auto;"
|
||||
class="table table-hover table-responsive">
|
||||
<table
|
||||
id="finances-table"
|
||||
style="width: 95%; margin: 0px auto;"
|
||||
class="table table-hover table-responsive">
|
||||
|
||||
<thead>
|
||||
<th>Expenses</th>
|
||||
<th>Credit</th>
|
||||
<th>Debit</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($group['transactions'] as $ta)
|
||||
<tr>
|
||||
<td>
|
||||
{{ $ta->transaction_group }}
|
||||
</td>
|
||||
<td>
|
||||
@if($ta->sum_credits)
|
||||
{{ money($ta->sum_credits, $ta->currency) }}
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if($ta->sum_debits)
|
||||
<i>{{ money($ta->sum_debits, $ta->currency) }}</i>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
<thead>
|
||||
<th>Expenses</th>
|
||||
<th>Credit</th>
|
||||
<th>Debit</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($group['transactions'] as $ta)
|
||||
<tr>
|
||||
<td>
|
||||
{{ $ta->transaction_group }}
|
||||
</td>
|
||||
<td>
|
||||
@if($ta->sum_credits)
|
||||
{{ money($ta->sum_credits, $ta->currency) }}
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if($ta->sum_debits)
|
||||
<i>{{ money($ta->sum_debits, $ta->currency) }}</i>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
{{-- show sums --}}
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>
|
||||
{{ $group['credits'] }}
|
||||
</td>
|
||||
<td>
|
||||
<i>{{ $group['debits'] }}</i>
|
||||
</td>
|
||||
</tr>
|
||||
{{-- show sums --}}
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>
|
||||
{{ $group['credits'] }}
|
||||
</td>
|
||||
<td>
|
||||
<i>{{ $group['debits'] }}</i>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
{{-- final total --}}
|
||||
<tr style="border-top: 3px; border-top-style: double;">
|
||||
<td></td>
|
||||
<td align="right">
|
||||
<b>Total</b>
|
||||
</td>
|
||||
<td>
|
||||
{{ $group['credits']->subtract($group['debits']) }}
|
||||
</td>
|
||||
</tr>
|
||||
{{-- final total --}}
|
||||
<tr style="border-top: 3px; border-top-style: double;">
|
||||
<td></td>
|
||||
<td align="right">
|
||||
<b>Total</b>
|
||||
</td>
|
||||
<td>
|
||||
{{ $group['credits']->subtract($group['debits']) }}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@if(!$loop->last)
|
||||
<hr>
|
||||
@endif
|
||||
@if(!$loop->last)
|
||||
<hr>
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
@if($errors->has($field))
|
||||
<p class="text-danger" style="margin-top: 10px;">{{ $errors->first($field) }}</p>
|
||||
{{--<div class="alert alert-danger" role="alert" style="margin-top: 10px;">
|
||||
{{ $errors->first($field) }}
|
||||
</div>--}}
|
||||
<p class="text-danger" style="margin-top: 10px;">{{ $errors->first($field) }}</p>
|
||||
{{--<div class="alert alert-danger" role="alert" style="margin-top: 10px;">
|
||||
{{ $errors->first($field) }}
|
||||
</div>--}}
|
||||
@endif
|
||||
|
||||
@@ -1,30 +1,31 @@
|
||||
@foreach (session('flash_notification', []) as $message)
|
||||
@if ($message['overlay'])
|
||||
@include('flash::modal', [
|
||||
'modalClass' => 'flash-modal',
|
||||
'title' => $message['title'],
|
||||
'body' => $message['message']
|
||||
])
|
||||
@else
|
||||
<div class="alert
|
||||
@if ($message['overlay'])
|
||||
@include('flash::modal', [
|
||||
'modalClass' => 'flash-modal',
|
||||
'title' => $message['title'],
|
||||
'body' => $message['message']
|
||||
])
|
||||
@else
|
||||
<div class="alert
|
||||
alert-{{ $message['level'] }}
|
||||
{{ $message['important'] ? 'alert-important' : '' }}"
|
||||
role="alert"
|
||||
>
|
||||
<div class="alert-icon">
|
||||
<i class="now-ui-icons ui-2_like"></i>
|
||||
</div>
|
||||
@if ($message['important'])
|
||||
@endif
|
||||
<button type="button"
|
||||
class="close"
|
||||
data-dismiss="alert"
|
||||
aria-hidden="true">×</button>
|
||||
{{ $message['important'] ? 'alert-important' : '' }}"
|
||||
role="alert"
|
||||
>
|
||||
<div class="alert-icon">
|
||||
<i class="now-ui-icons ui-2_like"></i>
|
||||
</div>
|
||||
@if ($message['important'])
|
||||
@endif
|
||||
<button type="button"
|
||||
class="close"
|
||||
data-dismiss="alert"
|
||||
aria-hidden="true">×
|
||||
</button>
|
||||
|
||||
{{ $message['message'] }}
|
||||
{{ $message['message'] }}
|
||||
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
{{ session()->forget('flash_notification') }}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
@extends('admin.app')
|
||||
@section('title', 'Adding Field')
|
||||
@section('content')
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
{{ Form::open(['route' => 'admin.flightfields.store']) }}
|
||||
@include('admin.flightfields.fields')
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
{{ Form::open(['route' => 'admin.flightfields.store']) }}
|
||||
@include('admin.flightfields.fields')
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
@extends('admin.app')
|
||||
@section('title', 'Editing ' . $field->name)
|
||||
@section('content')
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
{{ Form::model($field, ['route' => ['admin.flightfields.update', $field->id], 'method' => 'patch']) }}
|
||||
@include('admin.flightfields.fields')
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
{{ Form::model($field, ['route' => ['admin.flightfields.update', $field->id], 'method' => 'patch']) }}
|
||||
@include('admin.flightfields.fields')
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<div class="row">
|
||||
<div class="form-group col-sm-6">
|
||||
{{ Form::label('name', 'Name:') }} <span class="required">*</span>
|
||||
{{ Form::text('name', null, ['class' => 'form-control']) }}
|
||||
<p class="text-danger">{{ $errors->first('name') }}</p>
|
||||
</div>
|
||||
<div class="form-group col-sm-6">
|
||||
{{ Form::label('name', 'Name:') }} <span class="required">*</span>
|
||||
{{ Form::text('name', null, ['class' => 'form-control']) }}
|
||||
<p class="text-danger">{{ $errors->first('name') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<!-- Submit Field -->
|
||||
<div class="form-group col-sm-12">
|
||||
{{ Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-success']) }}
|
||||
<a href="{{ route('admin.flightfields.index') }}" class="btn btn-default">Cancel</a>
|
||||
</div>
|
||||
<!-- Submit Field -->
|
||||
<div class="form-group col-sm-12">
|
||||
{{ Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-success']) }}
|
||||
<a href="{{ route('admin.flightfields.index') }}" class="btn btn-default">Cancel</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
@extends('admin.app')
|
||||
@section('title', 'Flight Fields')
|
||||
@section('actions')
|
||||
<li><a href="{{ route('admin.flightfields.create') }}"><i class="ti-plus"></i>Add Field</a></li>
|
||||
<li>
|
||||
<a href="{{ route('admin.flights.create') }}">
|
||||
<i class="ti-plus"></i>
|
||||
Add Flight</a>
|
||||
</li>
|
||||
<li><a href="{{ route('admin.flightfields.create') }}"><i class="ti-plus"></i>Add Field</a></li>
|
||||
<li>
|
||||
<a href="{{ route('admin.flights.create') }}">
|
||||
<i class="ti-plus"></i>
|
||||
Add Flight</a>
|
||||
</li>
|
||||
@endsection
|
||||
@section('content')
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
@include('admin.flightfields.table')
|
||||
</div>
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
@include('admin.flightfields.table')
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
|
||||
@@ -1,34 +1,34 @@
|
||||
<div class="content table-responsive table-full-width">
|
||||
|
||||
<div class="header">
|
||||
@component('admin.components.info')
|
||||
Flights fields that can be filled out. You can still add other custom fields
|
||||
directly in the flight, but this provides a template for all flights.
|
||||
@endcomponent
|
||||
</div>
|
||||
<div class="header">
|
||||
@component('admin.components.info')
|
||||
Flights fields that can be filled out. You can still add other custom fields
|
||||
directly in the flight, but this provides a template for all flights.
|
||||
@endcomponent
|
||||
</div>
|
||||
|
||||
<table class="table table-hover table-responsive" id="pirepFields-table">
|
||||
<table class="table table-hover table-responsive" id="pirepFields-table">
|
||||
<thead>
|
||||
<th>Name</th>
|
||||
<th></th>
|
||||
<th>Name</th>
|
||||
<th></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($fields as $field)
|
||||
<tr>
|
||||
<td>{{ $field->name }}</td>
|
||||
<td class="text-right">
|
||||
{{ Form::open(['route' => ['admin.flightfields.destroy', $field->id], 'method' => 'delete']) }}
|
||||
<a href="{{ route('admin.flightfields.edit', [$field->id]) }}"
|
||||
class='btn btn-sm btn-success btn-icon'>
|
||||
<i class="fas fa-pencil-alt"></i></a>
|
||||
<tr>
|
||||
<td>{{ $field->name }}</td>
|
||||
<td class="text-right">
|
||||
{{ Form::open(['route' => ['admin.flightfields.destroy', $field->id], 'method' => 'delete']) }}
|
||||
<a href="{{ route('admin.flightfields.edit', [$field->id]) }}"
|
||||
class='btn btn-sm btn-success btn-icon'>
|
||||
<i class="fas fa-pencil-alt"></i></a>
|
||||
|
||||
{{ Form::button('<i class="fa fa-times"></i>',
|
||||
['type' => 'submit', 'class' => 'btn btn-sm btn-danger btn-icon',
|
||||
'onclick' => "return confirm('Are you sure?')"]) }}
|
||||
{{ Form::close() }}
|
||||
</td>
|
||||
</tr>
|
||||
{{ Form::button('<i class="fa fa-times"></i>',
|
||||
['type' => 'submit', 'class' => 'btn btn-sm btn-danger btn-icon',
|
||||
'onclick' => "return confirm('Are you sure?')"]) }}
|
||||
{{ Form::close() }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
@extends('admin.app')
|
||||
@section('title', 'Add Flight')
|
||||
@section('content')
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
{{ Form::model($flight, ['route' => ['admin.flights.store']]) }}
|
||||
@include('admin.flights.fields')
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
{{ Form::model($flight, ['route' => ['admin.flights.store']]) }}
|
||||
@include('admin.flights.fields')
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@@ -2,30 +2,30 @@
|
||||
|
||||
@section('title', 'Edit Flight')
|
||||
@section('content')
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
{{ Form::model($flight, ['route' => ['admin.flights.update', $flight->id], 'method' => 'patch']) }}
|
||||
@include('admin.flights.fields')
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
{{ Form::model($flight, ['route' => ['admin.flights.update', $flight->id], 'method' => 'patch']) }}
|
||||
@include('admin.flights.fields')
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
@include('admin.flights.subfleets')
|
||||
</div>
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
@include('admin.flights.subfleets')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
@include('admin.flights.flight_fields')
|
||||
</div>
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
@include('admin.flights.flight_fields')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
@include('admin.flights.fares')
|
||||
</div>
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
@include('admin.flights.fares')
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@include('admin.flights.scripts')
|
||||
|
||||
@@ -1,86 +1,86 @@
|
||||
<div id="flight_fares_wrapper" class="dataTables_wrapper form-inline dt-bootstrap">
|
||||
<div class="header">
|
||||
<h3>fares</h3>
|
||||
@component('admin.components.info')
|
||||
Fares assigned to the current flight. These can be overridden, otherwise,
|
||||
the values used come from the subfleet of the aircraft that the flight is
|
||||
filed with. Only assign the fares you want to override. They can be set as
|
||||
a monetary amount, or a percentage.
|
||||
<a href="http://docs.phpvms.net/concepts/finances"
|
||||
target="_blank">Read documentation about finances</a>.
|
||||
@endcomponent
|
||||
<div class="header">
|
||||
<h3>fares</h3>
|
||||
@component('admin.components.info')
|
||||
Fares assigned to the current flight. These can be overridden, otherwise,
|
||||
the values used come from the subfleet of the aircraft that the flight is
|
||||
filed with. Only assign the fares you want to override. They can be set as
|
||||
a monetary amount, or a percentage.
|
||||
<a href="http://docs.phpvms.net/concepts/finances"
|
||||
target="_blank">Read documentation about finances</a>.
|
||||
@endcomponent
|
||||
|
||||
<p class="text-danger">{{ $errors->first('value') }}</p>
|
||||
</div>
|
||||
<p class="text-danger">{{ $errors->first('value') }}</p>
|
||||
</div>
|
||||
|
||||
@if(count($flight->fares) === 0)
|
||||
@include('admin.common.none_added', ['type' => 'fares'])
|
||||
@if(count($flight->fares) === 0)
|
||||
@include('admin.common.none_added', ['type' => 'fares'])
|
||||
@endif
|
||||
|
||||
<table id="flight_fares"
|
||||
class="table table-hover"
|
||||
role="grid" aria-describedby="aircraft_fares_info">
|
||||
@if(count($flight->fares))
|
||||
<thead>
|
||||
<tr role="row">
|
||||
<th>Name</th>
|
||||
<th style="text-align: center;">Code</th>
|
||||
<th>Capacity</th>
|
||||
<th>Price</th>
|
||||
<th>Cost</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@endif
|
||||
|
||||
<table id="flight_fares"
|
||||
class="table table-hover"
|
||||
role="grid" aria-describedby="aircraft_fares_info">
|
||||
@if(count($flight->fares))
|
||||
<thead>
|
||||
<tr role="row">
|
||||
<th>Name</th>
|
||||
<th style="text-align: center;">Code</th>
|
||||
<th>Capacity</th>
|
||||
<th>Price</th>
|
||||
<th>Cost</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@endif
|
||||
<tbody>
|
||||
@foreach($flight->fares as $atf)
|
||||
<tr>
|
||||
<td class="sorting_1">{{ $atf->name }}</td>
|
||||
<td style="text-align: center;">{{ $atf->code }}</td>
|
||||
<td>
|
||||
<a href="#" data-pk="{{ $atf->id }}" data-name="capacity">{{ $atf->pivot->capacity }}</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="#" data-pk="{{ $atf->id }}" data-name="price">{{ $atf->pivot->price }}</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="#" data-pk="{{ $atf->id }}" data-name="cost">{{ $atf->pivot->cost }}</a>
|
||||
</td>
|
||||
<td style="text-align: center; width:3%;">
|
||||
{{ Form::open(['url' => '/admin/flights/'.$flight->id.'/fares',
|
||||
'method' => 'delete',
|
||||
'class' => 'pjax_fares_form'
|
||||
])
|
||||
}}
|
||||
{{ Form::hidden('fare_id', $atf->id) }}
|
||||
{{ Form::button('<i class="fa fa-times"></i>',
|
||||
['type' => 'submit',
|
||||
'class' => 'btn btn-danger btn-xs']) }}
|
||||
{{ Form::close() }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<hr />
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="text-right">
|
||||
{{ Form::open(['url' => '/admin/flights/'.$flight->id.'/fares',
|
||||
'method' => 'post',
|
||||
'class' => 'pjax_fares_form form-inline'
|
||||
]) }}
|
||||
{{ Form::select('fare_id', $avail_fares, null, [
|
||||
'placeholder' => 'Select Fare',
|
||||
'class' => 'ac-fare-dropdown form-control input-lg select2',
|
||||
'style' => 'width: 400px;',
|
||||
]) }}
|
||||
{{ Form::button('<i class="glyphicon glyphicon-plus"></i> add', [
|
||||
'type' => 'submit',
|
||||
'class' => 'btn btn-success btn-s']
|
||||
) }}
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
<tbody>
|
||||
@foreach($flight->fares as $atf)
|
||||
<tr>
|
||||
<td class="sorting_1">{{ $atf->name }}</td>
|
||||
<td style="text-align: center;">{{ $atf->code }}</td>
|
||||
<td>
|
||||
<a href="#" data-pk="{{ $atf->id }}" data-name="capacity">{{ $atf->pivot->capacity }}</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="#" data-pk="{{ $atf->id }}" data-name="price">{{ $atf->pivot->price }}</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="#" data-pk="{{ $atf->id }}" data-name="cost">{{ $atf->pivot->cost }}</a>
|
||||
</td>
|
||||
<td style="text-align: center; width:3%;">
|
||||
{{ Form::open(['url' => '/admin/flights/'.$flight->id.'/fares',
|
||||
'method' => 'delete',
|
||||
'class' => 'pjax_fares_form'
|
||||
])
|
||||
}}
|
||||
{{ Form::hidden('fare_id', $atf->id) }}
|
||||
{{ Form::button('<i class="fa fa-times"></i>',
|
||||
['type' => 'submit',
|
||||
'class' => 'btn btn-danger btn-xs']) }}
|
||||
{{ Form::close() }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<hr/>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="text-right">
|
||||
{{ Form::open(['url' => '/admin/flights/'.$flight->id.'/fares',
|
||||
'method' => 'post',
|
||||
'class' => 'pjax_fares_form form-inline'
|
||||
]) }}
|
||||
{{ Form::select('fare_id', $avail_fares, null, [
|
||||
'placeholder' => 'Select Fare',
|
||||
'class' => 'ac-fare-dropdown form-control input-lg select2',
|
||||
'style' => 'width: 400px;',
|
||||
]) }}
|
||||
{{ Form::button('<i class="glyphicon glyphicon-plus"></i> add', [
|
||||
'type' => 'submit',
|
||||
'class' => 'btn btn-success btn-s']
|
||||
) }}
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,249 +1,249 @@
|
||||
<!-- Airline Id Field -->
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="form-container">
|
||||
<h6><i class="fas fa-info-circle"></i>
|
||||
Flight Information
|
||||
</h6>
|
||||
<div class="form-container-body">
|
||||
<div class="row">
|
||||
<div class="form-group col-sm-3">
|
||||
{{ Form::label('airline_id', 'Airline:') }} <span
|
||||
class="required">*</span>
|
||||
{{ Form::select('airline_id', $airlines, null , ['class' => 'form-control select2']) }}
|
||||
<p class="text-danger">{{ $errors->first('airline_id') }}</p>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<div class="form-container">
|
||||
<h6><i class="fas fa-info-circle"></i>
|
||||
Flight Information
|
||||
</h6>
|
||||
<div class="form-container-body">
|
||||
<div class="row">
|
||||
<div class="form-group col-sm-3">
|
||||
{{ Form::label('airline_id', 'Airline:') }} <span
|
||||
class="required">*</span>
|
||||
{{ Form::select('airline_id', $airlines, null , ['class' => 'form-control select2']) }}
|
||||
<p class="text-danger">{{ $errors->first('airline_id') }}</p>
|
||||
</div>
|
||||
|
||||
<!-- Flight Number Field -->
|
||||
<div class="form-group col-sm-3">
|
||||
{{ Form::label('flight_number', 'Flight Number/Code/Leg') }} <span class="required">*</span>
|
||||
<!-- Flight Number Field -->
|
||||
<div class="form-group col-sm-3">
|
||||
{{ Form::label('flight_number', 'Flight Number/Code/Leg') }} <span class="required">*</span>
|
||||
|
||||
<div class="input-group input-group-sm mb3">
|
||||
{{ Form::text('flight_number', null, ['class' => 'form-control', 'style' => 'width: 33%']) }}
|
||||
{{ Form::text('route_code', null, ['class'=>'form-control', 'placeholder'=>'optional', 'style' => 'width: 33%']) }}
|
||||
{{ Form::text('route_leg', null, ['class'=>'form-control', 'placeholder'=>'optional', 'style' => 'width: 33%']) }}
|
||||
</div>
|
||||
|
||||
<p class="text-danger">{{ $errors->first('flight_number') }}</p>
|
||||
<p class="text-danger">{{ $errors->first('route_code') }}</p>
|
||||
<p class="text-danger">{{ $errors->first('route_leg') }}</p>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Route Code Field -->
|
||||
<div class="form-group col-sm-3">
|
||||
{{ Form::label('level', 'Flight Type:') }} <span class="required">*</span>
|
||||
{{ Form::select('flight_type', $flight_types, null, ['class' => 'form-control select2']) }}
|
||||
<p class="text-danger">{{ $errors->first('flight_type') }}</p>
|
||||
</div>
|
||||
|
||||
<!-- Route Leg Field -->
|
||||
<div class="form-group col-sm-3">
|
||||
{{ Form::label('flight_time', 'Flight Time (hours & minutes)') }}
|
||||
|
||||
<div class="input-group input-group-sm mb3">
|
||||
{{ Form::number('hours', null, [
|
||||
'class' => 'form-control',
|
||||
'placeholder' => 'hours',
|
||||
'style' => 'width: 50%',
|
||||
'min' => '0',
|
||||
]) }}
|
||||
|
||||
{{ Form::number('minutes', null, [
|
||||
'class' => 'form-control',
|
||||
'placeholder' => 'minutes',
|
||||
'style' => 'width: 50%',
|
||||
'min' => '0',
|
||||
]) }}
|
||||
</div>
|
||||
|
||||
<p class="text-danger">{{ $errors->first('hours') }}</p>
|
||||
<p class="text-danger">{{ $errors->first('minutes') }}</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- NEXT ROW --}}
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group col-sm-4">
|
||||
{{ Form::label('dpt_airport_id', 'Departure Airport:') }} <span
|
||||
class="required">*</span>
|
||||
{{ Form::select('dpt_airport_id', $airports, null , [
|
||||
'id' => 'dpt_airport_id',
|
||||
'class' => 'form-control select2'
|
||||
]) }}
|
||||
<p class="text-danger">{{ $errors->first('dpt_airport_id') }}</p>
|
||||
</div>
|
||||
|
||||
<!-- Arr Airport Id Field -->
|
||||
<div class="form-group col-sm-4">
|
||||
{{ Form::label('arr_airport_id', 'Arrival Airport:') }} <span
|
||||
class="required">*</span>
|
||||
{{ Form::select('arr_airport_id', $airports, null , [
|
||||
'id' => 'arr_airport_id',
|
||||
'class' => 'form-control select2 select2'
|
||||
]) }}
|
||||
<p class="text-danger">{{ $errors->first('arr_airport_id') }}</p>
|
||||
</div>
|
||||
|
||||
<!-- Alt Airport Id Field -->
|
||||
<div class="form-group col-sm-4">
|
||||
{{ Form::label('alt_airport_id', 'Alt Airport:') }}
|
||||
{{ Form::select('alt_airport_id', $alt_airports, null , ['class' => 'form-control select2']) }}
|
||||
<p class="text-danger">{{ $errors->first('alt_airport_id') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{{-- NEXT ROW --}}
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group col-sm-3">
|
||||
{{ Form::label('dpt_time', 'Departure Time:') }}
|
||||
{{ Form::text('dpt_time', null, ['class' => 'form-control']) }}
|
||||
<p class="text-danger">{{ $errors->first('dpt_time') }}</p>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-3">
|
||||
{{ Form::label('arr_time', 'Arrival Time:') }}
|
||||
{{ Form::text('arr_time', null, ['class' => 'form-control']) }}
|
||||
<p class="text-danger">{{ $errors->first('arr_time') }}</p>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-3">
|
||||
{{ Form::label('level', 'Flight Level:') }}
|
||||
{{ Form::text('level', null, ['class' => 'form-control']) }}
|
||||
<p class="text-danger">{{ $errors->first('level') }}</p>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-3">
|
||||
{{ Form::label('distance', 'Distance:') }} <span class="description small">in nautical miles</span>
|
||||
<a href="#" class="airport_distance_lookup">Calculate</a>
|
||||
{{ Form::text('distance', null, ['id' => 'distance', 'class' => 'form-control']) }}
|
||||
<p class="text-danger">{{ $errors->first('distance') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-group input-group-sm mb3">
|
||||
{{ Form::text('flight_number', null, ['class' => 'form-control', 'style' => 'width: 33%']) }}
|
||||
{{ Form::text('route_code', null, ['class'=>'form-control', 'placeholder'=>'optional', 'style' => 'width: 33%']) }}
|
||||
{{ Form::text('route_leg', null, ['class'=>'form-control', 'placeholder'=>'optional', 'style' => 'width: 33%']) }}
|
||||
</div>
|
||||
|
||||
<p class="text-danger">{{ $errors->first('flight_number') }}</p>
|
||||
<p class="text-danger">{{ $errors->first('route_code') }}</p>
|
||||
<p class="text-danger">{{ $errors->first('route_leg') }}</p>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Route Code Field -->
|
||||
<div class="form-group col-sm-3">
|
||||
{{ Form::label('level', 'Flight Type:') }} <span class="required">*</span>
|
||||
{{ Form::select('flight_type', $flight_types, null, ['class' => 'form-control select2']) }}
|
||||
<p class="text-danger">{{ $errors->first('flight_type') }}</p>
|
||||
</div>
|
||||
|
||||
<!-- Route Leg Field -->
|
||||
<div class="form-group col-sm-3">
|
||||
{{ Form::label('flight_time', 'Flight Time (hours & minutes)') }}
|
||||
|
||||
<div class="input-group input-group-sm mb3">
|
||||
{{ Form::number('hours', null, [
|
||||
'class' => 'form-control',
|
||||
'placeholder' => 'hours',
|
||||
'style' => 'width: 50%',
|
||||
'min' => '0',
|
||||
]) }}
|
||||
|
||||
{{ Form::number('minutes', null, [
|
||||
'class' => 'form-control',
|
||||
'placeholder' => 'minutes',
|
||||
'style' => 'width: 50%',
|
||||
'min' => '0',
|
||||
]) }}
|
||||
</div>
|
||||
|
||||
<p class="text-danger">{{ $errors->first('hours') }}</p>
|
||||
<p class="text-danger">{{ $errors->first('minutes') }}</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{-- NEXT ROW --}}
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group col-sm-4">
|
||||
{{ Form::label('dpt_airport_id', 'Departure Airport:') }} <span
|
||||
class="required">*</span>
|
||||
{{ Form::select('dpt_airport_id', $airports, null , [
|
||||
'id' => 'dpt_airport_id',
|
||||
'class' => 'form-control select2'
|
||||
]) }}
|
||||
<p class="text-danger">{{ $errors->first('dpt_airport_id') }}</p>
|
||||
</div>
|
||||
|
||||
<!-- Arr Airport Id Field -->
|
||||
<div class="form-group col-sm-4">
|
||||
{{ Form::label('arr_airport_id', 'Arrival Airport:') }} <span
|
||||
class="required">*</span>
|
||||
{{ Form::select('arr_airport_id', $airports, null , [
|
||||
'id' => 'arr_airport_id',
|
||||
'class' => 'form-control select2 select2'
|
||||
]) }}
|
||||
<p class="text-danger">{{ $errors->first('arr_airport_id') }}</p>
|
||||
</div>
|
||||
|
||||
<!-- Alt Airport Id Field -->
|
||||
<div class="form-group col-sm-4">
|
||||
{{ Form::label('alt_airport_id', 'Alt Airport:') }}
|
||||
{{ Form::select('alt_airport_id', $alt_airports, null , ['class' => 'form-control select2']) }}
|
||||
<p class="text-danger">{{ $errors->first('alt_airport_id') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{{-- NEXT ROW --}}
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group col-sm-3">
|
||||
{{ Form::label('dpt_time', 'Departure Time:') }}
|
||||
{{ Form::text('dpt_time', null, ['class' => 'form-control']) }}
|
||||
<p class="text-danger">{{ $errors->first('dpt_time') }}</p>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-3">
|
||||
{{ Form::label('arr_time', 'Arrival Time:') }}
|
||||
{{ Form::text('arr_time', null, ['class' => 'form-control']) }}
|
||||
<p class="text-danger">{{ $errors->first('arr_time') }}</p>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-3">
|
||||
{{ Form::label('level', 'Flight Level:') }}
|
||||
{{ Form::text('level', null, ['class' => 'form-control']) }}
|
||||
<p class="text-danger">{{ $errors->first('level') }}</p>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-3">
|
||||
{{ Form::label('distance', 'Distance:') }} <span class="description small">in nautical miles</span>
|
||||
<a href="#" class="airport_distance_lookup">Calculate</a>
|
||||
{{ Form::text('distance', null, ['id' => 'distance', 'class' => 'form-control']) }}
|
||||
<p class="text-danger">{{ $errors->first('distance') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="form-container">
|
||||
<h6><i class="fas fa-clock"></i>
|
||||
Scheduling
|
||||
</h6>
|
||||
<div class="form-container-body">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="form-container">
|
||||
<h6><i class="fas fa-clock"></i>
|
||||
Scheduling
|
||||
</h6>
|
||||
<div class="form-container-body">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-sm-4">
|
||||
{{ Form::label('start_date', 'Start Date') }}
|
||||
<span class="description small">optional</span>
|
||||
{{ Form::text('start_date', null, ['id' => 'start_date', 'class' => 'form-control']) }}
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
{{ Form::label('start_date', 'Start Date') }}
|
||||
<span class="description small">optional</span>
|
||||
{{ Form::text('start_date', null, ['id' => 'start_date', 'class' => 'form-control']) }}
|
||||
</div>
|
||||
|
||||
<div class="col-sm-4">
|
||||
{{ Form::label('end_date', 'End Date') }}
|
||||
<span class="description small">optional</span>
|
||||
{{ Form::text('end_date', null, ['id' => 'end_date', 'class' => 'form-control']) }}
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
{{ Form::label('end_date', 'End Date') }}
|
||||
<span class="description small">optional</span>
|
||||
{{ Form::text('end_date', null, ['id' => 'end_date', 'class' => 'form-control']) }}
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-4">
|
||||
{{ Form::label('days', 'Days of Week') }}
|
||||
<span class="description small">optional</span>
|
||||
<select id="days_of_week" name="days[]" multiple="multiple" size="7" style="width: 100%;">
|
||||
<option value="{{\App\Models\Enums\Days::MONDAY}}"
|
||||
{{in_mask($days, \App\Models\Enums\Days::MONDAY) ? 'selected':'' }}>
|
||||
@lang('common.days.mon')
|
||||
</option>
|
||||
<option value="{{\App\Models\Enums\Days::TUESDAY}}"
|
||||
{{in_mask($days, \App\Models\Enums\Days::TUESDAY) ? 'selected':'' }}>
|
||||
@lang('common.days.tues')
|
||||
</option>
|
||||
<option value="{{\App\Models\Enums\Days::WEDNESDAY}}"
|
||||
{{in_mask($days, \App\Models\Enums\Days::WEDNESDAY) ? 'selected':'' }}>
|
||||
@lang('common.days.wed')
|
||||
</option>
|
||||
<option value="{{\App\Models\Enums\Days::THURSDAY}}"
|
||||
{{in_mask($days, \App\Models\Enums\Days::THURSDAY) ? 'selected':'' }}>
|
||||
@lang('common.days.thurs')
|
||||
</option>
|
||||
<option value="{{\App\Models\Enums\Days::FRIDAY}}"
|
||||
{{in_mask($days, \App\Models\Enums\Days::FRIDAY) ? 'selected':'' }}>
|
||||
@lang('common.days.fri')
|
||||
</option>
|
||||
<option value="{{\App\Models\Enums\Days::SATURDAY}}"
|
||||
{{in_mask($days, \App\Models\Enums\Days::SATURDAY) ? 'selected':'false' }}>
|
||||
@lang('common.days.sat')
|
||||
</option>
|
||||
<option value="{{\App\Models\Enums\Days::SUNDAY}}"
|
||||
{{in_mask($days, \App\Models\Enums\Days::SUNDAY) ? 'selected':'false' }}>
|
||||
@lang('common.days.sun')
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-sm-4">
|
||||
{{ Form::label('days', 'Days of Week') }}
|
||||
<span class="description small">optional</span>
|
||||
<select id="days_of_week" name="days[]" multiple="multiple" size="7" style="width: 100%;">
|
||||
<option value="{{\App\Models\Enums\Days::MONDAY}}"
|
||||
{{in_mask($days, \App\Models\Enums\Days::MONDAY) ? 'selected':'' }}>
|
||||
@lang('common.days.mon')
|
||||
</option>
|
||||
<option value="{{\App\Models\Enums\Days::TUESDAY}}"
|
||||
{{in_mask($days, \App\Models\Enums\Days::TUESDAY) ? 'selected':'' }}>
|
||||
@lang('common.days.tues')
|
||||
</option>
|
||||
<option value="{{\App\Models\Enums\Days::WEDNESDAY}}"
|
||||
{{in_mask($days, \App\Models\Enums\Days::WEDNESDAY) ? 'selected':'' }}>
|
||||
@lang('common.days.wed')
|
||||
</option>
|
||||
<option value="{{\App\Models\Enums\Days::THURSDAY}}"
|
||||
{{in_mask($days, \App\Models\Enums\Days::THURSDAY) ? 'selected':'' }}>
|
||||
@lang('common.days.thurs')
|
||||
</option>
|
||||
<option value="{{\App\Models\Enums\Days::FRIDAY}}"
|
||||
{{in_mask($days, \App\Models\Enums\Days::FRIDAY) ? 'selected':'' }}>
|
||||
@lang('common.days.fri')
|
||||
</option>
|
||||
<option value="{{\App\Models\Enums\Days::SATURDAY}}"
|
||||
{{in_mask($days, \App\Models\Enums\Days::SATURDAY) ? 'selected':'false' }}>
|
||||
@lang('common.days.sat')
|
||||
</option>
|
||||
<option value="{{\App\Models\Enums\Days::SUNDAY}}"
|
||||
{{in_mask($days, \App\Models\Enums\Days::SUNDAY) ? 'selected':'false' }}>
|
||||
@lang('common.days.sun')
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="form-container">
|
||||
<h6><i class="fas fa-map"></i>
|
||||
Route
|
||||
</h6>
|
||||
<div class="form-container-body row">
|
||||
<!-- Route Field -->
|
||||
<div class="form-group col-sm-12">
|
||||
{{ Form::textarea('route', null, [
|
||||
'class' => 'form-control input-text',
|
||||
'style' => 'padding: 10px',
|
||||
]) }}
|
||||
<p class="text-danger">{{ $errors->first('route') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-12">
|
||||
<div class="form-container">
|
||||
<h6><i class="fas fa-map"></i>
|
||||
Route
|
||||
</h6>
|
||||
<div class="form-container-body row">
|
||||
<!-- Route Field -->
|
||||
<div class="form-group col-sm-12">
|
||||
{{ Form::textarea('route', null, [
|
||||
'class' => 'form-control input-text',
|
||||
'style' => 'padding: 10px',
|
||||
]) }}
|
||||
<p class="text-danger">{{ $errors->first('route') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="form-container">
|
||||
<h6><i class="fas fa-sticky-note"></i>
|
||||
Remarks
|
||||
</h6>
|
||||
<div class="form-container-body row">
|
||||
<div class="form-group col-sm-12">
|
||||
{{ Form::textarea('notes', null, [
|
||||
'class' => 'form-control input-text',
|
||||
'style' => 'padding: 10px',
|
||||
]) }}
|
||||
<p class="text-danger">{{ $errors->first('notes') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-12">
|
||||
<div class="form-container">
|
||||
<h6><i class="fas fa-sticky-note"></i>
|
||||
Remarks
|
||||
</h6>
|
||||
<div class="form-container-body row">
|
||||
<div class="form-group col-sm-12">
|
||||
{{ Form::textarea('notes', null, [
|
||||
'class' => 'form-control input-text',
|
||||
'style' => 'padding: 10px',
|
||||
]) }}
|
||||
<p class="text-danger">{{ $errors->first('notes') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<!-- Active Field -->
|
||||
<div class="col-sm-4">
|
||||
<div class="checkbox">
|
||||
<label class="checkbox-inline">
|
||||
{{ Form::label('active', 'Active:') }}
|
||||
{{ Form::hidden('active', 0, false) }}
|
||||
{{ Form::checkbox('active') }}
|
||||
</label>
|
||||
</div>
|
||||
<!-- Active Field -->
|
||||
<div class="col-sm-4">
|
||||
<div class="checkbox">
|
||||
<label class="checkbox-inline">
|
||||
{{ Form::label('active', 'Active:') }}
|
||||
{{ Form::hidden('active', 0, false) }}
|
||||
{{ Form::checkbox('active') }}
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<div class="text-right">
|
||||
{{ Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-success']) }}
|
||||
<a href="{{ route('admin.flights.index') }}" class="btn btn-default">Cancel</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-8">
|
||||
<div class="text-right">
|
||||
{{ Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-success']) }}
|
||||
<a href="{{ route('admin.flights.index') }}" class="btn btn-default">Cancel</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,79 +1,79 @@
|
||||
<div id="flight_fields_wrapper">
|
||||
<h3>custom fields</h3><br />
|
||||
<table class="table table-responsive" id="flight-fields-table">
|
||||
@if(count($flight->field_values))
|
||||
<thead>
|
||||
<th>Name</th>
|
||||
<th>Value</th>
|
||||
<th></th>
|
||||
</thead>
|
||||
@endif
|
||||
<tbody>
|
||||
@php
|
||||
#
|
||||
# A little nasty having logic like this in a template, but we need
|
||||
# to filter out the field values that have already been shown, since
|
||||
# they were values set because they had a FlightField parent
|
||||
#
|
||||
$shown = [];
|
||||
@endphp
|
||||
@foreach($flight_fields->concat($flight->field_values) as $field)
|
||||
@php
|
||||
if(in_array($field->name, $shown, true)) {
|
||||
continue;
|
||||
}
|
||||
<h3>custom fields</h3><br/>
|
||||
<table class="table table-responsive" id="flight-fields-table">
|
||||
@if(count($flight->field_values))
|
||||
<thead>
|
||||
<th>Name</th>
|
||||
<th>Value</th>
|
||||
<th></th>
|
||||
</thead>
|
||||
@endif
|
||||
<tbody>
|
||||
@php
|
||||
#
|
||||
# A little nasty having logic like this in a template, but we need
|
||||
# to filter out the field values that have already been shown, since
|
||||
# they were values set because they had a FlightField parent
|
||||
#
|
||||
$shown = [];
|
||||
@endphp
|
||||
@foreach($flight_fields->concat($flight->field_values) as $field)
|
||||
@php
|
||||
if(in_array($field->name, $shown, true)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$shown[] = $field->name;
|
||||
$val_field = $flight->field_values->where('name', $field->name)->first();
|
||||
@endphp
|
||||
<tr>
|
||||
<td>{{ $field->name }}</td>
|
||||
<td>
|
||||
<a class="inline" href="#" data-pk="{{ $val_field['id'] ?? '' }}" data-name="{{ $field->name }}">
|
||||
{{ $val_field['value'] ?? '' }}
|
||||
</a>
|
||||
</td>
|
||||
<td style="width: 10%; text-align: center;" class="form-inline">
|
||||
{{ Form::open(['url' => '/admin/flights/'.$flight->id.'/fields',
|
||||
'method' => 'delete',
|
||||
'class' => 'pjax_form pjax_flight_fields'
|
||||
]) }}
|
||||
{{ Form::hidden('field_id', $val_field['id'] ?? null) }}
|
||||
<div class='btn-group'>
|
||||
{{ Form::button('<i class="fa fa-times"></i>',
|
||||
['type' => 'submit', 'class' => 'btn btn-sm btn-danger btn-icon',
|
||||
'onclick' => "return confirm('Are you sure?')"]) }}
|
||||
</div>
|
||||
{{ Form::close() }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<hr/>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="text-right">
|
||||
{{ Form::open([
|
||||
'url' => '/admin/flights/'.$flight->id.'/fields',
|
||||
'method' => 'post',
|
||||
'class' => 'pjax_form form-inline pjax_flight_fields'
|
||||
])
|
||||
}}
|
||||
$shown[] = $field->name;
|
||||
$val_field = $flight->field_values->where('name', $field->name)->first();
|
||||
@endphp
|
||||
<tr>
|
||||
<td>{{ $field->name }}</td>
|
||||
<td>
|
||||
<a class="inline" href="#" data-pk="{{ $val_field['id'] ?? '' }}" data-name="{{ $field->name }}">
|
||||
{{ $val_field['value'] ?? '' }}
|
||||
</a>
|
||||
</td>
|
||||
<td style="width: 10%; text-align: center;" class="form-inline">
|
||||
{{ Form::open(['url' => '/admin/flights/'.$flight->id.'/fields',
|
||||
'method' => 'delete',
|
||||
'class' => 'pjax_form pjax_flight_fields'
|
||||
]) }}
|
||||
{{ Form::hidden('field_id', $val_field['id'] ?? null) }}
|
||||
<div class='btn-group'>
|
||||
{{ Form::button('<i class="fa fa-times"></i>',
|
||||
['type' => 'submit', 'class' => 'btn btn-sm btn-danger btn-icon',
|
||||
'onclick' => "return confirm('Are you sure?')"]) }}
|
||||
</div>
|
||||
{{ Form::close() }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<hr/>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="text-right">
|
||||
{{ Form::open([
|
||||
'url' => '/admin/flights/'.$flight->id.'/fields',
|
||||
'method' => 'post',
|
||||
'class' => 'pjax_form form-inline pjax_flight_fields'
|
||||
])
|
||||
}}
|
||||
|
||||
{{ Form::label('name', 'Name:') }}
|
||||
{{ Form::text('name', null, ['class' => 'form-control']) }}
|
||||
|
||||
{{ Form::label('value', 'Value:') }}
|
||||
{{ Form::text('value', null, ['class' => 'form-control']) }}
|
||||
|
||||
{{ Form::button('<i class="glyphicon glyphicon-plus"></i> add',
|
||||
['type' => 'submit',
|
||||
'class' => 'btn btn-success btn-s']) }}
|
||||
<p class="text-danger">{{ $errors->first('name') }}</p>
|
||||
<p class="text-danger">{{ $errors->first('value') }}</p>
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
{{ Form::label('name', 'Name:') }}
|
||||
{{ Form::text('name', null, ['class' => 'form-control']) }}
|
||||
|
||||
{{ Form::label('value', 'Value:') }}
|
||||
{{ Form::text('value', null, ['class' => 'form-control']) }}
|
||||
|
||||
{{ Form::button('<i class="glyphicon glyphicon-plus"></i> add',
|
||||
['type' => 'submit',
|
||||
'class' => 'btn btn-success btn-s']) }}
|
||||
<p class="text-danger">{{ $errors->first('name') }}</p>
|
||||
<p class="text-danger">{{ $errors->first('value') }}</p>
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
@extends('admin.app')
|
||||
@section('title', 'Import Flights')
|
||||
@section('content')
|
||||
@include('admin.common.import', ['route' => 'admin.flights.import'])
|
||||
@include('admin.common.import', ['route' => 'admin.flights.import'])
|
||||
@endsection
|
||||
|
||||
@@ -2,30 +2,30 @@
|
||||
@section('title', 'Flights')
|
||||
|
||||
@section('actions')
|
||||
<li><a href="{{ route('admin.flights.export') }}"><i class="ti-plus"></i>Export to CSV</a></li>
|
||||
<li><a href="{{ route('admin.flights.import') }}"><i class="ti-plus"></i>Import from CSV</a></li>
|
||||
<li><a href="{{ route('admin.flightfields.index') }}"><i class="ti-plus"></i>Fields</a></li>
|
||||
<li>
|
||||
<a href="{{ route('admin.flights.create') }}">
|
||||
<i class="ti-plus"></i>
|
||||
Add Flight</a>
|
||||
</li>
|
||||
<li><a href="{{ route('admin.flights.export') }}"><i class="ti-plus"></i>Export to CSV</a></li>
|
||||
<li><a href="{{ route('admin.flights.import') }}"><i class="ti-plus"></i>Import from CSV</a></li>
|
||||
<li><a href="{{ route('admin.flightfields.index') }}"><i class="ti-plus"></i>Fields</a></li>
|
||||
<li>
|
||||
<a href="{{ route('admin.flights.create') }}">
|
||||
<i class="ti-plus"></i>
|
||||
Add Flight</a>
|
||||
</li>
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<div class="card">
|
||||
@include('admin.flights.search')
|
||||
</div>
|
||||
<div class="card">
|
||||
@include('admin.flights.search')
|
||||
</div>
|
||||
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
@include('admin.flights.table')
|
||||
</div>
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
@include('admin.flights.table')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12 text-center">
|
||||
{{ $flights->links('admin.pagination.default') }}
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12 text-center">
|
||||
{{ $flights->links('admin.pagination.default') }}
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@@ -1,121 +1,120 @@
|
||||
@section('scripts')
|
||||
<script>
|
||||
<script>
|
||||
|
||||
const setEditable = () =>
|
||||
{
|
||||
const api_key = $('meta[name="api-key"]').attr('content');
|
||||
const csrf_token = $('meta[name="csrf-token"]').attr('content');
|
||||
const setEditable = () => {
|
||||
const api_key = $('meta[name="api-key"]').attr('content');
|
||||
const csrf_token = $('meta[name="csrf-token"]').attr('content');
|
||||
|
||||
$('#flight_fares a').editable({
|
||||
$('#flight_fares a').editable({
|
||||
type: 'text',
|
||||
mode: 'inline',
|
||||
emptytext: 'inherited',
|
||||
url: '{{ url('/admin/flights/'.$flight->id.'/fares') }}',
|
||||
title: 'Enter override value',
|
||||
ajaxOptions: {
|
||||
type: 'post',
|
||||
headers: {
|
||||
'x-api-key': api_key,
|
||||
'X-CSRF-TOKEN': csrf_token
|
||||
}
|
||||
type: 'post',
|
||||
headers: {
|
||||
'x-api-key': api_key,
|
||||
'X-CSRF-TOKEN': csrf_token
|
||||
}
|
||||
},
|
||||
params: function (params) {
|
||||
return {
|
||||
_method: 'put',
|
||||
fare_id: params.pk,
|
||||
name: params.name,
|
||||
value: params.value
|
||||
}
|
||||
return {
|
||||
_method: 'put',
|
||||
fare_id: params.pk,
|
||||
name: params.name,
|
||||
value: params.value
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
});
|
||||
};
|
||||
|
||||
const setFieldsEditable = () => {
|
||||
const api_key = $('meta[name="api-key"]').attr('content');
|
||||
const csrf_token = $('meta[name="csrf-token"]').attr('content');
|
||||
const setFieldsEditable = () => {
|
||||
const api_key = $('meta[name="api-key"]').attr('content');
|
||||
const csrf_token = $('meta[name="csrf-token"]').attr('content');
|
||||
|
||||
$('#flight_fields_wrapper a.inline').editable({
|
||||
$('#flight_fields_wrapper a.inline').editable({
|
||||
type: 'text',
|
||||
mode: 'inline',
|
||||
emptytext: 'no value',
|
||||
url: '{{ url('/admin/flights/'.$flight->id.'/fields') }}',
|
||||
ajaxOptions: {
|
||||
type: 'post',
|
||||
headers: {
|
||||
'x-api-key': api_key,
|
||||
'X-CSRF-TOKEN': csrf_token
|
||||
}
|
||||
type: 'post',
|
||||
headers: {
|
||||
'x-api-key': api_key,
|
||||
'X-CSRF-TOKEN': csrf_token
|
||||
}
|
||||
},
|
||||
params: function (params) {
|
||||
return {
|
||||
_method: 'put',
|
||||
field_id: params.pk,
|
||||
name: params.name,
|
||||
value: params.value
|
||||
}
|
||||
return {
|
||||
_method: 'put',
|
||||
field_id: params.pk,
|
||||
name: params.name,
|
||||
value: params.value
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
$(document).ready(function () {
|
||||
$("select#days_of_week").select2();
|
||||
|
||||
setEditable();
|
||||
setFieldsEditable();
|
||||
|
||||
const start_date_picker = new Pikaday({
|
||||
field: document.getElementById('start_date'),
|
||||
minDate: new Date(),
|
||||
});
|
||||
|
||||
const end_date_picker = new Pikaday({
|
||||
field: document.getElementById('end_date'),
|
||||
minDate: new Date(),
|
||||
});
|
||||
|
||||
$(document).on('submit', 'form.pjax_flight_fields', function (event) {
|
||||
event.preventDefault();
|
||||
$.pjax.submit(event, '#flight_fields_wrapper', {push: false});
|
||||
});
|
||||
|
||||
$(document).on('submit', 'form.pjax_subfleet_form', function (event) {
|
||||
event.preventDefault();
|
||||
$.pjax.submit(event, '#subfleet_flight_wrapper', {push: false});
|
||||
});
|
||||
|
||||
$(document).on('submit', 'form.pjax_fares_form', function (event) {
|
||||
event.preventDefault();
|
||||
$.pjax.submit(event, '#flight_fares_wrapper', {push: false});
|
||||
});
|
||||
|
||||
$(document).on('pjax:complete', function () {
|
||||
initPlugins();
|
||||
setEditable();
|
||||
setFieldsEditable();
|
||||
});
|
||||
|
||||
$('a.airport_distance_lookup').click(async function (e) {
|
||||
e.preventDefault();
|
||||
const fromIcao = $("select#dpt_airport_id option:selected").val();
|
||||
const toIcao = $("select#arr_airport_id option:selected").val();
|
||||
console.log('fromIcao="' + fromIcao + '", toIcao="' + toIcao + '"');
|
||||
|
||||
if (fromIcao === '' || toIcao === '') {
|
||||
return;
|
||||
}
|
||||
|
||||
console.log(`Calculating from ${fromIcao} to ${toIcao}`);
|
||||
let response;
|
||||
|
||||
try {
|
||||
response = await phpvms.calculate_distance(fromIcao, toIcao);
|
||||
} catch (e) {
|
||||
console.log('Error calculating distance:', e);
|
||||
return;
|
||||
}
|
||||
|
||||
$("#distance").val(response.data.distance.nmi);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
$(document).ready(function () {
|
||||
$("select#days_of_week").select2();
|
||||
|
||||
setEditable();
|
||||
setFieldsEditable();
|
||||
|
||||
const start_date_picker = new Pikaday({
|
||||
field: document.getElementById('start_date'),
|
||||
minDate: new Date(),
|
||||
});
|
||||
|
||||
const end_date_picker = new Pikaday({
|
||||
field: document.getElementById('end_date'),
|
||||
minDate: new Date(),
|
||||
});
|
||||
|
||||
$(document).on('submit', 'form.pjax_flight_fields', function (event) {
|
||||
event.preventDefault();
|
||||
$.pjax.submit(event, '#flight_fields_wrapper', {push: false});
|
||||
});
|
||||
|
||||
$(document).on('submit', 'form.pjax_subfleet_form', function (event) {
|
||||
event.preventDefault();
|
||||
$.pjax.submit(event, '#subfleet_flight_wrapper', {push: false});
|
||||
});
|
||||
|
||||
$(document).on('submit', 'form.pjax_fares_form', function (event) {
|
||||
event.preventDefault();
|
||||
$.pjax.submit(event, '#flight_fares_wrapper', {push: false});
|
||||
});
|
||||
|
||||
$(document).on('pjax:complete', function () {
|
||||
initPlugins();
|
||||
setEditable();
|
||||
setFieldsEditable();
|
||||
});
|
||||
|
||||
$('a.airport_distance_lookup').click(async function (e) {
|
||||
e.preventDefault();
|
||||
const fromIcao = $("select#dpt_airport_id option:selected").val();
|
||||
const toIcao = $("select#arr_airport_id option:selected").val();
|
||||
console.log('fromIcao="' + fromIcao + '", toIcao="' + toIcao + '"');
|
||||
|
||||
if (fromIcao === '' || toIcao === '') {
|
||||
return;
|
||||
}
|
||||
|
||||
console.log(`Calculating from ${fromIcao} to ${toIcao}`);
|
||||
let response;
|
||||
|
||||
try {
|
||||
response = await phpvms.calculate_distance(fromIcao, toIcao);
|
||||
} catch (e) {
|
||||
console.log('Error calculating distance:', e);
|
||||
return;
|
||||
}
|
||||
|
||||
$("#distance").val(response.data.distance.nmi);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
@endsection
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
<div class="content">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group">
|
||||
{{ Form::open(['route' => 'admin.flights.index', 'method' => 'GET', 'class'=>'form-inline pull-right']) }}
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="form-group">
|
||||
{{ Form::open(['route' => 'admin.flights.index', 'method' => 'GET', 'class'=>'form-inline pull-right']) }}
|
||||
|
||||
{{ Form::label('flight_number', 'Flight Number:') }}
|
||||
{{ Form::text('flight_number', null, ['class' => 'form-control']) }}
|
||||
|
||||
{{ Form::label('dpt_airport_id', 'Departure:') }}
|
||||
{{ Form::select('dpt_airport_id', $airports, null , ['class' => 'form-control']) }}
|
||||
|
||||
{{ Form::label('arr_airport_id', 'Arrival:') }}
|
||||
{{ Form::select('arr_airport_id', $airports, null , ['class' => 'form-control']) }}
|
||||
|
||||
{{ Form::submit('find', ['class' => 'btn btn-primary']) }}
|
||||
|
||||
<a href="{{ route('admin.flights.index') }}">clear</a>
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
{{ Form::label('flight_number', 'Flight Number:') }}
|
||||
{{ Form::text('flight_number', null, ['class' => 'form-control']) }}
|
||||
|
||||
{{ Form::label('dpt_airport_id', 'Departure:') }}
|
||||
{{ Form::select('dpt_airport_id', $airports, null , ['class' => 'form-control']) }}
|
||||
|
||||
{{ Form::label('arr_airport_id', 'Arrival:') }}
|
||||
{{ Form::select('arr_airport_id', $airports, null , ['class' => 'form-control']) }}
|
||||
|
||||
{{ Form::submit('find', ['class' => 'btn btn-primary']) }}
|
||||
|
||||
<a href="{{ route('admin.flights.index') }}">clear</a>
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,45 +1,45 @@
|
||||
@extends('admin.app')
|
||||
|
||||
@section('content')
|
||||
<section class="content-header">
|
||||
<section class="content-header">
|
||||
<h1 class="pull-left">{{ $flight->airline->code }}{{ $flight->flight_number }}</h1>
|
||||
<h1 class="pull-right">
|
||||
<a class="btn btn-primary pull-right" style="margin-top: -10px;margin-bottom: 5px"
|
||||
href="{{ route('admin.flights.edit', $flight->id) }}">Edit</a>
|
||||
<a class="btn btn-primary pull-right" style="margin-top: -10px;margin-bottom: 5px"
|
||||
href="{{ route('admin.flights.edit', $flight->id) }}">Edit</a>
|
||||
</h1>
|
||||
</section>
|
||||
<section class="content">
|
||||
</section>
|
||||
<section class="content">
|
||||
<div class="clearfix"></div>
|
||||
<div class="row">
|
||||
@include('admin.flights.show_fields')
|
||||
@include('admin.flights.show_fields')
|
||||
</div>
|
||||
<div class="box box-primary">
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<h3>assigned subfleets</h3>
|
||||
<div class="box-body">
|
||||
@include('admin.flights.subfleets')
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<h3>assigned subfleets</h3>
|
||||
<div class="box-body">
|
||||
@include('admin.flights.subfleets')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
@endsection
|
||||
@section('scripts')
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$(".select2_dropdown").select2();
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
$(".select2_dropdown").select2();
|
||||
|
||||
$(document).on('submit', 'form.pjax_form', function (event) {
|
||||
$(document).on('submit', 'form.pjax_form', function (event) {
|
||||
event.preventDefault();
|
||||
$.pjax.submit(event, '#subfleet_flight_wrapper', {push: false});
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('pjax:complete', function() {
|
||||
$(document).on('pjax:complete', function () {
|
||||
$(".select2_dropdown").select2();
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</script>
|
||||
@endsection
|
||||
|
||||
@@ -1,81 +1,81 @@
|
||||
<div class="form-group col-sm-6">
|
||||
<div class="box box-solid">
|
||||
<div class="box-header with-border">
|
||||
{{--<i class="fa fa-text-width"></i>--}}
|
||||
<h3 class="box-title">{{ Form::label('dpt_airport_id', 'Dep ICAO') }}</h3>
|
||||
</div>
|
||||
<div class="box-body"><p class="lead">
|
||||
{{ $flight->dpt_airport->icao }} - {{ $flight->dpt_airport->name }}
|
||||
</p></div>
|
||||
<div class="box box-solid">
|
||||
<div class="box-header with-border">
|
||||
{{--<i class="fa fa-text-width"></i>--}}
|
||||
<h3 class="box-title">{{ Form::label('dpt_airport_id', 'Dep ICAO') }}</h3>
|
||||
</div>
|
||||
<div class="box-body"><p class="lead">
|
||||
{{ $flight->dpt_airport->icao }} - {{ $flight->dpt_airport->name }}
|
||||
</p></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-6">
|
||||
<div class="box box-solid">
|
||||
<div class="box-header with-border">
|
||||
{{--<i class="fa fa-text-width"></i>--}}
|
||||
<h3 class="box-title">{{ Form::label('arr_airport_id', 'Arrival ICAO') }}</h3>
|
||||
</div>
|
||||
<div class="box-body"><p class="lead">
|
||||
{{ $flight->arr_airport->icao }} - {{ $flight->arr_airport->name }}
|
||||
</p>
|
||||
</div>
|
||||
<div class="box box-solid">
|
||||
<div class="box-header with-border">
|
||||
{{--<i class="fa fa-text-width"></i>--}}
|
||||
<h3 class="box-title">{{ Form::label('arr_airport_id', 'Arrival ICAO') }}</h3>
|
||||
</div>
|
||||
<div class="box-body"><p class="lead">
|
||||
{{ $flight->arr_airport->icao }} - {{ $flight->arr_airport->name }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group col-sm-12">
|
||||
<div class="box box-primary">
|
||||
<div class="box-body">
|
||||
<!-- Route Code Field -->
|
||||
<div class="form-group">
|
||||
{{ Form::label('route_code', 'Route Code:') }}
|
||||
{{ $flight->route_code }}
|
||||
</div>
|
||||
<div class="box box-primary">
|
||||
<div class="box-body">
|
||||
<!-- Route Code Field -->
|
||||
<div class="form-group">
|
||||
{{ Form::label('route_code', 'Route Code:') }}
|
||||
{{ $flight->route_code }}
|
||||
</div>
|
||||
|
||||
<!-- Route Leg Field -->
|
||||
<div class="form-group">
|
||||
{{ Form::label('route_leg', 'Route Leg:') }}
|
||||
{{ $flight->route_leg }}
|
||||
</div>
|
||||
<!-- Route Leg Field -->
|
||||
<div class="form-group">
|
||||
{{ Form::label('route_leg', 'Route Leg:') }}
|
||||
{{ $flight->route_leg }}
|
||||
</div>
|
||||
|
||||
<!-- Alt Airport Id Field -->
|
||||
@if($flight->alt_airport_id)
|
||||
<div class="form-group">
|
||||
{{ Form::label('alt_airport_id', 'Alt Airport Id:') }}
|
||||
<p>{{ $flight->alt_airport->icao }}</p>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- Route Field -->
|
||||
<div class="form-group">
|
||||
{{ Form::label('route', 'Route:') }}
|
||||
<p>{{ $flight->route }}</p>
|
||||
</div>
|
||||
|
||||
<!-- Dpt Time Field -->
|
||||
<div class="form-group">
|
||||
{{ Form::label('dpt_time', 'Departure Time:') }}
|
||||
{{ $flight->dpt_time }}
|
||||
</div>
|
||||
|
||||
<!-- Arr Time Field -->
|
||||
<div class="form-group">
|
||||
{{ Form::label('arr_time', 'Arrival Time:') }}
|
||||
{{ $flight->arr_time }}
|
||||
</div>
|
||||
|
||||
<!-- Notes Field -->
|
||||
<div class="form-group">
|
||||
{{ Form::label('notes', 'Notes:') }}
|
||||
<p>{{ $flight->notes }}</p>
|
||||
</div>
|
||||
|
||||
<!-- Active Field -->
|
||||
<div class="form-group">
|
||||
{{ Form::label('active', 'Active:') }}
|
||||
<p>{{ $flight->active }}</p>
|
||||
</div>
|
||||
<!-- Alt Airport Id Field -->
|
||||
@if($flight->alt_airport_id)
|
||||
<div class="form-group">
|
||||
{{ Form::label('alt_airport_id', 'Alt Airport Id:') }}
|
||||
<p>{{ $flight->alt_airport->icao }}</p>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- Route Field -->
|
||||
<div class="form-group">
|
||||
{{ Form::label('route', 'Route:') }}
|
||||
<p>{{ $flight->route }}</p>
|
||||
</div>
|
||||
|
||||
<!-- Dpt Time Field -->
|
||||
<div class="form-group">
|
||||
{{ Form::label('dpt_time', 'Departure Time:') }}
|
||||
{{ $flight->dpt_time }}
|
||||
</div>
|
||||
|
||||
<!-- Arr Time Field -->
|
||||
<div class="form-group">
|
||||
{{ Form::label('arr_time', 'Arrival Time:') }}
|
||||
{{ $flight->arr_time }}
|
||||
</div>
|
||||
|
||||
<!-- Notes Field -->
|
||||
<div class="form-group">
|
||||
{{ Form::label('notes', 'Notes:') }}
|
||||
<p>{{ $flight->notes }}</p>
|
||||
</div>
|
||||
|
||||
<!-- Active Field -->
|
||||
<div class="form-group">
|
||||
{{ Form::label('active', 'Active:') }}
|
||||
<p>{{ $flight->active }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,66 +1,66 @@
|
||||
<div id="subfleet_flight_wrapper">
|
||||
<div class="header">
|
||||
<h3>subfleets</h3>
|
||||
@component('admin.components.info')
|
||||
The subfleets that are assigned to this flight.
|
||||
@endcomponent
|
||||
</div>
|
||||
<div class="header">
|
||||
<h3>subfleets</h3>
|
||||
@component('admin.components.info')
|
||||
The subfleets that are assigned to this flight.
|
||||
@endcomponent
|
||||
</div>
|
||||
|
||||
@if(count($flight->subfleets) === 0)
|
||||
@include('admin.common.none_added', ['type' => 'subfleets'])
|
||||
@if(count($flight->subfleets) === 0)
|
||||
@include('admin.common.none_added', ['type' => 'subfleets'])
|
||||
@endif
|
||||
|
||||
<table class="table table-responsive" id="aircrafts-table">
|
||||
@if(count($flight->subfleets))
|
||||
<thead>
|
||||
<th>Type</th>
|
||||
<th>Name</th>
|
||||
<th style="text-align: center;">Actions</th>
|
||||
</thead>
|
||||
@endif
|
||||
|
||||
<table class="table table-responsive" id="aircrafts-table">
|
||||
@if(count($flight->subfleets))
|
||||
<thead>
|
||||
<th>Type</th>
|
||||
<th>Name</th>
|
||||
<th style="text-align: center;">Actions</th>
|
||||
</thead>
|
||||
@endif
|
||||
<tbody>
|
||||
@foreach($flight->subfleets as $sf)
|
||||
<tr>
|
||||
<td>{{ $sf->type }}</td>
|
||||
<td>{{ $sf->name }}</td>
|
||||
<td style="width: 10%; text-align: center;" class="form-inline">
|
||||
{{ Form::open(['url' => '/admin/flights/'.$flight->id.'/subfleets',
|
||||
'method' => 'delete',
|
||||
'class' => 'pjax_subfleet_form']) }}
|
||||
{{ Form::hidden('subfleet_id', $sf->id) }}
|
||||
<div class='btn-group'>
|
||||
{{ Form::button('<i class="fa fa-times"></i>',
|
||||
['type' => 'submit',
|
||||
'class' => 'btn btn-danger btn-xs'])
|
||||
}}
|
||||
</div>
|
||||
{{ Form::close() }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<hr/>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="text-right">
|
||||
{{ Form::open([
|
||||
'url' => '/admin/flights/'.$flight->id.'/subfleets',
|
||||
'method' => 'post',
|
||||
'class' => 'pjax_form form-inline pjax_subfleet_form'
|
||||
])
|
||||
}}
|
||||
{{ Form::select('subfleet_id', $avail_subfleets, null, [
|
||||
'placeholder' => 'Select Subfleet',
|
||||
'class' => 'select2 form-control input-lg',
|
||||
'style' => 'width: 400px;',
|
||||
])
|
||||
}}
|
||||
{{ Form::button('<i class="fas fa-plus"></i> add',
|
||||
['type' => 'submit',
|
||||
'class' => 'btn btn-success btn-s']) }}
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
<tbody>
|
||||
@foreach($flight->subfleets as $sf)
|
||||
<tr>
|
||||
<td>{{ $sf->type }}</td>
|
||||
<td>{{ $sf->name }}</td>
|
||||
<td style="width: 10%; text-align: center;" class="form-inline">
|
||||
{{ Form::open(['url' => '/admin/flights/'.$flight->id.'/subfleets',
|
||||
'method' => 'delete',
|
||||
'class' => 'pjax_subfleet_form']) }}
|
||||
{{ Form::hidden('subfleet_id', $sf->id) }}
|
||||
<div class='btn-group'>
|
||||
{{ Form::button('<i class="fa fa-times"></i>',
|
||||
['type' => 'submit',
|
||||
'class' => 'btn btn-danger btn-xs'])
|
||||
}}
|
||||
</div>
|
||||
{{ Form::close() }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<hr/>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="text-right">
|
||||
{{ Form::open([
|
||||
'url' => '/admin/flights/'.$flight->id.'/subfleets',
|
||||
'method' => 'post',
|
||||
'class' => 'pjax_form form-inline pjax_subfleet_form'
|
||||
])
|
||||
}}
|
||||
{{ Form::select('subfleet_id', $avail_subfleets, null, [
|
||||
'placeholder' => 'Select Subfleet',
|
||||
'class' => 'select2 form-control input-lg',
|
||||
'style' => 'width: 400px;',
|
||||
])
|
||||
}}
|
||||
{{ Form::button('<i class="fas fa-plus"></i> add',
|
||||
['type' => 'submit',
|
||||
'class' => 'btn btn-success btn-s']) }}
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,50 +1,51 @@
|
||||
<div class="content table-responsive table-full-width">
|
||||
<table class="table table-hover" id="flights-table">
|
||||
<table class="table table-hover" id="flights-table">
|
||||
<thead>
|
||||
<th>Flight #</th>
|
||||
<th>Dep</th>
|
||||
<th>Arr</th>
|
||||
{{--<th>Route</th>--}}
|
||||
<th>Dpt Time</th>
|
||||
<th>Arr Time</th>
|
||||
<th>Notes</th>
|
||||
<th style="text-align: center;">Active</th>
|
||||
<th colspan="3" style="text-align: right;">Action</th>
|
||||
<th>Flight #</th>
|
||||
<th>Dep</th>
|
||||
<th>Arr</th>
|
||||
{{--<th>Route</th>--}}
|
||||
<th>Dpt Time</th>
|
||||
<th>Arr Time</th>
|
||||
<th>Notes</th>
|
||||
<th style="text-align: center;">Active</th>
|
||||
<th colspan="3" style="text-align: right;">Action</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($flights as $flight)
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{ route('admin.flights.edit', [$flight->id]) }}">
|
||||
{{$flight->ident}}
|
||||
</a>
|
||||
</td>
|
||||
<td>{{ $flight->dpt_airport->icao }}</td>
|
||||
<td>
|
||||
{{ $flight->arr_airport->icao }}
|
||||
@if($flight->alt_airport)
|
||||
(Alt: {{ $flight->alt_airport->icao }})
|
||||
@endif
|
||||
</td>
|
||||
{{--<td>{{ $flight->route }}</td>--}}
|
||||
<td>{{ $flight->dpt_time }}</td>
|
||||
<td>{{ $flight->arr_time }}</td>
|
||||
<td>{{ $flight->notes }}</td>
|
||||
<td style="text-align: center;">
|
||||
@if($flight->active == 1)
|
||||
<span class="label label-success">@lang('common.active')</span>
|
||||
@else
|
||||
<span class="label label-default">@lang('common.inactive')</span>
|
||||
@endif
|
||||
</td>
|
||||
<td style="text-align: right;">
|
||||
{{ Form::open(['route' => ['admin.flights.destroy', $flight->id], 'method' => 'delete']) }}
|
||||
<a href="{{ route('admin.flights.edit', [$flight->id]) }}" class='btn btn-sm btn-success btn-icon'><i class="fas fa-pencil-alt"></i></a>
|
||||
{{ Form::button('<i class="fa fa-times"></i>', ['type' => 'submit', 'class' => 'btn btn-sm btn-danger btn-icon', 'onclick' => "return confirm('Are you sure?')"]) }}
|
||||
{{ Form::close() }}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{ route('admin.flights.edit', [$flight->id]) }}">
|
||||
{{$flight->ident}}
|
||||
</a>
|
||||
</td>
|
||||
<td>{{ $flight->dpt_airport->icao }}</td>
|
||||
<td>
|
||||
{{ $flight->arr_airport->icao }}
|
||||
@if($flight->alt_airport)
|
||||
(Alt: {{ $flight->alt_airport->icao }})
|
||||
@endif
|
||||
</td>
|
||||
{{--<td>{{ $flight->route }}</td>--}}
|
||||
<td>{{ $flight->dpt_time }}</td>
|
||||
<td>{{ $flight->arr_time }}</td>
|
||||
<td>{{ $flight->notes }}</td>
|
||||
<td style="text-align: center;">
|
||||
@if($flight->active == 1)
|
||||
<span class="label label-success">@lang('common.active')</span>
|
||||
@else
|
||||
<span class="label label-default">@lang('common.inactive')</span>
|
||||
@endif
|
||||
</td>
|
||||
<td style="text-align: right;">
|
||||
{{ Form::open(['route' => ['admin.flights.destroy', $flight->id], 'method' => 'delete']) }}
|
||||
<a href="{{ route('admin.flights.edit', [$flight->id]) }}" class='btn btn-sm btn-success btn-icon'><i
|
||||
class="fas fa-pencil-alt"></i></a>
|
||||
{{ Form::button('<i class="fa fa-times"></i>', ['type' => 'submit', 'class' => 'btn btn-sm btn-danger btn-icon', 'onclick' => "return confirm('Are you sure?')"]) }}
|
||||
{{ Form::close() }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@@ -1,29 +1,29 @@
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="form-container">
|
||||
<h6><i class="fas fa-clock"></i>
|
||||
Reset Caches
|
||||
</h6>
|
||||
<div class="row" style="padding-top: 5px">
|
||||
<div class="col-sm-4 text-center">
|
||||
{{ Form::open(['route' => 'admin.maintenance.cache']) }}
|
||||
{{ Form::hidden('type', 'all') }}
|
||||
{{ Form::button('Clear all caches', ['type' => 'submit', 'class' => 'btn btn-success']) }}
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
<div class="col-sm-4 text-center">
|
||||
{{ Form::open(['route' => 'admin.maintenance.cache']) }}
|
||||
{{ Form::hidden('type', 'application') }}
|
||||
{{ Form::button('Application', ['type' => 'submit', 'class' => 'btn btn-success']) }}
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
<div class="col-sm-4 text-center">
|
||||
{{ Form::open(['route' => 'admin.maintenance.cache']) }}
|
||||
{{ Form::hidden('type', 'views') }}
|
||||
{{ Form::button('Views', ['type' => 'submit', 'class' => 'btn btn-success']) }}
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<div class="form-container">
|
||||
<h6><i class="fas fa-clock"></i>
|
||||
Reset Caches
|
||||
</h6>
|
||||
<div class="row" style="padding-top: 5px">
|
||||
<div class="col-sm-4 text-center">
|
||||
{{ Form::open(['route' => 'admin.maintenance.cache']) }}
|
||||
{{ Form::hidden('type', 'all') }}
|
||||
{{ Form::button('Clear all caches', ['type' => 'submit', 'class' => 'btn btn-success']) }}
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
<div class="col-sm-4 text-center">
|
||||
{{ Form::open(['route' => 'admin.maintenance.cache']) }}
|
||||
{{ Form::hidden('type', 'application') }}
|
||||
{{ Form::button('Application', ['type' => 'submit', 'class' => 'btn btn-success']) }}
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
<div class="col-sm-4 text-center">
|
||||
{{ Form::open(['route' => 'admin.maintenance.cache']) }}
|
||||
{{ Form::hidden('type', 'views') }}
|
||||
{{ Form::button('Views', ['type' => 'submit', 'class' => 'btn btn-success']) }}
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -2,17 +2,17 @@
|
||||
|
||||
@section('title', 'Maintenance')
|
||||
@section('content')
|
||||
@include('flash::message')
|
||||
@include('flash::message')
|
||||
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
@include('admin.maintenance.cron')
|
||||
</div>
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
@include('admin.maintenance.cron')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
@include('admin.maintenance.caches')
|
||||
</div>
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
@include('admin.maintenance.caches')
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@@ -1,100 +1,99 @@
|
||||
|
||||
<li>
|
||||
<a href="{{ url('/admin/dashboard') }}"><i class="pe-7s-display1"></i>dashboard</a>
|
||||
<a href="{{ url('/admin/dashboard') }}"><i class="pe-7s-display1"></i>dashboard</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a data-toggle="collapse" href="#operations_menu" class="menu operations_menu" aria-expanded="true">
|
||||
<h5>operations <b class="pe-7s-angle-right"></b></h5>
|
||||
</a>
|
||||
<a data-toggle="collapse" href="#operations_menu" class="menu operations_menu" aria-expanded="true">
|
||||
<h5>operations <b class="pe-7s-angle-right"></b></h5>
|
||||
</a>
|
||||
|
||||
<div class="collapse" id="operations_menu" aria-expanded="true">
|
||||
<ul class="nav">
|
||||
@ability('admin', 'pireps')
|
||||
<li><a href="{{ url('/admin/pireps') }}"><i class="pe-7s-cloud-upload"></i>pireps
|
||||
<span data-toggle="tooltip" title="3 New" class="badge bg-light-blue pull-right">3</span>
|
||||
</a>
|
||||
</li>
|
||||
@endability
|
||||
<div class="collapse" id="operations_menu" aria-expanded="true">
|
||||
<ul class="nav">
|
||||
@ability('admin', 'pireps')
|
||||
<li><a href="{{ url('/admin/pireps') }}"><i class="pe-7s-cloud-upload"></i>pireps
|
||||
<span data-toggle="tooltip" title="3 New" class="badge bg-light-blue pull-right">3</span>
|
||||
</a>
|
||||
</li>
|
||||
@endability
|
||||
|
||||
@ability('admin', 'flights')
|
||||
<li><a href="{{ url('/admin/flights') }}"><i class="pe-7s-vector"></i>flights</a></li>
|
||||
@endability
|
||||
@ability('admin', 'flights')
|
||||
<li><a href="{{ url('/admin/flights') }}"><i class="pe-7s-vector"></i>flights</a></li>
|
||||
@endability
|
||||
|
||||
@ability('admin', 'fleet')
|
||||
<li><a href="{{ url('/admin/subfleets') }}"><i class="pe-7s-plane"></i>fleet</a></li>
|
||||
@endability
|
||||
@ability('admin', 'fleet')
|
||||
<li><a href="{{ url('/admin/subfleets') }}"><i class="pe-7s-plane"></i>fleet</a></li>
|
||||
@endability
|
||||
|
||||
@ability('admin', 'fares')
|
||||
<li><a href="{{ url('/admin/fares') }}"><i class="pe-7s-graph2"></i>fares</a></li>
|
||||
@endability
|
||||
@ability('admin', 'fares')
|
||||
<li><a href="{{ url('/admin/fares') }}"><i class="pe-7s-graph2"></i>fares</a></li>
|
||||
@endability
|
||||
|
||||
@ability('admin', 'finances')
|
||||
<li><a href="{{ url('/admin/finances') }}"><i class="pe-7s-display1"></i>finances</a></li>
|
||||
@endability
|
||||
@ability('admin', 'finances')
|
||||
<li><a href="{{ url('/admin/finances') }}"><i class="pe-7s-display1"></i>finances</a></li>
|
||||
@endability
|
||||
|
||||
@ability('admin', 'users')
|
||||
<li><a href="{{ url('/admin/users') }}"><i class="pe-7s-users"></i>users</a></li>
|
||||
@endability
|
||||
</ul>
|
||||
</div>
|
||||
@ability('admin', 'users')
|
||||
<li><a href="{{ url('/admin/users') }}"><i class="pe-7s-users"></i>users</a></li>
|
||||
@endability
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a data-toggle="collapse" href="#config_menu" class="menu config_menu" aria-expanded="true">
|
||||
<h5>config <b class="pe-7s-angle-right"></b></h5>
|
||||
</a>
|
||||
<a data-toggle="collapse" href="#config_menu" class="menu config_menu" aria-expanded="true">
|
||||
<h5>config <b class="pe-7s-angle-right"></b></h5>
|
||||
</a>
|
||||
|
||||
<div class="collapse" id="config_menu" aria-expanded="true">
|
||||
<ul class="nav">
|
||||
@ability('admin', 'airlines')
|
||||
<li><a href="{{ url('/admin/airlines') }}"><i class="pe-7s-paper-plane"></i>airlines</a></li>
|
||||
@endability
|
||||
<div class="collapse" id="config_menu" aria-expanded="true">
|
||||
<ul class="nav">
|
||||
@ability('admin', 'airlines')
|
||||
<li><a href="{{ url('/admin/airlines') }}"><i class="pe-7s-paper-plane"></i>airlines</a></li>
|
||||
@endability
|
||||
|
||||
@ability('admin', 'airports')
|
||||
<li><a href="{{ url('/admin/airports') }}"><i class="pe-7s-map-marker"></i>airports</a></li>
|
||||
@endability
|
||||
@ability('admin', 'airports')
|
||||
<li><a href="{{ url('/admin/airports') }}"><i class="pe-7s-map-marker"></i>airports</a></li>
|
||||
@endability
|
||||
|
||||
@ability('admin', 'finances')
|
||||
<li><a href="{{ url('/admin/expenses') }}"><i class="pe-7s-cash"></i>expenses</a></li>
|
||||
@endability
|
||||
@ability('admin', 'finances')
|
||||
<li><a href="{{ url('/admin/expenses') }}"><i class="pe-7s-cash"></i>expenses</a></li>
|
||||
@endability
|
||||
|
||||
@ability('admin', 'ranks')
|
||||
<li><a href="{{ url('/admin/ranks') }}"><i class="pe-7s-graph1"></i>ranks</a></li>
|
||||
@endability
|
||||
@ability('admin', 'ranks')
|
||||
<li><a href="{{ url('/admin/ranks') }}"><i class="pe-7s-graph1"></i>ranks</a></li>
|
||||
@endability
|
||||
|
||||
@ability('admin', 'awards')
|
||||
<li><a href="{!! url('/admin/awards') !!}"><i class="pe-7s-diamond"></i>awards</a></li>
|
||||
@endability
|
||||
@ability('admin', 'awards')
|
||||
<li><a href="{!! url('/admin/awards') !!}"><i class="pe-7s-diamond"></i>awards</a></li>
|
||||
@endability
|
||||
|
||||
@ability('admin', 'users')
|
||||
<li><a href="{!! url('/admin/roles') !!}"><i class="pe-7s-network"></i>roles</a></li>
|
||||
@endability
|
||||
@ability('admin', 'users')
|
||||
<li><a href="{!! url('/admin/roles') !!}"><i class="pe-7s-network"></i>roles</a></li>
|
||||
@endability
|
||||
|
||||
@ability('admin', 'settings')
|
||||
<li><a href="{{ url('/admin/settings') }}"><i class="pe-7s-config"></i>settings</a></li>
|
||||
@endability
|
||||
@ability('admin', 'settings')
|
||||
<li><a href="{{ url('/admin/settings') }}"><i class="pe-7s-config"></i>settings</a></li>
|
||||
@endability
|
||||
|
||||
@ability('admin', 'maintenance')
|
||||
<li><a href="{{ url('/admin/maintenance') }}"><i class="pe-7s-tools"></i>maintenance</a></li>
|
||||
@endability
|
||||
</ul>
|
||||
</div>
|
||||
@ability('admin', 'maintenance')
|
||||
<li><a href="{{ url('/admin/maintenance') }}"><i class="pe-7s-tools"></i>maintenance</a></li>
|
||||
@endability
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a data-toggle="collapse" href="#addons_menu" class="menu addons_menu" aria-expanded="true">
|
||||
<h5>addons <b class="pe-7s-angle-right"></b></h5>
|
||||
</a>
|
||||
<a data-toggle="collapse" href="#addons_menu" class="menu addons_menu" aria-expanded="true">
|
||||
<h5>addons <b class="pe-7s-angle-right"></b></h5>
|
||||
</a>
|
||||
|
||||
<div class="collapse" id="addons_menu" aria-expanded="true">
|
||||
<ul class="nav">
|
||||
@ability('admin', 'addons')
|
||||
@foreach($moduleSvc->getAdminLinks() as &$link)
|
||||
<li><a href="{{ url($link['url']) }}"><i class="{{ $link['icon'] }}"></i>{{ $link['title'] }}</a></li>
|
||||
@endforeach
|
||||
@endability
|
||||
</ul>
|
||||
</div>
|
||||
<div class="collapse" id="addons_menu" aria-expanded="true">
|
||||
<ul class="nav">
|
||||
@ability('admin', 'addons')
|
||||
@foreach($moduleSvc->getAdminLinks() as &$link)
|
||||
<li><a href="{{ url($link['url']) }}"><i class="{{ $link['icon'] }}"></i>{{ $link['title'] }}</a></li>
|
||||
@endforeach
|
||||
@endability
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
@@ -1,34 +1,34 @@
|
||||
<ul class="pagination">
|
||||
<!-- Previous Page Link -->
|
||||
@if ($paginator->onFirstPage())
|
||||
<li class="page-item disabled"><span class="page-link">«</span></li>
|
||||
@else
|
||||
<li class="page-item"><a class="page-link" href="{{ $paginator->previousPageUrl() }}" rel="prev">«</a></li>
|
||||
<!-- Previous Page Link -->
|
||||
@if ($paginator->onFirstPage())
|
||||
<li class="page-item disabled"><span class="page-link">«</span></li>
|
||||
@else
|
||||
<li class="page-item"><a class="page-link" href="{{ $paginator->previousPageUrl() }}" rel="prev">«</a></li>
|
||||
@endif
|
||||
|
||||
<!-- Pagination Elements -->
|
||||
@foreach ($elements as $element)
|
||||
<!-- "Three Dots" Separator -->
|
||||
@if (is_string($element))
|
||||
<li class="page-item disabled"><span class="page-link">{{ $element }}</span></li>
|
||||
@endif
|
||||
|
||||
<!-- Pagination Elements -->
|
||||
@foreach ($elements as $element)
|
||||
<!-- "Three Dots" Separator -->
|
||||
@if (is_string($element))
|
||||
<li class="page-item disabled"><span class="page-link">{{ $element }}</span></li>
|
||||
<!-- Array Of Links -->
|
||||
@if (is_array($element))
|
||||
@foreach ($element as $page => $url)
|
||||
@if ($page == $paginator->currentPage())
|
||||
<li class="page-item active"><span class="page-link">{{ $page }}</span></li>
|
||||
@else
|
||||
<li class="page-item"><a class="page-link" href="{{ $url }}">{{ $page }}</a></li>
|
||||
@endif
|
||||
|
||||
<!-- Array Of Links -->
|
||||
@if (is_array($element))
|
||||
@foreach ($element as $page => $url)
|
||||
@if ($page == $paginator->currentPage())
|
||||
<li class="page-item active"><span class="page-link">{{ $page }}</span></li>
|
||||
@else
|
||||
<li class="page-item"><a class="page-link" href="{{ $url }}">{{ $page }}</a></li>
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
<!-- Next Page Link -->
|
||||
@if ($paginator->hasMorePages())
|
||||
<li class="page-item"><a class="page-link" href="{{ $paginator->nextPageUrl() }}" rel="next">»</a></li>
|
||||
@else
|
||||
<li class="page-item disabled"><span class="page-link">»</span></li>
|
||||
@endforeach
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
<!-- Next Page Link -->
|
||||
@if ($paginator->hasMorePages())
|
||||
<li class="page-item"><a class="page-link" href="{{ $paginator->nextPageUrl() }}" rel="next">»</a></li>
|
||||
@else
|
||||
<li class="page-item disabled"><span class="page-link">»</span></li>
|
||||
@endif
|
||||
</ul>
|
||||
|
||||
@@ -1,34 +1,34 @@
|
||||
<ul class="pagination">
|
||||
<!-- Previous Page Link -->
|
||||
@if ($paginator->onFirstPage())
|
||||
<li class="disabled"><span>«</span></li>
|
||||
@else
|
||||
<li><a href="{{ $paginator->previousPageUrl() }}" rel="prev">«</a></li>
|
||||
<!-- Previous Page Link -->
|
||||
@if ($paginator->onFirstPage())
|
||||
<li class="disabled"><span>«</span></li>
|
||||
@else
|
||||
<li><a href="{{ $paginator->previousPageUrl() }}" rel="prev">«</a></li>
|
||||
@endif
|
||||
|
||||
<!-- Pagination Elements -->
|
||||
@foreach ($elements as $element)
|
||||
<!-- "Three Dots" Separator -->
|
||||
@if (is_string($element))
|
||||
<li class="disabled"><span>{{ $element }}</span></li>
|
||||
@endif
|
||||
|
||||
<!-- Pagination Elements -->
|
||||
@foreach ($elements as $element)
|
||||
<!-- "Three Dots" Separator -->
|
||||
@if (is_string($element))
|
||||
<li class="disabled"><span>{{ $element }}</span></li>
|
||||
<!-- Array Of Links -->
|
||||
@if (is_array($element))
|
||||
@foreach ($element as $page => $url)
|
||||
@if ($page == $paginator->currentPage())
|
||||
<li class="active"><span>{{ $page }}</span></li>
|
||||
@else
|
||||
<li><a href="{{ $url }}">{{ $page }}</a></li>
|
||||
@endif
|
||||
|
||||
<!-- Array Of Links -->
|
||||
@if (is_array($element))
|
||||
@foreach ($element as $page => $url)
|
||||
@if ($page == $paginator->currentPage())
|
||||
<li class="active"><span>{{ $page }}</span></li>
|
||||
@else
|
||||
<li><a href="{{ $url }}">{{ $page }}</a></li>
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
<!-- Next Page Link -->
|
||||
@if ($paginator->hasMorePages())
|
||||
<li><a href="{{ $paginator->nextPageUrl() }}" rel="next">»</a></li>
|
||||
@else
|
||||
<li class="disabled"><span>»</span></li>
|
||||
@endforeach
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
<!-- Next Page Link -->
|
||||
@if ($paginator->hasMorePages())
|
||||
<li><a href="{{ $paginator->nextPageUrl() }}" rel="next">»</a></li>
|
||||
@else
|
||||
<li class="disabled"><span>»</span></li>
|
||||
@endif
|
||||
</ul>
|
||||
|
||||
@@ -1,36 +1,36 @@
|
||||
@if ($paginator->hasPages())
|
||||
<div class="ui pagination menu">
|
||||
{{-- Previous Page Link --}}
|
||||
@if ($paginator->onFirstPage())
|
||||
<a class="icon item disabled"> <i class="left chevron icon"></i> </a>
|
||||
@else
|
||||
<a class="icon item" href="{{ $paginator->previousPageUrl() }}" rel="prev"> <i class="left chevron icon"></i> </a>
|
||||
@endif
|
||||
<div class="ui pagination menu">
|
||||
{{-- Previous Page Link --}}
|
||||
@if ($paginator->onFirstPage())
|
||||
<a class="icon item disabled"> <i class="left chevron icon"></i> </a>
|
||||
@else
|
||||
<a class="icon item" href="{{ $paginator->previousPageUrl() }}" rel="prev"> <i class="left chevron icon"></i> </a>
|
||||
@endif
|
||||
|
||||
{{-- Pagination Elements --}}
|
||||
@foreach ($elements as $element)
|
||||
{{-- "Three Dots" Separator --}}
|
||||
@if (is_string($element))
|
||||
<a class="icon item disabled">{{ $element }}</a>
|
||||
@endif
|
||||
{{-- Pagination Elements --}}
|
||||
@foreach ($elements as $element)
|
||||
{{-- "Three Dots" Separator --}}
|
||||
@if (is_string($element))
|
||||
<a class="icon item disabled">{{ $element }}</a>
|
||||
@endif
|
||||
|
||||
{{-- Array Of Links --}}
|
||||
@if (is_array($element))
|
||||
@foreach ($element as $page => $url)
|
||||
@if ($page == $paginator->currentPage())
|
||||
<a class="item active" href="{{ $url }}">{{ $page }}</a>
|
||||
@else
|
||||
<a class="item" href="{{ $url }}">{{ $page }}</a>
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
{{-- Array Of Links --}}
|
||||
@if (is_array($element))
|
||||
@foreach ($element as $page => $url)
|
||||
@if ($page == $paginator->currentPage())
|
||||
<a class="item active" href="{{ $url }}">{{ $page }}</a>
|
||||
@else
|
||||
<a class="item" href="{{ $url }}">{{ $page }}</a>
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
@endforeach
|
||||
|
||||
{{-- Next Page Link --}}
|
||||
@if ($paginator->hasMorePages())
|
||||
<a class="icon item" href="{{ $paginator->nextPageUrl() }}" rel="next"> <i class="right chevron icon"></i> </a>
|
||||
@else
|
||||
<a class="icon item disabled"> <i class="right chevron icon"></i> </a>
|
||||
@endif
|
||||
</div>
|
||||
{{-- Next Page Link --}}
|
||||
@if ($paginator->hasMorePages())
|
||||
<a class="icon item" href="{{ $paginator->nextPageUrl() }}" rel="next"> <i class="right chevron icon"></i> </a>
|
||||
@else
|
||||
<a class="icon item disabled"> <i class="right chevron icon"></i> </a>
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
<ul class="pagination">
|
||||
<!-- Previous Page Link -->
|
||||
@if ($paginator->onFirstPage())
|
||||
<li class="page-item disabled"><span class="page-link">«</span></li>
|
||||
@else
|
||||
<li class="page-item"><a class="page-link" href="{{ $paginator->previousPageUrl() }}" rel="prev">«</a></li>
|
||||
@endif
|
||||
<!-- Previous Page Link -->
|
||||
@if ($paginator->onFirstPage())
|
||||
<li class="page-item disabled"><span class="page-link">«</span></li>
|
||||
@else
|
||||
<li class="page-item"><a class="page-link" href="{{ $paginator->previousPageUrl() }}" rel="prev">«</a></li>
|
||||
@endif
|
||||
|
||||
<!-- Next Page Link -->
|
||||
@if ($paginator->hasMorePages())
|
||||
<li class="page-item"><a class="page-link" href="{{ $paginator->nextPageUrl() }}" rel="next">»</a></li>
|
||||
@else
|
||||
<li class="page-item disabled"><span class="page-link">»</span></li>
|
||||
@endif
|
||||
<!-- Next Page Link -->
|
||||
@if ($paginator->hasMorePages())
|
||||
<li class="page-item"><a class="page-link" href="{{ $paginator->nextPageUrl() }}" rel="next">»</a></li>
|
||||
@else
|
||||
<li class="page-item disabled"><span class="page-link">»</span></li>
|
||||
@endif
|
||||
</ul>
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
<ul class="pagination">
|
||||
<!-- Previous Page Link -->
|
||||
@if ($paginator->onFirstPage())
|
||||
<li class="disabled"><span>«</span></li>
|
||||
@else
|
||||
<li><a href="{{ $paginator->previousPageUrl() }}" rel="prev">«</a></li>
|
||||
@endif
|
||||
<!-- Previous Page Link -->
|
||||
@if ($paginator->onFirstPage())
|
||||
<li class="disabled"><span>«</span></li>
|
||||
@else
|
||||
<li><a href="{{ $paginator->previousPageUrl() }}" rel="prev">«</a></li>
|
||||
@endif
|
||||
|
||||
<!-- Next Page Link -->
|
||||
@if ($paginator->hasMorePages())
|
||||
<li><a href="{{ $paginator->nextPageUrl() }}" rel="next">»</a></li>
|
||||
@else
|
||||
<li class="disabled"><span>»</span></li>
|
||||
@endif
|
||||
<!-- Next Page Link -->
|
||||
@if ($paginator->hasMorePages())
|
||||
<li><a href="{{ $paginator->nextPageUrl() }}" rel="next">»</a></li>
|
||||
@else
|
||||
<li class="disabled"><span>»</span></li>
|
||||
@endif
|
||||
</ul>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
@extends('admin.app')
|
||||
@section('title', 'Adding Field')
|
||||
@section('content')
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
{{ Form::open(['route' => 'admin.pirepfields.store']) }}
|
||||
@include('admin.pirepfields.fields')
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
{{ Form::open(['route' => 'admin.pirepfields.store']) }}
|
||||
@include('admin.pirepfields.fields')
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
@extends('admin.app')
|
||||
@section('title', 'Editing ' . $field->name)
|
||||
@section('content')
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
{{ Form::model($field, ['route' => ['admin.pirepfields.update', $field->id], 'method' => 'patch']) }}
|
||||
@include('admin.pirepfields.fields')
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
{{ Form::model($field, ['route' => ['admin.pirepfields.update', $field->id], 'method' => 'patch']) }}
|
||||
@include('admin.pirepfields.fields')
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
<div class="row">
|
||||
<div class="form-group col-sm-6">
|
||||
{{ Form::label('name', 'Name:') }} <span class="required">*</span>
|
||||
{{ Form::text('name', null, ['class' => 'form-control']) }}
|
||||
<p class="text-danger">{{ $errors->first('name') }}</p>
|
||||
</div>
|
||||
<div class="form-group col-sm-6">
|
||||
{{ Form::label('name', 'Name:') }} <span class="required">*</span>
|
||||
{{ Form::text('name', null, ['class' => 'form-control']) }}
|
||||
<p class="text-danger">{{ $errors->first('name') }}</p>
|
||||
</div>
|
||||
|
||||
<!-- Required Field -->
|
||||
<div class="form-group col-sm-6">
|
||||
{{ Form::label('required', 'Required:') }}
|
||||
{{ Form::hidden('required', 0) }}
|
||||
{{ Form::checkbox('required', null) }}
|
||||
</div>
|
||||
<!-- Required Field -->
|
||||
<div class="form-group col-sm-6">
|
||||
{{ Form::label('required', 'Required:') }}
|
||||
{{ Form::hidden('required', 0) }}
|
||||
{{ Form::checkbox('required', null) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<!-- Submit Field -->
|
||||
<div class="form-group col-sm-12">
|
||||
{{ Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-success']) }}
|
||||
<a href="{{ route('admin.pirepfields.index') }}" class="btn btn-default">Cancel</a>
|
||||
</div>
|
||||
<!-- Submit Field -->
|
||||
<div class="form-group col-sm-12">
|
||||
{{ Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-success']) }}
|
||||
<a href="{{ route('admin.pirepfields.index') }}" class="btn btn-default">Cancel</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
@extends('admin.app')
|
||||
@section('title', 'PIREP Fields')
|
||||
@section('actions')
|
||||
<li><a href="{{ route('admin.pirepfields.create') }}"><i class="ti-plus"></i>Add
|
||||
Field</a></li>
|
||||
<li><a href="{{ route('admin.pirepfields.create') }}"><i class="ti-plus"></i>Add
|
||||
Field</a></li>
|
||||
@endsection
|
||||
@section('content')
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
@include('admin.pirepfields.table')
|
||||
</div>
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
@include('admin.pirepfields.table')
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('content')
|
||||
<section class="content-header">
|
||||
<h1>{{ $pirepFields->name }}</h1>
|
||||
</section>
|
||||
<div class="content">
|
||||
<div class="box box-primary">
|
||||
<div class="box-body">
|
||||
<div class="row" style="padding-left: 20px">
|
||||
@include('admin.pirepfields.show_fields')
|
||||
<a href="{{ route('admin.pirepfields.index') }}" class="btn btn-default">Back</a>
|
||||
</div>
|
||||
</div>
|
||||
<section class="content-header">
|
||||
<h1>{{ $pirepFields->name }}</h1>
|
||||
</section>
|
||||
<div class="content">
|
||||
<div class="box box-primary">
|
||||
<div class="box-body">
|
||||
<div class="row" style="padding-left: 20px">
|
||||
@include('admin.pirepfields.show_fields')
|
||||
<a href="{{ route('admin.pirepfields.index') }}" class="btn btn-default">Back</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@@ -1,30 +1,30 @@
|
||||
<!-- Id Field -->
|
||||
<div class="form-group">
|
||||
{{ Form::label('id', 'Id:') }}
|
||||
<p>{{ $field->id }}</p>
|
||||
{{ Form::label('id', 'Id:') }}
|
||||
<p>{{ $field->id }}</p>
|
||||
</div>
|
||||
|
||||
<!-- Name Field -->
|
||||
<div class="form-group">
|
||||
{{ Form::label('name', 'Name:') }}
|
||||
<p>{{ $field->name }}</p>
|
||||
{{ Form::label('name', 'Name:') }}
|
||||
<p>{{ $field->name }}</p>
|
||||
</div>
|
||||
|
||||
<!-- Required Field -->
|
||||
<div class="form-group">
|
||||
{{ Form::label('required', 'Required:') }}
|
||||
<p>{{ $field->required }}</p>
|
||||
{{ Form::label('required', 'Required:') }}
|
||||
<p>{{ $field->required }}</p>
|
||||
</div>
|
||||
|
||||
<!-- Created At Field -->
|
||||
<div class="form-group">
|
||||
{{ Form::label('created_at', 'Created At:') }}
|
||||
<p>{{ show_datetime($field->created_at) }}</p>
|
||||
{{ Form::label('created_at', 'Created At:') }}
|
||||
<p>{{ show_datetime($field->created_at) }}</p>
|
||||
</div>
|
||||
|
||||
<!-- Updated At Field -->
|
||||
<div class="form-group">
|
||||
{{ Form::label('updated_at', 'Updated At:') }}
|
||||
<p>{{ show_datetime($field->updated_at) }}</p>
|
||||
{{ Form::label('updated_at', 'Updated At:') }}
|
||||
<p>{{ show_datetime($field->updated_at) }}</p>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,39 +1,39 @@
|
||||
<div class="content table-responsive table-full-width">
|
||||
|
||||
<div class="header">
|
||||
@component('admin.components.info')
|
||||
PIREP fields are only shown for manual PIREPs.
|
||||
@endcomponent
|
||||
</div>
|
||||
<div class="header">
|
||||
@component('admin.components.info')
|
||||
PIREP fields are only shown for manual PIREPs.
|
||||
@endcomponent
|
||||
</div>
|
||||
|
||||
<table class="table table-hover table-responsive" id="pirepFields-table">
|
||||
<table class="table table-hover table-responsive" id="pirepFields-table">
|
||||
<thead>
|
||||
<th>Name</th>
|
||||
<th style="text-align: center;">Required</th>
|
||||
<th></th>
|
||||
<th>Name</th>
|
||||
<th style="text-align: center;">Required</th>
|
||||
<th></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($fields as $field)
|
||||
<tr>
|
||||
<td>{{ $field->name }}</td>
|
||||
<td style="text-align: center;">
|
||||
@if($field->required === true)
|
||||
<span class="label label-success">Required</span>
|
||||
@endif
|
||||
</td>
|
||||
<td class="text-right">
|
||||
{{ Form::open(['route' => ['admin.pirepfields.destroy', $field->id], 'method' => 'delete']) }}
|
||||
<a href="{{ route('admin.pirepfields.edit', [$field->id]) }}"
|
||||
class='btn btn-sm btn-success btn-icon'>
|
||||
<i class="fas fa-pencil-alt"></i></a>
|
||||
<tr>
|
||||
<td>{{ $field->name }}</td>
|
||||
<td style="text-align: center;">
|
||||
@if($field->required === true)
|
||||
<span class="label label-success">Required</span>
|
||||
@endif
|
||||
</td>
|
||||
<td class="text-right">
|
||||
{{ Form::open(['route' => ['admin.pirepfields.destroy', $field->id], 'method' => 'delete']) }}
|
||||
<a href="{{ route('admin.pirepfields.edit', [$field->id]) }}"
|
||||
class='btn btn-sm btn-success btn-icon'>
|
||||
<i class="fas fa-pencil-alt"></i></a>
|
||||
|
||||
{{ Form::button('<i class="fa fa-times"></i>',
|
||||
['type' => 'submit', 'class' => 'btn btn-sm btn-danger btn-icon',
|
||||
'onclick' => "return confirm('Are you sure?')"]) }}
|
||||
{{ Form::close() }}
|
||||
</td>
|
||||
</tr>
|
||||
{{ Form::button('<i class="fa fa-times"></i>',
|
||||
['type' => 'submit', 'class' => 'btn btn-sm btn-danger btn-icon',
|
||||
'onclick' => "return confirm('Are you sure?')"]) }}
|
||||
{{ Form::close() }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@@ -1,41 +1,42 @@
|
||||
<table class="">
|
||||
<tr>
|
||||
<td>
|
||||
@if($pirep->state === PirepState::PENDING || $pirep->state === PirepState::REJECTED)
|
||||
{{ Form::open(['url' => route('admin.pirep.status', [$pirep->id]),
|
||||
'method' => 'post',
|
||||
'name' => 'accept_'.$pirep->id,
|
||||
'id' => $pirep->id.'_accept',
|
||||
'pirep_id' => $pirep->id,
|
||||
'new_status' => PirepState::ACCEPTED,
|
||||
'class' => $on_edit_page ? 'pirep_change_status': 'pirep_submit_status']) }}
|
||||
{{ Form::button('Accept', ['type' => 'submit', 'class' => 'btn btn-success']) }}
|
||||
{{ Form::close() }}
|
||||
@endif
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
@if($pirep->state === PirepState::PENDING || $pirep->state === PirepState::ACCEPTED)
|
||||
{{ Form::open(['url' => route('admin.pirep.status', [$pirep->id]),
|
||||
'method' => 'post',
|
||||
'name' => 'reject_'.$pirep->id,
|
||||
'id' => $pirep->id.'_reject',
|
||||
'pirep_id' => $pirep->id,
|
||||
'new_status' => PirepState::REJECTED,
|
||||
'class' => $on_edit_page ? 'pirep_change_status': 'pirep_submit_status']) }}
|
||||
{{ Form::button('Reject', ['type' => 'submit', 'class' => 'btn btn-danger']) }}
|
||||
{{ Form::close() }}
|
||||
@endif
|
||||
</td>
|
||||
<td> </td>
|
||||
@if ($on_edit_page === false)
|
||||
<td>
|
||||
<form action="{{ route('admin.pireps.edit', [$pirep->id]) }}">
|
||||
<button type="submit"
|
||||
class='btn btn-info'>
|
||||
<i class="fas fa-pencil-alt"></i> Edit</button>
|
||||
</form>
|
||||
</td>
|
||||
@endif
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
@if($pirep->state === PirepState::PENDING || $pirep->state === PirepState::REJECTED)
|
||||
{{ Form::open(['url' => route('admin.pirep.status', [$pirep->id]),
|
||||
'method' => 'post',
|
||||
'name' => 'accept_'.$pirep->id,
|
||||
'id' => $pirep->id.'_accept',
|
||||
'pirep_id' => $pirep->id,
|
||||
'new_status' => PirepState::ACCEPTED,
|
||||
'class' => $on_edit_page ? 'pirep_change_status': 'pirep_submit_status']) }}
|
||||
{{ Form::button('Accept', ['type' => 'submit', 'class' => 'btn btn-success']) }}
|
||||
{{ Form::close() }}
|
||||
@endif
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
@if($pirep->state === PirepState::PENDING || $pirep->state === PirepState::ACCEPTED)
|
||||
{{ Form::open(['url' => route('admin.pirep.status', [$pirep->id]),
|
||||
'method' => 'post',
|
||||
'name' => 'reject_'.$pirep->id,
|
||||
'id' => $pirep->id.'_reject',
|
||||
'pirep_id' => $pirep->id,
|
||||
'new_status' => PirepState::REJECTED,
|
||||
'class' => $on_edit_page ? 'pirep_change_status': 'pirep_submit_status']) }}
|
||||
{{ Form::button('Reject', ['type' => 'submit', 'class' => 'btn btn-danger']) }}
|
||||
{{ Form::close() }}
|
||||
@endif
|
||||
</td>
|
||||
<td> </td>
|
||||
@if ($on_edit_page === false)
|
||||
<td>
|
||||
<form action="{{ route('admin.pireps.edit', [$pirep->id]) }}">
|
||||
<button type="submit"
|
||||
class='btn btn-info'>
|
||||
<i class="fas fa-pencil-alt"></i> Edit
|
||||
</button>
|
||||
</form>
|
||||
</td>
|
||||
@endif
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@@ -1,47 +1,47 @@
|
||||
<div id="pirep_comments_wrapper" class="col-12">
|
||||
<table class="table table-responsive" id="pireps-comments-table">
|
||||
<thead>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($pirep->comments as $comment)
|
||||
<tr>
|
||||
<td width="1%" nowrap="" style="vertical-align: text-top">
|
||||
<a href="{{ route('admin.users.show', [$comment->user_id]) }}">
|
||||
{{ $comment->user->name }}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<p>{{ $comment->comment }}</p>
|
||||
<p class="small">{{ show_datetime($comment->created_at) }}</p>
|
||||
</td>
|
||||
<td align="right">
|
||||
{{ Form::open(['url' => url('/admin/pireps/'.$pirep->id.'/comments'),
|
||||
'method' => 'delete', 'class' => 'pjax_form form-inline']) }}
|
||||
{{ Form::hidden('comment_id', $comment->id) }}
|
||||
{{ Form::button('<i class="fa fa-times"></i>', ['type' => 'submit',
|
||||
'class' => 'btn btn-danger btn-small',
|
||||
'onclick' => "return confirm('Are you sure?')",
|
||||
]) }}
|
||||
{{ Form::close() }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<hr/>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="text-right">
|
||||
{{ Form::open(['url' => url('/admin/pireps/'.$pirep->id.'/comments'),
|
||||
'method' => 'post', 'class' => 'pjax_form form-inline']) }}
|
||||
{{ Form::input('text', 'comment', null, ['class' => 'form-control input-sm']) }}
|
||||
{{ Form::button('<i class="fa fa-plus"></i> Add', ['type' => 'submit',
|
||||
'class' => 'btn btn-success btn-small']) }}
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
<table class="table table-responsive" id="pireps-comments-table">
|
||||
<thead>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($pirep->comments as $comment)
|
||||
<tr>
|
||||
<td width="1%" nowrap="" style="vertical-align: text-top">
|
||||
<a href="{{ route('admin.users.show', [$comment->user_id]) }}">
|
||||
{{ $comment->user->name }}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<p>{{ $comment->comment }}</p>
|
||||
<p class="small">{{ show_datetime($comment->created_at) }}</p>
|
||||
</td>
|
||||
<td align="right">
|
||||
{{ Form::open(['url' => url('/admin/pireps/'.$pirep->id.'/comments'),
|
||||
'method' => 'delete', 'class' => 'pjax_form form-inline']) }}
|
||||
{{ Form::hidden('comment_id', $comment->id) }}
|
||||
{{ Form::button('<i class="fa fa-times"></i>', ['type' => 'submit',
|
||||
'class' => 'btn btn-danger btn-small',
|
||||
'onclick' => "return confirm('Are you sure?')",
|
||||
]) }}
|
||||
{{ Form::close() }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<hr/>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="text-right">
|
||||
{{ Form::open(['url' => url('/admin/pireps/'.$pirep->id.'/comments'),
|
||||
'method' => 'post', 'class' => 'pjax_form form-inline']) }}
|
||||
{{ Form::input('text', 'comment', null, ['class' => 'form-control input-sm']) }}
|
||||
{{ Form::button('<i class="fa fa-plus"></i> Add', ['type' => 'submit',
|
||||
'class' => 'btn btn-success btn-small']) }}
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
@section('title', 'Create PIREP')
|
||||
|
||||
<div class="content">
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
{{ Form::open(['route' => 'admin.pireps.store']) }}
|
||||
@include('admin.pireps.fields')
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
{{ Form::open(['route' => 'admin.pireps.store']) }}
|
||||
@include('admin.pireps.fields')
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@include('admin.pireps.scripts')
|
||||
|
||||
@@ -2,59 +2,60 @@
|
||||
@section('title', 'Edit ' . $pirep->ident )
|
||||
|
||||
@section('content')
|
||||
<div class="content">
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
|
||||
{{-- pulled out to here otherwise the form::close() within a form undo it --}}
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<h5 style="margin-top: 0px;">
|
||||
Filed By: <a href="{{ route('admin.users.edit', [$pirep->user_id]) }}" target="_blank">
|
||||
{{ $pirep->user->ident }} {{ $pirep->user->name }}
|
||||
</a>
|
||||
</h5>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="pull-right">
|
||||
@include('admin.pireps.actions', ['pirep' => $pirep, 'on_edit_page' => true])
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ Form::model($pirep, ['route' => ['admin.pireps.update', $pirep->id], 'method' => 'patch']) }}
|
||||
@include('admin.pireps.fields')
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="content">
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
<h4>comments</h4>
|
||||
@include('admin.pireps.comments')
|
||||
</div>
|
||||
</div>
|
||||
<div class="content">
|
||||
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
<h4>flight log</h4>
|
||||
@include('admin.pireps.flight_log')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
{{-- pulled out to here otherwise the form::close() within a form undo it --}}
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<h5 style="margin-top: 0px;">
|
||||
Filed By: <a href="{{ route('admin.users.edit', [$pirep->user_id]) }}" target="_blank">
|
||||
{{ $pirep->user->ident }} {{ $pirep->user->name }}
|
||||
</a>
|
||||
</h5>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="pull-right">
|
||||
<button id="recalculate-finances"
|
||||
class="btn btn-success"
|
||||
data-pirep-id="{{ $pirep->id }}">Recalcuate Finances</button>
|
||||
@include('admin.pireps.actions', ['pirep' => $pirep, 'on_edit_page' => true])
|
||||
</div>
|
||||
<h4>transactions</h4>
|
||||
@include('admin.pireps.transactions')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ Form::model($pirep, ['route' => ['admin.pireps.update', $pirep->id], 'method' => 'patch']) }}
|
||||
@include('admin.pireps.fields')
|
||||
{{ Form::close() }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
<h4>comments</h4>
|
||||
@include('admin.pireps.comments')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
<h4>flight log</h4>
|
||||
@include('admin.pireps.flight_log')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card border-blue-bottom">
|
||||
<div class="content">
|
||||
<div class="pull-right">
|
||||
<button id="recalculate-finances"
|
||||
class="btn btn-success"
|
||||
data-pirep-id="{{ $pirep->id }}">Recalcuate Finances
|
||||
</button>
|
||||
</div>
|
||||
<h4>transactions</h4>
|
||||
@include('admin.pireps.transactions')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@include('admin.pireps.scripts')
|
||||
|
||||
@@ -1,30 +1,30 @@
|
||||
@if($aircraft)
|
||||
<table class="table table-hover table-responsive">
|
||||
<table class="table table-hover table-responsive">
|
||||
<thead>
|
||||
<th>Fare</th>
|
||||
<th>Count</th>
|
||||
<th>Fare</th>
|
||||
<th>Count</th>
|
||||
</thead>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($aircraft->subfleet->fares as $fare)
|
||||
<tr>
|
||||
<tr>
|
||||
<td>{{ $fare->name }} ({{ $fare->code }})</td>
|
||||
<td>
|
||||
<div class="form-group">
|
||||
@if(isset($pirep) && $pirep->read_only)
|
||||
<p>{{ $pirep->{'fare_'.$fare->id} }}</p>
|
||||
{{ Form::hidden('fare_'.$fare->id) }}
|
||||
@else
|
||||
{{ Form::number('fare_'.$fare->id, null, [
|
||||
'class' => 'form-control',
|
||||
'min' => 0,
|
||||
'step' => '0.01',
|
||||
]) }}
|
||||
@endif
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@if(isset($pirep) && $pirep->read_only)
|
||||
<p>{{ $pirep->{'fare_'.$fare->id} }}</p>
|
||||
{{ Form::hidden('fare_'.$fare->id) }}
|
||||
@else
|
||||
{{ Form::number('fare_'.$fare->id, null, [
|
||||
'class' => 'form-control',
|
||||
'min' => 0,
|
||||
'step' => '0.01',
|
||||
]) }}
|
||||
@endif
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</table>
|
||||
@endif
|
||||
|
||||
@@ -1,36 +1,36 @@
|
||||
<table class="table table-responsive table-hover" id="flight-fields-table">
|
||||
@if(count($pirep->fields))
|
||||
@if(count($pirep->fields))
|
||||
<thead>
|
||||
<th></th>
|
||||
<th>Value</th>
|
||||
<th>Source</th>
|
||||
</thead>
|
||||
@endif
|
||||
<tbody>
|
||||
@foreach($pirep->fields as $field)
|
||||
<tr>
|
||||
<td>
|
||||
{{ $field->name }}
|
||||
@if($field->required === true)
|
||||
<span class="text-danger">*</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<div class="form-group">
|
||||
@if(!$field->read_only)
|
||||
{{ Form::text($field->slug, $field->value, [
|
||||
'class' => 'form-control'
|
||||
]) }}
|
||||
@else
|
||||
<p>{{ $field->value }}</p>
|
||||
@endif
|
||||
</div>
|
||||
<p class="text-danger">{{ $errors->first($field->slug) }}</p>
|
||||
</td>
|
||||
<td>
|
||||
{{ PirepSource::label($field->source) }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
@endif
|
||||
<tbody>
|
||||
@foreach($pirep->fields as $field)
|
||||
<tr>
|
||||
<td>
|
||||
{{ $field->name }}
|
||||
@if($field->required === true)
|
||||
<span class="text-danger">*</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<div class="form-group">
|
||||
@if(!$field->read_only)
|
||||
{{ Form::text($field->slug, $field->value, [
|
||||
'class' => 'form-control'
|
||||
]) }}
|
||||
@else
|
||||
<p>{{ $field->value }}</p>
|
||||
@endif
|
||||
</div>
|
||||
<p class="text-danger">{{ $errors->first($field->slug) }}</p>
|
||||
</td>
|
||||
<td>
|
||||
{{ PirepSource::label($field->source) }}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -1,248 +1,248 @@
|
||||
@if(!empty($pirep) && $pirep->read_only)
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
@component('admin.components.info')
|
||||
Once a PIREP has been accepted/rejected, certain fields go into read-only mode.
|
||||
@endcomponent
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
@component('admin.components.info')
|
||||
Once a PIREP has been accepted/rejected, certain fields go into read-only mode.
|
||||
@endcomponent
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
<div class="row">
|
||||
<div class="col-xl-12">
|
||||
<div class="form-container">
|
||||
<h6><i class="fas fa-info-circle"></i>
|
||||
Flight Information
|
||||
</h6>
|
||||
<div class="form-container-body">
|
||||
<div class="col-xl-12">
|
||||
<div class="form-container">
|
||||
<h6><i class="fas fa-info-circle"></i>
|
||||
Flight Information
|
||||
</h6>
|
||||
<div class="form-container-body">
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group col-sm-6">
|
||||
{{ Form::label('flight_number', 'Flight Number/Route Code/Leg') }}
|
||||
@if($pirep->read_only)
|
||||
<p>{{ $pirep->ident }}
|
||||
{{ Form::hidden('flight_number') }}
|
||||
{{ Form::hidden('flight_code') }}
|
||||
{{ Form::hidden('flight_leg') }}
|
||||
</p>
|
||||
@else
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
{{ Form::text('flight_number', null, [
|
||||
'placeholder' => 'Flight Number',
|
||||
'class' => 'form-control']) }}
|
||||
<p class="text-danger">{{ $errors->first('flight_number') }}</p>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
{{ Form::text('route_code', null, [
|
||||
'placeholder' => 'Code (optional)',
|
||||
'class' => 'form-control']) }}
|
||||
<p class="text-danger">{{ $errors->first('route_code') }}</p>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
{{ Form::text('route_leg', null, [
|
||||
'placeholder' => 'Leg (optional)',
|
||||
'class' => 'form-control']) }}
|
||||
<p class="text-danger">{{ $errors->first('route_leg') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
<div class="form-group col-sm-3">
|
||||
{{ Form::label('flight_type', 'Flight Type') }}
|
||||
{{ Form::select('flight_type',
|
||||
\App\Models\Enums\FlightType::select(),
|
||||
null, [
|
||||
'class' => 'form-control select2',
|
||||
'readonly' => $pirep->read_only
|
||||
])
|
||||
}}
|
||||
<p class="text-danger">{{ $errors->first('flight_type') }}</p>
|
||||
</div>
|
||||
<div class="form-group col-sm-3">
|
||||
<p class="description">Filed Via:</p>
|
||||
{{ PirepSource::label($pirep->source) }}
|
||||
@if(filled($pirep->source_name))
|
||||
({{ $pirep->source_name }})
|
||||
@endif
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-group col-sm-6">
|
||||
{{ Form::label('flight_number', 'Flight Number/Route Code/Leg') }}
|
||||
@if($pirep->read_only)
|
||||
<p>{{ $pirep->ident }}
|
||||
{{ Form::hidden('flight_number') }}
|
||||
{{ Form::hidden('flight_code') }}
|
||||
{{ Form::hidden('flight_leg') }}
|
||||
</p>
|
||||
@else
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
{{ Form::text('flight_number', null, [
|
||||
'placeholder' => 'Flight Number',
|
||||
'class' => 'form-control']) }}
|
||||
<p class="text-danger">{{ $errors->first('flight_number') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
{{ Form::text('route_code', null, [
|
||||
'placeholder' => 'Code (optional)',
|
||||
'class' => 'form-control']) }}
|
||||
<p class="text-danger">{{ $errors->first('route_code') }}</p>
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
{{ Form::text('route_leg', null, [
|
||||
'placeholder' => 'Leg (optional)',
|
||||
'class' => 'form-control']) }}
|
||||
<p class="text-danger">{{ $errors->first('route_leg') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
<div class="form-group col-sm-3">
|
||||
{{ Form::label('flight_type', 'Flight Type') }}
|
||||
{{ Form::select('flight_type',
|
||||
\App\Models\Enums\FlightType::select(),
|
||||
null, [
|
||||
'class' => 'form-control select2',
|
||||
'readonly' => $pirep->read_only
|
||||
])
|
||||
}}
|
||||
<p class="text-danger">{{ $errors->first('flight_type') }}</p>
|
||||
</div>
|
||||
<div class="form-group col-sm-3">
|
||||
<p class="description">Filed Via:</p>
|
||||
{{ PirepSource::label($pirep->source) }}
|
||||
@if(filled($pirep->source_name))
|
||||
({{ $pirep->source_name }})
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xl-12">
|
||||
<div class="form-container">
|
||||
<h6><i class="fas fa-info-circle"></i>
|
||||
Flight Information
|
||||
</h6>
|
||||
<div class="form-container-body">
|
||||
<div class="col-xl-12">
|
||||
<div class="form-container">
|
||||
<h6><i class="fas fa-info-circle"></i>
|
||||
Flight Information
|
||||
</h6>
|
||||
<div class="form-container-body">
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group col-sm-3">
|
||||
{{ Form::label('airline_id', 'Airline') }}
|
||||
@if($pirep->read_only)
|
||||
<p>{{ $pirep->airline->name }}</p>
|
||||
{{ Form::hidden('airline_id') }}
|
||||
@else
|
||||
{{ Form::select('airline_id', $airlines_list, null, [
|
||||
'class' => 'form-control select2',
|
||||
'readonly' => $pirep->read_only]) }}
|
||||
<p class="text-danger">{{ $errors->first('airline_id') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
<div class="form-group col-sm-3">
|
||||
{{ Form::label('aircraft_id', 'Aircraft:') }}
|
||||
@if($pirep->read_only)
|
||||
<p>{{ $pirep->aircraft->name }}</p>
|
||||
{{ Form::hidden('aircraft_id') }}
|
||||
@else
|
||||
{{ Form::select('aircraft_id', $aircraft_list, null, [
|
||||
'id' => 'aircraft_select',
|
||||
'class' => 'form-control select2',
|
||||
'readonly' => $pirep->read_only
|
||||
]) }}
|
||||
<p class="text-danger">{{ $errors->first('aircraft_id') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
<div class="form-group col-sm-3">
|
||||
{{ Form::label('dpt_airport_id', 'Departure Airport:') }}
|
||||
@if($pirep->read_only)
|
||||
<p>{{ $pirep->dpt_airport_id }}@if($pirep->dpt_airport->name) - {{ $pirep->dpt_airport->name }}@endif
|
||||
</p>
|
||||
{{ Form::hidden('dpt_airport_id') }}
|
||||
@else
|
||||
{{ Form::select('dpt_airport_id', $airports_list, null, [
|
||||
'class' => 'form-control select2',
|
||||
'readonly' => $pirep->read_only]) }}
|
||||
<p class="text-danger">{{ $errors->first('dpt_airport_id') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-group col-sm-3">
|
||||
{{ Form::label('airline_id', 'Airline') }}
|
||||
@if($pirep->read_only)
|
||||
<p>{{ $pirep->airline->name }}</p>
|
||||
{{ Form::hidden('airline_id') }}
|
||||
@else
|
||||
{{ Form::select('airline_id', $airlines_list, null, [
|
||||
'class' => 'form-control select2',
|
||||
'readonly' => $pirep->read_only]) }}
|
||||
<p class="text-danger">{{ $errors->first('airline_id') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
<div class="form-group col-sm-3">
|
||||
{{ Form::label('aircraft_id', 'Aircraft:') }}
|
||||
@if($pirep->read_only)
|
||||
<p>{{ $pirep->aircraft->name }}</p>
|
||||
{{ Form::hidden('aircraft_id') }}
|
||||
@else
|
||||
{{ Form::select('aircraft_id', $aircraft_list, null, [
|
||||
'id' => 'aircraft_select',
|
||||
'class' => 'form-control select2',
|
||||
'readonly' => $pirep->read_only
|
||||
]) }}
|
||||
<p class="text-danger">{{ $errors->first('aircraft_id') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
<div class="form-group col-sm-3">
|
||||
{{ Form::label('dpt_airport_id', 'Departure Airport:') }}
|
||||
@if($pirep->read_only)
|
||||
<p>{{ $pirep->dpt_airport_id }}@if($pirep->dpt_airport->name) - {{ $pirep->dpt_airport->name }}@endif
|
||||
</p>
|
||||
{{ Form::hidden('dpt_airport_id') }}
|
||||
@else
|
||||
{{ Form::select('dpt_airport_id', $airports_list, null, [
|
||||
'class' => 'form-control select2',
|
||||
'readonly' => $pirep->read_only]) }}
|
||||
<p class="text-danger">{{ $errors->first('dpt_airport_id') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="form-group col-sm-3">
|
||||
{{ Form::label('arr_airport_id', 'Arrival Airport:') }}
|
||||
@if($pirep->read_only)
|
||||
<p>{{ $pirep->arr_airport->id }}@if($pirep->arr_airport->name) - {{ $pirep->arr_airport->name }}@endif
|
||||
</p>
|
||||
{{ Form::hidden('arr_airport_id') }}
|
||||
@else
|
||||
{{ Form::select('arr_airport_id', $airports_list, null, ['class' => 'form-control select2']) }}
|
||||
<p class="text-danger">{{ $errors->first('arr_airport_id') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<!-- Flight Time Field -->
|
||||
<div class="form-group col-sm-3">
|
||||
{{ Form::label('flight_time', 'Flight Time (hours & minutes):') }}
|
||||
@if($pirep->read_only)
|
||||
<p>
|
||||
{{ $pirep->hours }} hours, {{ $pirep->minutes }} minutes
|
||||
{{ Form::hidden('hours') }}
|
||||
{{ Form::hidden('minutes') }}
|
||||
</p>
|
||||
@else
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
{{ Form::number('hours', null, [
|
||||
'class' => 'form-control',
|
||||
'placeholder' => 'hours',
|
||||
'readonly' => $pirep->read_only]) }}
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
{{ Form::number('minutes', null, [
|
||||
'class' => 'form-control',
|
||||
'placeholder' => 'minutes',
|
||||
'readonly' => $pirep->read_only]) }}
|
||||
</div>
|
||||
<p class="text-danger">{{ $errors->first('hours') }}</p>
|
||||
<p class="text-danger">{{ $errors->first('minutes') }}</p>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<!-- Block Fuel Field -->
|
||||
<div class="form-group col-sm-2">
|
||||
{{ Form::label('block_fuel', 'Block Fuel:') }}
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
{{ Form::number('block_fuel', null, [
|
||||
'class' => 'form-control',
|
||||
'min' => 0,
|
||||
'step' => '0.01',
|
||||
]) }}
|
||||
<p class="text-danger">{{ $errors->first('block_fuel') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Fuel Used Field -->
|
||||
<div class="form-group col-sm-2">
|
||||
{{ Form::label('fuel_used', 'Fuel Used:') }}
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
{{ Form::number('fuel_used', null, [
|
||||
'class' => 'form-control',
|
||||
'min' => 0,
|
||||
'step' => '0.01'
|
||||
]) }}
|
||||
<p class="text-danger">{{ $errors->first('fuel_used') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Level Field -->
|
||||
<div class="form-group col-sm-5">
|
||||
{{ Form::label('level', 'Flight Level:') }}
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
{{ Form::number('level', null, ['class' => 'form-control', 'min' => 0]) }}
|
||||
<p class="text-danger">{{ $errors->first('level') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<!-- Route Field -->
|
||||
<div class="form-group col-sm-6">
|
||||
{{ Form::label('route', 'Route:') }}
|
||||
{{ Form::textarea('route', null, ['class' => 'form-control']) }}
|
||||
<p class="text-danger">{{ $errors->first('route') }}</p>
|
||||
</div>
|
||||
|
||||
<!-- Notes Field -->
|
||||
<div class="form-group col-sm-6">
|
||||
{{ Form::label('notes', 'Notes:') }}
|
||||
{{ Form::textarea('notes', null, ['class' => 'form-control']) }}
|
||||
<p class="text-danger">{{ $errors->first('notes') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="form-group col-sm-3">
|
||||
{{ Form::label('arr_airport_id', 'Arrival Airport:') }}
|
||||
@if($pirep->read_only)
|
||||
<p>{{ $pirep->arr_airport->id }}@if($pirep->arr_airport->name) - {{ $pirep->arr_airport->name }}@endif
|
||||
</p>
|
||||
{{ Form::hidden('arr_airport_id') }}
|
||||
@else
|
||||
{{ Form::select('arr_airport_id', $airports_list, null, ['class' => 'form-control select2']) }}
|
||||
<p class="text-danger">{{ $errors->first('arr_airport_id') }}</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<!-- Flight Time Field -->
|
||||
<div class="form-group col-sm-3">
|
||||
{{ Form::label('flight_time', 'Flight Time (hours & minutes):') }}
|
||||
@if($pirep->read_only)
|
||||
<p>
|
||||
{{ $pirep->hours }} hours, {{ $pirep->minutes }} minutes
|
||||
{{ Form::hidden('hours') }}
|
||||
{{ Form::hidden('minutes') }}
|
||||
</p>
|
||||
@else
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
{{ Form::number('hours', null, [
|
||||
'class' => 'form-control',
|
||||
'placeholder' => 'hours',
|
||||
'readonly' => $pirep->read_only]) }}
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
{{ Form::number('minutes', null, [
|
||||
'class' => 'form-control',
|
||||
'placeholder' => 'minutes',
|
||||
'readonly' => $pirep->read_only]) }}
|
||||
</div>
|
||||
<p class="text-danger">{{ $errors->first('hours') }}</p>
|
||||
<p class="text-danger">{{ $errors->first('minutes') }}</p>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<!-- Block Fuel Field -->
|
||||
<div class="form-group col-sm-2">
|
||||
{{ Form::label('block_fuel', 'Block Fuel:') }}
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
{{ Form::number('block_fuel', null, [
|
||||
'class' => 'form-control',
|
||||
'min' => 0,
|
||||
'step' => '0.01',
|
||||
]) }}
|
||||
<p class="text-danger">{{ $errors->first('block_fuel') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Fuel Used Field -->
|
||||
<div class="form-group col-sm-2">
|
||||
{{ Form::label('fuel_used', 'Fuel Used:') }}
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
{{ Form::number('fuel_used', null, [
|
||||
'class' => 'form-control',
|
||||
'min' => 0,
|
||||
'step' => '0.01'
|
||||
]) }}
|
||||
<p class="text-danger">{{ $errors->first('fuel_used') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Level Field -->
|
||||
<div class="form-group col-sm-5">
|
||||
{{ Form::label('level', 'Flight Level:') }}
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
{{ Form::number('level', null, ['class' => 'form-control', 'min' => 0]) }}
|
||||
<p class="text-danger">{{ $errors->first('level') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<!-- Route Field -->
|
||||
<div class="form-group col-sm-6">
|
||||
{{ Form::label('route', 'Route:') }}
|
||||
{{ Form::textarea('route', null, ['class' => 'form-control']) }}
|
||||
<p class="text-danger">{{ $errors->first('route') }}</p>
|
||||
</div>
|
||||
|
||||
<!-- Notes Field -->
|
||||
<div class="form-group col-sm-6">
|
||||
{{ Form::label('notes', 'Notes:') }}
|
||||
{{ Form::textarea('notes', null, ['class' => 'form-control']) }}
|
||||
<p class="text-danger">{{ $errors->first('notes') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{--
|
||||
FARES
|
||||
--}}
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="form-container">
|
||||
<h6><i class="fas fa-info-circle"></i>
|
||||
fares
|
||||
</h6>
|
||||
<div class="form-container-body">
|
||||
<div id="fares_container">
|
||||
@include('admin.pireps.fares')
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<div class="form-container">
|
||||
<h6><i class="fas fa-info-circle"></i>
|
||||
fares
|
||||
</h6>
|
||||
<div class="form-container-body">
|
||||
<div id="fares_container">
|
||||
@include('admin.pireps.fares')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{--
|
||||
@@ -250,24 +250,24 @@
|
||||
--}}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="form-container">
|
||||
<h6><i class="fas fa-info-circle"></i>
|
||||
fields
|
||||
</h6>
|
||||
<div class="form-container-body">
|
||||
{{-- You don't want to change this ID unless you don't want the fares form to work :) --}}
|
||||
@include('admin.pireps.field_values')
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<div class="form-container">
|
||||
<h6><i class="fas fa-info-circle"></i>
|
||||
fields
|
||||
</h6>
|
||||
<div class="form-container-body">
|
||||
{{-- You don't want to change this ID unless you don't want the fares form to work :) --}}
|
||||
@include('admin.pireps.field_values')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="form-group col-sm-12">
|
||||
<div class="pull-right">
|
||||
{{ Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-success']) }}
|
||||
<a href="{{ route('admin.pireps.index') }}" class="btn btn-warn">Cancel</a>
|
||||
</div>
|
||||
<div class="form-group col-sm-12">
|
||||
<div class="pull-right">
|
||||
{{ Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-success']) }}
|
||||
<a href="{{ route('admin.pireps.index') }}" class="btn btn-warn">Cancel</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user