Format all blade templates to 2 spaces #530 (#531)

This commit is contained in:
Nabeel S
2020-02-01 13:05:56 -05:00
committed by GitHub
parent 06b47d97e0
commit 59d09c0cec
254 changed files with 7123 additions and 7006 deletions

View File

@@ -2,66 +2,68 @@
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8"/> <meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<meta name="csrf-token" content="{{ csrf_token() }}"> <meta name="csrf-token" content="{{ csrf_token() }}">
<title>@yield('title') - importer</title> <title>@yield('title') - importer</title>
<link rel="shortcut icon" type="image/png" href="{{ public_asset('/assets/img/favicon.png') }}"/> <link rel="shortcut icon" type="image/png" href="{{ public_asset('/assets/img/favicon.png') }}"/>
<meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0, shrink-to-fit=no' <meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0, shrink-to-fit=no'
name='viewport'/> name='viewport'/>
<meta name="base-url" content="{!! url('') !!}"> <meta name="base-url" content="{!! url('') !!}">
<meta name="api-key" content="{!! Auth::check() ? Auth::user()->api_key: '' !!}"> <meta name="api-key" content="{!! Auth::check() ? Auth::user()->api_key: '' !!}">
<meta name="csrf-token" content="{!! csrf_token() !!}"> <meta name="csrf-token" content="{!! csrf_token() !!}">
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700,200" rel="stylesheet"/> <link href="https://fonts.googleapis.com/css?family=Montserrat:400,700,200" rel="stylesheet"/>
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css" rel="stylesheet"/> <link href="https://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css" rel="stylesheet"/>
<link href="{{ public_asset('/assets/frontend/css/bootstrap.min.css') }}" rel="stylesheet"/> <link href="{{ public_asset('/assets/frontend/css/bootstrap.min.css') }}" rel="stylesheet"/>
<link href="{{ public_asset('/assets/frontend/css/now-ui-kit.css') }}" rel="stylesheet"/> <link href="{{ public_asset('/assets/frontend/css/now-ui-kit.css') }}" rel="stylesheet"/>
<link href="{{ public_asset('/assets/installer/css/vendor.css') }}" rel="stylesheet"/> <link href="{{ public_asset('/assets/installer/css/vendor.css') }}" rel="stylesheet"/>
<link href="{{ public_asset('/assets/frontend/css/styles.css') }}" rel="stylesheet"/> <link href="{{ public_asset('/assets/frontend/css/styles.css') }}" rel="stylesheet"/>
<link rel="stylesheet" <link rel="stylesheet"
href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css"> href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css">
<style> <style>
.table tr:first-child td { border-top: 0px; } .table tr:first-child td {
@yield('css') border-top: 0px;
</style> }
@yield('css')
</style>
</head> </head>
<body> <body>
<!-- Navbar --> <!-- Navbar -->
<nav class="navbar navbar-toggleable-md" style="background: #067ec1;"> <nav class="navbar navbar-toggleable-md" style="background: #067ec1;">
<div class="container" style="width: 85%!important;"> <div class="container" style="width: 85%!important;">
<div class="navbar-translate"> <div class="navbar-translate">
<p class="navbar-brand text-white" data-placement="bottom" target="_blank"> <p class="navbar-brand text-white" data-placement="bottom" target="_blank">
<a href="{{ url('/') }}"> <a href="{{ url('/') }}">
<img src="{{ public_asset('/assets/img/logo_blue_bg.svg') }}" width="135px" style=""/> <img src="{{ public_asset('/assets/img/logo_blue_bg.svg') }}" width="135px" style=""/>
</a> </a>
</p> </p>
</div>
<div class="justify-content-center" id="navigation" style="margin-left: 50px; color: white; font-size: 20px;">
@yield('title')
</div>
</div> </div>
<div class="justify-content-center" id="navigation" style="margin-left: 50px; color: white; font-size: 20px;">
@yield('title')
</div>
</div>
</nav> </nav>
<!-- End Navbar --> <!-- End Navbar -->
{{--<div class="clearfix" style="height: 25px;"></div>--}} {{--<div class="clearfix" style="height: 25px;"></div>--}}
<div class="wrapper"> <div class="wrapper">
<div class="clear"></div> <div class="clear"></div>
<div class="container" style="width: 50%"> <div class="container" style="width: 50%">
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
@include('importer::flash.message') @include('importer::flash.message')
@yield('content') @yield('content')
</div> </div>
</div>
</div> </div>
<div class="clearfix" style="height: 200px;"></div> </div>
<div class="clearfix" style="height: 200px;"></div>
</div> </div>
{{--<script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js"></script>--}} {{--<script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js"></script>--}}
@@ -73,17 +75,17 @@
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
<script> <script>
hljs.configure({languages: ['sh']}); hljs.configure({languages: ['sh']});
$(document).ready(function () { $(document).ready(function () {
$(".select2").select2(); $(".select2").select2();
$('pre code').each(function (i, block) { $('pre code').each(function (i, block) {
hljs.fixMarkup(block); hljs.fixMarkup(block);
hljs.highlightBlock(block); hljs.highlightBlock(block);
});
}); });
});
</script> </script>
@yield('scripts') @yield('scripts')

View File

@@ -1,8 +1,8 @@
<div class="alert alert-{{ $status }}" role="alert"> <div class="alert alert-{{ $status }}" role="alert">
<div class="container"> <div class="container">
<div class="alert-icon"> <div class="alert-icon">
<i class="now-ui-icons ui-1_bell-53"></i> <i class="now-ui-icons ui-1_bell-53"></i>
</div>
{{ $message }}
</div> </div>
{{ $message }}
</div>
</div> </div>

View File

@@ -1,6 +1,6 @@
@if($errors->has($field)) @if($errors->has($field))
<p class="text-danger" style="margin-top: 10px;">{{ $errors->first($field) }}</p> <p class="text-danger" style="margin-top: 10px;">{{ $errors->first($field) }}</p>
{{--<div class="alert alert-danger" role="alert" style="margin-top: 10px;"> {{--<div class="alert alert-danger" role="alert" style="margin-top: 10px;">
{{ $errors->first($field) }} {{ $errors->first($field) }}
</div>--}} </div>--}}
@endif @endif

View File

@@ -1,11 +1,11 @@
@foreach (session('flash_notification', collect())->toArray() as $message) @foreach (session('flash_notification', collect())->toArray() as $message)
<div class="alert alert-danger" role="alert"> <div class="alert alert-danger" role="alert">
<div class="container"> <div class="container">
<div class="alert-icon"> <div class="alert-icon">
<i class="now-ui-icons ui-2_like"></i> <i class="now-ui-icons ui-2_like"></i>
</div> </div>
{{ $message['message'] }} {{ $message['message'] }}
</div> </div>
</div> </div>
@endforeach @endforeach
{{ session()->forget('flash_notification') }} {{ session()->forget('flash_notification') }}

View File

@@ -12,9 +12,11 @@
<ul> <ul>
<li>If you have more than 1000 PIREPs or flights, it's best to use the command-line importer! <li>If you have more than 1000 PIREPs or flights, it's best to use the command-line importer!
<a href="http://docs.phpvms.net/setup/importing-from-v2-v5" target="_blank">Click here</a> to <a href="http://docs.phpvms.net/setup/importing-from-v2-v5" target="_blank">Click here</a> to
see the documentation of how to use it.</li> see the documentation of how to use it.
</li>
<li><strong>THIS WILL WIPE OUT YOUR EXISTING DATA</strong> - this is required to make sure that things like <li><strong>THIS WILL WIPE OUT YOUR EXISTING DATA</strong> - this is required to make sure that things like
pilot IDs match up</li> pilot IDs match up
</li>
</ul> </ul>
</td> </td>
</tr> </tr>

View File

@@ -2,66 +2,68 @@
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8"/> <meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<meta name="csrf-token" content="{{ csrf_token() }}"> <meta name="csrf-token" content="{{ csrf_token() }}">
<title>@yield('title') - installer</title> <title>@yield('title') - installer</title>
<link rel="shortcut icon" type="image/png" href="{{ public_asset('/assets/img/favicon.png') }}"/> <link rel="shortcut icon" type="image/png" href="{{ public_asset('/assets/img/favicon.png') }}"/>
<meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0, shrink-to-fit=no' <meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0, shrink-to-fit=no'
name='viewport'/> name='viewport'/>
<meta name="base-url" content="{!! url('') !!}"> <meta name="base-url" content="{!! url('') !!}">
<meta name="api-key" content="{!! Auth::check() ? Auth::user()->api_key: '' !!}"> <meta name="api-key" content="{!! Auth::check() ? Auth::user()->api_key: '' !!}">
<meta name="csrf-token" content="{!! csrf_token() !!}"> <meta name="csrf-token" content="{!! csrf_token() !!}">
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700,200" rel="stylesheet"/> <link href="https://fonts.googleapis.com/css?family=Montserrat:400,700,200" rel="stylesheet"/>
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css" rel="stylesheet"/> <link href="https://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css" rel="stylesheet"/>
<link href="{{ public_asset('/assets/frontend/css/bootstrap.min.css') }}" rel="stylesheet"/> <link href="{{ public_asset('/assets/frontend/css/bootstrap.min.css') }}" rel="stylesheet"/>
<link href="{{ public_asset('/assets/frontend/css/now-ui-kit.css') }}" rel="stylesheet"/> <link href="{{ public_asset('/assets/frontend/css/now-ui-kit.css') }}" rel="stylesheet"/>
<link href="{{ public_asset('/assets/installer/css/vendor.css') }}" rel="stylesheet"/> <link href="{{ public_asset('/assets/installer/css/vendor.css') }}" rel="stylesheet"/>
<link href="{{ public_asset('/assets/frontend/css/styles.css') }}" rel="stylesheet"/> <link href="{{ public_asset('/assets/frontend/css/styles.css') }}" rel="stylesheet"/>
<link rel="stylesheet" <link rel="stylesheet"
href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css"> href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css">
<style> <style>
.table tr:first-child td { border-top: 0px; } .table tr:first-child td {
@yield('css') border-top: 0px;
</style> }
@yield('css')
</style>
</head> </head>
<body> <body>
<!-- Navbar --> <!-- Navbar -->
<nav class="navbar navbar-toggleable-md" style="background: #067ec1;"> <nav class="navbar navbar-toggleable-md" style="background: #067ec1;">
<div class="container" style="width: 85%!important;"> <div class="container" style="width: 85%!important;">
<div class="navbar-translate"> <div class="navbar-translate">
<p class="navbar-brand text-white" data-placement="bottom" target="_blank"> <p class="navbar-brand text-white" data-placement="bottom" target="_blank">
<a href="{{ url('/') }}"> <a href="{{ url('/') }}">
<img src="{{ public_asset('/assets/img/logo_blue_bg.svg') }}" width="135px" style=""/> <img src="{{ public_asset('/assets/img/logo_blue_bg.svg') }}" width="135px" style=""/>
</a> </a>
</p> </p>
</div>
<div class="justify-content-center" id="navigation" style="margin-left: 50px; color: white; font-size: 20px;">
@yield('title')
</div>
</div> </div>
<div class="justify-content-center" id="navigation" style="margin-left: 50px; color: white; font-size: 20px;">
@yield('title')
</div>
</div>
</nav> </nav>
<!-- End Navbar --> <!-- End Navbar -->
{{--<div class="clearfix" style="height: 25px;"></div>--}} {{--<div class="clearfix" style="height: 25px;"></div>--}}
<div class="wrapper"> <div class="wrapper">
<div class="clear"></div> <div class="clear"></div>
<div class="container" style="width: 50%"> <div class="container" style="width: 50%">
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
@include('installer::flash.message') @include('installer::flash.message')
@yield('content') @yield('content')
</div> </div>
</div>
</div> </div>
<div class="clearfix" style="height: 200px;"></div> </div>
<div class="clearfix" style="height: 200px;"></div>
</div> </div>
{{--<script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js"></script>--}} {{--<script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js"></script>--}}
@@ -73,17 +75,17 @@
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
<script> <script>
hljs.configure({languages: ['sh']}); hljs.configure({languages: ['sh']});
$(document).ready(function () { $(document).ready(function () {
$(".select2").select2(); $(".select2").select2();
$('pre code').each(function (i, block) { $('pre code').each(function (i, block) {
hljs.fixMarkup(block); hljs.fixMarkup(block);
hljs.highlightBlock(block); hljs.highlightBlock(block);
});
}); });
});
</script> </script>
@yield('scripts') @yield('scripts')

View File

@@ -1,11 +1,11 @@
@extends('installer::app') @extends('installer::app')
@section('content') @section('content')
<h2>phpVMS already installed!</h2> <h2>phpVMS already installed!</h2>
<p>phpVMS has already been installed! Please remove the modules/Installer folder.</p> <p>phpVMS has already been installed! Please remove the modules/Installer folder.</p>
{{ Form::open(['url' => '/', 'method' => 'get']) }} {{ Form::open(['url' => '/', 'method' => 'get']) }}
<p style="text-align: right"> <p style="text-align: right">
{{ Form::submit('Go to your site >>', ['class' => 'btn btn-success']) }} {{ Form::submit('Go to your site >>', ['class' => 'btn btn-success']) }}
</p> </p>
{{ Form::close() }} {{ Form::close() }}
@endsection @endsection

View File

@@ -1,6 +1,6 @@
@if($errors->has($field)) @if($errors->has($field))
<p class="text-danger" style="margin-top: 10px;">{{ $errors->first($field) }}</p> <p class="text-danger" style="margin-top: 10px;">{{ $errors->first($field) }}</p>
{{--<div class="alert alert-danger" role="alert" style="margin-top: 10px;"> {{--<div class="alert alert-danger" role="alert" style="margin-top: 10px;">
{{ $errors->first($field) }} {{ $errors->first($field) }}
</div>--}} </div>--}}
@endif @endif

View File

@@ -1,11 +1,11 @@
@foreach (session('flash_notification', []) as $message) @foreach (session('flash_notification', []) as $message)
<div class="alert alert-danger" role="alert"> <div class="alert alert-danger" role="alert">
<div class="container"> <div class="container">
<div class="alert-icon"> <div class="alert-icon">
<i class="now-ui-icons ui-2_like"></i> <i class="now-ui-icons ui-2_like"></i>
</div> </div>
{{ $message['message'] }} {{ $message['message'] }}
</div> </div>
</div> </div>
@endforeach @endforeach
{{ session()->forget('flash_notification') }} {{ session()->forget('flash_notification') }}

View File

@@ -1,8 +1,8 @@
<div class="alert alert-{{ $status }}" role="alert"> <div class="alert alert-{{ $status }}" role="alert">
<div class="container"> <div class="container">
<div class="alert-icon"> <div class="alert-icon">
<i class="now-ui-icons ui-1_bell-53"></i> <i class="now-ui-icons ui-1_bell-53"></i>
</div>
{{ $message }}
</div> </div>
{{ $message }}
</div>
</div> </div>

View File

@@ -2,11 +2,11 @@
@section('title', 'Install phpVMS') @section('title', 'Install phpVMS')
@section('content') @section('content')
<h2>phpvms installer</h2> <h2>phpvms installer</h2>
<p>Press continue to start</p> <p>Press continue to start</p>
{{ Form::open(['route' => 'installer.step1', 'method' => 'post']) }} {{ Form::open(['route' => 'installer.step1', 'method' => 'post']) }}
<p style="text-align: right"> <p style="text-align: right">
{{ Form::submit('Start >>', ['class' => 'btn btn-success']) }} {{ Form::submit('Start >>', ['class' => 'btn btn-success']) }}
</p> </p>
{{ Form::close() }} {{ Form::close() }}
@endsection @endsection

View File

@@ -2,62 +2,66 @@
@section('title', 'Requirements Check') @section('title', 'Requirements Check')
@section('content') @section('content')
<div style="align-content: center;"> <div style="align-content: center;">
{{ Form::open(['route' => 'installer.step2', 'method' => 'GET']) }} {{ Form::open(['route' => 'installer.step2', 'method' => 'GET']) }}
<table class="table" width="25%"> <table class="table" width="25%">
<tr><td colspan="2"><h4>php version</h4></td></tr> <tr>
<tr> <td colspan="2"><h4>php version</h4></td>
<td>PHP Version: {{ $php['version'] }}</td> </tr>
<td style="text-align:center;"> <tr>
@if($php['passed'] === true) <td>PHP Version: {{ $php['version'] }}</td>
<span class="badge badge-success">OK!</span> <td style="text-align:center;">
@else @if($php['passed'] === true)
<span class="badge badge-danger">Failed!</span> <span class="badge badge-success">OK!</span>
@endif @else
</td> <span class="badge badge-danger">Failed!</span>
</tr> @endif
</td>
<tr><td colspan="2"><h4>php extensions</h4></td></tr> </tr>
@foreach($extensions as $ext)
<tr>
<td>{{ $ext['ext'] }}</td>
<td style="text-align:center;">
@if($ext['passed'] === true)
<span class="badge badge-success">OK!</span>
@else
<span class="badge badge-danger">Failed!</span>
@endif
</td>
</tr>
@endforeach
<tr>
<td colspan="2"><h4>php extensions</h4></td>
</tr>
@foreach($extensions as $ext)
<tr> <tr>
<td colspan="2"> <td>{{ $ext['ext'] }}</td>
<h4>directory permissions</h4> <td style="text-align:center;">
<p>Make sure these directories have read and write permissions</p> @if($ext['passed'] === true)
</td> <span class="badge badge-success">OK!</span>
@else
<span class="badge badge-danger">Failed!</span>
@endif
</td>
</tr> </tr>
@foreach($directories as $dir) @endforeach
<tr>
<td>{{ $dir['dir'] }}</td> <tr>
<td style="text-align:center;"> <td colspan="2">
@if($dir['passed'] === true) <h4>directory permissions</h4>
<span class="badge badge-success">OK!</span> <p>Make sure these directories have read and write permissions</p>
@else </td>
<span class="badge badge-danger">Failed!</span> </tr>
@endif @foreach($directories as $dir)
</td> <tr>
</tr> <td>{{ $dir['dir'] }}</td>
@endforeach <td style="text-align:center;">
@if($dir['passed'] === true)
<span class="badge badge-success">OK!</span>
@else
<span class="badge badge-danger">Failed!</span>
@endif
</td>
</tr>
@endforeach
</table> </table>
@if($passed === true) @if($passed === true)
<p style="text-align: right"> <p style="text-align: right">
{{ Form::submit('Database Setup >>', ['class' => 'btn btn-success']) }} {{ Form::submit('Database Setup >>', ['class' => 'btn btn-success']) }}
</p> </p>
@endif @endif
{{--{{ $php_version }} {{--{{ $php_version }}
{{ $extensions }} {{ $extensions }}
{{ $passed }}--}} {{ $passed }}--}}
{{ Form::close() }} {{ Form::close() }}
</div> </div>
@endsection @endsection

View File

