This commit is contained in:
Nabeel Shahzad
2018-07-05 14:07:56 -05:00
42 changed files with 1261 additions and 522 deletions

View File

@@ -73,6 +73,7 @@ class CreateFlightTables extends Migration
$table->bigIncrements('id');
$table->string('flight_id', \App\Interfaces\Model::ID_MAX_LENGTH);
$table->string('name', 50);
$table->string('slug', 50)->nullable();
$table->text('value');
$table->timestamps();

View File

@@ -394,18 +394,20 @@ flights:
flight_fields:
- name: Departure Gate
slug: departure_gate
slug: departure-gate
- name: Arrival Gate
slug: arrival_gate
slug: arrival-gate
flight_field_values:
- id: 1
flight_id: flightid_1
name: cost index
slug: cost-index
value: 80
- id: 2
flight_id: flightid_2
name: cost index
slug: cost-index
value: 100
flight_subfleet:
@@ -539,24 +541,24 @@ pirep_fares:
pirep_fields:
- id: 1
name: departure gate
slug: departure_gate
slug: departure-gate
required: 1
- id: 2
name: arrival gate
slug: arrival_gate
slug: arrival-gate
required: 0
pirep_field_values:
- id: 1
pirep_id: pirepid_1
name: arrival gate
slug: arrival_gate
slug: arrival-gate
value: 10
source: manual
- id: 2
pirep_id: pirepid_1
name: departure gate
slug: departure_gate
slug: departure-gate
value: B32
source: manual

View File

