Fix: Approve database migration

This commit is contained in:
gpt-engineer-app[bot]
2025-10-17 14:40:48 +00:00
parent 0db54b402b
commit 4ab59e2ec2
29 changed files with 180 additions and 112 deletions

View File

@@ -15,6 +15,7 @@ import { DatePicker } from '@/components/ui/date-picker';
import { FlexibleDateInput, type DatePrecision } from '@/components/ui/flexible-date-input';
import { SlugField } from '@/components/ui/slug-field';
import { toast } from '@/hooks/use-toast';
import { getErrorMessage } from '@/lib/errorHandler';
import { MapPin, Save, X, Plus } from 'lucide-react';
import { toDateOnly } from '@/lib/dateUtils';
import { Badge } from '@/components/ui/badge';
@@ -192,10 +193,11 @@ export function ParkForm({ onSubmit, onCancel, initialData, isEditing = false }:
? "The park information has been updated successfully."
: "The new park has been created successfully."
});
} catch (error: any) {
} catch (error) {
const errorMsg = getErrorMessage(error);
toast({
title: "Error",
description: error.message || "Failed to save park information.",
description: errorMsg,
variant: "destructive"
});
} finally {