Updated logo API

This commit is contained in:
2026-04-23 00:53:19 +10:00
parent bd8ef98d30
commit 110ed5b984
17 changed files with 142 additions and 59 deletions
@@ -5,13 +5,13 @@ import {usePage} from "@inertiajs/vue3";
import type {SharedProps} from "@/Types/types";
const props = defineProps<{
prefilledOptions: { value: number, title: string }[]
prefilledOptions: { value: number, title: string, logo_url: string }[]
errorMessages?: string[] | string
}>()
const page = usePage<SharedProps>().props
const model = defineModel<{ value: number, title: string } | null>()
const model = defineModel<{ value: number, title: string, logo_url: string } | null>()
const airlineOptions = ref(props.prefilledOptions ?? [])
const autocompleteRef = ref<any>(null)
@@ -58,13 +58,13 @@ const searchAirlines = async (query: string) => {
style="padding: 0.25em"
width="40"
height="40"
:src="`${page.logo_api_url}/airlines/logos/tail/id/${model.value}`"
:src="`${model.logo_url}`"
/>
</template>
<template #item="{ item, props: itemProps }">
<v-list-item v-bind="itemProps">
<template #prepend>
<img style="padding:0.25em" width="40" height="40" :src="`${page.logo_api_url}/airlines/logos/tail/id/${item.value}`" alt=""/>
<img style="padding:0.25em" width="40" height="40" :src="`${item.logo_url}`" alt=""/>
</template>
</v-list-item>