From b63da103cdd07fb517cec27f39ea80770741803e Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Fri, 19 Dec 2025 14:43:28 +0000 Subject: [PATCH] Changes --- src/components/AppLayout.tsx | 22 ++- src/components/RichTextEditor.tsx | 9 +- .../admin/settings/NotifikasiTab.tsx | 37 +++- src/pages/Admin.tsx | 4 +- src/pages/ConsultingBooking.tsx | 9 +- src/pages/admin/AdminProducts.tsx | 18 +- supabase/config.toml | 22 +++ supabase/functions/send-test-email/index.ts | 179 ++++++++++++++++++ 8 files changed, 265 insertions(+), 35 deletions(-) create mode 100644 supabase/config.toml create mode 100644 supabase/functions/send-test-email/index.ts diff --git a/src/components/AppLayout.tsx b/src/components/AppLayout.tsx index 4ee5392..48e9eab 100644 --- a/src/components/AppLayout.tsx +++ b/src/components/AppLayout.tsx @@ -20,6 +20,7 @@ import { Home, MoreHorizontal, X, + Video, } from 'lucide-react'; interface NavItem { @@ -40,6 +41,7 @@ const adminNavItems: NavItem[] = [ { label: 'Dashboard', href: '/admin', icon: LayoutDashboard }, { label: 'Produk', href: '/admin/products', icon: Package }, { label: 'Bootcamp', href: '/admin/bootcamp', icon: BookOpen }, + { label: 'Konsultasi', href: '/admin/consulting', icon: Video }, { label: 'Order', href: '/admin/orders', icon: Receipt }, { label: 'Member', href: '/admin/members', icon: Users }, { label: 'Kalender', href: '/admin/events', icon: Calendar }, @@ -152,15 +154,17 @@ export function AppLayout({ children }: AppLayoutProps) {
- - - Keranjang - {items.length > 0 && ( - - {items.length} - - )} - + {!isAdmin && ( + + + Keranjang + {items.length > 0 && ( + + {items.length} + + )} + + )}
diff --git a/src/pages/Admin.tsx b/src/pages/Admin.tsx index 752723d..e1ec578 100644 --- a/src/pages/Admin.tsx +++ b/src/pages/Admin.tsx @@ -20,7 +20,7 @@ import { CurriculumEditor } from '@/components/admin/CurriculumEditor'; interface Product { id: string; title: string; slug: string; type: string; description: string; content: string; meeting_link: string | null; recording_url: string | null; price: number; sale_price: number | null; is_active: boolean; } -const emptyProduct = { title: '', slug: '', type: 'consulting', description: '', content: '', meeting_link: '', recording_url: '', price: 0, sale_price: null as number | null, is_active: true }; +const emptyProduct = { title: '', slug: '', type: 'webinar', description: '', content: '', meeting_link: '', recording_url: '', price: 0, sale_price: null as number | null, is_active: true }; export default function Admin() { const { user, isAdmin, loading: authLoading } = useAuth(); @@ -102,7 +102,7 @@ export default function Admin() {
setForm({ ...form, title: e.target.value, slug: generateSlug(e.target.value) })} className="border-2" />
setForm({ ...form, slug: e.target.value })} className="border-2" />
-
+