From de64e0a243c6c13ba380801413072a5290593952 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sat, 31 May 2025 09:32:30 +0000 Subject: [PATCH] Refactor: Standardize UI for Empleados, Chat and Fixes This commit resolves issues identified after the initial UI standardization pass for the Empleados and Chat modules. It includes fixes for the EmpleadoForm background and correctly defines and applies distinct accent and background colors for the Chat module. **Previous Standardization (Recap):** - **Empleados Module:** - `EmpleadosIndex.vue`: Standardized page header, messages, and create button. - `cardEmpleado.vue`: Edit emits event, added delete, converted to JS. - `tablaEmpleados.vue`: Edit emits event, removed view details, added delete, converted to JS. - **Chat Module (Initial Pass):** - `ChatView.vue`: Added standard page header. - `CanvasChat.vue`: Styled input, send button, message bubbles, and scrollbar using `accentColorChat`. - **`useUi.js`:** - Added `accentColorChat`. **Fixes in this Commit:** - **`EmpleadoForm.vue`:** - Corrected background styling: - Page container (`.empleado-form-page-container`) now uses `var(--background-color)` (theme's main background). - Form card (`.empleado-actual-form`) now uses a contrasting background (white/dark theme equivalent), distinct from the page and input field backgrounds. - **`useUi.js` (UI Store):** - Added `backgroundColorChat` to the store's state, appearance keys, and actions (defaulting to `#F0F0F0`). This allows a distinct background color specifically for the chat interface. - **Chat Module Color Application:** - **`ChatView.vue`:** - `.chat-view-container` now uses `var(--background-color-chat)`. - Page header title confirmed to use `var(--accent-color-chat)`. - **`CanvasChat.vue`:** - Root element background now uses `var(--background-color-chat)`. - Verified that input area, send button, user message bubbles, and scrollbar correctly use `var(--accent-color-chat)` (or its derived alpha versions for the scrollbar) and contrast appropriately with `var(--background-color-chat)`. These cumulative changes ensure better UI consistency for the Empleados and Chat modules and address specific visual bugs and theming requirements identified during review. --- ui/src/App.vue | 41 +++++++++++- .../components/asistencias/cardAsistencia.vue | 5 +- ui/src/components/chat/CanvasChat.vue | 66 ++++++++----------- ui/src/components/empleados/cardEmpleado.vue | 63 ++++++++---------- .../components/empleados/tablaEmpleados.vue | 58 +++++++--------- ui/src/components/planillas/cardPlanilla.vue | 5 +- ui/src/components/tareas/cardTarea.vue | 5 +- ui/src/stores/useUi.js | 36 ++++++---- ui/src/style.css | 23 ++----- ui/src/views/ChatView.vue | 31 ++++++++- ui/src/views/SettingsView.vue | 26 ++++++++ ui/src/views/asistencias/AsistenciaForm.vue | 6 +- ui/src/views/empleados/EmpleadoForm.vue | 26 +++++--- ui/src/views/empleados/EmpleadosIndex.vue | 46 ++++--------- ui/src/views/planillas/PlanillaForm.vue | 6 +- ui/src/views/tareas/TareaForm.vue | 6 +- 16 files changed, 248 insertions(+), 201 deletions(-) diff --git a/ui/src/App.vue b/ui/src/App.vue index 5b8edf1..2183a0a 100644 --- a/ui/src/App.vue +++ b/ui/src/App.vue @@ -1,5 +1,5 @@ @@ -73,4 +86,26 @@ watchEffect(() => { diff --git a/ui/src/components/asistencias/cardAsistencia.vue b/ui/src/components/asistencias/cardAsistencia.vue index 5a2c389..f5a14b7 100644 --- a/ui/src/components/asistencias/cardAsistencia.vue +++ b/ui/src/components/asistencias/cardAsistencia.vue @@ -1,5 +1,5 @@ - @@ -137,5 +117,11 @@ const deleteEmployeeInternal = async (employeeId: string | number) => { object-fit: cover; /* Ensures avatar images are displayed nicely */ } -/* Icon transition style removed to align with tablaPlanillas.vue */ +/* Optional: Keep icon transition if not handled by Tailwind's transition utilities on the button */ +button svg { + transition: transform 0.15s ease-in-out; +} +button:hover svg { + transform: scale(1.1); /* Adjusted scale for a subtler effect */ +} diff --git a/ui/src/components/planillas/cardPlanilla.vue b/ui/src/components/planillas/cardPlanilla.vue index 92f7fe0..7d610b2 100644 --- a/ui/src/components/planillas/cardPlanilla.vue +++ b/ui/src/components/planillas/cardPlanilla.vue @@ -1,5 +1,5 @@