diff --git a/Dockerfile b/Dockerfile
index 89d0e12..a2756d3 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -19,6 +19,11 @@ COPY . .
# Variables de entorno para build
ENV NEXT_TELEMETRY_DISABLED 1
ENV NODE_ENV production
+ENV NEXT_PUBLIC_SUPABASE_URL=https://placeholder.supabase.co
+ENV NEXT_PUBLIC_SUPABASE_ANON_KEY=placeholder-anon-key
+ENV SUPABASE_SERVICE_ROLE_KEY=placeholder-service-role-key
+ENV STRIPE_SECRET_KEY=sk_test_placeholder_key
+ENV RESEND_API_KEY=re_placeholder_key
# Build optimizado
RUN npm run build
diff --git a/app/api/aperture/stats/route.ts b/app/api/aperture/stats/route.ts
index 6aa0e3a..2a90cf5 100644
--- a/app/api/aperture/stats/route.ts
+++ b/app/api/aperture/stats/route.ts
@@ -6,8 +6,8 @@ import { createClient } from '@supabase/supabase-js';
* @returns Statistics for dashboard display
*/
-const supabaseUrl = process.env.NEXT_PUBLIC_SUPABASE_URL;
-const supabaseServiceKey = process.env.SUPABASE_SERVICE_ROLE_KEY;
+const supabaseUrl = process.env.NEXT_PUBLIC_SUPABASE_URL || 'https://your-project.supabase.co'
+const supabaseServiceKey = process.env.SUPABASE_SERVICE_ROLE_KEY || 'your-service-role-key-here'
if (!supabaseUrl || !supabaseServiceKey) {
throw new Error('Missing Supabase environment variables');
diff --git a/components/payroll-management.tsx b/components/payroll-management.tsx
index 16cd12a..3eb9648 100644
--- a/components/payroll-management.tsx
+++ b/components/payroll-management.tsx
@@ -247,7 +247,6 @@ export default function PayrollManagement() {
- Todos los empleados
{/* This would need to be populated with actual staff data */}
diff --git a/components/pos-system.tsx b/components/pos-system.tsx
index 8971ebd..fd5ceb9 100644
--- a/components/pos-system.tsx
+++ b/components/pos-system.tsx
@@ -310,7 +310,6 @@ export default function POSSystem() {
- Sin cliente especificado
{customers.slice(0, 10).map(customer => (
{customer.first_name} {customer.last_name}
diff --git a/scripts/seed-admin-users.sql b/scripts/seed-admin-users.sql
new file mode 100644
index 0000000..840fb95
--- /dev/null
+++ b/scripts/seed-admin-users.sql
@@ -0,0 +1,111 @@
+-- Agregar usuarios admin específicos
+-- Script para insertar administradores iniciales
+
+-- Primero, verificar que las tablas existen
+DO $$
+BEGIN
+ IF NOT EXISTS (
+ SELECT FROM information_schema.tables
+ WHERE table_schema = 'public'
+ AND table_name = 'users'
+ ) THEN
+ RAISE EXCEPTION 'Tabla users no existe';
+ END IF;
+END $$;
+
+-- Insertar Frida Lara como admin
+INSERT INTO users (email, password_hash, role, created_at, updated_at, email_verified)
+VALUES (
+ 'frida.lara@example.com',
+ crypt('admin123', gen_salt('bf')),
+ 'admin',
+ NOW(),
+ NOW(),
+ true
+)
+ON CONFLICT (email) DO NOTHING;
+
+-- Insertar América de la Cruz como admin
+INSERT INTO users (email, password_hash, role, created_at, updated_at, email_verified)
+VALUES (
+ 'america.cruz@example.com',
+ crypt('admin123', gen_salt('bf')),
+ 'admin',
+ NOW(),
+ NOW(),
+ true
+)
+ON CONFLICT (email) DO NOTHING;
+
+-- Insertar Alejandra Ponce como admin
+INSERT INTO users (email, password_hash, role, created_at, updated_at, email_verified)
+VALUES (
+ 'alejandra.ponce@example.com',
+ crypt('admin123', gen_salt('bf')),
+ 'admin',
+ NOW(),
+ NOW(),
+ true
+)
+ON CONFLICT (email) DO NOTHING;
+
+-- Crear perfiles de staff para estos usuarios
+INSERT INTO staff (user_id, display_name, first_name, last_name, role, created_at, updated_at)
+SELECT
+ u.id,
+ u.email,
+ CASE
+ WHEN u.email = 'frida.lara@example.com' THEN 'Frida'
+ WHEN u.email = 'america.cruz@example.com' THEN 'América'
+ WHEN u.email = 'alejandra.ponce@example.com' THEN 'Alejandra'
+ END,
+ CASE
+ WHEN u.email = 'frida.lara@example.com' THEN 'Lara'
+ WHEN u.email = 'america.cruz@example.com' THEN 'de la Cruz'
+ WHEN u.email = 'alejandra.ponce@example.com' THEN 'Ponce'
+ END,
+ 'admin',
+ NOW(),
+ NOW()
+FROM users u
+WHERE u.email IN (
+ 'frida.lara@example.com',
+ 'america.cruz@example.com',
+ 'alejandra.ponce@example.com'
+)
+AND u.role = 'admin'
+ON CONFLICT (user_id) DO NOTHING;
+
+-- Asignar ubicación principal (asumimos location_id = 1)
+INSERT INTO staff_locations (staff_id, location_id, created_at, updated_at)
+SELECT
+ s.id,
+ 1,
+ NOW(),
+ NOW()
+FROM staff s
+JOIN users u ON s.user_id = u.id
+WHERE u.email IN (
+ 'frida.lara@example.com',
+ 'america.cruz@example.com',
+ 'alejandra.ponce@example.com'
+)
+AND NOT EXISTS (
+ SELECT 1 FROM staff_locations sl
+ WHERE sl.staff_id = s.id
+);
+
+-- Confirmación
+SELECT
+ u.email,
+ u.role,
+ s.display_name,
+ sl.location_id
+FROM users u
+LEFT JOIN staff s ON s.user_id = u.id
+LEFT JOIN staff_locations sl ON sl.staff_id = s.id
+WHERE u.email IN (
+ 'frida.lara@example.com',
+ 'america.cruz@example.com',
+ 'alejandra.ponce@example.com'
+);