mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-22 17:11:23 -05:00
Implement plan to remove public toggle
This commit is contained in:
@@ -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}>
|
||||
|
||||
Reference in New Issue
Block a user