Added API

This commit is contained in:
2026-06-21 12:52:30 +10:00
parent 05ca994253
commit 5850c849d0
32 changed files with 248 additions and 107 deletions
@@ -12,7 +12,7 @@ defineOptions({ inheritAttrs: false })
const props = defineProps<{
achievement: Achievement
user: User
isFollowing: boolean
followStatus: string
flights: Flight[]
families: Record<string, string[]>
}>()
@@ -11,7 +11,7 @@ defineOptions({ inheritAttrs: false })
const props = defineProps<{
achievement: Achievement
user: User
isFollowing: boolean
followStatus: string
flights: Flight[]
families: Record<string, string[]>
}>()
@@ -5,7 +5,7 @@ defineOptions({ inheritAttrs: false })
defineProps<{
achievement: Achievement
user: User
isFollowing: boolean
followStatus: string
alliance: Alliance
airlines: Airline[]
flights: Flight[]
@@ -16,7 +16,7 @@ defineProps<{
<AllianceChallenge
:achievement="achievement"
:user="user"
:isFollowing="isFollowing"
:followStatus="followStatus"
:alliance="alliance"
:airlines="airlines"
:flights="flights"
@@ -5,7 +5,7 @@ defineOptions({ inheritAttrs: false })
defineProps<{
achievement: Achievement
user: User
isFollowing: boolean
followStatus: string
alliance: Alliance
airlines: Airline[]
flights: Flight[]
@@ -5,7 +5,7 @@ defineOptions({ inheritAttrs: false })
defineProps<{
achievement: Achievement
user: User
isFollowing: boolean
followStatus: string
alliance: Alliance
airlines: Airline[]
flights: Flight[]
@@ -16,7 +16,7 @@ defineProps<{
<AllianceChallenge
:achievement="achievement"
:user="user"
:isFollowing="isFollowing"
:followStatus="followStatus"
:alliance="alliance"
:airlines="airlines"
:flights="flights"
@@ -5,7 +5,7 @@ defineOptions({ inheritAttrs: false })
defineProps<{
achievement: Achievement
user: User
isFollowing: boolean
followStatus: string
alliance: Alliance
airlines: Airline[]
flights: Flight[]
@@ -16,7 +16,7 @@ defineProps<{
<AllianceChallenge
:achievement="achievement"
:user="user"
:isFollowing="isFollowing"
:followStatus="followStatus"
:alliance="alliance"
:airlines="airlines"
:flights="flights"
@@ -11,7 +11,7 @@ defineOptions({ inheritAttrs: false })
const props = defineProps<{
achievement: Achievement
user: User
isFollowing: boolean
followStatus: string
flights: Flight[]
continents: Continent[]
}>()
@@ -10,7 +10,7 @@ defineOptions({ inheritAttrs: false })
const props = defineProps<{
achievement: Achievement
user: User
isFollowing: boolean
followStatus: string
flights: Flight[]
continents: Continent[]
}>()
@@ -13,7 +13,7 @@ defineOptions({ inheritAttrs: false })
const props = defineProps<{
achievement: Achievement
user: User
isFollowing: boolean
followStatus: string
flights: Flight[]
}>()
@@ -13,7 +13,7 @@ defineOptions({ inheritAttrs: false })
const props = defineProps<{
achievement: Achievement
user: User
isFollowing: boolean
followStatus: string
flights: Flight[]
}>()
@@ -16,7 +16,7 @@ defineOptions({ inheritAttrs: false })
const props = defineProps<{
achievement: Achievement
user: User
isFollowing: boolean
followStatus: string
flights: Flight[]
regions: Region[]
}>()
@@ -16,7 +16,7 @@ defineOptions({ inheritAttrs: false })
const props = defineProps<{
achievement: Achievement
user: User
isFollowing: boolean
followStatus: string
flights: Flight[]
regions: Region[]
}>()
@@ -17,7 +17,7 @@ defineOptions({ inheritAttrs: false })
const props = defineProps<{
achievement: Achievement
user: User
isFollowing: boolean
followStatus: string
flights: Flight[]
regions: Region[]
}>()
@@ -16,7 +16,7 @@ defineOptions({ inheritAttrs: false })
const props = defineProps<{
achievement: Achievement
user: User
isFollowing: boolean
followStatus: string
flights: Flight[]
regions: Region[]
}>()
@@ -16,7 +16,7 @@ defineOptions({ inheritAttrs: false })
const props = defineProps<{
achievement: Achievement
user: User
isFollowing: boolean
followStatus: string
flights: Flight[]
regions: Region[]
}>()
@@ -20,7 +20,7 @@ const props = defineProps<{
userAchievement: UserAchievement | null
user: User
loggedInUser: User | null
isFollowing: boolean
followStatus: string
flight_api_url: string
regions: Region[]
alliance: string | null
@@ -57,7 +57,7 @@ const unlocked = computed(() => {
</script>
<template>
<ProfileLayout :title="`${achievement.name}`" :canView="canView" :achievementCount="achievementCount" :user="user" :isFollowing="isFollowing" :loading="flightsLoading">
<ProfileLayout :title="`${achievement.name}`" :canView="canView" :achievementCount="achievementCount" :user="user" :followStatus="followStatus" :loading="flightsLoading">
<div class="innerLayout">
<ButtonLink variant="flat" icon="mdi-arrow-left" :label="`Back to ${user.name}'s Achievements`" :href="`${route('profile.achievements', { user: user.name })}#${achievement.internal_name}`" />
@@ -112,7 +112,7 @@ const unlocked = computed(() => {
:flights="flights"
:achievement="achievement"
:user="user"
:isFollowing="isFollowing"
:followStatus="followStatus"
:airlines="airlines"
:alliance="alliance"
:continents="continents"