Added achievement data

This commit is contained in:
2026-04-28 22:16:21 +10:00
parent 14aed7bf6e
commit b94b1d8ec2
43 changed files with 1559 additions and 130 deletions
+70 -3
View File
@@ -8,9 +8,9 @@ declare module '@vue/runtime-core' {
}
}
export type ProfileView = 'map' | 'board' | 'passes' ;
export type ProfileView = 'map' | 'board' | 'passes' | 'achievements' ;
export type ChartType = "line" | "area" | "bar" | "pie" | "donut" | "radialBar" | "scatter" | "bubble" | "heatmap" | "candlestick" | "boxPlot" | "radar" | "polarArea" | "rangeBar" | "rangeArea" | "treemap" | undefined
export type BadgeVariant = 'first' | 'business' | 'premium' | 'economy' | 'private' | 'unspecified' | 'generic' | 'general_aviation' | 'crew'
export type BadgeVariant = 'first' | 'business' | 'premium' | 'economy' | 'private' | 'unspecified' | 'generic' | 'general_aviation' | 'crew' | "easy" | "moderate" | "hard" | "expensive" | "near-impossible" | "impossible"
export interface User {
id: number
@@ -19,7 +19,7 @@ export interface User {
email_verified_at: string | null
}
export type UserActionType = "flight_cancelled" | "flight_booked" | "flight_updated" | "flight_logged" | "flight_deleted"
export type UserActionType = "flight_cancelled" | "flight_booked" | "flight_updated" | "flight_logged" | "flight_deleted" | "flight_imported"
export type UserActionDataKey = "field" | "from" | "to"
export type UserActionFlightBookedData = {
@@ -39,6 +39,12 @@ export type UserActionFlightUpdatedData = {
export type UserActionChange = {field: string, from: string, to: string}
export type UserActionData = UserActionFlightBookedData | UserActionFlightCancelledData | UserActionFlightUpdatedData
export interface Alliance {
id: number
name: string
internal_name: string
}
export interface UserAction {
id: number
user_id: number
@@ -57,6 +63,65 @@ export type SharedProps = import('@inertiajs/core').PageProps & {
isLoggedIn: boolean
},
logo_api_url: string
achievement_notifications: Notification[]
}
export interface AchievementDifficulty {
id: number
internal_name: string
name: string
description: string
created_at: string | null
updated_at: string | null
}
export interface AchievementCategory {
id: number
internal_name: string
name: string
description: string
created_at: string | null
updated_at: string | null
}
export interface Achievement {
id: number
name: string
internal_name: string
icon: string
short_description: string
long_description: string
progressive: boolean
difficulty_description: string | null
threshold: number | null
achievement_category_id: number
achievement_difficulty_id: number
category?: AchievementCategory
difficulty?: AchievementDifficulty
}
export interface UserAchievement {
id: number
user_id: number
achievement_id: number
progress: number | null
achievement?: Achievement
created_at: string | null
updated_at: string | null
}
export interface Notification {
id: number
user_id: number
title: string
body: string
url: string | null
is_achievement: boolean
achievement_id: number | null
achievement?: Achievement | null
read_at: string | null
expires_at: string | null
created_at: string | null
updated_at: string | null
}
export interface Region {
@@ -121,6 +186,8 @@ export interface Airline {
country?: Country
display_name: string
logo_url: string
alliance_id: number | null,
alliance?: Alliance,
}
export interface Aircraft {