Commit Graph

56 Commits

Author SHA1 Message Date
Nabeel Shahzad
1eb5f2eb1c
refactor(airport): add #[Scope] methods + #[ObservedBy] modernization
- Scopes: active(), byHub(), orderByIcao() — all using #[Scope] attribute
- Attach #[ObservedBy(AirportObserver::class)], remove imperative
  Airport::observe() from ObserverServiceProviders
- Override resolveRouteBinding() for case-insensitive ICAO route binding
  (URLs like /api/airports/kjfk now resolve correctly)
- Drop dead public static array $rules (Prettus validator hook,
  never activated)
2026-04-25 11:47:57 -05:00
Arthur Parienté
b2bc7b0900
[8.x] refactor: upgrade pint (#2152)
* refactor: upgrade pint

* exclude modules from pint

* apply ai suggestions
2026-03-14 13:34:18 -05:00
Arthur Parienté
0695ed0823
chore(phpstan): setup and add level 1 (#2073)
* wip

* refactor: phpstan level 1

* refactor: how the amount of people per fare is passed in the simbrief resource

* ci: add phpstan

* refactor: phpstan level 2

* fix: new avatar column name

* refactor: rollback avatar column name

* fix: type in FareService
2025-08-20 11:32:48 -05:00
Arthur Parienté
5aa4f0d3e3
feat: reintroduce ide-helper (#2067)
* feat: add back ide-helper

* feat: add model phpdocs

* feat: generate ide-helper automatically after composer update
2025-08-14 10:15:37 -05:00
Arthur Parienté
28e2d33b88
[8.x] Add RectorPHP (#1986)
* Add rector

* Remove cache

* Run rector again

* Run pint

* Run Rector in CI

* Update composer.lock
2025-03-14 11:38:16 -05:00
Nabeel S.
273cb86bc5
Add Laravel Pint linting (#1933)
* Run linter

* Run Pint in github action

* Run the linter verbose
2025-01-11 17:03:03 -06:00
Arthur Parienté
55cb0e0e68
Add activity logger (#1755)
* Apply fixes from StyleCI

* Add spatie/laravel-activitylog

* Add admin interface for activities

* Disable activity logging in api routes

* Add activity watcher to models

* Add clean up command

* Apply fixes from StyleCI

* Remove activities from menu if activity logger is disabled

* Fix migrations structure

* Apply fixes from StyleCI

* Fix tests

* Fix display of changes if newValue is an array

* Disable activity logger for frontend routes

* Enable activity logger only in admin routes

* Apply fixes from StyleCI

* Update composer.lock

* Update composer.lock

* Update composer.lock

* Update composer.lock

---------

Co-authored-by: StyleCI Bot <bot@styleci.io>
Co-authored-by: Nabeel S <nabeelio@users.noreply.github.com>
2024-03-05 14:19:22 -06:00
Nabeel S
fce71e96d9
Importer fixes for dirty fields (#1623)
* Importer fixes for dirty fields

* Code cleanup
2023-10-03 19:00:24 -04:00
B.Fatih KOZ
7261bc5292
Elevation and Region (#1618)
* Elevation and Region

Add elevation and region data to model, which is already being returned during lookup.

Provide export/import for these new fields

Implement sortable columns to admin airports table.

* Improve import test (airport)

* Update airports > show.blade.php

Added elevation to the title
2023-09-27 15:00:19 -05:00
Nabeel S
41758ed84a
Add ajax search to flight search in admin (#1581)
* Add ajax search to flight search in admin

* Make sure airports are populated in editable forms/field

* All airports loaded by ajax/updates to restrict to hubs

* Style CI fixes

* Add checking around migration failing
2023-08-15 15:31:24 -05:00
B.Fatih KOZ
89988cb2da
Sortable Columns (#1576)
* install dependency

* FontAwesome5 compatible config

* Models

* Controllers

* Blades

* StyleCI Fixes

* Another StyleCI Fix
2023-08-14 13:08:41 -05:00
B.Fatih KOZ
9081bdb771
Model Updates (Relationships) (#1573)
* Return Types and New Relationships

Added return types to current relationships

Added new relationships to Airport, Airline, Flight, Rank

* Update Aircraft.php

Fix for Znck BelongsToThrough return type check

* Update Aircraft.php

* StyleCi Fixes

* Update Flight.php

Switching from HasOne to BelongsTo for SimBrief test case
2023-08-08 08:46:40 -05:00
B.Fatih KOZ
e1df088711
SoftDeletes (#1558)
* Models and Migration

SoftDelete capability for models and database table updates

* Update 2023_06_24_072812_add_softdelete_fields.php

* Update 2023_06_24_072812_add_softdelete_fields.php

* StyleFix

* Frontend Pirep Controller

* User and Profile Controllers

* Airport, Dashboard, Profile controllers

* User Model

* User and Profile

* Flight Controller
2023-07-26 09:06:00 -05:00
Nabeel S
59e2ffb1b1
Block read-only PIREP from being updated #1415 (#1529)
* Block read-only PIREP from being updated #1415

* styleci, my old friend

* styleci, my old friend
2023-03-20 12:41:46 -05:00
B.Fatih KOZ
ef38d39ec4
Add "Notes" to Airports (#1467)
* Notes for Airports

Adds capability of having notes/remarks for airports, includes

* New database field
* Airport Model change
* CSV Import/Export capability for notes
* Admin Airports list page change
* Admin Airports edit page change
* Default Template Airport show page change

* Update Airport Tests

* Add the new field to source csv
* Check if the import works

* Update AirportFactory.php

Co-authored-by: Nabeel S <nabeelio@users.noreply.github.com>
2022-08-15 11:23:39 -04:00
Nabeel Shahzad
ca1cd01f3d Style fixes 2022-03-28 13:55:42 -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 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
Nabeel S
f2b216c404
Remove 4 char restriction from ICAO; use decimal type for lat/lon #590 (#591)
* Remove 4 char restriction from ICAO; use decimal type for lat/lon #590

* Reorder imports
2020-02-26 17:06:39 -05:00
Nabeel S
b06287da23
Stricter checks on ACARS API data (#451)
* Stricter checks on ACARS API data

* More checks
2019-12-02 18:27:58 -05:00
Nabeel S
23eb9dcbda
384 Laravel 6 changes (#385)
* 384 Laravel 6 changes

* Library versions

* Update package versions

* Add keyType to models

* Remove unused dependencies

* StyleCI fixes

* Fix models for test

* Fix tests output and update test runner

* Unused imports

* Update exceptions handler

* Fix login page
2019-09-13 08:05:02 -04:00
Nabeel S
9f3ba05880
Issue/329 refactor seeding (#337)
* Fix Contracts class names

* Refactoring of the file seeds so it's not a mess

* StyleCI fixes
2019-08-05 08:27:53 -04:00
Nabeel Shahzad
62a10224a0 Account for fuel in the finance calculations #313 2019-07-23 08:41:20 -04:00
Nabeel Shahzad
a720f12e0b Rename Interfaces to Contracts to better match Laravel conventions 2019-07-15 15:44:31 -04:00
Nabeel Shahzad
9596d88b48 Apply fixes from StyleCI 2018-08-26 16:40:04 +00:00
Nabeel Shahzad
0cd7b3b71f live map updates 2018-05-04 13:59:47 -05:00
Nabeel Shahzad
e358b8706f Backend for file uploads attached to any generic model, initially on aircraft and airports #226 2018-04-01 18:02:12 -05:00
Nabeel Shahzad
bb5bb4d4c7 Fixed scoping rules in Model classes 2018-03-20 19:40:19 -05:00
Nabeel Shahzad
ccf56ddec1 Fix formatting and interfaces in nearly every file 2018-03-19 20:50:40 -05:00
Nabeel Shahzad
36ea12e135 Move the model callbacks into Observables; reduce caching since it held balances incorrectly 2018-03-18 20:37:35 -05:00
Nabeel Shahzad
f13c961863 Fix flight page errors and some naming fixes 2018-03-08 08:51:36 -06:00
Nabeel Shahzad
88a8fd2bbd Remove subfleet_expenses and combine into main expenses table; select expense type on subfleet #130 #136 2018-03-05 21:24:49 -06:00
Nabeel Shahzad
53e4bf533f Add finance controller; morphable expense type so they can be applied to any model #130 2018-03-05 14:18:54 -06:00
Nabeel Shahzad
586769fbf0 Fix tests and docs/better checks #130 2018-03-02 17:29:11 -06:00
Nabeel Shahzad
4142d5d28a Add ground_handling_cost to airport #134 2018-02-23 15:48:50 -06:00
Nabeel Shahzad
ac0058e951 Some more attribute cleanup 2018-02-06 12:01:55 -06:00
Nabeel Shahzad
56bf277fe0 Add shorthands for timezone to tz 2018-02-06 11:02:40 -06:00
Nabeel Shahzad
1cc999a4f9 Change Airport tz field to timezone 2018-02-06 10:59:31 -06:00
Nabeel Shahzad
c6b1a475e9 Add timezone aliases 2018-02-06 10:33:39 -06:00
Nabeel Shahzad
8d76e16220 Add the validation error fields in the templates 2018-02-06 10:18:22 -06:00
Nabeel Shahzad
fe4e200983 Trim ICAO/IATA names, clean up model fields 2018-01-03 22:04:51 -06:00
web541
08df20de19 Fixed a few field entries (#116)
* Stopped inheritance errors popping up

* Added fillable fields

These would not save otherwise.

* Added country fillable field

Wouldn’t save when importing from phpvms classic.

* Added more to classic importer

Change arguments to ask in terminal
Fixed table_prefix names in Importer.php

Added the ability to import users from phpvms classic (tested on
simpilot’s 5.5.x) and when importing, it will then reset the user’s
password to a temporary hash and then email it to the user to then
change when they first log in.

* Changes to ImporterService
2018-01-03 15:41:21 -06:00
Nabeel Shahzad
11c724649c Field and error message cleanup 2017-12-31 14:20:52 -06:00
Nabeel Shahzad
7180bfb111 cleanup validation rules 2017-12-30 14:37:10 -06:00
Nabeel Shahzad
7cd4bf5ffb Add user setup to installer 2017-12-29 16:56:46 -06:00
Nabeel Shahzad
3bd97b4d37 add PIREP pre-file and ACARS updates; removing caching from ACARS/Pirep/User repositories; adjust PirepState enum values; add additional columns 2017-12-25 15:19:34 -06:00
Nabeel Shahzad
6c546b5094 Add flight route map; algorithm for picking from multiple nav points; some tests 2017-12-20 19:12:39 -06:00
Nabeel Shahzad
17093e9fe9 Import navigation data from Navigraph files 2017-12-20 16:34:52 -06:00
Nabeel Shahzad
e5278bc0bf Output PIREP map with just the dep/arr airports for now 2017-12-20 11:28:21 -06:00
Nabeel Shahzad
f0309e65de set/add timezone information for airports and users 2017-12-06 16:07:25 -06:00