Commit Graph

1293 Commits

Author SHA1 Message Date
Nabeel Shahzad
97f095e4e9 Set default env name to "production" and debug to false 2021-05-29 18:13:36 -04:00
Nabeel Shahzad
a9e5554dea Trap migration error for modules if they don't exist 2021-05-27 16:14:13 -04:00
B.Fatih KOZ
5b10dca868
Fix SimBriefService (#1209)
* Fix removeExpiredEntires()

* Fix SimBriefTest

No need to add `'pirep_id' => ''` , just let it be `null` (like the core code does) and no need to convert Carbon to DateTimeString.
2021-05-27 09:27:38 -04:00
B.Fatih KOZ
11cebb3e6e
Show only used Flight Types at Flight Search (#1207)
* Update Flight Controller

Show only used flight types in the search form instead of all IATA Flight Types.

* PrePR StyleFix

* StyleFix

* Use Model instead of DB

Also used the same $where array

Co-authored-by: Nabeel S <nabeelio@users.noreply.github.com>
2021-05-25 16:14:42 -04:00
B.Fatih KOZ
728b033675
Fix Admin: UserController and Flight Edit (#1204)
* Fix Admin / UserController

Use Role Repository and `selectBoxList` method instead of the model itself.

* Fix Flight Fields

Added empty/blank option for clearing out the days when needed

* StyleFix
2021-05-24 19:13:44 -04:00
B.Fatih KOZ
68a6ed24cb
Fix Flight Importer (#1202)
* Handle Route and Level fields too during import.
* Also removed the check for `visible => true` from `firstorNew` 'cause va admin may be importing to update not visible flights too.
  (by default all new flights are visible, so no affect on new flights)

Closes #1201
2021-05-24 15:19:06 -04:00
Nabeel S
7d8a34645e
Add --force flag to migrations (#1203) 2021-05-24 10:58:10 -04:00
Nabeel Shahzad
c94358350a Add queue worker setting so those aren't run in cron if there's a worker 2021-05-21 12:31:32 -04:00
Nabeel S
d3ec0f4de3
5 char ICAO support #1052 (#1198) 2021-05-21 10:52:47 -04:00
Nabeel S
ede5b74383
Make fuel_used an optional field in PIREP file (#1197) 2021-05-21 10:02:07 -04:00
Nabeel S
e7bbd6cccb
Use queues for notifications #1154 (#1174)
* Use queues for notifications #1154

* Styles

* Update defaults

* Include queueworker
2021-05-20 11:54:07 -04:00
Nabeel S
edcea258ce
Remove the autoupdater #1133 (#1195)
* Remove the autoupdater #1133

* Remove self-updater package

* Package still needed :|
2021-05-20 11:37:27 -04:00
Nabeel Shahzad
5adc0b4072 Remove unused import 2021-05-20 09:20:12 -04:00
B.Fatih KOZ
30be7c245c
Fix Advanced Fuel Calculations (#1190)
* Fix Advanced Fuel Calculations

Current code works fine with a fresh submitted pirep but when a re-calculation is needed, fuel amount will not be correct if the aircraft was flown later on.
Commit provides fix for such re-calculation scenarios.

* StyleFix for the Comment Line !
2021-05-19 19:01:33 -04:00
Olli
6f1a5f1dc2
Update Flight Controller to fix an issue (#1192)
Closes #1180 and #1156. But now the script isn't beeing loaded

Co-authored-by: Nabeel S <nabeelio@users.noreply.github.com>
2021-05-19 13:42:40 -04:00
Nabeel S
352f1ee9f8
Days::in should use in_mask; tests coverage #1180 (#1193) 2021-05-19 11:20:50 -04:00
Nabeel Shahzad
dff4273c72 Force empty to be 0 for in_mask #1180 2021-05-19 10:22:15 -04:00
B.Fatih KOZ
594d0eb222
Check Aircraft Availability (#1177)
* Check Aircraft Availability before Prefile

Check if the aircraft is available for flight (State : Parked / On Ground). If not throw new exception AircraftNotAvailable

* Add Exception

AircraftNotAvailable exception, used by PirepService during prefile checks.
2021-05-13 15:26:53 -04:00
B.Fatih KOZ
f2be14402f
PirepCancelled Event (Cron Expired Pirep Deletion) (#1178)
* PirepCancelled Event (Cron Expired Pirep Deletion)

While deleting frozen in progress pireps we should at least send a PirepCancelled event for those who are listening.

(or we may have a new PirepDeleted event to be issued in such cases, I think PirepCancelled is enough though)

* StyleFix

* Another StyleFix

* Missing Log

Of course it will not be possible to write log entries without the Log itself.
2021-05-09 18:30:50 -04:00
B.Fatih KOZ
a186bfae2a
Fix AirportController (Frontend) (#1176)
1. Inbound and Outbound flights were displaying all flights (active and inactive) , fixed to fetch only active flights.
2. Flash message and redirect to Dashboard was not working, instead we were getting 404 Not Found error.
2021-05-08 15:42:18 -04:00
Nabeel S
6e6ba85080
Fix for duplicated/wrong expenses being applied #915 (#1173)
* Fix for duplicated/wrong expenses being applied #915

* Style fixes
2021-05-06 12:42:56 -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
b6c0946795
Delete users without PIREPS; pilot leave fix (#1171)
* Delete users without PIREPS; pilot leave fix

* Style fixes
2021-05-05 09:56:28 -04:00
Nabeel S
fe0ef60b6c
Block refiling of PIREPs (#1167)
* Block refiling of PIREPs

* Style fixes

* Package updates
2021-05-03 10:00:10 -04:00
B.Fatih KOZ
5094375e13
Fixes For GDPR/Deleted Users (#1164)
* Fix DeletedUsers being displayed at Homepage

Deleted users should not be displayed at homepage / newest pilots list. PR fixes that problem.

* Do Not Display Deleted Users with LatestPireps

As the main page, Latest Pilots widget should not display GDPR/Soft deleted users too.

* StyleFix
2021-05-03 08:46:21 -04:00
Nabeel Shahzad
ec6cb42bfd User guard for null 2021-04-23 13:47:54 -04:00
Nabeel S
14d0e99a37
Delete the user in a GDPR compatible way (#1151)
* Delete the user in a GDPR compatible way

* Block user from calls

* Style fix
2021-04-23 10:33:13 -04:00
B.Fatih KOZ
f8c7bc31f5
Add Airline ICAO to Subfleet selectBoxList (#1153)
* Add Airline ICAO to Subfleet selectBoxList

Subfleet dropdown at flight search will look like `Boeing B737-800 WL | THY`

* StyleFix
2021-04-23 09:44:37 -04:00
Nabeel Shahzad
2545328233 Fix APP_URL being called SITE_URL 2021-04-20 23:28:57 -04:00
Nabeel S
bffc4f911c
Add tests for the cron jobs (#1141) 2021-04-14 08:37:48 -04:00
Nabeel S
bfddb2c84d
Make sure all dates are in UTC (#1139) 2021-04-13 09:25:38 -04:00
B.Fatih KOZ
7e9eb08135
Use where iso whereTime (#1137)
Using whereTime may present a problem for flights conducted during utc midnight and some active/live flights may be deleted with whereTime.

Scenario;

now = today-01:00  utc
setting = 2 hours
date = yesterday-23:00 utc

Any live pireps will/may be deleted with whereTime 'cause their last updated TIME will be maximum 00:59 which is smaller than 23:00.
2021-04-13 09:08:50 -04:00
Nabeel S
fdab4ee530
Fix email for news not going out (#1131) 2021-04-11 14:32:58 -04:00
Nabeel Shahzad
9cb0a0cf36 Change the default driver to use mail 2021-04-11 12:36:37 -04:00
Nabeel Shahzad
498d5bfaf0 Slugify cache prefix and quote it in the env 2021-04-10 21:13:34 -04:00
Nabeel Shahzad
2202c5b479 Change default env to prod for fresh install 2021-04-10 18:00:03 -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
6c3992e781
Fix for Hourly Crons (#1127)
* Fix for Hourly Cron

We should be using whereTime instead of whereDate

https://laravel.com/docs/8.x/queries#additional-where-clauses
`The whereDate method may be used to compare a column's value against a date`

* Fix for RemoveExpiredBids

I used where to do check 'cause people may set 48 hours to remove a bid, thus neither whereDate nor whereTime will give a correct results.

* Fix for DeletePireps

I used where to do check 'cause people may set 48 hours to delete cancelled or rejected pireps, thus neither whereDate nor whereTime will give a correct results.
2021-04-09 19:15:22 -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
Maximiliano Fallico
dbfaed0ecc
Adds Airline Icao to Subfleet Select in Flight Create (#1123)
* Adds Airline Icao to Subfleet Select in Flight Create

* Fix Style

Co-authored-by: Nabeel S <nabeelio@users.noreply.github.com>
2021-04-05 16:55:50 -04:00
Nabeel Shahzad
8c065a44cf Set default theme as "null" value 2021-04-03 10:25:02 -04:00
Nabeel Shahzad
8e9ba3b922 Fix styling that somehow slipped through 2021-04-01 17:33:57 -04:00
Nabeel Shahzad
ede71e6927 Fix the PIREP edit permissions 2021-04-01 09:54:01 -04:00
Andrew Roberts
3f84f84309
Fix issue with being unable to save pirep edits (#1116)
Fixes issue being unable to save pirep edits from the admin section due to incorrect variable being used
2021-03-31 11:03:01 -04:00
exciler
50e8f2e52b
Fetch timezone on airport lookup (#1103)
Co-authored-by: Andreas Palm <ap@ewsp.de>
2021-03-29 17:10:00 -04:00
Nabeel S
96fff0248d
Save airport timezone (#1112)
* Fix airport timezone lookup

* Save timezone to the airport when importing
2021-03-29 15:49:34 -04:00
Nabeel S
9c4aced837
Move the prefile event and add a new error exception (#1111)
* Move the prefile event and add a new error exception

* Remove extra import

* Add empty handler for testing

* Fix styling

* Fix styleci
2021-03-29 14:53:35 -04:00
exciler
ed146b2c70
replace windows backslashes by slashes before path mapping (#1107)
Co-authored-by: Andreas Palm <ap@ewsp.de>
2021-03-28 18:15:56 -04:00
exciler
1e320835c2
fix map-info-box display (#1104)
* fix map-info-box display

* Check user on PIREP show/edit/update/submit

* add missing use

* refactoring according to comments; use UpdatePirepRequest for authorization and make user available to view

Co-authored-by: Andreas Palm <ap@ewsp.de>
Co-authored-by: Nabeel S <nabeelio@users.noreply.github.com>
2021-03-28 09:57:16 -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