Commit Graph

317 Commits

Author SHA1 Message Date
Nabeel S
96d33c11c8
Fix data not showing up for live map (#1223)
* Fix data not showing up for live map

* StyleCI fixes
2021-06-04 16:57:27 -04:00
Nabeel S
82825ef77b
Add setting for recording IP address (#1221)
* Add setting for recording IP address

* Record IP on registration
2021-06-04 13:20:33 -04:00
Nabeel S
9b2e466b7e
Discord notifications for PIREP and News events #433 (#1215)
* Discord notifications for events #433

* Style fixes

* Check for blank webhook urls and disable

* Cleanup items after review

* Changes and fixes

* Style fixes

* Don't load env for testing

* Fix status text

* Refactor saving fields/fares so events get the latest data

* Cleanup

* Style fixes
2021-06-04 10:51:59 -04:00
B.Fatih KOZ
17447c6903
Block aircraft with Simbrief (#1213)
* Block Aircraft with SimBrief

Changes aim to have the ability to block an aircraft's usage if it is used to generate a SimBrief OFP.

Unused/Expired briefings will be deleted by cron like before but will now be checked by HourlyCron, so admins can define more precise restrictions for them (and the blockage period of their aircraft)

Owner of the SimBrief OFP will be able to start a flight with acars using that particular aircraft, but pilots will get an Aircraft Not Available error (similar to Aircraft State check)

To prevent SimBrief OFP packs being marked as expired/unused, during pirep prefile, pirep_id will be saved to SimBrief model along with flight_id.

And when a flight is finished (pirep file), flight_id will be removed from SimBrief model as before. Only pirep_id will remain and aircraft will be available for another OFP generation.

* Update PirepController

In case a pirep is being saved/submitted with manual entry (but the va is using simbrief effectively) same logic should be applied during save/submit button selection.
Save will act like a pirep prefile , Submit will be pirep file.

* Manual Pirep Checks

Manual pireps, prefiled from a generated simbrief should be checked too. Also pirep.show blade's submit button should provide the same simbrief checks.

* Update PirepService.php

* Change settings and move sb cron to hourly

* StyleFix (SimBriefService)

* Another StyleFix (SimBriefService)

* Update SimBriefController

Removed null check of pirep_id for aircraft list generation to prevent live flights' aircraft being listed for another ofp generation.
( Active acars flights will have both flight_id and pirep_id at simbrief table)

* Update PirepService.php

Co-authored-by: Nabeel S <nabeelio@users.noreply.github.com>
2021-06-03 16:17:16 -04:00
Nabeel S
d3ec0f4de3
5 char ICAO support #1052 (#1198) 2021-05-21 10:52:47 -04:00
B.Fatih KOZ
d2272e32a6
100LL and MOGAS Fuel Cost (#1172)
* Add defaults for 100LL and MOGAS prices

Add missing defaults for 100LL and MOGAS Fuel prices.

* Calculate Fuel Cost according to Fuel Type

Calculate pirep fuel costs according to aircraft (subfleet) fuel type, use JetA as fail safe default.

* Fix for Failing AwardTest

At least attempting to fix

* Fix fuel types logic

* Style

* Invert the logic

Co-authored-by: Nabeel Shahzad <nabeel@nabeel.sh>
2021-05-06 08:16:33 -04:00
Nabeel S
bfddb2c84d
Make sure all dates are in UTC (#1139) 2021-04-13 09:25:38 -04:00
Nabeel S
ac64a5db75
Migrate all configs into the env.php file #1075 (#1128)
* Migrate all configs into the env.php file #1075

* Style fixes

* Fix config names in CreateConfig

* Fix installer/installer error messages
2021-04-10 17:19:45 -04:00
B.Fatih KOZ
344edde0fb
Alphanumeric Callsign For Flights (#1124)
* Alphanumeric Callsign For Flights

PR adds ability to define alphanumeric callsigns to flights, display them and use them during SimBrief OFP generation (if pilot ident as callsign option is not enabled)

Translations for en/es/it/pt-br added.

* Change db table name

* Change db column name, fix rules

* Change db column name

* Another db column name change

* Just another one more

* Last one from anumeric_callsign to callsign

Co-authored-by: Nabeel S <nabeelio@users.noreply.github.com>
2021-04-05 18:00:50 -04:00
exciler
d4c301a36c
Remove remove_bid_after_accept setting (#1100)
* Remove "Remove bid on accept" setting and remove bids after PIREP was filed

fixes #1039

* Add migration to remove setting from database

* fix migration naming and remove obsolete code

Co-authored-by: Andreas Palm <ap@ewsp.de>
2021-03-27 08:33:21 -04:00
B.Fatih KOZ
65015cbce2
Move SimBrief aircraft selection to Controller (#1093)
* Move SimBrief aircraft selection to Controller

Instead of passing subfleets to blade (and doing two foreach loops and ifs to populate the dropdown), we are building a proper aircraft list here.

Did not removed $subfleets from data being passed to blade on purpose, it may be removed later on.

* Style Fix

* Update aircraft selection blade to use $aircrafts

* Order generated Aircrafts collection

First ICAO then Registration

* Add privatized name setting for simbrief

To prevent possible privacy issues according to latest regulations.

* Add privatized name to SimBrief form

It is controlled with a setting, if not enabled we will not pass any names to SimBrief via API (this will result users SimBrief membership name being used at the OFP as before)
2021-03-22 10:55:33 -04:00
Nabeel Shahzad
4394487392 Add missing aircraft_id to sample data 2021-03-19 18:47:02 -04:00
Nabeel S
1287766a46
Fix aircraft retrieval for Simbrief (#1089)
* Fix full aircraft retrieval for simbriefs

* F off StyleCI
2021-03-19 18:25:19 -04:00
exciler
9bb192b97f
Add disable activity check option on certain roles #1078 (#1087)
* Add boolean field "disable activity checks" to role, check for this field inside PilotLeave-Check, add tests

* fix checkbox on form

* CS fixes

* CS fixes again :-)

Co-authored-by: Andreas Palm <ap@ewsp.de>
2021-03-19 13:09:29 -04:00
Nabeel S
e70ee5aa6f
Add web cron ability #821 (#1073)
* Use database for kvp storage

* Read kvpstore

* Add web cron ability through API #821

* Style fixes

* Fix text
2021-03-09 11:36:56 -05:00
Nabeel S
936cd2efd3
Implement PIREP deletion #1014 (#1055)
* Implement PIREP deletion #1014

* Style fixes

* Add delete button to PIREP listing page

* Remove extra import
2021-03-02 15:43:34 -05:00
Nabeel S
e22d6d5996
Refactoring Simbrief fares and aircraft (#1054)
* Refactoring simbrief fares and aircraft

* Hide user full name/email

* Sort PIREP fields desc; fix cargo counts

* Change the sorting

* Extra logs

* Fix tests

* Return fare information through the API

* Style fixes

* Test fix

* Another test fix

* More fixes

* Set aircraft and fares in prefile

* Formatting
2021-03-02 12:29:04 -05:00
B.Fatih KOZ
4fe323a763
Advanced Fuel Calculations (#1044)
* Advanced Fuel Calculations

PR aims to have realistic fuel debit calculations as in the real ops. When enabled, remaining fuel amounts from previous flight will be reduced from block fuel and airline will only pay for uplifted fuel amount.

If onboard fuel is enough for the flight or exceeds the required amount no fuel debit will be issued.

If this is the first flight of the aircraft or the tanks are dry, full block fuel will be treated as uplifted.

Disabled / uses current default (fuel_used will be debited)

Aircraft table also will hold the fuel_onboard value (not needed for calculations, just saving for displaying purposes)

* Style Fix

* Another Style Fix

Love StyleCi

* Fix Settings

Moved new setting under other pirep settings

* Fix Setting Check

* Fix EOF settings.yml

* Fix Settings
2021-02-24 12:22:52 -05:00
B.Fatih KOZ
e3b4a0ed2e
SimBrief integration enhancements (#1045)
* SimBrief Integration Update

* Added SimBrief Type field to subfleets, can be used to assign simbrief airframes to subfleets and fix non existing or wrong types. If not used simbrief form will use aircraft's icao type code

* Added Passenger and Baggage weights to settings

* Added setting for using PhpVms Pilot/User  Ident as simbrief atc callsign

* SimBrief form code cleaned up a bit and improved. Now form supports both cargo and passenger fares to be used at the same time.

Generated passenger baggage weight will be reduced from aircraft's cargo capacity and remaining amount will be used for random cargo generation.

Also multiple cargo fares or any mix is possible now (like only cargo, only passenger, multiple cargo and passenger fares)

* StyleFix (SimBrief Controller)

* Fix Callsign Setting Check

* Code Cleanup

Reduced loops and removed if's in loops, getting fares from aircraft instead of flight/subfleets.

No need to go through getReconciledFaresForFlight anymore. Aircraft provides all fare info we need.

Removed unnecessary html elements, added some comments.

* Update Simbrief Controller

Fixed setting checks.

Removed non used $subfleet and from main form and $aircraft from aircraft selection form blade.

Added/fixed comments.

* StyleFix for Controller
2021-02-24 09:32:29 -05:00
Nabeel Shahzad
dd7812e5c5 Undo primary idx change 2021-02-11 08:57:43 -05:00
Nabeel S
447d02bd4f
Update the sessions table (#1030)
* Update the sessions table

* Add index on user_id
2021-02-11 08:50:49 -05:00
Nabeel S
d110c2d951
ACARS table vs int to double (#1028)
* mail config - "driver" to "default"

* Change VS type from int to double

* Migration fix

* Fix type
2021-02-10 13:39:40 -05:00
B.Fatih KOZ
a952071cb4
Subfleet Hubs / Base Airports (#978)
* Update SubFleet Model

Add hub_id for storing subfleet's main base/hub airport, define a relationship with airport model to get details of the base/hub airport when needed.

* Update Admin / SubFleetController

Added the ability to read and pass hub airports to admin view for create/edit options.

* Update Admin/SubFleets.fields.blade

Added the dropdown for adding/editing main base/hub of a subfleet.

* Add migration for the hub_id column

Co-authored-by: Nabeel S <nabeelio@users.noreply.github.com>
Co-authored-by: Nabeel Shahzad <nshahzad@live.com>
2021-01-17 12:43:06 -05:00
Nabeel S
8f4219bc95
Download path size too small; fix migrations #935 (#940) 2020-11-26 13:03:59 -05:00
Nabeel Shahzad
eae345efa7 Fix dropping of unique index when table prefix is present #934 2020-11-26 12:27:26 -05:00
Nabeel S
ced2c150b7
Change the body size to medium text #920 (#930)
Change the body size to medium text (16MB) #920
2020-11-20 12:00:37 -05:00
Nabeel Shahzad
b83f7dcac8 Updated seed data for dev 2020-10-24 09:26:14 -04:00
Nabeel S
cd18442207
Fixes for installer/modules race condition (#883) 2020-10-21 13:28:54 -04:00
Yash Govekar
716ba38b6d
Default values for automatically added airports #829 (#878) 2020-10-20 15:25:13 -04:00
Yash Govekar
5803487d51
Installing and managing modules from admin panel (#847) 2020-10-19 10:10:28 -04:00
Nabeel S
193fbd369d
Show awards on user profile #703 (#866) 2020-10-11 16:06:09 -04:00
Nabeel S
50a0b89caa
Add MTOW and ZFW to aircraft editor #775 (#805)
Add MTOW and ZFW to aircraft editor #775
2020-09-03 13:29:24 -04:00
Nabeel S
e99c22b007
Notifications fixes (#804)
* Emails not sending #795 #722

* Fix for news items not being sent; refactor some events; check for opt-in #722

* Formatting

* Remove extra parameter
2020-09-03 12:50:42 -04:00
Nabeel S
cdf7b13b5b
Allow any airport to be flown from #783 (#788)
Allow any airport to be flown from #783
2020-08-17 17:06:02 -04:00
Nabeel S
3ebf4f2924
Custom user fields #711 (#772)
Custom user fields during registration and profile edit #711
2020-08-11 17:48:51 -04:00
Nabeel S
420bd7e4ae
Add ability to use a link instead of a page #750 (#757)
Add ability to use a link instead of a page #750
2020-06-11 08:27:38 -04:00
Nabeel Shahzad
c46fc9171c Check for airline being active; fix tests for L7 #718 2020-05-23 11:45:07 -04:00
Sebastian Ecker
585c9578e8
Update Permissions Seed
Aircraft is missing in Permissions Seed
2020-05-15 17:51:41 +02:00
Nabeel S
5b771be653
Fix flight hours field #683 (#684) 2020-05-05 14:36:14 -04:00
Nabeel S
9135337186
Blank/null IATA code isn't unique when added #679 (#681) 2020-05-03 18:23:46 -04:00
Nabeel S
03cfc648b0
Create journal when new airline is created #667 (#670) 2020-04-26 10:31:58 -04:00
Nabeel Shahzad
90a0a8cfee Add mock SB API key 2020-04-15 10:28:21 -04:00
Nabeel S
60f378f584
Add Simbrief entries as sample data for load #651 (#652) 2020-03-31 12:32:11 -04:00
Nabeel S
3e7d5f6195
Use theme check in all frontend routes #638 (#645) 2020-03-28 14:45:25 -04:00
Nabeel Shahzad
ba0ae05c2a Make icon column nullable #641 2020-03-28 14:01:53 -04:00
Nabeel S
45873431e4
Add public/private pages #641 (#644)
* Add public/private pages #641

* Cleanup the form requests
2020-03-28 13:03:52 -04:00
Nabeel S
4a3ec38919
Option for SB only on bids; add the new file type #642 (#643)
Option for SB only on bids; add the new file type #642
2020-03-27 11:49:19 -04:00
Nabeel S
9e5386264f
SimBrief integration #405 (#635)
* SimBrief integration #405

* Add briefing as API response; add acars_xml field #405
2020-03-23 09:31:35 -04:00
Nabeel Shahzad
8998dabb3d Drop the unique index from subfleets.type #628 2020-03-09 16:39:07 -04:00
Nabeel S
80b20a8b25
Increase ID column size; seed ID generator with uniqid() #630 (#631) 2020-03-09 13:16:10 -04:00