Initial commit: Wedding Hall Automation System with Next.js, Supabase, and Modern UI

This commit is contained in:
2025-12-03 21:29:53 +03:00
commit ee68deb4ce
70 changed files with 13038 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
'use server'
import { createClient } from "@/lib/supabase/server"
import { revalidatePath } from "next/cache"
export async function createPackage(data: { name: string; price: number; description?: string; is_active: boolean }) {
const supabase = await createClient()
const { error } = await supabase.from('packages').insert({
name: data.name,
price: data.price,
description: data.description,
is_active: data.is_active,
})
if (error) {
throw new Error(error.message)
}
revalidatePath('/dashboard/settings/packages')
}