@@ -1,154 +1,154 @@
@extends('installer::app') @extends('installer::app')
@section('title', 'Database Setup') @section('title', 'Database Setup')
@section('content') @section('content')
<div style="align-content: center;"> <div style="align-content: center;">
{{ Form::open(['route' => 'installer.envsetup', 'method' => 'POST']) }} {{ Form::open(['route' => 'installer.envsetup', 'method' => 'POST']) }}
<table class="table" width="25%"> <table class="table" width="25%">
<tr> <tr>
<td colspan="2"><h4>Site Config</h4></td> <td colspan="2"><h4>Site Config</h4></td>
</tr> </tr>
<tr> <tr>
<td>Site Name</td> <td>Site Name</td>
<td style="text-align:center;"> <td style="text-align:center;">
<div class="form-group"> <div class="form-group">
{{ Form::input('text', 'site_name', 'phpvms', ['class' => 'form-control']) }} {{ Form::input('text', 'site_name', 'phpvms', ['class' => 'form-control']) }}
</div> </div>
</td> </td>
</tr> </tr>
<tr> <tr>
<td>Site URL</td> <td>Site URL</td>
<td style="text-align:center;"> <td style="text-align:center;">
<div class="form-group"> <div class="form-group">
{{ Form::input('text', 'site_url', Request::root(), ['class' => 'form-control']) }} {{ Form::input('text', 'site_url', Request::root(), ['class' => 'form-control']) }}
</div> </div>
</td> </td>
</tr> </tr>
<tr> <tr>
<td colspan="2"><h4>Database Config</h4></td> <td colspan="2"><h4>Database Config</h4></td>
</tr> </tr>
<tr> <tr>
<td><p>Select Database Type</p></td> <td><p>Select Database Type</p></td>
<td style="text-align:center;"> <td style="text-align:center;">
<div class="form-group"> <div class="form-group">
{{ Form::select('db_conn', $db_types, null, ['class' => 'form-control', 'id' => 'db_conn']) }} {{ Form::select('db_conn', $db_types, null, ['class' => 'form-control', 'id' => 'db_conn']) }}
</div> </div>
</td> </td>
</tr> </tr>
<tbody id="mysql_settings" class="settings_panel"> <tbody id="mysql_settings" class="settings_panel">
<tr> <tr>
<td>Database Host</td> <td>Database Host</td>
<td style="text-align:center;"> <td style="text-align:center;">
<div class="form-group"> <div class="form-group">
{{ Form::input('text', 'db_host', '127.0.0.1', ['class' => 'form-control']) }} {{ Form::input('text', 'db_host', '127.0.0.1', ['class' => 'form-control']) }}
</div> </div>
</td> </td>
</tr> </tr>
<tr> <tr>
<td>Database Port</td> <td>Database Port</td>
<td style="text-align:center;"> <td style="text-align:center;">
<div class="form-group"> <div class="form-group">
{{ Form::input('text', 'db_port', '3306', ['class' => 'form-control']) }} {{ Form::input('text', 'db_port', '3306', ['class' => 'form-control']) }}
</div> </div>
</td> </td>
</tr> </tr>
<tr> <tr>
<td>Database Name</td> <td>Database Name</td>
<td style="text-align:center;"> <td style="text-align:center;">
<div class="form-group"> <div class="form-group">
{{ Form::input('text', 'db_name', 'phpvms', ['class' => 'form-control']) }} {{ Form::input('text', 'db_name', 'phpvms', ['class' => 'form-control']) }}
</div> </div>
</td> </td>
</tr> </tr>
<tr> <tr>
<td>Database User</td> <td>Database User</td>
<td style="text-align:center;"> <td style="text-align:center;">
<div class="form-group"> <div class="form-group">
{{ Form::input('text', 'db_user', null, ['class' => 'form-control']) }} {{ Form::input('text', 'db_user', null, ['class' => 'form-control']) }}
</div> </div>
</td> </td>
</tr> </tr>
<tr> <tr>
<td>Database Password</td> <td>Database Password</td>
<td style="text-align:center;"> <td style="text-align:center;">
<div class="form-group"> <div class="form-group">
{{ Form::input('text', 'db_pass', null, ['class' => 'form-control']) }} {{ Form::input('text', 'db_pass', null, ['class' => 'form-control']) }}
</div> </div>
</td> </td>
</tr> </tr>
<tr> <tr>
<td colspan="2" style="text-align: right;"> <td colspan="2" style="text-align: right;">
{{ Form::submit('Test Database Credentials', ['class' => 'btn btn-info', 'id' => 'dbtest_button']) }} {{ Form::submit('Test Database Credentials', ['class' => 'btn btn-info', 'id' => 'dbtest_button']) }}
</td> </td>
</tr> </tr>
</tbody> </tbody>
<tbody id="sqlite_settings" class="settings_panel"> <tbody id="sqlite_settings" class="settings_panel">
</tbody> </tbody>
<tr> <tr>
<td>Database Prefix</td> <td>Database Prefix</td>
<td style="text-align:center;"> <td style="text-align:center;">
<div class="form-group"> <div class="form-group">
{{ Form::input('text', 'db_prefix', '', ['class' => 'form-control']) }} {{ Form::input('text', 'db_prefix', '', ['class' => 'form-control']) }}
<p>Set this if you're sharing the database with another application.</p> <p>Set this if you're sharing the database with another application.</p>
</div> </div>
</td> </td>
</tr> </tr>
</table> </table>
<div id="dbtest"></div> <div id="dbtest"></div>
<p style="text-align: right"> <p style="text-align: right">
{{ Form::submit('Setup Database >>', ['class' => 'btn btn-success']) }} {{ Form::submit('Setup Database >>', ['class' => 'btn btn-success']) }}
</p> </p>
{{ Form::close() }} {{ Form::close() }}
</div> </div>
@endsection @endsection
@section('scripts') @section('scripts')
<script> <script>
function changeForm(selected) { function changeForm(selected) {
$("tbody.settings_panel").hide(); $("tbody.settings_panel").hide();
$("tbody#" + selected + "_settings").show(); $("tbody#" + selected + "_settings").show();
} }
$(document).ready(() => { $(document).ready(() => {
const selValue = $("#db_conn option:selected").text(); const selValue = $("#db_conn option:selected").text();
changeForm(selValue); changeForm(selValue);
$("#db_conn").change((e) => { $("#db_conn").change((e) => {
const selValue = $("#db_conn option:selected").text(); const selValue = $("#db_conn option:selected").text();
changeForm(selValue); changeForm(selValue);
}); });
$("#dbtest_button").click((e) => { $("#dbtest_button").click((e) => {
e.preventDefault(); e.preventDefault();
const opts = { const opts = {
_token: "{{ csrf_token() }}", _token: "{{ csrf_token() }}",
db_conn: $("#db_conn option:selected").text(), db_conn: $("#db_conn option:selected").text(),
db_host: $("input[name=db_host]").val(), db_host: $("input[name=db_host]").val(),
db_port: $("input[name=db_port]").val(), db_port: $("input[name=db_port]").val(),
db_name: $("input[name=db_name]").val(), db_name: $("input[name=db_name]").val(),
db_user: $("input[name=db_user]").val(), db_user: $("input[name=db_user]").val(),
db_pass: $("input[name=db_pass]").val(), db_pass: $("input[name=db_pass]").val(),
}; };
$.post("{{ route('installer.dbtest') }}", opts, (data) => { $.post("{{ route('installer.dbtest') }}", opts, (data) => {
$("#dbtest").html(data); $("#dbtest").html(data);
}) })
}) })
}); });
</script> </script>
@endsection @endsection

View File

@@ -1,19 +1,19 @@
@extends('installer::app') @extends('installer::app')
@section('title', 'Database Setup Completed') @section('title', 'Database Setup Completed')
@section('content') @section('content')
<div style="align-content: center;"> <div style="align-content: center;">
{{ Form::open(['route' => 'installer.step3', 'method' => 'GET']) }} {{ Form::open(['route' => 'installer.step3', 'method' => 'GET']) }}
<pre class="lang-sh"> <pre class="lang-sh">
<code class="lang-sh"> <code class="lang-sh">
{{--<code class="language-bash">--}} {{--<code class="language-bash">--}}
{{ $console_output }} {{ $console_output }}
</code> </code>
</pre> </pre>
<p style="text-align: right"> <p style="text-align: right">
{{ Form::submit('Continue >>', ['class' => 'btn btn-success']) }} {{ Form::submit('Continue >>', ['class' => 'btn btn-success']) }}
</p> </p>
{{ Form::close() }} {{ Form::close() }}
</div> </div>
@endsection @endsection

View File

@@ -2,117 +2,118 @@
@section('title', 'User Setup') @section('title', 'User Setup')
@section('content') @section('content')
<div class="row"><div class="col-md-12"> <div class="row">
<div style="align-content: center;"> <div class="col-md-12">
{{ Form::open(['route' => 'installer.usersetup', 'method' => 'POST']) }} <div style="align-content: center;">
<table class="table" width="25%"> {{ Form::open(['route' => 'installer.usersetup', 'method' => 'POST']) }}
<table class="table" width="25%">
<tr> <tr>
<td colspan="2" style="text-align: right"> <td colspan="2" style="text-align: right">
<a href="{{ route('importer.index') }}">Importing from a legacy install?</a> <a href="{{ route('importer.index') }}">Importing from a legacy install?</a>
</td> </td>
</tr> </tr>
<tr> <tr>
<td colspan="2"><h4>Airline Information</h4></td> <td colspan="2"><h4>Airline Information</h4></td>
</tr> </tr>
<tr> <tr>
<td><p>Airline ICAO</p></td> <td><p>Airline ICAO</p></td>
<td> <td>
<div class="form-group"> <div class="form-group">
{{ Form::input('text', 'airline_icao', null, ['class' => 'form-control']) }} {{ Form::input('text', 'airline_icao', null, ['class' => 'form-control']) }}
@include('installer::flash/check_error', ['field' => 'airline_icao']) @include('installer::flash/check_error', ['field' => 'airline_icao'])
</div> </div>
</td> </td>
</tr> </tr>
<tr> <tr>
<td><p>Airline Name</p></td> <td><p>Airline Name</p></td>
<td> <td>
<div class="form-group"> <div class="form-group">
{{ Form::input('text', 'airline_name', null, ['class' => 'form-control']) }} {{ Form::input('text', 'airline_name', null, ['class' => 'form-control']) }}
@include('installer::flash/check_error', ['field' => 'airline_name']) @include('installer::flash/check_error', ['field' => 'airline_name'])
</div> </div>
</td> </td>
</tr> </tr>
<tr> <tr>
<td><p>Airline Country</p></td> <td><p>Airline Country</p></td>
<td> <td>
<div class="form-group"> <div class="form-group">
{{ Form::select('airline_country', $countries, null, ['class' => 'form-control select2' ]) }} {{ Form::select('airline_country', $countries, null, ['class' => 'form-control select2' ]) }}
@include('installer::flash/check_error', ['field' => 'airline_country']) @include('installer::flash/check_error', ['field' => 'airline_country'])
</div> </div>
</td> </td>
</tr> </tr>
<tr> <tr>
<td colspan="2"><h4>First User</h4></td> <td colspan="2"><h4>First User</h4></td>
</tr> </tr>
<tr> <tr>
<td><p>Name</p></td> <td><p>Name</p></td>
<td> <td>
<div class="form-group"> <div class="form-group">
{{ Form::input('text', 'name', null, ['class' => 'form-control']) }} {{ Form::input('text', 'name', null, ['class' => 'form-control']) }}
@include('installer::flash/check_error', ['field' => 'name']) @include('installer::flash/check_error', ['field' => 'name'])
</div> </div>
</td> </td>
</tr> </tr>
<tr> <tr>
<td><p>Email</p></td> <td><p>Email</p></td>
<td> <td>
<div class="form-group"> <div class="form-group">
{{ Form::input('text', 'email', null, ['class' => 'form-control']) }} {{ Form::input('text', 'email', null, ['class' => 'form-control']) }}
@include('installer::flash/check_error', ['field' => 'email']) @include('installer::flash/check_error', ['field' => 'email'])
</div> </div>
</td> </td>
</tr> </tr>
<tr> <tr>
<td><p>Password</p></td> <td><p>Password</p></td>
<td> <td>
{{ Form::password('password', ['class' => 'form-control']) }} {{ Form::password('password', ['class' => 'form-control']) }}
@include('installer::flash/check_error', ['field' => 'password']) @include('installer::flash/check_error', ['field' => 'password'])
</td> </td>
</tr> </tr>
<tr> <tr>
<td width="40%"><p>Password Confirm</p></td> <td width="40%"><p>Password Confirm</p></td>
<td> <td>
{{ Form::password('password_confirmation', ['class' => 'form-control']) }} {{ Form::password('password_confirmation', ['class' => 'form-control']) }}
@include('installer::flash/check_error', ['field' => 'password_confirmation']) @include('installer::flash/check_error', ['field' => 'password_confirmation'])
</td> </td>
</tr> </tr>
<tr> <tr>
<td colspan="2"><h4>Options</h4></td> <td colspan="2"><h4>Options</h4></td>
</tr> </tr>
<tr> <tr>
<td><p>Analytics</p></td> <td><p>Analytics</p></td>
<td> <td>
<div class="form-group"> <div class="form-group">
{{ Form::hidden('telemetry', 0) }} {{ Form::hidden('telemetry', 0) }}
{{ Form::checkbox('telemetry', 1, true, ['class' => 'form-control']) }} {{ Form::checkbox('telemetry', 1, true, ['class' => 'form-control']) }}
<br /> <br/>
<p> <p>
Allows collection of analytics. They won't identify you, and helps us to track Allows collection of analytics. They won't identify you, and helps us to track
the PHP and database versions that are used, and help to figure out problems the PHP and database versions that are used, and help to figure out problems
and slowdowns when vaCentral integration is enabled. and slowdowns when vaCentral integration is enabled.
</p> </p>
</div> </div>
</td> </td>
</tr> </tr>
</table> </table>
<div id="dbtest"></div> <div id="dbtest"></div>
<p style="text-align: right"> <p style="text-align: right">
{{ Form::submit('Complete Setup >>', ['class' => 'btn btn-success']) }} {{ Form::submit('Complete Setup >>', ['class' => 'btn btn-success']) }}
</p> </p>
{{ Form::close() }} {{ Form::close() }}
</div> </div>
</div>
</div> </div>
</div>
@endsection @endsection

View File

@@ -2,19 +2,19 @@
@section('title', 'Installation Completed!') @section('title', 'Installation Completed!')
@section('content') @section('content')
<div style="align-content: center;"> <div style="align-content: center;">
{{ Form::open(['route' => 'installer.complete', 'method' => 'GET']) }} {{ Form::open(['route' => 'installer.complete', 'method' => 'GET']) }}
<h4>Installer Completed!</h4> <h4>Installer Completed!</h4>
<p>Edit the <span class="code">config.php</span> to fill in some additional settings. </p> <p>Edit the <span class="code">config.php</span> to fill in some additional settings. </p>
<p>Click the button to proceed to the login screen!</p> <p>Click the button to proceed to the login screen!</p>
<p style="text-align: right"> <p style="text-align: right">
{{ Form::submit('Install Complete! Continue to Log-In >>', {{ Form::submit('Install Complete! Continue to Log-In >>',
['class' => 'btn btn-success']) ['class' => 'btn btn-success'])
}} }}
</p> </p>
{{ Form::close() }} {{ Form::close() }}
</div> </div>
@endsection @endsection

View File

@@ -2,11 +2,11 @@
@section('title', 'Update phpVMS') @section('title', 'Update phpVMS')
@section('content') @section('content')
<h2>phpvms updater</h2> <h2>phpvms updater</h2>
<p>Press continue to check if there are any updates available.</p> <p>Press continue to check if there are any updates available.</p>
{{ Form::open(['route' => 'update.step1', 'method' => 'post']) }} {{ Form::open(['route' => 'update.step1', 'method' => 'post']) }}
<p style="text-align: right"> <p style="text-align: right">
{{ Form::submit('Start >>', ['class' => 'btn btn-success']) }} {{ Form::submit('Start >>', ['class' => 'btn btn-success']) }}
</p> </p>
{{ Form::close() }} {{ Form::close() }}
@endsection @endsection

View File

@@ -2,12 +2,12 @@
@section('title', 'Update phpVMS') @section('title', 'Update phpVMS')
@section('content') @section('content')
<h2>phpvms updater</h2> <h2>phpvms updater</h2>
<p>It seems like you're up to date!</p> <p>It seems like you're up to date!</p>
{{ Form::open(['route' => 'update.complete', 'method' => 'GET']) }} {{ Form::open(['route' => 'update.complete', 'method' => 'GET']) }}
<p style="text-align: right"> <p style="text-align: right">
{{ Form::submit('Complete >>', ['class' => 'btn btn-success']) }} {{ Form::submit('Complete >>', ['class' => 'btn btn-success']) }}
</p> </p>
{{ Form::close() }} {{ Form::close() }}
@endsection @endsection

View File

@@ -2,11 +2,11 @@
@section('title', 'Update phpVMS') @section('title', 'Update phpVMS')
@section('content') @section('content')
<h2>phpvms updater</h2> <h2>phpvms updater</h2>
<p>Click run to complete the update!.</p> <p>Click run to complete the update!.</p>
{{ Form::open(['route' => 'update.run_migrations', 'method' => 'post']) }} {{ Form::open(['route' => 'update.run_migrations', 'method' => 'post']) }}
<p style="text-align: right"> <p style="text-align: right">
{{ Form::submit('Run >>', ['class' => 'btn btn-success']) }} {{ Form::submit('Run >>', ['class' => 'btn btn-success']) }}
</p> </p>
{{ Form::close() }} {{ Form::close() }}
@endsection @endsection

View File

@@ -1,18 +1,18 @@
@extends('installer::app') @extends('installer::app')
@section('title', 'Update Completed') @section('title', 'Update Completed')
@section('content') @section('content')
<div style="align-content: center;"> <div style="align-content: center;">
{{ Form::open(['route' => 'update.complete', 'method' => 'GET']) }} {{ Form::open(['route' => 'update.complete', 'method' => 'GET']) }}
<pre class="lang-sh"> <pre class="lang-sh">
<code class="lang-sh"> <code class="lang-sh">
{{ $console_output }} {{ $console_output }}
</code> </code>
</pre> </pre>
<p style="text-align: right"> <p style="text-align: right">
{{ Form::submit('Complete >>', ['class' => 'btn btn-success']) }} {{ Form::submit('Complete >>', ['class' => 'btn btn-success']) }}
</p> </p>
{{ Form::close() }} {{ Form::close() }}
</div> </div>
@endsection @endsection

View File

@@ -2,12 +2,12 @@
@section('title', 'Update Completed') @section('title', 'Update Completed')
@section('content') @section('content')
<h2>phpvms updater</h2> <h2>phpvms updater</h2>
<p>Update completed!.</p> <p>Update completed!.</p>
{{ Form::open(['route' => 'update.complete', 'method' => 'GET']) }} {{ Form::open(['route' => 'update.complete', 'method' => 'GET']) }}
<p style="text-align: right"> <p style="text-align: right">
{{ Form::submit('Finish >>', ['class' => 'btn btn-success']) }} {{ Form::submit('Finish >>', ['class' => 'btn btn-success']) }}
</p> </p>
{{ Form::close() }} {{ Form::close() }}
@endsection @endsection

View File

@@ -5,10 +5,10 @@
@endsection @endsection
@section('content') @section('content')
<div class="card border-blue-bottom"> <div class="card border-blue-bottom">
<div class="content"> <div class="content">
<div class="header"><h4 class="title">Create something!</h4></div> <div class="header"><h4 class="title">Create something!</h4></div>
<p>Add a form!</p> <p>Add a form!</p>
</div>
</div> </div>
</div>
@endsection @endsection

View File

