Commit Graph

379 Commits

Author SHA1 Message Date
Nabeel Shahzad
60cec870f6 Add aircraft ident to API response 2022-02-14 12:53:12 -05:00
Nabeel S
cb38f2ad90
Refactor broadcast notifications (#1402)
* Refactor broadcast notifications

* StyleCI fixes

* Fix the planned_distance accidental changes
2022-02-08 15:07:02 -05:00
Nabeel Shahzad
e4782c40f3 Fix tests 2022-02-04 15:03:05 -05:00
Nabeel S
a3f110c0c0
Add PHP 8.1 to shims and build (#1365)
* Add PHP 8.1 to shims and build

* Lock psr/container version

* Lock psr version

* Restrict symfony component versions

* Downgrade event-dispatcher-contracts

* Update more package versions

* php-cs fixes

* style fix

* cs-fixer file fix

* Exclude resources dir from cs fixer

* Ignore cs fixer env check

* Update league/csv
2021-12-03 09:23:59 -05:00
B.Fatih KOZ
c45d52dffa
Aircraft level Hub definitions (#1363)
* Aircraft level Hub definitions

* Add ability to define a hub for an aircraft apart from its subfleet.

* Update csv import/export capability for hub_id field

* Fix importertest source csv

* Fix source csv for updating too

* Update aircraft_empty_cols.csv

Co-authored-by: Nabeel S <nabeelio@users.noreply.github.com>
2021-11-30 14:54:29 -05:00
lesmar54
90d1708aab
Fixes to CSV import Exports (#1299)
* Update SubfleetImporter.php

Correction to the import to include Simbrief Code

* Update SubfleetImporter.php

Added in the missing fields HUB-ID and SIMBrief as these are input on the main screen

* Update AircraftImporter.php

Part of the missing data fields in csv import export

* Update FlightImporter.php

Part of the missing fields in csv import and export

* Update AircraftImporter.php

* Update FlightImporter.php

* Update aircraft.csv

Test data amended as part of the missing csv fields

* Update subfleets.csv

Part of the fix for missing fields in csv files used for import/export

* Update flights.csv

* Update FlightImporter.php

* Update subfleets.csv

Removed unused fields

* Update FlightImporter.php

* Update FlightImporter.php

* Update FlightImporter.php

* amended for new csv file layouts
2021-09-08 09:50:34 -04:00
Nabeel S
88a8ffe48a
Check for blank values on import and omit them (#1266)
* Check for blank values on import and omit them

* Add paused status to the pirep changed
2021-07-22 15:56:03 -04:00
Nabeel S
35359b8646
Create endpoint to load bid by ID (#1248)
* Create endpoint to load bid by ID

* Fix endpoint
2021-06-17 19:42:56 -04:00
Nabeel Shahzad
845514da2c Fix tests 2021-06-10 13:13:09 -04:00
Nabeel S
7481dab012
Remove extraneous data from API response; force API to en (#1241)
* Remove extraneous data from API response; force API to en

* Style fixes

* Remove

* Fix the meta block

* Style fixes
2021-06-09 11:20:25 -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
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
Nabeel S
7d8a34645e
Add --force flag to migrations (#1203) 2021-05-24 10:58:10 -04:00
Nabeel S
d3ec0f4de3
5 char ICAO support #1052 (#1198) 2021-05-21 10:52:47 -04:00
Nabeel S
352f1ee9f8
Days::in should use in_mask; tests coverage #1180 (#1193) 2021-05-19 11:20:50 -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
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
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
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
Nabeel S
bfddb2c84d
Make sure all dates are in UTC (#1139) 2021-04-13 09:25:38 -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
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
Nabeel Shahzad
43c33adcfe Unit rounding 2021-03-25 08:59:45 -04:00
exciler
be6332936f
When importing flights, set subfleet name only if subfleet has been created (#1095)
* when importing flights, set subfleet name only if subfleet has been created, do not update existing subfleets

* add tests for flights import regarding subfleets

Co-authored-by: Andreas Palm <ap@ewsp.de>
2021-03-23 08:50:19 -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
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
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 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
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
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
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
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
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
4e652c91ae Account for localhost/testing sites in domain checks 2021-02-13 15:59:19 -05:00
Nabeel S
fc7ad7eb6a
Simbrief attachment not working #1005 (#1006)
* Refactoring for Simbrief not working #1005

* Style fixes

* Update tests for new briefing URL

* Check the OFP user

* Comment out user check temporarily
2021-01-25 06:54:17 -05:00
B.Fatih KOZ
a5513b6fbb
Fixes for reported pressure in METAR parsing (#965)
* Update Metar.php

The reported pressure was always being assigned as hPa thus resulting display and conversion errors when the reported pressure was inHg.

Also the VFR/IFR (VMC/IMC) determination was using minimum 5 nmi and 3000 ft cloud base, it must be 5 km and 3000 ft.

With this state, this PR should fix issue #948 and partly fixes issue #963

* MetarTest Fix for inHg/hPa
2020-12-21 10:53:50 -05:00
Nabeel Shahzad
e95e61d4b4 Fix tests #807 2020-12-07 10:19:43 -05:00
Nabeel Shahzad
f92912dff4 Fix test 2020-12-07 09:50:00 -05:00
B.Fatih KOZ
fb44b73f44
Fix METAR decoding (text correction only) (#950)
* Update Metar Decoding (Text Correction Only)

SKC means Sky Clear or Clear Skies.

Rest is ok

* Update MetarTest.php
2020-12-04 12:47:42 -05:00
Nabeel S
6b5cf38224
Calculate percentage properly instead of adding to the base value #925 (#942)
* Calculate percentage properly instead of adding to the base value #925
2020-11-26 16:44:57 -05:00
Nabeel S
2ecf366670
Add missing columns from subfleet export #926 (#941) 2020-11-26 13:34:04 -05:00
Nabeel Shahzad
0fa00206ce Make sure stdclass is returned in flight fields 2020-10-29 12:38:40 -04:00
Nabeel S
dc7efc981c
Refactor fares inheritance #905 (#906) 2020-10-27 18:46:15 -04:00
Nabeel S
1be68d1e63
Flight/Subfleet fares not returning in API #899 (#900)
Make sure proper fares are returned from the API #899
2020-10-24 15:11:08 -04:00
Nabeel S
584d37f230
FlightRouteAwards - fix if last pirep is empty/other error conditions (#886) 2020-10-22 16:25:52 -04:00