From a5aaad5201af1f33f0eec88173a7a73e1795ccb3 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Tue, 3 Jun 2025 19:44:53 +0000 Subject: [PATCH] feat: Centralize table component into NucleoTable I've created a new reusable table component `NucleoTable.vue` to standardize table implementations across the UI. Key changes: - `NucleoTable.vue` (`ui/src/components/ui/NucleoTable.vue`) created with props for columns, items, accent color, and background color name. It supports custom cell rendering and action slots. - I've implemented basic styling using Tailwind CSS, respecting dynamic accent and background colors from the UI store. - It declares `editItem` and `deleteItem` events for parent components to handle. - I've refactored existing table components to use `NucleoTable.vue`: - `tablaAsistencias.vue` - `tablaEmpleados.vue` - `tablaPlanillas.vue` - `tablaTareas.vue` - Each refactored table now passes its specific data, column definitions, and styling props to `NucleoTable`. Custom cell rendering and action button logic are maintained using slots, preserving original functionality and styling. This change reduces code duplication and makes future updates to table structures and styles more manageable. You've confirmed that all tables function and appear as expected after refactoring. --- .../asistencias/tablaAsistencias.vue | 102 +++++------- .../components/empleados/tablaEmpleados.vue | 139 ++++++---------- .../components/planillas/tablaPlanillas.vue | 94 +++++------ ui/src/components/tareas/tablaTareas.vue | 155 +++++++----------- ui/src/components/ui/NucleoTable.vue | 64 ++++++++ 5 files changed, 265 insertions(+), 289 deletions(-) create mode 100644 ui/src/components/ui/NucleoTable.vue diff --git a/ui/src/components/asistencias/tablaAsistencias.vue b/ui/src/components/asistencias/tablaAsistencias.vue index 6e94a64..edb3f02 100644 --- a/ui/src/components/asistencias/tablaAsistencias.vue +++ b/ui/src/components/asistencias/tablaAsistencias.vue @@ -1,66 +1,43 @@ diff --git a/ui/src/components/ui/NucleoTable.vue b/ui/src/components/ui/NucleoTable.vue new file mode 100644 index 0000000..f542c3f --- /dev/null +++ b/ui/src/components/ui/NucleoTable.vue @@ -0,0 +1,64 @@ + + +