@@ -2,17 +2,17 @@
@section('title', 'Sample') @section('title', 'Sample')
@section('actions') @section('actions')
<li> <li>
<a href="{{ url('/admin/sample/create') }}"> <a href="{{ url('/admin/sample/create') }}">
<i class="ti-plus"></i> <i class="ti-plus"></i>
Add New</a> Add New</a>
</li> </li>
@endsection @endsection
@section('content') @section('content')
<div class="card border-blue-bottom"> <div class="card border-blue-bottom">
<div class="content"> <div class="content">
<div class="header"><h4 class="title">Admin Scaffold!</h4></div> <div class="header"><h4 class="title">Admin Scaffold!</h4></div>
<p>This view is loaded from module: {{ config('sample.name') }}</p> <p>This view is loaded from module: {{ config('sample.name') }}</p>
</div>
</div> </div>
</div>
@endsection @endsection

View File

@@ -1,9 +1,9 @@
@extends('sample::layouts.frontend') @extends('sample::layouts.frontend')
@section('content') @section('content')
<h1>Hello World</h1> <h1>Hello World</h1>
<p> <p>
This view is loaded from module: {{ config('sample.name') }} This view is loaded from module: {{ config('sample.name') }}
</p> </p>
@endsection @endsection

View File

@@ -2,66 +2,68 @@
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8"/> <meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<meta name="csrf-token" content="{{ csrf_token() }}"> <meta name="csrf-token" content="{{ csrf_token() }}">
<title>@yield('title') - updater</title> <title>@yield('title') - updater</title>
<link rel="shortcut icon" type="image/png" href="{{ public_asset('/assets/img/favicon.png') }}"/> <link rel="shortcut icon" type="image/png" href="{{ public_asset('/assets/img/favicon.png') }}"/>
<meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0, shrink-to-fit=no' <meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0, shrink-to-fit=no'
name='viewport'/> name='viewport'/>
<meta name="base-url" content="{!! url('') !!}"> <meta name="base-url" content="{!! url('') !!}">
<meta name="api-key" content="{!! Auth::check() ? Auth::user()->api_key: '' !!}"> <meta name="api-key" content="{!! Auth::check() ? Auth::user()->api_key: '' !!}">
<meta name="csrf-token" content="{!! csrf_token() !!}"> <meta name="csrf-token" content="{!! csrf_token() !!}">
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700,200" rel="stylesheet"/> <link href="https://fonts.googleapis.com/css?family=Montserrat:400,700,200" rel="stylesheet"/>
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css" rel="stylesheet"/> <link href="https://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css" rel="stylesheet"/>
<link href="{{ public_asset('/assets/frontend/css/bootstrap.min.css') }}" rel="stylesheet"/> <link href="{{ public_asset('/assets/frontend/css/bootstrap.min.css') }}" rel="stylesheet"/>
<link href="{{ public_asset('/assets/frontend/css/now-ui-kit.css') }}" rel="stylesheet"/> <link href="{{ public_asset('/assets/frontend/css/now-ui-kit.css') }}" rel="stylesheet"/>
<link href="{{ public_asset('/assets/installer/css/vendor.css') }}" rel="stylesheet"/> <link href="{{ public_asset('/assets/installer/css/vendor.css') }}" rel="stylesheet"/>
<link href="{{ public_asset('/assets/frontend/css/styles.css') }}" rel="stylesheet"/> <link href="{{ public_asset('/assets/frontend/css/styles.css') }}" rel="stylesheet"/>
<link rel="stylesheet" <link rel="stylesheet"
href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css"> href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css">
<style> <style>
.table tr:first-child td { border-top: 0px; } .table tr:first-child td {
@yield('css') border-top: 0px;
</style> }
@yield('css')
</style>
</head> </head>
<body> <body>
<!-- Navbar --> <!-- Navbar -->
<nav class="navbar navbar-toggleable-md" style="background: #067ec1;"> <nav class="navbar navbar-toggleable-md" style="background: #067ec1;">
<div class="container" style="width: 85%!important;"> <div class="container" style="width: 85%!important;">
<div class="navbar-translate"> <div class="navbar-translate">
<p class="navbar-brand text-white" data-placement="bottom" target="_blank"> <p class="navbar-brand text-white" data-placement="bottom" target="_blank">
<a href="{{ url('/') }}"> <a href="{{ url('/') }}">
<img src="{{ public_asset('/assets/img/logo_blue_bg.svg') }}" width="135px" style=""/> <img src="{{ public_asset('/assets/img/logo_blue_bg.svg') }}" width="135px" style=""/>
</a> </a>
</p> </p>
</div>
<div class="justify-content-center" id="navigation" style="margin-left: 50px; color: white; font-size: 20px;">
@yield('title')
</div>
</div> </div>
<div class="justify-content-center" id="navigation" style="margin-left: 50px; color: white; font-size: 20px;">
@yield('title')
</div>
</div>
</nav> </nav>
<!-- End Navbar --> <!-- End Navbar -->
{{--<div class="clearfix" style="height: 25px;"></div>--}} {{--<div class="clearfix" style="height: 25px;"></div>--}}
<div class="wrapper"> <div class="wrapper">
<div class="clear"></div> <div class="clear"></div>
<div class="container" style="width: 50%"> <div class="container" style="width: 50%">
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
@include('installer::flash.message') @include('installer::flash.message')
@yield('content') @yield('content')
</div> </div>
</div>
</div> </div>
<div class="clearfix" style="height: 200px;"></div> </div>
<div class="clearfix" style="height: 200px;"></div>
</div> </div>
{{--<script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js"></script>--}} {{--<script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js"></script>--}}
@@ -73,17 +75,17 @@
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
<script> <script>
hljs.configure({languages: ['sh']}); hljs.configure({languages: ['sh']});
$(document).ready(function () { $(document).ready(function () {
$(".select2").select2(); $(".select2").select2();
$('pre code').each(function (i, block) { $('pre code').each(function (i, block) {
hljs.fixMarkup(block); hljs.fixMarkup(block);
hljs.highlightBlock(block); hljs.highlightBlock(block);
});
}); });
});
</script> </script>
@yield('scripts') @yield('scripts')

View File

@@ -1,6 +1,6 @@
@if($errors->has($field)) @if($errors->has($field))
<p class="text-danger" style="margin-top: 10px;">{{ $errors->first($field) }}</p> <p class="text-danger" style="margin-top: 10px;">{{ $errors->first($field) }}</p>
{{--<div class="alert alert-danger" role="alert" style="margin-top: 10px;"> {{--<div class="alert alert-danger" role="alert" style="margin-top: 10px;">
{{ $errors->first($field) }} {{ $errors->first($field) }}
</div>--}} </div>--}}
@endif @endif

View File

@@ -1,11 +1,11 @@
@foreach (session('flash_notification', collect())->toArray() as $message) @foreach (session('flash_notification', collect())->toArray() as $message)
<div class="alert alert-danger" role="alert"> <div class="alert alert-danger" role="alert">
<div class="container"> <div class="container">
<div class="alert-icon"> <div class="alert-icon">
<i class="now-ui-icons ui-2_like"></i> <i class="now-ui-icons ui-2_like"></i>
</div> </div>
{{ $message['message'] }} {{ $message['message'] }}
</div> </div>
</div> </div>
@endforeach @endforeach
{{ session()->forget('flash_notification') }} {{ session()->forget('flash_notification') }}

View File

@@ -2,11 +2,11 @@
@section('title', 'Update phpVMS') @section('title', 'Update phpVMS')
@section('content') @section('content')
<h2>phpvms updater</h2> <h2>phpvms updater</h2>
<p>Press continue to check if there are any updates available.</p> <p>Press continue to check if there are any updates available.</p>
{{ Form::open(['route' => 'update.step1', 'method' => 'post']) }} {{ Form::open(['route' => 'update.step1', 'method' => 'post']) }}
<p style="text-align: right"> <p style="text-align: right">
{{ Form::submit('Start >>', ['class' => 'btn btn-success']) }} {{ Form::submit('Start >>', ['class' => 'btn btn-success']) }}
</p> </p>
{{ Form::close() }} {{ Form::close() }}
@endsection @endsection

View File

@@ -2,12 +2,12 @@
@section('title', 'Update phpVMS') @section('title', 'Update phpVMS')
@section('content') @section('content')
<h2>phpvms updater</h2> <h2>phpvms updater</h2>
<p>It seems like you're up to date!</p> <p>It seems like you're up to date!</p>
{{ Form::open(['route' => 'update.complete', 'method' => 'GET']) }} {{ Form::open(['route' => 'update.complete', 'method' => 'GET']) }}
<p style="text-align: right"> <p style="text-align: right">
{{ Form::submit('Complete >>', ['class' => 'btn btn-success']) }} {{ Form::submit('Complete >>', ['class' => 'btn btn-success']) }}
</p> </p>
{{ Form::close() }} {{ Form::close() }}
@endsection @endsection

View File

@@ -2,11 +2,11 @@
@section('title', 'Update phpVMS') @section('title', 'Update phpVMS')
@section('content') @section('content')
<h2>phpvms updater</h2> <h2>phpvms updater</h2>
<p>Click run to complete the update!.</p> <p>Click run to complete the update!.</p>
{{ Form::open(['route' => 'update.run_migrations', 'method' => 'post']) }} {{ Form::open(['route' => 'update.run_migrations', 'method' => 'post']) }}
<p style="text-align: right"> <p style="text-align: right">
{{ Form::submit('Run >>', ['class' => 'btn btn-success']) }} {{ Form::submit('Run >>', ['class' => 'btn btn-success']) }}
</p> </p>
{{ Form::close() }} {{ Form::close() }}
@endsection @endsection

View File

@@ -1,18 +1,18 @@
@extends('installer::app') @extends('installer::app')
@section('title', 'Update Completed') @section('title', 'Update Completed')
@section('content') @section('content')
<div style="align-content: center;"> <div style="align-content: center;">
{{ Form::open(['route' => 'update.complete', 'method' => 'GET']) }} {{ Form::open(['route' => 'update.complete', 'method' => 'GET']) }}
<pre class="lang-sh"> <pre class="lang-sh">
<code class="lang-sh"> <code class="lang-sh">
{{ $console_output }} {{ $console_output }}
</code> </code>
</pre> </pre>
<p style="text-align: right"> <p style="text-align: right">
{{ Form::submit('Complete >>', ['class' => 'btn btn-success']) }} {{ Form::submit('Complete >>', ['class' => 'btn btn-success']) }}
</p> </p>
{{ Form::close() }} {{ Form::close() }}
</div> </div>
@endsection @endsection

View File

@@ -2,12 +2,12 @@
@section('title', 'Update Completed') @section('title', 'Update Completed')
@section('content') @section('content')
<h2>phpvms updater</h2> <h2>phpvms updater</h2>
<p>Update completed!.</p> <p>Update completed!.</p>
{{ Form::open(['route' => 'update.complete', 'method' => 'GET']) }} {{ Form::open(['route' => 'update.complete', 'method' => 'GET']) }}
<p style="text-align: right"> <p style="text-align: right">
{{ Form::submit('Finish >>', ['class' => 'btn btn-success']) }} {{ Form::submit('Finish >>', ['class' => 'btn btn-success']) }}
</p> </p>
{{ Form::close() }} {{ Form::close() }}
@endsection @endsection

View File

@@ -1,17 +1,17 @@
@extends('admin.app') @extends('admin.app')
@section('title', 'Add Aircraft') @section('title', 'Add Aircraft')
@section('content') @section('content')
<div class="card border-blue-bottom"> <div class="card border-blue-bottom">
<div class="content"> <div class="content">
@if(!filled($subfleets)) @if(!filled($subfleets))
<p class="text-center"> <p class="text-center">
You must add a subfleet before you can add an aircraft! You must add a subfleet before you can add an aircraft!
</p> </p>
@else @else
{{ Form::open(['route' => 'admin.aircraft.store']) }} {{ Form::open(['route' => 'admin.aircraft.store']) }}
@include('admin.aircraft.fields') @include('admin.aircraft.fields')
{{ Form::close() }} {{ Form::close() }}
@endif @endif
</div>
</div> </div>
</div>
@endsection @endsection

View File

@@ -1,25 +1,25 @@
@extends('admin.app') @extends('admin.app')
@section('title', "Edit \"$aircraft->name\"") @section('title', "Edit \"$aircraft->name\"")
@section('content') @section('content')
<div class="card border-blue-bottom"> <div class="card border-blue-bottom">
<div class="content"> <div class="content">
{{ Form::model($aircraft, ['route' => ['admin.aircraft.update', $aircraft->id], 'method' => 'patch']) }} {{ Form::model($aircraft, ['route' => ['admin.aircraft.update', $aircraft->id], 'method' => 'patch']) }}
@include('admin.aircraft.fields') @include('admin.aircraft.fields')
{{ Form::close() }} {{ Form::close() }}
</div> </div>
</div> </div>
<div class="card border-blue-bottom"> <div class="card border-blue-bottom">
<div class="content"> <div class="content">
@include('admin.aircraft.expenses') @include('admin.aircraft.expenses')
</div> </div>
</div> </div>
<div class="card border-blue-bottom"> <div class="card border-blue-bottom">
<div class="content"> <div class="content">
@include('admin.common.file_upload', ['model' => $aircraft]) @include('admin.common.file_upload', ['model' => $aircraft])
</div> </div>
</div> </div>
@endsection @endsection
@include('admin.aircraft.script') @include('admin.aircraft.script')

View File

@@ -1,78 +1,78 @@
<div id="expenses-wrapper" class="col-12"> <div id="expenses-wrapper" class="col-12">
<div class="header"> <div class="header">
<h3>expenses</h3> <h3>expenses</h3>
@component('admin.components.info') @component('admin.components.info')
These expenses are only applied to this aircraft. These expenses are only applied to this aircraft.
@endcomponent @endcomponent
</div> </div>
@if(count($aircraft->expenses) === 0) @if(count($aircraft->expenses) === 0)
@include('admin.common.none_added', ['type' => 'expenses']) @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&nbsp;<span class="small">{{ currency(config('phpvms.currency')) }}</span></th>
<th>Type</th>
<th></th>
</thead>
@endif @endif
<table class="table table-responsive" id="expenses"> <tbody>
@if(count($aircraft->expenses) > 0) @foreach($aircraft->expenses as $expense)
<thead> <tr>
<th>Name</th> <td>
<th>Cost&nbsp;<span class="small">{{ currency(config('phpvms.currency')) }}</span></th> <p>
<th>Type</th> <a class="text" href="#" data-pk="{{ $expense->id }}"
<th></th> data-name="name">{{ $expense->name }}</a>
</thead> </p>
@endif </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> <p class="text-danger">{{ $errors->first('name') }}</p>
@foreach($aircraft->expenses as $expense) <p class="text-danger">{{ $errors->first('amount') }}</p>
<tr> </div>
<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>
</div> </div>
</div>
</div> </div>

View File

@@ -1,42 +1,42 @@
<div class="row"> <div class="row">
<div class="col-sm-12"> <div class="col-sm-12">
<div class="form-container"> <div class="form-container">
<h6><i class="fas fa-clock"></i> <h6><i class="fas fa-clock"></i>
&nbsp;Subfleet and Status &nbsp;Subfleet and Status
</h6> </h6>
<div class="form-container-body row"> <div class="form-container-body row">
<div class="form-group col-sm-4"> <div class="form-group col-sm-4">
{{ Form::label('subfleet_id', 'Subfleet:') }} {{ Form::label('subfleet_id', 'Subfleet:') }}
{{ Form::select('subfleet_id', $subfleets, $subfleet_id ?? null, [ {{ Form::select('subfleet_id', $subfleets, $subfleet_id ?? null, [
'class' => 'form-control select2', 'class' => 'form-control select2',
'placeholder' => 'Select Subfleet' 'placeholder' => 'Select Subfleet'
]) ])
}} }}
<p class="text-danger">{{ $errors->first('subfleet_id') }}</p> <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 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> </div>
<div class="row"> <div class="row">
<div class="col-12"> <div class="col-12">
<div class="form-container"> <div class="form-container">
<h6> <h6>
<span style="float:right"> <span style="float:right">
View list of View list of
<a href="https://en.wikipedia.org/wiki/List_of_ICAO_aircraft_type_designators" <a href="https://en.wikipedia.org/wiki/List_of_ICAO_aircraft_type_designators"
@@ -44,47 +44,47 @@
IATA and ICAO Type Designators IATA and ICAO Type Designators
</a> </a>
</span> </span>
<i class="fas fa-plane"></i> <i class="fas fa-plane"></i>
&nbsp;Aircraft Information &nbsp;Aircraft Information
</h6> </h6>
<div class="form-container-body"> <div class="form-container-body">
<div class="row"> <div class="row">
<div class="form-group col-sm-12"> <div class="form-group col-sm-12">
{{ Form::label('name', 'Name:') }}&nbsp;<span class="required">*</span> {{ Form::label('name', 'Name:') }}&nbsp;<span class="required">*</span>
{{ Form::text('name', null, ['class' => 'form-control']) }} {{ Form::text('name', null, ['class' => 'form-control']) }}
<p class="text-danger">{{ $errors->first('name') }}</p> <p class="text-danger">{{ $errors->first('name') }}</p>
</div> </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 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> </div>
<div class="row"> <div class="row">
<!-- Submit Field --> <!-- Submit Field -->
<div class="form-group col-sm-12"> <div class="form-group col-sm-12">
<div class="pull-right"> <div class="pull-right">
{{ Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-success']) }} {{ Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-success']) }}
<a href="{{ route('admin.aircraft.index') }}" class="btn btn-default">Cancel</a> <a href="{{ route('admin.aircraft.index') }}" class="btn btn-default">Cancel</a>
</div>
</div> </div>
</div>
</div> </div>

View File

@@ -1,5 +1,5 @@
@extends('admin.app') @extends('admin.app')
@section('title', 'Import Aircraft') @section('title', 'Import Aircraft')
@section('content') @section('content')
@include('admin.common.import', ['route' => 'admin.aircraft.import']) @include('admin.common.import', ['route' => 'admin.aircraft.import'])
@endsection @endsection

View File

@@ -2,18 +2,19 @@
@section('title', 'Aircraft') @section('title', 'Aircraft')
@section('actions') @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.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="{{ 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="{{ url('/admin/subfleets') }}"><i class="ti-files"></i>Subfleets</a></li>--}}
<li><a href="{{ route('admin.aircraft.create') }}?subfleet={{$subfleet_id}}"> <li><a href="{{ route('admin.aircraft.create') }}?subfleet={{$subfleet_id}}">
<i class="ti-plus"></i>New Aircraft</a></li> <i class="ti-plus"></i>New Aircraft</a>
</li>
@endsection @endsection
@section('content') @section('content')
<div class="card border-blue-bottom"> <div class="card border-blue-bottom">
<div class="content"> <div class="content">
@include('admin.aircraft.table') @include('admin.aircraft.table')
</div>
</div> </div>
</div>
@endsection @endsection

View File

