- Backend migrado a estructura VPS (src/ subfolder) - Frontend con estructura Vite + React 19 + Tailwind - Configuración PostgreSQL con Pool - API service con interceptores JWT - Ambos servidores funcionando (backend:3001, frontend:5173)
143 lines
6.2 KiB
JavaScript
143 lines
6.2 KiB
JavaScript
import { Settings, Store, CreditCard, Bell, Shield, Database } from 'lucide-react';
|
|
|
|
export default function SettingsPage() {
|
|
return (
|
|
<div className="space-y-6">
|
|
{/* Header */}
|
|
<div>
|
|
<h1 className="text-2xl font-bold text-gray-800">Configuración</h1>
|
|
<p className="text-gray-600 mt-1">Ajustes generales del sistema</p>
|
|
</div>
|
|
|
|
{/* Settings Grid */}
|
|
<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
|
|
{/* Información General */}
|
|
<div className="bg-white rounded-lg shadow p-6">
|
|
<div className="flex items-center gap-3 mb-4">
|
|
<Store size={24} className="text-blue-600" />
|
|
<h2 className="text-lg font-semibold text-gray-800">Información de la Tienda</h2>
|
|
</div>
|
|
<div className="space-y-3">
|
|
<div>
|
|
<label className="block text-sm text-gray-600 mb-1">Nombre de la tienda</label>
|
|
<input
|
|
type="text"
|
|
defaultValue="OfertaWeb"
|
|
className="w-full px-3 py-2 border border-gray-300 rounded-lg"
|
|
disabled
|
|
/>
|
|
</div>
|
|
<div>
|
|
<label className="block text-sm text-gray-600 mb-1">Email de contacto</label>
|
|
<input
|
|
type="email"
|
|
defaultValue="contacto@ofertaweb.cl"
|
|
className="w-full px-3 py-2 border border-gray-300 rounded-lg"
|
|
disabled
|
|
/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
{/* Métodos de Pago */}
|
|
<div className="bg-white rounded-lg shadow p-6">
|
|
<div className="flex items-center gap-3 mb-4">
|
|
<CreditCard size={24} className="text-green-600" />
|
|
<h2 className="text-lg font-semibold text-gray-800">Métodos de Pago</h2>
|
|
</div>
|
|
<div className="space-y-3">
|
|
<div className="flex items-center justify-between p-3 bg-gray-50 rounded">
|
|
<span className="text-sm font-medium">Webpay/Transbank</span>
|
|
<span className="px-3 py-1 bg-gray-200 text-gray-700 rounded-full text-xs">
|
|
No configurado
|
|
</span>
|
|
</div>
|
|
<div className="flex items-center justify-between p-3 bg-gray-50 rounded">
|
|
<span className="text-sm font-medium">Transferencia Bancaria</span>
|
|
<span className="px-3 py-1 bg-gray-200 text-gray-700 rounded-full text-xs">
|
|
No configurado
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
{/* Notificaciones */}
|
|
<div className="bg-white rounded-lg shadow p-6">
|
|
<div className="flex items-center gap-3 mb-4">
|
|
<Bell size={24} className="text-yellow-600" />
|
|
<h2 className="text-lg font-semibold text-gray-800">Notificaciones</h2>
|
|
</div>
|
|
<div className="space-y-3">
|
|
<label className="flex items-center gap-3">
|
|
<input type="checkbox" defaultChecked className="rounded" disabled />
|
|
<span className="text-sm text-gray-700">Email por nueva orden</span>
|
|
</label>
|
|
<label className="flex items-center gap-3">
|
|
<input type="checkbox" defaultChecked className="rounded" disabled />
|
|
<span className="text-sm text-gray-700">Alerta de stock bajo</span>
|
|
</label>
|
|
<label className="flex items-center gap-3">
|
|
<input type="checkbox" className="rounded" disabled />
|
|
<span className="text-sm text-gray-700">Reportes semanales</span>
|
|
</label>
|
|
</div>
|
|
</div>
|
|
|
|
{/* Seguridad */}
|
|
<div className="bg-white rounded-lg shadow p-6">
|
|
<div className="flex items-center gap-3 mb-4">
|
|
<Shield size={24} className="text-red-600" />
|
|
<h2 className="text-lg font-semibold text-gray-800">Seguridad</h2>
|
|
</div>
|
|
<div className="space-y-3">
|
|
<button className="w-full text-left px-3 py-2 bg-gray-50 rounded hover:bg-gray-100 transition-colors text-sm">
|
|
Cambiar contraseña
|
|
</button>
|
|
<button className="w-full text-left px-3 py-2 bg-gray-50 rounded hover:bg-gray-100 transition-colors text-sm">
|
|
Gestionar usuarios
|
|
</button>
|
|
<button className="w-full text-left px-3 py-2 bg-gray-50 rounded hover:bg-gray-100 transition-colors text-sm">
|
|
Tokens de API
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
{/* Base de Datos */}
|
|
<div className="bg-white rounded-lg shadow p-6 md:col-span-2">
|
|
<div className="flex items-center gap-3 mb-4">
|
|
<Database size={24} className="text-purple-600" />
|
|
<h2 className="text-lg font-semibold text-gray-800">Base de Datos</h2>
|
|
</div>
|
|
<div className="grid grid-cols-1 md:grid-cols-3 gap-4">
|
|
<div className="p-4 bg-gray-50 rounded">
|
|
<div className="text-2xl font-bold text-gray-800 mb-1">PostgreSQL</div>
|
|
<div className="text-sm text-gray-600">Servidor de base de datos</div>
|
|
</div>
|
|
<div className="p-4 bg-gray-50 rounded">
|
|
<div className="text-2xl font-bold text-gray-800 mb-1">ofertaweb</div>
|
|
<div className="text-sm text-gray-600">Nombre de la base de datos</div>
|
|
</div>
|
|
<div className="p-4 bg-gray-50 rounded">
|
|
<div className="text-2xl font-bold text-green-600 mb-1">Conectado</div>
|
|
<div className="text-sm text-gray-600">Estado de conexión</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
{/* Info */}
|
|
<div className="bg-blue-50 border border-blue-200 rounded-lg p-4">
|
|
<div className="flex items-start gap-3">
|
|
<Settings size={20} className="text-blue-600 flex-shrink-0 mt-0.5" />
|
|
<div>
|
|
<h3 className="font-medium text-blue-900 mb-1">Configuración en Desarrollo</h3>
|
|
<p className="text-sm text-blue-700">
|
|
Esta sección está en construcción. Las configuraciones se cargarán desde variables de entorno y base de datos.
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|