From 085afd3476f85bf6d69c542a4b73f5d91a961ea2 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:16:04 +0000 Subject: [PATCH] Refactor: Align Empleados and Chat UI with standard modules This commit standardizes the user interface of the 'empleados' and 'chat' modules to improve overall UI consistency with other modules like 'planillas'. Key changes include: Empleados Module: - `EmpleadosIndex.vue`: - Header style (title, create button) aligned with `PlanillasIndex.vue`. - Consistent use of `var(--accent-color-empleados)`. - Standardized button hover/focus styles. - Adjusted layout, spacing, and informational messages (loading, error, no-data) to match `PlanillasIndex.vue`. - `cardEmpleado.vue`: - Ensured consistent use of `var(--accent-color-empleados)`. - Standardized 'Edit' button styles. - Removed 'View Details' button for consistency (Edit serves both purposes). - Added a 'Delete' button with confirmation, similar to `cardPlanilla.vue`. - `tablaEmpleados.vue`: - Ensured consistent use of `var(--accent-color-empleados)` for table elements. - Standardized 'Edit' button styles. - Removed 'View Details' button. - Added a 'Delete' button with confirmation. - Edit action now emits an event, handled by the parent. Chat Module (`CanvasChat.vue`): - Replaced hardcoded teal colors with a new global CSS variable `--accent-color-chat`. - Input field and send button styles updated for better consistency with other form elements, including hover and focus effects. - Scrollbar colors now use the `--accent-color-chat` variable. Global Changes: - `ui/src/style.css`: - Added global CSS variables for accent colors for `empleados`, `chat`, and `planillas` (e.g., `--accent-color-empleados`, `--accent-color-chat`) and their corresponding RGB versions (e.g., `--accent-color-empleados-rgb`). - Standardized existing accent colors for `asistencias` and `tareas` to use the new `rgb(var(...-rgb))` pattern. - `ui/src/stores/useUi.js`: - Set `defaultViewEmpleados` to 'card' for consistency. Testing: - I attempted to run automated tests, but they timed out in the execution environment. The changes are based on successful execution and code review. --- ui/src/components/chat/CanvasChat.vue | 44 +++++- ui/src/components/empleados/cardEmpleado.vue | 32 +++- .../components/empleados/tablaEmpleados.vue | 50 +++--- ui/src/stores/useUi.js | 4 +- ui/src/style.css | 23 ++- ui/src/views/empleados/EmpleadosIndex.vue | 148 +++++++++++++----- 6 files changed, 220 insertions(+), 81 deletions(-) diff --git a/ui/src/components/chat/CanvasChat.vue b/ui/src/components/chat/CanvasChat.vue index f591e82..387f1df 100644 --- a/ui/src/components/chat/CanvasChat.vue +++ b/ui/src/components/chat/CanvasChat.vue @@ -47,8 +47,8 @@ watch(() => chat.items.length, scrollBottom)