@@ -1,70 +1,70 @@
@section('scripts') @section('scripts')
<script> <script>
function setEditable() { function setEditable() {
const token = $('meta[name="csrf-token"]').attr('content'); const token = $('meta[name="csrf-token"]').attr('content');
const api_key = $('meta[name="api-key"]').attr('content'); const api_key = $('meta[name="api-key"]').attr('content');
@if(isset($aircraft)) @if(isset($aircraft))
$('#expenses a.text').editable({ $('#expenses a.text').editable({
emptytext: '0', emptytext: '0',
url: '{{ url('/admin/aircraft/'.$aircraft->id.'/expenses') }}', url: '{{ url('/admin/aircraft/'.$aircraft->id.'/expenses') }}',
title: 'Enter override value', title: 'Enter override value',
ajaxOptions: { ajaxOptions: {
type: 'post', type: 'post',
headers: { headers: {
'x-api-key': api_key, 'x-api-key': api_key,
'X-CSRF-TOKEN': token, 'X-CSRF-TOKEN': token,
} }
}, },
params: function (params) { params: function (params) {
return { return {
_method: 'put', _method: 'put',
expense_id: params.pk, expense_id: params.pk,
name: params.name, name: params.name,
value: params.value value: params.value
} }
} }
}); });
$('#expenses a.dropdown').editable({ $('#expenses a.dropdown').editable({
type: 'select', type: 'select',
emptytext: '0', emptytext: '0',
source: {!! json_encode(list_to_editable(\App\Models\Enums\ExpenseType::select())) !!}, source: {!! json_encode(list_to_editable(\App\Models\Enums\ExpenseType::select())) !!},
url: '{{ url('/admin/aircraft/'.$aircraft->id.'/expenses') }}', url: '{{ url('/admin/aircraft/'.$aircraft->id.'/expenses') }}',
title: 'Enter override value', title: 'Enter override value',
ajaxOptions: { ajaxOptions: {
type: 'post', type: 'post',
headers: { headers: {
'x-api-key': api_key, 'x-api-key': api_key,
'X-CSRF-TOKEN': token, 'X-CSRF-TOKEN': token,
} }
}, },
params: function (params) { params: function (params) {
return { return {
_method: 'put', _method: 'put',
expense_id: params.pk, expense_id: params.pk,
name: params.name, name: params.name,
value: params.value 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(); event.preventDefault();
console.log(event); console.log(event);
$.pjax.submit(event, '#expenses-wrapper', {push: false}); $.pjax.submit(event, '#expenses-wrapper', {push: false});
}); });
$(document).on('pjax:complete', function () { $(document).on('pjax:complete', function () {
initPlugins(); initPlugins();
setEditable(); setEditable();
});
}); });
}); </script>
</script>
@endsection @endsection

View File

@@ -1,43 +1,44 @@
@extends('admin.app') @extends('admin.app')
@section('content') @section('content')
<section class="content-header"> <section class="content-header">
<h1 class="pull-left">{{ $aircraft->name }}</h1> <h1 class="pull-left">{{ $aircraft->name }}</h1>
<h1 class="pull-right"> <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> </h1>
</section> </section>
<section class="content"> <section class="content">
<div class="clearfix"></div> <div class="clearfix"></div>
<div class="row"> <div class="row">
@include('admin.aircraft.show_fields') @include('admin.aircraft.show_fields')
</div> </div>
</section> </section>
@endsection @endsection
@section('scripts') @section('scripts')
<script> <script>
$(document).ready(function() { $(document).ready(function () {
$(".ac-fare-dropdown").select2(); $(".ac-fare-dropdown").select2();
$('#aircraft_fares a').editable({ $('#aircraft_fares a').editable({
type: 'text', type: 'text',
mode: 'inline', mode: 'inline',
emptytext: 'default', emptytext: 'default',
url: '/admin/aircraft/{{ $aircraft->id }}/fares', url: '/admin/aircraft/{{ $aircraft->id }}/fares',
title: 'Enter override value', title: 'Enter override value',
ajaxOptions: { 'type': 'put'}, ajaxOptions: {'type': 'put'},
params: function(params) { params: function (params) {
return { return {
fare_id: params.pk, fare_id: params.pk,
name: params.name, name: params.name,
value: params.value value: params.value
} }
} }
}); });
$(document).on('submit', 'form.rm_fare', function(event) { $(document).on('submit', 'form.rm_fare', function (event) {
event.preventDefault(); event.preventDefault();
$.pjax.submit(event, '#aircraft_fares_wrapper', {push: false}); $.pjax.submit(event, '#aircraft_fares_wrapper', {push: false});
});
}); });
}); </script>
</script>
@endsection @endsection

View File

@@ -1,47 +1,47 @@
<!-- Icao Field --> <!-- Icao Field -->
<div class="form-group col-sm-6"> <div class="form-group col-sm-6">
<div class="box box-solid"> <div class="box box-solid">
<div class="box-header with-border"> <div class="box-header with-border">
<h3 class="box-title">{{ Form::label('airport_id', 'Location') }}</h3> <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>
<div class="box-body">
<p class="lead">
@if($aircraft->airport)
{{ $aircraft->airport->icao }}</p>
@endif
</div>
</div>
</div> </div>
<!-- Name Field --> <!-- Name Field -->
<div class="form-group col-sm-6"> <div class="form-group col-sm-6">
<div class="box box-solid"> <div class="box box-solid">
<div class="box-header with-border"> <div class="box-header with-border">
{{--<i class="fa fa-text-width"></i>--}} {{--<i class="fa fa-text-width"></i>--}}
<h3 class="box-title">{{ Form::label('name', 'Name') }}</h3> <h3 class="box-title">{{ Form::label('name', 'Name') }}</h3>
</div>
<div class="box-body"><p class="lead">{{ $aircraft->name }}</p></div>
</div> </div>
<div class="box-body"><p class="lead">{{ $aircraft->name }}</p></div>
</div>
</div> </div>
<!-- Registration Field --> <!-- Registration Field -->
<div class="form-group col-sm-6"> <div class="form-group col-sm-6">
<div class="box box-solid"> <div class="box box-solid">
<div class="box-header with-border"> <div class="box-header with-border">
{{--<i class="fa fa-text-width"></i>--}} {{--<i class="fa fa-text-width"></i>--}}
<h3 class="box-title">{{ Form::label('registration', 'Registration') }}</h3> <h3 class="box-title">{{ Form::label('registration', 'Registration') }}</h3>
</div>
<div class="box-body"><p class="lead">{{ $aircraft->registration }}</p></div>
</div> </div>
<div class="box-body"><p class="lead">{{ $aircraft->registration }}</p></div>
</div>
</div> </div>
<!-- Active Field --> <!-- Active Field -->
<div class="form-group col-sm-6"> <div class="form-group col-sm-6">
<div class="box box-solid"> <div class="box box-solid">
<div class="box-header with-border"> <div class="box-header with-border">
{{--<i class="fa fa-text-width"></i>--}} {{--<i class="fa fa-text-width"></i>--}}
<h3 class="box-title">{{ Form::label('active', 'Active:') }}</h3> <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>
<div class="box-body"><p class="lead">@if ($aircraft->active == '1') yes @else no @endif</p></div>
</div>
</div> </div>

View File

@@ -1,49 +1,49 @@
<table class="table table-hover table-responsive" id="aircrafts-table"> <table class="table table-hover table-responsive" id="aircrafts-table">
<thead> <thead>
<th>Name</th> <th>Name</th>
<th style="text-align: center;">Registration</th> <th style="text-align: center;">Registration</th>
<th>Subfleet</th> <th>Subfleet</th>
<th style="text-align: center;">Location</th> <th style="text-align: center;">Location</th>
<th style="text-align: center;">Hours</th> <th style="text-align: center;">Hours</th>
<th style="text-align: center;">Active</th> <th style="text-align: center;">Active</th>
<th style="text-align: right;"></th> <th style="text-align: right;"></th>
</thead> </thead>
<tbody> <tbody>
@foreach($aircraft as $ac) @foreach($aircraft as $ac)
<tr> <tr>
<td><a href="{{ route('admin.aircraft.edit', [$ac->id]) }}">{{ $ac->name }}</a></td> <td><a href="{{ route('admin.aircraft.edit', [$ac->id]) }}">{{ $ac->name }}</a></td>
<td style="text-align: center;">{{ $ac->registration }}</td> <td style="text-align: center;">{{ $ac->registration }}</td>
<td> <td>
@if($ac->subfleet_id && $ac->subfleet) @if($ac->subfleet_id && $ac->subfleet)
<a href="{{ route('admin.subfleets.edit', [$ac->subfleet_id]) }}"> <a href="{{ route('admin.subfleets.edit', [$ac->subfleet_id]) }}">
{{ $ac->subfleet->name }} {{ $ac->subfleet->name }}
</a> </a>
@else @else
- -
@endif @endif
</td> </td>
<td style="text-align: center;">{{ $ac->airport_id }}</td> <td style="text-align: center;">{{ $ac->airport_id }}</td>
<td style="text-align: center;"> <td style="text-align: center;">
{{ Utils::minutesToTimeString($ac->flight_hours) }} {{ Utils::minutesToTimeString($ac->flight_hours) }}
</td> </td>
<td style="text-align: center;"> <td style="text-align: center;">
@if($ac->status == \App\Models\Enums\AircraftStatus::ACTIVE) @if($ac->status == \App\Models\Enums\AircraftStatus::ACTIVE)
<span class="label label-success">{{ \App\Models\Enums\AircraftStatus::label($ac->status) }}</span> <span class="label label-success">{{ \App\Models\Enums\AircraftStatus::label($ac->status) }}</span>
@else @else
<span class="label label-default"> <span class="label label-default">
{{ \App\Models\Enums\AircraftStatus::label($ac->status) }} {{ \App\Models\Enums\AircraftStatus::label($ac->status) }}
</span> </span>
@endif @endif
</td> </td>
<td style="width: 10%; text-align: right;"> <td style="width: 10%; text-align: right;">
{{ Form::open(['route' => ['admin.aircraft.destroy', $ac->id], 'method' => 'delete']) }} {{ 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'> <a href="{{ route('admin.aircraft.edit', [$ac->id]) }}" class='btn btn-sm btn-success btn-icon'>
<i class="fas fa-pencil-alt"></i> <i class="fas fa-pencil-alt"></i>
</a> </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::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() }} {{ Form::close() }}
</td> </td>
</tr> </tr>
@endforeach @endforeach
</tbody> </tbody>
</table> </table>

View File

@@ -1,11 +1,11 @@
@extends('admin.app') @extends('admin.app')
@section('title', 'Add Airline') @section('title', 'Add Airline')
@section('content') @section('content')
<div class="card border-blue-bottom"> <div class="card border-blue-bottom">
<div class="content"> <div class="content">
{{ Form::open(['route' => 'admin.airlines.store']) }} {{ Form::open(['route' => 'admin.airlines.store']) }}
@include('admin.airlines.fields') @include('admin.airlines.fields')
{{ Form::close() }} {{ Form::close() }}
</div>
</div> </div>
</div>
@endsection @endsection

View File

@@ -1,17 +1,17 @@
@extends('admin.app') @extends('admin.app')
@section('title', "Edit \"$airline->name\"") @section('title', "Edit \"$airline->name\"")
@section('content') @section('content')
<div class="card border-blue-bottom"> <div class="card border-blue-bottom">
<div class="content"> <div class="content">
{{ Form::model($airline, ['route' => ['admin.airlines.update', $airline->id], 'method' => 'patch']) }} {{ Form::model($airline, ['route' => ['admin.airlines.update', $airline->id], 'method' => 'patch']) }}
@include('admin.airlines.fields') @include('admin.airlines.fields')
{{ Form::close() }} {{ Form::close() }}
</div> </div>
</div> </div>
<div class="card border-blue-bottom"> <div class="card border-blue-bottom">
<div class="content"> <div class="content">
@include('admin.common.file_upload', ['model' => $airline]) @include('admin.common.file_upload', ['model' => $airline])
</div> </div>
</div> </div>
@endsection @endsection

View File

@@ -1,55 +1,55 @@
<div class="row"> <div class="row">
<!-- Code Field --> <!-- Code Field -->
<div class="form-group col-sm-6"> <div class="form-group col-sm-6">
{{ Form::label('icao', 'Code:') }}&nbsp;<span class="required">*</span> {{ Form::label('icao', 'Code:') }}&nbsp;<span class="required">*</span>
{{ Form::text('icao', null, ['class' => 'form-control']) }} {{ Form::text('icao', null, ['class' => 'form-control']) }}
<p class="text-danger">{{ $errors->first('icao') }}</p> <p class="text-danger">{{ $errors->first('icao') }}</p>
</div> </div>
<!-- Name Field --> <!-- Name Field -->
<div class="form-group col-sm-6"> <div class="form-group col-sm-6">
{{ Form::label('name', 'Name:') }}&nbsp;<span class="required">*</span> {{ Form::label('name', 'Name:') }}&nbsp;<span class="required">*</span>
{{ Form::text('name', null, ['class' => 'form-control']) }} {{ Form::text('name', null, ['class' => 'form-control']) }}
<p class="text-danger">{{ $errors->first('name') }}</p> <p class="text-danger">{{ $errors->first('name') }}</p>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="form-group col-sm-6"> <div class="form-group col-sm-6">
{{ Form::label('iata', 'IATA:') }} {{ Form::label('iata', 'IATA:') }}
{{ Form::text('iata', null, ['class' => 'form-control']) }} {{ Form::text('iata', null, ['class' => 'form-control']) }}
<p class="text-danger">{{ $errors->first('iata') }}</p> <p class="text-danger">{{ $errors->first('iata') }}</p>
</div> </div>
<div class="form-group col-sm-6"> <div class="form-group col-sm-6">
{{ Form::label('logo', 'Logo URL:') }} {{ Form::label('logo', 'Logo URL:') }}
{{ Form::text('logo', null, ['class' => 'form-control']) }} {{ Form::text('logo', null, ['class' => 'form-control']) }}
<p class="text-danger">{{ $errors->first('logo') }}</p> <p class="text-danger">{{ $errors->first('logo') }}</p>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="form-group col-sm-6"> <div class="form-group col-sm-6">
{{ Form::label('country', 'Country:') }} <br/> {{ Form::label('country', 'Country:') }} <br/>
{{ Form::select('country', $countries, null, ['class' => 'form-control select2' ]) }} {{ Form::select('country', $countries, null, ['class' => 'form-control select2' ]) }}
<p class="text-danger">{{ $errors->first('country') }}</p> <p class="text-danger">{{ $errors->first('country') }}</p>
</div> </div>
<div class="form-group col-sm-6"> <div class="form-group col-sm-6">
{{ Form::label('active', 'Active:') }} {{ Form::label('active', 'Active:') }}
<br /> <br/>
<label class="checkbox-inline"> <label class="checkbox-inline">
{{ Form::hidden('active', 0, false) }} {{ Form::hidden('active', 0, false) }}
{{ Form::checkbox('active', 1, null) }} {{ Form::checkbox('active', 1, null) }}
</label> </label>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<!-- Submit Field --> <!-- Submit Field -->
<div class="form-group col-sm-12"> <div class="form-group col-sm-12">
<div class="pull-right"> <div class="pull-right">
{{ Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-success']) }} {{ Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-success']) }}
<a href="{{ route('admin.airlines.index') }}" class="btn btn-default">Cancel</a> <a href="{{ route('admin.airlines.index') }}" class="btn btn-default">Cancel</a>
</div>
</div> </div>
</div>
</div> </div>

View File

@@ -2,18 +2,18 @@
@section('title', 'Airlines') @section('title', 'Airlines')
@section('actions') @section('actions')
<li> <li>
<a href="{{ route('admin.airlines.create') }}"> <a href="{{ route('admin.airlines.create') }}">
<i class="ti-plus"></i> <i class="ti-plus"></i>
Add New</a> Add New</a>
</li> </li>
@endsection @endsection
@section('content') @section('content')
<div class="card border-blue-bottom"> <div class="card border-blue-bottom">
<div class="content"> <div class="content">
@include('admin.airlines.table') @include('admin.airlines.table')
</div>
</div> </div>
</div>
@endsection @endsection

View File

@@ -1,19 +1,19 @@
@extends('admin.app') @extends('admin.app')
@section('content') @section('content')
<section class="content-header"> <section class="content-header">
<h1> <h1>
Airlines Airlines
</h1> </h1>
</section> </section>
<div class="content"> <div class="content">
<div class="box box-primary"> <div class="box box-primary">
<div class="box-body"> <div class="box-body">
<div class="row" style="padding-left: 20px"> <div class="row" style="padding-left: 20px">
@include('admin.airlines.show_fields') @include('admin.airlines.show_fields')
<a href="{{ route('admin.airlines.index') }}" class="btn btn-default">Back</a> <a href="{{ route('admin.airlines.index') }}" class="btn btn-default">Back</a>
</div>
</div>
</div> </div>
</div>
</div> </div>
</div>
@endsection @endsection

View File

@@ -1,40 +1,40 @@
<!-- Code Field --> <!-- Code Field -->
<div class="form-group"> <div class="form-group">
{{ Form::label('icao', 'ICAO:') }} {{ Form::label('icao', 'ICAO:') }}
<p>{{ $airlines->icao }}</p> <p>{{ $airlines->icao }}</p>
</div> </div>
<div class="form-group"> <div class="form-group">
{{ Form::label('iata', 'IATA:') }} {{ Form::label('iata', 'IATA:') }}
<p>{{ $airlines->iata }}</p> <p>{{ $airlines->iata }}</p>
</div> </div>
<!-- Name Field --> <!-- Name Field -->
<div class="form-group"> <div class="form-group">
{{ Form::label('name', 'Name:') }} {{ Form::label('name', 'Name:') }}
<p>{{ $airlines->name }}</p> <p>{{ $airlines->name }}</p>
</div> </div>
<div class="form-group"> <div class="form-group">
{{ Form::label('logo', 'Logo URL:') }} {{ Form::label('logo', 'Logo URL:') }}
<p>{{ $airlines->logo }}</p> <p>{{ $airlines->logo }}</p>
</div> </div>
<!-- Active Field --> <!-- Active Field -->
<div class="form-group"> <div class="form-group">
{{ Form::label('active', 'Active:') }} {{ Form::label('active', 'Active:') }}
<p>{{ $airlines->active }}</p> <p>{{ $airlines->active }}</p>
</div> </div>
<!-- Created At Field --> <!-- Created At Field -->
<div class="form-group"> <div class="form-group">
{{ Form::label('created_at', 'Created At:') }} {{ Form::label('created_at', 'Created At:') }}
<p>{{ show_datetime($airlines->created_at) }}</p> <p>{{ show_datetime($airlines->created_at) }}</p>
</div> </div>
<!-- Updated At Field --> <!-- Updated At Field -->
<div class="form-group"> <div class="form-group">
{{ Form::label('updated_at', 'Updated At:') }} {{ Form::label('updated_at', 'Updated At:') }}
<p>{{ show_datetime($airlines->updated_at) }}</p> <p>{{ show_datetime($airlines->updated_at) }}</p>
</div> </div>

View File

@@ -1,36 +1,36 @@
<table class="table table-hover table-responsive" id="airlines-table"> <table class="table table-hover table-responsive" id="airlines-table">
<thead> <thead>
<th>Code</th> <th>Code</th>
<th>Name</th> <th>Name</th>
<th class="text-center">Active</th> <th class="text-center">Active</th>
<th></th> <th></th>
</thead> </thead>
<tbody> <tbody>
@foreach($airlines as $al) @foreach($airlines as $al)
<tr> <tr>
<td nowrap="true"> <td nowrap="true">
@if(filled($al->country)) @if(filled($al->country))
<span class="flag-icon flag-icon-{{ $al->country }}"></span> <span class="flag-icon flag-icon-{{ $al->country }}"></span>
&nbsp; &nbsp;
@endif @endif
<a href="{{ route('admin.airlines.edit', [$al->id]) }}">{{ $al->iata }}/{{ $al->icao }}</a> <a href="{{ route('admin.airlines.edit', [$al->id]) }}">{{ $al->iata }}/{{ $al->icao }}</a>
</td> </td>
<td>{{ $al->name }}</td> <td>{{ $al->name }}</td>
<td class="text-center"> <td class="text-center">
@if($al->active == 1) @if($al->active == 1)
<span class="label label-success">Active</span> <span class="label label-success">Active</span>
@else @else
<span class="label label-default">Inactive</span> <span class="label label-default">Inactive</span>
@endif @endif
</td> </td>
<td class="text-right"> <td class="text-right">
{{ Form::open(['route' => ['admin.airlines.destroy', $al->id], 'method' => 'delete']) }} {{ Form::open(['route' => ['admin.airlines.destroy', $al->id], 'method' => 'delete']) }}
<a href="{{ route('admin.airlines.edit', [$al->id]) }}" <a href="{{ route('admin.airlines.edit', [$al->id]) }}"
class='btn btn-sm btn-success btn-icon'><i class="fas fa-pencil-alt"></i></a> 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::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() }} {{ Form::close() }}
</td> </td>
</tr> </tr>
@endforeach @endforeach
</tbody> </tbody>
</table> </table>

