Add more airlines and fix edit bugs

This commit is contained in:
2026-04-20 13:36:58 +10:00
parent 8d7d8f02d3
commit 5deefcbfb3
22 changed files with 1109 additions and 1530 deletions
@@ -2,24 +2,20 @@
import { computed } from "vue";
import { Flight } from "@/Types/types";
import BoardingPass from "@/Components/FlightsGoneBy/BoardingPass.vue";
import { FlightStats } from "@/Composables/useFlightStats";
const props = defineProps<{
flights: Flight[]
flightStats: FlightStats
canEdit: boolean
}>()
const today = new Date()
today.setHours(0, 0, 0, 0)
const upcomingFlights = computed(() =>
props.flights
.filter(f => new Date(f.departure_date) >= today)
[...props.flightStats.upcomingFlights.value]
.sort((a, b) => new Date(a.departure_date).getTime() - new Date(b.departure_date).getTime())
)
const departedFlights = computed(() =>
props.flights
.filter(f => new Date(f.departure_date) < today)
[...props.flightStats.pastFlights.value]
.sort((a, b) => new Date(b.departure_date).getTime() - new Date(a.departure_date).getTime())
)