Add London Airport and Million Mile Challenges

This commit is contained in:
2026-08-11 20:52:21 +10:00
parent 65e8c7575e
commit 2b41c3ed44
10 changed files with 284 additions and 9 deletions
@@ -4,6 +4,7 @@ namespace App\Http\Controllers;
use App\Models\Achievement;
use App\Models\Aircraft;
use App\Models\Airport;
use App\Models\Alliance;
use App\Models\Continent;
use App\Models\Country;
@@ -199,6 +200,11 @@ class UserProfileController extends Controller
default => [],
};
$londonAirports = match($achievement->internal_name){
'fun_challenges.all_london_airports' => Airport::LONDON_AIRPORTS,
default => [],
};
$canView = Gate::allows('viewProfileData', $user);
return Inertia::render('Profile/UserAchievement', [
@@ -212,6 +218,7 @@ class UserProfileController extends Controller
'airlines' => $airlines,
'continents' => $continents,
'aircraft_families' => $aircraftFamilies,
'london_airports' => $londonAirports,
'achievementCount' => $user->unlockedAchievements()->count(),
'majorAlliances' => Alliance::whereIn('internal_name', $majorAlliances)->get(),
'canView' => $canView,