View File

@@ -2,12 +2,12 @@
@section('title', 'Add Airport') @section('title', 'Add Airport')
@section('content') @section('content')
<div class="card border-blue-bottom"> <div class="card border-blue-bottom">
<div class="content"> <div class="content">
{{ Form::open(['route' => 'admin.airports.store', 'id' => 'airportForm']) }} {{ Form::open(['route' => 'admin.airports.store', 'id' => 'airportForm']) }}
@include('admin.airports.fields') @include('admin.airports.fields')
{{ Form::close() }} {{ Form::close() }}
</div> </div>
</div> </div>
@endsection @endsection
@include('admin.airports.script') @include('admin.airports.script')

View File

@@ -1,28 +1,28 @@
@extends('admin.app') @extends('admin.app')
@section('title', "Edit \"$airport->name\"") @section('title', "Edit \"$airport->name\"")
@section('content') @section('content')
<div class="card border-blue-bottom"> <div class="card border-blue-bottom">
<div class="content"> <div class="content">
{{ Form::model($airport, [ {{ Form::model($airport, [
'route' => ['admin.airports.update', $airport->id], 'route' => ['admin.airports.update', $airport->id],
'method' => 'patch', 'method' => 'patch',
'id' => 'airportForm']) 'id' => 'airportForm'])
}} }}
@include('admin.airports.fields') @include('admin.airports.fields')
{{ Form::close() }} {{ Form::close() }}
</div> </div>
</div> </div>
<div class="card border-blue-bottom"> <div class="card border-blue-bottom">
<div class="content"> <div class="content">
@include('admin.airports.expenses') @include('admin.airports.expenses')
</div> </div>
</div> </div>
<div class="card border-blue-bottom"> <div class="card border-blue-bottom">
<div class="content"> <div class="content">
@include('admin.common.file_upload', ['model' => $airport]) @include('admin.common.file_upload', ['model' => $airport])
</div> </div>
</div> </div>
@endsection @endsection
@include('admin.airports.script') @include('admin.airports.script')

View File

@@ -1,75 +1,75 @@
<div id="airport-expenses-wrapper" class="col-12"> <div id="airport-expenses-wrapper" class="col-12">
<div class="header"> <div class="header">
<h3>expenses</h3> <h3>expenses</h3>
@component('admin.components.info') @component('admin.components.info')
These expenses are only applied to this airport. These expenses are only applied to this airport.
@endcomponent @endcomponent
</div> </div>
<br/> <br/>
<table class="table table-responsive" id="airport-expenses"> <table class="table table-responsive" id="airport-expenses">
@if(count($airport->expenses)) @if(count($airport->expenses))
<thead> <thead>
<th>Name</th> <th>Name</th>
<th>Cost&nbsp;<span class="small">{{ currency(config('phpvms.currency')) }}</span></th> <th>Cost&nbsp;<span class="small">{{ currency(config('phpvms.currency')) }}</span></th>
<th>Type</th> <th>Type</th>
<th></th> <th></th>
</thead> </thead>
@endif @endif
<tbody> <tbody>
@foreach($airport->expenses as $expense) @foreach($airport->expenses as $expense)
<tr> <tr>
<td> <td>
<p> <p>
<a class="text" href="#" data-pk="{{ $expense->id }}" <a class="text" href="#" data-pk="{{ $expense->id }}"
data-name="name">{{ $expense->name }}</a> data-name="name">{{ $expense->name }}</a>
</p> </p>
</td> </td>
<td> <td>
<p> <p>
<a class="text" href="#" data-pk="{{ $expense->id }}" <a class="text" href="#" data-pk="{{ $expense->id }}"
data-name="amount">{{ $expense->amount }}</a> data-name="amount">{{ $expense->amount }}</a>
</p> </p>
</td> </td>
<td> <td>
<p> <p>
<a href="#" <a href="#"
class="dropdown" class="dropdown"
data-pk="{{ $expense->id }}" data-pk="{{ $expense->id }}"
data-name="type">{{ \App\Models\Enums\ExpenseType::label($expense->type) }}</a> data-name="type">{{ \App\Models\Enums\ExpenseType::label($expense->type) }}</a>
</p> </p>
</td> </td>
<td align="right"> <td align="right">
{{ Form::open(['url' => url('/admin/airports/'.$airport->id.'/expenses'), {{ Form::open(['url' => url('/admin/airports/'.$airport->id.'/expenses'),
'method' => 'delete', 'class' => 'modify_expense form-inline']) }} 'method' => 'delete', 'class' => 'modify_expense form-inline']) }}
{{ Form::hidden('expense_id', $expense->id) }} {{ Form::hidden('expense_id', $expense->id) }}
{{ Form::button('<i class="fa fa-times"></i>', ['type' => 'submit', {{ Form::button('<i class="fa fa-times"></i>', ['type' => 'submit',
'class' => 'btn btn-sm btn-danger btn-icon', 'class' => 'btn btn-sm btn-danger btn-icon',
'onclick' => "return confirm('Are you sure?')", 'onclick' => "return confirm('Are you sure?')",
]) }} ]) }}
{{ Form::close() }} {{ Form::close() }}
</td> </td>
</tr> </tr>
@endforeach @endforeach
</tbody> </tbody>
</table> </table>
<hr/> <hr/>
<div class="row"> <div class="row">
<div class="col-sm-12"> <div class="col-sm-12">
<div class="text-right"> <div class="text-right">
{{ Form::open(['url' => url('/admin/airports/'.$airport->id.'/expenses'), {{ Form::open(['url' => url('/admin/airports/'.$airport->id.'/expenses'),
'method' => 'post', 'class' => 'modify_expense form-inline']) }} 'method' => 'post', 'class' => 'modify_expense form-inline']) }}
{{ Form::input('text', 'name', null, ['class' => 'form-control input-sm', 'placeholder' => 'Name']) }} {{ 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::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::select('type', \App\Models\Enums\ExpenseType::select(), null, ['class' => 'select2']) }}
{{ Form::button('<i class="fa fa-plus"></i> Add', ['type' => 'submit', {{ Form::button('<i class="fa fa-plus"></i> Add', ['type' => 'submit',
'class' => 'btn btn-success btn-small']) }} 'class' => 'btn btn-success btn-small']) }}
{{ Form::close() }} {{ Form::close() }}
<p class="text-danger">{{ $errors->first('name') }}</p> <p class="text-danger">{{ $errors->first('name') }}</p>
<p class="text-danger">{{ $errors->first('amount') }}</p> <p class="text-danger">{{ $errors->first('amount') }}</p>
</div> </div>
</div>
</div> </div>
</div>
</div> </div>

View File

@@ -1,101 +1,101 @@
<div class="row"> <div class="row">
<div class="col-lg-12"> <div class="col-lg-12">
<!-- Icao Field --> <!-- Icao Field -->
<div class="row"> <div class="row">
<div class="form-group col-sm-6"> <div class="form-group col-sm-6">
{{ Form::label('icao', 'ICAO:') }}&nbsp;<span class="required">*</span> {{ Form::label('icao', 'ICAO:') }}&nbsp;<span class="required">*</span>
<a href="#" class="airport_data_lookup">Lookup</a> <a href="#" class="airport_data_lookup">Lookup</a>
{{ Form::text('icao', null, [ {{ Form::text('icao', null, [
'id' => 'airport_icao', 'class' => 'form-control' 'id' => 'airport_icao', 'class' => 'form-control'
]) }} ]) }}
<p class="text-danger">{{ $errors->first('icao') }}</p> <p class="text-danger">{{ $errors->first('icao') }}</p>
</div> </div>
<div class="form-group col-sm-6"> <div class="form-group col-sm-6">
{{ Form::label('iata', 'IATA:') }} {{ Form::label('iata', 'IATA:') }}
{{ Form::text('iata', null, ['class' => 'form-control']) }} {{ Form::text('iata', null, ['class' => 'form-control']) }}
<p class="text-danger">{{ $errors->first('iata') }}</p> <p class="text-danger">{{ $errors->first('iata') }}</p>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="form-group col-sm-4"> <div class="form-group col-sm-4">
{{ Form::label('name', 'Name:') }}&nbsp;<span class="required">*</span> {{ Form::label('name', 'Name:') }}&nbsp;<span class="required">*</span>
{{ Form::text('name', null, ['class' => 'form-control']) }} {{ Form::text('name', null, ['class' => 'form-control']) }}
<p class="text-danger">{{ $errors->first('name') }}</p> <p class="text-danger">{{ $errors->first('name') }}</p>
</div> </div>
<div class="form-group col-sm-4"> <div class="form-group col-sm-4">
{{ Form::label('lat', 'Latitude:') }}&nbsp;<span class="required">*</span> {{ Form::label('lat', 'Latitude:') }}&nbsp;<span class="required">*</span>
{{ Form::text('lat', null, ['class' => 'form-control', 'rv-value' => 'airport.lat']) }} {{ Form::text('lat', null, ['class' => 'form-control', 'rv-value' => 'airport.lat']) }}
<p class="text-danger">{{ $errors->first('lat') }}</p> <p class="text-danger">{{ $errors->first('lat') }}</p>
</div> </div>
<div class="form-group col-sm-4"> <div class="form-group col-sm-4">
{{ Form::label('lon', 'Longitude:') }}&nbsp;<span class="required">*</span> {{ Form::label('lon', 'Longitude:') }}&nbsp;<span class="required">*</span>
{{ Form::text('lon', null, ['class' => 'form-control', 'rv-value' => 'airport.lon']) }} {{ Form::text('lon', null, ['class' => 'form-control', 'rv-value' => 'airport.lon']) }}
<p class="text-danger">{{ $errors->first('lon') }}</p> <p class="text-danger">{{ $errors->first('lon') }}</p>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="form-group col-sm-4"> <div class="form-group col-sm-4">
{{ Form::label('country', 'Country:') }} {{ Form::label('country', 'Country:') }}
{{ Form::text('country', null, ['class' => 'form-control']) }} {{ Form::text('country', null, ['class' => 'form-control']) }}
<p class="text-danger">{{ $errors->first('country') }}</p> <p class="text-danger">{{ $errors->first('country') }}</p>
</div> </div>
<div class="form-group col-sm-4"> <div class="form-group col-sm-4">
{{ Form::label('location', 'Location:') }} {{ Form::label('location', 'Location:') }}
{{ Form::text('location', null, ['class' => 'form-control']) }} {{ Form::text('location', null, ['class' => 'form-control']) }}
<p class="text-danger">{{ $errors->first('location') }}</p> <p class="text-danger">{{ $errors->first('location') }}</p>
</div> </div>
<div class="form-group col-sm-4"> <div class="form-group col-sm-4">
{{ Form::label('timezone', 'Timezone:') }} {{ Form::label('timezone', 'Timezone:') }}
{{ Form::select('timezone', $timezones, null, ['id' => 'timezone', 'class' => 'select2']) }} {{ Form::select('timezone', $timezones, null, ['id' => 'timezone', 'class' => 'select2']) }}
<p class="text-danger">{{ $errors->first('timezone') }}</p> <p class="text-danger">{{ $errors->first('timezone') }}</p>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="form-group col-sm-6"> <div class="form-group col-sm-6">
{{ Form::label('ground_handling_cost', 'Ground Handling Cost:') }} {{ Form::label('ground_handling_cost', 'Ground Handling Cost:') }}
{{ Form::number('ground_handling_cost', null, ['class' => 'form-control', 'step' => '0.01']) }} {{ Form::number('ground_handling_cost', null, ['class' => 'form-control', 'step' => '0.01']) }}
<p class="text-danger">{{ $errors->first('ground_handling_cost') }}</p> <p class="text-danger">{{ $errors->first('ground_handling_cost') }}</p>
@component('admin.components.info') @component('admin.components.info')
This is the base rate per-flight. A multiplier for this rate can be 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. set in the subfleet, so you can modulate those costs from there.
@endcomponent @endcomponent
</div> </div>
<div class="form-group col-md-6"> <div class="form-group col-md-6">
{{ Form::label('fuel_jeta_cost', 'Jet A Fuel Cost:') }} {{ Form::label('fuel_jeta_cost', 'Jet A Fuel Cost:') }}
{{ Form::number('fuel_jeta_cost', null, ['class' => 'form-control', 'step' => '0.01']) }} {{ Form::number('fuel_jeta_cost', null, ['class' => 'form-control', 'step' => '0.01']) }}
<p class="text-danger">{{ $errors->first('fuel_jeta_cost') }}</p> <p class="text-danger">{{ $errors->first('fuel_jeta_cost') }}</p>
@component('admin.components.info') @component('admin.components.info')
This is the cost per {{ config('phpvms.internal_units.fuel') }} This is the cost per {{ config('phpvms.internal_units.fuel') }}
@endcomponent @endcomponent
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="form-group col-sm-4"> <div class="form-group col-sm-4">
{{ Form::label('hub', 'Hub:') }} {{ Form::label('hub', 'Hub:') }}
{{ Form::hidden('hub', 0) }} {{ Form::hidden('hub', 0) }}
{{ Form::checkbox('hub', null) }} {{ Form::checkbox('hub', null) }}
</div> </div>
<!-- Submit Field --> <!-- Submit Field -->
<div class="form-group col-sm-8"> <div class="form-group col-sm-8">
<div class="text-right"> <div class="text-right">
{{ Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-success']) }} {{ Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-success']) }}
<a href="{{ route('admin.airports.index') }}" class="btn btn-default">Cancel</a> <a href="{{ route('admin.airports.index') }}" class="btn btn-default">Cancel</a>
</div>
</div> </div>
</div>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -1,5 +1,5 @@
@extends('admin.app') @extends('admin.app')
@section('title', 'Import Airports') @section('title', 'Import Airports')
@section('content') @section('content')
@include('admin.common.import', ['route' => 'admin.airports.import']) @include('admin.common.import', ['route' => 'admin.airports.import'])
@endsection @endsection

View File

@@ -2,26 +2,26 @@
@section('title', 'Airports') @section('title', 'Airports')
@section('actions') @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.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.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.create') }}"><i class="ti-plus"></i>Add New</a></li>
@endsection @endsection
@section('content') @section('content')
<div class="card"> <div class="card">
@include('admin.airports.search') @include('admin.airports.search')
</div> </div>
<div class="card border-blue-bottom"> <div class="card border-blue-bottom">
<div class="content"> <div class="content">
@include('admin.airports.table') @include('admin.airports.table')
</div>
</div> </div>
</div>
<div class="row"> <div class="row">
<div class="col-12 text-center"> <div class="col-12 text-center">
{{ $airports->links('admin.pagination.default') }} {{ $airports->links('admin.pagination.default') }}
</div>
</div> </div>
</div>
@endsection @endsection
@include('admin.airports.script') @include('admin.airports.script')

View File

@@ -1,126 +1,126 @@
@section('scripts') @section('scripts')
<script> <script>
'use strict'; 'use strict';
function setEditable() { function setEditable() {
const csrf_token = $('meta[name="csrf-token"]').attr('content'); const csrf_token = $('meta[name="csrf-token"]').attr('content');
const api_key = $('meta[name="api-key"]').attr('content'); const api_key = $('meta[name="api-key"]').attr('content');
@if(isset($airport)) @if(isset($airport))
$('#airport-expenses a.text').editable({ $('#airport-expenses a.text').editable({
emptytext: '0', emptytext: '0',
url: '{{ url('/admin/airports/'.$airport->id.'/expenses') }}', url: '{{ url('/admin/airports/'.$airport->id.'/expenses') }}',
title: 'Enter override value', title: 'Enter override value',
ajaxOptions: { ajaxOptions: {
type: 'post', type: 'post',
headers: { headers: {
'x-api-key': api_key, 'x-api-key': api_key,
'X-CSRF-TOKEN': csrf_token 'X-CSRF-TOKEN': csrf_token
} }
}, },
params: function (params) { params: function (params) {
return { return {
_method: 'put', _method: 'put',
expense_id: params.pk, expense_id: params.pk,
name: params.name, name: params.name,
value: params.value value: params.value
} }
} }
}); });
$('#airport-expenses a.dropdown').editable({ $('#airport-expenses a.dropdown').editable({
type: 'select', type: 'select',
emptytext: '0', emptytext: '0',
source: {!! json_encode(list_to_editable(\App\Models\Enums\ExpenseType::select())) !!}, source: {!! json_encode(list_to_editable(\App\Models\Enums\ExpenseType::select())) !!},
url: '{{ url('/admin/airports/'.$airport->id.'/expenses') }}', url: '{{ url('/admin/airports/'.$airport->id.'/expenses') }}',
title: 'Enter override value', title: 'Enter override value',
ajaxOptions: { ajaxOptions: {
type: 'post', type: 'post',
headers: { headers: {
'x-api-key': api_key, 'x-api-key': api_key,
'X-CSRF-TOKEN': csrf_token 'X-CSRF-TOKEN': csrf_token
} }
}, },
params: function (params) { params: function (params) {
return { return {
_method: 'put', _method: 'put',
expense_id: params.pk, expense_id: params.pk,
name: params.name, name: params.name,
value: params.value value: params.value
} }
} }
}); });
@endif @endif
} }
$(document).ready(function() { $(document).ready(function () {
const api_key = $('meta[name="api-key"]').attr('content'); const api_key = $('meta[name="api-key"]').attr('content');
const csrf_token = $('meta[name="csrf-token"]').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', type: 'text',
mode: 'inline', mode: 'inline',
emptytext: '0', emptytext: '0',
url: '{{ url('/admin/airports/fuel') }}', url: '{{ url('/admin/airports/fuel') }}',
title: 'Enter price per unit of fuel', title: 'Enter price per unit of fuel',
ajaxOptions: { ajaxOptions: {
type: 'post', type: 'post',
headers: { headers: {
'x-api-key': api_key, 'x-api-key': api_key,
'X-CSRF-TOKEN': csrf_token 'X-CSRF-TOKEN': csrf_token
} }
}, },
params: function(params) { params: function (params) {
return { return {
_method: 'put', _method: 'put',
id: params.pk, id: params.pk,
name: params.name, name: params.name,
value: params.value value: params.value
} }
} }
}); });
$('a.airport_data_lookup').click(async function(e) { $('a.airport_data_lookup').click(async function (e) {
e.preventDefault(); e.preventDefault();
const icao = $("input#airport_icao").val(); const icao = $("input#airport_icao").val();
if(icao === '') { if (icao === '') {
return; return;
} }
let response; let response;
try { try {
response = await phpvms.airport_lookup(icao); response = await phpvms.airport_lookup(icao);
} catch (e) { } catch (e) {
console.log('Error looking up airport!', e); console.log('Error looking up airport!', e);
return; return;
} }
_.forEach(response.data, function (value, key) { _.forEach(response.data, function (value, key) {
if (key === 'city') { if (key === 'city') {
key = 'location'; key = 'location';
} }
$("#" + key).val(value); $("#" + key).val(value);
if (key === 'tz') { if (key === 'tz') {
$("#timezone").val(value); $("#timezone").val(value);
$("#timezone").trigger('change'); $("#timezone").trigger('change');
} }
}); });
}); });
$(document).on('submit', 'form.modify_expense', function (event) { $(document).on('submit', 'form.modify_expense', function (event) {
event.preventDefault(); event.preventDefault();
console.log(event); console.log(event);
$.pjax.submit(event, '#airport-expenses-wrapper', {push: false}); $.pjax.submit(event, '#airport-expenses-wrapper', {push: false});
}); });
$(document).on('pjax:complete', function () { $(document).on('pjax:complete', function () {
initPlugins(); initPlugins();
setEditable(); setEditable();
});
}); });
}); </script>
</script>
@endsection @endsection

