Added User API
This commit is contained in:
@@ -11,7 +11,7 @@ const props = defineProps<{
|
||||
}>();
|
||||
|
||||
const page = usePage<SharedProps>().props;
|
||||
const logoUrl = computed(() => `url('${page.logo_api_url}/airlines/logos/tail/id/${props.airline?.id}')`);
|
||||
const logoUrl = computed(() => `url('${page.logo_api_url}/airlines/logos/tail/name/${props.airline?.internal_name}')`);
|
||||
const logoStyle = computed(() => ({
|
||||
width: size.value,
|
||||
height: size.value,
|
||||
|
||||
@@ -233,12 +233,13 @@ watch(
|
||||
|
||||
<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!">
|
||||
<FlightClassBadge :flight="(item as Flight)" />
|
||||
</CrewTooltip>
|
||||
<FlightClassBadge v-else :flight="(item as Flight)" />
|
||||
<InlineBadge v-if="(item as Flight).seat_number" variant="economy">{{(item as Flight).seat_number}}</InlineBadge>
|
||||
<InlineBadge v-if="(item as Flight).seat_type?.name && (item as Flight).seat_type?.name !== 'Unassigned'" variant="economy">{{(item as Flight).seat_type?.name}}</InlineBadge>
|
||||
<CrewTooltip v-if="(item as Flight).flight_reason?.name == 'Crew'" :crew-type="(item as Flight).crew_type!">
|
||||
<FlightClassBadge v-if="(item as Flight).flight_class?.internal_name === 'crew'" :flight="(item as Flight)" />
|
||||
<InlineBadge v-else variant="crew">Crew</InlineBadge>
|
||||
</CrewTooltip>
|
||||
<FlightClassBadge v-if="(item as Flight).flight_reason?.name !== 'Crew' || (item as Flight).flight_class?.internal_name !== 'crew'" :flight="(item as Flight)" />
|
||||
<InlineBadge v-if="(item as Flight).seat_number" variant="economy">{{ (item as Flight).seat_number }}</InlineBadge>
|
||||
<InlineBadge v-if="(item as Flight).seat_type?.name && (item as Flight).seat_type?.name !== 'Unassigned'" variant="economy">{{ (item as Flight).seat_type?.name }}</InlineBadge>
|
||||
</span>
|
||||
</td>
|
||||
|
||||
|
||||
@@ -82,8 +82,8 @@ function emitFilters() {
|
||||
|
||||
// ── Helpers ───────────────────────────────────────────────────────────────────
|
||||
const page = usePage()
|
||||
const airlineLogoUrl = (id: number) =>
|
||||
`${page.props.logo_api_url}/airlines/logos/tail/id/${id}`
|
||||
const airlineLogoUrl = (internal_name: string) =>
|
||||
`${page.props.logo_api_url}/airlines/logos/tail/name/${internal_name}`
|
||||
|
||||
const countryFlagClass = (code: string) =>
|
||||
`fi fi-${code.toLowerCase()}`
|
||||
@@ -123,7 +123,7 @@ const countryFlagClass = (code: string) =>
|
||||
</template>
|
||||
<template #title>
|
||||
<img
|
||||
:src="airlineLogoUrl((item as any).id)"
|
||||
:src="airlineLogoUrl((item as any).internal_name)"
|
||||
width="32" height="32"
|
||||
style="object-fit: contain; margin-right: 8px; vertical-align: middle;"
|
||||
alt=""
|
||||
|
||||
Reference in New Issue
Block a user