feat: add automated PDF invoice generation and storage in Supabase

This commit is contained in:
DanielS
2026-05-01 00:52:37 +02:00
parent 17d5a78467
commit 9c0164c4fe
3 changed files with 241 additions and 8 deletions

View File

@@ -0,0 +1,9 @@
-- Create bucket for invoices
INSERT INTO storage.buckets (id, name, public)
VALUES ('invoices', 'invoices', true)
ON CONFLICT (id) DO NOTHING;
-- Policies for invoices bucket
-- Allow public access to invoices (simplified for this demo, usually should be restricted)
CREATE POLICY "Public Access" ON storage.objects FOR SELECT USING (bucket_id = 'invoices');
CREATE POLICY "Authenticated Upload" ON storage.objects FOR INSERT WITH CHECK (bucket_id = 'invoices' AND auth.role() = 'authenticated');