View File

@@ -1,15 +1,15 @@
<div class="content"> <div class="content">
<div class="row"> <div class="row">
<div class="col-sm-12"> <div class="col-sm-12">
<div class="form-group"> <div class="form-group">
{{ Form::open(['route' => 'admin.airports.index', 'method' => 'GET', 'class'=>'form-inline pull-right']) }} {{ Form::open(['route' => 'admin.airports.index', 'method' => 'GET', 'class'=>'form-inline pull-right']) }}
{{ Form::label('icao', 'ICAO:') }} {{ Form::label('icao', 'ICAO:') }}
{{ Form::text('icao', null, ['class' => 'form-control']) }} {{ Form::text('icao', null, ['class' => 'form-control']) }}
&nbsp; &nbsp;
<a href="{{ route('admin.airports.index') }}">clear</a> <a href="{{ route('admin.airports.index') }}">clear</a>
{{ Form::close() }} {{ Form::close() }}
</div> </div>
</div>
</div> </div>
</div>
</div> </div>

View File

@@ -1,35 +1,36 @@
@extends('admin.app') @extends('admin.app')
@section('content') @section('content')
<section class="content-header"> <section class="content-header">
<h1 class="pull-left">{{ $airport->name }} - {{ $airport->location }}</h1> <h1 class="pull-left">{{ $airport->name }} - {{ $airport->location }}</h1>
<h1 class="pull-right"> <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> </h1>
</section> </section>
<section class="content"> <section class="content">
<div class="clearfix"></div> <div class="clearfix"></div>
<div class="row"> <div class="row">
@include('admin.airports.show_fields') @include('admin.airports.show_fields')
</div> </div>
<div class="box box-primary"> <div class="box box-primary">
<div class="box-body"> <div class="box-body">
<div class="row"> <div class="row">
<div class="col-xs-12"> <div class="col-xs-12">
<div class="box-body"> <div class="box-body">
<div id="map" style="width: 100%; height: 800px"></div> <div id="map" style="width: 100%; height: 800px"></div>
</div>
</div>
</div> </div>
</div>
</div> </div>
</div>
</div> </div>
</section> </section>
@endsection @endsection
@section('scripts') @section('scripts')
<script type="text/javascript"> <script type="text/javascript">
phpvms_render_airspace_map({ phpvms_render_airspace_map({
lat: {{ $airport->lat }}, lat: {{ $airport->lat }},
lon: {{ $airport->lon }}, lon: {{ $airport->lon }},
}); });
</script> </script>
@endsection @endsection

View File

@@ -1,22 +1,21 @@
<div class="form-group col-sm-6"> <div class="form-group col-sm-6">
<div class="box box-solid"> <div class="box box-solid">
<div class="box-header with-border"> <div class="box-header with-border">
<h3 class="box-title">ICAO</h3> <h3 class="box-title">ICAO</h3>
</div>
<div class="box-body">
<p class="lead">{{ $airport->icao }}<strong></p>
</div>
</div> </div>
<div class="box-body">
<p class="lead">{{ $airport->icao }}<strong></p>
</div>
</div>
</div> </div>
<div class="form-group col-sm-6"> <div class="form-group col-sm-6">
<div class="box box-solid"> <div class="box box-solid">
<div class="box-header with-border"> <div class="box-header with-border">
<h3 class="box-title">Coordinates</h3> <h3 class="box-title">Coordinates</h3>
</div>
<div class="box-body">
<p class="lead">{{ $airport->lat}}/{{ $airport->lon }}</p>
</div>
</div> </div>
<div class="box-body">
<p class="lead">{{ $airport->lat}}/{{ $airport->lon }}</p>
</div>
</div>
</div> </div>

View File

@@ -1,39 +1,41 @@
<div id="airports_table_wrapper"> <div id="airports_table_wrapper">
<table class="table table-hover table-responsive" id="airports-table"> <table class="table table-hover table-responsive" id="airports-table">
<thead> <thead>
<th>ICAO</th> <th>ICAO</th>
<th>Name</th> <th>Name</th>
<th>Location</th> <th>Location</th>
<th>Hub</th> <th>Hub</th>
<th style="text-align: center;">GH Cost</th> <th style="text-align: center;">GH Cost</th>
<th style="text-align: center;">JetA</th> <th style="text-align: center;">JetA</th>
<th></th> <th></th>
</thead> </thead>
<tbody> <tbody>
@foreach($airports as $airport) @foreach($airports as $airport)
<tr> <tr>
<td><a href="{{ route('admin.airports.edit', [$airport->id]) }}">{{ $airport->icao }}</a></td> <td><a href="{{ route('admin.airports.edit', [$airport->id]) }}">{{ $airport->icao }}</a></td>
<td>{{ $airport->name }}</td> <td>{{ $airport->name }}</td>
<td>{{ $airport->location }}</td> <td>{{ $airport->location }}</td>
<td style="text-align: center;"> <td style="text-align: center;">
@if($airport->hub === true) @if($airport->hub === true)
<span class="label label-success">Hub</span> <span class="label label-success">Hub</span>
@endif @endif
</td> </td>
<td style="text-align: center;"> <td style="text-align: center;">
{{ $airport->ground_handling_cost }} {{ $airport->ground_handling_cost }}
</td> </td>
<td style="text-align: center;"> <td style="text-align: center;">
<a class="inline" href="#" data-pk="{{ $airport->id }}" data-name="fuel_jeta_cost">{{ $airport->fuel_jeta_cost }}</a> <a class="inline" href="#" data-pk="{{ $airport->id }}"
</td> data-name="fuel_jeta_cost">{{ $airport->fuel_jeta_cost }}</a>
<td style="text-align: right;"> </td>
{{ Form::open(['route' => ['admin.airports.destroy', $airport->id], 'method' => 'delete']) }} <td style="text-align: right;">
<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::open(['route' => ['admin.airports.destroy', $airport->id], 'method' => 'delete']) }}
{{ Form::button('<i class="fa fa-times"></i>', ['type' => 'submit', 'class' => 'btn btn-sm btn-danger btn-icon', 'onclick' => "return confirm('Are you sure?')"]) }} <a href="{{ route('admin.airports.edit', [$airport->id]) }}" class='btn btn-sm btn-success btn-icon'><i
{{ Form::close() }} class="fas fa-pencil-alt"></i></a>
</td> {{ Form::button('<i class="fa fa-times"></i>', ['type' => 'submit', 'class' => 'btn btn-sm btn-danger btn-icon', 'onclick' => "return confirm('Are you sure?')"]) }}
</tr> {{ Form::close() }}
@endforeach </td>
</tbody> </tr>
</table> @endforeach
</tbody>
</table>
</div> </div>

View File

@@ -1,12 +1,12 @@
@extends('admin.app') @extends('admin.app')
@section('title', 'Add Award') @section('title', 'Add Award')
@section('content') @section('content')
<div class="card border-blue-bottom"> <div class="card border-blue-bottom">
<div class="content"> <div class="content">
{{ Form::open(['route' => 'admin.awards.store']) }} {{ Form::open(['route' => 'admin.awards.store']) }}
@include('admin.awards.fields') @include('admin.awards.fields')
{{ Form::close() }} {{ Form::close() }}
</div>
</div> </div>
</div>
@endsection @endsection
@include('admin.awards.scripts') @include('admin.awards.scripts')

View File

@@ -1,12 +1,12 @@
@extends('admin.app') @extends('admin.app')
@section('title', "Edit \"$award->title\" Award") @section('title', "Edit \"$award->title\" Award")
@section('content') @section('content')
<div class="card border-blue-bottom"> <div class="card border-blue-bottom">
<div class="content"> <div class="content">
{{ Form::model($award, ['route' => ['admin.awards.update', $award->id], 'method' => 'patch']) }} {{ Form::model($award, ['route' => ['admin.awards.update', $award->id], 'method' => 'patch']) }}
@include('admin.awards.fields') @include('admin.awards.fields')
{{ Form::close() }} {{ Form::close() }}
</div> </div>
</div> </div>
@endsection @endsection
@include('admin.awards.scripts') @include('admin.awards.scripts')

View File

@@ -1,78 +1,78 @@
<div class="row"> <div class="row">
<div class="col-sm-12"> <div class="col-sm-12">
@component('admin.components.info') @component('admin.components.info')
These are the awards that pilots can earn. Each award is assigned an 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, award class, which will be run whenever a pilot's stats are changed,
including after a PIREP is accepted. including after a PIREP is accepted.
@endcomponent @endcomponent
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="form-group col-sm-6"> <div class="form-group col-sm-6">
{!! Form::label('name', 'Name:') !!}&nbsp;<span class="required">*</span> {!! Form::label('name', 'Name:') !!}&nbsp;<span class="required">*</span>
<div class="callout callout-info"> <div class="callout callout-info">
<i class="icon fa fa-info">&nbsp;&nbsp;</i> <i class="icon fa fa-info">&nbsp;&nbsp;</i>
This will be the title of the award 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>
{!! Form::text('name', null, ['class' => 'form-control']) !!}
<p class="text-danger">{{ $errors->first('name') }}</p>
</div>
<div class="form-group col-sm-6"> <div class="form-group col-sm-6">
{!! Form::label('image', 'Image:') !!} {!! Form::label('image', 'Image:') !!}
<div class="callout callout-info"> <div class="callout callout-info">
<i class="icon fa fa-info">&nbsp;&nbsp;</i> <i class="icon fa fa-info">&nbsp;&nbsp;</i>
This is the image of the award. Be creative! 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>
{!! 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>
<div class="row"> <div class="row">
<div class="form-group col-sm-6"> <div class="form-group col-sm-6">
{!! Form::label('description', 'Description:') !!}&nbsp {!! Form::label('description', 'Description:') !!}&nbsp
<div class="callout callout-info"> <div class="callout callout-info">
<i class="icon fa fa-info">&nbsp;&nbsp;</i> <i class="icon fa fa-info">&nbsp;&nbsp;</i>
This is the description of the award. This is the description of the award.
</div> </div>
{!! Form::textarea('description', null, ['class' => 'form-control']) !!} {!! Form::textarea('description', null, ['class' => 'form-control']) !!}
<p class="text-danger">{{ $errors->first('description') }}</p> <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>
<div class="form-group col-sm-6"> <div>
<div> {{ Form::label('ref_model_params', 'Award Class parameters') }}
{{ Form::label('ref_model', 'Award Class:') }} {{ Form::text('ref_model_params', null, ['class' => 'form-control']) }}
{{ Form::select('ref_model', $award_classes, null , [ <p class="text-danger">{{ $errors->first('ref_model_params') }}</p>
'class' => 'form-control select2',
'id' => 'award_class_select',
]) }}
<p class="text-danger">{{ $errors->first('ref_model') }}</p>
</div>
<div> <p id="ref_model_param_description">
{{ 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>
</div> </div>
</div>
</div> </div>
<div class="row"> <div class="row">
<!-- Submit Field --> <!-- Submit Field -->
<div class="form-group col-sm-12"> <div class="form-group col-sm-12">
<div class="pull-right"> <div class="pull-right">
{!! Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-success']) !!} {!! Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-success']) !!}
<a href="{!! route('admin.awards.index') !!}" class="btn btn-warn">Cancel</a> <a href="{!! route('admin.awards.index') !!}" class="btn btn-warn">Cancel</a>
</div>
</div> </div>
</div>
</div> </div>

View File

@@ -2,17 +2,17 @@
@section('title', 'Awards') @section('title', 'Awards')
@section('actions') @section('actions')
<li> <li>
<a href="{!! route('admin.awards.create') !!}"> <a href="{!! route('admin.awards.create') !!}">
<i class="ti-plus"></i> <i class="ti-plus"></i>
Add New Add New
</a> </a>
</li> </li>
@endsection @endsection
@section('content') @section('content')
<div class="card"> <div class="card">
@include('admin.awards.table') @include('admin.awards.table')
</div> </div>
@endsection @endsection

View File

@@ -1,30 +1,30 @@
@section('scripts') @section('scripts')
<script> <script>
@if(isset($award_descriptions)) @if(isset($award_descriptions))
const award_descriptions = {!! json_encode($award_descriptions) !!}; const award_descriptions = {!! json_encode($award_descriptions) !!};
@else @else
const award_descriptions = {}; const award_descriptions = {};
@endif @endif
const changeParamDescription = (award_class) => { const changeParamDescription = (award_class) => {
const descrip = award_descriptions[award_class]; const descrip = award_descriptions[award_class];
console.log('Found description: ', descrip); console.log('Found description: ', descrip);
$("p#ref_model_param_description").text(descrip); $("p#ref_model_param_description").text(descrip);
}; };
$(document).ready(() => { $(document).ready(() => {
const select_id = "select#award_class_select"; const select_id = "select#award_class_select";
console.log('award descriptions', award_descriptions); console.log('award descriptions', award_descriptions);
$(select_id).change((e) => { $(select_id).change((e) => {
const award_class = $(select_id + " option:selected").val(); const award_class = $(select_id + " option:selected").val();
console.log('award class selected: ', award_class); console.log('award class selected: ', award_class);
changeParamDescription(award_class); changeParamDescription(award_class);
}); });
// on load // on load
const award_class = $(select_id + " option:selected").val(); const award_class = $(select_id + " option:selected").val();
changeParamDescription(award_class); changeParamDescription(award_class);
}); });
</script> </script>
@endsection @endsection

View File

@@ -1,40 +1,40 @@
<table class="table table-hover table-responsive" id="awards-table"> <table class="table table-hover table-responsive" id="awards-table">
<thead> <thead>
<th>Name</th> <th>Name</th>
<th>Description</th> <th>Description</th>
<th>Image</th> <th>Image</th>
<th class="text-right">Action</th> <th class="text-right">Action</th>
</thead> </thead>
<tbody> <tbody>
@foreach($awards as $award) @foreach($awards as $award)
<tr> <tr>
<td> <td>
<a href="{{ route('admin.awards.edit', [$award->id]) }}"> <a href="{{ route('admin.awards.edit', [$award->id]) }}">
{{ $award->name }}</a> {{ $award->name }}</a>
</td> </td>
<td>{{ $award->description }}</td> <td>{{ $award->description }}</td>
<td> <td>
@if($award->image) @if($award->image)
<img src="{{ $award->image }}" name="{{ $award->name }}" alt="No Image Available" /> <img src="{{ $award->image }}" name="{{ $award->name }}" alt="No Image Available"/>
@else @else
- -
@endif @endif
</td> </td>
<td class="text-right"> <td class="text-right">
{{ Form::open(['route' => ['admin.awards.destroy', $award->id], 'method' => 'delete']) }} {{ 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'> <a href="{{ route('admin.awards.edit', [$award->id]) }}" class='btn btn-sm btn-success btn-icon'>
<i class="fas fa-pencil-alt"></i></a> <i class="fas fa-pencil-alt"></i></a>
{{ Form::button('<i class="fa fa-times"></i>', [ {{ Form::button('<i class="fa fa-times"></i>', [
'type' => 'submit', 'type' => 'submit',
'class' => 'btn btn-sm btn-danger btn-icon', 'class' => 'btn btn-sm btn-danger btn-icon',
'onclick' => "return confirm('Are you sure you want to delete this award?')" 'onclick' => "return confirm('Are you sure you want to delete this award?')"
]) }} ]) }}
{{ Form::close() }} {{ Form::close() }}
</td> </td>
</tr> </tr>
@endforeach @endforeach
</tbody> </tbody>
</table> </table>

View File

@@ -6,87 +6,87 @@ Pass in:
--}} --}}
<div id="airport-files-wrapper" class="col-12"> <div id="airport-files-wrapper" class="col-12">
<div class="header"> <div class="header">
<h3>files</h3> <h3>files</h3>
@component('admin.components.info') @component('admin.components.info')
Add a download link or upload a file to make available Add a download link or upload a file to make available
@endcomponent @endcomponent
</div> </div>
@if(count($model->files) === 0) @if(count($model->files) === 0)
@include('admin.common.none_added', ['type' => 'files']) @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 @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 --}} {{ Form::token() }}
<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() }} <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> {{-- Fields for the model --}}
{{ Form::text('file_name', null, ['class' => 'form-control', 'placeholder' => 'Name']) }} {{ Form::hidden('ref_model', get_class($model)) }}
{{ Form::text('file_description', null, ['class' => 'form-control', 'placeholder' => 'Description']) }} {{ Form::hidden('ref_model_id', $model->id) }}
{{ Form::text('url', null, ['class' => 'form-control', 'placeholder' => 'URL']) }}
{{ Form::file('file', ['class' => 'form-control']) }}
{{-- Fields for the model --}} {{ Form::submit('Save', [
{{ Form::hidden('ref_model', get_class($model)) }} 'id' => 'save_file_upload',
{{ Form::hidden('ref_model_id', $model->id) }} 'class' => 'btn btn-success'
])
{{ Form::submit('Save', [ }}
'id' => 'save_file_upload', <div class="text-danger" style="padding-top: 10px;">
'class' => 'btn btn-success' <span>{{ $errors->first('filename') }}</span>
]) <span>{{ $errors->first('url') }}</span>
}} <span>{{ $errors->first('file') }}</span>
<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>
{{ Form::close() }}
</div>
</div> </div>
</div>
</div> </div>

View File

