Added Support and Analytics for Release

This commit is contained in:
2026-07-10 21:59:35 +10:00
parent d765161b9a
commit 85eeba982f
24 changed files with 673 additions and 320 deletions
@@ -22,8 +22,11 @@ const columnsToShow = computed(() => page.auth.user?.resolved_settings?.departur
const showColumn = (column: string) => columnsToShow.value.includes(column)
const allHeaders = [
{ title: '', key: 'airline', sortable: true },
{ title: '', key: 'airline', sortable: true, resizable: false},
{ title: 'FLIGHT', key: 'flight_number', sortable: true },
{ title: 'AIRLINE', key: 'airline.name', sortable: true},
{ title: 'IATA', key: 'airline.iata_code', sortable: true},
{ title: 'ICAO', key: 'airline.icao_code', sortable: true},
{ title: 'FROM', key: 'departure_airport', sortable: true },
{ title: 'TO', key: 'arrival_airport', sortable: true },
{ title: 'DATE', key: 'departure_date', sortable: true },
@@ -31,9 +34,16 @@ const allHeaders = [
{ title: 'ARRIVE', key: 'arrival_time', sortable: false },
{ title: 'DURATION', key: 'duration', sortable: true },
{ title: 'DISTANCE', key: 'distance', sortable: true },
{ title: 'MANUFACTURER', key: 'aircraft.manufacturer_code', sortable: true },
{ title: 'MODEL', key: 'aircraft.model_full_name', sortable: true },
{ title: 'AIRCRAFT', key: 'aircraft.display_name_short', sortable: true },
{ title: 'AIRCRAFT', key: 'aircraft', sortable: true },
{ title: 'REG', key: 'registration', sortable: true },
{ title: 'CLASS', key: 'flight_class', sortable: true },
{ title: 'CLASS', key: 'class_seat_combined', sortable: true },
{ title: 'SEAT TYPE', key: 'seat_type_id', sortable: true },
{ title: 'SEAT NO.', key: 'seat_number', sortable: true },
{ title: 'REASON', key: 'flight_reason_id', sortable: true },
{ title: '', key: 'actions', sortable: false },
]
@@ -43,16 +53,18 @@ const headers = computed(() =>
const CLASS_ORDER: Record<string, number> = {
'Unspecified': 0,
'Economy': 1,
'Premium Economy': 2,
'Business': 3,
'First': 4,
'Private': 5,
'Crew' : 6,
'General Aviation': 1,
'Economy': 2,
'Premium Economy': 3,
'Business': 4,
'First': 5,
'Private': 6,
'Crew' : 7,
}
const customKeySort = {
class_seat_combined: (a: Flight['flight_class'], b: Flight['flight_class']) => (CLASS_ORDER[a?.name ?? ''] ?? -1) - (CLASS_ORDER[b?.name ?? ''] ?? -1),
flight_class: (a: Flight['flight_class'], b: Flight['flight_class']) => (CLASS_ORDER[a?.name ?? ''] ?? -1) - (CLASS_ORDER[b?.name ?? ''] ?? -1),
class_seat_combined: (a: Flight['class_seat_combined'], b: Flight['class_seat_combined']) => (CLASS_ORDER[a] ?? -1) - (CLASS_ORDER[b] ?? -1),
airline: (a: Flight['airline'], b: Flight['airline']) => (a?.iata_code ?? '').localeCompare(b?.iata_code ?? ''),
aircraft: (a: Flight['aircraft'], b: Flight['aircraft']) => (a?.designator ?? '').localeCompare(b?.designator ?? ''),
duration: (a: any, b: any) => (a ?? 0) - (b ?? 0),