Commit Graph

2503 Commits

Author SHA1 Message Date
Jesper Falk
a2f91b6754
Add GD PHP Extension for docker container (#1212) 2021-05-28 08:48:52 -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
96c17d33bc
Add ability to search Flights by Code (#1205)
* Edit Search Form

Add ability to search via flight/route code (technically it was possible but the field was not present in the blade)

* Add Code (EN)

* Add Code (ES)

* Add Code (IT)

* Add Code (PT-BR)

* FlightCode => Code

* FlightCode => Code

* FlightCode => Code

* FlightCode => Code

* FlightCode => Code
2021-05-25 15:33:02 -04:00
Nabeel Shahzad
9abc892698 Update README 2021-05-25 15:11:09 -04:00
Nabeel Shahzad
67a51da220 Cleanup the docker-compose for local testing 2021-05-25 15:07:04 -04:00
Nabeel Shahzad
7e586a273a File/dir ownership in container 2021-05-25 13:37:53 -04:00
Nabeel Shahzad
8a591c11a5 Fix docker-compose for use non-locally 2021-05-25 13:14:08 -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
B.Fatih KOZ
4985da991b
Remove Scripts (#1200)
* Remove Scripts

Remove scripts from create blade which are designed for edit blade in the first place (thus looking for flight object and its properties). 
No need to have an eyecandy date picker or a days selector, previous working version of create.blade was more than enough to manually add fights.

* Add placeholder for date fields
2021-05-23 20:47:15 -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
Nabeel Shahzad
fe7120e21a Add PHP 7.4 polyfill 2021-05-20 08:55:55 -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
Nabeel S
7cb9ae4ec3
intl dependency/polyfill updates (#1194) 2021-05-19 13:57:28 -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 Shahzad
e3c3c81d19 Include missing scripts in flight create 2021-05-19 13:33:13 -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
Nabeel S
77a4acb569
Update dependencies (#1188) 2021-05-14 13:02:47 -04:00
B.Fatih KOZ
ff6827b368
Fix Installer Completed Blade (#1185)
We do not have a config.php anymore, page should refer to env.php for base level configuration.
2021-05-14 12:31:24 -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
Nabeel S
ee61de62fa
Update to PHP 8 (#1118)
* Update to PHP 8

* Update composer file

* Remove PHP 8 incompatible library

* Remove PHP 8 incompatible library
2021-05-11 18:46:21 -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
Andrew Roberts
fca04e6b0c
Allow session lifetime to be set in env variables (#1170)
* Allow session lifetime to be set in env variables

Currently the session live time defaults to 2 hours, adding an env variable will allow us to change this on a per site basis

* Add whitespace for consistency
2021-05-05 08:51:18 -04:00
Andrew Roberts
5094fce4b0
Disable autocomplete on admin email field (#1169)
* Disable autocomplete on admin email field

Fixes #1165

* Disable autocomplete on admin name and password

For sake of completeness and due to some over zealous autocompleters, also disable it on name and password fields
2021-05-04 13:26:16 -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
Russell West
61739ce266
Pirep delete confirmation (#1143)
* adds 100ll option to airport admin

* Adds mogas field too

* adds basic confirmation when deleting pirep
2021-04-15 08:39:42 -04:00
Nabeel S
bffc4f911c
Add tests for the cron jobs (#1141) 2021-04-14 08:37:48 -04:00
Nabeel Shahzad
d18925f473 Add tests for 0 results METAR 2021-04-14 06:45:35 -04:00
Russell West
f5e83461a3
adds 100ll option to airport admin (#1138)
* adds 100ll option to airport admin

* Adds mogas field too

Co-authored-by: Nabeel S <nabeelio@users.noreply.github.com>
2021-04-13 12:03:03 -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
B.Fatih KOZ
3d55336823
Fix default value for Captcha setting (#1136) 2021-04-12 16:55:38 -04:00