@@ -1,37 +1,37 @@
<div class="card border-blue-bottom"> <div class="card border-blue-bottom">
<div class="content"> <div class="content">
<div class="row"> <div class="row">
{{ Form::open(['method' => 'post', 'route' => $route, 'files' => true]) }} {{ Form::open(['method' => 'post', 'route' => $route, 'files' => true]) }}
<div class="form-group col-12"> <div class="form-group col-12">
{{ Form::label('csv_file', 'Choose a CSV file to import') }} {{ Form::label('csv_file', 'Choose a CSV file to import') }}
{{ Form::file('csv_file', ['accept' => '.csv']) }} {{ Form::file('csv_file', ['accept' => '.csv']) }}
<p class="text-danger">{{ $errors->first('csv_file') }}</p> <p class="text-danger">{{ $errors->first('csv_file') }}</p>
</div> </div>
<div class="form-group col-md-12"> <div class="form-group col-md-12">
<div class="text-right"> <div class="text-right">
{{ Form::button('Start Import', ['type' => 'submit', 'class' => 'btn btn-success']) }} {{ 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>
{{ 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>
</div> </div>

View File

@@ -1,5 +1,5 @@
<div class="jumbotron"> <div class="jumbotron">
<p class="text-center"> <p class="text-center">
No {{ $type }} have been added No {{ $type }} have been added
</p> </p>
</div> </div>

View File

@@ -1,10 +1,10 @@
<div> <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;"> <span style="font-size: 1.0em;">
<i class="fas fa-info-circle" style="color: #067ec1"></i> <i class="fas fa-info-circle" style="color: #067ec1"></i>
</span> </span>
</p> </p>
<p class="category" style="text-transform:none;"> <p class="category" style="text-transform:none;">
{{ $slot }} {{ $slot }}
</p> </p>
</div> </div>

View File

@@ -1,32 +1,32 @@
<div class="card border-blue-bottom"> <div class="card border-blue-bottom">
<div class="content"> <div class="content">
<div class="row"> <div class="row">
<div class="col-xs-5"> <div class="col-xs-5">
<div class="icon-big icon-info text-center"> <div class="icon-big icon-info text-center">
<i class="{{$icon}}"></i> <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> </div>
<div class="footer"> </div>
<hr> <div class="col-xs-7">
@if(isset($total)) <div class="numbers">
<div class="stats"> <p>{{$type}}</p>
<i class="ti-medall"></i> {{$total}} total @if(isset($link))
</div> <a href="{{ $link }}">
@endif @endif
{{$pending}} pending
@if(isset($link))
</a>
@endif
</div> </div>
</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> </div>

View File

@@ -1,66 +1,66 @@
<div id="pjax_news_wrapper"> <div id="pjax_news_wrapper">
<div class="card border-blue-bottom"> <div class="card border-blue-bottom">
@if($news->count() === 0) @if($news->count() === 0)
<div class="text-center text-muted" style="padding: 30px;"> <div class="text-center text-muted" style="padding: 30px;">
no news items no news items
</div> </div>
@endif @endif
@foreach($news as $item) @foreach($news as $item)
<div class="content"> <div class="content">
<div class="header"> <div class="header">
<h4 class="title">{{ $item->subject }}</h4> <h4 class="title">{{ $item->subject }}</h4>
<p class="category">{{ $item->user->name }} - {{ show_datetime($item->created_at) }}</p> <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>&nbsp;delete',
['type' => 'submit',
'class' => ' btn btn-danger btn-xs text-small',
'onclick' => "return confirm('Are you sure?')"
])
}}
{{ Form::close() }}
</div>
</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> {{ $item->body }}
<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>&nbsp;add',
['type' => 'submit',
'class' => 'btn btn-success btn-s'])
}} <div class="text-right">
{{ Form::close() }} {{ Form::open(['route' => 'admin.dashboard.news',
</div> 'method' => 'delete',
'class' => 'pjax_news_form',
]) }}
{{ Form::hidden('news_id', $item->id) }}
{{
Form::button('<i class="far fa-trash-alt"></i>&nbsp;delete',
['type' => 'submit',
'class' => ' btn btn-danger btn-xs text-small',
'onclick' => "return confirm('Are you sure?')"
])
}}
{{ Form::close() }}
</div> </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>&nbsp;add',
['type' => 'submit',
'class' => 'btn btn-success btn-s'])
}}
{{ Form::close() }}
</div>
</div> </div>
</div>
</div> </div>

File diff suppressed because one or more lines are too long

View File

@@ -1,11 +1,11 @@
@extends('admin.app') @extends('admin.app')
@section('title', 'Add Expense') @section('title', 'Add Expense')
@section('content') @section('content')
<div class="card border-blue-bottom"> <div class="card border-blue-bottom">
<div class="content"> <div class="content">
{{ Form::open(['route' => 'admin.expenses.store']) }} {{ Form::open(['route' => 'admin.expenses.store']) }}
@include('admin.expenses.fields') @include('admin.expenses.fields')
{{ Form::close() }} {{ Form::close() }}
</div>
</div> </div>
</div>
@endsection @endsection

View File

@@ -1,11 +1,11 @@
@extends('admin.app') @extends('admin.app')
@section('title', "Edit \"$expense->name\"") @section('title', "Edit \"$expense->name\"")
@section('content') @section('content')
<div class="card border-blue-bottom"> <div class="card border-blue-bottom">
<div class="content"> <div class="content">
{{ Form::model($expense, ['route' => ['admin.expenses.update', $expense->id], 'method' => 'patch']) }} {{ Form::model($expense, ['route' => ['admin.expenses.update', $expense->id], 'method' => 'patch']) }}
@include('admin.expenses.fields') @include('admin.expenses.fields')
{{ Form::close() }} {{ Form::close() }}
</div> </div>
</div> </div>
@endsection @endsection

View File

@@ -1,64 +1,64 @@
<div class="row"> <div class="row">
<!-- Code Field --> <!-- Code Field -->
<div class="form-group col-sm-6"> <div class="form-group col-sm-6">
{{ Form::label('airline_id', 'Airline:') }} {{ Form::label('airline_id', 'Airline:') }}
{{ Form::select('airline_id', $airlines_list, null , ['class' => 'form-control select2']) }} {{ Form::select('airline_id', $airlines_list, null , ['class' => 'form-control select2']) }}
<p class="text-danger">{{ $errors->first('airline_id') }}</p> <p class="text-danger">{{ $errors->first('airline_id') }}</p>
@component('admin.components.info') @component('admin.components.info')
If an airline is selected, then the expense will only be applied If an airline is selected, then the expense will only be applied
to the selected airline, or flights in that airline. to the selected airline, or flights in that airline.
@endcomponent @endcomponent
</div> </div>
<!-- Name Field --> <!-- Name Field -->
<div class="form-group col-sm-6"> <div class="form-group col-sm-6">
{{ Form::label('type', 'Expense Type:') }}&nbsp;<span class="required">*</span> {{ Form::label('type', 'Expense Type:') }}&nbsp;<span class="required">*</span>
{{ Form::select('type', $expense_types, null , ['class' => 'form-control select2']) }} {{ Form::select('type', $expense_types, null , ['class' => 'form-control select2']) }}
<p class="text-danger">{{ $errors->first('type') }}</p> <p class="text-danger">{{ $errors->first('type') }}</p>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="form-group col-sm-6"> <div class="form-group col-sm-6">
{{ Form::label('name', 'Expense Name:') }} {{ Form::label('name', 'Expense Name:') }}
{{ Form::text('name', null, ['class' => 'form-control']) }} {{ Form::text('name', null, ['class' => 'form-control']) }}
<p class="text-danger">{{ $errors->first('name') }}</p> <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('amount', 'Amount:') }} {{ Form::label('amount', 'Amount:') }}
{{ Form::number('amount', null, ['class' => 'form-control', 'min' => 0, 'step' => '0.01']) }} {{ Form::number('amount', null, ['class' => 'form-control', 'min' => 0, 'step' => '0.01']) }}
<p class="text-danger">{{ $errors->first('amount') }}</p> <p class="text-danger">{{ $errors->first('amount') }}</p>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-sm-5"> <div class="col-sm-5">
{{ Form::label('multiplier', 'Multiplier:') }} {{ Form::label('multiplier', 'Multiplier:') }}
<label class="checkbox-inline"> <label class="checkbox-inline">
{{ Form::hidden('multiplier', 0, false) }} {{ Form::hidden('multiplier', 0, false) }}
{{ Form::checkbox('multiplier', 1, null) }} {{ Form::checkbox('multiplier', 1, null) }}
</label> </label>
@component('admin.components.info') @component('admin.components.info')
If checked, with a PIREP, this expense can be modified by a multiplier If checked, with a PIREP, this expense can be modified by a multiplier
on the subfleet. This is ignored for daily and monthly expenses on the subfleet. This is ignored for daily and monthly expenses
@endcomponent @endcomponent
</div> </div>
<div class="col-sm-3"> <div class="col-sm-3">
{{ Form::label('active', 'Active:') }} {{ Form::label('active', 'Active:') }}
<label class="checkbox-inline"> <label class="checkbox-inline">
{{ Form::hidden('active', 0, false) }} {{ Form::hidden('active', 0, false) }}
{{ Form::checkbox('active', 1, null) }} {{ Form::checkbox('active', 1, null) }}
</label> </label>
</div> </div>
<div class="form-group col-sm-4"> <div class="form-group col-sm-4">
<div class="pull-right"> <div class="pull-right">
{{ Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-success']) }} {{ Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-success']) }}
<a href="{{ route('admin.expenses.index') }}" class="btn btn-default">Cancel</a> <a href="{{ route('admin.expenses.index') }}" class="btn btn-default">Cancel</a>
</div>
</div> </div>
</div>
</div> </div>

View File

@@ -2,5 +2,5 @@
@section('title', 'Import Expenses') @section('title', 'Import Expenses')
@section('content') @section('content')
@include('admin.common.import', ['route' => 'admin.expenses.import']) @include('admin.common.import', ['route' => 'admin.expenses.import'])
@endsection @endsection

View File

@@ -2,22 +2,22 @@
@section('title', 'Expenses') @section('title', 'Expenses')
@section('actions') @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.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.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.create') }}"><i class="ti-plus"></i>Add New</a></li>
@endsection @endsection
@section('content') @section('content')
<div class="card border-blue-bottom"> <div class="card border-blue-bottom">
<div class="content"> <div class="content">
@if(!filled($expenses)) @if(!filled($expenses))
<p class="text-center"> <p class="text-center">
There are no expenses There are no expenses
</p> </p>
@else @else
@include('admin.expenses.table') @include('admin.expenses.table')
@endif @endif
</div> </div>
</div> </div>
@endsection @endsection

View File

@@ -1,40 +1,40 @@
<table class="table table-hover table-responsive" id="expenses-table"> <table class="table table-hover table-responsive" id="expenses-table">
<thead> <thead>
<th>Name</th> <th>Name</th>
<th>Type</th> <th>Type</th>
<th style="text-align: center;">Amount</th> <th style="text-align: center;">Amount</th>
<th>Airline</th> <th>Airline</th>
<th class="text-center">Active</th> <th class="text-center">Active</th>
<th></th> <th></th>
</thead> </thead>
<tbody> <tbody>
@foreach($expenses as $expense) @foreach($expenses as $expense)
<tr> <tr>
<td><a href="{{ route('admin.expenses.edit', [$expense->id]) }}"> <td><a href="{{ route('admin.expenses.edit', [$expense->id]) }}">
{{ $expense->name }}</a> {{ $expense->name }}</a>
</td> </td>
<td>{{ \App\Models\Enums\ExpenseType::label($expense->type) }}</td> <td>{{ \App\Models\Enums\ExpenseType::label($expense->type) }}</td>
<td style="text-align: center;">{{ $expense->amount }}</td> <td style="text-align: center;">{{ $expense->amount }}</td>
<td> <td>
@if(filled($expense->airline)) @if(filled($expense->airline))
{{ $expense->airline->name }} {{ $expense->airline->name }}
@else @else
<span class="description">-</span> <span class="description">-</span>
@endif @endif
</td> </td>
<td class="text-center"> <td class="text-center">
<span class="label label-{{ $expense->active?'success':'default' }}"> <span class="label label-{{ $expense->active?'success':'default' }}">
{{ \App\Models\Enums\ActiveState::label($expense->active) }} {{ \App\Models\Enums\ActiveState::label($expense->active) }}
</span> </span>
</td> </td>
<td class="text-right"> <td class="text-right">
{{ Form::open(['route' => ['admin.expenses.destroy', $expense->id], 'method' => 'delete']) }} {{ Form::open(['route' => ['admin.expenses.destroy', $expense->id], 'method' => 'delete']) }}
<a href="{{ route('admin.expenses.edit', [$expense->id]) }}" <a href="{{ route('admin.expenses.edit', [$expense->id]) }}"
class='btn btn-sm btn-success btn-icon'><i class="fas fa-pencil-alt"></i></a> 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::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() }} {{ Form::close() }}
</td> </td>
</tr> </tr>
@endforeach @endforeach
</tbody> </tbody>
</table> </table>

View File

@@ -1,11 +1,11 @@
@extends('admin.app') @extends('admin.app')
@section('title', 'Add Fare') @section('title', 'Add Fare')
@section('content') @section('content')
<div class="card border-blue-bottom"> <div class="card border-blue-bottom">
<div class="content"> <div class="content">
{{ Form::open(['route' => 'admin.fares.store']) }} {{ Form::open(['route' => 'admin.fares.store']) }}
@include('admin.fares.fields') @include('admin.fares.fields')
{{ Form::close() }} {{ Form::close() }}
</div>
</div> </div>
</div>
@endsection @endsection

View File

@@ -1,11 +1,11 @@
@extends('admin.app') @extends('admin.app')
@section('title', "Edit \"$fare->name\"") @section('title', "Edit \"$fare->name\"")
@section('content') @section('content')
<div class="card border-blue-bottom"> <div class="card border-blue-bottom">
<div class="content"> <div class="content">
{{ Form::model($fare, ['route' => ['admin.fares.update', $fare->id], 'method' => 'patch']) }} {{ Form::model($fare, ['route' => ['admin.fares.update', $fare->id], 'method' => 'patch']) }}
@include('admin.fares.fields') @include('admin.fares.fields')
{{ Form::close() }} {{ Form::close() }}
</div> </div>
</div> </div>
@endsection @endsection

View File

@@ -1,79 +1,79 @@
<div class="row"> <div class="row">
<div class="col-md-12"> <div class="col-md-12">
<div class="callout callout-success"> <div class="callout callout-success">
When a fare is assigned to a subfleet, the price, cost and capacity can be overridden, 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 so you can create default values that will apply to most of your subfleets, and change
them where they will differ. them where they will differ.
</div>
<br />
</div> </div>
<br/>
</div>
</div> </div>
<div class="row"> <div class="row">
<div class="form-group col-sm-6"> <div class="form-group col-sm-6">
{{ Form::label('code', 'Code:') }}&nbsp;<span class="required">*</span> {{ Form::label('code', 'Code:') }}&nbsp;<span class="required">*</span>
@component('admin.components.info') @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 @endcomponent
{{ Form::text('code', null, ['class' => 'form-control']) }} {{ Form::text('code', null, ['class' => 'form-control']) }}
<p class="text-danger">{{ $errors->first('code') }}</p> <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:') }}&nbsp;<span class="required">*</span> {{ Form::label('name', 'Name:') }}&nbsp;<span class="required">*</span>
@component('admin.components.info') @component('admin.components.info')
The fare class name, E.g, "Economy" or "First" The fare class name, E.g, "Economy" or "First"
@endcomponent @endcomponent
{{ Form::text('name', null, ['class' => 'form-control']) }} {{ Form::text('name', null, ['class' => 'form-control']) }}
<p class="text-danger">{{ $errors->first('name') }}</p> <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:') }} {{ Form::label('price', 'Price:') }}
@component('admin.components.info') @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 @endcomponent
{{ Form::text('price', null, ['class' => 'form-control', 'placeholder' => 0]) }} {{ Form::text('price', null, ['class' => 'form-control', 'placeholder' => 0]) }}
<p class="text-danger">{{ $errors->first('price') }}</p> <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:') }} {{ Form::label('cost', 'Cost:') }}
@component('admin.components.info') @component('admin.components.info')
The operating cost The operating cost
@endcomponent @endcomponent
{{ Form::number('cost', null, ['class' => 'form-control', 'placeholder' => 0, 'step' => '0.01']) }} {{ Form::number('cost', null, ['class' => 'form-control', 'placeholder' => 0, 'step' => '0.01']) }}
<p class="text-danger">{{ $errors->first('cost') }}</p> <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:') }} {{ Form::label('capacity', 'Capacity:') }}
@component('admin.components.info') @component('admin.components.info')
The number of seats available in this class. The number of seats available in this class.
@endcomponent @endcomponent
{{ Form::number('capacity', null, ['class' => 'form-control', 'min' => 0]) }} {{ Form::number('capacity', null, ['class' => 'form-control', 'min' => 0]) }}
<p class="text-danger">{{ $errors->first('capacity') }}</p> <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::label('notes', 'Notes:') }}
{{ Form::text('notes', null, ['class' => 'form-control']) }} {{ Form::text('notes', null, ['class' => 'form-control']) }}
<p class="text-danger">{{ $errors->first('notes') }}</p> <p class="text-danger">{{ $errors->first('notes') }}</p>
</div> </div>
<!-- Active Field --> <!-- Active Field -->
<div class="form-group col-sm-12"> <div class="form-group col-sm-12">
{{ Form::label('active', 'Active:') }} {{ Form::label('active', 'Active:') }}
<label class="checkbox-inline"> <label class="checkbox-inline">
{{ Form::hidden('active', 0, false) }} {{ Form::hidden('active', 0, false) }}
{{ Form::checkbox('active', 1, null) }} {{ Form::checkbox('active', 1, null) }}
</label> </label>
</div> </div>
<!-- Submit Field --> <!-- Submit Field -->
<div class="form-group col-sm-12"> <div class="form-group col-sm-12">
<div class="pull-right"> <div class="pull-right">
{{ Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-success']) }} {{ Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-success']) }}
<a href="{{ route('admin.fares.index') }}" class="btn btn-warn">Cancel</a> <a href="{{ route('admin.fares.index') }}" class="btn btn-warn">Cancel</a>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -1,5 +1,5 @@
@extends('admin.app') @extends('admin.app')
@section('title', 'Import Fares') @section('title', 'Import Fares')
@section('content') @section('content')
@include('admin.common.import', ['route' => 'admin.fares.import']) @include('admin.common.import', ['route' => 'admin.fares.import'])
@endsection @endsection

View File

@@ -2,16 +2,16 @@
@section('title', 'Fares') @section('title', 'Fares')
@section('actions') @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.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.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.create') }}"><i class="ti-plus"></i>Add New</a></li>
@endsection @endsection
@section('content') @section('content')
<div class="card border-blue-bottom"> <div class="card border-blue-bottom">
<div class="content"> <div class="content">
@include('admin.fares.table') @include('admin.fares.table')
</div>
</div> </div>
</div>
@endsection @endsection

View File

@@ -1,9 +1,9 @@
@extends('admin.app') @extends('admin.app')
@section('content') @section('content')
<div class="card border-blue-bottom"> <div class="card border-blue-bottom">
<div class="content"> <div class="content">
@include('admin.fares.show_fields') @include('admin.fares.show_fields')
</div> </div>
</div> </div>
@endsection @endsection

View File

@@ -1,35 +1,35 @@
<!-- Code Field --> <!-- Code Field -->
<div class="form-group"> <div class="form-group">
{{ Form::label('code', 'Code:') }} {{ Form::label('code', 'Code:') }}
<p>{{ $fare->code }}</p> <p>{{ $fare->code }}</p>
</div> </div>
<!-- Name Field --> <!-- Name Field -->
<div class="form-group"> <div class="form-group">
{{ Form::label('name', 'Name:') }} {{ Form::label('name', 'Name:') }}
<p>{{ $fare->name }}</p> <p>{{ $fare->name }}</p>
</div> </div>
<!-- Price Field --> <!-- Price Field -->
<div class="form-group"> <div class="form-group">
{{ Form::label('price', 'Price:') }} {{ Form::label('price', 'Price:') }}
<p>{{ $fare->price }}</p> <p>{{ $fare->price }}</p>
</div> </div>
<!-- Cost Field --> <!-- Cost Field -->
<div class="form-group"> <div class="form-group">
{{ Form::label('cost', 'Cost:') }} {{ Form::label('cost', 'Cost:') }}
<p>{{ $fare->cost }}</p> <p>{{ $fare->cost }}</p>
</div> </div>
<!-- Notes Field --> <!-- Notes Field -->
<div class="form-group"> <div class="form-group">
{{ Form::label('notes', 'Notes:') }} {{ Form::label('notes', 'Notes:') }}
<p>{{ $fare->notes }}</p> <p>{{ $fare->notes }}</p>
</div> </div>
<!-- Active Field --> <!-- Active Field -->
<div class="form-group"> <div class="form-group">
{{ Form::label('active', 'Active:') }} {{ Form::label('active', 'Active:') }}
<p>{{ $fare->active }}</p> <p>{{ $fare->active }}</p>
</div> </div>

