diff --git a/src/modules/activities/components/CreateEventDialog.vue b/src/modules/activities/components/CreateEventDialog.vue index e42c9f2..180184b 100644 --- a/src/modules/activities/components/CreateEventDialog.vue +++ b/src/modules/activities/components/CreateEventDialog.vue @@ -24,9 +24,6 @@ import { Input } from '@/components/ui/input' import { Textarea } from '@/components/ui/textarea' import { Button } from '@/components/ui/button' import { Badge } from '@/components/ui/badge' -import { Switch } from '@/components/ui/switch' -import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '@/components/ui/collapsible' -import { Bell, ChevronDown } from 'lucide-vue-next' import { ScrollArea } from '@/components/ui/scroll-area' import { Select, @@ -101,14 +98,8 @@ const formSchema = toTypedSchema( event_end_time: z.string().optional().default(''), location: z.string().max(500).optional().default(''), currency: z.string().default("sat"), - allow_fiat: z.boolean().default(false), - fiat_currency: z.string().default("USD"), amount_tickets: z.number().min(0).max(100000).default(0), price_per_ticket: z.number().min(0).default(0), - email_notifications: z.boolean().default(false), - nostr_notifications: z.boolean().default(false), - notification_subject: z.string().max(200).default(''), - notification_body: z.string().max(2000).default(''), }) .superRefine((v, ctx) => { // End must not precede start. Compare on the folded date+time @@ -137,14 +128,8 @@ const form = useForm({ event_end_time: '', location: '', currency: 'sat', - allow_fiat: false, - fiat_currency: 'USD', amount_tickets: 0, price_per_ticket: 0, - email_notifications: false, - nostr_notifications: false, - notification_subject: '', - notification_body: '', } }) @@ -164,7 +149,6 @@ function splitDateTime(value: string | null | undefined): { date: string; time: // When `true`, suppress the auto-mirror watcher so we don't clobber an // edit-mode population with start-date side effects mid-setValues. const isPopulating = ref(false) -const notificationsOpen = ref(false) // Auto-mirror end date to start: when the user picks a start date, // surface that same date in the end-date picker so a one-day event @@ -204,14 +188,8 @@ async function populateFromEvent(event: TicketedEvent) { event_end_time: end.time, location: event.location ?? '', currency: event.currency ?? 'sat', - allow_fiat: event.allow_fiat ?? false, - fiat_currency: event.fiat_currency ?? 'USD', amount_tickets: event.amount_tickets ?? 0, price_per_ticket: event.price_per_ticket ?? 0, - email_notifications: event.extra?.email_notifications ?? false, - nostr_notifications: event.extra?.nostr_notifications ?? false, - notification_subject: event.extra?.notification_subject ?? '', - notification_body: event.extra?.notification_body ?? '', }) selectedCategories.value = [...(event.categories ?? [])] if (event.banner) { @@ -317,26 +295,10 @@ const onSubmit = form.handleSubmit(async (formValues) => { eventData.banner = null } if (formValues.currency) eventData.currency = formValues.currency - // allow_fiat / fiat_currency: always send so the toggle reads - // both directions on edit (a true→false flip must propagate). - eventData.allow_fiat = formValues.allow_fiat - if (formValues.fiat_currency) eventData.fiat_currency = formValues.fiat_currency if (formValues.amount_tickets) eventData.amount_tickets = formValues.amount_tickets if (formValues.price_per_ticket) eventData.price_per_ticket = formValues.price_per_ticket if (selectedCategories.value.length > 0) eventData.categories = selectedCategories.value - // Notification config goes inside the `extra` envelope. On edit - // overlay onto the existing event.extra so unrelated fields the - // LNbits admin UI sets (promo_codes, conditional, min_tickets) - // survive the round-trip. - eventData.extra = { - ...(props.event?.extra ?? {}), - email_notifications: formValues.email_notifications, - nostr_notifications: formValues.nostr_notifications, - notification_subject: formValues.notification_subject, - notification_body: formValues.notification_body, - } - if (isEditMode.value) { if (!props.onUpdateEvent || !props.event?.id) { toastService.error('Update handler missing') @@ -606,108 +568,6 @@ const handleOpenChange = (open: boolean) => { - -