Fix submission flow for street address

Update submission and moderation pipeline to correctly handle `street_address`. This includes:
- Adding `street_address` to the Zod schema in `ParkForm.tsx`.
- Ensuring `street_address` is included in `tempLocationData` for park and composite park creations in `entitySubmissionHelpers.ts`.
- Preserving `street_address` when editing submissions in `submissionItemsService.ts`.
- Saving `street_address` when new locations are created during submission approval in `submissionItemsService.ts`.
This commit is contained in:
gpt-engineer-app[bot]
2025-11-06 14:15:45 +00:00
parent fc7c2d5adc
commit 9159b2ce89
3 changed files with 6 additions and 0 deletions

View File

@@ -712,6 +712,7 @@ async function resolveLocationId(locationData: any): Promise<string | null> {
.from('locations')
.insert({
name: locationData.name,
street_address: locationData.street_address || null,
city: locationData.city || null,
state_province: locationData.state_province || null,
country: locationData.country,
@@ -1477,6 +1478,7 @@ export async function editSubmissionItem(
if (newData.location) {
updateData.temp_location_data = {
name: newData.location.name,
street_address: newData.location.street_address || null,
city: newData.location.city || null,
state_province: newData.location.state_province || null,
country: newData.location.country,