diff --git a/docs/DEMO_SHOWCASE_GUIDE.md b/docs/DEMO_SHOWCASE_GUIDE.md new file mode 100644 index 0000000..7f6f385 --- /dev/null +++ b/docs/DEMO_SHOWCASE_GUIDE.md @@ -0,0 +1,177 @@ +# Live E2E Demonstration & Role Showcase Guide + +**Variable Remuneration, Compensation, and Commissions System - Hoteles Estelar** + +--- + +This guide outlines a comprehensive step-by-step E2E script for presenters. It showcases the application's role-based permissions, database Row-Level Security (RLS) isolation, multilingual language switcher, and n8n background workflow triggers. + +--- + +## 1. System Role Permissions Matrix + +The platform is designed with a strict Role-Based Access Control (RBAC) layer mapped to the following permissions: + +| User Role | Navigation Access | Can Manage Plans? | Can Assign Goals? | Can Ingest Sales? | Can Run Settlement? | Can Approve/Reject? | Can View Audit Logs? | +| :--- | :--- | :---: | :---: | :---: | :---: | :---: | :---: | +| **`admin`** | All tabs | Yes | Yes | Yes | Yes | Yes (Override) | Yes (diff panel) | +| **`director`** | Plans, Goals, Dashboard | Yes | Yes | No | No | No | No (403 Blocked) | +| **`analyst`** | Plans, Ingest, Calc, Dash | No | No | Yes | Yes | No | No (403 Blocked) | +| **`commercial_leader`** | Plans, Ingest, Approvals | No | No | Yes | No | Yes (Regional) | No (403 Blocked) | +| **`hotel_manager`** | Plans, Goals, Approvals | No | No | No | No | Yes (Regional) | No (403 Blocked) | +| **`auditor`** | Plans, Goals (Read-only) | No | No | No | No | No | No (403 Blocked) | +| **`collaborator`** | History (Personal only) | No | No | No | No | No | No (403 Blocked) | + +--- + +## 2. Seeded Accounts & Credentials + +Use these pre-configured accounts (all passwords are set to **`password123`**) to showcase different user views: + +1. **System Admin (`admin`)**: + - Username: `admin` + - Email: `admin@estelar.com` + - Hotel Scope: `Estelar Parque de la 93` (Global View) + - Role: `admin` +2. **Planner / Executive View (`director`)**: + - Username: `director` + - Email: `director@estelar.com` + - Hotel Scope: `Estelar Parque de la 93` (Global view for planning) + - Role: `director` +3. **Finance Operations View (`analista`)**: + - Username: `analista` + - Email: `analista@estelar.com` + - Hotel Scope: `Estelar Parque de la 93` + - Role: `analyst` +4. **Hotel Managers (Regional Isolation)**: + - **Medellin Manager**: + - Username: `gerente_mde` + - Email: `gerente.mde@estelar.com` + - Hotel: `Estelar Medellin` (`EST-MDE`) + - Role: `hotel_manager` + - **Cartagena Manager**: + - Username: `gerente_ctg` + - Email: `gerente.ctg@estelar.com` + - Hotel: `Estelar Cartagena` (`EST-CTG`) + - Role: `hotel_manager` +5. **Commercial Leaders (Regional Isolation)**: + - **Medellin Leader**: + - Username: `lider_mde` + - Email: `lider.mde@estelar.com` + - Hotel: `Estelar Medellin` (`EST-MDE`) + - Role: `commercial_leader` + - **Cartagena Leader**: + - Username: `lider_ctg` + - Email: `lider.ctg@estelar.com` + - Hotel: `Estelar Cartagena` (`EST-CTG`) + - Role: `commercial_leader` +6. **Collaborators / Sellers (Personal Isolation)**: + - **Medellin Collaborator**: + - Username: `colaborador_mde` + - Email: `colaborador.mde@estelar.com` + - Hotel: `Estelar Medellin` (`EST-MDE`) + - Role: `collaborator` + - **Cartagena Collaborator**: + - Username: `colaborador_ctg` + - Email: `colaborador.ctg@estelar.com` + - Hotel: `Estelar Cartagena` (`EST-CTG`) + - Role: `collaborator` +7. **Auditor / Guest (`consulta`)**: + - Username: `consulta` + - Email: `consulta@estelar.com` + - Role: `auditor` + +--- + +## 3. Step-by-Step E2E Demo Walkthrough Script + +### Step 1: Manage Compensation Plans & Rules +* **Objective**: Show how plans are created, configured, and automatically version-controlled when active. +* **Action**: + 1. Login as **`director`** (Planner view). + 2. Navigate to **Commission Plans** (Planes de Comisión). + 3. Click **Nuevo Plan**, enter details (e.g. Plan name, code, type), and click **Guardar Plan**. + 4. Find the plan, click **Configurar Reglas**, add a tier (e.g. 0% to 120% achievement = 2% commission rate), and save. + 5. Click **Activar** on the plan. Notice status changes to `ACTIVE` (Activo). + 6. Click **Inactivar (Versión)** to edit the active plan. Notice that the system *preserves the original plan version 1 history* and automatically clones a new version record (`Version: 2`) in draft mode! This showcases strict version auditing. + +### Step 2: Assign Quotas and Goals +* **Objective**: Define sales targets for sellers. +* **Action**: + 1. Still logged in as **`director`**, navigate to **Commercial Goals** (Metas Comerciales). + 2. Select target type `INDIVIDUAL`, pick `colaborador_mde`, enter period `2026-06`, set the target amount to `100000`, and click **Guardar Meta**. + +### Step 3: Excel Sales File Ingestion (US-COM-004) +* **Objective**: Showcase header validations, duplicate upload block (idempotency checks), and file upload features. +* **Action**: + 1. Logout, then login as **`analista`** (Finance Operations). + 2. Navigate to **Ingest Sales** (Cargar Ventas). + 3. Drag and drop the generated demo spreadsheet: [demo_sales_data.xlsx](file:///home/gabogg/Proyects/semillero-special-hotel/public/templates/demo_sales_data.xlsx) into the loading box, or select it manually. + 4. Notice the upload progress screen. Once n8n finishes background parsing, the status turns green: `Carga exitosa`. + 5. Attempt to drag-and-drop the *same file again*. The system immediately alerts: `Error: Llave de idempotencia duplicada. Este lote ya ha sido procesado.` showing protection against double-payments. + +### Step 4: Run Settlement Calculation & AI Anomaly Detection +* **Objective**: Trigger the external n8n settlement engine. +* **Action**: + 1. Navigate to **Simulation** (Simulación) as `analista`. + 2. Enter Period `2026-06`. Uncheck *Simulator Mode* to commit records to the database. + 3. Click **Calculate**. + 4. The page queries n8n. Wait 5-10 seconds. The webhook invokes the calculate-settlement nodes. + 5. The results table renders: + - **`colaborador_mde`**: standard commission calculated, audit state marked as `Audited`. + - **`colaborador_ctg`**: standard commission calculated for the Cartagena region. + +### Step 5: Row-Level Security Isolation (The Core Tenant Segregation) +* **Objective**: Showcase that users in the same roles but working in different hotels cannot cross-access data. +* **Action**: + 1. Logout, then login as **`colaborador_mde`** (Medellin Collaborator). + 2. Navigate to **History** (Historial) and **Goals** (Metas). + 3. Notice you *only* see Medellin (`EST-MDE`) sales/goals. + 4. Logout, then login as **`colaborador_ctg`** (Cartagena Collaborator). + 5. Navigate to **History** and **Goals**. Notice you *only* see Cartagena (`EST-CTG`) sales/goals. Medellin records are completely invisible. + 6. Logout, then login as **`gerente_mde`** (Medellin Manager). + 7. Navigate to **Approvals** (Aprobaciones). You only see pending settlements for `colaborador_mde` (Medellin). + 8. Logout, then login as **`gerente_ctg`** (Cartagena Manager). + 9. Navigate to **Approvals**. You only see pending settlements for `colaborador_ctg` (Cartagena). You cannot see or approve Medellin records. This demonstrates robust multi-hotel security at the database row level. + +### Step 6: Commercial Approvals (US-COM-008) +* **Objective**: Perform commercial leader/manager sign-off. +* **Action**: + 1. Under `gerente_ctg` (Cartagena Manager), click **Approve** on the settlement. The status changes to `APPROVED` and generates an audit log. + 2. Logout, then login as `gerente_mde` (Medellin Manager). Click **Reject** on the Medellin settlement, and provide a reason: `"Falta validar soporte físico"`. The status transitions to `REJECTED`. + +### Step 7: Localized AI Audit Notes & Language Switcher +* **Objective**: Showcase collaborator access, localized AI audit notes, and printing stylesheets. +* **Action**: + 1. Logout, then login as **`colaborador_ctg`** (Collaborator/Seller). + 2. Navigate to **History** (Historial). + 3. Find the approved record for `2026-06`, and click **Ver Notas** under the AI Audit column. + 4. The localized notes panel expands: `Nota de auditoría en Español: Todo correcto.` (or warning notes). + 5. Go to the top-right header language dropdown, select **EN**. + 6. Instantly, the UI text translates, and the AI audit note updates dynamically: `Audit note in English: All correct.` + 7. Click **Download PDF** (Descargar PDF). Notice that the browser print dialog mounts a clean, page-break optimized stylesheet with no navigation bar, specifically designed for paper filing. + +### Step 8: Executive Dashboard (US-COM-012) +* **Objective**: Showcase executive visual trends. +* **Action**: + 1. Logout, then login as **`director`** or **`analista`**. + 2. Navigate to **Dashboard** (Tablero). + 3. View the premium glassmorphic KPI cards: Total paid commissions, average achievement rate progress circle, and budget utilization bar. + 4. View the Recharts SVG line-area charts showing the monthly payout trends vs budget caps, and the comparison bar chart comparing Bogota, Medellin, and Cartagena hotels. + +### Step 9: System Audit Logs & JSON Diff (US-COM-011) +* **Objective**: Inspect security mutations and redaction details. +* **Action**: + 1. Logout, then login as **`admin`** (System Admin). + 2. Navigate to **Audit Logs** (Auditoría). + 3. Select any log row. The side-by-side JSON panel displays the exact snapshot of the database fields before and after the action. + 4. Security audit: Notice that password hashes or base salaries are redacted as `[REDACTED]`, keeping user credentials private. + 5. If anyone tries to modify or delete logs, database RLS blocks them immediately. + +--- + +## 4. Financial Reports Exporting (US-COM-013) + +To test consolidations, run these API endpoints directly in your browser: +* **Consolidated Excel Sheet**: `/api/reports/export/excel?period=2026-06` (Downloads a multi-sheet spreadsheet). +* **Consolidated PDF HTML print view**: `/api/reports/export/pdf?period=2026-06` (Generates printable tabular views with signature sign-off lines). diff --git a/docs/showcase/recruiter_guide_en.md b/docs/showcase/recruiter_guide_en.md index d500e98..4d24bd7 100644 --- a/docs/showcase/recruiter_guide_en.md +++ b/docs/showcase/recruiter_guide_en.md @@ -59,28 +59,42 @@ The system is built as a highly secure, multi-tenant enterprise app designed to You can access the walkthrough version of the app at: **`https://hotels-demo.gaboggamer.online`** -### Step A: The Collaborator Experience (Zero-Trust Boundaries) -1. **Login** as a collaborator: - - **Username**: `colab_mde_1` +### Step A: The Collaborator Experience (Zero-Trust Boundaries & Multi-Hotel Segregation) +1. **Login** as the Medellin collaborator: + - **Username**: `colaborador_mde` - **Password**: `password123` -2. **Observe**: The dashboard page loads. You can see your own metrics (sales amount, goals, achievement percentage). -3. **Check Segregation**: Navigate to the **Historial** and **Metas** tabs. You will only see records associated with `colab_mde_1` at `Estelar Medellin (EST-MDE)`. You cannot see any other collaborator's goals or payouts. -4. **Try to Bypass**: Notice there is no "Cargar Ventas" (Upload Sales) or "Planes" (Plans) link in the header. The UI actively hides admin-level controls. +2. **Observe**: The dashboard page loads. You can see your own metrics (sales amount, goals, achievement percentage) for `Estelar Medellin (EST-MDE)`. +3. **Verify Segregation**: Navigate to the **Historial** and **Metas** tabs. You will only see records associated with `colaborador_mde`. You cannot see any other collaborator's goals or payouts. +4. **Test Cross-Hotel Isolation**: + - Log out and log in as the Cartagena collaborator: + - **Username**: `colaborador_ctg` + - **Password**: `password123` + - **Observe**: You now only see data for `Estelar Cartagena (EST-CTG)`. The database restricts your session so that you have absolutely zero exposure to Medellin (`EST-MDE`) records, despite sharing the same collaborator role. +5. **Try to Bypass**: Notice there is no "Cargar Ventas" (Upload Sales) or "Planes" (Plans) link in the header. The UI actively hides admin-level controls. -### Step B: The Regional Manager Experience (Approval Flow) -1. **Log out** and **Login** as the Antioquia Hotel Manager: +### Step B: The Regional Manager & Leader Experience (Approval Segregation) +1. **Log out** and **Login** as the Medellin Hotel Manager: - **Username**: `gerente_mde` - **Password**: `password123` -2. **Observe**: The manager sees dashboard metrics summarizing their hotel's total sales. -3. **Approval Segregation**: Navigate to the **Aprobaciones** (Approvals) tab. You will see a list of pending settlements for June 2026. Note that you can only see collaborators belonging to your hotel (`EST-MDE`). You cannot see or approve settlements for Bogota or Cartagena. -4. **Approve a Settlement**: Click "Aprobar" on a pending settlement. It will immediately transition to `APPROVED` and write an immutable audit log entry. -5. **Reject with Reason**: Click "Rechazar" on another settlement. The UI prompts you for a rejection reason. Enter `"Falta validar soporte físico"` and submit. The status transitions to `REJECTED`. +2. **Observe**: The manager sees dashboard metrics summarizing total sales for `Estelar Medellin (EST-MDE)`. +3. **Approval Segregation**: Navigate to the **Aprobaciones** (Approvals) tab. You will see pending settlements for June 2026. Note that you can only see collaborators belonging to `EST-MDE` (like `colaborador_mde`). +4. **Verify Cross-Hotel Isolation**: + - Log out and log in as the Cartagena Hotel Manager: + - **Username**: `gerente_ctg` + - **Password**: `password123` + - **Observe**: The dashboard and the **Aprobaciones** tab now show only data for `Estelar Cartagena (EST-CTG)`. You cannot view, approve, or reject settlements for Medellin or Bogota. +5. **Leader Level Separation**: + - Log out and log in as the Medellin Commercial Leader: + - **Username**: `lider_mde` + - **Password**: `password123` + - **Observe**: The commercial leader has read access to their hotel's records and can upload sales only for `EST-MDE`, but has zero access to Cartagena (`EST-CTG`) or Bogota (`EST-P93`) data. +6. **Action Flow**: Under a manager account, approve or reject a pending settlement. Approve transitions status to `APPROVED` and writes an immutable audit log. Reject requires entering a rejection reason (e.g. `"Falta validar soporte físico"`) and transitions status to `REJECTED`. ### Step C: The Administrator Experience (Plans & Auditing) 1. **Log out** and **Login** as the System Admin: - **Username**: `admin` - **Password**: `password123` -2. **Global View**: The Admin sees all metrics across all regions on the dashboard. +2. **Global View**: The Admin sees all metrics across all regions/hotels on the dashboard. 3. **Plan Versioning**: Navigate to the **Planes** tab. - Click on **Nuevo Plan** to open the creation modal. - Create a draft plan named `Plan Piloto Q3` with code `PLAN-Q3` and validity dates. diff --git a/docs/showcase/recruiter_guide_es.md b/docs/showcase/recruiter_guide_es.md index 1974fc0..53f2604 100644 --- a/docs/showcase/recruiter_guide_es.md +++ b/docs/showcase/recruiter_guide_es.md @@ -59,28 +59,42 @@ El sistema está construido como una aplicación empresarial multi-inquilino alt Puede acceder a la versión de demostración de la aplicación en: **`https://hotels-demo.gaboggamer.online`** -### Paso A: La Experiencia del Colaborador (Límites de Seguridad RLS) -1. **Inicie sesión** como colaborador: - - **Usuario**: `colab_mde_1` +### Paso A: La Experiencia del Colaborador (Límites de Seguridad RLS y Segregación entre Hoteles) +1. **Inicie sesión** como el colaborador de Medellín: + - **Usuario**: `colaborador_mde` - **Contraseña**: `password123` -2. **Observe**: Se carga el panel del panel. Puede ver sus propias métricas (monto de ventas, metas, porcentaje de logro). -3. **Verifique la Segregación**: Navegue a las pestañas **Historial** y **Metas**. Solo verá los registros asociados a `colab_mde_1` del hotel `Estelar Medellín (EST-MDE)`. No podrá ver las metas ni liquidaciones de ningún otro colaborador. -4. **Intente Eludir**: Note que no hay enlaces de "Cargar Ventas" ni de "Planes" en el encabezado. La interfaz de usuario oculta los controles reservados a roles de supervisión. +2. **Observe**: Se carga el panel. Puede ver sus propias métricas (monto de ventas, metas, porcentaje de logro) asociadas a `Estelar Medellín (EST-MDE)`. +3. **Verifique la Segregación**: Navegue a las pestañas **Historial** y **Metas**. Solo verá los registros asociados a `colaborador_mde`. No podrá ver las metas ni liquidaciones de ningún otro colaborador. +4. **Pruebe el Aislamiento entre Hoteles**: + - Cierre sesión e inicie sesión como el colaborador de Cartagena: + - **Usuario**: `colaborador_ctg` + - **Contraseña**: `password123` + - **Observe**: Ahora solo visualizará los datos de `Estelar Cartagena (EST-CTG)`. La base de datos restringe la sesión de tal forma que tiene exposición nula a los registros de Medellín (`EST-MDE`), a pesar de compartir el mismo rol de colaborador. +5. **Intente Eludir**: Note que no hay enlaces de "Cargar Ventas" ni de "Planes" en el encabezado. La interfaz de usuario oculta los controles reservados a roles de supervisión. -### Paso B: La Experiencia del Gerente de Hotel (Flujo de Aprobación) +### Paso B: La Experiencia del Gerente y Líder de Hotel (Segregación de Aprobaciones) 1. **Cierre sesión** e **inicie sesión** como el Gerente del Hotel Medellín: - **Usuario**: `gerente_mde` - **Contraseña**: `password123` -2. **Observe**: El gerente visualiza las métricas agregadas correspondientes a las ventas totales de su hotel. -3. **Segregación de Aprobación**: Navegue a la pestaña **Aprobaciones**. Verá un listado de liquidaciones pendientes para junio de 2026. Note que solo se muestran los colaboradores de su hotel (`EST-MDE`). No puede visualizar ni aprobar liquidaciones de Bogotá o Cartagena. -4. **Aprobar una Liquidación**: Haga clic en "Aprobar" en una liquidación pendiente. Cambiará de estado de inmediato a `APPROVED` y registrará una entrada inmutable de auditoría. -5. **Rechazar con Motivo**: Haga clic en "Rechazar" en otra liquidación. El sistema le solicitará un motivo. Escriba `"Falta validar soporte físico"` y envíe. El estado cambiará a `REJECTED`. +2. **Observe**: El gerente visualiza las métricas agregadas correspondientes a las ventas totales de su hotel (`EST-MDE`). +3. **Segregación de Aprobación**: Navegue a la pestaña **Aprobaciones**. Verá un listado de liquidaciones pendientes para junio de 2026. Note que solo se muestran los colaboradores de su hotel (`EST-MDE`, como `colaborador_mde`). +4. **Verifique el Aislamiento entre Hoteles**: + - Cierre sesión e inicie sesión como el Gerente del Hotel Cartagena: + - **Usuario**: `gerente_ctg` + - **Contraseña**: `password123` + - **Observe**: El panel de control y la pestaña de **Aprobaciones** ahora muestran únicamente los datos de `Estelar Cartagena (EST-CTG)`. No es posible visualizar, aprobar ni rechazar liquidaciones de Medellín o Bogotá. +5. **Separación de Nivel de Líder**: + - Cierre sesión e inicie sesión como el Líder Comercial de Medellín: + - **Usuario**: `lider_mde` + - **Contraseña**: `password123` + - **Observe**: El líder comercial tiene acceso de lectura a los registros de su hotel y puede cargar ventas únicamente para `EST-MDE`, pero tiene acceso nulo a los datos de Cartagena (`EST-CTG`) o Bogotá (`EST-P93`). +6. **Flujo de Acción**: Bajo una cuenta de gerente, apruebe o rechace una liquidación pendiente. Aprobar cambia el estado a `APPROVED` y escribe un log de auditoría inmutable. Rechazar requiere ingresar un motivo de rechazo (ej. `"Falta validar soporte físico"`) y cambia el estado a `REJECTED`. ### Paso C: La Experiencia del Administrador (Planes y Auditoría) 1. **Cierre sesión** e **inicie sesión** como Administrador del Sistema: - **Usuario**: `admin` - **Contraseña**: `password123` -2. **Vista Global**: El administrador visualiza métricas de todas las regiones en su panel principal. +2. **Vista Global**: El administrador visualiza métricas de todas las regiones/hoteles en su panel principal. 3. **Control de Versiones de Planes**: Navegue a la pestaña **Planes**. - Haga clic en **Nuevo Plan** para abrir el formulario de creación. - Cree un borrador de plan llamado `Plan Piloto Q3` con código `PLAN-Q3` y vigencias correspondientes. @@ -99,4 +113,4 @@ Al presentar este proyecto a un reclutador, recuerde destacar: - **Glassmorphism**: Bordes y sombras sutiles con fondos oscuros traslúcidos. - **Micro-animaciones**: Transiciones suaves al pasar el cursor por tablas, botones y formularios. - **Gráficos Dinámicos**: Gráficos interactivos que se ajustan con filtros, comparando regiones e históricos. -- **Selector de Idioma**: Alterna la interfaz y las observaciones de IA entre inglés y español al instante. +- **Selector de Idioma**: Alterna la interfaz y las observaciones de IA entre inglés y español al instante. \ No newline at end of file diff --git a/prisma/rls_and_seed.sql b/prisma/rls_and_seed.sql index 8670ef0..5314ac5 100644 --- a/prisma/rls_and_seed.sql +++ b/prisma/rls_and_seed.sql @@ -60,10 +60,13 @@ INSERT INTO "users" ("username", "email", "password_hash", "role", "hotel_id", " ('admin', 'admin@estelar.com', '$2b$10$lRn/GrwzaEGxWqqQGGz0f.44nBywObKkGWRajlxWeDGZ3o4f7ayjy', 'admin', (SELECT id FROM hotels WHERE code = 'EST-P93'), 'Sistemas', 'ACTIVE', NOW()), ('director', 'director@estelar.com', '$2b$10$lRn/GrwzaEGxWqqQGGz0f.44nBywObKkGWRajlxWeDGZ3o4f7ayjy', 'director', (SELECT id FROM hotels WHERE code = 'EST-P93'), 'Comercial', 'ACTIVE', NOW()), ('gerente_mde', 'gerente.mde@estelar.com', '$2b$10$lRn/GrwzaEGxWqqQGGz0f.44nBywObKkGWRajlxWeDGZ3o4f7ayjy', 'hotel_manager', (SELECT id FROM hotels WHERE code = 'EST-MDE'), 'Administracion', 'ACTIVE', NOW()), +('gerente_ctg', 'gerente.ctg@estelar.com', '$2b$10$lRn/GrwzaEGxWqqQGGz0f.44nBywObKkGWRajlxWeDGZ3o4f7ayjy', 'hotel_manager', (SELECT id FROM hotels WHERE code = 'EST-CTG'), 'Administracion', 'ACTIVE', NOW()), ('lider_ctg', 'lider.ctg@estelar.com', '$2b$10$lRn/GrwzaEGxWqqQGGz0f.44nBywObKkGWRajlxWeDGZ3o4f7ayjy', 'commercial_leader', (SELECT id FROM hotels WHERE code = 'EST-CTG'), 'Ventas', 'ACTIVE', NOW()), +('lider_mde', 'lider.mde@estelar.com', '$2b$10$lRn/GrwzaEGxWqqQGGz0f.44nBywObKkGWRajlxWeDGZ3o4f7ayjy', 'commercial_leader', (SELECT id FROM hotels WHERE code = 'EST-MDE'), 'Ventas', 'ACTIVE', NOW()), ('analista', 'analista@estelar.com', '$2b$10$lRn/GrwzaEGxWqqQGGz0f.44nBywObKkGWRajlxWeDGZ3o4f7ayjy', 'analyst', (SELECT id FROM hotels WHERE code = 'EST-P93'), 'Finanzas', 'ACTIVE', NOW()), ('consulta', 'consulta@estelar.com', '$2b$10$lRn/GrwzaEGxWqqQGGz0f.44nBywObKkGWRajlxWeDGZ3o4f7ayjy', 'auditor', (SELECT id FROM hotels WHERE code = 'EST-P93'), 'Auditoria', 'ACTIVE', NOW()), -('colaborador_mde', 'colaborador.mde@estelar.com', '$2b$10$lRn/GrwzaEGxWqqQGGz0f.44nBywObKkGWRajlxWeDGZ3o4f7ayjy', 'collaborator', (SELECT id FROM hotels WHERE code = 'EST-MDE'), 'Ventas', 'ACTIVE', NOW()) +('colaborador_mde', 'colaborador.mde@estelar.com', '$2b$10$lRn/GrwzaEGxWqqQGGz0f.44nBywObKkGWRajlxWeDGZ3o4f7ayjy', 'collaborator', (SELECT id FROM hotels WHERE code = 'EST-MDE'), 'Ventas', 'ACTIVE', NOW()), +('colaborador_ctg', 'colaborador.ctg@estelar.com', '$2b$10$lRn/GrwzaEGxWqqQGGz0f.44nBywObKkGWRajlxWeDGZ3o4f7ayjy', 'collaborator', (SELECT id FROM hotels WHERE code = 'EST-CTG'), 'Ventas', 'ACTIVE', NOW()) ON CONFLICT ("username") DO UPDATE SET role = EXCLUDED.role;