diff --git a/src/modules/activities/components/CreateEventDialog.vue b/src/modules/activities/components/CreateEventDialog.vue index 7f39fc0..c2c1f45 100644 --- a/src/modules/activities/components/CreateEventDialog.vue +++ b/src/modules/activities/components/CreateEventDialog.vue @@ -24,6 +24,7 @@ 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 { ScrollArea } from '@/components/ui/scroll-area' import { Select, @@ -120,6 +121,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), }) @@ -150,6 +153,8 @@ const form = useForm({ event_end_time: '', location: '', currency: 'sat', + allow_fiat: false, + fiat_currency: 'USD', amount_tickets: 0, price_per_ticket: 0, } @@ -213,6 +218,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, }) @@ -318,6 +325,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 @@ -591,6 +602,46 @@ const handleOpenChange = (open: boolean) => { + +
+ + +
+ Accept fiat payments + + Buyers can pay with the LNbits instance's configured fiat provider (e.g. Stripe). + +
+ + + +
+
+ + + + Fiat currency + + + + + + +
+