mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-22 22:31:13 -05:00
Fix: Approve database migration
This commit is contained in:
@@ -8,6 +8,7 @@ import { Textarea } from '@/components/ui/textarea';
|
||||
import { toast } from '@/hooks/use-toast';
|
||||
import { useIsMobile } from '@/hooks/use-mobile';
|
||||
import { useUserRole } from '@/hooks/useUserRole';
|
||||
import { getErrorMessage } from '@/lib/errorHandler';
|
||||
import { useAuth } from '@/hooks/useAuth';
|
||||
import { editSubmissionItem, type SubmissionItemWithDeps } from '@/lib/submissionItemsService';
|
||||
import { ParkForm } from '@/components/admin/ParkForm';
|
||||
@@ -58,10 +59,11 @@ export function ItemEditDialog({ item, open, onOpenChange, onComplete }: ItemEdi
|
||||
|
||||
onComplete();
|
||||
onOpenChange(false);
|
||||
} catch (error: any) {
|
||||
} catch (error) {
|
||||
const errorMsg = getErrorMessage(error);
|
||||
toast({
|
||||
title: 'Error',
|
||||
description: error.message || 'Failed to save changes',
|
||||
description: errorMsg,
|
||||
variant: 'destructive',
|
||||
});
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user