Sms Rehber eklemesi,Mobil uyumluluk ayarları,iletişim sayfası düzenlemeler vb.

This commit is contained in:
2026-01-30 00:09:16 +03:00
parent 5fdb7592e7
commit d320787df6
20 changed files with 800 additions and 101 deletions

View File

@@ -0,0 +1,5 @@
-- Add product_code to products table
ALTER TABLE public.products ADD COLUMN IF NOT EXISTS product_code TEXT;
-- Create an index for faster lookups if needed (optional but good practice)
-- CREATE INDEX IF NOT EXISTS idx_products_product_code ON public.products(product_code);

View File

@@ -0,0 +1,14 @@
-- SMS TEMPLATES
CREATE TABLE IF NOT EXISTS public.sms_templates (
id UUID DEFAULT gen_random_uuid() PRIMARY KEY,
title TEXT NOT NULL,
message TEXT NOT NULL,
created_at TIMESTAMP WITH TIME ZONE DEFAULT timezone('utc'::text, now()) NOT NULL
);
-- RLS Policies for SMS Templates
ALTER TABLE public.sms_templates ENABLE ROW LEVEL SECURITY;
CREATE POLICY "Admins can full access sms templates" ON public.sms_templates USING (
EXISTS (SELECT 1 FROM public.profiles WHERE profiles.id = auth.uid() AND profiles.role = 'admin')
);