From dd051b1e735b5a96c3dbc416407b3083ad69294b Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Fri, 10 Oct 2025 23:54:41 +0000 Subject: [PATCH] Add Commerce module and enhance Admin Panel sections --- src/App.tsx | 9 + src/components/DashboardLayout.tsx | 4 +- src/components/admin/ContentTab.tsx | 227 ++++++++++++- .../establishments/BusinessAnalytics.tsx | 85 +++++ .../establishments/BusinessCategories.tsx | 47 +++ .../establishments/BusinessList.tsx | 306 ++++++++++++++++++ .../establishments/BusinessVerification.tsx | 98 ++++++ src/pages/dashboard/Establishments.tsx | 52 +++ 8 files changed, 821 insertions(+), 7 deletions(-) create mode 100644 src/components/establishments/BusinessAnalytics.tsx create mode 100644 src/components/establishments/BusinessCategories.tsx create mode 100644 src/components/establishments/BusinessList.tsx create mode 100644 src/components/establishments/BusinessVerification.tsx create mode 100644 src/pages/dashboard/Establishments.tsx diff --git a/src/App.tsx b/src/App.tsx index aa75372..89b82b3 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -38,6 +38,7 @@ import Personalization from "./pages/dashboard/Personalization"; import Security from "./pages/dashboard/Security"; import VehicleManagement from "./pages/dashboard/VehicleManagement"; import Sustainability from "./pages/dashboard/Sustainability"; +import Establishments from "./pages/dashboard/Establishments"; // Hotel pages import HotelRooms from "./pages/dashboard/hotel/Rooms"; import HotelCheckIn from "./pages/dashboard/hotel/CheckIn"; @@ -284,6 +285,14 @@ const AppRouter = () => ( } /> + + + + + + } /> + diff --git a/src/components/DashboardLayout.tsx b/src/components/DashboardLayout.tsx index 744000f..0f44dae 100644 --- a/src/components/DashboardLayout.tsx +++ b/src/components/DashboardLayout.tsx @@ -54,7 +54,8 @@ import { Shield, Radio, Sparkles, - Leaf + Leaf, + Store } from 'lucide-react'; const DashboardLayout = ({ children }: { children: React.ReactNode }) => { @@ -159,6 +160,7 @@ const DashboardLayout = ({ children }: { children: React.ReactNode }) => { { icon: Shield, label: 'Security', path: '/dashboard/security' }, { icon: Car, label: 'Vehicle Management', path: '/dashboard/vehicle-management' }, { icon: Leaf, label: 'Sustainability', path: '/dashboard/sustainability' }, + { icon: Store, label: 'Comercios', path: '/dashboard/establishments' }, { icon: Wallet, label: 'Wallet', path: '/dashboard/wallet' }, { icon: MessageSquare, label: 'Message', path: '/dashboard/messages', badge: '2' }, ]; diff --git a/src/components/admin/ContentTab.tsx b/src/components/admin/ContentTab.tsx index f55275f..9f55e9e 100644 --- a/src/components/admin/ContentTab.tsx +++ b/src/components/admin/ContentTab.tsx @@ -539,9 +539,93 @@ const ContentTab: React.FC = ({ isSuperAdmin, activeSubTab = 'd

Gestión de Guías Turísticos

- - {Array.isArray(guides) ? guides.length : 0} Guías Registrados - + + + + + + + Crear Nuevo Guía + +
+
+ + setNewGuide({ ...newGuide, licenseNumber: e.target.value })} + placeholder="Ej: GUIDE-2024-001" + /> +
+
+ + setNewGuide({ + ...newGuide, + specialties: e.target.value.split(',').map(s => s.trim()) + })} + placeholder="Historia, Naturaleza, Aventura" + /> +
+
+ + setNewGuide({ + ...newGuide, + languages: e.target.value.split(',').map(l => l.trim()) + })} + placeholder="Español, Inglés, Francés" + /> +
+
+
+ + setNewGuide({ ...newGuide, hourlyRate: parseFloat(e.target.value) || 0 })} + /> +
+
+ + setNewGuide({ ...newGuide, dailyRate: parseFloat(e.target.value) || 0 })} + /> +
+
+
+ +