* Update EventServiceProvider.php
Add FareListener
* Create Fares.php
* Create FareListener.php
* Update ExpenseListener.php
* Update PirepFinanceService.php
Add listener for the fares, process them like the custom expenses and apply if there are any returned
That `if` should return `true` when both conditions are met (pirep not accepted and not rejected yet), so **AND** must be used there ;) Sorry for the trouble.
Now it works and listens more carefully.
* Update PirepService.php
Moved `$default_state` logic below `PirepFiled` event, so admins can have some flexibility to define their own default states by listening that event.
Any ideas ?
Hopefully closes#1312
* Update PirepService.php
Added the missing `$pirep->refresh();`
* 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
* Update GeoService.php
Replace double name usage with more valuable info
* Update GeoService.php
Changed `GS` with `Spd` 'cause it may be IAS or GS according to the phase of the flight.
Co-authored-by: Nabeel S <nabeelio@users.noreply.github.com>
* Update FareService.php
* Update PirepController.php
Move the logic to controller as requested
* Update FareService.php
Reverting back the service changes as requested
* StyleFix
* Update FlightController.php
Add missing $bid to flight/show so when needed Load In Acars button can be placed there too.
* Update show.blade.php
Add Load In Acars button to flight details page (flights/show.blade.php)
* Update AcarsRepository.php
Use `where` instead of `whereDate` , as you know whereDate only checks the date, it skips the time part completely, thus not providing correct live pireps collection.
* Switch from created_at to updated_at
Also remove the UTC conversion 'cause `updated_at` field is not being populated with UTC values.
* Update PirepStatusChanged.php
Use profile route for author url instead of pirep
* Update PirepSubmitted.php
Use profile route for author url instead of pirep
* Update PirepPrefiled.php
Use profile route for author instead of pirep
Co-authored-by: Nabeel S <nabeelio@users.noreply.github.com>
* SimBrief OFP Edit
Changes aim to have ability of editing generated SimBrief Flight Plans and re-downloading.
* Move url to config
* Blade update and $uri change
* Update simbrief_form.blade.php
Used `$flight->id` along with `$user->ident` to have a more unique static id value. No details given for that fields uniqueness requirements, this will be ok I think though.
Also we are passing user's simbrief userid with api to find the flight plan, both combined, no chance to get another users plan and/or any other plan of same user.
* Update SimBriefController.php
Move `static_id` to controller
* Update simbrief_form.blade.php
Read `static_id` from controller
* StyleFix
* Update phpvms.php
* Update SimBriefService.php
Co-authored-by: Nabeel S <nabeelio@users.noreply.github.com>
* Update helpers.php
Looks like php8 is not liking numeric strings as we like them.
Fixes#1229
* StyleFix
Co-authored-by: Nabeel S <nabeelio@users.noreply.github.com>
* 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>