Commit Graph

568 Commits

Author SHA1 Message Date
B.Fatih KOZ
b1ae0240be
Roles Update (#1474)
Adds member count to roles\index and member list to roles\edit pages.

Co-authored-by: Nabeel S <nabeelio@users.noreply.github.com>
2022-08-21 10:59:19 -04:00
B.Fatih KOZ
ccebc69be2
Add ability to export members of a subfleet only (#1471)
* Export Subfleet Members

* Style Fix

* Fix php-cs style complaints

* Disable php-cs-fixer and fix styles
2022-08-15 10:45:10 -04:00
Nabeel S
12848091a2
Laravel 9 Update (#1413)
Update to Laravel 9 and PHP 8+

Co-authored-by: B.Fatih KOZ <fatih.koz@gmail.com>
2022-03-14 11:45:18 -04:00
Nabeel Shahzad
648659aea5 Check if PIREP doesn't exist before cancelling 2022-02-16 19:13:47 -05:00
B.Fatih KOZ
08f82f8a2e
Admin and Discord Notification Improvements (#1407)
* Backend changes

Sorting for : Airlines, Subfleets, Type Ratings and exported Flights

Blade : Added WYSIWYG editor to flight remarks/notes field

Notifications :

Mails > Added enabled/disabled settings for mails. Discord > Dashed out PirepPreFiled, re-enabled PirepStatusChanged with reduced messages

* Update PirepStatusChanged.php

* Update NotificationEventsHandler.php

* in_array fix

* Fix Discord Notifications

* Discord Notifications

Removed the pirep url from message as it is mostly private at phpvms side.

Also removed the Flight Ident from fields 'cause it is being used in the title.

Added the user avatar as thumbnail, and pirep filed message uses the airline logo as the main image.

Even though the outgoing pirep status messages are reduced, it is still possible to enable/disable them from admin settings.

Pirep Filed is always being sent (if the webhook is defined)

* StyleFix
2022-02-14 16:24:22 -05:00
Nabeel S
78fd8367a1
Add separate cron runner that doesn't use proc_open (#1405)
* Add alternative to using the artisan schedule runner

* StyleCI fixes

* Add additional cron time periods

* Style fixes

* Typo

* Update the web cron to use the new system

* Write out JSON for which tasks were run

* Rename cron.php to just cron
2022-02-11 16:24:06 -05:00
Nabeel Shahzad
670cb5d811 Check for bid existing or not 2022-02-04 14:21:59 -05:00
B.Fatih KOZ
023313c681
Check settings and filter aircraft list if needed (#1377)
Check settings and filter aircraft list if needed.
2022-01-10 13:29:30 -05:00
B.Fatih KOZ
d3b7d25abd
Add ability to export flights of an airline only(#1375)
* Airline Flight Export

Add ability to export flights of an airline only

* StyleFix
2022-01-10 09:27:40 -05:00
B.Fatih KOZ
fd7c1b8314
Update RegisterController.php (#1373)
Get only active and displayed UserFields.
2022-01-04 14:29:41 -05:00
Nabeel Shahzad
3c9d419ebb Clarify logs for pirep cancel/updates 2021-12-07 13:24:18 -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
B.Fatih KOZ
4d21ca0982
Update RegisterController.php (#1358)
Only active fields should be passed to view during registration.

Co-authored-by: Nabeel S <nabeelio@users.noreply.github.com>
2021-11-30 14:40:18 -05:00
B.Fatih KOZ
52e716d6ee
Type Ratings | New Feature (#1360)
* Type Ratings

Adding "Type Rating" definition and assignment possibility to v7 core.

* Update ProfileController.php

* StyleFix 1

* Update settings.yml

Change description text as requested
2021-11-30 14:36:17 -05:00
B.Fatih KOZ
4ea8357952
Fix SimBrief Controller | flight relationships (#1350)
* Update SimBriefController.php

Fix the fares relationship which was causing trouble when a flight had assigned fares

* Fix model name used in relationship

`Simbrief` should be `SimBrief`
2021-11-16 16:26:43 -05:00
B.Fatih KOZ
4c60e5da69
Eager loading update for frontend controllers and widgets (#1348)
* Update AirportController.php

Eager load `files`

* Update DashboardController.php

 Eager load `journal` for user , and `aircraft, arr_airport, comments, dpt_airport` for last_pirep.

* Update FlightController.php

Eager load + `alt_airport, subfleets` (with their airlines) for flights and `current_airport` for user 
(though current_airport can be removed and we can base the in blade checks on `$user->curr_airport_id` to reduce db reads and model loading)

* Update HomeController.php

Eager load `home_airport` for users

* Update PirepController.php

Eager load `airline, aircraft, fares, transactions, dpt_airport, arr_airport, comments, simbrief, user with rank` for pirep details

* Update ProfileController.php

Eager load `airline, awards, current_airport, fields.field, home_airport, last_pirep, rank` for user

* Update UserController.php

Eager load `airline, current_airport, fields.field, home_airport, rank` for users and count `awards`

* Update AirportController.php

* Update DashboardController.php

* Update PirepController.php

* Update ProfileController.php

* Update LatestNews.php

Eager load `user` for news

* Update LatestPilots.php

Eager load `home_airport` for latest users

* StyleFix 1

* StlyeFix 1.5

* Update SimBriefController.php

Eager load airline with flight

* Update SimBriefController.php

* Update SimBriefController.php
2021-11-09 09:51:02 -05:00
B.Fatih KOZ
2dbe19fdcc
Fix pirep->ident usage issues (#1347)
* Update table.blade.php

* Update show.blade.php

* Update pirep_card.blade.php

* Update latest_pireps.blade.php

* Update ProfileController.php

Removed non used airports, added necessary relationships for eager loading.

Also removed `fields` 'cause it is already being loaded when `fields.field` is used. No need to query it twice.

* Update ProfileController.php
2021-11-08 16:08:19 -05:00
B.Fatih KOZ
fc8ca69729
Fix Private Profile fields not being editable (#1289)
* Update ProfileController.php

* Update UserRepository.php

* Update UserRepository.php

Co-authored-by: Nabeel S <nabeelio@users.noreply.github.com>
2021-08-30 12:55:33 -04:00
B.Fatih KOZ
57277c558d
Fix Fare not properly set in controller (#1291)
* Update FareService.php

* Update PirepController.php

Move the logic to controller as requested

* Update FareService.php

Reverting back the service changes as requested

* StyleFix
2021-08-30 12:50:04 -04:00
B.Fatih KOZ
b6abe8dd5b
Bid check for flights/show (#1278)
* 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)
2021-08-10 13:23:43 -04:00
Nabeel S
4125cdd373
Launch ACARS link on the simbrief page #1272 (#1276) 2021-08-09 12:01:27 -04:00
Nabeel S
564f9ec06e
Add ability to launch acars for flight/bid #1272 (#1273)
* Add ability to launch acars for flight/bid #1272

* Check for module active/inactive status

* Just some formatting
2021-08-06 14:53:04 -04:00
Nabeel S
95e1df619e
Trap exception/check for module existing on disk #1211 (#1271)
* Trap exception/check for module existing on disk #1211

* Style fixes
2021-08-06 13:30:24 -04:00
B.Fatih KOZ
4a04d73d08
Update DownloadController.php (#1267)
* Update DownloadController.php

* StyleFix

* Another StyleFix !

* Update DownloadController.php

* Last StyleFix and Update

* Apply StyleCI fix

Co-authored-by: Nabeel Shahzad <nabeel@nabeel.sh>
2021-08-02 14:43:38 -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
bd9c429cfc Don't force status to airborne 2021-06-13 15:28:57 -04:00
Nabeel Shahzad
b18f1bbe6c Fix paginate on airlines 2021-06-11 09:40:42 -04:00
Nabeel Shahzad
845514da2c Fix tests 2021-06-10 13:13:09 -04:00
Nabeel Shahzad
531489bfde Remove pagination from getting airlines 2021-06-10 12:41:23 -04:00
B.Fatih KOZ
90344fb6e6
Simbrief Edit & Download Latest OFP (#1228)
* 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>
2021-06-09 11:38:14 -04:00
Nabeel S
96d33c11c8
Fix data not showing up for live map (#1223)
* Fix data not showing up for live map

* StyleCI fixes
2021-06-04 16:57:27 -04:00
Nabeel Shahzad
4267648da5 Fields/fares not being saved properly 2021-06-04 15:06:19 -04:00
Nabeel S
82825ef77b
Add setting for recording IP address (#1221)
* Add setting for recording IP address

* Record IP on registration
2021-06-04 13:20:33 -04:00
Nabeel S
db532e0f16
Remove the IP address from being recorded (#1220) 2021-06-04 12:10:40 -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
17447c6903
Block aircraft with Simbrief (#1213)
* 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>
2021-06-03 16:17:16 -04:00
B.Fatih KOZ
ad86e996d7
Fix Aircraft Dropdown Grouping (#1216)
* 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>
2021-06-03 14:41:31 -04:00
B.Fatih KOZ
11cebb3e6e
Show only used Flight Types at Flight Search (#1207)
* 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>
2021-05-25 16:14:42 -04:00
B.Fatih KOZ
728b033675
Fix Admin: UserController and Flight Edit (#1204)
* 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
2021-05-24 19:13:44 -04:00
Nabeel S
edcea258ce
Remove the autoupdater #1133 (#1195)
* Remove the autoupdater #1133

* Remove self-updater package

* Package still needed :|
2021-05-20 11:37:27 -04:00
Nabeel Shahzad
5adc0b4072 Remove unused import 2021-05-20 09:20:12 -04:00
Olli
6f1a5f1dc2
Update Flight Controller to fix an issue (#1192)
Closes #1180 and #1156. But now the script isn't beeing loaded

Co-authored-by: Nabeel S <nabeelio@users.noreply.github.com>
2021-05-19 13:42:40 -04:00
B.Fatih KOZ
a186bfae2a
Fix AirportController (Frontend) (#1176)
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.
2021-05-08 15:42:18 -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
B.Fatih KOZ
5094375e13
Fixes For GDPR/Deleted Users (#1164)
* 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
2021-05-03 08:46:21 -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 Shahzad
2545328233 Fix APP_URL being called SITE_URL 2021-04-20 23:28:57 -04:00
Nabeel S
ac64a5db75
Migrate all configs into the env.php file #1075 (#1128)
* Migrate all configs into the env.php file #1075

* Style fixes

* Fix config names in CreateConfig

* Fix installer/installer error messages
2021-04-10 17:19:45 -04:00
Maximiliano Fallico
dbfaed0ecc
Adds Airline Icao to Subfleet Select in Flight Create (#1123)
* Adds Airline Icao to Subfleet Select in Flight Create

* Fix Style

Co-authored-by: Nabeel S <nabeelio@users.noreply.github.com>
2021-04-05 16:55:50 -04:00
Nabeel Shahzad
8e9ba3b922 Fix styling that somehow slipped through 2021-04-01 17:33:57 -04:00