Updated Map View
This commit is contained in:
@@ -1,32 +1,15 @@
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue'
|
||||
import { usePage } from '@inertiajs/vue3'
|
||||
import { SharedProps } from '@/Types/types'
|
||||
import { ref, onMounted, nextTick } from 'vue'
|
||||
|
||||
import { FlightStats } from '@/Composables/useFlightStats'
|
||||
import FlightMap from "@/Components/FlightsGoneBy/FlightMap.vue";
|
||||
import FlightFilter from "@/Components/FlightsGoneBy/FlightFilter.vue";
|
||||
import FlightStatsBar from "@/Components/FlightsGoneBy/FlightStatsBar.vue";
|
||||
import FlightCharts from "@/Components/FlightsGoneBy/FlightCharts.vue";
|
||||
import PlaneLoader from "@/Components/FlightsGoneBy/PlaneLoader.vue";
|
||||
import FlightMap from "@/Components/FlightsGoneBy/FlightMap.vue"
|
||||
import FlightStatsBar from "@/Components/FlightsGoneBy/FlightStatsBar.vue"
|
||||
import FlightCharts from "@/Components/FlightsGoneBy/FlightCharts.vue"
|
||||
|
||||
const props = defineProps<{
|
||||
stats: FlightStats
|
||||
canEdit: boolean
|
||||
}>()
|
||||
|
||||
const emit = defineEmits<{
|
||||
filtersChange: [filters: {
|
||||
years: number[]
|
||||
airlines: number[]
|
||||
countries: string[]
|
||||
continents: string[]
|
||||
flightClasses: number[]
|
||||
crewTypes: number[]
|
||||
}]
|
||||
}>()
|
||||
|
||||
|
||||
const mappedFlights = computed(() => [
|
||||
...props.stats.pastFlights.value,
|
||||
...props.stats.upcomingFlights.value,
|
||||
@@ -35,12 +18,8 @@ const mappedFlights = computed(() => [
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<FlightMap :flights="mappedFlights" />
|
||||
<FlightFilter :flights="mappedFlights" @change="$emit('filtersChange', $event)" />
|
||||
<FlightStatsBar :flights="stats.pastFlights.value" :upcoming-flights="stats.upcomingFlights.value" />
|
||||
<FlightCharts :stats="stats" :flight-stats="stats"/>
|
||||
<!-- <div v-else style="width:100%; display:flex; align-items: center;justify-content: center">
|
||||
<PlaneLoader />
|
||||
</div>-->
|
||||
<FlightMap :flights="mappedFlights" />
|
||||
<FlightStatsBar :flights="stats.pastFlights.value" :upcoming-flights="stats.upcomingFlights.value" />
|
||||
<FlightCharts :stats="stats" :flight-stats="stats" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user