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.
Planilla
ESTE REPOSITORIO ES UNA COPIA DEL DE GITEA. EL PRINCIPAL ES EL DE GITEA Sistema de gestión de planillas compuesto por:
- Base de datos: PostgreSQL
- API: Express + Node.js (módulo
api) - Interfaz de usuario: Vue 3 + Vite (módulo
ui) - Orquestación: Docker Compose
- Proxy y SSL: nginx-proxy-manager (red
principal)
📂 Estructura del proyecto
planilla/
├─ .gitea/workflows/build.yml # CI/CD: build + push + deploy
├─ api/ # servicio API
│ ├─ Dockerfile
│ ├─ package.json
│ └─ server.js
├─ ui/ # frontend Vue 3
│ ├─ Dockerfile
│ ├─ index.html
│ ├─ src/
│ └─ vite.config.js
├─ Dockerfile # imagen raíz (si aplica)
├─ docker-compose.yml # orquestación de todos los servicios
└─ README.md # este documento
📝 Requisitos
- Docker (v20+)
- Docker Compose (v2+)
- Node.js (v18+) y npm para desarrollo local
- Acceso a red
app-netyprincipalen Docker
⚙️ Variables de entorno
Si querés cambiar credenciales, editá directamente en docker-compose.yml o usá un .env:
COMPOSE_PROJECT_NAME=planilla
POSTGRES_USER=usuario
POSTGRES_PASSWORD=clave
POSTGRES_DB=midb
🚀 Levantando los servicios
-
Clonar repo
git clone https://gitea.interno.com/nucleo000/planilla.git cd planilla
2. **Construir y levantar**
```bash
docker compose up -d --build
-
Ver logs
docker compose logs -f api ui
4. **Detener todo**
```bash
docker compose down --remove-orphans
📡 Acceso a la aplicación
-
La UI no expone puertos en el host. En Nginx Proxy Manager (red
principal):- Domino:
planilla.midominio.com - Scheme: http
- Forward Hostname:
planilla-ui(ouisi así lo nombraste) - Forward Port:
80
Después podés habilitar SSL Let’s Encrypt desde la pestaña SSL.
- Domino:
-
La API corre internamente en
planilla-api:4000y no se expone externamente. Vu hace proxy la UI o clientes internos.
🗄️ Detalles de cada servicio
Base de datos (db)
- Imagen:
postgres:15 - Volumen persistente:
db_data - Credenciales en
docker-compose.yml.
API (api)
-
Framework: Express
-
DB:
pg(Pool) -
Endpoints:
GET /api/items→ devuelveitemsdesde Postgres.
-
Arranca en puerto 4000 internamente.
-
Código principal en
api/server.js.
Aviso: si ves
SyntaxErroral usarimport, asegurate de tener enapi/package.json:{ "type": "module" }
UI (ui)
- Framework: Vue 3 + Vite
- Build: produce carpeta
dist/y se sirve con Nginx - Arranca en puerto 80 internamente.
- Código fuente en
ui/src/, configuración envite.config.js.
📦 CI/CD (.gitea/workflows/build.yml)
- build: construye imágenes
planilla,planilla-api,planilla-ui, taggea con SHA ylatest. - push: envía imágenes al registry
gitea.interno.com. - deploy: conecta al registry, baja imágenes y hace
docker compose up -d --build.
Asegurate de usar las credenciales correctas en el workflow.
💡 Buenas prácticas
- Aísla tu red interna (
app-net) para que sólo los contenedores hablen entre sí. - Exponé servicios al exterior sólo vía
nginx-proxy-manageren la redprincipal. - Versioná tu
build.ymly mantén secretos fuera del repo (ideal:secrets.GITEA_PASSWORD). - Usa nombres de contenedor explícitos (
container_name) para identificar fácilmente.
🤝 Contribuciones
- Hacé un fork y trabajá en una rama nueva.
- Abrí PR describiendo cambios.
- Chequeá que el CI pase y la app funcione.
📄 Licencia
MIT © 2025 Equipo Planilla