Merge pull request #312 from nabeelio/issue/295-fuel-in-pireps

Fix pax count fields; add fuel used field #295
This commit is contained in:
Nabeel Shahzad 2019-06-19 15:14:29 -05:00 committed by GitHub
commit 29ca9711f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 35 additions and 18 deletions

View File

@ -12,7 +12,6 @@ services:
- ./:/var/www - ./:/var/www
- ./resources/docker/php/www.conf:/usr/local/etc/php-fpm.d/www.conf - ./resources/docker/php/www.conf:/usr/local/etc/php-fpm.d/www.conf
depends_on: depends_on:
- nginx
- mysql - mysql
- redis - redis
@ -24,6 +23,8 @@ services:
- ./resources/docker/nginx/default.conf:/etc/nginx/conf.d/default.conf - ./resources/docker/nginx/default.conf:/etc/nginx/conf.d/default.conf
ports: ports:
- 80:80 - 80:80
depends_on:
- app
mysql: mysql:
image: mysql:5.7.26 image: mysql:5.7.26

View File

@ -25,6 +25,7 @@ return [
'aircraft' => 'Aircraft', 'aircraft' => 'Aircraft',
'airline' => 'Airline', 'airline' => 'Airline',
'distance' => 'Distance', 'distance' => 'Distance',
'fuel' => 'Fuel',
'metar' => 'METAR', 'metar' => 'METAR',
'hour' => 'Hour|Hours', 'hour' => 'Hour|Hours',
'minute' => 'Minute|Minutes', 'minute' => 'Minute|Minutes',

View File

@ -21,6 +21,7 @@ return [
'fieldsreadonly' => 'Once a PIREP has been submitted, certain fields go into read-only mode.', 'fieldsreadonly' => 'Once a PIREP has been submitted, certain fields go into read-only mode.',
'flightinformations' => 'Flight Information', 'flightinformations' => 'Flight Information',
'flightident' => 'Flight Number/Code/Leg', 'flightident' => 'Flight Number/Code/Leg',
'fuel_used' => 'Fuel Used',
'codeoptional' => 'Code (optional)', 'codeoptional' => 'Code (optional)',
'legoptional' => 'Leg (optional)', 'legoptional' => 'Leg (optional)',
'deparrinformations' => 'Departure/Arrival Information', 'deparrinformations' => 'Departure/Arrival Information',
@ -28,7 +29,6 @@ return [
'dateflown' => 'Date Flown', 'dateflown' => 'Date Flown',
'deletepirep' => 'Delete PIREP', 'deletepirep' => 'Delete PIREP',
'submitted' => 'Submitted', 'submitted' => 'Submitted',
'source_types' => [ 'source_types' => [
'manual' => 'Manual', 'manual' => 'Manual',
'acars' => 'ACARS', 'acars' => 'ACARS',

View File

@ -25,6 +25,7 @@ return [
'aircraft' => 'Aeronave', 'aircraft' => 'Aeronave',
'airline' => 'Aerolínea', 'airline' => 'Aerolínea',
'distance' => 'Distancía', 'distance' => 'Distancía',
'fuel' => 'Combustible',
'metar' => 'METAR', 'metar' => 'METAR',
'hour' => 'Hora|Horas', 'hour' => 'Hora|Horas',
'minute' => 'Minuto|Minutos', 'minute' => 'Minuto|Minutos',

View File

@ -21,6 +21,7 @@ return [
'fieldsreadonly' => 'Una vez que se ha enviado un PIREP, ciertos campos pasan al modo de solo lectura.', 'fieldsreadonly' => 'Una vez que se ha enviado un PIREP, ciertos campos pasan al modo de solo lectura.',
'flightinformations' => 'Información de vuelo', 'flightinformations' => 'Información de vuelo',
'flightident' => 'Vuelo Número/Código/Etapa', 'flightident' => 'Vuelo Número/Código/Etapa',
'fuel_used' => 'Combustible Usado',
'codeoptional' => 'Código (opcional)', 'codeoptional' => 'Código (opcional)',
'legoptional' => 'Etapa (opcional)', 'legoptional' => 'Etapa (opcional)',
'deparrinformations' => 'Información Salida/Legada', 'deparrinformations' => 'Información Salida/Legada',
@ -28,7 +29,6 @@ return [
'dateflown' => 'Fecha de vuelo', 'dateflown' => 'Fecha de vuelo',
'deletepirep' => 'Borrar PIREP', 'deletepirep' => 'Borrar PIREP',
'submitted' => 'Enviado', 'submitted' => 'Enviado',
'source_types' => [ 'source_types' => [
'manual' => 'Manual', 'manual' => 'Manual',
'acars' => 'ACARS', 'acars' => 'ACARS',

View File

@ -25,6 +25,7 @@ return [
'aircraft' => 'Aereomobile', 'aircraft' => 'Aereomobile',
'airline' => 'Compagnia Aerea', 'airline' => 'Compagnia Aerea',
'distance' => 'Distanza', 'distance' => 'Distanza',
'fuel' => 'Carburante',
'metar' => 'METAR', 'metar' => 'METAR',
'hour' => 'Ora|Ore', 'hour' => 'Ora|Ore',
'minute' => 'Minuto|Minuti', 'minute' => 'Minuto|Minuti',

View File

@ -16,6 +16,7 @@ return [
'fieldsreadonly' => 'Quando un PIREP viene sottoporre, alcuni cami entrano in modalità di sola lettura.', 'fieldsreadonly' => 'Quando un PIREP viene sottoporre, alcuni cami entrano in modalità di sola lettura.',
'flightinformations' => 'Informazioni di Volo', 'flightinformations' => 'Informazioni di Volo',
'flightident' => 'Numero di Volo/Codice/Leg', 'flightident' => 'Numero di Volo/Codice/Leg',
'fuel_used' => 'Carburante Usato',
'codeoptional' => 'Codice (facoltativo)', 'codeoptional' => 'Codice (facoltativo)',
'legoptional' => 'Leg (facoltativa)', 'legoptional' => 'Leg (facoltativa)',
'deparrinformations' => 'Informazioni di Partenza/Arrivo', 'deparrinformations' => 'Informazioni di Partenza/Arrivo',

View File

@ -4,18 +4,13 @@
 {{ trans_choice('pireps.fare', 2) }}  {{ trans_choice('pireps.fare', 2) }}
</h6> </h6>
<div class="form-container-body"> <div class="form-container-body">
@foreach($pirep->aircraft->subfleet->fares as $fare) @foreach($aircraft->subfleet->fares as $fare)
<div class="row"> <div class="row">
<div class="col"> <div class="col">
{{Form::label('fare_'.$fare->id, $fare->name.' ('.$fare->code.')')}} {{Form::label('fare_'.$fare->id, $fare->name.' ('.$fare->code.')')}}
@if($pirep->read_only)
<p>{{ $pirep->{'fare_'.$fare->id} }}</p>
{{ Form::hidden('fare_'.$fare->id) }}
@else
<div class="input-group form-group"> <div class="input-group form-group">
{{ Form::number('fare_'.$fare->id, null, ['class' => 'form-control', 'min' => 0]) }} {{ Form::number('fare_'.$fare->id, null, ['class' => 'form-control', 'min' => 0]) }}
</div> </div>
@endif
</div> </div>
</div> </div>
@endforeach @endforeach

View File

@ -211,7 +211,7 @@ flight reports that have been filed. You've been warned!
</h6> </h6>
<div class="form-container-body"> <div class="form-container-body">
<div class="row"> <div class="row">
<div class="col"> <div class="col-4">
{{ Form::label('aircraft_id', __('common.aircraft')) }} {{ Form::label('aircraft_id', __('common.aircraft')) }}
@if(!empty($pirep) && $pirep->read_only) @if(!empty($pirep) && $pirep->read_only)
<p>{{ $pirep->aircraft->name }}</p> <p>{{ $pirep->aircraft->name }}</p>
@ -228,9 +228,29 @@ flight reports that have been filed. You've been warned!
<p class="text-danger">{{ $errors->first('aircraft_id') }}</p> <p class="text-danger">{{ $errors->first('aircraft_id') }}</p>
@endif @endif
</div> </div>
<div class="col-4">
{{ Form::label('fuel_used', __('pireps.fuel_used')) }} ({{config('phpvms.internal_units.fuel')}})
@if(!empty($pirep) && $pirep->read_only)
<p>{{ $pirep->fuel_used }}</p>
@else
<div class="input-group input-group-sm form-group">
{{-- You probably don't want to change this ID if you want the fare select to work --}}
{{ Form::number('fuel_used', null, [
'class' => 'form-control',
'min' => '0',
'readonly' => (!empty($pirep) && $pirep->read_only),
]) }}
</div>
<p class="text-danger">{{ $errors->first('fuel_used') }}</p>
@endif
</div> </div>
</div> </div>
</div> </div>
</div>
<div id="fares_container" class="form-container">
@include('pireps.fares')
</div>
<div class="form-container"> <div class="form-container">
<h6><i class="far fa-comments"></i> <h6><i class="far fa-comments"></i>
@ -283,9 +303,6 @@ flight reports that have been filed. You've been warned!
</div> </div>
</div> </div>
@endif @endif
<div id="fares_container">
@include('pireps.fares')
</div>
</div> </div>
</div> </div>
<div class="row"> <div class="row">