mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-22 16:51:13 -05:00
Fix: Pass entity IDs to image uploader
This commit is contained in:
@@ -253,13 +253,16 @@ export default function DesignerDetail() {
|
||||
<DialogContent className="max-w-4xl max-h-[90vh] overflow-y-auto">
|
||||
<DesignerForm
|
||||
initialData={{
|
||||
id: designer.id,
|
||||
name: designer.name,
|
||||
slug: designer.slug,
|
||||
description: designer.description,
|
||||
person_type: designer.person_type as any,
|
||||
website_url: designer.website_url,
|
||||
founded_year: designer.founded_year,
|
||||
headquarters_location: designer.headquarters_location
|
||||
headquarters_location: designer.headquarters_location,
|
||||
banner_image_url: designer.banner_image_url,
|
||||
card_image_url: designer.card_image_url
|
||||
}}
|
||||
onSubmit={handleEditSubmit}
|
||||
onCancel={() => setIsEditModalOpen(false)}
|
||||
|
||||
@@ -255,13 +255,16 @@ export default function ManufacturerDetail() {
|
||||
<DialogContent className="max-w-4xl max-h-[90vh] overflow-y-auto">
|
||||
<ManufacturerForm
|
||||
initialData={{
|
||||
id: manufacturer.id,
|
||||
name: manufacturer.name,
|
||||
slug: manufacturer.slug,
|
||||
description: manufacturer.description,
|
||||
person_type: manufacturer.person_type as any,
|
||||
website_url: manufacturer.website_url,
|
||||
founded_year: manufacturer.founded_year,
|
||||
headquarters_location: manufacturer.headquarters_location
|
||||
headquarters_location: manufacturer.headquarters_location,
|
||||
banner_image_url: manufacturer.banner_image_url,
|
||||
card_image_url: manufacturer.card_image_url
|
||||
}}
|
||||
onSubmit={handleEditSubmit}
|
||||
onCancel={() => setIsEditModalOpen(false)}
|
||||
|
||||
@@ -253,13 +253,16 @@ export default function OperatorDetail() {
|
||||
<DialogContent className="max-w-4xl max-h-[90vh] overflow-y-auto">
|
||||
<OperatorForm
|
||||
initialData={{
|
||||
id: operator.id,
|
||||
name: operator.name,
|
||||
slug: operator.slug,
|
||||
description: operator.description,
|
||||
person_type: operator.person_type as any,
|
||||
website_url: operator.website_url,
|
||||
founded_year: operator.founded_year,
|
||||
headquarters_location: operator.headquarters_location
|
||||
headquarters_location: operator.headquarters_location,
|
||||
banner_image_url: operator.banner_image_url,
|
||||
card_image_url: operator.card_image_url
|
||||
}}
|
||||
onSubmit={handleEditSubmit}
|
||||
onCancel={() => setIsEditModalOpen(false)}
|
||||
|
||||
@@ -646,6 +646,7 @@ export default function ParkDetail() {
|
||||
onSubmit={handleEditParkSubmit}
|
||||
onCancel={() => setIsEditParkModalOpen(false)}
|
||||
initialData={{
|
||||
id: park?.id,
|
||||
name: park?.name,
|
||||
slug: park?.slug,
|
||||
description: park?.description,
|
||||
@@ -657,7 +658,9 @@ export default function ParkDetail() {
|
||||
phone: park?.phone,
|
||||
email: park?.email,
|
||||
operator_id: park?.operator?.id,
|
||||
property_owner_id: park?.property_owner?.id
|
||||
property_owner_id: park?.property_owner?.id,
|
||||
banner_image_url: park?.banner_image_url,
|
||||
card_image_url: park?.card_image_url
|
||||
}}
|
||||
isEditing={true}
|
||||
/>
|
||||
|
||||
@@ -253,13 +253,16 @@ export default function PropertyOwnerDetail() {
|
||||
<DialogContent className="max-w-4xl max-h-[90vh] overflow-y-auto">
|
||||
<PropertyOwnerForm
|
||||
initialData={{
|
||||
id: owner.id,
|
||||
name: owner.name,
|
||||
slug: owner.slug,
|
||||
description: owner.description,
|
||||
person_type: owner.person_type as any,
|
||||
website_url: owner.website_url,
|
||||
founded_year: owner.founded_year,
|
||||
headquarters_location: owner.headquarters_location
|
||||
headquarters_location: owner.headquarters_location,
|
||||
banner_image_url: owner.banner_image_url,
|
||||
card_image_url: owner.card_image_url
|
||||
}}
|
||||
onSubmit={handleEditSubmit}
|
||||
onCancel={() => setIsEditModalOpen(false)}
|
||||
|
||||
@@ -749,6 +749,7 @@ export default function RideDetail() {
|
||||
{ride && (
|
||||
<RideForm
|
||||
initialData={{
|
||||
id: ride.id,
|
||||
name: ride.name,
|
||||
slug: ride.slug,
|
||||
description: ride.description,
|
||||
@@ -771,7 +772,9 @@ export default function RideDetail() {
|
||||
drop_height_meters: ride.drop_height_meters,
|
||||
max_g_force: ride.max_g_force,
|
||||
manufacturer_id: ride.manufacturer?.id,
|
||||
ride_model_id: ride.ride_model?.id
|
||||
ride_model_id: ride.ride_model?.id,
|
||||
banner_image_url: ride.banner_image_url,
|
||||
card_image_url: ride.card_image_url
|
||||
}}
|
||||
onSubmit={handleEditSubmit}
|
||||
onCancel={() => setIsEditModalOpen(false)}
|
||||
|
||||
@@ -21,6 +21,10 @@ export interface Company {
|
||||
founded_year?: number;
|
||||
headquarters_location?: string;
|
||||
logo_url?: string;
|
||||
banner_image_url?: string;
|
||||
banner_image_id?: string;
|
||||
card_image_url?: string;
|
||||
card_image_id?: string;
|
||||
average_rating: number;
|
||||
review_count: number;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user