Updated logo API

This commit is contained in:
2026-04-25 22:57:18 +10:00
parent 678096b463
commit de183995b6
26 changed files with 1088 additions and 64 deletions
@@ -11,6 +11,7 @@ import AircraftToolTip from "@/Components/FlightsGoneBy/AircraftToolTip.vue";
import {FlightStats} from "@/Composables/useFlightStats";
import GlassTooltip from "@/Components/FlightsGoneBy/GlassTooltip.vue";
import CrewTooltip from "@/Components/FlightsGoneBy/CrewTooltip.vue";
import {Link, router} from "@inertiajs/vue3";
const props = defineProps<{
flightStats: FlightStats
@@ -22,6 +23,8 @@ function editRoute(id: number) {
return route('flights.edit', { flight: id })
}
const showDeleteDialog = ref(false)
const ITEMS_PER_PAGE = 25
const headers = [
@@ -35,6 +38,7 @@ const headers = [
{ title: 'DURATION', key: 'duration', sortable: true },
{ title: 'DISTANCE', key: 'distance', sortable: true },
{ title: 'AIRCRAFT', key: 'aircraft.designator', sortable: true },
{ title: 'REG', key: 'aircraft_registration', sortable: true },
{ title: 'CLASS', key: 'flight_class', sortable: true },
{ title: '', key: 'actions', sortable: false },
]
@@ -64,6 +68,8 @@ const customKeySort = {
},
}
const deleting = ref(false)
const sortBy = ref<DataTableSortItem[]>([])
const currentPage = ref(1)
@@ -236,6 +242,12 @@ watch(
</AircraftToolTip>
</td>
<td class="v-data-table__td ">
<span class="mono-tag">
{{(item as Flight).aircraft_registration}}
</span>
</td>
<td class="v-data-table__td ">
<span class="class-cell">
<CrewTooltip v-if="(item as Flight).flight_reason?.name == 'Crew'" :crew-type="(item as Flight).crew_type!">
@@ -266,8 +278,30 @@ watch(
title="Edit"
:href="editRoute((item as Flight).id)"
/>
<v-list-item
prepend-icon="mdi-trash-can-outline"
title="Delete"
@click="showDeleteDialog = true"
/>
</v-list>
</v-menu>
<v-dialog v-model="showDeleteDialog" max-width="400">
<v-card title="Delete Flight">
<v-card-text>Are you sure you want to delete this flight?</v-card-text>
<v-card-actions>
<v-spacer />
<v-btn v-if="!deleting" @click="showDeleteDialog = false">Cancel</v-btn>
<v-btn
color="error"
:loading="deleting"
@click="deleting = true; router.delete(route('flights.delete', { flight: (item as Flight).id }), { onFinish: () => deleting = false })"
>
Delete
</v-btn>
</v-card-actions>
</v-card>
</v-dialog>
</template>
</td>
@@ -277,7 +311,7 @@ watch(
<template #no-data>
<div class="no-data">
<span>NO FLIGHTS ON RECORD</span>
<span>NO FLIGHTS DEPARTING</span>
</div>
</template>
</v-data-table>