@@ -121,6 +121,7 @@ class PirepController extends Controller
$custom_fields[] = [
'name' => $field->name,
'slug' => $field->slug,
'value' => $request->input($field->slug),
'source' => PirepSource::MANUAL
];
@@ -139,6 +140,10 @@ class PirepController extends Controller
protected function saveFares(Pirep $pirep, Request $request)
{
$fares = [];
if (!$pirep->aircraft) {
return;
}
foreach ($pirep->aircraft->subfleet->fares as $fare) {
$field_name = 'fare_'.$fare->id;
if (!$request->filled($field_name)) {
@@ -186,7 +191,6 @@ class PirepController extends Controller
$pirep = $this->pirepRepo->find($id);
if (empty($pirep)) {
Flash::error('Pirep not found');
return redirect(route('frontend.pirep.index'));
}
@@ -244,40 +248,45 @@ class PirepController extends Controller
$pirep = new Pirep($request->post());
$pirep->user_id = Auth::user()->id;
# Are they allowed at this airport?
if (setting('pilots.only_flights_from_current')
&& Auth::user()->curr_airport_id !== $pirep->dpt_airport_id) {
return $this->flashError(
'You are currently not at the departure airport!',
'frontend.pireps.create'
);
}
$attrs = $request->all();
$attrs['submit'] = strtolower($attrs['submit']);
# Can they fly this aircraft?
if (setting('pireps.restrict_aircraft_to_rank', false)
&& !$this->userSvc->aircraftAllowed(Auth::user(), $pirep->aircraft_id)) {
return $this->flashError(
'You are not allowed to fly this aircraft!',
'frontend.pireps.create'
);
}
if($attrs['submit'] === 'submit') {
# Are they allowed at this airport?
if (setting('pilots.only_flights_from_current')
&& Auth::user()->curr_airport_id !== $pirep->dpt_airport_id) {
return $this->flashError(
'You are currently not at the departure airport!',
'frontend.pireps.create'
);
}
# is the aircraft in the right place?
if (setting('pireps.only_aircraft_at_dpt_airport')
&& $pirep->aircraft_id !== $pirep->dpt_airport_id) {
return $this->flashError(
'This aircraft is not positioned at the departure airport!',
'frontend.pireps.create'
);
}
# Can they fly this aircraft?
if (setting('pireps.restrict_aircraft_to_rank', false)
&& !$this->userSvc->aircraftAllowed(Auth::user(), $pirep->aircraft_id)) {
return $this->flashError(
'You are not allowed to fly this aircraft!',
'frontend.pireps.create'
);
}
# Make sure this isn't a duplicate
$dupe_pirep = $this->pirepSvc->findDuplicate($pirep);
if ($dupe_pirep !== false) {
return $this->flashError(
'This PIREP has already been filed.',
'frontend.pireps.create'
);
# is the aircraft in the right place?
if (setting('pireps.only_aircraft_at_dpt_airport')
&& $pirep->aircraft_id !== $pirep->dpt_airport_id) {
return $this->flashError(
'This aircraft is not positioned at the departure airport!',
'frontend.pireps.create'
);
}
# Make sure this isn't a duplicate
$dupe_pirep = $this->pirepSvc->findDuplicate($pirep);
if ($dupe_pirep !== false) {
return $this->flashError(
'This PIREP has already been filed.',
'frontend.pireps.create'
);
}
}
// Any special fields
@@ -296,7 +305,10 @@ class PirepController extends Controller
// Depending on the button they selected, set an initial state
// Can be saved as a draft or just submitted
if ($attrs['submit'] === 'save') {
$pirep->status = PirepState::DRAFT;
if(!$pirep->read_only) {
$pirep->state = PirepState::DRAFT;
}
$pirep->save();
Flash::success('PIREP saved successfully.');
} else if ($attrs['submit'] === 'submit') {
@@ -317,7 +329,6 @@ class PirepController extends Controller
$pirep = $this->pirepRepo->findWithoutFail($id);
if (empty($pirep)) {
Flash::error('Pirep not found');
return redirect(route('frontend.pireps.index'));
}
@@ -327,6 +338,10 @@ class PirepController extends Controller
# set the custom fields
foreach ($pirep->fields as $field) {
if($field->slug == null) {
$field->slug = str_slug($field->name);
}
$pirep->{$field->slug} = $field->value;
}
@@ -363,6 +378,7 @@ class PirepController extends Controller
$orig_route = $pirep->route;
$attrs = $request->all();
$attrs['submit'] = strtolower($attrs['submit']);
# Fix the time
$attrs['flight_time'] = Time::init(
@@ -384,7 +400,7 @@ class PirepController extends Controller
} else if($attrs['submit'] === 'submit') {
$this->pirepSvc->submit($pirep);
Flash::success('PIREP submitted!');
} else if($attrs['submit'] === 'cancel') {
} else if($attrs['submit'] === 'delete' || $attrs['submit'] === 'cancel') {
$this->pirepRepo->update([
'state' => PirepState::CANCELLED,
'status' => PirepStatus::CANCELLED,

View File

@@ -26,6 +26,17 @@ class CreatePirepRequest extends FormRequest
*/
public function rules()
{
// Don't run validations if it's just being saved
$action = strtolower(request('submit', 'submit'));
if($action === 'save') {
return [
'airline_id' => 'required|exists:airlines,id',
'flight_number' => 'required',
'dpt_airport_id' => 'required',
'arr_airport_id' => 'required',
];
}
$field_rules = Pirep::$rules;
$field_rules['hours'] = 'nullable|integer';

View File

@@ -3,7 +3,9 @@
namespace App\Http\Requests;
use App\Models\Pirep;
use App\Repositories\PirepFieldRepository;
use Illuminate\Foundation\Http\FormRequest;
use Log;
class UpdatePirepRequest extends FormRequest
{
@@ -24,6 +26,31 @@ class UpdatePirepRequest extends FormRequest
*/
public function rules()
{
return Pirep::$rules;
// Don't run validations if it's just being saved
$action = strtolower(request('submit', 'submit'));
if ($action === 'save' || $action === 'cancel' || $action === 'delete') {
return [
'airline_id' => 'required|exists:airlines,id',
'flight_number' => 'required',
'dpt_airport_id' => 'required',
'arr_airport_id' => 'required',
];
}
$field_rules = Pirep::$rules;
$field_rules['hours'] = 'nullable|integer';
$field_rules['minutes'] = 'nullable|integer';
# Add the validation rules for the custom fields
$pirepFieldRepo = app(PirepFieldRepository::class);
$custom_fields = $pirepFieldRepo->all();
foreach ($custom_fields as $field) {
Log::info('field:', $field->toArray());
$field_rules[$field->slug] = $field->required ? 'required' : 'nullable';
}
return $field_rules;
}
}

View File

@@ -18,11 +18,21 @@ class FlightFieldValue extends Model
protected $fillable = [
'flight_id',
'name',
'slug',
'value',
];
public static $rules = [];
/**
* @param $name
*/
public function setNameAttribute($name): void
{
$this->attributes['name'] = $name;
$this->attributes['slug'] = str_slug($name);
}
/**
* Relationships
*/

View File

@@ -1,28 +0,0 @@
<?php
namespace App\Models\Observers;
use App\Models\PirepField;
/**
* Class PirepFieldObserver
* @package App\Models\Observers
*/
class PirepFieldObserver
{
/**
* @param PirepField $model
*/
public function creating(PirepField $model): void
{
$model->slug = str_slug($model->name);
}
/**
* @param PirepField $model
*/
public function updating(PirepField $model): void
{
$model->slug = str_slug($model->name);
}
}

View File

@@ -0,0 +1,35 @@
<?php
namespace App\Models\Observers;
/**
* Create a slug from a name
* @package App\Models\Observers
*/
class Sluggable
{
/**
* @param $model
*/
public function creating($model): void
{
$model->slug = str_slug($model->name);
}
/**
* @param $model
*/
public function updating($model): void
{
$model->slug = str_slug($model->name);
}
/**
* @param $name
*/
public function setNameAttribute($name): void
{
$this->attributes['name'] = $name;
$this->attributes['slug'] = str_slug($name);
}
}

View File

@@ -40,10 +40,12 @@ use PhpUnitsOfMeasure\Exception\NonStringUnitName;
* @property User user
* @property Flight|null flight
* @property Collection fields
* @property int status
* @property bool state
* @property Carbon submitted_at
* @property Carbon created_at
* @property Carbon updated_at
* @property bool state
* @property bool read_only
* @property Acars position
* @property Acars[] acars
* @package App\Models
@@ -126,9 +128,9 @@ class Pirep extends Model
* If a PIREP is in these states, then it can't be changed.
*/
public static $read_only_states = [
PirepState::PENDING,
PirepState::ACCEPTED,
PirepState::REJECTED,
//PirepState::PENDING,
PirepState::CANCELLED,
];

View File

@@ -15,6 +15,7 @@ class PirepFieldValues extends Model
protected $fillable = [
'pirep_id',
'name',
'slug',
'value',
'source',
];
@@ -23,6 +24,15 @@ class PirepFieldValues extends Model
'name' => 'required',
];
/**
* @param $name
*/
public function setNameAttribute($name): void
{
$this->attributes['name'] = $name;
$this->attributes['slug'] = str_slug($name);
}
/**
* Foreign Keys
*/

View File

@@ -4,21 +4,23 @@ namespace App\Providers;
use App\Models\Aircraft;
use App\Models\Airport;
use App\Models\FlightField;
use App\Models\FlightFieldValue;
use App\Models\Journal;
use App\Models\JournalTransaction;
use App\Models\Observers\AircraftObserver;
use App\Models\Observers\AirportObserver;
use App\Models\Observers\JournalObserver;
use App\Models\Observers\JournalTransactionObserver;
use App\Models\Observers\PirepFieldObserver;
use App\Models\Observers\Sluggable;
use App\Models\Observers\SettingObserver;
use App\Models\Observers\SubfleetObserver;
use App\Models\PirepField;
use App\Models\PirepFieldValues;
use App\Models\Setting;
use App\Models\Subfleet;
use App\Repositories\SettingRepository;
use App\Services\ModuleService;
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\ServiceProvider;
use View;
@@ -42,10 +44,15 @@ class AppServiceProvider extends ServiceProvider
Airport::observe(AirportObserver::class);
Journal::observe(JournalObserver::class);
JournalTransaction::observe(JournalTransactionObserver::class);
PirepField::observe(PirepFieldObserver::class);
FlightField::observe(Sluggable::class);
FlightFieldValue::observe(Sluggable::class);
PirepField::observe(Sluggable::class);
PirepFieldValues::observe(Sluggable::class);
Setting::observe(SettingObserver::class);
Subfleet::observe(SubfleetObserver::class);
}
/**
@@ -55,7 +62,6 @@ class AppServiceProvider extends ServiceProvider
{
# Only dev environment stuff
if ($this->app->environment() === 'dev') {
# Only load the IDE helper if it's included. This lets use distribute the
# package without any dev dependencies
if (class_exists(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class)) {

View File

@@ -3,10 +3,8 @@
namespace App\Services;
use App\Interfaces\Service;
use App\Support\Database;
use Carbon\Carbon;
use Illuminate\Database\QueryException;
use Illuminate\Support\Facades\DB;
use Symfony\Component\Yaml\Yaml;
use Webpatser\Uuid\Uuid;
/**
@@ -42,8 +40,7 @@ class DatabaseService extends Service
*/
public function seed_from_yaml_file($yaml_file, $ignore_errors = false): array
{
$yml = file_get_contents($yaml_file);
return $this->seed_from_yaml($yml, $ignore_errors);
return Database::seed_from_yaml_file($yaml_file, $ignore_errors);
}
/**
@@ -54,27 +51,7 @@ class DatabaseService extends Service
*/
public function seed_from_yaml($yml, $ignore_errors = false): array
{
$imported = [];
$yml = Yaml::parse($yml);
foreach ($yml as $table => $rows) {
$imported[$table] = 0;
foreach ($rows as $row) {
try {
$row = $this->insert_row($table, $row);
} catch(QueryException $e) {
if ($ignore_errors) {
continue;
}
throw $e;
}
++$imported[$table];
}
}
return $imported;
return Database::seed_from_yaml($yml, $ignore_errors);
}
/**
@@ -92,24 +69,6 @@ class DatabaseService extends Service
}
}
# encrypt any password fields
if (array_key_exists('password', $row)) {
$row['password'] = bcrypt($row['password']);
}
# if any time fields are == to "now", then insert the right time
foreach($row as $column => $value) {
if(strtolower($value) === 'now') {
$row[$column] = $this->time();
}
}
try {
DB::table($table)->insert($row);
} catch (QueryException $e) {
throw $e;
}
return $row;
return Database::insert_row($table, $row);
}
}

View File

@@ -13,6 +13,7 @@ use App\Models\Bid;
use App\Models\Enums\AcarsType;
use App\Models\Enums\PirepSource;
use App\Models\Enums\PirepState;
use App\Models\Enums\PirepStatus;
use App\Models\Enums\UserState;
use App\Models\Navdata;
use App\Models\Pirep;
@@ -212,6 +213,10 @@ class PirepService extends Service
}
}
$pirep->state = $default_state;
$pirep->status = PirepStatus::ARRIVED;
$pirep->save();
Log::info('New PIREP filed', [$pirep]);
event(new PirepFiled($pirep));

96
app/Support/Database.php Normal file
View File

@@ -0,0 +1,96 @@
<?php
/**
*
*/
namespace App\Support;
use Carbon\Carbon;
use Illuminate\Database\QueryException;
use Illuminate\Support\Facades\DB;
use Symfony\Component\Yaml\Yaml;
use Webpatser\Uuid\Uuid;
use Log;
class Database
{
/**
* @return string
*/
protected static function time(): string
{
return Carbon::now('UTC');
}
/**
* @param $yaml_file
* @param bool $ignore_errors
* @return array
* @throws \Exception
*/
public static function seed_from_yaml_file($yaml_file, $ignore_errors = false): array
{
$yml = file_get_contents($yaml_file);
return static::seed_from_yaml($yml, $ignore_errors);
}
/**
* @param $yml
* @param bool $ignore_errors
* @return array
* @throws \Exception
*/
public static function seed_from_yaml($yml, $ignore_errors = false): array
{
$imported = [];
$yml = Yaml::parse($yml);
foreach ($yml as $table => $rows) {
$imported[$table] = 0;
foreach ($rows as $row) {
try {
static::insert_row($table, $row);
} catch (QueryException $e) {
if ($ignore_errors) {
continue;
}
throw $e;
}
++$imported[$table];
}
}
return $imported;
}
/**
* @param $table
* @param $row
* @return mixed
* @throws \Exception
*/
public static function insert_row($table, $row)
{
# encrypt any password fields
if (array_key_exists('password', $row)) {
$row['password'] = bcrypt($row['password']);
}
# if any time fields are == to "now", then insert the right time
foreach ($row as $column => $value) {
if (strtolower($value) === 'now') {
$row[$column] = static::time();
}
}
try {
DB::table($table)->insert($row);
} catch (QueryException $e) {
throw $e;
}
return $row;
}
}

View File

@@ -3,6 +3,7 @@
namespace App\Widgets;
use App\Interfaces\Widget;
use App\Models\Enums\PirepState;
use App\Repositories\PirepRepository;
/**
@@ -22,9 +23,17 @@ class LatestPireps extends Widget
{
$pirepRepo = app(PirepRepository::class);
$pireps = $pirepRepo
->whereNotInOrder('state', [
PirepState::CANCELLED,
PirepState::DRAFT,
PirepState::IN_PROGRESS
], 'created_at', 'desc')
->recent($this->config['count']);
return view('widgets.latest_pireps', [
'config' => $this->config,
'pireps' => $pirepRepo->recent($this->config['count']),
'pireps' => $pireps,
]);
}
}

552
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -15,7 +15,7 @@ return [
'views/frontend' => 'Resources/views/layouts/frontend.blade.php',
'views/admin' => 'Resources/views/layouts/admin.blade.php',
'listener-test' => 'Listeners/TestEventListener.php',
'controller-api' => 'Http/Controllers/Api/SampleController.php',
'controller-api' => 'Http/Controllers/Api/ApiController.php',
'controller-admin' => 'Http/Controllers/Admin/AdminController.php',
'scaffold/config' => 'Config/config.php',
'composer' => 'composer.json',
@@ -53,7 +53,7 @@ return [
'config' => ['path' => 'Config', 'generate' => true],
'command' => ['path' => 'Console', 'generate' => true],
'migration' => ['path' => 'Database/migrations', 'generate' => true],
'seeder' => ['path' => 'Database/seeders', 'generate' => true],
'seeds' => ['path' => 'Database/seeds', 'generate' => true],
'factory' => ['path' => 'Database/factories', 'generate' => true],
'model' => ['path' => 'Models', 'generate' => true],
'controller' => ['path' => 'Http/Controllers', 'generate' => true],

View File

@@ -16,6 +16,8 @@
<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="{{ 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/installer/css/vendor.css') }}" rel="stylesheet"/>
<link href="{{ public_asset('/assets/frontend/css/styles.css') }}" rel="stylesheet"/>
@@ -24,8 +26,8 @@
<style>
.table tr:first-child td { border-top: 0px; }
@yield('css')
</style>
@yield('css')
</head>
<body>
@@ -33,13 +35,6 @@
<nav class="navbar navbar-toggleable-md" style="background: #067ec1;">
<div class="container" style="width: 85%!important;">
<div class="navbar-translate">
<button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse"
data-target="#navigation" aria-controls="navigation-index" aria-expanded="false"
aria-label="Toggle navigation">
<span class="navbar-toggler-bar bar1"></span>
<span class="navbar-toggler-bar bar2"></span>
<span class="navbar-toggler-bar bar3"></span>
</button>
<p class="navbar-brand text-white" data-placement="bottom" target="_blank">
<a href="{{ url('/') }}">
<img src="{{ public_asset('/assets/img/logo_blue_bg.svg') }}" width="135px" style=""/>

View File

@@ -33,7 +33,7 @@ class MigrationService extends Service
'core' => \App::databasePath() . '/migrations'
];
$modules = Module::enabled();
$modules = Module::allEnabled();
foreach ($modules as $module) {
$module_path = $module->getPath() . '/Database/migrations';
if(file_exists($module_path)) {

View File

@@ -3,8 +3,6 @@
return [
'failed' => 'These credentials do not match our records.',
'throttle' => 'Too many login attempts. Please try again in :seconds seconds.',
'login' => 'Log In',
'logout' => 'Log Out',
'password' => 'Password',
'createaccount' => 'Create Account',
'forgotpassword' => 'Forgot Password',

View File

@@ -4,47 +4,50 @@
*/
return [
'dashboard' => 'Dashboard',
'administration' => 'Administration',
'flight' => 'Flight|Flights',
'livemap' => 'Live Map',
'pilot' => 'Pilot|Pilots',
'pirep' => 'PIREP|PIREPs',
'newestpilots' => 'Newest Pilots',
'profile' => 'Profile',
'email' => 'Email',
'register' => 'Register',
'timezone' => 'Timezone',
'country' => 'Country',
'download' => 'Download|Downloads',
'from' => 'from',
'to' => 'to',
'status' => 'Status',
'departure' => 'Departure',
'arrival' => 'Arrival',
'aircraft' => 'Aircraft',
'airline' => 'Airline',
'distance' => 'Distance',
'metar' => 'METAR',
'hour' => 'Hour|Hours',
'minute' => 'Minute|Minutes',
'note' => 'Note|Notes',
'field' => 'Field|Fields',
'name' => 'Name',
'value' => 'Value|Values',
'remark' => 'Remark|Remarks',
'find' => 'Find',
'reset' => 'Reset',
'submit' => 'Submit',
'edit' => 'Edit',
'close' => 'Close',
'whoops' => 'Whoops',
'hello' => 'Hello',
'regards' => 'Regards',
'rightsreserved' => 'All Rights Reserved',
'active' => 'Active',
'inactive' => 'Inactive',
'days' => [
'dashboard' => 'Dashboard',
'administration' => 'Administration',
'flight' => 'Flight|Flights',
'livemap' => 'Live Map',
'pilot' => 'Pilot|Pilots',
'pirep' => 'PIREP|PIREPs',
'newestpilots' => 'Newest Pilots',
'profile' => 'Profile',
'email' => 'Email',
'register' => 'Register',
'login' => 'Log In',
'logout' => 'Log Out',
'timezone' => 'Timezone',
'country' => 'Country',
'download' => 'Download|Downloads',
'from' => 'from',
'to' => 'to',
'state' => 'State',
'status' => 'Status',
'departure' => 'Departure',
'arrival' => 'Arrival',
'aircraft' => 'Aircraft',
'airline' => 'Airline',
'distance' => 'Distance',
'metar' => 'METAR',
'hour' => 'Hour|Hours',
'minute' => 'Minute|Minutes',
'note' => 'Note|Notes',
'field' => 'Field|Fields',
'name' => 'Name',
'value' => 'Value|Values',
'remark' => 'Remark|Remarks',
'find' => 'Find',
'reset' => 'Reset',
'submit' => 'Submit',
'edit' => 'Edit',
'close' => 'Close',
'whoops' => 'Whoops',
'hello' => 'Hello',
'regards' => 'Regards',
'rightsreserved' => 'All Rights Reserved',
'active' => 'Active',
'inactive' => 'Inactive',
'days' => [
'mon' => 'Monday',
'tues' => 'Tuesday',
'wed' => 'Wednesday',

View File

@@ -18,8 +18,9 @@ return [
'fare' => 'Fare|Fares',
'class' => 'Class',
'count' => 'Count',
'flighttime' => 'Flight Time',
'flightlevel' => 'Flight Level',
'fieldsreadonly' => 'Once a PIREP has been accepted/rejected, certain fields go into read-only mode.',
'fieldsreadonly' => 'Once a PIREP has been submitted, certain fields go into read-only mode.',
'flightinformations' => 'Flight Information',
'flightident' => 'Flight Number/Code/Leg',
'codeoptional' => 'Code (optional)',

View File

@@ -0,0 +1,19 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Líneas de autenticación del idioma
|--------------------------------------------------------------------------
|
| Las siguientes líneas de idioma se utilizan durante la autenticación para varios
| mensajes que necesitamos mostrar al usuario. Usted es libre de modificar
| estas líneas de idioma de acuerdo a los requisitos de su aplicación.
|
*/
'failed' => 'Estas credenciales no coinciden con nuestros registros.',
'throttle' => 'Demasiados intentos de inicio de sesión. Por favor intente nuevamente en :seconds segundos.',
];

View File

@@ -0,0 +1,246 @@
<?php
return [
/**
*
* Shared translations.
*
*/
'title' => 'Instalador de phpVMS',
'next' => 'Siguiente',
'back' => 'Anterior',
'finish' => 'Instalar',
'forms' => [
'errorTitle' => 'Ocurrieron los siguientes errores:',
],
/**
*
* Home page translations.
*
*/
'welcome' => [
'templateTitle' => 'Bienvenido',
'title' => 'Instalador de phpVMS',
'message' => 'Instalación fácil y asistente de configuración.',
'next' => 'Comprobar requisitios',
],
/**
*
* Requirements page translations.
*
*/
'requirements' => [
'templateTitle' => 'Paso 1 | Requisitos del Servidor',
'title' => 'Requisitos del servidor',
'next' => 'Comprobar permisos',
],
/**
*
* Permissions page translations.
*
*/
'permissions' => [
'templateTitle' => 'Paso 2 | Permisos',
'title' => 'Permisos',
'next' => 'Configurar entorno',
],
/**
*
* Environment page translations.
*
*/
'environment' => [
'menu' => [
'templateTitle' => 'Paso 3 | Configuración de entorno',
'title' => 'Configuraciones de entorno',
'desc' => 'Seleccione cómo desea configurar las aplicaciones <code>.env</code> archivo.',
'wizard-button' => 'Desde el asistente',
'classic-button' => 'Editor de texto clásico',
],
'wizard' => [
'templateTitle' => 'Paso 3 | Configuraciones de entorno | Asistente guíado',
'title' => 'Asistente <code>.env</code> guíado',
'tabs' => [
'environment' => 'Entorno',
'database' => 'Base de datos',
'application' => 'Aplicación'
],
'form' => [
'name_required' => 'Un nombre de entorno es requerido.',
'app_name_label' => 'Nombre de la aplicación',
'app_name_placeholder' => 'Nombre de la aplicación',
'app_environment_label' => 'Entorno de aplicación',
'app_environment_label_local' => 'Local',
'app_environment_label_developement' => 'Desarrollo',
'app_environment_label_qa' => 'QA',
'app_environment_label_production' => 'Producción',
'app_environment_label_other' => 'Otra',
'app_environment_placeholder_other' => 'Introduce tu entorno...',
'app_debug_label' => 'Debug de aplicación',
'app_debug_label_true' => 'Verdadero',
'app_debug_label_false' => 'Falso',
'app_log_level_label' => 'Nivel de LOG de la aplicación',
'app_log_level_label_debug' => 'debug',
'app_log_level_label_info' => 'info',
'app_log_level_label_notice' => 'aviso',
'app_log_level_label_warning' => 'advertencia',
'app_log_level_label_error' => 'error',
'app_log_level_label_critical' => 'critico',
'app_log_level_label_alert' => 'alerta',
'app_log_level_label_emergency' => 'emergencía',
'app_url_label' => 'URL de la App',
'app_url_placeholder' => 'URL App ',
'db_connection_label' => 'Conexión base de datos',
'db_connection_label_mysql' => 'mysql',
'db_connection_label_sqlite' => 'sqlite',
'db_connection_label_pgsql' => 'pgsql',
'db_connection_label_sqlsrv' => 'sqlsrv',
'db_host_label' => 'Database: Host',
'db_host_placeholder' => 'Database: Host',
'db_port_label' => 'Database: Puerto',
'db_port_placeholder' => 'Database: Puerto',
'db_name_label' => 'Database: Nombre',
'db_name_placeholder' => 'Database: Nombre',
'db_username_label' => 'Database: Nombre usuario',
'db_username_placeholder' => 'Database: Nombre usuario',
'db_password_label' => 'Database: Contraseña',
'db_password_placeholder' => 'Database: Contraseña',
'app_tabs' => [
'more_info' => 'Más info',
'broadcasting_title' => 'Broadcasting, Caching, Session, &amp; Queue',
'broadcasting_label' => 'Broadcast Driver',
'broadcasting_placeholder' => 'Broadcast Driver',
'cache_label' => 'Cache Driver',
'cache_placeholder' => 'Cache Driver',
'session_label' => 'Session Driver',
'session_placeholder' => 'Session Driver',
'queue_label' => 'Queue Driver',
'queue_placeholder' => 'Queue Driver',
'redis_label' => 'Redis Driver',
'redis_host' => 'Redis Host',
'redis_password' => 'Redis Password',
'redis_port' => 'Redis Port',
'mail_label' => 'Mail',
'mail_driver_label' => 'Mail Driver',
'mail_driver_placeholder' => 'Mail Driver',
'mail_host_label' => 'Mail Host',
'mail_host_placeholder' => 'Mail Host',
'mail_port_label' => 'Mail Port',
'mail_port_placeholder' => 'Mail Port',
'mail_username_label' => 'Mail Username',
'mail_username_placeholder' => 'Mail Username',
'mail_password_label' => 'Mail Password',
'mail_password_placeholder' => 'Mail Password',
'mail_encryption_label' => 'Mail Encryption',
'mail_encryption_placeholder' => 'Mail Encryption',
'pusher_label' => 'Pusher',
'pusher_app_id_label' => 'Pusher App Id',
'pusher_app_id_palceholder' => 'Pusher App Id',
'pusher_app_key_label' => 'Pusher App Key',
'pusher_app_key_palceholder' => 'Pusher App Key',
'pusher_app_secret_label' => 'Pusher App Secret',
'pusher_app_secret_palceholder' => 'Pusher App Secret',
],
'buttons' => [
'setup_database' => 'Configurar base de datos',
'setup_application' => 'Configurar aplicación',
'install' => 'Instalar',
],
],
],
'classic' => [
'templateTitle' => 'Paso 3 | Configuración de entorno | Editor clásico',
'title' => 'Editor de entorno cásico',
'save' => 'Guardar .env',
'back' => 'Usar el asistente de formulario',
'install' => 'Guardar e instalar',
],
'success' => 'Tu archivo de configuración .env ha sido guardado.',
'errors' => 'No se ha guardado el archivo .env , Crealo manualmente.',
],
'install' => 'Instalar',
/**
*
* Installed Log translations.
*
*/
'installed' => [
'success_log_message' => 'Inslatador Laravel exitosamente creado en ',
],
/**
*
* Final page translations.
*
*/
'final' => [
'title' => 'Instalación finalizada',
'templateTitle' => 'Instalación finalizada',
'finished' => 'La aplicación ha sido instalada exitosamente.',
'migration' => 'Migración &amp; salida de la consola:',
'console' => 'Salida de la consola de la aplicación:',
'log' => 'Instalación Log de entrada:',
'env' => 'Final .env archivo:',
'exit' => 'Clic aquí para salir',
],
/**
*
* Update specific translations
*
*/
'updater' => [
/**
*
* Shared translations.
*
*/
'title' => 'Actualizador Laravel',
/**
*
* Welcome page translations for update feature.
*
*/
'welcome' => [
'title' => 'Bienvenido al actualizador',
'message' => 'Bienvenido al asistente de actualización.',
],
/**
*
* Welcome page translations for update feature.
*
*/
'overview' => [
'title' => 'Resumen',
'message' => 'Hay 1 actualización.|Hay :number actualizaciones.',
'install_updates' => "Instalar actualizaciones"
],
/**
*
* Final page translations.
*
*/
'final' => [
'title' => 'Finalizado',
'finished' => 'Aplicación/es actualizada/s con éxito.',
'exit' => 'Clic aquí para salir',
],
'log' => [
'success_message' => 'Inslatador Laravel exitosamente actualizado en ',
],
],
];

View File

@@ -0,0 +1,19 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Paginación de líneas de lenguaje
|--------------------------------------------------------------------------
|
| La biblioteca del paginador utiliza las siguientes líneas de idioma para construir
| los enlaces simples de paginación. Usted es libre de cambiarlos a cualquier cosa
| si desea personalizar sus vistas para que coincida mejor con su aplicación.
|
*/
'previous' => '&laquo; Anterior',
'next' => 'Siguiente &raquo;',
];

View File

@@ -0,0 +1,23 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Restablecimiento de contraseña Líneas de idioma
|--------------------------------------------------------------------------
|
| Las siguientes líneas de idioma son las líneas predeterminadas que
| coinciden con las razones dadas por el agente de contraseñas para un
| intento de actualización de contraseña que ha fallado, como un token
| no válido o una nueva contraseña no válida.
|
*/
'password' => 'Las contraseñas deben tener al menos seis caracteres y coincidir con la confirmación.',
'reset' => '¡Tu contraseña ha sido restablecida!',
'sent' => '¡Le hemos enviado por correo electrónico el enlace de restablecimiento de contraseña!',
'token' => 'Este token de restablecimiento de contraseña no es válido.',
'user' => "No podemos encontrar un usuario con esa dirección de correo electrónico.",
];

View File

@@ -0,0 +1,106 @@
<?php
return [
'global' => [
'active' => 'Activo',
'inactive' => 'Inactivo'
],
'aircraft' => [
'status' => [
'active' => 'Activo',
'stored' => 'Guardado',
'retired' => 'Retirado',
'scrapped' => 'Desguazado',
'written' => 'Dado de baja',
],
],
'days' => [
'mon' => 'lunes',
'tues' => 'martes',
'wed' => 'miércoles',
'thurs' => 'jueves',
'fri' => 'viernes',
'sat' => 'sábado',
'sun' => 'domingo',
],
'expenses' => [
'type' => [
'flight' => 'Por vuelo',
'daily' => 'Diario',
'monthly' => 'Mensual',
],
],
'flights' => [
'type' => [
'pass_scheduled' => 'Pasajero - Programado',
'cargo_scheduled' => 'Carga - Programado',
'charter_pass_only' => 'Charter - Pasajeros únicamente',
'addtl_cargo_mail' => 'Carga/Correo adicional',
'special_vip' => 'Vuelo VIP especial (Autoridad de Aviación Civil)',
'pass_addtl' => 'Pasajero - Adicional',
'charter_cargo' => 'Charter - Carga/Correo',
'ambulance' => 'Vuelo ambulancia',
'training_flight' => 'Vuelo de entrenamiento',
'mail_service' => 'Servicio postal',
'charter_special' => 'Charter con cargas especiales',
'positioning' => 'Posicionamiento (Ferry/Entrega/Demo)',
'technical_test' => 'Prueba técnica',
'military' => 'Militar',
'technical_stop' => 'Parada técnica',
],
],
'pireps' => [
'source' => [
'manual' => 'Manual',
'acars' => 'ACARS',
],
'state' => [
'accepted' => 'Aceptado',
'pending' => 'Pendiente',
'rejected' => 'Rechazado',
'in_progress' => 'En progreso',
'cancelled' => 'Cancelado',
'deleted' => 'Borrado',
'draft' => 'Borrador',
],
'status' => [
'initialized' => 'Inicializado',
'scheduled' => 'Programado',
'boarding' => 'Embarcando',
'ready_start' => 'Listo para empezar',
'push_tow' => 'Pushback/remolcado',
'departed' => 'Salió',
'ready_deice' => 'Listo para deshielo',
'deicing' => 'Deeshielo en progreso',
'ground_ret' => 'Retorno a tierra',
'taxi' => 'Taxi',
'takeoff' => 'Despegue',
'initial_clb' => 'Ascenso inicial',
'enroute' => 'En ruta',
'diverted' => 'Desviado',
'approach' => 'En aproximación',
'final_appr' => 'En aproximación final',
'landing' => 'Aterrizando',
'landed' => 'En tierra',
'arrived' => 'Llegó',
'cancelled' => 'Cancelado',
'emerg_decent' => 'Descenso de emergencia',
]
],
'users' => [
'state' => [
'pending' => 'Pendiente',
'active' => 'Activo',
'rejected' => 'Rechazado',
'on_leave' => 'De vacaciones',
'suspended' => 'Suspendido',
],
],
];

View File

@@ -0,0 +1,120 @@
<?php
return [
/**
* Validation Language Lines
*/
'accepted' => 'El :attribute debe ser aceptado.',
'active_url' => 'El :attribute No es una URL valida.',
'after' => 'El :attribute debe ser una fecha después de :date.',
'alpha' => 'El :attribute solo puede contener letras.',
'alpha_dash' => 'El :attribute solo puede contener letras, números, y guiones.',
'alpha_num' => 'El :attribute solo puede contener letras y números.',
'array' => 'El :attribute debe ser un array.',
'before' => 'El :attribute debe ser una fecha antes de :date.',
'between' => [
'numeric' => 'El :attribute debe estar entre :min and :max.',
'file' => 'El :attribute debe estar entre :min and :max kilobytes.',
'string' => 'El :attribute debe estar entre :min and :max caracteres.',
'array' => 'El :attribute debe estar entre :min and :max objetos.',
],
'boolean' => 'El :attribute campo debe ser verdadero o falso.',
'confirmed' => 'El :attribute confirmación no coincide.',
'date' => 'El :attribute no es una fecha valida.',
'date_format' => 'El :attribute no coincide el formato :format.',
'different' => 'El :attribute y :other deben ser diferentes.',
'digits' => 'El :attribute debe ser :digits digitos.',
'digits_between' => 'El :attribute debe estar entre :min and :max digitos.',
'dimensions' => 'El :attribute tiene dimensiones de imagen no valida.',
'distinct' => 'El :attribute campo tiene un valor duplicado.',
'email' => 'El :attribute debe ser un email valido.',
'exists' => 'El :attribute seleccionado es invalido.',
'file' => 'El :attribute debe ser un archivo.',
'filled' => 'El ":attribute" es requerido.',
'image' => 'El :attribute debe ser una imagen.',
'in' => 'El :attribute seleccionado es invalido.',
'in_array' => 'El :attribute campo no existe en :other.',
'integer' => 'El :attribute debe ser un integer.',
'ip' => 'El :attribute debe ser una dirección IP valida.',
'json' => 'El :attribute debe ser un string JSON valido.',
'max' => [
'numeric' => 'El :attribute no puede ser mayor que :max.',
'file' => 'El :attribute no puede ser mayor que :max kilobytes.',
'string' => 'El :attribute no puede ser mayor que :max caracteres.',
'array' => 'El :attribute no puede tener más de :max objetos.',
],
'mimes' => 'El :attribute must be a file of type: :values.',
'min' => [
'numeric' => 'El :attribute debe tener al menos :min.',
'file' => 'El :attribute debe tener al menos :min kilobytes.',
'string' => 'El :attribute debe tener al menos :min caracteres.',
'array' => 'El :attribute must have at least :min objetos.',
],
'not_in' => 'El :attribute seleccionado es invalido.',
'numeric' => 'El :attribute debe ser un número.',
'present' => 'El :attribute campo debe estar presente.',
'regex' => 'El :attribute formato es invalido.',
'required' => 'El ":attribute" campo es requerido.',
'required_if' => 'El :attribute campo es requerido cuando :other es :value.',
'required_unless' => 'El :attribute campo es requerido a no ser que :other esté en :values.',
'required_with' => 'El :attribute campo es requerido cuando :values es presente.',
'required_with_all' => 'El :attribute campo es requerido cuando :values es presente.',
'required_without' => 'El :attribute campo es requerido cuando :values no esté presente.',
'required_without_all' => 'El :attribute campo es requerido cuando none of :values are presente.',
'same' => 'El :attribute y :other debe coincidir.',
'size' => [
'numeric' => 'El :attribute debe ser :size.',
'file' => 'El :attribute debe ser :size kilobytes.',
'string' => 'El :attribute debe ser :size caracteres.',
'array' => 'El :attribute debe contener :size objetos.',
],
'string' => 'El :attribute debe ser un string.',
'timezone' => 'El :attribute debe ser una zona valida.',
'unique' => 'El :attribute ha sido actualmente usado.',
'url' => 'El :attribute es un formato invalido.',
/**
* Custom Validation Language Lines
*/
'custom' => [
'airline_id' => [
'required' => 'Una aerolínea es requerida',
'exists' => 'La aerolínea no existe',
],
'aircraft_id' => [
'required' => 'Una aeronave es requerido',
'exists' => 'La aeronave no existe',
],
'arr_airport_id' => [
'required' => 'Un aeropuerto de llegada es requerido',
],
'dpt_airport_id' => [
'required' => 'Un aeropuerto de salida es requerido',
],
'flight_time' => [
'required' => 'Tiempo de vuelo, en minutos, es requerido',
'integer' => 'Tiempo de vuelo, en minutos, es requerido',
],
'planned_flight_time' => [
'required' => 'Tiempo de vuelo, en minutos, es requerido',
'integer' => 'Tiempo de vuelo, en minutos, es requerido',
],
'source_name' => [
'required' => 'Origen del PIREP es requerido',
],
'g-recaptcha-response' => [
'required' => 'Por favor verifica que no eres un robot.',
'captcha' => '¡Error de CAPTCHA! intente de nuevo más tarde o póngase en contacto con el administrador del sitio.',
],
],
/**
* Custom Validation Attributes
*/
'attributes' => [],
];

View File

@@ -3,8 +3,6 @@
return [
'failed' => 'Queste credenziali non sono presenti nei nostri archivi.',
'throttle' => 'Troppi tentativi di login. Tenta di nuovo tra :seconds secondi per favore.',
'login' => 'Accedi',
'logout' => 'Uscita',
'password' => 'Password',
'createaccount' => 'Crea Account',
'forgotpassword' => 'Password Dimenticata',

View File

@@ -4,48 +4,50 @@
*/
return [
'dashboard' => 'Dashboard',
'administration' => 'Amministrazione',
'flight' => 'Volo|Voli',
'livemap' => 'Mappa Live',
'pilot' => 'Pilota|Piloti',
'pirep' => 'PIREP|PIREPs',
'newestpilots' => 'Ultimi Piloti',
'profile' => 'Profilo',
'email' => 'Email',
'login' => 'Accesso',
'register' => 'Registrazione',
'timezone' => 'Fuso Orario',
'country' => 'Paese',
'download' => 'Download|Downloads',
'from' => 'da',
'to' => 'a',
'status' => 'Stato',
'departure' => 'Partenza',
'arrival' => 'Arrivo',
'aircraft' => 'Aereomobile',
'airline' => 'Compagnia Aerea',
'distance' => 'Distanza',
'metar' => 'METAR',
'hour' => 'Ora|Ore',
'minute' => 'Minuto|Minuti',
'note' => 'Nota|Note',
'field' => 'Campo|Campi',
'name' => 'Nome',
'value' => 'Valore|Valori',
'remark' => 'Promemoria|Promemoria',
'find' => 'Trova',
'reset' => 'Resetta',
'submit' => 'Invia',
'edit' => 'Modifica',
'close' => 'Chiudi',
'whoops' => 'Ops',
'hello' => 'Ciao',
'regards' => 'Saluti',
'rightsreserved' => 'Tutti i Diritti Riservati',
'active' => 'Attivo',
'inactive' => 'Inattivo',
'days' => [
'dashboard' => 'Dashboard',
'administration' => 'Amministrazione',
'flight' => 'Volo|Voli',
'livemap' => 'Mappa Live',
'pilot' => 'Pilota|Piloti',
'pirep' => 'PIREP|PIREPs',
'newestpilots' => 'Ultimi Piloti',
'profile' => 'Profilo',
'email' => 'Email',
'login' => 'Accesso',
'logout' => 'Uscita',
'register' => 'Registrazione',
'timezone' => 'Fuso Orario',
'country' => 'Paese',
'download' => 'Download|Downloads',
'from' => 'da',
'to' => 'a',
'state' => 'Stato',
'status' => 'Stato',
'departure' => 'Partenza',
'arrival' => 'Arrivo',
'aircraft' => 'Aereomobile',
'airline' => 'Compagnia Aerea',
'distance' => 'Distanza',
'metar' => 'METAR',
'hour' => 'Ora|Ore',
'minute' => 'Minuto|Minuti',
'note' => 'Nota|Note',
'field' => 'Campo|Campi',
'name' => 'Nome',
'value' => 'Valore|Valori',
'remark' => 'Promemoria|Promemoria',
'find' => 'Trova',
'reset' => 'Resetta',
'submit' => 'Invia',
'edit' => 'Modifica',
'close' => 'Chiudi',
'whoops' => 'Ops',
'hello' => 'Ciao',
'regards' => 'Saluti',
'rightsreserved' => 'Tutti i Diritti Riservati',
'active' => 'Attivo',
'inactive' => 'Inattivo',
'days' => [
'mon' => 'Lunedì',
'tues' => 'Martedì',
'wed' => 'Mercoledì',

View File

@@ -13,8 +13,9 @@ return [
'fare' => 'Tariffa|Tariffe',
'class' => 'Classe',
'count' => 'Numero',
'flighttime' => 'Tempo di volo',
'flightlevel' => 'Livello di Volo',
'fieldsreadonly' => 'Quando un PIREP viene accettato/rifiutato, 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',
'flightident' => 'Numero di Volo/Codice/Leg',
'codeoptional' => 'Codice (facoltativo)',

View File

@@ -6,14 +6,15 @@ use App\Interfaces\Controller;
use Illuminate\Http\Request;
/**
* class SampleController
* class ApiController
* @package $MODULE_NAMESPACE$\$STUDLY_NAME$\Http\Controllers\Api
*/
class SampleController extends RestController
class ApiController extends Controller
{
/**
* Just send out a message
* @param Request $request
* @return mixed
*/
public function index(Request $request)
{
@@ -21,7 +22,9 @@ class SampleController extends RestController
}
/**
* Handles /hello
* @param Request $request
* @return mixed
*/
public function hello(Request $request)
{

View File

@@ -4,7 +4,7 @@
* This is publicly accessible
*/
Route::group(['middleware' => []], function() {
Route::get('/', '$STUDLY_NAME$Controller@index');
Route::get('/', 'ApiController@index');
});
/**
@@ -13,5 +13,5 @@ Route::group(['middleware' => []], function() {
Route::group(['middleware' => [
'api.auth'
]], function() {
Route::get('/hello', '$STUDLY_NAME$Controller@hello');
Route::get('/hello', 'ApiController@hello');
});

View File

@@ -18,12 +18,12 @@
<link rel="shortcut icon" type="image/png" href="{{ public_asset('/assets/img/favicon.png') }}"/>
<link href='https://fonts.googleapis.com/css?family=Muli:400,300' rel='stylesheet' type='text/css'>
<link href="https://fonts.googleapis.com/css?family=Roboto:400,700,300" rel="stylesheet" type="text/css">
<link href='https://fonts.googleapis.com/css?family=Muli:400,300' rel='stylesheet' type='text/css'/>
<link href="https://fonts.googleapis.com/css?family=Roboto:400,700,300" rel="stylesheet" type="text/css"/>
<link rel="stylesheet" href="{{ public_asset('/assets/global/css/vendor.css') }}">
<link rel="stylesheet" href="{{ public_asset('/assets/admin/css/vendor.css') }}">
<link rel="stylesheet" href="{{ public_asset('/assets/admin/css/admin.css') }}">
<link rel="stylesheet" href="{{ public_asset('/assets/global/css/vendor.css') }}"/>
<link rel="stylesheet" href="{{ public_asset('/assets/admin/css/vendor.css') }}"/>
<link rel="stylesheet" href="{{ public_asset('/assets/admin/css/admin.css') }}"/>
<style type="text/css">
@yield('css')
@@ -36,6 +36,7 @@
@else
const PHPVMS_USER_API_KEY = false;
@endif
@yield('scripts_head')
</script>
</head>

View File

@@ -38,11 +38,13 @@
{{ Utils::minutesToTimeString($pirep->flight_time) }}
</span>
</div>
<div><span class="description"><b>Aircraft</b>&nbsp;
{{ $pirep->aircraft->registration }}
({{ $pirep->aircraft->name }})
</span>
</div>
@if($pirep->aircraft)
<div><span class="description"><b>Aircraft</b>&nbsp;
{{ $pirep->aircraft->registration }}
({{ $pirep->aircraft->name }})
</span>
</div>
@endif
@if(filled($pirep->level))
<div>
<span class="description"><b>Flight Level</b>&nbsp;

View File

@@ -15,14 +15,19 @@
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700,200" 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/styles.css') }}" rel="stylesheet"/>
{{-- Start of the required files in the head block --}}
<link href="{{ public_asset('/assets/global/css/vendor.css') }}" rel="stylesheet"/>
<style type="text/css">
@yield('css')
</style>
<script>
@yield('scripts_head')
</script>
{{-- End of the required stuff in the head block --}}
<link href="{{ public_asset('/assets/frontend/css/styles.css') }}" rel="stylesheet"/>
</head>
<body>
<!-- Navbar -->

View File

@@ -1,5 +1,5 @@
@extends('auth.layout')
@section('title', __('auth.login'))
@section('title', __('common.login'))
@section('content')
<div class="col-md-4 content-center">
@@ -51,7 +51,7 @@
</div>
<div class="footer text-center">
<button class="btn btn-primary btn-round btn-lg btn-block">@lang('auth.login')</button>
<button class="btn btn-primary btn-round btn-lg btn-block">@lang('common.login')</button>
</div>
<div class="pull-left">
<h6>

View File

@@ -95,7 +95,7 @@
<li class="nav-item">
<a class="nav-link" href="{{ url('/logout') }}">
<i class="fas fa-sign-out-alt"></i>
<p>@lang('auth.logout')</p>
<p>@lang('common.logout')</p>
</a>
</li>
@endif

View File

@@ -240,7 +240,11 @@ flight reports that have been filed. You've been warned!
<div class="row">
<div class="col">
<div class="input-group input-group-sm form-group">
{{ Form::textarea('route', null, ['class' => 'form-control', 'placeholder' => __('flights.route')]) }}
{{ Form::textarea('route', null, [
'class' => 'form-control',
'placeholder' => __('flights.route'),
'readonly' => (!empty($pirep) && $pirep->read_only),
]) }}
<p class="text-danger">{{ $errors->first('route') }}</p>
</div>
</div>
@@ -287,7 +291,8 @@ flight reports that have been filed. You've been warned!
<td>
<div class="input-group input-group-sm form-group">
{{ Form::text($field->slug, null, [
'class' => 'form-control'
'class' => 'form-control',
'readonly' => (!empty($pirep) && $pirep->read_only),
]) }}
</div>
<p class="text-danger">{{ $errors->first($field->slug) }}</p>
@@ -318,14 +323,14 @@ flight reports that have been filed. You've been warned!
}}
@endif
@if(!isset($pirep) || (filled($pirep) && !$pirep->read_only))
{{ Form::button(__('pireps.savepirep'), [
{{ Form::button(__('pireps.savepirep'), [
'name' => 'submit',
'value' => 'Save',
'class' => 'btn btn-info',
'type' => 'submit'])
}}
@if(!isset($pirep) || (filled($pirep) && !$pirep->read_only))
{{ Form::button(__('pireps.submitpirep'), [
'name' => 'submit',
'value' => 'Submit',

View File

@@ -6,16 +6,7 @@
<div class="col-8">
<div class="row">
<div class="col-12">
<p>
<h2 style="margin-bottom: 5px;">{{$pirep->airline->code}}{{ $pirep->ident }}</h2>
<p>
@if($pirep->state === PirepState::IN_PROGRESS)
@else
@lang('pireps.arrived') {{$pirep->created_at->diffForHumans()}}
@endif
</p>
</p>
<h2 style="margin-bottom: 5px;">{{$pirep->airline->code}}{{ $pirep->ident }}</h2>
</div>
</div>
<div class="row">
@@ -101,6 +92,16 @@
</div>
@endif
<table class="table table-striped">
<tr>
<td width="30%">@lang('common.state')</td>
<td>
<div class="badge badge-info">
{{ PirepState::label($pirep->state) }}
</div>
</td>
</tr>
<tr>
<td width="30%">@lang('common.status')</td>
<td>

View File

@@ -33,7 +33,13 @@
'id' => $pirep->arr_airport->icao
])}}">{{$pirep->arr_airport->icao}}</a>)
</td>
<td>{{ $pirep->aircraft->name }}</td>
<td>
@if($pirep->aircraft)
{{ $pirep->aircraft->name }}
@else
-
@endif
</td>
<td class="text-center">
{{ (new \App\Support\Units\Time($pirep->flight_time)) }}
</td>

View File

@@ -7,7 +7,9 @@
<td>
{{ $p->dpt_airport_id }}-
{{ $p->arr_airport_id }}&nbsp;
{{ $p->aircraft->name }}
@if($p->aircraft)
{{ $p->aircraft->name }}
@endif
</td>
</tr>
@endforeach