mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-22 04:11:13 -05:00
feat: Implement Phase 1 Frontend Code Cleanup
This commit is contained in:
@@ -56,11 +56,6 @@ const rideSchema = z.object({
|
||||
intensity_level: z.string().optional(),
|
||||
drop_height_meters: z.number().optional(),
|
||||
max_g_force: z.number().optional(),
|
||||
// ⚠️ DEPRECATED - These legacy JSON fields should not be used
|
||||
// Use relational tables instead: ride_technical_specifications, ride_coaster_statistics, ride_name_history
|
||||
former_names: z.string().optional(),
|
||||
coaster_stats: z.string().optional(),
|
||||
technical_specs: z.string().optional(),
|
||||
// Manufacturer and model
|
||||
manufacturer_id: z.string().uuid().optional(),
|
||||
ride_model_id: z.string().uuid().optional(),
|
||||
@@ -221,9 +216,6 @@ export function RideForm({ onSubmit, onCancel, initialData, isEditing = false }:
|
||||
? convertValueFromMetric(initialData.drop_height_meters, getDisplayUnit('m', measurementSystem), 'm')
|
||||
: undefined,
|
||||
max_g_force: initialData?.max_g_force || undefined,
|
||||
former_names: initialData?.former_names || '',
|
||||
coaster_stats: initialData?.coaster_stats || '',
|
||||
technical_specs: initialData?.technical_specs || '',
|
||||
manufacturer_id: initialData?.manufacturer_id || undefined,
|
||||
ride_model_id: initialData?.ride_model_id || undefined,
|
||||
images: { uploaded: [] }
|
||||
@@ -258,11 +250,6 @@ export function RideForm({ onSubmit, onCancel, initialData, isEditing = false }:
|
||||
drop_height_meters: data.drop_height_meters
|
||||
? convertValueToMetric(data.drop_height_meters, getDisplayUnit('m', measurementSystem))
|
||||
: undefined,
|
||||
// ⚠️ Remove JSON stringification - use relational tables instead
|
||||
// These fields are deprecated and should not be set
|
||||
technical_specs: undefined,
|
||||
coaster_stats: undefined,
|
||||
former_names: undefined,
|
||||
// Pass relational data for proper handling
|
||||
_technical_specifications: technicalSpecs,
|
||||
_coaster_statistics: coasterStats,
|
||||
|
||||
Reference in New Issue
Block a user