Commit Graph

2521 Commits

Author SHA1 Message Date
Nabeel Shahzad
f9f0ee826d Fill the flight subfleets even if there's a simbrief 2021-03-20 17:28:54 -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
Nabeel Shahzad
11824c9f8b Flight search error 2021-03-19 16:59:39 -04:00
B.Fatih KOZ
bbd02bf5c7
Fix For GH Costs (#1088)
* Fix For GH Costs.

PR aims to fix the problem where Airport GH cost is not defined but recored to db as 0.00 or 0 (default value for airports table)
In such cases settings/default apt gh cost will be used.

* Updated logic for JetA1 cost check

* Remove default costs being used during import
2021-03-19 16:42:36 -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
exciler
2cede04b1e
Optimize view paths for module views in theme folder (#1081)
* override \Igaster\LaravelTheme\themeViewFinder as a workaround until PR#133 in igaster/laravel-theme is merged

* fixup code style

* further code style fix

Co-authored-by: Andreas Palm <ap@ewsp.de>
2021-03-19 09:22:03 -04:00
B.Fatih KOZ
7072428218
Fix Finance Memo (Ground Handling) (#1083)
PR fixes issue #1082
2021-03-18 20:04:13 -04:00
B.Fatih KOZ
1d83b85d8b
Fix for Fuel and Ground Handling Costs (#1050)
* Fix for Fuel and Ground Handling Costs

PR aims to fix issue #1048  and implements the feature request #1049 

If no fuel cost is defined for departure airport, settings / airport fuel price will be used.
If no ground handling cost is defined for airports, settings / airport ground handling cost will be used.

Ground handling prices of both departure and arrival airport will be used for calculations.

* Resolve conflict with latest dev

PR will still fail checks due to double ground handling fares and will work on it to have two records at transactions for dep/arr

* Remove Double GH Costs / Fix The Bug Only

Removed double GH costs for now, pr aims only fixing the current issue (general settings not being read for fuel and ground handling costs)

* Add departure and arrival airports to ground handling

* Style fix

* Fix tests

Co-authored-by: Nabeel S <nabeelio@users.noreply.github.com>
Co-authored-by: Nabeel Shahzad <nabeel@nabeel.sh>
2021-03-18 11:32:40 -04:00
Nabeel S
63eef59060
Fix null visibility in METAR (#1079)
* Fix null visibility in METAR

* Report the text in units from the METAR
2021-03-17 17:40:45 -04:00
B.Fatih KOZ
0152ff6045
Update pireps/show.blade (#1080)
Added score and landing rate to right sidebar, sorted the pirep logs in asc order to make it easy to read.
2021-03-17 16:43:36 -04:00
B.Fatih KOZ
e45bd66388
Fix Metar Decoding / Wind check for Wind Chill (#1072)
* Fix Metar Decoding / Wind check for Wind Chill

PR aims to fix the bug #1071 by checking both the wind speed and it's value for starting Wind Chill calculation.
2021-03-15 10:41:05 -04:00
exciler
b9e7a2efc9
Add unit conversion handling for block_fuel like for fuel_used (#1076)
* Add unit conversion handling for block_fuel like for fuel_used, add further checks in PIREPTest->testUnitFields

* Remove accidentially added "use"

Co-authored-by: Andreas Palm <ap@ewsp.de>
2021-03-15 08:30:14 -04:00
Nabeel Shahzad
73f88fce0c Fix permissions with modules 2021-03-13 18:31:09 -05: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
nabeelio
f1c54bcc7c Add Postmark package #1067 2021-03-08 11:35:11 -05:00
nabeelio
d94d754961 Block user if they're not active #1066 2021-03-08 11:24:09 -05:00
nabeelio
9abfbd6c8c Remove unneeded import #1066 2021-03-08 11:21:55 -05:00
nabeelio
97fc1dd43d Don't block API logins #1066 2021-03-08 11:19:31 -05:00
Nabeel Shahzad
edc37f40fa Show either create/view simbrief button, not both 2021-03-06 16:48:50 -05:00
Nabeel S
950c7788be
Restrict Simbrief to user who generated it (#1064)
* Restrict simbrief to user

* Style fixes

* Add tests

* Style fix
2021-03-06 13:49:42 -05:00
nabeelio
b3af50ac5a Add ignored solution provider 2021-03-05 08:00:34 -05:00
nabeelio
8a9b68d9ec Disable ignition runnable solutions 2021-03-05 07:59:50 -05:00
nabeelio
70a4cf9f90 Remove the laravel-backup library 2021-03-05 07:33:42 -05:00
Nabeel Shahzad
c3465851b2 Rename backups folder 2021-03-05 06:24:23 -05:00
Nabeel Shahzad
b13c4df338 laravel-backup changes 2021-03-05 06:00:36 -05:00
Nabeel Shahzad
c736a9b639 Disable encryption by default for backups 2021-03-05 05:44:04 -05:00
nabeelio
d2e1004e08 Undo composer downgrades 2021-03-04 17:17:39 -05:00
Nabeel S
3800c01d94
Update to Laravel 8 (#1058)
* Update Laravel and other dependencies

* Composer version in CI

* Remove the PHP exit from env file

* Add PHP 8 to testing matrix

* Update doctrine

* Update doctrine

* Update faker lib

* Rewrite TLD check to remove deprecated library

* Update version lib

* Remove PHP 8 for now

* Style fixes
2021-03-04 17:08:51 -05:00
Nabeel S
922e754c9e
Check for valid reference object in recurring finance (#1056) 2021-03-02 16:19:54 -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
efcb7e8895
Fix Advanced Fuel Calculations (#1053)
Due to an error on the settings check advanced fuel calculations was not working and defaulting to fuel used always.
2021-03-01 15:03:27 -05:00
Nabeel S
43fbe9e943
Update composer dependencies (#1047) 2021-02-26 12:23:50 -05:00
nabeelio
8fc0aec800 Set cache driver to array for tests 2021-02-25 13:50:37 -05:00
Nabeel Shahzad
bb84fa82a4 Default to file storage for sesions 2021-02-24 13:37:46 -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
a4c431d39f Set missing value from default 2021-02-23 11:25:06 -05:00
Nabeel Shahzad
a52e0410a7 Force default to the value when syncing settings 2021-02-23 11:23:40 -05:00
B.Fatih KOZ
baf63361a0
Fix findUsersOnleave Function (#1042)
Query was checking status field instead of state field to find active users.
2021-02-22 11:23:50 -05:00
B.Fatih KOZ
b4d5c0fbcd
Weather METAR/TAF enhancements (#964)
* Update AviationWeather.php

Added the ability to fetch latest TAF report of given icao from ADDS/NOAA

* Update Weather.php

Used updated Metar\AviationWeather service to improve the widget ability and provide raw TAF data for the view

* Style Fix 1

* Update weather.blade.php

Updated blade to match updated Metar\AviationWeather service and the Weather widget controller.

Also fixed the order of temp - dewpoint - humidity - visibility display according to aviation usage.

Widget now displays raw TAF data just below raw METAR data.

* Update Metar inferface and wrap TAF retrieval in cache

* Styles fix

* Add call to getTaf. Don't call AviationWeather directly

* Fix cache lookup strings

* Fix recursion error

* Update weather.blade.php

Used latest weather.blade , added $taf['raw'] after raw metar.

* Compatibility Update

Updated the widget controller to match latest dev (added raw_only to config)

* Update Weather Widget Blade

Made the widget blade compatible with the TAF reports, widget will display raw metar and taf after the decoder, if no metar or taf recieved it will be displayed in its own row. Also added the new option of raw_only to blade, if it is true, metar decoding will be skipped and only raw values will be displayed. ( Useful when displaying multiple wx widgets at the same page for departure, destination and alternate etc )

Co-authored-by: Nabeel Shahzad <nshahzad@live.com>
Co-authored-by: Nabeel S <nabeelio@users.noreply.github.com>
2021-02-19 12:45:39 -05:00
B.Fatih KOZ
6b7eab05e2
Assign subfleets from ranks when there are no subfleets on a flight
If no subfleets are assigned to a flight, vmsacars was not allowing the flight to be loaded and used 'cause the subfleets was returning null. With this pr, users will be able to use the aircrafts which they have access to by their ranks. ( Same logic was used in SimBrief Controller to populate the aircraft list for flight plan generation )

Co-authored-by: Nabeel S <nabeelio@users.noreply.github.com>
2021-02-19 08:20:17 -05:00
Jannis D
4c8e31ac6f
Update installer.php (#1038)
Co-authored-by: Jannis D <Mail@JannisD.de>
2021-02-19 08:13:08 -05:00
B.Fatih KOZ
fe41e61c02
Fix for SimBrief VATSIM Prefile errors (#1037)
Speed is now checked and leading zero is removed, also changed the initial altitude to full feet value like 23000 instead of just 230.
2021-02-18 18:02:33 -05:00
Nabeel Shahzad
bd85a04530 Fix internal event for ON_LEAVE 2021-02-17 18:57:16 -05:00
Nabeel S
cbb7d6e274
Fix pilot leave calculation #1022 (#1035)
* Fix pilot leave calculation #1022

* Remove unused imports

* Add logging where fares are being saved
2021-02-17 18:54:18 -05:00
Nabeel Shahzad
8907527872 Remove invalid bids #1034 2021-02-17 18:03:07 -05:00
Nabeel Shahzad
942c060c99 Added opcache package 2021-02-17 14:44:41 -05:00
Nabeel Shahzad
68a9421445 Shrink backup sizes 2021-02-17 14:38:47 -05:00