mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2026-02-06 00:35:15 -05:00
Refactor: Implement complete type safety plan
This commit is contained in:
@@ -4,6 +4,14 @@
|
||||
|
||||
import { ImageAssignments } from '@/components/upload/EntityMultiImageUploader';
|
||||
|
||||
export interface UploadedImage {
|
||||
url: string;
|
||||
cloudflare_id?: string;
|
||||
file?: File;
|
||||
isLocal?: boolean;
|
||||
caption?: string;
|
||||
}
|
||||
|
||||
export interface CompanyFormData {
|
||||
name: string;
|
||||
slug: string;
|
||||
@@ -26,3 +34,17 @@ export interface TempCompanyData {
|
||||
headquarters_location?: string;
|
||||
website_url?: string;
|
||||
}
|
||||
|
||||
export interface TempRideModelData {
|
||||
name: string;
|
||||
slug: string;
|
||||
category: string;
|
||||
ride_type: string;
|
||||
description?: string;
|
||||
images?: {
|
||||
uploaded: UploadedImage[];
|
||||
banner_assignment?: number | null;
|
||||
card_assignment?: number | null;
|
||||
};
|
||||
_technical_specifications?: unknown[];
|
||||
}
|
||||
|
||||
@@ -31,8 +31,8 @@ export interface SubmissionItemData {
|
||||
id: string;
|
||||
submission_id: string;
|
||||
item_type: EntityType | 'photo' | 'ride_model';
|
||||
item_data: any;
|
||||
original_data?: any;
|
||||
item_data: Record<string, unknown>;
|
||||
original_data?: Record<string, unknown>;
|
||||
status: 'pending' | 'approved' | 'rejected';
|
||||
depends_on: string | null;
|
||||
order_index: number;
|
||||
@@ -124,3 +124,4 @@ export function createSubmissionContent(
|
||||
...referenceIds
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user