diff --git a/app/Http/Controllers/FlightProfileController.php b/app/Http/Controllers/FlightProfileController.php index 83b723b..01e82b1 100644 --- a/app/Http/Controllers/FlightProfileController.php +++ b/app/Http/Controllers/FlightProfileController.php @@ -17,7 +17,9 @@ class FlightProfileController extends Controller $flights = UserFlight::where('user_id', $user->id) ->with([ 'departureAirport.region.country', + 'departureAirport.region.continent', 'arrivalAirport.region.country', + 'arrivalAirport.region.continent', 'airline.country', 'aircraft', 'seatType', diff --git a/app/Models/Region.php b/app/Models/Region.php index 4cb6ee2..4cef77a 100644 --- a/app/Models/Region.php +++ b/app/Models/Region.php @@ -19,4 +19,9 @@ class Region extends Model { return $this->belongsTo(Country::class); } + + public function continent(): BelongsTo + { + return $this->belongsTo(Continent::class); + } } diff --git a/resources/js/Components/FlightsGoneBy/Charts/ChartTooltip.vue b/resources/js/Components/FlightsGoneBy/Charts/ChartTooltip.vue new file mode 100644 index 0000000..b5e39d2 --- /dev/null +++ b/resources/js/Components/FlightsGoneBy/Charts/ChartTooltip.vue @@ -0,0 +1,59 @@ + + + + + diff --git a/resources/js/Components/FlightsGoneBy/Charts/ContinentsChart.vue b/resources/js/Components/FlightsGoneBy/Charts/ContinentsChart.vue new file mode 100644 index 0000000..b9ce517 --- /dev/null +++ b/resources/js/Components/FlightsGoneBy/Charts/ContinentsChart.vue @@ -0,0 +1,127 @@ + + + + + diff --git a/resources/js/Components/FlightsGoneBy/Charts/CountriesChart.vue b/resources/js/Components/FlightsGoneBy/Charts/CountriesChart.vue index 02421c1..f2698bd 100644 --- a/resources/js/Components/FlightsGoneBy/Charts/CountriesChart.vue +++ b/resources/js/Components/FlightsGoneBy/Charts/CountriesChart.vue @@ -3,7 +3,7 @@
Top countries
-
+
+ + +
+ + {{ tooltipItem?.name }} +
+
Flights{{ tooltipItem?.past }}
+
Upcoming{{ tooltipItem?.upcoming }}
+
+