From 9fd4f30016fb7e7d2b579bc91dea0132dfa4a80c 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 07:18:19 +0000 Subject: [PATCH 01/10] Refactor: Standardize UI table components and update README This commit introduces a standardized approach to table components within the UI. Key changes include: - Refactored tablaAsistencias.vue, tablaEmpleados.vue, tablaPlanillas.vue, and tablaTareas.vue to use Tailwind CSS for consistent styling. - Defined and applied common Tailwind utility patterns for table structure (container, header, body, rows, cells), action buttons (with SVG icons), and status indicators (badges). - Created a shared utility file at `ui/src/utils/formatters.js` for common functions like date formatting, currency formatting, text truncation, and status class generation, reducing code duplication. - Updated table components to use these shared utility functions. - Updated `ui/README.md` to document the UI modules, the standardized table structure, styling conventions, and usage of utility functions. This standardization enhances code maintainability, improves consistency in the user interface, and provides clear guidelines for future table component development. --- ui/README.md | 49 +++++- .../asistencias/tablaAsistencias.vue | 147 ++++------------- .../components/empleados/tablaEmpleados.vue | 111 ++++--------- .../components/planillas/tablaPlanillas.vue | 151 ++++------------- ui/src/components/tareas/tablaTareas.vue | 153 ++++-------------- ui/src/utils/formatters.js | 96 +++++++++++ 6 files changed, 273 insertions(+), 434 deletions(-) create mode 100644 ui/src/utils/formatters.js diff --git a/ui/README.md b/ui/README.md index 1511959..d608b10 100644 --- a/ui/README.md +++ b/ui/README.md @@ -1,5 +1,52 @@ -# Vue 3 + Vite +# Project UI (Vue 3 + Vite) + +This project frontend is built with Vue 3 and Vite. It provides a user interface for managing various aspects of the application. + +## Development This template should help get you started developing with Vue 3 in Vite. The template uses Vue 3 ` - - diff --git a/ui/src/components/empleados/tablaEmpleados.vue b/ui/src/components/empleados/tablaEmpleados.vue index 7e55739..1d6dadc 100644 --- a/ui/src/components/empleados/tablaEmpleados.vue +++ b/ui/src/components/empleados/tablaEmpleados.vue @@ -1,83 +1,72 @@