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