Implement plan to remove public toggle

This commit is contained in:
gpt-engineer-app[bot]
2025-10-15 19:48:19 +00:00
parent 625ba1a8e2
commit c79658b3e5
5 changed files with 17 additions and 30 deletions

View File

@@ -41,7 +41,7 @@ import { Input } from '@/components/ui/input';
import { Textarea } from '@/components/ui/textarea';
import { Button } from '@/components/ui/button';
import { DatePicker } from '@/components/ui/date-picker';
import { Switch } from '@/components/ui/switch';
import { Loader2, Trash } from 'lucide-react';
import { useAuth } from '@/hooks/useAuth';
import { useToast } from '@/hooks/use-toast';
@@ -129,14 +129,12 @@ export function TimelineEventEditorDialog({
to_entity_id: existingEvent.to_entity_id || '',
from_location_id: existingEvent.from_location_id || '',
to_location_id: existingEvent.to_location_id || '',
is_public: existingEvent.is_public,
} : {
event_type: 'milestone',
event_date: new Date(),
event_date_precision: 'day',
title: '',
description: '',
is_public: true,
},
});
@@ -386,27 +384,6 @@ export function TimelineEventEditorDialog({
)}
/>
<FormField
control={form.control}
name="is_public"
render={({ field }) => (
<FormItem className="flex flex-row items-center justify-between rounded-lg border p-4">
<div className="space-y-0.5">
<FormLabel className="text-base">Public Event</FormLabel>
<FormDescription>
Make this event visible to all users
</FormDescription>
</div>
<FormControl>
<Switch
checked={field.value}
onCheckedChange={field.onChange}
/>
</FormControl>
</FormItem>
)}
/>
<DialogFooter className="gap-3 sm:gap-0">
{isEditing && existingEvent?.approved_by === null && (
<AlertDialog open={showDeleteConfirm} onOpenChange={setShowDeleteConfirm}>