Merge branch 'dev' of https://github.com/nabeelio/phpvms into dev
This commit is contained in:
@@ -73,6 +73,7 @@ class CreateFlightTables extends Migration
|
|||||||
$table->bigIncrements('id');
|
$table->bigIncrements('id');
|
||||||
$table->string('flight_id', \App\Interfaces\Model::ID_MAX_LENGTH);
|
$table->string('flight_id', \App\Interfaces\Model::ID_MAX_LENGTH);
|
||||||
$table->string('name', 50);
|
$table->string('name', 50);
|
||||||
|
$table->string('slug', 50)->nullable();
|
||||||
$table->text('value');
|
$table->text('value');
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
|
|
||||||
|
|||||||
@@ -394,18 +394,20 @@ flights:
|
|||||||
|
|
||||||
flight_fields:
|
flight_fields:
|
||||||
- name: Departure Gate
|
- name: Departure Gate
|
||||||
slug: departure_gate
|
slug: departure-gate
|
||||||
- name: Arrival Gate
|
- name: Arrival Gate
|
||||||
slug: arrival_gate
|
slug: arrival-gate
|
||||||
|
|
||||||
flight_field_values:
|
flight_field_values:
|
||||||
- id: 1
|
- id: 1
|
||||||
flight_id: flightid_1
|
flight_id: flightid_1
|
||||||
name: cost index
|
name: cost index
|
||||||
|
slug: cost-index
|
||||||
value: 80
|
value: 80
|
||||||
- id: 2
|
- id: 2
|
||||||
flight_id: flightid_2
|
flight_id: flightid_2
|
||||||
name: cost index
|
name: cost index
|
||||||
|
slug: cost-index
|
||||||
value: 100
|
value: 100
|
||||||
|
|
||||||
flight_subfleet:
|
flight_subfleet:
|
||||||
@@ -539,24 +541,24 @@ pirep_fares:
|
|||||||
pirep_fields:
|
pirep_fields:
|
||||||
- id: 1
|
- id: 1
|
||||||
name: departure gate
|
name: departure gate
|
||||||
slug: departure_gate
|
slug: departure-gate
|
||||||
required: 1
|
required: 1
|
||||||
- id: 2
|
- id: 2
|
||||||
name: arrival gate
|
name: arrival gate
|
||||||
slug: arrival_gate
|
slug: arrival-gate
|
||||||
required: 0
|
required: 0
|
||||||
|
|
||||||
pirep_field_values:
|
pirep_field_values:
|
||||||
- id: 1
|
- id: 1
|
||||||
pirep_id: pirepid_1
|
pirep_id: pirepid_1
|
||||||
name: arrival gate
|
name: arrival gate
|
||||||
slug: arrival_gate
|
slug: arrival-gate
|
||||||
value: 10
|
value: 10
|
||||||
source: manual
|
source: manual
|
||||||
- id: 2
|
- id: 2
|
||||||
pirep_id: pirepid_1
|
pirep_id: pirepid_1
|
||||||
name: departure gate
|
name: departure gate
|
||||||
slug: departure_gate
|
slug: departure-gate
|
||||||
value: B32
|
value: B32
|
||||||
source: manual
|
source: manual
|
||||||
|
|
||||||
|
|||||||
@@ -121,6 +121,7 @@ class PirepController extends Controller
|
|||||||
|
|
||||||
$custom_fields[] = [
|
$custom_fields[] = [
|
||||||
'name' => $field->name,
|
'name' => $field->name,
|
||||||
|
'slug' => $field->slug,
|
||||||
'value' => $request->input($field->slug),
|
'value' => $request->input($field->slug),
|
||||||
'source' => PirepSource::MANUAL
|
'source' => PirepSource::MANUAL
|
||||||
];
|
];
|
||||||
@@ -139,6 +140,10 @@ class PirepController extends Controller
|
|||||||
protected function saveFares(Pirep $pirep, Request $request)
|
protected function saveFares(Pirep $pirep, Request $request)
|
||||||
{
|
{
|
||||||
$fares = [];
|
$fares = [];
|
||||||
|
if (!$pirep->aircraft) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
foreach ($pirep->aircraft->subfleet->fares as $fare) {
|
foreach ($pirep->aircraft->subfleet->fares as $fare) {
|
||||||
$field_name = 'fare_'.$fare->id;
|
$field_name = 'fare_'.$fare->id;
|
||||||
if (!$request->filled($field_name)) {
|
if (!$request->filled($field_name)) {
|
||||||
@@ -186,7 +191,6 @@ class PirepController extends Controller
|
|||||||
$pirep = $this->pirepRepo->find($id);
|
$pirep = $this->pirepRepo->find($id);
|
||||||
if (empty($pirep)) {
|
if (empty($pirep)) {
|
||||||
Flash::error('Pirep not found');
|
Flash::error('Pirep not found');
|
||||||
|
|
||||||
return redirect(route('frontend.pirep.index'));
|
return redirect(route('frontend.pirep.index'));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -244,40 +248,45 @@ class PirepController extends Controller
|
|||||||
$pirep = new Pirep($request->post());
|
$pirep = new Pirep($request->post());
|
||||||
$pirep->user_id = Auth::user()->id;
|
$pirep->user_id = Auth::user()->id;
|
||||||
|
|
||||||
# Are they allowed at this airport?
|
$attrs = $request->all();
|
||||||
if (setting('pilots.only_flights_from_current')
|
$attrs['submit'] = strtolower($attrs['submit']);
|
||||||
&& Auth::user()->curr_airport_id !== $pirep->dpt_airport_id) {
|
|
||||||
return $this->flashError(
|
|
||||||
'You are currently not at the departure airport!',
|
|
||||||
'frontend.pireps.create'
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
# Can they fly this aircraft?
|
if($attrs['submit'] === 'submit') {
|
||||||
if (setting('pireps.restrict_aircraft_to_rank', false)
|
# Are they allowed at this airport?
|
||||||
&& !$this->userSvc->aircraftAllowed(Auth::user(), $pirep->aircraft_id)) {
|
if (setting('pilots.only_flights_from_current')
|
||||||
return $this->flashError(
|
&& Auth::user()->curr_airport_id !== $pirep->dpt_airport_id) {
|
||||||
'You are not allowed to fly this aircraft!',
|
return $this->flashError(
|
||||||
'frontend.pireps.create'
|
'You are currently not at the departure airport!',
|
||||||
);
|
'frontend.pireps.create'
|
||||||
}
|
);
|
||||||
|
}
|
||||||
|
|
||||||
# is the aircraft in the right place?
|
# Can they fly this aircraft?
|
||||||
if (setting('pireps.only_aircraft_at_dpt_airport')
|
if (setting('pireps.restrict_aircraft_to_rank', false)
|
||||||
&& $pirep->aircraft_id !== $pirep->dpt_airport_id) {
|
&& !$this->userSvc->aircraftAllowed(Auth::user(), $pirep->aircraft_id)) {
|
||||||
return $this->flashError(
|
return $this->flashError(
|
||||||
'This aircraft is not positioned at the departure airport!',
|
'You are not allowed to fly this aircraft!',
|
||||||
'frontend.pireps.create'
|
'frontend.pireps.create'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
# Make sure this isn't a duplicate
|
# is the aircraft in the right place?
|
||||||
$dupe_pirep = $this->pirepSvc->findDuplicate($pirep);
|
if (setting('pireps.only_aircraft_at_dpt_airport')
|
||||||
if ($dupe_pirep !== false) {
|
&& $pirep->aircraft_id !== $pirep->dpt_airport_id) {
|
||||||
return $this->flashError(
|
return $this->flashError(
|
||||||
'This PIREP has already been filed.',
|
'This aircraft is not positioned at the departure airport!',
|
||||||
'frontend.pireps.create'
|
'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
|
// Any special fields
|
||||||
@@ -296,7 +305,10 @@ class PirepController extends Controller
|
|||||||
// Depending on the button they selected, set an initial state
|
// Depending on the button they selected, set an initial state
|
||||||
// Can be saved as a draft or just submitted
|
// Can be saved as a draft or just submitted
|
||||||
if ($attrs['submit'] === 'save') {
|
if ($attrs['submit'] === 'save') {
|
||||||
$pirep->status = PirepState::DRAFT;
|
if(!$pirep->read_only) {
|
||||||
|
$pirep->state = PirepState::DRAFT;
|
||||||
|
}
|
||||||
|
|
||||||
$pirep->save();
|
$pirep->save();
|
||||||
Flash::success('PIREP saved successfully.');
|
Flash::success('PIREP saved successfully.');
|
||||||
} else if ($attrs['submit'] === 'submit') {
|
} else if ($attrs['submit'] === 'submit') {
|
||||||
@@ -317,7 +329,6 @@ class PirepController extends Controller
|
|||||||
$pirep = $this->pirepRepo->findWithoutFail($id);
|
$pirep = $this->pirepRepo->findWithoutFail($id);
|
||||||
if (empty($pirep)) {
|
if (empty($pirep)) {
|
||||||
Flash::error('Pirep not found');
|
Flash::error('Pirep not found');
|
||||||
|
|
||||||
return redirect(route('frontend.pireps.index'));
|
return redirect(route('frontend.pireps.index'));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -327,6 +338,10 @@ class PirepController extends Controller
|
|||||||
|
|
||||||
# set the custom fields
|
# set the custom fields
|
||||||
foreach ($pirep->fields as $field) {
|
foreach ($pirep->fields as $field) {
|
||||||
|
if($field->slug == null) {
|
||||||
|
$field->slug = str_slug($field->name);
|
||||||
|
}
|
||||||
|
|
||||||
$pirep->{$field->slug} = $field->value;
|
$pirep->{$field->slug} = $field->value;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -363,6 +378,7 @@ class PirepController extends Controller
|
|||||||
|
|
||||||
$orig_route = $pirep->route;
|
$orig_route = $pirep->route;
|
||||||
$attrs = $request->all();
|
$attrs = $request->all();
|
||||||
|
$attrs['submit'] = strtolower($attrs['submit']);
|
||||||
|
|
||||||
# Fix the time
|
# Fix the time
|
||||||
$attrs['flight_time'] = Time::init(
|
$attrs['flight_time'] = Time::init(
|
||||||
@@ -384,7 +400,7 @@ class PirepController extends Controller
|
|||||||
} else if($attrs['submit'] === 'submit') {
|
} else if($attrs['submit'] === 'submit') {
|
||||||
$this->pirepSvc->submit($pirep);
|
$this->pirepSvc->submit($pirep);
|
||||||
Flash::success('PIREP submitted!');
|
Flash::success('PIREP submitted!');
|
||||||
} else if($attrs['submit'] === 'cancel') {
|
} else if($attrs['submit'] === 'delete' || $attrs['submit'] === 'cancel') {
|
||||||
$this->pirepRepo->update([
|
$this->pirepRepo->update([
|
||||||
'state' => PirepState::CANCELLED,
|
'state' => PirepState::CANCELLED,
|
||||||
'status' => PirepStatus::CANCELLED,
|
'status' => PirepStatus::CANCELLED,
|
||||||
|
|||||||
@@ -26,6 +26,17 @@ class CreatePirepRequest extends FormRequest
|
|||||||
*/
|
*/
|
||||||
public function rules()
|
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 = Pirep::$rules;
|
||||||
|
|
||||||
$field_rules['hours'] = 'nullable|integer';
|
$field_rules['hours'] = 'nullable|integer';
|
||||||
|
|||||||
@@ -3,7 +3,9 @@
|
|||||||
namespace App\Http\Requests;
|
namespace App\Http\Requests;
|
||||||
|
|
||||||
use App\Models\Pirep;
|
use App\Models\Pirep;
|
||||||
|
use App\Repositories\PirepFieldRepository;
|
||||||
use Illuminate\Foundation\Http\FormRequest;
|
use Illuminate\Foundation\Http\FormRequest;
|
||||||
|
use Log;
|
||||||
|
|
||||||
class UpdatePirepRequest extends FormRequest
|
class UpdatePirepRequest extends FormRequest
|
||||||
{
|
{
|
||||||
@@ -24,6 +26,31 @@ class UpdatePirepRequest extends FormRequest
|
|||||||
*/
|
*/
|
||||||
public function rules()
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,11 +18,21 @@ class FlightFieldValue extends Model
|
|||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
'flight_id',
|
'flight_id',
|
||||||
'name',
|
'name',
|
||||||
|
'slug',
|
||||||
'value',
|
'value',
|
||||||
];
|
];
|
||||||
|
|
||||||
public static $rules = [];
|
public static $rules = [];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param $name
|
||||||
|
*/
|
||||||
|
public function setNameAttribute($name): void
|
||||||
|
{
|
||||||
|
$this->attributes['name'] = $name;
|
||||||
|
$this->attributes['slug'] = str_slug($name);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Relationships
|
* Relationships
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
35
app/Models/Observers/Sluggable.php
Normal file
35
app/Models/Observers/Sluggable.php
Normal 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -40,10 +40,12 @@ use PhpUnitsOfMeasure\Exception\NonStringUnitName;
|
|||||||
* @property User user
|
* @property User user
|
||||||
* @property Flight|null flight
|
* @property Flight|null flight
|
||||||
* @property Collection fields
|
* @property Collection fields
|
||||||
|
* @property int status
|
||||||
|
* @property bool state
|
||||||
* @property Carbon submitted_at
|
* @property Carbon submitted_at
|
||||||
* @property Carbon created_at
|
* @property Carbon created_at
|
||||||
* @property Carbon updated_at
|
* @property Carbon updated_at
|
||||||
* @property bool state
|
* @property bool read_only
|
||||||
* @property Acars position
|
* @property Acars position
|
||||||
* @property Acars[] acars
|
* @property Acars[] acars
|
||||||
* @package App\Models
|
* @package App\Models
|
||||||
@@ -126,9 +128,9 @@ class Pirep extends Model
|
|||||||
* If a PIREP is in these states, then it can't be changed.
|
* If a PIREP is in these states, then it can't be changed.
|
||||||
*/
|
*/
|
||||||
public static $read_only_states = [
|
public static $read_only_states = [
|
||||||
|
PirepState::PENDING,
|
||||||
PirepState::ACCEPTED,
|
PirepState::ACCEPTED,
|
||||||
PirepState::REJECTED,
|
PirepState::REJECTED,
|
||||||
//PirepState::PENDING,
|
|
||||||
PirepState::CANCELLED,
|
PirepState::CANCELLED,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ class PirepFieldValues extends Model
|
|||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
'pirep_id',
|
'pirep_id',
|
||||||
'name',
|
'name',
|
||||||
|
'slug',
|
||||||
'value',
|
'value',
|
||||||
'source',
|
'source',
|
||||||
];
|
];
|
||||||
@@ -23,6 +24,15 @@ class PirepFieldValues extends Model
|
|||||||
'name' => 'required',
|
'name' => 'required',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param $name
|
||||||
|
*/
|
||||||
|
public function setNameAttribute($name): void
|
||||||
|
{
|
||||||
|
$this->attributes['name'] = $name;
|
||||||
|
$this->attributes['slug'] = str_slug($name);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Foreign Keys
|
* Foreign Keys
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -4,21 +4,23 @@ namespace App\Providers;
|
|||||||
|
|
||||||
use App\Models\Aircraft;
|
use App\Models\Aircraft;
|
||||||
use App\Models\Airport;
|
use App\Models\Airport;
|
||||||
|
use App\Models\FlightField;
|
||||||
|
use App\Models\FlightFieldValue;
|
||||||
use App\Models\Journal;
|
use App\Models\Journal;
|
||||||
use App\Models\JournalTransaction;
|
use App\Models\JournalTransaction;
|
||||||
use App\Models\Observers\AircraftObserver;
|
use App\Models\Observers\AircraftObserver;
|
||||||
use App\Models\Observers\AirportObserver;
|
use App\Models\Observers\AirportObserver;
|
||||||
use App\Models\Observers\JournalObserver;
|
use App\Models\Observers\JournalObserver;
|
||||||
use App\Models\Observers\JournalTransactionObserver;
|
use App\Models\Observers\JournalTransactionObserver;
|
||||||
use App\Models\Observers\PirepFieldObserver;
|
use App\Models\Observers\Sluggable;
|
||||||
use App\Models\Observers\SettingObserver;
|
use App\Models\Observers\SettingObserver;
|
||||||
use App\Models\Observers\SubfleetObserver;
|
use App\Models\Observers\SubfleetObserver;
|
||||||
use App\Models\PirepField;
|
use App\Models\PirepField;
|
||||||
|
use App\Models\PirepFieldValues;
|
||||||
use App\Models\Setting;
|
use App\Models\Setting;
|
||||||
use App\Models\Subfleet;
|
use App\Models\Subfleet;
|
||||||
use App\Repositories\SettingRepository;
|
use App\Repositories\SettingRepository;
|
||||||
use App\Services\ModuleService;
|
use App\Services\ModuleService;
|
||||||
use Illuminate\Support\Carbon;
|
|
||||||
use Illuminate\Support\Facades\Schema;
|
use Illuminate\Support\Facades\Schema;
|
||||||
use Illuminate\Support\ServiceProvider;
|
use Illuminate\Support\ServiceProvider;
|
||||||
use View;
|
use View;
|
||||||
@@ -42,10 +44,15 @@ class AppServiceProvider extends ServiceProvider
|
|||||||
Airport::observe(AirportObserver::class);
|
Airport::observe(AirportObserver::class);
|
||||||
Journal::observe(JournalObserver::class);
|
Journal::observe(JournalObserver::class);
|
||||||
JournalTransaction::observe(JournalTransactionObserver::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);
|
Setting::observe(SettingObserver::class);
|
||||||
Subfleet::observe(SubfleetObserver::class);
|
Subfleet::observe(SubfleetObserver::class);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -55,7 +62,6 @@ class AppServiceProvider extends ServiceProvider
|
|||||||
{
|
{
|
||||||
# Only dev environment stuff
|
# Only dev environment stuff
|
||||||
if ($this->app->environment() === 'dev') {
|
if ($this->app->environment() === 'dev') {
|
||||||
|
|
||||||
# Only load the IDE helper if it's included. This lets use distribute the
|
# Only load the IDE helper if it's included. This lets use distribute the
|
||||||
# package without any dev dependencies
|
# package without any dev dependencies
|
||||||
if (class_exists(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class)) {
|
if (class_exists(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class)) {
|
||||||
|
|||||||
@@ -3,10 +3,8 @@
|
|||||||
namespace App\Services;
|
namespace App\Services;
|
||||||
|
|
||||||
use App\Interfaces\Service;
|
use App\Interfaces\Service;
|
||||||
|
use App\Support\Database;
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
use Illuminate\Database\QueryException;
|
|
||||||
use Illuminate\Support\Facades\DB;
|
|
||||||
use Symfony\Component\Yaml\Yaml;
|
|
||||||
use Webpatser\Uuid\Uuid;
|
use Webpatser\Uuid\Uuid;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -42,8 +40,7 @@ class DatabaseService extends Service
|
|||||||
*/
|
*/
|
||||||
public function seed_from_yaml_file($yaml_file, $ignore_errors = false): array
|
public function seed_from_yaml_file($yaml_file, $ignore_errors = false): array
|
||||||
{
|
{
|
||||||
$yml = file_get_contents($yaml_file);
|
return Database::seed_from_yaml_file($yaml_file, $ignore_errors);
|
||||||
return $this->seed_from_yaml($yml, $ignore_errors);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -54,27 +51,7 @@ class DatabaseService extends Service
|
|||||||
*/
|
*/
|
||||||
public function seed_from_yaml($yml, $ignore_errors = false): array
|
public function seed_from_yaml($yml, $ignore_errors = false): array
|
||||||
{
|
{
|
||||||
$imported = [];
|
return Database::seed_from_yaml($yml, $ignore_errors);
|
||||||
$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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -92,24 +69,6 @@ class DatabaseService extends Service
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# encrypt any password fields
|
return Database::insert_row($table, $row);
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ use App\Models\Bid;
|
|||||||
use App\Models\Enums\AcarsType;
|
use App\Models\Enums\AcarsType;
|
||||||
use App\Models\Enums\PirepSource;
|
use App\Models\Enums\PirepSource;
|
||||||
use App\Models\Enums\PirepState;
|
use App\Models\Enums\PirepState;
|
||||||
|
use App\Models\Enums\PirepStatus;
|
||||||
use App\Models\Enums\UserState;
|
use App\Models\Enums\UserState;
|
||||||
use App\Models\Navdata;
|
use App\Models\Navdata;
|
||||||
use App\Models\Pirep;
|
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]);
|
Log::info('New PIREP filed', [$pirep]);
|
||||||
event(new PirepFiled($pirep));
|
event(new PirepFiled($pirep));
|
||||||
|
|
||||||
|
|||||||
96
app/Support/Database.php
Normal file
96
app/Support/Database.php
Normal 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,6 +3,7 @@
|
|||||||
namespace App\Widgets;
|
namespace App\Widgets;
|
||||||
|
|
||||||
use App\Interfaces\Widget;
|
use App\Interfaces\Widget;
|
||||||
|
use App\Models\Enums\PirepState;
|
||||||
use App\Repositories\PirepRepository;
|
use App\Repositories\PirepRepository;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -22,9 +23,17 @@ class LatestPireps extends Widget
|
|||||||
{
|
{
|
||||||
$pirepRepo = app(PirepRepository::class);
|
$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', [
|
return view('widgets.latest_pireps', [
|
||||||
'config' => $this->config,
|
'config' => $this->config,
|
||||||
'pireps' => $pirepRepo->recent($this->config['count']),
|
'pireps' => $pireps,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
552
composer.lock
generated
552
composer.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -15,7 +15,7 @@ return [
|
|||||||
'views/frontend' => 'Resources/views/layouts/frontend.blade.php',
|
'views/frontend' => 'Resources/views/layouts/frontend.blade.php',
|
||||||
'views/admin' => 'Resources/views/layouts/admin.blade.php',
|
'views/admin' => 'Resources/views/layouts/admin.blade.php',
|
||||||
'listener-test' => 'Listeners/TestEventListener.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',
|
'controller-admin' => 'Http/Controllers/Admin/AdminController.php',
|
||||||
'scaffold/config' => 'Config/config.php',
|
'scaffold/config' => 'Config/config.php',
|
||||||
'composer' => 'composer.json',
|
'composer' => 'composer.json',
|
||||||
@@ -53,7 +53,7 @@ return [
|
|||||||
'config' => ['path' => 'Config', 'generate' => true],
|
'config' => ['path' => 'Config', 'generate' => true],
|
||||||
'command' => ['path' => 'Console', 'generate' => true],
|
'command' => ['path' => 'Console', 'generate' => true],
|
||||||
'migration' => ['path' => 'Database/migrations', '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],
|
'factory' => ['path' => 'Database/factories', 'generate' => true],
|
||||||
'model' => ['path' => 'Models', 'generate' => true],
|
'model' => ['path' => 'Models', 'generate' => true],
|
||||||
'controller' => ['path' => 'Http/Controllers', 'generate' => true],
|
'controller' => ['path' => 'Http/Controllers', 'generate' => true],
|
||||||
|
|||||||
@@ -16,6 +16,8 @@
|
|||||||
<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/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"/>
|
||||||
|
|
||||||
@@ -24,8 +26,8 @@
|
|||||||
|
|
||||||
<style>
|
<style>
|
||||||
.table tr:first-child td { border-top: 0px; }
|
.table tr:first-child td { border-top: 0px; }
|
||||||
|
@yield('css')
|
||||||
</style>
|
</style>
|
||||||
@yield('css')
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
@@ -33,13 +35,6 @@
|
|||||||
<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">
|
||||||
<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">
|
<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=""/>
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ class MigrationService extends Service
|
|||||||
'core' => \App::databasePath() . '/migrations'
|
'core' => \App::databasePath() . '/migrations'
|
||||||
];
|
];
|
||||||
|
|
||||||
$modules = Module::enabled();
|
$modules = Module::allEnabled();
|
||||||
foreach ($modules as $module) {
|
foreach ($modules as $module) {
|
||||||
$module_path = $module->getPath() . '/Database/migrations';
|
$module_path = $module->getPath() . '/Database/migrations';
|
||||||
if(file_exists($module_path)) {
|
if(file_exists($module_path)) {
|
||||||
|
|||||||
@@ -3,8 +3,6 @@
|
|||||||
return [
|
return [
|
||||||
'failed' => 'These credentials do not match our records.',
|
'failed' => 'These credentials do not match our records.',
|
||||||
'throttle' => 'Too many login attempts. Please try again in :seconds seconds.',
|
'throttle' => 'Too many login attempts. Please try again in :seconds seconds.',
|
||||||
'login' => 'Log In',
|
|
||||||
'logout' => 'Log Out',
|
|
||||||
'password' => 'Password',
|
'password' => 'Password',
|
||||||
'createaccount' => 'Create Account',
|
'createaccount' => 'Create Account',
|
||||||
'forgotpassword' => 'Forgot Password',
|
'forgotpassword' => 'Forgot Password',
|
||||||
|
|||||||
@@ -4,47 +4,50 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'dashboard' => 'Dashboard',
|
'dashboard' => 'Dashboard',
|
||||||
'administration' => 'Administration',
|
'administration' => 'Administration',
|
||||||
'flight' => 'Flight|Flights',
|
'flight' => 'Flight|Flights',
|
||||||
'livemap' => 'Live Map',
|
'livemap' => 'Live Map',
|
||||||
'pilot' => 'Pilot|Pilots',
|
'pilot' => 'Pilot|Pilots',
|
||||||
'pirep' => 'PIREP|PIREPs',
|
'pirep' => 'PIREP|PIREPs',
|
||||||
'newestpilots' => 'Newest Pilots',
|
'newestpilots' => 'Newest Pilots',
|
||||||
'profile' => 'Profile',
|
'profile' => 'Profile',
|
||||||
'email' => 'Email',
|
'email' => 'Email',
|
||||||
'register' => 'Register',
|
'register' => 'Register',
|
||||||
'timezone' => 'Timezone',
|
'login' => 'Log In',
|
||||||
'country' => 'Country',
|
'logout' => 'Log Out',
|
||||||
'download' => 'Download|Downloads',
|
'timezone' => 'Timezone',
|
||||||
'from' => 'from',
|
'country' => 'Country',
|
||||||
'to' => 'to',
|
'download' => 'Download|Downloads',
|
||||||
'status' => 'Status',
|
'from' => 'from',
|
||||||
'departure' => 'Departure',
|
'to' => 'to',
|
||||||
'arrival' => 'Arrival',
|
'state' => 'State',
|
||||||
'aircraft' => 'Aircraft',
|
'status' => 'Status',
|
||||||
'airline' => 'Airline',
|
'departure' => 'Departure',
|
||||||
'distance' => 'Distance',
|
'arrival' => 'Arrival',
|
||||||
'metar' => 'METAR',
|
'aircraft' => 'Aircraft',
|
||||||
'hour' => 'Hour|Hours',
|
'airline' => 'Airline',
|
||||||
'minute' => 'Minute|Minutes',
|
'distance' => 'Distance',
|
||||||
'note' => 'Note|Notes',
|
'metar' => 'METAR',
|
||||||
'field' => 'Field|Fields',
|
'hour' => 'Hour|Hours',
|
||||||
'name' => 'Name',
|
'minute' => 'Minute|Minutes',
|
||||||
'value' => 'Value|Values',
|
'note' => 'Note|Notes',
|
||||||
'remark' => 'Remark|Remarks',
|
'field' => 'Field|Fields',
|
||||||
'find' => 'Find',
|
'name' => 'Name',
|
||||||
'reset' => 'Reset',
|
'value' => 'Value|Values',
|
||||||
'submit' => 'Submit',
|
'remark' => 'Remark|Remarks',
|
||||||
'edit' => 'Edit',
|
'find' => 'Find',
|
||||||
'close' => 'Close',
|
'reset' => 'Reset',
|
||||||
'whoops' => 'Whoops',
|
'submit' => 'Submit',
|
||||||
'hello' => 'Hello',
|
'edit' => 'Edit',
|
||||||
'regards' => 'Regards',
|
'close' => 'Close',
|
||||||
'rightsreserved' => 'All Rights Reserved',
|
'whoops' => 'Whoops',
|
||||||
'active' => 'Active',
|
'hello' => 'Hello',
|
||||||
'inactive' => 'Inactive',
|
'regards' => 'Regards',
|
||||||
'days' => [
|
'rightsreserved' => 'All Rights Reserved',
|
||||||
|
'active' => 'Active',
|
||||||
|
'inactive' => 'Inactive',
|
||||||
|
'days' => [
|
||||||
'mon' => 'Monday',
|
'mon' => 'Monday',
|
||||||
'tues' => 'Tuesday',
|
'tues' => 'Tuesday',
|
||||||
'wed' => 'Wednesday',
|
'wed' => 'Wednesday',
|
||||||
|
|||||||
@@ -18,8 +18,9 @@ return [
|
|||||||
'fare' => 'Fare|Fares',
|
'fare' => 'Fare|Fares',
|
||||||
'class' => 'Class',
|
'class' => 'Class',
|
||||||
'count' => 'Count',
|
'count' => 'Count',
|
||||||
|
'flighttime' => 'Flight Time',
|
||||||
'flightlevel' => 'Flight Level',
|
'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',
|
'flightinformations' => 'Flight Information',
|
||||||
'flightident' => 'Flight Number/Code/Leg',
|
'flightident' => 'Flight Number/Code/Leg',
|
||||||
'codeoptional' => 'Code (optional)',
|
'codeoptional' => 'Code (optional)',
|
||||||
|
|||||||
19
resources/lang/es/auth.php
Normal file
19
resources/lang/es/auth.php
Normal 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.',
|
||||||
|
|
||||||
|
];
|
||||||
246
resources/lang/es/installer_messages.php
Normal file
246
resources/lang/es/installer_messages.php
Normal 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, & 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 & 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 ',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
];
|
||||||
19
resources/lang/es/pagination.php
Normal file
19
resources/lang/es/pagination.php
Normal 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' => '« Anterior',
|
||||||
|
'next' => 'Siguiente »',
|
||||||
|
|
||||||
|
];
|
||||||
23
resources/lang/es/passwords.php
Normal file
23
resources/lang/es/passwords.php
Normal 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.",
|
||||||
|
|
||||||
|
];
|
||||||
106
resources/lang/es/system.php
Normal file
106
resources/lang/es/system.php
Normal 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',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
];
|
||||||
120
resources/lang/es/validation.php
Normal file
120
resources/lang/es/validation.php
Normal 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' => [],
|
||||||
|
|
||||||
|
];
|
||||||
@@ -3,8 +3,6 @@
|
|||||||
return [
|
return [
|
||||||
'failed' => 'Queste credenziali non sono presenti nei nostri archivi.',
|
'failed' => 'Queste credenziali non sono presenti nei nostri archivi.',
|
||||||
'throttle' => 'Troppi tentativi di login. Tenta di nuovo tra :seconds secondi per favore.',
|
'throttle' => 'Troppi tentativi di login. Tenta di nuovo tra :seconds secondi per favore.',
|
||||||
'login' => 'Accedi',
|
|
||||||
'logout' => 'Uscita',
|
|
||||||
'password' => 'Password',
|
'password' => 'Password',
|
||||||
'createaccount' => 'Crea Account',
|
'createaccount' => 'Crea Account',
|
||||||
'forgotpassword' => 'Password Dimenticata',
|
'forgotpassword' => 'Password Dimenticata',
|
||||||
|
|||||||
@@ -4,48 +4,50 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'dashboard' => 'Dashboard',
|
'dashboard' => 'Dashboard',
|
||||||
'administration' => 'Amministrazione',
|
'administration' => 'Amministrazione',
|
||||||
'flight' => 'Volo|Voli',
|
'flight' => 'Volo|Voli',
|
||||||
'livemap' => 'Mappa Live',
|
'livemap' => 'Mappa Live',
|
||||||
'pilot' => 'Pilota|Piloti',
|
'pilot' => 'Pilota|Piloti',
|
||||||
'pirep' => 'PIREP|PIREPs',
|
'pirep' => 'PIREP|PIREPs',
|
||||||
'newestpilots' => 'Ultimi Piloti',
|
'newestpilots' => 'Ultimi Piloti',
|
||||||
'profile' => 'Profilo',
|
'profile' => 'Profilo',
|
||||||
'email' => 'Email',
|
'email' => 'Email',
|
||||||
'login' => 'Accesso',
|
'login' => 'Accesso',
|
||||||
'register' => 'Registrazione',
|
'logout' => 'Uscita',
|
||||||
'timezone' => 'Fuso Orario',
|
'register' => 'Registrazione',
|
||||||
'country' => 'Paese',
|
'timezone' => 'Fuso Orario',
|
||||||
'download' => 'Download|Downloads',
|
'country' => 'Paese',
|
||||||
'from' => 'da',
|
'download' => 'Download|Downloads',
|
||||||
'to' => 'a',
|
'from' => 'da',
|
||||||
'status' => 'Stato',
|
'to' => 'a',
|
||||||
'departure' => 'Partenza',
|
'state' => 'Stato',
|
||||||
'arrival' => 'Arrivo',
|
'status' => 'Stato',
|
||||||
'aircraft' => 'Aereomobile',
|
'departure' => 'Partenza',
|
||||||
'airline' => 'Compagnia Aerea',
|
'arrival' => 'Arrivo',
|
||||||
'distance' => 'Distanza',
|
'aircraft' => 'Aereomobile',
|
||||||
'metar' => 'METAR',
|
'airline' => 'Compagnia Aerea',
|
||||||
'hour' => 'Ora|Ore',
|
'distance' => 'Distanza',
|
||||||
'minute' => 'Minuto|Minuti',
|
'metar' => 'METAR',
|
||||||
'note' => 'Nota|Note',
|
'hour' => 'Ora|Ore',
|
||||||
'field' => 'Campo|Campi',
|
'minute' => 'Minuto|Minuti',
|
||||||
'name' => 'Nome',
|
'note' => 'Nota|Note',
|
||||||
'value' => 'Valore|Valori',
|
'field' => 'Campo|Campi',
|
||||||
'remark' => 'Promemoria|Promemoria',
|
'name' => 'Nome',
|
||||||
'find' => 'Trova',
|
'value' => 'Valore|Valori',
|
||||||
'reset' => 'Resetta',
|
'remark' => 'Promemoria|Promemoria',
|
||||||
'submit' => 'Invia',
|
'find' => 'Trova',
|
||||||
'edit' => 'Modifica',
|
'reset' => 'Resetta',
|
||||||
'close' => 'Chiudi',
|
'submit' => 'Invia',
|
||||||
'whoops' => 'Ops',
|
'edit' => 'Modifica',
|
||||||
'hello' => 'Ciao',
|
'close' => 'Chiudi',
|
||||||
'regards' => 'Saluti',
|
'whoops' => 'Ops',
|
||||||
'rightsreserved' => 'Tutti i Diritti Riservati',
|
'hello' => 'Ciao',
|
||||||
'active' => 'Attivo',
|
'regards' => 'Saluti',
|
||||||
'inactive' => 'Inattivo',
|
'rightsreserved' => 'Tutti i Diritti Riservati',
|
||||||
'days' => [
|
'active' => 'Attivo',
|
||||||
|
'inactive' => 'Inattivo',
|
||||||
|
'days' => [
|
||||||
'mon' => 'Lunedì',
|
'mon' => 'Lunedì',
|
||||||
'tues' => 'Martedì',
|
'tues' => 'Martedì',
|
||||||
'wed' => 'Mercoledì',
|
'wed' => 'Mercoledì',
|
||||||
|
|||||||
@@ -13,8 +13,9 @@ return [
|
|||||||
'fare' => 'Tariffa|Tariffe',
|
'fare' => 'Tariffa|Tariffe',
|
||||||
'class' => 'Classe',
|
'class' => 'Classe',
|
||||||
'count' => 'Numero',
|
'count' => 'Numero',
|
||||||
|
'flighttime' => 'Tempo di volo',
|
||||||
'flightlevel' => 'Livello 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',
|
'flightinformations' => 'Informazioni di Volo',
|
||||||
'flightident' => 'Numero di Volo/Codice/Leg',
|
'flightident' => 'Numero di Volo/Codice/Leg',
|
||||||
'codeoptional' => 'Codice (facoltativo)',
|
'codeoptional' => 'Codice (facoltativo)',
|
||||||
|
|||||||
@@ -6,14 +6,15 @@ use App\Interfaces\Controller;
|
|||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* class SampleController
|
* class ApiController
|
||||||
* @package $MODULE_NAMESPACE$\$STUDLY_NAME$\Http\Controllers\Api
|
* @package $MODULE_NAMESPACE$\$STUDLY_NAME$\Http\Controllers\Api
|
||||||
*/
|
*/
|
||||||
class SampleController extends RestController
|
class ApiController extends Controller
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Just send out a message
|
* Just send out a message
|
||||||
* @param Request $request
|
* @param Request $request
|
||||||
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function index(Request $request)
|
public function index(Request $request)
|
||||||
{
|
{
|
||||||
@@ -21,7 +22,9 @@ class SampleController extends RestController
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Handles /hello
|
||||||
* @param Request $request
|
* @param Request $request
|
||||||
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function hello(Request $request)
|
public function hello(Request $request)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
* This is publicly accessible
|
* This is publicly accessible
|
||||||
*/
|
*/
|
||||||
Route::group(['middleware' => []], function() {
|
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' => [
|
Route::group(['middleware' => [
|
||||||
'api.auth'
|
'api.auth'
|
||||||
]], function() {
|
]], function() {
|
||||||
Route::get('/hello', '$STUDLY_NAME$Controller@hello');
|
Route::get('/hello', 'ApiController@hello');
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -18,12 +18,12 @@
|
|||||||
|
|
||||||
<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') }}"/>
|
||||||
|
|
||||||
<link href='https://fonts.googleapis.com/css?family=Muli:400,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 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/global/css/vendor.css') }}"/>
|
||||||
<link rel="stylesheet" href="{{ public_asset('/assets/admin/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/admin/css/admin.css') }}"/>
|
||||||
|
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
@yield('css')
|
@yield('css')
|
||||||
@@ -36,6 +36,7 @@
|
|||||||
@else
|
@else
|
||||||
const PHPVMS_USER_API_KEY = false;
|
const PHPVMS_USER_API_KEY = false;
|
||||||
@endif
|
@endif
|
||||||
|
@yield('scripts_head')
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
@@ -38,11 +38,13 @@
|
|||||||
{{ Utils::minutesToTimeString($pirep->flight_time) }}
|
{{ Utils::minutesToTimeString($pirep->flight_time) }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div><span class="description"><b>Aircraft</b>
|
@if($pirep->aircraft)
|
||||||
{{ $pirep->aircraft->registration }}
|
<div><span class="description"><b>Aircraft</b>
|
||||||
({{ $pirep->aircraft->name }})
|
{{ $pirep->aircraft->registration }}
|
||||||
</span>
|
({{ $pirep->aircraft->name }})
|
||||||
</div>
|
</span>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
@if(filled($pirep->level))
|
@if(filled($pirep->level))
|
||||||
<div>
|
<div>
|
||||||
<span class="description"><b>Flight Level</b>
|
<span class="description"><b>Flight Level</b>
|
||||||
|
|||||||
@@ -15,14 +15,19 @@
|
|||||||
<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="{{ 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/frontend/css/styles.css') }}" rel="stylesheet"/>
|
||||||
|
|
||||||
{{-- Start of the required files in the head block --}}
|
{{-- Start of the required files in the head block --}}
|
||||||
<link href="{{ public_asset('/assets/global/css/vendor.css') }}" rel="stylesheet"/>
|
<link href="{{ public_asset('/assets/global/css/vendor.css') }}" rel="stylesheet"/>
|
||||||
|
<style type="text/css">
|
||||||
@yield('css')
|
@yield('css')
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<script>
|
||||||
@yield('scripts_head')
|
@yield('scripts_head')
|
||||||
|
</script>
|
||||||
{{-- End of the required stuff in the head block --}}
|
{{-- End of the required stuff in the head block --}}
|
||||||
|
|
||||||
<link href="{{ public_asset('/assets/frontend/css/styles.css') }}" rel="stylesheet"/>
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<!-- Navbar -->
|
<!-- Navbar -->
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
@extends('auth.layout')
|
@extends('auth.layout')
|
||||||
@section('title', __('auth.login'))
|
@section('title', __('common.login'))
|
||||||
|
|
||||||
@section('content')
|
@section('content')
|
||||||
<div class="col-md-4 content-center">
|
<div class="col-md-4 content-center">
|
||||||
@@ -51,7 +51,7 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="footer text-center">
|
<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>
|
||||||
<div class="pull-left">
|
<div class="pull-left">
|
||||||
<h6>
|
<h6>
|
||||||
|
|||||||
@@ -95,7 +95,7 @@
|
|||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="{{ url('/logout') }}">
|
<a class="nav-link" href="{{ url('/logout') }}">
|
||||||
<i class="fas fa-sign-out-alt"></i>
|
<i class="fas fa-sign-out-alt"></i>
|
||||||
<p>@lang('auth.logout')</p>
|
<p>@lang('common.logout')</p>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
@endif
|
@endif
|
||||||
|
|||||||
@@ -240,7 +240,11 @@ flight reports that have been filed. You've been warned!
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<div class="input-group input-group-sm form-group">
|
<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>
|
<p class="text-danger">{{ $errors->first('route') }}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -287,7 +291,8 @@ flight reports that have been filed. You've been warned!
|
|||||||
<td>
|
<td>
|
||||||
<div class="input-group input-group-sm form-group">
|
<div class="input-group input-group-sm form-group">
|
||||||
{{ Form::text($field->slug, null, [
|
{{ Form::text($field->slug, null, [
|
||||||
'class' => 'form-control'
|
'class' => 'form-control',
|
||||||
|
'readonly' => (!empty($pirep) && $pirep->read_only),
|
||||||
]) }}
|
]) }}
|
||||||
</div>
|
</div>
|
||||||
<p class="text-danger">{{ $errors->first($field->slug) }}</p>
|
<p class="text-danger">{{ $errors->first($field->slug) }}</p>
|
||||||
@@ -318,14 +323,14 @@ flight reports that have been filed. You've been warned!
|
|||||||
}}
|
}}
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@if(!isset($pirep) || (filled($pirep) && !$pirep->read_only))
|
{{ Form::button(__('pireps.savepirep'), [
|
||||||
{{ Form::button(__('pireps.savepirep'), [
|
|
||||||
'name' => 'submit',
|
'name' => 'submit',
|
||||||
'value' => 'Save',
|
'value' => 'Save',
|
||||||
'class' => 'btn btn-info',
|
'class' => 'btn btn-info',
|
||||||
'type' => 'submit'])
|
'type' => 'submit'])
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
@if(!isset($pirep) || (filled($pirep) && !$pirep->read_only))
|
||||||
{{ Form::button(__('pireps.submitpirep'), [
|
{{ Form::button(__('pireps.submitpirep'), [
|
||||||
'name' => 'submit',
|
'name' => 'submit',
|
||||||
'value' => 'Submit',
|
'value' => 'Submit',
|
||||||
|
|||||||
@@ -6,16 +6,7 @@
|
|||||||
<div class="col-8">
|
<div class="col-8">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<p>
|
<h2 style="margin-bottom: 5px;">{{$pirep->airline->code}}{{ $pirep->ident }}</h2>
|
||||||
<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>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
@@ -101,6 +92,16 @@
|
|||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
<table class="table table-striped">
|
<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>
|
<tr>
|
||||||
<td width="30%">@lang('common.status')</td>
|
<td width="30%">@lang('common.status')</td>
|
||||||
<td>
|
<td>
|
||||||
|
|||||||
@@ -33,7 +33,13 @@
|
|||||||
'id' => $pirep->arr_airport->icao
|
'id' => $pirep->arr_airport->icao
|
||||||
])}}">{{$pirep->arr_airport->icao}}</a>)
|
])}}">{{$pirep->arr_airport->icao}}</a>)
|
||||||
</td>
|
</td>
|
||||||
<td>{{ $pirep->aircraft->name }}</td>
|
<td>
|
||||||
|
@if($pirep->aircraft)
|
||||||
|
{{ $pirep->aircraft->name }}
|
||||||
|
@else
|
||||||
|
-
|
||||||
|
@endif
|
||||||
|
</td>
|
||||||
<td class="text-center">
|
<td class="text-center">
|
||||||
{{ (new \App\Support\Units\Time($pirep->flight_time)) }}
|
{{ (new \App\Support\Units\Time($pirep->flight_time)) }}
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -7,7 +7,9 @@
|
|||||||
<td>
|
<td>
|
||||||
{{ $p->dpt_airport_id }}-
|
{{ $p->dpt_airport_id }}-
|
||||||
{{ $p->arr_airport_id }}
|
{{ $p->arr_airport_id }}
|
||||||
{{ $p->aircraft->name }}
|
@if($p->aircraft)
|
||||||
|
{{ $p->aircraft->name }}
|
||||||
|
@endif
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@endforeach
|
@endforeach
|
||||||
|
|||||||
Reference in New Issue
Block a user