View File

@@ -1,36 +1,36 @@
<table class="table table-hover table-responsive" id="fares-table"> <table class="table table-hover table-responsive" id="fares-table">
<thead> <thead>
<th>Code</th> <th>Code</th>
<th>Name</th> <th>Name</th>
<th>Price</th> <th>Price</th>
<th>Cost</th> <th>Cost</th>
<th>Notes</th> <th>Notes</th>
<th class="text-center">Active</th> <th class="text-center">Active</th>
<th class="text-right">Action</th> <th class="text-right">Action</th>
</thead> </thead>
<tbody> <tbody>
@foreach($fares as $fare) @foreach($fares as $fare)
<tr> <tr>
<td><a href="{{ route('admin.fares.edit', [$fare->id]) }}">{{ $fare->code }}</a></td> <td><a href="{{ route('admin.fares.edit', [$fare->id]) }}">{{ $fare->code }}</a></td>
<td>{{ $fare->name }}</td> <td>{{ $fare->name }}</td>
<td>{{ $fare->price }}</td> <td>{{ $fare->price }}</td>
<td>{{ $fare->cost }}</td> <td>{{ $fare->cost }}</td>
<td>{{ $fare->notes }}</td> <td>{{ $fare->notes }}</td>
<td class="text-center"> <td class="text-center">
@if($fare->active == 1) @if($fare->active == 1)
<span class="label label-success">Active</span> <span class="label label-success">Active</span>
@else @else
<span class="label label-default">Inactive</span> <span class="label label-default">Inactive</span>
@endif @endif
</td> </td>
<td class="text-right"> <td class="text-right">
{{ Form::open(['route' => ['admin.fares.destroy', $fare->id], 'method' => 'delete']) }} {{ 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'> <a href="{{ route('admin.fares.edit', [$fare->id]) }}" class='btn btn-sm btn-success btn-icon'>
<i class="fas fa-pencil-alt"></i></a> <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::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() }} {{ Form::close() }}
</td> </td>
</tr> </tr>
@endforeach @endforeach
</tbody> </tbody>
</table> </table>

View File

@@ -2,23 +2,23 @@
@section('title', 'Financial Reports') @section('title', 'Financial Reports')
@section('actions') @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 @endsection
@section('content') @section('content')
<div class="card border-blue-bottom"> <div class="card border-blue-bottom">
<div class="content"> <div class="content">
<div style="float:right;"> <div style="float:right;">
{{ Form::select( {{ Form::select(
'month_select', 'month_select',
$months_list, $months_list,
$current_month, $current_month,
['id' => 'month_select'] ['id' => 'month_select']
) }} ) }}
</div> </div>
@include('admin.finances.table') @include('admin.finances.table')
</div>
</div> </div>
</div>
@endsection @endsection
@include('admin.finances.scripts') @include('admin.finances.scripts')

View File

@@ -1,12 +1,12 @@
@section('scripts') @section('scripts')
<script> <script>
$(document).ready(() => { $(document).ready(() => {
const select_id = "select#month_select"; const select_id = "select#month_select";
$(select_id).change((e) => { $(select_id).change((e) => {
const date = $(select_id + " option:selected").val(); const date = $(select_id + " option:selected").val();
const location = window.location.toString().split('?')[0]; const location = window.location.toString().split('?')[0];
window.location = location + '?month='+date; window.location = location + '?month=' + date;
});
}); });
}); </script>
</script>
@endsection @endsection

View File

@@ -1,63 +1,62 @@
@foreach($transaction_groups as $group) @foreach($transaction_groups as $group)
<h3>{{ $group['airline']->icao }} - {{ $group['airline']->name }}</h3> <h3>{{ $group['airline']->icao }} - {{ $group['airline']->name }}</h3>
<table <table
id="finances-table" id="finances-table"
style="width: 95%; margin: 0px auto;" style="width: 95%; margin: 0px auto;"
class="table table-hover table-responsive"> class="table table-hover table-responsive">
<thead> <thead>
<th>Expenses</th> <th>Expenses</th>
<th>Credit</th> <th>Credit</th>
<th>Debit</th> <th>Debit</th>
</thead> </thead>
<tbody> <tbody>
@foreach($group['transactions'] as $ta) @foreach($group['transactions'] as $ta)
<tr> <tr>
<td> <td>
{{ $ta->transaction_group }} {{ $ta->transaction_group }}
</td> </td>
<td> <td>
@if($ta->sum_credits) @if($ta->sum_credits)
{{ money($ta->sum_credits, $ta->currency) }} {{ money($ta->sum_credits, $ta->currency) }}
@endif @endif
</td> </td>
<td> <td>
@if($ta->sum_debits) @if($ta->sum_debits)
<i>{{ money($ta->sum_debits, $ta->currency) }}</i> <i>{{ money($ta->sum_debits, $ta->currency) }}</i>
@endif @endif
</td> </td>
</tr> </tr>
@endforeach @endforeach
{{-- show sums --}} {{-- show sums --}}
<tr> <tr>
<td></td> <td></td>
<td> <td>
{{ $group['credits'] }} {{ $group['credits'] }}
</td> </td>
<td> <td>
<i>{{ $group['debits'] }}</i> <i>{{ $group['debits'] }}</i>
</td> </td>
</tr> </tr>
{{-- final total --}} {{-- final total --}}
<tr style="border-top: 3px; border-top-style: double;"> <tr style="border-top: 3px; border-top-style: double;">
<td></td> <td></td>
<td align="right"> <td align="right">
<b>Total</b> <b>Total</b>
</td> </td>
<td> <td>
{{ $group['credits']->subtract($group['debits']) }} {{ $group['credits']->subtract($group['debits']) }}
</td> </td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
@if(!$loop->last) @if(!$loop->last)
<hr> <hr>
@endif @endif
@endforeach @endforeach

View File

@@ -1,6 +1,6 @@
@if($errors->has($field)) @if($errors->has($field))
<p class="text-danger" style="margin-top: 10px;">{{ $errors->first($field) }}</p> <p class="text-danger" style="margin-top: 10px;">{{ $errors->first($field) }}</p>
{{--<div class="alert alert-danger" role="alert" style="margin-top: 10px;"> {{--<div class="alert alert-danger" role="alert" style="margin-top: 10px;">
{{ $errors->first($field) }} {{ $errors->first($field) }}
</div>--}} </div>--}}
@endif @endif

View File

@@ -1,30 +1,31 @@
@foreach (session('flash_notification', []) as $message) @foreach (session('flash_notification', []) as $message)
@if ($message['overlay']) @if ($message['overlay'])
@include('flash::modal', [ @include('flash::modal', [
'modalClass' => 'flash-modal', 'modalClass' => 'flash-modal',
'title' => $message['title'], 'title' => $message['title'],
'body' => $message['message'] 'body' => $message['message']
]) ])
@else @else
<div class="alert <div class="alert
alert-{{ $message['level'] }} alert-{{ $message['level'] }}
{{ $message['important'] ? 'alert-important' : '' }}" {{ $message['important'] ? 'alert-important' : '' }}"
role="alert" role="alert"
> >
<div class="alert-icon"> <div class="alert-icon">
<i class="now-ui-icons ui-2_like"></i> <i class="now-ui-icons ui-2_like"></i>
</div> </div>
@if ($message['important']) @if ($message['important'])
@endif @endif
<button type="button" <button type="button"
class="close" class="close"
data-dismiss="alert" data-dismiss="alert"
aria-hidden="true">&times;</button> aria-hidden="true">&times;
</button>
{{ $message['message'] }} {{ $message['message'] }}
</div> </div>
@endif @endif
@endforeach @endforeach
{{ session()->forget('flash_notification') }} {{ session()->forget('flash_notification') }}

View File

@@ -1,11 +1,11 @@
@extends('admin.app') @extends('admin.app')
@section('title', 'Adding Field') @section('title', 'Adding Field')
@section('content') @section('content')
<div class="card border-blue-bottom"> <div class="card border-blue-bottom">
<div class="content"> <div class="content">
{{ Form::open(['route' => 'admin.flightfields.store']) }} {{ Form::open(['route' => 'admin.flightfields.store']) }}
@include('admin.flightfields.fields') @include('admin.flightfields.fields')
{{ Form::close() }} {{ Form::close() }}
</div>
</div> </div>
</div>
@endsection @endsection

View File

@@ -1,11 +1,11 @@
@extends('admin.app') @extends('admin.app')
@section('title', 'Editing ' . $field->name) @section('title', 'Editing ' . $field->name)
@section('content') @section('content')
<div class="card border-blue-bottom"> <div class="card border-blue-bottom">
<div class="content"> <div class="content">
{{ Form::model($field, ['route' => ['admin.flightfields.update', $field->id], 'method' => 'patch']) }} {{ Form::model($field, ['route' => ['admin.flightfields.update', $field->id], 'method' => 'patch']) }}
@include('admin.flightfields.fields') @include('admin.flightfields.fields')
{{ Form::close() }} {{ Form::close() }}
</div> </div>
</div> </div>
@endsection @endsection

View File

@@ -1,14 +1,14 @@
<div class="row"> <div class="row">
<div class="form-group col-sm-6"> <div class="form-group col-sm-6">
{{ Form::label('name', 'Name:') }}&nbsp;&nbsp;<span class="required">*</span> {{ Form::label('name', 'Name:') }}&nbsp;&nbsp;<span class="required">*</span>
{{ Form::text('name', null, ['class' => 'form-control']) }} {{ Form::text('name', null, ['class' => 'form-control']) }}
<p class="text-danger">{{ $errors->first('name') }}</p> <p class="text-danger">{{ $errors->first('name') }}</p>
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<!-- Submit Field --> <!-- Submit Field -->
<div class="form-group col-sm-12"> <div class="form-group col-sm-12">
{{ Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-success']) }} {{ Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-success']) }}
<a href="{{ route('admin.flightfields.index') }}" class="btn btn-default">Cancel</a> <a href="{{ route('admin.flightfields.index') }}" class="btn btn-default">Cancel</a>
</div> </div>
</div> </div>

View File

@@ -1,18 +1,18 @@
@extends('admin.app') @extends('admin.app')
@section('title', 'Flight Fields') @section('title', 'Flight Fields')
@section('actions') @section('actions')
<li><a href="{{ route('admin.flightfields.create') }}"><i class="ti-plus"></i>Add Field</a></li> <li><a href="{{ route('admin.flightfields.create') }}"><i class="ti-plus"></i>Add Field</a></li>
<li> <li>
<a href="{{ route('admin.flights.create') }}"> <a href="{{ route('admin.flights.create') }}">
<i class="ti-plus"></i> <i class="ti-plus"></i>
Add Flight</a> Add Flight</a>
</li> </li>
@endsection @endsection
@section('content') @section('content')
<div class="card border-blue-bottom"> <div class="card border-blue-bottom">
<div class="content"> <div class="content">
@include('admin.flightfields.table') @include('admin.flightfields.table')
</div>
</div> </div>
</div>
@endsection @endsection

View File

@@ -1,34 +1,34 @@
<div class="content table-responsive table-full-width"> <div class="content table-responsive table-full-width">
<div class="header"> <div class="header">
@component('admin.components.info') @component('admin.components.info')
Flights fields that can be filled out. You can still add other custom fields 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. directly in the flight, but this provides a template for all flights.
@endcomponent @endcomponent
</div> </div>
<table class="table table-hover table-responsive" id="pirepFields-table"> <table class="table table-hover table-responsive" id="pirepFields-table">
<thead> <thead>
<th>Name</th> <th>Name</th>
<th></th> <th></th>
</thead> </thead>
<tbody> <tbody>
@foreach($fields as $field) @foreach($fields as $field)
<tr> <tr>
<td>{{ $field->name }}</td> <td>{{ $field->name }}</td>
<td class="text-right"> <td class="text-right">
{{ Form::open(['route' => ['admin.flightfields.destroy', $field->id], 'method' => 'delete']) }} {{ Form::open(['route' => ['admin.flightfields.destroy', $field->id], 'method' => 'delete']) }}
<a href="{{ route('admin.flightfields.edit', [$field->id]) }}" <a href="{{ route('admin.flightfields.edit', [$field->id]) }}"
class='btn btn-sm btn-success btn-icon'> class='btn btn-sm btn-success btn-icon'>
<i class="fas fa-pencil-alt"></i></a> <i class="fas fa-pencil-alt"></i></a>
{{ Form::button('<i class="fa fa-times"></i>', {{ Form::button('<i class="fa fa-times"></i>',
['type' => 'submit', 'class' => 'btn btn-sm btn-danger btn-icon', ['type' => 'submit', 'class' => 'btn btn-sm btn-danger btn-icon',
'onclick' => "return confirm('Are you sure?')"]) }} 'onclick' => "return confirm('Are you sure?')"]) }}
{{ Form::close() }} {{ Form::close() }}
</td> </td>
</tr> </tr>
@endforeach @endforeach
</tbody> </tbody>
</table> </table>
</div> </div>

View File

@@ -1,11 +1,11 @@
@extends('admin.app') @extends('admin.app')
@section('title', 'Add Flight') @section('title', 'Add Flight')
@section('content') @section('content')
<div class="card border-blue-bottom"> <div class="card border-blue-bottom">
<div class="content"> <div class="content">
{{ Form::model($flight, ['route' => ['admin.flights.store']]) }} {{ Form::model($flight, ['route' => ['admin.flights.store']]) }}
@include('admin.flights.fields') @include('admin.flights.fields')
{{ Form::close() }} {{ Form::close() }}
</div>
</div> </div>
</div>
@endsection @endsection

View File

@@ -2,30 +2,30 @@
@section('title', 'Edit Flight') @section('title', 'Edit Flight')
@section('content') @section('content')
<div class="card border-blue-bottom"> <div class="card border-blue-bottom">
<div class="content"> <div class="content">
{{ Form::model($flight, ['route' => ['admin.flights.update', $flight->id], 'method' => 'patch']) }} {{ Form::model($flight, ['route' => ['admin.flights.update', $flight->id], 'method' => 'patch']) }}
@include('admin.flights.fields') @include('admin.flights.fields')
{{ Form::close() }} {{ Form::close() }}
</div>
</div> </div>
</div>
<div class="card border-blue-bottom"> <div class="card border-blue-bottom">
<div class="content"> <div class="content">
@include('admin.flights.subfleets') @include('admin.flights.subfleets')
</div>
</div> </div>
</div>
<div class="card border-blue-bottom"> <div class="card border-blue-bottom">
<div class="content"> <div class="content">
@include('admin.flights.flight_fields') @include('admin.flights.flight_fields')
</div>
</div> </div>
</div>
<div class="card border-blue-bottom"> <div class="card border-blue-bottom">
<div class="content"> <div class="content">
@include('admin.flights.fares') @include('admin.flights.fares')
</div>
</div> </div>
</div>
@endsection @endsection
@include('admin.flights.scripts') @include('admin.flights.scripts')

View File

@@ -1,86 +1,86 @@
<div id="flight_fares_wrapper" class="dataTables_wrapper form-inline dt-bootstrap"> <div id="flight_fares_wrapper" class="dataTables_wrapper form-inline dt-bootstrap">
<div class="header"> <div class="header">
<h3>fares</h3> <h3>fares</h3>
@component('admin.components.info') @component('admin.components.info')
Fares assigned to the current flight. These can be overridden, otherwise, 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 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 filed with. Only assign the fares you want to override. They can be set as
a monetary amount, or a percentage. a monetary amount, or a percentage.
<a href="http://docs.phpvms.net/concepts/finances" <a href="http://docs.phpvms.net/concepts/finances"
target="_blank">Read documentation about finances</a>. target="_blank">Read documentation about finances</a>.
@endcomponent @endcomponent
<p class="text-danger">{{ $errors->first('value') }}</p> <p class="text-danger">{{ $errors->first('value') }}</p>
</div> </div>
@if(count($flight->fares) === 0) @if(count($flight->fares) === 0)
@include('admin.common.none_added', ['type' => 'fares']) @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 @endif
<tbody>
<table id="flight_fares" @foreach($flight->fares as $atf)
class="table table-hover" <tr>
role="grid" aria-describedby="aircraft_fares_info"> <td class="sorting_1">{{ $atf->name }}</td>
@if(count($flight->fares)) <td style="text-align: center;">{{ $atf->code }}</td>
<thead> <td>
<tr role="row"> <a href="#" data-pk="{{ $atf->id }}" data-name="capacity">{{ $atf->pivot->capacity }}</a>
<th>Name</th> </td>
<th style="text-align: center;">Code</th> <td>
<th>Capacity</th> <a href="#" data-pk="{{ $atf->id }}" data-name="price">{{ $atf->pivot->price }}</a>
<th>Price</th> </td>
<th>Cost</th> <td>
<th>Actions</th> <a href="#" data-pk="{{ $atf->id }}" data-name="cost">{{ $atf->pivot->cost }}</a>
</tr> </td>
</thead> <td style="text-align: center; width:3%;">
@endif {{ Form::open(['url' => '/admin/flights/'.$flight->id.'/fares',
<tbody> 'method' => 'delete',
@foreach($flight->fares as $atf) 'class' => 'pjax_fares_form'
<tr> ])
<td class="sorting_1">{{ $atf->name }}</td> }}
<td style="text-align: center;">{{ $atf->code }}</td> {{ Form::hidden('fare_id', $atf->id) }}
<td> {{ Form::button('<i class="fa fa-times"></i>',
<a href="#" data-pk="{{ $atf->id }}" data-name="capacity">{{ $atf->pivot->capacity }}</a> ['type' => 'submit',
</td> 'class' => 'btn btn-danger btn-xs']) }}
<td> {{ Form::close() }}
<a href="#" data-pk="{{ $atf->id }}" data-name="price">{{ $atf->pivot->price }}</a> </td>
</td> </tr>
<td> @endforeach
<a href="#" data-pk="{{ $atf->id }}" data-name="cost">{{ $atf->pivot->cost }}</a> </tbody>
</td> </table>
<td style="text-align: center; width:3%;"> <hr/>
{{ Form::open(['url' => '/admin/flights/'.$flight->id.'/fares', <div class="row">
'method' => 'delete', <div class="col-xs-12">
'class' => 'pjax_fares_form' <div class="text-right">
]) {{ Form::open(['url' => '/admin/flights/'.$flight->id.'/fares',
}} 'method' => 'post',
{{ Form::hidden('fare_id', $atf->id) }} 'class' => 'pjax_fares_form form-inline'
{{ Form::button('<i class="fa fa-times"></i>', ]) }}
['type' => 'submit', {{ Form::select('fare_id', $avail_fares, null, [
'class' => 'btn btn-danger btn-xs']) }} 'placeholder' => 'Select Fare',
{{ Form::close() }} 'class' => 'ac-fare-dropdown form-control input-lg select2',
</td> 'style' => 'width: 400px;',
</tr> ]) }}
@endforeach {{ Form::button('<i class="glyphicon glyphicon-plus"></i> add', [
</tbody> 'type' => 'submit',
</table> 'class' => 'btn btn-success btn-s']
<hr /> ) }}
<div class="row"> {{ Form::close() }}
<div class="col-xs-12"> </div>
<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>
</div>
</div> </div>

Some files were not shown because too many files have changed in this diff Show More