This commit addresses an issue where the main content area would shift
to the right on desktop when the sidebar was opened, regardless of the
`desktopNavbarPersistent` setting.
The layout logic in `App.vue` has been updated so that the `md:pl-60`
class (which adds left padding to the main content area) is now
applied only when both `ui.sidebarOpen` and `ui.desktopNavbarPersistent`
are true.
This ensures that:
- If `desktopNavbarPersistent` is true, the sidebar will take up
dedicated space, and the content will correctly shift.
- If `desktopNavbarPersistent` is false, the sidebar will overlay the
content on desktop, and the main content will no longer shift.
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.
This commit addresses UI feedback regarding the EmpleadoForm background
and color variable usage in the Chat module.
Corrections:
1. **`EmpleadoForm.vue` Background:**
* Removed the explicit `bg-gray-100` from the outer container of
`EmpleadoForm.vue`.
* Applied a new class `.empleado-form-page-container` to the outer
container, styled for consistency with index page containers (padding,
max-width, margin, default font, no explicit background).
* The form itself retains its `bg-white` card appearance, which now sits
on a page background consistent with other views.
2. **Chat Module Color Management (`CanvasChat.vue` & `useUi.js`):**
* **`useUi.js` Store:**
* Added `accentColorChat` (defaulting to teal `rgb(13, 148, 136)`)
and `bgColorChat` (defaulting to light gray `rgb(249, 250, 251)`)
to the store's state.
* Included these new keys in `appearanceSettingKeys` for persistence.
* **`CanvasChat.vue` Component:**
* Now imports and uses the `useUi` store.
* The main chat container's background is dynamically bound to
`ui.bgColorChat`.
* The background color for user-sent messages and the send button
is dynamically bound to `ui.accentColorChat`.
* Input field focus and scrollbar styling continue to leverage the
globally defined CSS variables (`--accent-color-chat` and
`--accent-color-chat-rgb`), which use the same default teal color,
ensuring consistency.
These changes ensure the `EmpleadoForm.vue` background is visually consistent
with other application forms/pages and that the Chat module's theming is
correctly managed through the central UI store and established CSS variables.
This commit brings the Empleados and Chat UI modules more in line with the visual and functional conventions established by other modules in your application, particularly Planillas.
**Key Changes for Empleados Module:**
- **`EmpleadosIndex.vue`:**
- Standardized page header structure and styling (title, create button).
- Removed extra descriptive paragraph from header.
- Aligned styling for loading, error, and no-data messages with other modules.
- Create button icon removed for consistency.
- **`cardEmpleado.vue`:**
- Edit action now emits an event instead of direct navigation.
- Added a delete button with confirmation and store integration.
- Converted component from TypeScript to JavaScript.
- Adjusted layout for consistency with other card components.
- **`tablaEmpleados.vue`:**
- Edit action now emits an event.
- Removed the "View Details" button to streamline actions.
- Added a delete button with confirmation and store integration.
- Converted component from TypeScript to JavaScript.
- Ensured action button styling and no-data messages are consistent.
**Key Changes for Chat Module:**
- **`ChatView.vue`:**
- Added a standard page header with the title "Chat".
- **`CanvasChat.vue`:**
- Standardized styling for the message input textarea and send button, using the new `accent-color-chat`.
- Updated message bubble colors for user (using `accent-color-chat`) and bot messages for better theme alignment.
- Adjusted custom scrollbar colors to use `accent-color-chat`.
- **`useUi.js` (UI Store):**
- Added `accentColorChat` to the store's state, appearance keys, and actions, allowing it to be configurable and persisted. Defaulted to Teal (#0D9488).
These changes aim to provide a more cohesive user experience across your application by ensuring that common UI elements and interactions behave and look similar in the Empleados and Chat modules as they do elsewhere.
This commit introduces the ability for you to customize the background
color of tables individually for each application module (Empleados,
Tareas, Planillas, Asistencias, Configuracion). This enhances user
experience by providing more granular control over the application's
appearance, similar to the existing per-module accent colors.
Key changes:
- **UI Store (`ui/src/stores/useUi.js`):**
- Removed the previous single `tableBackgroundColor` state.
- Added new state properties for each module's table background:
- `tableBgColorEmpleados`
- `tableBgColorTareas`
- `tableBgColorPlanillas`
- `tableBgColorAsistencias`
- `tableBgColorConfiguracion`
- These are included in `appearanceSettingKeys` for local storage
persistence and initialized to `#FFFFFF` (white) by default.
- Added corresponding actions (e.g., `setTableBgColorEmpleados`) for
each new property.
- **Settings View (`ui/src/views/SettingsView.vue`):**
- Removed the previous single global table background color input.
- Added new color picker inputs for each module's table background
color, integrated within the "Module Colors" section.
- These inputs are bound to their respective store properties and
actions.
- **Global Styles & Application (`ui/src/App.vue` & component styles):**
- The previous global `--table-bg-color` CSS variable was removed.
- `App.vue` now dynamically creates and updates CSS variables for each
module's table background color on the root element (e.g.,
`--table-bg-color-empleados`).
- Table components within each module (e.g., `tablaAsistencias.vue`,
`tablaEmpleados.vue`, etc.) have been updated to use their
respective CSS variable for the `background-color` property,
typically by applying it to a module-specific class on the table.
- **Reverted Previous Implementation:**
- The initial implementation for a single, global table background
color was reverted before implementing this per-module approach.
This feature allows for a more personalized and visually distinct
experience across different sections of the application.
This commit introduces module-specific accent colors and further integrates
the primary and secondary theme colors throughout the application's UI components.
Key features:
- Four new customizable accent colors, one for each main module:
- Empleados
- Tareas
- Planillas
- Asistencias
- These accent colors are configurable in the Settings view and persist in local storage.
- Broader application of global primary and secondary colors to common UI elements like navigation bars.
- Module-specific components now use their designated accent color for key visual elements (e.g., primary buttons, titles, icons, borders), providing better visual differentiation between modules.
Changes include:
- Extended `ui/src/stores/useUi.js` to manage state for the four new module accent colors, including actions and local storage persistence.
- Added a "Module Accent Colors" section with color pickers to `ui/src/views/SettingsView.vue`.
- Updated `ui/src/App.vue` to expose these module accent colors as CSS variables (e.g., `--accent-color-empleados`).
- Systematically updated styles in general UI components (`ui/src/components/ui/`) and all module-specific components (`ui/src/components/{module}/` and `ui/src/views/{module}/`) to utilize the new global and module-specific theme colors.
- Updated unit tests for `useUi.js` and component tests for `SettingsView.vue` to cover the new accent color functionality. A bug related to color input event handling in `SettingsView.vue` was identified and fixed during this process.
This enhancement provides a more visually distinct and customizable experience across different sections of the application.