- fixed an error on finance in admin panel
- flight ident now use this format: VA IATA(if empty ICAO) + Flight Number + - + Flight Code (without C) + - + Flight Leg (without L) - added function __trans_choice in helpers.php for translation - fixed error in flight edit/insert panel not showing/inserting Tuesday in days - fixed an error occurring when metar retrieved is empty - edited now-ui-kit.css to align login fields correctly - added /public/assets/frontend/js/core/jquery-3.3.1.min.js to fix a missed resource error in authentication pages - added translations file for en and it locales - translated all the frontend templates
This commit is contained in:
committed by
Nabeel Shahzad
parent
77a2fd70c3
commit
ba8a819c7d
@@ -1,10 +1,10 @@
|
||||
@extends('app')
|
||||
@section('title', 'File Flight Report')
|
||||
@section('title', __('File Flight Report'))
|
||||
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<h2>New Flight Report</h2>
|
||||
<h2>{{ __('New Flight Report') }}</h2>
|
||||
@include('flash::message')
|
||||
{{ Form::open(['route' => 'frontend.pireps.store']) }}
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
@extends('app')
|
||||
@section('title', 'Edit Flight Report')
|
||||
@section('title', __('Edit Flight Report'))
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<h2>Edit Flight Report</h2>
|
||||
<h2>{{ __('Edit Flight Report') }}</h2>
|
||||
@include('flash::message')
|
||||
{{ Form::model($pirep, [
|
||||
'route' => ['frontend.pireps.update', $pirep->id],
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
@if($aircraft)
|
||||
<div class="form-container">
|
||||
<h6><i class="fas fa-ellipsis-h"></i>
|
||||
Fares
|
||||
{{ __('Fare', 2) }}
|
||||
</h6>
|
||||
<div class="form-container-body">
|
||||
@foreach($aircraft->subfleet->fares as $fare)
|
||||
|
||||
@@ -12,7 +12,7 @@ flight reports that have been filed. You've been warned!
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
@component('components.info')
|
||||
Once a PIREP has been accepted/rejected, certain fields go into read-only mode.
|
||||
{{ __('Once a PIREP has been accepted/rejected, certain fields go into read-only mode.') }}
|
||||
@endcomponent
|
||||
</div>
|
||||
</div>
|
||||
@@ -21,12 +21,12 @@ flight reports that have been filed. You've been warned!
|
||||
<div class="col-8">
|
||||
<div class="form-container">
|
||||
<h6><i class="fas fa-info-circle"></i>
|
||||
Flight Information
|
||||
{{ __('Flight Informations') }}
|
||||
</h6>
|
||||
<div class="form-container-body">
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
{{ Form::label('airline_id', 'Airline') }}
|
||||
{{ Form::label('airline_id', __('Airline')) }}
|
||||
@if(!empty($pirep) && $pirep->read_only)
|
||||
<p>{{ $pirep->airline->name }}</p>
|
||||
{{ Form::hidden('airline_id') }}
|
||||
@@ -42,7 +42,7 @@ flight reports that have been filed. You've been warned!
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
{{ Form::label('flight_number', 'Flight Number/Code/Leg') }}
|
||||
{{ Form::label('flight_number', __('Flight Number/Code/Leg')) }}
|
||||
@if(!empty($pirep) && $pirep->read_only)
|
||||
<p>{{ $pirep->ident }}
|
||||
{{ Form::hidden('flight_number') }}
|
||||
@@ -52,19 +52,19 @@ flight reports that have been filed. You've been warned!
|
||||
@else
|
||||
<div class="input-group input-group-sm mb3">
|
||||
{{ Form::text('flight_number', null, [
|
||||
'placeholder' => 'Flight Number',
|
||||
'placeholder' => __('Flight Number'),
|
||||
'class' => 'form-control',
|
||||
'readonly' => (!empty($pirep) && $pirep->read_only),
|
||||
]) }}
|
||||
|
||||
{{ Form::text('route_code', null, [
|
||||
'placeholder' => 'Code (optional)',
|
||||
'placeholder' => __('Code (optional)'),
|
||||
'class' => 'form-control',
|
||||
'readonly' => (!empty($pirep) && $pirep->read_only),
|
||||
]) }}
|
||||
|
||||
{{ Form::text('route_leg', null, [
|
||||
'placeholder' => 'Leg (optional)',
|
||||
'placeholder' => __('Leg (optional)'),
|
||||
'class' => 'form-control',
|
||||
'readonly' => (!empty($pirep) && $pirep->read_only),
|
||||
]) }}
|
||||
@@ -75,7 +75,7 @@ flight reports that have been filed. You've been warned!
|
||||
@endif
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
{{ Form::label('flight_type', 'Flight Type') }}
|
||||
{{ Form::label('flight_type', __('Flight Type')) }}
|
||||
@if(!empty($pirep) && $pirep->read_only)
|
||||
<p>{{ \App\Models\Enums\FlightType::label($pirep->flight_type) }}</p>
|
||||
{{ Form::hidden('flight_type') }}
|
||||
@@ -96,10 +96,10 @@ flight reports that have been filed. You've been warned!
|
||||
|
||||
<div class="row">
|
||||
<div class="col-3">
|
||||
{{ Form::label('hours', 'Flight Time') }}
|
||||
{{ Form::label('hours', __('Flight Time')) }}
|
||||
@if(!empty($pirep) && $pirep->read_only)
|
||||
<p>
|
||||
{{ $pirep->hours }} hours, {{ $pirep->minutes }} minutes
|
||||
{{ $pirep->hours.' '.__trans_choice('Hour', $pirep->hours) }}, {{ $pirep->minutes.' '.__trans_choice('Minute', $pirep->minutes) }}
|
||||
{{ Form::hidden('hours') }}
|
||||
{{ Form::hidden('minutes') }}
|
||||
</p>
|
||||
@@ -107,14 +107,14 @@ flight reports that have been filed. You've been warned!
|
||||
<div class="input-group input-group-sm" style="max-width: 200px;">
|
||||
{{ Form::number('hours', null, [
|
||||
'class' => 'form-control',
|
||||
'placeholder' => 'hours',
|
||||
'placeholder' => __trans_choice('Hour', 2),
|
||||
'min' => '0',
|
||||
'readonly' => (!empty($pirep) && $pirep->read_only),
|
||||
]) }}
|
||||
|
||||
{{ Form::number('minutes', null, [
|
||||
'class' => 'form-control',
|
||||
'placeholder' => 'minutes',
|
||||
'placeholder' => __trans_choice('Minute', 2),
|
||||
'min' => 0,
|
||||
'readonly' => (!empty($pirep) && $pirep->read_only),
|
||||
]) }}
|
||||
@@ -126,27 +126,27 @@ flight reports that have been filed. You've been warned!
|
||||
|
||||
|
||||
<div class="col-3">
|
||||
{{--{{ Form::label('submitted_date', 'Date Flown') }}
|
||||
{{--{{ Form::label('submitted_date', __('Date Flown')) }}
|
||||
{{ Form::text('submmitted_date', null, [
|
||||
'placeholder' => 'Departure TIme',
|
||||
'placeholder' => __('Departure Date'),
|
||||
'class' => 'form-control',
|
||||
'readonly' => $pirep->read_only]) }}--}}
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-3">
|
||||
{{--{{ Form::label('departure_time', 'Departure Time') }}
|
||||
{{--{{ Form::label('departure_time', __('Departure Time')) }}
|
||||
{{ Form::text('departure_time', null, [
|
||||
'placeholder' => 'Departure TIme',
|
||||
'placeholder' => __('Departure TIme'),
|
||||
'class' => 'form-control',
|
||||
'readonly' => $pirep->read_only]) }}--}}
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-3">
|
||||
{{--{{ Form::label('arrival_time', 'Arrival Time') }}
|
||||
{{--{{ Form::label('arrival_time', __('Arrival Time')) }}
|
||||
{{ Form::text('arrival_time', null, [
|
||||
'placeholder' => 'Arrival TIme',
|
||||
'placeholder' => __('Arrival TIme'),
|
||||
'class' => 'form-control',
|
||||
'readonly' => $pirep->read_only]) }}--}}
|
||||
</div>
|
||||
@@ -158,12 +158,12 @@ flight reports that have been filed. You've been warned!
|
||||
|
||||
<div class="form-container">
|
||||
<h6><i class="fas fa-globe"></i>
|
||||
Arrival/Departure Information
|
||||
{{ __('Departure/Arrival Informations') }}
|
||||
</h6>
|
||||
<div class="form-container-body">
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
{{ Form::label('dpt_airport_id', 'Departure Airport') }}
|
||||
{{ Form::label('dpt_airport_id', __('Departure Airport')) }}
|
||||
@if(!empty($pirep) && $pirep->read_only)
|
||||
{{ $pirep->dpt_airport->name }}
|
||||
(<a href="{{route('frontend.airports.show', [
|
||||
@@ -183,7 +183,7 @@ flight reports that have been filed. You've been warned!
|
||||
</div>
|
||||
|
||||
<div class="col-6">
|
||||
{{ Form::label('arr_airport_id', 'Arrival Airport') }}
|
||||
{{ Form::label('arr_airport_id', __('Arrival Airport')) }}
|
||||
@if(!empty($pirep) && $pirep->read_only)
|
||||
{{ $pirep->arr_airport->name }}
|
||||
(<a href="{{route('frontend.airports.show', [
|
||||
@@ -207,12 +207,12 @@ flight reports that have been filed. You've been warned!
|
||||
|
||||
<div class="form-container">
|
||||
<h6><i class="fab fa-avianex"></i>
|
||||
Aircraft Information
|
||||
{{ __('Aircraft Informations') }}
|
||||
</h6>
|
||||
<div class="form-container-body">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
{{ Form::label('aircraft_id', 'Aircraft') }}
|
||||
{{ Form::label('aircraft_id', __('Aircraft')) }}
|
||||
@if(!empty($pirep) && $pirep->read_only)
|
||||
<p>{{ $pirep->aircraft->name }}</p>
|
||||
{{ Form::hidden('aircraft_id') }}
|
||||
@@ -234,13 +234,13 @@ flight reports that have been filed. You've been warned!
|
||||
|
||||
<div class="form-container">
|
||||
<h6><i class="far fa-comments"></i>
|
||||
Route
|
||||
{{ __('Route') }}
|
||||
</h6>
|
||||
<div class="form-container-body">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="input-group input-group-sm form-group">
|
||||
{{ Form::textarea('route', null, ['class' => 'form-control', 'placeholder' => 'Route']) }}
|
||||
{{ Form::textarea('route', null, ['class' => 'form-control', 'placeholder' => __('Route')]) }}
|
||||
<p class="text-danger">{{ $errors->first('route') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -250,13 +250,13 @@ flight reports that have been filed. You've been warned!
|
||||
|
||||
<div class="form-container">
|
||||
<h6><i class="far fa-comments"></i>
|
||||
Remarks
|
||||
{{ __('Remarks') }}
|
||||
</h6>
|
||||
<div class="form-container-body">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="input-group input-group-sm form-group">
|
||||
{{ Form::textarea('notes', null, ['class' => 'form-control', 'placeholder' => 'Notes']) }}
|
||||
{{ Form::textarea('notes', null, ['class' => 'form-control', 'placeholder' => __('Notes')]) }}
|
||||
<p class="text-danger">{{ $errors->first('notes') }}</p>
|
||||
</div>
|
||||
</div>
|
||||
@@ -269,7 +269,7 @@ flight reports that have been filed. You've been warned!
|
||||
|
||||
<div class="form-container">
|
||||
<h6><i class="fab fa-wpforms"></i>
|
||||
Fields
|
||||
{{ __trans_choice('Field', 2) }}
|
||||
</h6>
|
||||
<div class="form-container-body">
|
||||
|
||||
@@ -310,25 +310,25 @@ flight reports that have been filed. You've been warned!
|
||||
<div class="form-group">
|
||||
|
||||
@if(isset($pirep) && !$pirep->read_only)
|
||||
{{ Form::button('Delete PIREP', [
|
||||
{{ Form::button(__('Delete PIREP'), [
|
||||
'name' => 'submit',
|
||||
'value' => 'cancel',
|
||||
'value' => 'Delete',
|
||||
'class' => 'btn btn-warning',
|
||||
'type' => 'submit'])
|
||||
}}
|
||||
@endif
|
||||
|
||||
@if(!isset($pirep) || (filled($pirep) && !$pirep->read_only))
|
||||
{{ Form::button('Save PIREP', [
|
||||
{{ Form::button(__('Save PIREP'), [
|
||||
'name' => 'submit',
|
||||
'value' => 'save',
|
||||
'value' => 'Save',
|
||||
'class' => 'btn btn-info',
|
||||
'type' => 'submit'])
|
||||
}}
|
||||
|
||||
{{ Form::button('Submit PIREP', [
|
||||
{{ Form::button(__('Submit PIREP'), [
|
||||
'name' => 'submit',
|
||||
'value' => 'submit',
|
||||
'value' => 'Submit',
|
||||
'class' => 'btn btn-success',
|
||||
'type' => 'submit'])
|
||||
}}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
@extends('app')
|
||||
@section('title', 'pireps')
|
||||
@section('title', __trans_choice('PIREP', 2))
|
||||
|
||||
@section('content')
|
||||
<div class="row">
|
||||
@@ -7,9 +7,9 @@
|
||||
<div style="float:right;">
|
||||
<a class="btn btn-info pull-right btn-lg"
|
||||
style="margin-top: -10px;margin-bottom: 5px"
|
||||
href="{{ route('frontend.pireps.create') }}">File New PIREP</a>
|
||||
href="{{ route('frontend.pireps.create') }}">{{ __('File New PIREP') }}</a>
|
||||
</div>
|
||||
<h2>Pilot Reports</h2>
|
||||
<h2>{{ __trans_choice('Pilot Report', 2) }}</h2>
|
||||
@include('flash::message')
|
||||
@include('pireps.table')
|
||||
</div>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<p class="float-right">
|
||||
<a href="{{ route('frontend.pireps.edit', [
|
||||
'id' => $pirep->id,
|
||||
]) }}" class="btn btn-sm btn-info">edit</a>
|
||||
]) }}" class="btn btn-sm btn-info">{{ __('Edit') }}</a>
|
||||
</p>
|
||||
<h5>
|
||||
<a href="{{ route('frontend.pireps.show', [$pirep->id]) }}">
|
||||
@@ -41,22 +41,22 @@
|
||||
<div class="col-sm-6">
|
||||
<table class="table-condensed" width="100%">
|
||||
<tr>
|
||||
<td nowrap><span class="title">Flight Time </span></td>
|
||||
<td nowrap><span class="title">{{ __('Flight Time') }} </span></td>
|
||||
<td>{{ Utils::minutesToTimeString($pirep->flight_time) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap><span class="title">Aircraft </span></td>
|
||||
<td nowrap><span class="title">{{ __('Aircraft') }} </span></td>
|
||||
<td>{{ $pirep->aircraft->name }}
|
||||
({{ $pirep->aircraft->registration }})</td>
|
||||
</tr>
|
||||
@if($pirep->level)
|
||||
<tr>
|
||||
<td nowrap><span class="title">Flight Level </span></td>
|
||||
<td nowrap><span class="title">{{ __('Flight Level') }} </span></td>
|
||||
<td>{{ $pirep->level }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
<tr>
|
||||
<td nowrap><span class="title">Filed On: </span></td>
|
||||
<td nowrap><span class="title">{{ __('Filed On') }}: </span></td>
|
||||
<td>{{ show_datetime($pirep->created_at) }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
@extends('app')
|
||||
@section('title', 'PIREP '.$pirep->ident)
|
||||
@section('title', __trans_choice('PIREP', 1).' '.$pirep->ident)
|
||||
|
||||
@section('content')
|
||||
<div class="row">
|
||||
@@ -12,7 +12,7 @@
|
||||
@if($pirep->state === PirepState::IN_PROGRESS)
|
||||
|
||||
@else
|
||||
Arrived {{$pirep->created_at->diffForHumans()}}
|
||||
__('Arrived') {{$pirep->created_at->diffForHumans()}}
|
||||
@endif
|
||||
</p>
|
||||
</p>
|
||||
@@ -89,20 +89,20 @@
|
||||
action="{{ route('frontend.pireps.edit', ['id' => $pirep->id]) }}"
|
||||
style="display: inline">
|
||||
@csrf
|
||||
<button class="btn btn-info">Edit</button>
|
||||
<button class="btn btn-info">{{ __('Edit') }}</button>
|
||||
</form>
|
||||
|
||||
<form method="post"
|
||||
action="{{ route('frontend.pireps.submit', ['id' => $pirep->id]) }}"
|
||||
style="display: inline">
|
||||
@csrf
|
||||
<button class="btn btn-success">Submit</button>
|
||||
<button class="btn btn-success">{{ __('Submit') }}</button>
|
||||
</form>
|
||||
</div>
|
||||
@endif
|
||||
<table class="table table-striped">
|
||||
<tr>
|
||||
<td width="30%">State</td>
|
||||
<td width="30%">{{ __('Status') }}</td>
|
||||
<td>
|
||||
<div class="badge badge-info">
|
||||
{{ PirepStatus::label($pirep->status) }}
|
||||
@@ -111,31 +111,31 @@
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Source</td>
|
||||
<td>{{ __('Source') }}</td>
|
||||
<td>{{ PirepSource::label($pirep->source) }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Flight Type</td>
|
||||
<td>{{ __('Flight Type') }}</td>
|
||||
<td>{{ \App\Models\Enums\FlightType::label($pirep->flight_type) }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Filed Route</td>
|
||||
<td>{{ __('Filed Route') }}</td>
|
||||
<td>
|
||||
{{ $pirep->route }}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Notes</td>
|
||||
<td>{{ __('Notes') }}</td>
|
||||
<td>
|
||||
{{ $pirep->notes }}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Filed On</td>
|
||||
<td>{{ __('Filed On') }}</td>
|
||||
<td>
|
||||
{{ show_datetime($pirep->created_at) }}
|
||||
</td>
|
||||
@@ -148,11 +148,11 @@
|
||||
@endif
|
||||
|
||||
@if(count($pirep->fields) > 0)
|
||||
<h5>fields</h5>
|
||||
<h5>{{ __trans_choice('Field', 2) }}</h5>
|
||||
<table class="table table-hover table-condensed">
|
||||
<thead>
|
||||
<th>Name</th>
|
||||
<th>Value</th>
|
||||
<th>{{ __('Name') }}</th>
|
||||
<th>{{ __('Value') }}</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($pirep->fields as $field)
|
||||
@@ -175,11 +175,11 @@
|
||||
@if(count($pirep->fares) > 0)
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<h5>fares</h5>
|
||||
<h5>{{ __trans_choice('Fare', 2) }}</h5>
|
||||
<table class="table table-hover table-condensed">
|
||||
<thead>
|
||||
<th>Class</th>
|
||||
<th>Count</th>
|
||||
<th>{{ __('Class') }}</th>
|
||||
<th>{{ __('Count') }}</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($pirep->fares as $fare)
|
||||
@@ -200,7 +200,7 @@
|
||||
<div class="separator"></div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<h5>flight log</h5>
|
||||
<h5>{{ __('Flight Log') }}</h5>
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<table class="table table-hover table-condensed" id="users-table">
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
<table class="table table-condensed table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Flight</th>
|
||||
<th>Departure</th>
|
||||
<th>Arrival</th>
|
||||
<th>Aircraft</th>
|
||||
<th class="text-center">Flight Time</th>
|
||||
<th class="text-center">Status</th>
|
||||
<th>Submitted</th>
|
||||
<th>{{ __trans_choice('Flight', 1) }}</th>
|
||||
<th>{{ __('Departure') }}</th>
|
||||
<th>{{ __('Arrival') }}</th>
|
||||
<th>{{ __('Aircraft') }}</th>
|
||||
<th class="text-center">{{ __('Flight Time') }}</th>
|
||||
<th class="text-center">{{ __('Status') }}</th>
|
||||
<th>{{ __('Submitted') }}</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -58,7 +58,7 @@
|
||||
@if(!$pirep->read_only)
|
||||
<a href="{{ route('frontend.pireps.edit', [
|
||||
'id' => $pirep->id,
|
||||
]) }}">edit</a>
|
||||
]) }}">{{ __('Edit') }}</a>
|
||||
@endif
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user