* 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
* Block Aircraft with SimBrief
Changes aim to have the ability to block an aircraft's usage if it is used to generate a SimBrief OFP.
Unused/Expired briefings will be deleted by cron like before but will now be checked by HourlyCron, so admins can define more precise restrictions for them (and the blockage period of their aircraft)
Owner of the SimBrief OFP will be able to start a flight with acars using that particular aircraft, but pilots will get an Aircraft Not Available error (similar to Aircraft State check)
To prevent SimBrief OFP packs being marked as expired/unused, during pirep prefile, pirep_id will be saved to SimBrief model along with flight_id.
And when a flight is finished (pirep file), flight_id will be removed from SimBrief model as before. Only pirep_id will remain and aircraft will be available for another OFP generation.
* Update PirepController
In case a pirep is being saved/submitted with manual entry (but the va is using simbrief effectively) same logic should be applied during save/submit button selection.
Save will act like a pirep prefile , Submit will be pirep file.
* Manual Pirep Checks
Manual pireps, prefiled from a generated simbrief should be checked too. Also pirep.show blade's submit button should provide the same simbrief checks.
* Update PirepService.php
* Change settings and move sb cron to hourly
* StyleFix (SimBriefService)
* Another StyleFix (SimBriefService)
* Update SimBriefController
Removed null check of pirep_id for aircraft list generation to prevent live flights' aircraft being listed for another ofp generation.
( Active acars flights will have both flight_id and pirep_id at simbrief table)
* Update PirepService.php
Co-authored-by: Nabeel S <nabeelio@users.noreply.github.com>
* Update PirepController
Frontend : Use `$subfleet->type` instead of `name` for grouping aircraft list.
* Update PirepController (Admin)
Use `$subfleet->type` instead of `name` here too , for grouping aircraft list according to their subfleets.
Co-authored-by: Nabeel S <nabeelio@users.noreply.github.com>
* 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.
* 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>
* 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
* 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
* 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 !
* 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.
* 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.
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.
* 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>
* 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
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>