mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-21 19:31:14 -05:00
feat: Implement photo selection for entity edit forms
This commit is contained in:
@@ -45,7 +45,11 @@ type DesignerFormData = z.infer<typeof designerSchema>;
|
||||
interface DesignerFormProps {
|
||||
onSubmit: (data: DesignerFormData) => void;
|
||||
onCancel: () => void;
|
||||
initialData?: Partial<DesignerFormData>;
|
||||
initialData?: Partial<DesignerFormData & {
|
||||
id?: string;
|
||||
banner_image_url?: string;
|
||||
card_image_url?: string;
|
||||
}>;
|
||||
}
|
||||
|
||||
export function DesignerForm({ onSubmit, onCancel, initialData }: DesignerFormProps) {
|
||||
@@ -193,6 +197,9 @@ export function DesignerForm({ onSubmit, onCancel, initialData }: DesignerFormPr
|
||||
value={watch('images') || { uploaded: [] }}
|
||||
onChange={(images) => setValue('images', images)}
|
||||
entityType="designer"
|
||||
entityId={initialData?.id}
|
||||
currentBannerUrl={initialData?.banner_image_url}
|
||||
currentCardUrl={initialData?.card_image_url}
|
||||
/>
|
||||
|
||||
{/* Actions */}
|
||||
|
||||
Reference in New Issue
Block a user