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.
* 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.
* 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>
* 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>
* 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>
* Change LatestPireps Widget Sort Order
Latest pireps should be ordered by `submitted_at` instead of `created_at` .
Pirep may be created even a day before others (with the pause/resume ability we have in acars) but it gets submitted once when the flight is ended, thus I think it should be our reference to sort them in proper order.
* Trying to Pass UnitTest
* 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>
* 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)
* DownloadController Improvements
Added multiple airline support to both Aircraft and Subfleet downloads, if the user has more than one active airline downloads will display the airline name before the object name. Also sorted the returned results to have a better look at the blade.
* Trying to pass broken UnitTest
Please do fix the UnitTest, this pr has nothing to do with units but still being tested with it and failing.
* Update simbrief_aircraft.blade.php
If resrict airplane at location settings is enabled, Show only aircraft at the departure location of the flight. Kingly made by @FatihKoz at my ocd request.
* Update simbrief_aircraft.blade.php
* 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
* 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>
* 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>
* 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>
* 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.
* 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>