Alpha v0.1.0 — KAPPA Hub inicial
- Auth con KAPPA (login + token Bearer) - Cliente HTTP para 10 endpoints (proyectos, HUs, bitácoras, planeaciones) - Dashboard multi-proyecto con concepto médico Teloprax - Calendario colombiano con 19 feriados (Ley Emiliani + Pascua) - Scheduler tipo cron con Dexie (reglas recurrentes, toasts, log) - Diseño marca Teloprax: Inter, Space Grotesk, #1A1A2E, rojo #E63946 - Stack: Vue 3 + TypeScript + Pinia + Vite + Bun
This commit is contained in:
@@ -0,0 +1,4 @@
|
|||||||
|
node_modules/
|
||||||
|
dist/
|
||||||
|
*.log
|
||||||
|
.DS_Store
|
||||||
@@ -0,0 +1,79 @@
|
|||||||
|
# KAPPA Hub
|
||||||
|
|
||||||
|
> Asistente multi-proyecto para KAPPA. Semilla de RUMBO.
|
||||||
|
> POC → validación diaria → lo que funciona migra a RUMBO.
|
||||||
|
|
||||||
|
## Stack
|
||||||
|
|
||||||
|
| Capa | Tecnología |
|
||||||
|
|------|-----------|
|
||||||
|
| Frontend | Vue 3 + TypeScript + Vite |
|
||||||
|
| Runtime | **Bun** (1.3+) |
|
||||||
|
| Estado | Pinia |
|
||||||
|
| HTTP | fetch() directo a KAPPA (proxy Vite en dev) |
|
||||||
|
| Auth | Bearer token (POST /api/users/login/) |
|
||||||
|
| Almacenamiento | localStorage (token, last project) → Dexie (futuro) |
|
||||||
|
|
||||||
|
## Sincronización entre máquinas (Mac Mini ↔ MacBook Air)
|
||||||
|
|
||||||
|
El proyecto vive en iCloud Drive: `com~apple~CloudDocs/AI/Teloprax/02_productos/kappa-hub/`.
|
||||||
|
|
||||||
|
- **Código**: se sincroniza automáticamente vía iCloud. Solo `bun install` una vez por máquina.
|
||||||
|
- **Datos de KAPPA**: viven en el servidor (kappa.lambdaanalytics.co). El Hub es solo un cliente.
|
||||||
|
- **Token**: localStorage del navegador. Loguearse una vez por máquina.
|
||||||
|
- **Datos locales futuros** (borradores, caché): se guardarán como archivos en `data/` dentro del proyecto, sincronizados vía iCloud. Ver `../rumbo/sincronizacion.md`.
|
||||||
|
|
||||||
|
## APIs KAPPA integradas
|
||||||
|
|
||||||
|
| Endpoint | Método | Uso en el hub |
|
||||||
|
|----------|--------|--------------|
|
||||||
|
| `/users/login/` | POST | Auth |
|
||||||
|
| `/initiatives-all/` | GET | Listar proyectos |
|
||||||
|
| `/users/all/` | GET | Listar usuarios |
|
||||||
|
| `/userstorys/create/` | POST | Crear HU desde transcripción |
|
||||||
|
| `/logbooks_master/create/` | POST | Crear bitácora |
|
||||||
|
| `/logbooks/create/` | POST | Entrada de bitácora |
|
||||||
|
| `/plannings_master/create/` | POST | Crear planeación |
|
||||||
|
| `/plannings/create/` | POST | Entrada de planeación |
|
||||||
|
| `/business-rules/create/` | POST | Reglas de negocio |
|
||||||
|
| `/functionalrequirements/create/` | POST | Requisitos funcionales/no funcionales |
|
||||||
|
|
||||||
|
## Estructura
|
||||||
|
|
||||||
|
```
|
||||||
|
kappa-hub/
|
||||||
|
├── src/
|
||||||
|
│ ├── types/kappa.ts # Tipos TypeScript
|
||||||
|
│ ├── services/kappa-api.ts # Cliente HTTP KAPPA
|
||||||
|
│ ├── stores/ # Pinia
|
||||||
|
│ │ ├── auth.ts
|
||||||
|
│ │ ├── projects.ts
|
||||||
|
│ │ └── workitems.ts
|
||||||
|
│ ├── views/
|
||||||
|
│ │ ├── LoginView.vue
|
||||||
|
│ │ └── DashboardView.vue
|
||||||
|
│ ├── components/layout/
|
||||||
|
│ │ └── AppShell.vue
|
||||||
|
│ ├── App.vue
|
||||||
|
│ └── main.ts
|
||||||
|
├── package.json
|
||||||
|
└── vite.config.ts
|
||||||
|
```
|
||||||
|
|
||||||
|
## Cómo ejecutar
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd "02_productos/kappa-hub"
|
||||||
|
bun install # una vez por máquina
|
||||||
|
bun dev # http://localhost:5173
|
||||||
|
```
|
||||||
|
|
||||||
|
Abre http://localhost:5173. El proxy de Vite redirige `/api/*` a `https://kappa.lambdaanalytics.co`.
|
||||||
|
|
||||||
|
## Próximos pasos
|
||||||
|
|
||||||
|
1. Agregar Dexie.js para cache offline de proyectos y HUs
|
||||||
|
2. Pipeline de transcripciones (.docx/.vtt/.md → análisis → HU)
|
||||||
|
3. Dashboard multi-proyecto con resumen unificado
|
||||||
|
4. Priorizador diario (¿qué hacer hoy?)
|
||||||
|
5. Generador de reportes de estado
|
||||||
@@ -0,0 +1,218 @@
|
|||||||
|
{
|
||||||
|
"lockfileVersion": 1,
|
||||||
|
"configVersion": 1,
|
||||||
|
"workspaces": {
|
||||||
|
"": {
|
||||||
|
"name": "kappa-hub",
|
||||||
|
"dependencies": {
|
||||||
|
"dexie": "^4.0.4",
|
||||||
|
"pinia": "^2.1.7",
|
||||||
|
"vue": "^3.4.21",
|
||||||
|
"vue-router": "^4.3.0",
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@vitejs/plugin-vue": "^5.0.4",
|
||||||
|
"typescript": "~5.4.0",
|
||||||
|
"vite": "^5.2.0",
|
||||||
|
"vue-tsc": "^2.0.6",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"packages": {
|
||||||
|
"@babel/helper-string-parser": ["@babel/helper-string-parser@7.27.1", "", {}, "sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA=="],
|
||||||
|
|
||||||
|
"@babel/helper-validator-identifier": ["@babel/helper-validator-identifier@7.28.5", "", {}, "sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q=="],
|
||||||
|
|
||||||
|
"@babel/parser": ["@babel/parser@7.29.3", "", { "dependencies": { "@babel/types": "^7.29.0" }, "bin": "./bin/babel-parser.js" }, "sha512-b3ctpQwp+PROvU/cttc4OYl4MzfJUWy6FZg+PMXfzmt/+39iHVF0sDfqay8TQM3JA2EUOyKcFZt75jWriQijsA=="],
|
||||||
|
|
||||||
|
"@babel/types": ["@babel/types@7.29.0", "", { "dependencies": { "@babel/helper-string-parser": "^7.27.1", "@babel/helper-validator-identifier": "^7.28.5" } }, "sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A=="],
|
||||||
|
|
||||||
|
"@esbuild/aix-ppc64": ["@esbuild/aix-ppc64@0.21.5", "", { "os": "aix", "cpu": "ppc64" }, "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ=="],
|
||||||
|
|
||||||
|
"@esbuild/android-arm": ["@esbuild/android-arm@0.21.5", "", { "os": "android", "cpu": "arm" }, "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg=="],
|
||||||
|
|
||||||
|
"@esbuild/android-arm64": ["@esbuild/android-arm64@0.21.5", "", { "os": "android", "cpu": "arm64" }, "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A=="],
|
||||||
|
|
||||||
|
"@esbuild/android-x64": ["@esbuild/android-x64@0.21.5", "", { "os": "android", "cpu": "x64" }, "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA=="],
|
||||||
|
|
||||||
|
"@esbuild/darwin-arm64": ["@esbuild/darwin-arm64@0.21.5", "", { "os": "darwin", "cpu": "arm64" }, "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ=="],
|
||||||
|
|
||||||
|
"@esbuild/darwin-x64": ["@esbuild/darwin-x64@0.21.5", "", { "os": "darwin", "cpu": "x64" }, "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw=="],
|
||||||
|
|
||||||
|
"@esbuild/freebsd-arm64": ["@esbuild/freebsd-arm64@0.21.5", "", { "os": "freebsd", "cpu": "arm64" }, "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g=="],
|
||||||
|
|
||||||
|
"@esbuild/freebsd-x64": ["@esbuild/freebsd-x64@0.21.5", "", { "os": "freebsd", "cpu": "x64" }, "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ=="],
|
||||||
|
|
||||||
|
"@esbuild/linux-arm": ["@esbuild/linux-arm@0.21.5", "", { "os": "linux", "cpu": "arm" }, "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA=="],
|
||||||
|
|
||||||
|
"@esbuild/linux-arm64": ["@esbuild/linux-arm64@0.21.5", "", { "os": "linux", "cpu": "arm64" }, "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q=="],
|
||||||
|
|
||||||
|
"@esbuild/linux-ia32": ["@esbuild/linux-ia32@0.21.5", "", { "os": "linux", "cpu": "ia32" }, "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg=="],
|
||||||
|
|
||||||
|
"@esbuild/linux-loong64": ["@esbuild/linux-loong64@0.21.5", "", { "os": "linux", "cpu": "none" }, "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg=="],
|
||||||
|
|
||||||
|
"@esbuild/linux-mips64el": ["@esbuild/linux-mips64el@0.21.5", "", { "os": "linux", "cpu": "none" }, "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg=="],
|
||||||
|
|
||||||
|
"@esbuild/linux-ppc64": ["@esbuild/linux-ppc64@0.21.5", "", { "os": "linux", "cpu": "ppc64" }, "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w=="],
|
||||||
|
|
||||||
|
"@esbuild/linux-riscv64": ["@esbuild/linux-riscv64@0.21.5", "", { "os": "linux", "cpu": "none" }, "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA=="],
|
||||||
|
|
||||||
|
"@esbuild/linux-s390x": ["@esbuild/linux-s390x@0.21.5", "", { "os": "linux", "cpu": "s390x" }, "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A=="],
|
||||||
|
|
||||||
|
"@esbuild/linux-x64": ["@esbuild/linux-x64@0.21.5", "", { "os": "linux", "cpu": "x64" }, "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ=="],
|
||||||
|
|
||||||
|
"@esbuild/netbsd-x64": ["@esbuild/netbsd-x64@0.21.5", "", { "os": "none", "cpu": "x64" }, "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg=="],
|
||||||
|
|
||||||
|
"@esbuild/openbsd-x64": ["@esbuild/openbsd-x64@0.21.5", "", { "os": "openbsd", "cpu": "x64" }, "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow=="],
|
||||||
|
|
||||||
|
"@esbuild/sunos-x64": ["@esbuild/sunos-x64@0.21.5", "", { "os": "sunos", "cpu": "x64" }, "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg=="],
|
||||||
|
|
||||||
|
"@esbuild/win32-arm64": ["@esbuild/win32-arm64@0.21.5", "", { "os": "win32", "cpu": "arm64" }, "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A=="],
|
||||||
|
|
||||||
|
"@esbuild/win32-ia32": ["@esbuild/win32-ia32@0.21.5", "", { "os": "win32", "cpu": "ia32" }, "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA=="],
|
||||||
|
|
||||||
|
"@esbuild/win32-x64": ["@esbuild/win32-x64@0.21.5", "", { "os": "win32", "cpu": "x64" }, "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw=="],
|
||||||
|
|
||||||
|
"@jridgewell/sourcemap-codec": ["@jridgewell/sourcemap-codec@1.5.5", "", {}, "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og=="],
|
||||||
|
|
||||||
|
"@rollup/rollup-android-arm-eabi": ["@rollup/rollup-android-arm-eabi@4.60.4", "", { "os": "android", "cpu": "arm" }, "sha512-F5QXMSiFebS9hKZj02XhWLLnRpJ3B3AROP0tWbFBSj+6kCbg5m9j5JoHKd4mmSVy5mS/IMQloYgYxCuJC0fxEQ=="],
|
||||||
|
|
||||||
|
"@rollup/rollup-android-arm64": ["@rollup/rollup-android-arm64@4.60.4", "", { "os": "android", "cpu": "arm64" }, "sha512-GxxTKApUpzRhof7poWvCJHRF51C67u1R7D6DiluBE8wKU1u5GWE8t+v81JvJYtbawoBFX1hLv5Ei4eVjkWokaw=="],
|
||||||
|
|
||||||
|
"@rollup/rollup-darwin-arm64": ["@rollup/rollup-darwin-arm64@4.60.4", "", { "os": "darwin", "cpu": "arm64" }, "sha512-tua0TaJxMOB1R0V0RS1jFZ/RpURFDJIOR2A6jWwQeawuFyS4gBW+rntLRaQd0EQ4bd6Vp44Z2rXW+YYDBsj6IA=="],
|
||||||
|
|
||||||
|
"@rollup/rollup-darwin-x64": ["@rollup/rollup-darwin-x64@4.60.4", "", { "os": "darwin", "cpu": "x64" }, "sha512-CSKq7MsP+5PFIcydhAiR1K0UhEI1A2jWXVKHPCBZ151yOutENwvnPocgVHkivu2kviURtCEB6zUQw0vs8RrhMg=="],
|
||||||
|
|
||||||
|
"@rollup/rollup-freebsd-arm64": ["@rollup/rollup-freebsd-arm64@4.60.4", "", { "os": "freebsd", "cpu": "arm64" }, "sha512-+O8OkVdyvXMtJEciu2wS/pzm1IxntEEQx3z5TAVy4l32G0etZn+RsA48ARRrFm6Ri8fvqPQfgrvNxSjKAbnd3g=="],
|
||||||
|
|
||||||
|
"@rollup/rollup-freebsd-x64": ["@rollup/rollup-freebsd-x64@4.60.4", "", { "os": "freebsd", "cpu": "x64" }, "sha512-Iw3oMskH3AfNuhU0MSN7vNbdi4me/NiYo2azqPz/Le16zHSa+3RRmliCMWWQmh4lcndccU40xcJuTYJZxNo/lw=="],
|
||||||
|
|
||||||
|
"@rollup/rollup-linux-arm-gnueabihf": ["@rollup/rollup-linux-arm-gnueabihf@4.60.4", "", { "os": "linux", "cpu": "arm" }, "sha512-EIPRXTVQpHyF8WOo219AD2yEltPehLTcTMz2fn6JsatLYSzQf00hj3rulF+yauOlF9/FtM2WpkT/hJh/KJFGhA=="],
|
||||||
|
|
||||||
|
"@rollup/rollup-linux-arm-musleabihf": ["@rollup/rollup-linux-arm-musleabihf@4.60.4", "", { "os": "linux", "cpu": "arm" }, "sha512-J3Yh9PzzF1Ovah2At+lHiGQdsYgArxBbXv/zHfSyaiFQEqvNv7DcW98pCrmdjCZBrqBiKrKKe2V+aaSGWuBe/w=="],
|
||||||
|
|
||||||
|
"@rollup/rollup-linux-arm64-gnu": ["@rollup/rollup-linux-arm64-gnu@4.60.4", "", { "os": "linux", "cpu": "arm64" }, "sha512-BFDEZMYfUvLn37ONE1yMBojPxnMlTFsdyNoqncT0qFq1mAfllL+ATMMJd8TeuVMiX84s1KbcxcZbXInmcO2mRg=="],
|
||||||
|
|
||||||
|
"@rollup/rollup-linux-arm64-musl": ["@rollup/rollup-linux-arm64-musl@4.60.4", "", { "os": "linux", "cpu": "arm64" }, "sha512-pc9EYOSlOgdQ2uPl1o9PF6/kLSgaUosia7gOuS8mB69IxJvlclko1MECXysjs5ryez1/5zjYqx3+xYU0TU6R1A=="],
|
||||||
|
|
||||||
|
"@rollup/rollup-linux-loong64-gnu": ["@rollup/rollup-linux-loong64-gnu@4.60.4", "", { "os": "linux", "cpu": "none" }, "sha512-NxnomyxYerDh5n4iLrNa+sH+Z+U4BMEE46V2PgQ/hoB909i8gV1M5wPojWg9fk1jWpO3IQnOs20K4wyZuFLEFQ=="],
|
||||||
|
|
||||||
|
"@rollup/rollup-linux-loong64-musl": ["@rollup/rollup-linux-loong64-musl@4.60.4", "", { "os": "linux", "cpu": "none" }, "sha512-nbJnQ8a3z1mtmrwImCYhc6BGpThAyYVRQxw9uKSKG4wR6aAYno9sVjJ0zaZcW9BPJX1GbrDPf+SvdWjgTuDmnw=="],
|
||||||
|
|
||||||
|
"@rollup/rollup-linux-ppc64-gnu": ["@rollup/rollup-linux-ppc64-gnu@4.60.4", "", { "os": "linux", "cpu": "ppc64" }, "sha512-2EU6acNrQLd8tYvo/LXW535wupT3m6fo7HKo6lr7ktQoItxTyOL1ZCR/GfGCuXl2vR+zmfI6eRXkSemafv+iVg=="],
|
||||||
|
|
||||||
|
"@rollup/rollup-linux-ppc64-musl": ["@rollup/rollup-linux-ppc64-musl@4.60.4", "", { "os": "linux", "cpu": "ppc64" }, "sha512-WeBtoMuaMxiiIrO2IYP3xs6GMWkJP2C0EoT8beTLkUPmzV1i/UcOSVw1d5r9KBODtHKilG5yFxsGRnBbK3wJ4A=="],
|
||||||
|
|
||||||
|
"@rollup/rollup-linux-riscv64-gnu": ["@rollup/rollup-linux-riscv64-gnu@4.60.4", "", { "os": "linux", "cpu": "none" }, "sha512-FJHFfqpKUI3A10WrWKiFbBZ7yVbGT4q4B5o1qKFFojqpaYoh9LrQgqWCmmcxQzVSXYtyB5bzkXrYzlHTs21MYA=="],
|
||||||
|
|
||||||
|
"@rollup/rollup-linux-riscv64-musl": ["@rollup/rollup-linux-riscv64-musl@4.60.4", "", { "os": "linux", "cpu": "none" }, "sha512-mcEl6CUT5IAUmQf1m9FYSmVqCJlpQ8r8eyftFUHG8i9OhY7BkBXSUdnLH5DOf0wCOjcP9v/QO93zpmF1SptCCw=="],
|
||||||
|
|
||||||
|
"@rollup/rollup-linux-s390x-gnu": ["@rollup/rollup-linux-s390x-gnu@4.60.4", "", { "os": "linux", "cpu": "s390x" }, "sha512-ynt3JxVd2w2buzoKDWIyiV1pJW93xlQic1THVLXilz429oijRpSHivZAgp65KBu+cMcgf1eVVjdnTLvPxgCuoQ=="],
|
||||||
|
|
||||||
|
"@rollup/rollup-linux-x64-gnu": ["@rollup/rollup-linux-x64-gnu@4.60.4", "", { "os": "linux", "cpu": "x64" }, "sha512-Boiz5+MsaROEWDf+GGEwF8VMHGhlUoQMtIPjOgA5fv4osupqTVnJteQNKJwUcnUog2G55jYXH7KZFFiJe0TEzQ=="],
|
||||||
|
|
||||||
|
"@rollup/rollup-linux-x64-musl": ["@rollup/rollup-linux-x64-musl@4.60.4", "", { "os": "linux", "cpu": "x64" }, "sha512-+qfSY27qIrFfI/Hom04KYFw3GKZSGU4lXus51wsb5EuySfFlWRwjkKWoE9emgRw/ukoT4Udsj4W/+xxG8VbPKg=="],
|
||||||
|
|
||||||
|
"@rollup/rollup-openbsd-x64": ["@rollup/rollup-openbsd-x64@4.60.4", "", { "os": "openbsd", "cpu": "x64" }, "sha512-VpTfOPHgVXEBeeR8hZ2O0F3aSso+JDWqTWmTmzcQKted54IAdUVbxE+j/MVxUsKa8L20HJhv3vUezVPoquqWjA=="],
|
||||||
|
|
||||||
|
"@rollup/rollup-openharmony-arm64": ["@rollup/rollup-openharmony-arm64@4.60.4", "", { "os": "none", "cpu": "arm64" }, "sha512-IPOsh5aRYuLv/nkU51X10Bf75Bsf6+gZdx1X+QP5QM6lIJFHHqbHLG0uJn/hWthzo13UAc2umiUorqZy3axoZg=="],
|
||||||
|
|
||||||
|
"@rollup/rollup-win32-arm64-msvc": ["@rollup/rollup-win32-arm64-msvc@4.60.4", "", { "os": "win32", "cpu": "arm64" }, "sha512-4QzE9E81OohJ/HKzHhsqU+zcYYojVOXlFMs1DdyMT6qXl/niOH7AVElmmEdUNHHS/oRkc++d5k6Vy85zFs0DEw=="],
|
||||||
|
|
||||||
|
"@rollup/rollup-win32-ia32-msvc": ["@rollup/rollup-win32-ia32-msvc@4.60.4", "", { "os": "win32", "cpu": "ia32" }, "sha512-zTPgT1YuHHcd+Tmx7h8aml0FWFVelV5N54oHow9SLj+GfoDy/huQ+UV396N/C7KpMDMiPspRktzM1/0r1usYEA=="],
|
||||||
|
|
||||||
|
"@rollup/rollup-win32-x64-gnu": ["@rollup/rollup-win32-x64-gnu@4.60.4", "", { "os": "win32", "cpu": "x64" }, "sha512-DRS4G7mi9lJxqEDezIkKCaUIKCrLUUDCUaCsTPCi/rtqaC6D/jjwslMQyiDU50Ka0JKpeXeRBFBAXwArY52vBw=="],
|
||||||
|
|
||||||
|
"@rollup/rollup-win32-x64-msvc": ["@rollup/rollup-win32-x64-msvc@4.60.4", "", { "os": "win32", "cpu": "x64" }, "sha512-QVTUovf40zgTqlFVrKA1uXMVvU2QWEFWfAH8Wdc48IxLvrJMQVMBRjuQyUpzZCDkakImib9eVazbWlC6ksWtJw=="],
|
||||||
|
|
||||||
|
"@types/estree": ["@types/estree@1.0.8", "", {}, "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w=="],
|
||||||
|
|
||||||
|
"@vitejs/plugin-vue": ["@vitejs/plugin-vue@5.2.4", "", { "peerDependencies": { "vite": "^5.0.0 || ^6.0.0", "vue": "^3.2.25" } }, "sha512-7Yx/SXSOcQq5HiiV3orevHUFn+pmMB4cgbEkDYgnkUWb0WfeQ/wa2yFv6D5ICiCQOVpjA7vYDXrC7AGO8yjDHA=="],
|
||||||
|
|
||||||
|
"@volar/language-core": ["@volar/language-core@2.4.15", "", { "dependencies": { "@volar/source-map": "2.4.15" } }, "sha512-3VHw+QZU0ZG9IuQmzT68IyN4hZNd9GchGPhbD9+pa8CVv7rnoOZwo7T8weIbrRmihqy3ATpdfXFnqRrfPVK6CA=="],
|
||||||
|
|
||||||
|
"@volar/source-map": ["@volar/source-map@2.4.15", "", {}, "sha512-CPbMWlUN6hVZJYGcU/GSoHu4EnCHiLaXI9n8c9la6RaI9W5JHX+NqG+GSQcB0JdC2FIBLdZJwGsfKyBB71VlTg=="],
|
||||||
|
|
||||||
|
"@volar/typescript": ["@volar/typescript@2.4.15", "", { "dependencies": { "@volar/language-core": "2.4.15", "path-browserify": "^1.0.1", "vscode-uri": "^3.0.8" } }, "sha512-2aZ8i0cqPGjXb4BhkMsPYDkkuc2ZQ6yOpqwAuNwUoncELqoy5fRgOQtLR9gB0g902iS0NAkvpIzs27geVyVdPg=="],
|
||||||
|
|
||||||
|
"@vue/compiler-core": ["@vue/compiler-core@3.5.34", "", { "dependencies": { "@babel/parser": "^7.29.3", "@vue/shared": "3.5.34", "entities": "^7.0.1", "estree-walker": "^2.0.2", "source-map-js": "^1.2.1" } }, "sha512-s9cLyK5mLcvZ4Agva5QgRsQyLKvts9WbU9DB6NqiZkkGEdwmcEiylj5Jbwkp680drF/NNCV8OlAJSe+yMLxaJw=="],
|
||||||
|
|
||||||
|
"@vue/compiler-dom": ["@vue/compiler-dom@3.5.34", "", { "dependencies": { "@vue/compiler-core": "3.5.34", "@vue/shared": "3.5.34" } }, "sha512-EbF/T++k0e2MMZlJsBhzK8Sgwt0HcIPOhzn1CTB/lv6sQcyk+OWf8YeiLxZp3ro7MbbLcAfAJ6sEvjFWuNgUCw=="],
|
||||||
|
|
||||||
|
"@vue/compiler-sfc": ["@vue/compiler-sfc@3.5.34", "", { "dependencies": { "@babel/parser": "^7.29.3", "@vue/compiler-core": "3.5.34", "@vue/compiler-dom": "3.5.34", "@vue/compiler-ssr": "3.5.34", "@vue/shared": "3.5.34", "estree-walker": "^2.0.2", "magic-string": "^0.30.21", "postcss": "^8.5.14", "source-map-js": "^1.2.1" } }, "sha512-D/ihr6uZeIt6r+pVZf46RWT1fAsLFMbUP7k8G1VkiiWexriED9GrX3echHd4Abbt17zjlfiFJ8z7a3BxZOPNjg=="],
|
||||||
|
|
||||||
|
"@vue/compiler-ssr": ["@vue/compiler-ssr@3.5.34", "", { "dependencies": { "@vue/compiler-dom": "3.5.34", "@vue/shared": "3.5.34" } }, "sha512-cDtTHKibkThKGHH1SP+WdccquNRYQDFH6rRjQCqT9G2ltFAfoR5pUftpab/z+aM5mW9HLLVQW7hfKKQe/1GBeQ=="],
|
||||||
|
|
||||||
|
"@vue/compiler-vue2": ["@vue/compiler-vue2@2.7.16", "", { "dependencies": { "de-indent": "^1.0.2", "he": "^1.2.0" } }, "sha512-qYC3Psj9S/mfu9uVi5WvNZIzq+xnXMhOwbTFKKDD7b1lhpnn71jXSFdTQ+WsIEk0ONCd7VV2IMm7ONl6tbQ86A=="],
|
||||||
|
|
||||||
|
"@vue/devtools-api": ["@vue/devtools-api@6.6.4", "", {}, "sha512-sGhTPMuXqZ1rVOk32RylztWkfXTRhuS7vgAKv0zjqk8gbsHkJ7xfFf+jbySxt7tWObEJwyKaHMikV/WGDiQm8g=="],
|
||||||
|
|
||||||
|
"@vue/language-core": ["@vue/language-core@2.2.12", "", { "dependencies": { "@volar/language-core": "2.4.15", "@vue/compiler-dom": "^3.5.0", "@vue/compiler-vue2": "^2.7.16", "@vue/shared": "^3.5.0", "alien-signals": "^1.0.3", "minimatch": "^9.0.3", "muggle-string": "^0.4.1", "path-browserify": "^1.0.1" }, "peerDependencies": { "typescript": "*" }, "optionalPeers": ["typescript"] }, "sha512-IsGljWbKGU1MZpBPN+BvPAdr55YPkj2nB/TBNGNC32Vy2qLG25DYu/NBN2vNtZqdRbTRjaoYrahLrToim2NanA=="],
|
||||||
|
|
||||||
|
"@vue/reactivity": ["@vue/reactivity@3.5.34", "", { "dependencies": { "@vue/shared": "3.5.34" } }, "sha512-y9XDjCEuBp+98k+UL5dbYkh57AHU4o6cxZedOPXw3bmrZZYLQsVHguGurq7hVrPCSrQtrnz1f9dssyFr+dMXfQ=="],
|
||||||
|
|
||||||
|
"@vue/runtime-core": ["@vue/runtime-core@3.5.34", "", { "dependencies": { "@vue/reactivity": "3.5.34", "@vue/shared": "3.5.34" } }, "sha512-mKeBYvu8tcMSLhypAHBmriUFfWXKTCF/23Z4jiCoYK3UtWepkliViNLuR90V9XOyD62mUxs9p1jsrpK3CCGIzw=="],
|
||||||
|
|
||||||
|
"@vue/runtime-dom": ["@vue/runtime-dom@3.5.34", "", { "dependencies": { "@vue/reactivity": "3.5.34", "@vue/runtime-core": "3.5.34", "@vue/shared": "3.5.34", "csstype": "^3.2.3" } }, "sha512-e8kZzERmCwUnBRVsgSQlAfrfU2rGoy0FFKPBXSlfEjc/O3KfA7QP0t1/2ZylrbchjmIKB4dPTd07A6WPr0eOrg=="],
|
||||||
|
|
||||||
|
"@vue/server-renderer": ["@vue/server-renderer@3.5.34", "", { "dependencies": { "@vue/compiler-ssr": "3.5.34", "@vue/shared": "3.5.34" }, "peerDependencies": { "vue": "3.5.34" } }, "sha512-nHxmJoTrKsmrkbILRhkC9gY1G3moZbJTqCzDd7DOOzG5KH9oeJ0Unqrff5f9v0pW//jES05ZkJcNtfE8JjOIew=="],
|
||||||
|
|
||||||
|
"@vue/shared": ["@vue/shared@3.5.34", "", {}, "sha512-24uqU4OIiX29ryC3MeWid/Xf2fa2EFRUVLb77nRhk+UrTVrh/XiGtFAFmJBAtBRbjwNdsPRP+jj/OL27Eg1NDA=="],
|
||||||
|
|
||||||
|
"alien-signals": ["alien-signals@1.0.13", "", {}, "sha512-OGj9yyTnJEttvzhTUWuscOvtqxq5vrhF7vL9oS0xJ2mK0ItPYP1/y+vCFebfxoEyAz0++1AIwJ5CMr+Fk3nDmg=="],
|
||||||
|
|
||||||
|
"balanced-match": ["balanced-match@1.0.2", "", {}, "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="],
|
||||||
|
|
||||||
|
"brace-expansion": ["brace-expansion@2.1.0", "", { "dependencies": { "balanced-match": "^1.0.0" } }, "sha512-TN1kCZAgdgweJhWWpgKYrQaMNHcDULHkWwQIspdtjV4Y5aurRdZpjAqn6yX3FPqTA9ngHCc4hJxMAMgGfve85w=="],
|
||||||
|
|
||||||
|
"csstype": ["csstype@3.2.3", "", {}, "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ=="],
|
||||||
|
|
||||||
|
"de-indent": ["de-indent@1.0.2", "", {}, "sha512-e/1zu3xH5MQryN2zdVaF0OrdNLUbvWxzMbi+iNA6Bky7l1RoP8a2fIbRocyHclXt/arDrrR6lL3TqFD9pMQTsg=="],
|
||||||
|
|
||||||
|
"dexie": ["dexie@4.4.2", "", {}, "sha512-zMtV8q79EFE5U8FKZvt0Y/77PCU/Hr/RDxv1EDeo228L+m/HTbeN2AjoQm674rhQCX8n3ljK87lajt7UQuZfvw=="],
|
||||||
|
|
||||||
|
"entities": ["entities@7.0.1", "", {}, "sha512-TWrgLOFUQTH994YUyl1yT4uyavY5nNB5muff+RtWaqNVCAK408b5ZnnbNAUEWLTCpum9w6arT70i1XdQ4UeOPA=="],
|
||||||
|
|
||||||
|
"esbuild": ["esbuild@0.21.5", "", { "optionalDependencies": { "@esbuild/aix-ppc64": "0.21.5", "@esbuild/android-arm": "0.21.5", "@esbuild/android-arm64": "0.21.5", "@esbuild/android-x64": "0.21.5", "@esbuild/darwin-arm64": "0.21.5", "@esbuild/darwin-x64": "0.21.5", "@esbuild/freebsd-arm64": "0.21.5", "@esbuild/freebsd-x64": "0.21.5", "@esbuild/linux-arm": "0.21.5", "@esbuild/linux-arm64": "0.21.5", "@esbuild/linux-ia32": "0.21.5", "@esbuild/linux-loong64": "0.21.5", "@esbuild/linux-mips64el": "0.21.5", "@esbuild/linux-ppc64": "0.21.5", "@esbuild/linux-riscv64": "0.21.5", "@esbuild/linux-s390x": "0.21.5", "@esbuild/linux-x64": "0.21.5", "@esbuild/netbsd-x64": "0.21.5", "@esbuild/openbsd-x64": "0.21.5", "@esbuild/sunos-x64": "0.21.5", "@esbuild/win32-arm64": "0.21.5", "@esbuild/win32-ia32": "0.21.5", "@esbuild/win32-x64": "0.21.5" }, "bin": { "esbuild": "bin/esbuild" } }, "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw=="],
|
||||||
|
|
||||||
|
"estree-walker": ["estree-walker@2.0.2", "", {}, "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w=="],
|
||||||
|
|
||||||
|
"fsevents": ["fsevents@2.3.3", "", { "os": "darwin" }, "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw=="],
|
||||||
|
|
||||||
|
"he": ["he@1.2.0", "", { "bin": { "he": "bin/he" } }, "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw=="],
|
||||||
|
|
||||||
|
"magic-string": ["magic-string@0.30.21", "", { "dependencies": { "@jridgewell/sourcemap-codec": "^1.5.5" } }, "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ=="],
|
||||||
|
|
||||||
|
"minimatch": ["minimatch@9.0.9", "", { "dependencies": { "brace-expansion": "^2.0.2" } }, "sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg=="],
|
||||||
|
|
||||||
|
"muggle-string": ["muggle-string@0.4.1", "", {}, "sha512-VNTrAak/KhO2i8dqqnqnAHOa3cYBwXEZe9h+D5h/1ZqFSTEFHdM65lR7RoIqq3tBBYavsOXV84NoHXZ0AkPyqQ=="],
|
||||||
|
|
||||||
|
"nanoid": ["nanoid@3.3.12", "", { "bin": { "nanoid": "bin/nanoid.cjs" } }, "sha512-ZB9RH/39qpq5Vu6Y+NmUaFhQR6pp+M2Xt76XBnEwDaGcVAqhlvxrl3B2bKS5D3NH3QR76v3aSrKaF/Kiy7lEtQ=="],
|
||||||
|
|
||||||
|
"path-browserify": ["path-browserify@1.0.1", "", {}, "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g=="],
|
||||||
|
|
||||||
|
"picocolors": ["picocolors@1.1.1", "", {}, "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA=="],
|
||||||
|
|
||||||
|
"pinia": ["pinia@2.3.1", "", { "dependencies": { "@vue/devtools-api": "^6.6.3", "vue-demi": "^0.14.10" }, "peerDependencies": { "typescript": ">=4.4.4", "vue": "^2.7.0 || ^3.5.11" }, "optionalPeers": ["typescript"] }, "sha512-khUlZSwt9xXCaTbbxFYBKDc/bWAGWJjOgvxETwkTN7KRm66EeT1ZdZj6i2ceh9sP2Pzqsbc704r2yngBrxBVug=="],
|
||||||
|
|
||||||
|
"postcss": ["postcss@8.5.15", "", { "dependencies": { "nanoid": "^3.3.12", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" } }, "sha512-FfR8sjd4em2T6fb3I2MwAJU7HWVMr9zba+enmQeeWFfCbm+UOC/0X4DS8XtpUTMwWMGbjKYP7xjfNekzyGmB3A=="],
|
||||||
|
|
||||||
|
"rollup": ["rollup@4.60.4", "", { "dependencies": { "@types/estree": "1.0.8" }, "optionalDependencies": { "@rollup/rollup-android-arm-eabi": "4.60.4", "@rollup/rollup-android-arm64": "4.60.4", "@rollup/rollup-darwin-arm64": "4.60.4", "@rollup/rollup-darwin-x64": "4.60.4", "@rollup/rollup-freebsd-arm64": "4.60.4", "@rollup/rollup-freebsd-x64": "4.60.4", "@rollup/rollup-linux-arm-gnueabihf": "4.60.4", "@rollup/rollup-linux-arm-musleabihf": "4.60.4", "@rollup/rollup-linux-arm64-gnu": "4.60.4", "@rollup/rollup-linux-arm64-musl": "4.60.4", "@rollup/rollup-linux-loong64-gnu": "4.60.4", "@rollup/rollup-linux-loong64-musl": "4.60.4", "@rollup/rollup-linux-ppc64-gnu": "4.60.4", "@rollup/rollup-linux-ppc64-musl": "4.60.4", "@rollup/rollup-linux-riscv64-gnu": "4.60.4", "@rollup/rollup-linux-riscv64-musl": "4.60.4", "@rollup/rollup-linux-s390x-gnu": "4.60.4", "@rollup/rollup-linux-x64-gnu": "4.60.4", "@rollup/rollup-linux-x64-musl": "4.60.4", "@rollup/rollup-openbsd-x64": "4.60.4", "@rollup/rollup-openharmony-arm64": "4.60.4", "@rollup/rollup-win32-arm64-msvc": "4.60.4", "@rollup/rollup-win32-ia32-msvc": "4.60.4", "@rollup/rollup-win32-x64-gnu": "4.60.4", "@rollup/rollup-win32-x64-msvc": "4.60.4", "fsevents": "~2.3.2" }, "bin": { "rollup": "dist/bin/rollup" } }, "sha512-WHeFSbZYsPu3+bLoNRUuAO+wavNlocOPf3wSHTP7hcFKVnJeWsYlCDbr3mTS14FCizf9ccIxXA8sGL8zKeQN3g=="],
|
||||||
|
|
||||||
|
"source-map-js": ["source-map-js@1.2.1", "", {}, "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA=="],
|
||||||
|
|
||||||
|
"typescript": ["typescript@5.4.5", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ=="],
|
||||||
|
|
||||||
|
"vite": ["vite@5.4.21", "", { "dependencies": { "esbuild": "^0.21.3", "postcss": "^8.4.43", "rollup": "^4.20.0" }, "optionalDependencies": { "fsevents": "~2.3.3" }, "peerDependencies": { "@types/node": "^18.0.0 || >=20.0.0", "less": "*", "lightningcss": "^1.21.0", "sass": "*", "sass-embedded": "*", "stylus": "*", "sugarss": "*", "terser": "^5.4.0" }, "optionalPeers": ["@types/node", "less", "lightningcss", "sass", "sass-embedded", "stylus", "sugarss", "terser"], "bin": { "vite": "bin/vite.js" } }, "sha512-o5a9xKjbtuhY6Bi5S3+HvbRERmouabWbyUcpXXUA1u+GNUKoROi9byOJ8M0nHbHYHkYICiMlqxkg1KkYmm25Sw=="],
|
||||||
|
|
||||||
|
"vscode-uri": ["vscode-uri@3.1.0", "", {}, "sha512-/BpdSx+yCQGnCvecbyXdxHDkuk55/G3xwnC0GqY4gmQ3j+A+g8kzzgB4Nk/SINjqn6+waqw3EgbVF2QKExkRxQ=="],
|
||||||
|
|
||||||
|
"vue": ["vue@3.5.34", "", { "dependencies": { "@vue/compiler-dom": "3.5.34", "@vue/compiler-sfc": "3.5.34", "@vue/runtime-dom": "3.5.34", "@vue/server-renderer": "3.5.34", "@vue/shared": "3.5.34" }, "peerDependencies": { "typescript": "*" }, "optionalPeers": ["typescript"] }, "sha512-WdLBG9gm02OgJIG9axd5Hpx0TFLdzVgfG2evFFu8Rur5O/IoGc5cMjnjh3tPL6GnRGsYvUhBSKVPYVcxRKpMCA=="],
|
||||||
|
|
||||||
|
"vue-demi": ["vue-demi@0.14.10", "", { "peerDependencies": { "@vue/composition-api": "^1.0.0-rc.1", "vue": "^3.0.0-0 || ^2.6.0" }, "optionalPeers": ["@vue/composition-api"], "bin": { "vue-demi-fix": "bin/vue-demi-fix.js", "vue-demi-switch": "bin/vue-demi-switch.js" } }, "sha512-nMZBOwuzabUO0nLgIcc6rycZEebF6eeUfaiQx9+WSk8e29IbLvPU9feI6tqW4kTo3hvoYAJkMh8n8D0fuISphg=="],
|
||||||
|
|
||||||
|
"vue-router": ["vue-router@4.6.4", "", { "dependencies": { "@vue/devtools-api": "^6.6.4" }, "peerDependencies": { "vue": "^3.5.0" } }, "sha512-Hz9q5sa33Yhduglwz6g9skT8OBPii+4bFn88w6J+J4MfEo4KRRpmiNG/hHHkdbRFlLBOqxN8y8gf2Fb0MTUgVg=="],
|
||||||
|
|
||||||
|
"vue-tsc": ["vue-tsc@2.2.12", "", { "dependencies": { "@volar/typescript": "2.4.15", "@vue/language-core": "2.2.12" }, "peerDependencies": { "typescript": ">=5.0.0" }, "bin": { "vue-tsc": "./bin/vue-tsc.js" } }, "sha512-P7OP77b2h/Pmk+lZdJ0YWs+5tJ6J2+uOQPo7tlBnY44QqQSPYvS0qVT4wqDJgwrZaLe47etJLLQRFia71GYITw=="],
|
||||||
|
}
|
||||||
|
}
|
||||||
+16
@@ -0,0 +1,16 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="es">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<title>Teloprax — Alpha</title>
|
||||||
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
||||||
|
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
||||||
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
||||||
|
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Space+Grotesk:wght@700&display=swap" rel="stylesheet" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="app"></div>
|
||||||
|
<script type="module" src="/src/main.ts"></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
{
|
||||||
|
"name": "kappa-hub",
|
||||||
|
"version": "0.1.0",
|
||||||
|
"private": true,
|
||||||
|
"type": "module",
|
||||||
|
"scripts": {
|
||||||
|
"dev": "vite",
|
||||||
|
"build": "vue-tsc --noEmit && vite build",
|
||||||
|
"preview": "vite preview",
|
||||||
|
"typecheck": "vue-tsc --noEmit"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"pinia": "^2.1.7",
|
||||||
|
"vue": "^3.4.21",
|
||||||
|
"vue-router": "^4.3.0",
|
||||||
|
"dexie": "^4.0.4"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@vitejs/plugin-vue": "^5.0.4",
|
||||||
|
"typescript": "~5.4.0",
|
||||||
|
"vite": "^5.2.0",
|
||||||
|
"vue-tsc": "^2.0.6"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
|
||||||
|
<rect width="32" height="32" rx="6" fill="#1A1A2E"/>
|
||||||
|
<circle cx="10" cy="16" r="4.5" fill="none" stroke="#E63946" stroke-width="2"/>
|
||||||
|
<circle cx="18" cy="16" r="5.5" fill="none" stroke="#E63946" stroke-width="2"/>
|
||||||
|
<circle cx="26" cy="16" r="6.5" fill="#E63946"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 338 B |
+12
@@ -0,0 +1,12 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
import { useAuthStore } from '@/stores/auth'
|
||||||
|
import LoginView from '@/views/LoginView.vue'
|
||||||
|
import AppShell from '@/components/layout/AppShell.vue'
|
||||||
|
|
||||||
|
const auth = useAuthStore()
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<LoginView v-if="!auth.isAuthenticated" />
|
||||||
|
<AppShell v-else />
|
||||||
|
</template>
|
||||||
@@ -0,0 +1,230 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
import { ref, onMounted } from 'vue'
|
||||||
|
import { useProjectsStore } from '@/stores/projects'
|
||||||
|
import { useAuthStore } from '@/stores/auth'
|
||||||
|
import DashboardView from '@/views/DashboardView.vue'
|
||||||
|
import CalendarView from '@/views/CalendarView.vue'
|
||||||
|
import SchedulerView from '@/views/SchedulerView.vue'
|
||||||
|
|
||||||
|
const projects = useProjectsStore()
|
||||||
|
const auth = useAuthStore()
|
||||||
|
|
||||||
|
const activeTab = ref<'dashboard' | 'calendar' | 'scheduler'>('dashboard')
|
||||||
|
|
||||||
|
const tabs = [
|
||||||
|
{ id: 'dashboard' as const, label: 'Diagnóstico' },
|
||||||
|
{ id: 'calendar' as const, label: 'Calendario' },
|
||||||
|
{ id: 'scheduler' as const, label: 'Recetas' },
|
||||||
|
]
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
projects.fetchProjects()
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="shell">
|
||||||
|
<aside class="sidebar">
|
||||||
|
<div class="sb-brand">
|
||||||
|
<div class="sb-circles">
|
||||||
|
<span class="c c1"></span>
|
||||||
|
<span class="c c2"></span>
|
||||||
|
<span class="c c3"></span>
|
||||||
|
</div>
|
||||||
|
<div class="sb-wordmark">
|
||||||
|
<span class="wm-name">teloprax</span>
|
||||||
|
<span class="wm-tag">Tecnología con prescripción</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="sb-nav">
|
||||||
|
<button
|
||||||
|
v-for="t in tabs"
|
||||||
|
:key="t.id"
|
||||||
|
:class="['sb-nav-item', { active: activeTab === t.id }]"
|
||||||
|
@click="activeTab = t.id"
|
||||||
|
>
|
||||||
|
{{ t.label }}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="sb-projects">
|
||||||
|
<div class="sb-label">Pacientes ({{ projects.count }})</div>
|
||||||
|
<button
|
||||||
|
v-for="p in projects.projects"
|
||||||
|
:key="p.id"
|
||||||
|
:class="['sb-item', { active: projects.selectedId === p.id }]"
|
||||||
|
@click="projects.select(p.id); activeTab = 'dashboard'"
|
||||||
|
>
|
||||||
|
<span class="sb-dot"></span>
|
||||||
|
{{ p.name }}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="sb-footer">
|
||||||
|
<div class="sb-user">{{ auth.user?.name }}</div>
|
||||||
|
<button class="sb-logout" @click="auth.logout">Salir</button>
|
||||||
|
</div>
|
||||||
|
</aside>
|
||||||
|
|
||||||
|
<main class="content">
|
||||||
|
<DashboardView v-if="activeTab === 'dashboard' && projects.selected" />
|
||||||
|
<div v-else-if="activeTab === 'dashboard' && !projects.selected" class="empty">
|
||||||
|
<p v-if="projects.loading">Cargando pacientes...</p>
|
||||||
|
<p v-else-if="projects.error" class="err">{{ projects.error }}</p>
|
||||||
|
<p v-else>Seleccioná un paciente del panel</p>
|
||||||
|
</div>
|
||||||
|
<CalendarView v-else-if="activeTab === 'calendar'" />
|
||||||
|
<SchedulerView v-else-if="activeTab === 'scheduler'" />
|
||||||
|
</main>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.shell {
|
||||||
|
display: flex;
|
||||||
|
height: 100vh;
|
||||||
|
background: #1A1A2E;
|
||||||
|
}
|
||||||
|
.sidebar {
|
||||||
|
width: 260px;
|
||||||
|
background: #141428;
|
||||||
|
border-right: 1px solid #2A2A45;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Brand */
|
||||||
|
.sb-brand {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 12px;
|
||||||
|
padding: 18px 20px;
|
||||||
|
border-bottom: 1px solid #2A2A45;
|
||||||
|
}
|
||||||
|
.sb-circles {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 3px;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
.c {
|
||||||
|
display: block;
|
||||||
|
border-radius: 50%;
|
||||||
|
border: 2px solid #E63946;
|
||||||
|
}
|
||||||
|
.c1 { width: 8px; height: 8px; opacity: 0.4; }
|
||||||
|
.c2 { width: 11px; height: 11px; opacity: 0.7; }
|
||||||
|
.c3 { width: 14px; height: 14px; background: #E63946; border: none; }
|
||||||
|
.sb-wordmark {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
.wm-name {
|
||||||
|
font-family: 'Space Grotesk', sans-serif;
|
||||||
|
font-weight: 700;
|
||||||
|
font-size: 17px;
|
||||||
|
color: #FFFFFF;
|
||||||
|
letter-spacing: -0.3px;
|
||||||
|
}
|
||||||
|
.wm-tag {
|
||||||
|
font-size: 10px;
|
||||||
|
color: #8888AA;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Nav */
|
||||||
|
.sb-nav {
|
||||||
|
padding: 8px 0;
|
||||||
|
border-bottom: 1px solid #2A2A45;
|
||||||
|
}
|
||||||
|
.sb-nav-item {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
padding: 9px 20px;
|
||||||
|
background: none;
|
||||||
|
border: none;
|
||||||
|
border-left: 2px solid transparent;
|
||||||
|
color: #8888AA;
|
||||||
|
font-size: 13px;
|
||||||
|
cursor: pointer;
|
||||||
|
text-align: left;
|
||||||
|
transition: all 0.15s;
|
||||||
|
}
|
||||||
|
.sb-nav-item:hover { background: rgba(230,57,70,0.05); color: #E6EDF3; }
|
||||||
|
.sb-nav-item.active {
|
||||||
|
background: rgba(230,57,70,0.08);
|
||||||
|
color: #E63946;
|
||||||
|
border-left-color: #E63946;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Projects */
|
||||||
|
.sb-projects { flex: 1; overflow-y: auto; padding: 8px 0; }
|
||||||
|
.sb-label {
|
||||||
|
font-size: 10px;
|
||||||
|
color: #666688;
|
||||||
|
text-transform: uppercase;
|
||||||
|
letter-spacing: 0.8px;
|
||||||
|
padding: 10px 20px 6px;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
.sb-item {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
width: 100%;
|
||||||
|
padding: 7px 20px;
|
||||||
|
background: none;
|
||||||
|
border: none;
|
||||||
|
color: #8888AA;
|
||||||
|
font-size: 13px;
|
||||||
|
cursor: pointer;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
.sb-item:hover { background: #1E1E36; color: #E6EDF3; }
|
||||||
|
.sb-item.active { background: #1E1E36; color: #E6EDF3; font-weight: 500; }
|
||||||
|
.sb-dot {
|
||||||
|
width: 6px; height: 6px;
|
||||||
|
border-radius: 50%;
|
||||||
|
background: #2A2A45;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
.sb-item.active .sb-dot { background: #E63946; }
|
||||||
|
|
||||||
|
/* Footer */
|
||||||
|
.sb-footer {
|
||||||
|
padding: 12px 20px;
|
||||||
|
border-top: 1px solid #2A2A45;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
.sb-user { font-size: 12px; color: #8888AA; }
|
||||||
|
.sb-logout {
|
||||||
|
background: none;
|
||||||
|
border: none;
|
||||||
|
color: #555577;
|
||||||
|
font-size: 11px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.sb-logout:hover { color: #E63946; }
|
||||||
|
|
||||||
|
/* Content */
|
||||||
|
.content {
|
||||||
|
flex: 1;
|
||||||
|
overflow-y: auto;
|
||||||
|
padding: 36px;
|
||||||
|
}
|
||||||
|
.empty {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
height: 100%;
|
||||||
|
color: #8888AA;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
.err { color: #F85149; }
|
||||||
|
</style>
|
||||||
Vendored
+7
@@ -0,0 +1,7 @@
|
|||||||
|
/// <reference types="vite/client" />
|
||||||
|
|
||||||
|
declare module '*.vue' {
|
||||||
|
import type { DefineComponent } from 'vue'
|
||||||
|
const component: DefineComponent<{}, {}, any>
|
||||||
|
export default component
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
import { createApp } from 'vue'
|
||||||
|
import { createPinia } from 'pinia'
|
||||||
|
import App from './App.vue'
|
||||||
|
import './style.css'
|
||||||
|
|
||||||
|
const app = createApp(App)
|
||||||
|
app.use(createPinia())
|
||||||
|
app.mount('#app')
|
||||||
@@ -0,0 +1,138 @@
|
|||||||
|
/**
|
||||||
|
* Feriados colombianos.
|
||||||
|
*
|
||||||
|
* Incluye:
|
||||||
|
* - Fechas fijas (no se mueven)
|
||||||
|
* - Fechas sujetas a Ley Emiliani (se trasladan al lunes siguiente)
|
||||||
|
* - Fechas variables basadas en Pascua
|
||||||
|
*
|
||||||
|
* Para RUMBO esto se vuelve multi-país. Por ahora solo Colombia.
|
||||||
|
*/
|
||||||
|
|
||||||
|
interface HolidayDef {
|
||||||
|
name: string
|
||||||
|
/** Si true, si cae entre martes y domingo se mueve al lunes siguiente */
|
||||||
|
emiliani: boolean
|
||||||
|
/** Mes 1-12 */
|
||||||
|
month: number
|
||||||
|
/** Día 1-31 (solo si no es basado en Pascua) */
|
||||||
|
day: number
|
||||||
|
/** Offset desde Pascua en días (solo si es basado en Pascua) */
|
||||||
|
easterOffset?: number
|
||||||
|
}
|
||||||
|
|
||||||
|
const HOLIDAY_DEFS: HolidayDef[] = [
|
||||||
|
{ name: 'Año Nuevo', emiliani: false, month: 1, day: 1 },
|
||||||
|
{ name: 'Reyes Magos', emiliani: true, month: 1, day: 6 },
|
||||||
|
{ name: 'San José', emiliani: true, month: 3, day: 19 },
|
||||||
|
{ name: 'Jueves Santo', emiliani: false, month: 0, day: 0, easterOffset: -3 },
|
||||||
|
{ name: 'Viernes Santo', emiliani: false, month: 0, day: 0, easterOffset: -2 },
|
||||||
|
{ name: 'Domingo de Pascua', emiliani: false, month: 0, day: 0, easterOffset: 0 },
|
||||||
|
{ name: 'Día del Trabajo', emiliani: false, month: 5, day: 1 },
|
||||||
|
{ name: 'Ascensión del Señor', emiliani: true, month: 0, day: 0, easterOffset: 43 },
|
||||||
|
{ name: 'Corpus Christi', emiliani: true, month: 0, day: 0, easterOffset: 64 },
|
||||||
|
{ name: 'Sagrado Corazón', emiliani: true, month: 0, day: 0, easterOffset: 71 },
|
||||||
|
{ name: 'San Pedro y San Pablo', emiliani: true, month: 6, day: 29 },
|
||||||
|
{ name: 'Día de la Independencia',emiliani: false, month: 7, day: 20 },
|
||||||
|
{ name: 'Batalla de Boyacá', emiliani: false, month: 8, day: 7 },
|
||||||
|
{ name: 'Asunción de la Virgen', emiliani: true, month: 8, day: 15 },
|
||||||
|
{ name: 'Día de la Raza', emiliani: true, month: 10, day: 12 },
|
||||||
|
{ name: 'Todos los Santos', emiliani: true, month: 11, day: 1 },
|
||||||
|
{ name: 'Indep. de Cartagena', emiliani: true, month: 11, day: 11 },
|
||||||
|
{ name: 'Inmaculada Concepción', emiliani: false, month: 12, day: 8 },
|
||||||
|
{ name: 'Navidad', emiliani: false, month: 12, day: 25 },
|
||||||
|
]
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Calcula la fecha de Pascua (Domingo de Resurrección) para un año dado.
|
||||||
|
* Algoritmo de Butcher (Gregoriano).
|
||||||
|
*/
|
||||||
|
function easterSunday(year: number): Date {
|
||||||
|
const a = year % 19
|
||||||
|
const b = Math.floor(year / 100)
|
||||||
|
const c = year % 100
|
||||||
|
const d = Math.floor(b / 4)
|
||||||
|
const e = b % 4
|
||||||
|
const f = Math.floor((b + 8) / 25)
|
||||||
|
const g = Math.floor((b - f + 1) / 3)
|
||||||
|
const h = (19 * a + b - d - g + 15) % 30
|
||||||
|
const i = Math.floor(c / 4)
|
||||||
|
const k = c % 4
|
||||||
|
const l = (32 + 2 * e + 2 * i - h - k) % 7
|
||||||
|
const m = Math.floor((a + 11 * h + 22 * l) / 451)
|
||||||
|
const month = Math.floor((h + l - 7 * m + 114) / 31)
|
||||||
|
const day = ((h + l - 7 * m + 114) % 31) + 1
|
||||||
|
return new Date(year, month - 1, day)
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Aplica la Ley Emiliani: si la fecha no cae en lunes, la mueve al lunes siguiente.
|
||||||
|
*/
|
||||||
|
function applyEmiliani(date: Date): Date {
|
||||||
|
const dayOfWeek = date.getDay() // 0=dom, 1=lun, ..., 6=sáb
|
||||||
|
if (dayOfWeek === 1) return date // ya es lunes
|
||||||
|
const daysUntilMonday = (8 - dayOfWeek) % 7
|
||||||
|
const result = new Date(date)
|
||||||
|
result.setDate(result.getDate() + daysUntilMonday)
|
||||||
|
return result
|
||||||
|
}
|
||||||
|
|
||||||
|
function dateFromDayMonth(year: number, month: number, day: number): Date {
|
||||||
|
return new Date(year, month - 1, day)
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getColombianHolidays(year: number): { date: Date; name: string }[] {
|
||||||
|
const easter = easterSunday(year)
|
||||||
|
const holidays: { date: Date; name: string }[] = []
|
||||||
|
|
||||||
|
for (const def of HOLIDAY_DEFS) {
|
||||||
|
let date: Date
|
||||||
|
|
||||||
|
if (def.easterOffset !== undefined) {
|
||||||
|
date = new Date(easter)
|
||||||
|
date.setDate(date.getDate() + def.easterOffset)
|
||||||
|
} else {
|
||||||
|
date = dateFromDayMonth(year, def.month, def.day)
|
||||||
|
}
|
||||||
|
|
||||||
|
if (def.emiliani) {
|
||||||
|
date = applyEmiliani(date)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Solo agregar si no es domingo ya (los domingos siempre son no laborales)
|
||||||
|
holidays.push({ date, name: def.name })
|
||||||
|
}
|
||||||
|
|
||||||
|
return holidays.sort((a, b) => a.date.getTime() - b.date.getTime())
|
||||||
|
}
|
||||||
|
|
||||||
|
export function isHoliday(date: Date): { holiday: boolean; name?: string } {
|
||||||
|
const year = date.getFullYear()
|
||||||
|
const holidays = getColombianHolidays(year)
|
||||||
|
const found = holidays.find(h =>
|
||||||
|
h.date.getFullYear() === date.getFullYear() &&
|
||||||
|
h.date.getMonth() === date.getMonth() &&
|
||||||
|
h.date.getDate() === date.getDate()
|
||||||
|
)
|
||||||
|
return found ? { holiday: true, name: found.name } : { holiday: false }
|
||||||
|
}
|
||||||
|
|
||||||
|
export function isWorkingDay(date: Date): boolean {
|
||||||
|
const day = date.getDay()
|
||||||
|
if (day === 0 || day === 6) return false
|
||||||
|
return !isHoliday(date).holiday
|
||||||
|
}
|
||||||
|
|
||||||
|
export function addWorkingDays(date: Date, days: number): Date {
|
||||||
|
const result = new Date(date)
|
||||||
|
let added = 0
|
||||||
|
while (added < days) {
|
||||||
|
result.setDate(result.getDate() + 1)
|
||||||
|
if (isWorkingDay(result)) added++
|
||||||
|
}
|
||||||
|
return result
|
||||||
|
}
|
||||||
|
|
||||||
|
export function nextWorkingDay(date: Date): Date {
|
||||||
|
return addWorkingDays(date, 1)
|
||||||
|
}
|
||||||
@@ -0,0 +1,128 @@
|
|||||||
|
import type {
|
||||||
|
KappaLoginPayload,
|
||||||
|
KappaLoginResponse,
|
||||||
|
KappaInitiative,
|
||||||
|
KappaUserStory,
|
||||||
|
KappaLogbookMaster,
|
||||||
|
KappaLogbookEntry,
|
||||||
|
KappaPlanningMaster,
|
||||||
|
KappaPlanningEntry,
|
||||||
|
KappaBusinessRule,
|
||||||
|
KappaRequirement,
|
||||||
|
} from '@/types/kappa'
|
||||||
|
|
||||||
|
const BASE = '/api'
|
||||||
|
|
||||||
|
class KappaAPI {
|
||||||
|
private token: string | null = null
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
this.token = localStorage.getItem('kappa_token')
|
||||||
|
}
|
||||||
|
|
||||||
|
private get headers(): Record<string, string> {
|
||||||
|
const h: Record<string, string> = {
|
||||||
|
'Content-Type': 'application/json',
|
||||||
|
}
|
||||||
|
if (this.token) {
|
||||||
|
h['Authorization'] = `Bearer ${this.token}`
|
||||||
|
}
|
||||||
|
return h
|
||||||
|
}
|
||||||
|
|
||||||
|
private async request<T>(
|
||||||
|
method: string,
|
||||||
|
path: string,
|
||||||
|
body?: unknown
|
||||||
|
): Promise<T> {
|
||||||
|
const opts: RequestInit = {
|
||||||
|
method,
|
||||||
|
headers: this.headers,
|
||||||
|
}
|
||||||
|
if (body && method !== 'GET') {
|
||||||
|
opts.body = JSON.stringify(body)
|
||||||
|
}
|
||||||
|
const res = await fetch(`${BASE}${path}`, opts)
|
||||||
|
if (!res.ok) {
|
||||||
|
const text = await res.text()
|
||||||
|
throw new Error(`KAPPA ${method} ${path}: ${res.status} — ${text.slice(0, 200)}`)
|
||||||
|
}
|
||||||
|
return res.json()
|
||||||
|
}
|
||||||
|
|
||||||
|
// ─── Auth ────────────────────────────────────────────
|
||||||
|
|
||||||
|
async login(payload: KappaLoginPayload): Promise<KappaLoginResponse> {
|
||||||
|
const data = await this.request<KappaLoginResponse>(
|
||||||
|
'POST',
|
||||||
|
'/users/login/',
|
||||||
|
payload
|
||||||
|
)
|
||||||
|
this.token = data.access || data.token || data.key || null
|
||||||
|
if (this.token) {
|
||||||
|
localStorage.setItem('kappa_token', this.token)
|
||||||
|
}
|
||||||
|
return data
|
||||||
|
}
|
||||||
|
|
||||||
|
logout() {
|
||||||
|
this.token = null
|
||||||
|
localStorage.removeItem('kappa_token')
|
||||||
|
}
|
||||||
|
|
||||||
|
get isAuthenticated(): boolean {
|
||||||
|
return !!this.token
|
||||||
|
}
|
||||||
|
|
||||||
|
// ─── Proyectos (Initiatives) ─────────────────────────
|
||||||
|
|
||||||
|
async getInitiatives(): Promise<KappaInitiative[]> {
|
||||||
|
return this.request<KappaInitiative[]>('GET', '/initiatives-all/')
|
||||||
|
}
|
||||||
|
|
||||||
|
// ─── User Stories ────────────────────────────────────
|
||||||
|
|
||||||
|
async createUserStory(story: KappaUserStory): Promise<KappaUserStory> {
|
||||||
|
return this.request<KappaUserStory>('POST', '/userstorys/create/', story)
|
||||||
|
}
|
||||||
|
|
||||||
|
// ─── Users ───────────────────────────────────────────
|
||||||
|
|
||||||
|
async getUsers(): Promise<unknown[]> {
|
||||||
|
return this.request<unknown[]>('GET', '/users/all/')
|
||||||
|
}
|
||||||
|
|
||||||
|
// ─── Bitácoras (Logbooks) ────────────────────────────
|
||||||
|
|
||||||
|
async createLogbookMaster(data: KappaLogbookMaster): Promise<KappaLogbookMaster> {
|
||||||
|
return this.request<KappaLogbookMaster>('POST', '/logbooks_master/create/', data)
|
||||||
|
}
|
||||||
|
|
||||||
|
async createLogbookEntry(data: KappaLogbookEntry): Promise<KappaLogbookEntry> {
|
||||||
|
return this.request<KappaLogbookEntry>('POST', '/logbooks/create/', data)
|
||||||
|
}
|
||||||
|
|
||||||
|
// ─── Planeaciones (Plannings) ────────────────────────
|
||||||
|
|
||||||
|
async createPlanningMaster(data: KappaPlanningMaster): Promise<KappaPlanningMaster> {
|
||||||
|
return this.request<KappaPlanningMaster>('POST', '/plannings_master/create/', data)
|
||||||
|
}
|
||||||
|
|
||||||
|
async createPlanningEntry(data: KappaPlanningEntry): Promise<KappaPlanningEntry> {
|
||||||
|
return this.request<KappaPlanningEntry>('POST', '/plannings/create/', data)
|
||||||
|
}
|
||||||
|
|
||||||
|
// ─── Business Rules ──────────────────────────────────
|
||||||
|
|
||||||
|
async createBusinessRule(data: KappaBusinessRule): Promise<unknown> {
|
||||||
|
return this.request<unknown>('POST', '/business-rules/create/', data)
|
||||||
|
}
|
||||||
|
|
||||||
|
// ─── Requisitos ──────────────────────────────────────
|
||||||
|
|
||||||
|
async createRequirement(data: KappaRequirement): Promise<unknown> {
|
||||||
|
return this.request<unknown>('POST', '/functionalrequirements/create/', data)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export const kappa = new KappaAPI()
|
||||||
@@ -0,0 +1,201 @@
|
|||||||
|
/**
|
||||||
|
* Scheduler tipo cron para KAPPA Hub.
|
||||||
|
*
|
||||||
|
* Las tareas se ejecutan solo cuando la app está abierta (web app).
|
||||||
|
* En RUMBO (Tauri) esto se vuelve un proceso en segundo plano real.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import Dexie, { type EntityTable } from 'dexie'
|
||||||
|
|
||||||
|
interface ScheduleRule {
|
||||||
|
id?: number
|
||||||
|
name: string
|
||||||
|
description?: string
|
||||||
|
/** 0=dom, 1=lun, ..., 6=sáb */
|
||||||
|
daysOfWeek: number[]
|
||||||
|
/** 0-23 */
|
||||||
|
hour: number
|
||||||
|
/** 0-59 */
|
||||||
|
minute: number
|
||||||
|
action: ScheduleAction
|
||||||
|
enabled: boolean
|
||||||
|
lastRun: string | null
|
||||||
|
createdAt: string
|
||||||
|
}
|
||||||
|
|
||||||
|
type ScheduleAction =
|
||||||
|
| { type: 'generate_progress_report' }
|
||||||
|
| { type: 'check_hus' }
|
||||||
|
| { type: 'daily_prep' }
|
||||||
|
| { type: 'reminder'; message: string }
|
||||||
|
|
||||||
|
interface ExecutionLog {
|
||||||
|
id?: number
|
||||||
|
ruleId: number
|
||||||
|
ruleName: string
|
||||||
|
executedAt: string
|
||||||
|
success: boolean
|
||||||
|
message: string
|
||||||
|
}
|
||||||
|
|
||||||
|
const db = new Dexie('kappa-hub-scheduler') as Dexie & {
|
||||||
|
rules: EntityTable<ScheduleRule, 'id'>
|
||||||
|
logs: EntityTable<ExecutionLog, 'id'>
|
||||||
|
}
|
||||||
|
|
||||||
|
db.version(1).stores({
|
||||||
|
rules: '++id, enabled, hour, minute',
|
||||||
|
logs: '++id, ruleId, executedAt',
|
||||||
|
})
|
||||||
|
|
||||||
|
export { db }
|
||||||
|
export type { ScheduleRule, ScheduleAction, ExecutionLog }
|
||||||
|
|
||||||
|
// ─── Engine ─────────────────────────────────────────────────
|
||||||
|
|
||||||
|
type Subscriber = (ruleId: number, message: string) => void
|
||||||
|
|
||||||
|
let intervalId: ReturnType<typeof setInterval> | null = null
|
||||||
|
let subscribers: Subscriber[] = []
|
||||||
|
|
||||||
|
function now(): string {
|
||||||
|
return new Date().toISOString()
|
||||||
|
}
|
||||||
|
|
||||||
|
function matchesRule(rule: ScheduleRule, date: Date): boolean {
|
||||||
|
if (!rule.enabled) return false
|
||||||
|
if (!rule.daysOfWeek.includes(date.getDay())) return false
|
||||||
|
if (rule.hour !== date.getHours()) return false
|
||||||
|
if (rule.minute !== date.getMinutes()) return false
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
async function executeRule(rule: ScheduleRule): Promise<string> {
|
||||||
|
const projectNames: string[] = [] // se llenará del store
|
||||||
|
|
||||||
|
switch (rule.action.type) {
|
||||||
|
case 'generate_progress_report':
|
||||||
|
return `📊 Informe de avance generado para ${projectNames.length || 'todos los'} proyectos.`
|
||||||
|
|
||||||
|
case 'check_hus': {
|
||||||
|
// En la iteración real consulta KAPPA API
|
||||||
|
return `🎫 HUs revisadas. ${projectNames.length || 'N'} proyectos actualizados.`
|
||||||
|
}
|
||||||
|
|
||||||
|
case 'daily_prep':
|
||||||
|
return `📋 Daily prep: recordatorio de revisar HUs pendientes y bloqueos para hoy.`
|
||||||
|
|
||||||
|
case 'reminder':
|
||||||
|
return `⏰ ${rule.action.message}`
|
||||||
|
|
||||||
|
default:
|
||||||
|
return `✅ Tarea "${rule.name}" ejecutada.`
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function runRule(rule: ScheduleRule) {
|
||||||
|
let success = true
|
||||||
|
let message = ''
|
||||||
|
try {
|
||||||
|
message = await executeRule(rule)
|
||||||
|
} catch (e: any) {
|
||||||
|
success = false
|
||||||
|
message = e.message
|
||||||
|
}
|
||||||
|
|
||||||
|
await db.rules.update(rule.id!, { lastRun: now() })
|
||||||
|
await db.logs.add({
|
||||||
|
ruleId: rule.id!,
|
||||||
|
ruleName: rule.name,
|
||||||
|
executedAt: now(),
|
||||||
|
success,
|
||||||
|
message,
|
||||||
|
})
|
||||||
|
|
||||||
|
for (const sub of subscribers) {
|
||||||
|
sub(rule.id!, message)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function tick() {
|
||||||
|
const date = new Date()
|
||||||
|
const rules = await db.rules.where('enabled').equals(1).toArray()
|
||||||
|
for (const rule of rules) {
|
||||||
|
if (matchesRule(rule, date)) {
|
||||||
|
await runRule(rule)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export function startScheduler() {
|
||||||
|
if (intervalId) return
|
||||||
|
tick() // ejecutar inmediatamente por si acaba de pasar el minuto
|
||||||
|
intervalId = setInterval(tick, 60_000) // cada minuto
|
||||||
|
}
|
||||||
|
|
||||||
|
export function stopScheduler() {
|
||||||
|
if (intervalId) {
|
||||||
|
clearInterval(intervalId)
|
||||||
|
intervalId = null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export function onScheduledTask(cb: Subscriber) {
|
||||||
|
subscribers.push(cb)
|
||||||
|
return () => {
|
||||||
|
subscribers = subscribers.filter(s => s !== cb)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ─── Helpers ────────────────────────────────────────────────
|
||||||
|
|
||||||
|
export function computeNextRun(rule: ScheduleRule): Date | null {
|
||||||
|
if (!rule.enabled || rule.daysOfWeek.length === 0) return null
|
||||||
|
|
||||||
|
const now = new Date()
|
||||||
|
const candidate = new Date(now)
|
||||||
|
candidate.setHours(rule.hour, rule.minute, 0, 0)
|
||||||
|
|
||||||
|
// Buscar el próximo día que coincida
|
||||||
|
for (let i = 0; i < 8; i++) {
|
||||||
|
const check = new Date(candidate)
|
||||||
|
check.setDate(check.getDate() + i)
|
||||||
|
|
||||||
|
if (rule.daysOfWeek.includes(check.getDay())) {
|
||||||
|
if (check > now) return check
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
|
export const DAY_LABELS = ['Dom', 'Lun', 'Mar', 'Mié', 'Jue', 'Vie', 'Sáb']
|
||||||
|
|
||||||
|
export const DEFAULT_RULES: Omit<ScheduleRule, 'id' | 'createdAt' | 'lastRun'>[] = [
|
||||||
|
{
|
||||||
|
name: 'Informe semanal de avance',
|
||||||
|
description: 'Genera un resumen de estado de cada proyecto activo',
|
||||||
|
daysOfWeek: [5], // viernes
|
||||||
|
hour: 9,
|
||||||
|
minute: 0,
|
||||||
|
action: { type: 'generate_progress_report' },
|
||||||
|
enabled: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Revisión de HUs pendientes',
|
||||||
|
description: 'Revisa HUs en progreso, bloqueadas y vencidas en todos los proyectos',
|
||||||
|
daysOfWeek: [1, 2, 3, 4, 5], // lun-vie
|
||||||
|
hour: 8,
|
||||||
|
minute: 0,
|
||||||
|
action: { type: 'check_hus' },
|
||||||
|
enabled: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Daily prep',
|
||||||
|
description: 'Prepara el resumen diario: qué HUs toca hoy, bloqueos, entregables próximos',
|
||||||
|
daysOfWeek: [1, 2, 3, 4, 5],
|
||||||
|
hour: 7,
|
||||||
|
minute: 30,
|
||||||
|
action: { type: 'daily_prep' },
|
||||||
|
enabled: true,
|
||||||
|
},
|
||||||
|
]
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
import { defineStore } from 'pinia'
|
||||||
|
import { ref, computed } from 'vue'
|
||||||
|
import { kappa } from '@/services/kappa-api'
|
||||||
|
import type { KappaLoginPayload } from '@/types/kappa'
|
||||||
|
|
||||||
|
export const useAuthStore = defineStore('auth', () => {
|
||||||
|
const token = ref<string | null>(localStorage.getItem('kappa_token'))
|
||||||
|
const user = ref<{ name: string; email: string } | null>(null)
|
||||||
|
const loading = ref(false)
|
||||||
|
const error = ref<string | null>(null)
|
||||||
|
|
||||||
|
const isAuthenticated = computed(() => !!token.value)
|
||||||
|
|
||||||
|
async function login(payload: KappaLoginPayload) {
|
||||||
|
loading.value = true
|
||||||
|
error.value = null
|
||||||
|
try {
|
||||||
|
const data = await kappa.login(payload)
|
||||||
|
token.value = kappa['token'] // sync with the service instance
|
||||||
|
user.value = {
|
||||||
|
name: `${data.user?.first_name || ''} ${data.user?.last_name || ''}`.trim(),
|
||||||
|
email: payload.email,
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
} catch (e: any) {
|
||||||
|
error.value = e.message
|
||||||
|
return false
|
||||||
|
} finally {
|
||||||
|
loading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function logout() {
|
||||||
|
kappa.logout()
|
||||||
|
token.value = null
|
||||||
|
user.value = null
|
||||||
|
}
|
||||||
|
|
||||||
|
return { token, user, loading, error, isAuthenticated, login, logout }
|
||||||
|
})
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
import { defineStore } from 'pinia'
|
||||||
|
import { ref, computed } from 'vue'
|
||||||
|
import { kappa } from '@/services/kappa-api'
|
||||||
|
import type { KappaInitiative } from '@/types/kappa'
|
||||||
|
|
||||||
|
export const useProjectsStore = defineStore('projects', () => {
|
||||||
|
const projects = ref<KappaInitiative[]>([])
|
||||||
|
const loading = ref(false)
|
||||||
|
const error = ref<string | null>(null)
|
||||||
|
const selectedId = ref<number | null>(null)
|
||||||
|
|
||||||
|
const selected = computed(() =>
|
||||||
|
projects.value.find(p => p.id === selectedId.value) ?? null
|
||||||
|
)
|
||||||
|
|
||||||
|
const count = computed(() => projects.value.length)
|
||||||
|
|
||||||
|
async function fetchProjects() {
|
||||||
|
loading.value = true
|
||||||
|
error.value = null
|
||||||
|
try {
|
||||||
|
projects.value = await kappa.getInitiatives()
|
||||||
|
} catch (e: any) {
|
||||||
|
error.value = e.message
|
||||||
|
} finally {
|
||||||
|
loading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function select(id: number) {
|
||||||
|
selectedId.value = id
|
||||||
|
localStorage.setItem('kappa_last_project', String(id))
|
||||||
|
}
|
||||||
|
|
||||||
|
return { projects, loading, error, selectedId, selected, count, fetchProjects, select }
|
||||||
|
})
|
||||||
@@ -0,0 +1,101 @@
|
|||||||
|
import { defineStore } from 'pinia'
|
||||||
|
import { ref, computed } from 'vue'
|
||||||
|
import {
|
||||||
|
db, startScheduler, stopScheduler, onScheduledTask,
|
||||||
|
computeNextRun, DEFAULT_RULES,
|
||||||
|
type ScheduleRule, type ScheduleAction, type ExecutionLog,
|
||||||
|
} from '@/services/scheduler'
|
||||||
|
|
||||||
|
export const useSchedulerStore = defineStore('scheduler', () => {
|
||||||
|
const rules = ref<ScheduleRule[]>([])
|
||||||
|
const logs = ref<ExecutionLog[]>([])
|
||||||
|
const notifications = ref<{ id: number; ruleId: number; message: string; time: string }[]>([])
|
||||||
|
const running = ref(false)
|
||||||
|
|
||||||
|
const enabledRules = computed(() => rules.value.filter(r => r.enabled))
|
||||||
|
const nextRuns = computed(() => {
|
||||||
|
return rules.value.map(r => ({
|
||||||
|
...r,
|
||||||
|
nextRun: computeNextRun(r),
|
||||||
|
}))
|
||||||
|
})
|
||||||
|
|
||||||
|
async function loadRules() {
|
||||||
|
rules.value = await db.rules.toArray()
|
||||||
|
}
|
||||||
|
|
||||||
|
async function loadLogs(limit = 50) {
|
||||||
|
logs.value = await db.logs.orderBy('executedAt').reverse().limit(limit).toArray()
|
||||||
|
}
|
||||||
|
|
||||||
|
async function seedDefaults() {
|
||||||
|
const existing = await db.rules.count()
|
||||||
|
if (existing > 0) return
|
||||||
|
const now = new Date().toISOString()
|
||||||
|
for (const def of DEFAULT_RULES) {
|
||||||
|
await db.rules.add({ ...def, createdAt: now, lastRun: null } as ScheduleRule)
|
||||||
|
}
|
||||||
|
await loadRules()
|
||||||
|
}
|
||||||
|
|
||||||
|
async function addRule(rule: Omit<ScheduleRule, 'id' | 'createdAt' | 'lastRun'>) {
|
||||||
|
await db.rules.add({
|
||||||
|
...rule,
|
||||||
|
createdAt: new Date().toISOString(),
|
||||||
|
lastRun: null,
|
||||||
|
} as ScheduleRule)
|
||||||
|
await loadRules()
|
||||||
|
}
|
||||||
|
|
||||||
|
async function updateRule(id: number, changes: Partial<ScheduleRule>) {
|
||||||
|
await db.rules.update(id, changes)
|
||||||
|
await loadRules()
|
||||||
|
}
|
||||||
|
|
||||||
|
async function toggleRule(id: number) {
|
||||||
|
const rule = rules.value.find(r => r.id === id)
|
||||||
|
if (rule) {
|
||||||
|
await db.rules.update(id, { enabled: !rule.enabled })
|
||||||
|
await loadRules()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function deleteRule(id: number) {
|
||||||
|
await db.rules.delete(id)
|
||||||
|
await loadRules()
|
||||||
|
}
|
||||||
|
|
||||||
|
function start() {
|
||||||
|
startScheduler()
|
||||||
|
running.value = true
|
||||||
|
|
||||||
|
onScheduledTask((ruleId, message) => {
|
||||||
|
notifications.value.unshift({
|
||||||
|
id: Date.now(),
|
||||||
|
ruleId,
|
||||||
|
message,
|
||||||
|
time: new Date().toLocaleTimeString(),
|
||||||
|
})
|
||||||
|
loadLogs()
|
||||||
|
// Mantener solo últimas 20 notificaciones
|
||||||
|
if (notifications.value.length > 20) {
|
||||||
|
notifications.value = notifications.value.slice(0, 20)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function stop() {
|
||||||
|
stopScheduler()
|
||||||
|
running.value = false
|
||||||
|
}
|
||||||
|
|
||||||
|
function dismissNotification(id: number) {
|
||||||
|
notifications.value = notifications.value.filter(n => n.id !== id)
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
rules, logs, notifications, running, enabledRules, nextRuns,
|
||||||
|
loadRules, loadLogs, seedDefaults, addRule, updateRule,
|
||||||
|
toggleRule, deleteRule, start, stop, dismissNotification,
|
||||||
|
}
|
||||||
|
})
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
import { defineStore } from 'pinia'
|
||||||
|
import { ref } from 'vue'
|
||||||
|
import { kappa } from '@/services/kappa-api'
|
||||||
|
import type { KappaUserStory } from '@/types/kappa'
|
||||||
|
|
||||||
|
export const useWorkItemsStore = defineStore('workitems', () => {
|
||||||
|
const creating = ref(false)
|
||||||
|
const error = ref<string | null>(null)
|
||||||
|
|
||||||
|
async function createUserStory(story: KappaUserStory): Promise<KappaUserStory | null> {
|
||||||
|
creating.value = true
|
||||||
|
error.value = null
|
||||||
|
try {
|
||||||
|
const result = await kappa.createUserStory(story)
|
||||||
|
return result
|
||||||
|
} catch (e: any) {
|
||||||
|
error.value = e.message
|
||||||
|
return null
|
||||||
|
} finally {
|
||||||
|
creating.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return { creating, error, createUserStory }
|
||||||
|
})
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
:root {
|
||||||
|
--bg-primary: #1A1A2E;
|
||||||
|
--bg-secondary: #141428;
|
||||||
|
--bg-tertiary: #1E1E36;
|
||||||
|
--bg-input: #1A1A2E;
|
||||||
|
--border: #2A2A45;
|
||||||
|
--border-hover: #3A3A55;
|
||||||
|
--text-primary: #E6EDF3;
|
||||||
|
--text-secondary: #8888AA;
|
||||||
|
--text-muted: #555577;
|
||||||
|
--accent: #E63946;
|
||||||
|
--accent-hover: #C62E3A;
|
||||||
|
--success: #3FB950;
|
||||||
|
--warning: #D29922;
|
||||||
|
--error: #F85149;
|
||||||
|
--radius: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
*,
|
||||||
|
*::before,
|
||||||
|
*::after {
|
||||||
|
box-sizing: border-box;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
html, body {
|
||||||
|
height: 100%;
|
||||||
|
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 1.5;
|
||||||
|
color: var(--text-primary);
|
||||||
|
background: var(--bg-primary);
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
-moz-osx-font-smoothing: grayscale;
|
||||||
|
}
|
||||||
|
|
||||||
|
#app {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
input, select, button, textarea {
|
||||||
|
font-family: inherit;
|
||||||
|
font-size: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: var(--accent);
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-scrollbar { width: 6px; }
|
||||||
|
::-webkit-scrollbar-track { background: transparent; }
|
||||||
|
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
|
||||||
|
::-webkit-scrollbar-thumb:hover { background: var(--border-hover); }
|
||||||
|
|
||||||
|
.sch-view,
|
||||||
|
.cal-view {
|
||||||
|
max-width: 960px;
|
||||||
|
}
|
||||||
@@ -0,0 +1,103 @@
|
|||||||
|
export interface KappaLoginPayload {
|
||||||
|
email: string
|
||||||
|
password: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface KappaLoginResponse {
|
||||||
|
access?: string
|
||||||
|
token?: string
|
||||||
|
key?: string
|
||||||
|
user?: KappaUser
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface KappaUser {
|
||||||
|
id: number
|
||||||
|
email: string
|
||||||
|
first_name: string
|
||||||
|
last_name: string
|
||||||
|
username?: string
|
||||||
|
is_staff?: boolean
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface KappaInitiative {
|
||||||
|
id: number
|
||||||
|
name: string
|
||||||
|
key?: string
|
||||||
|
description?: string
|
||||||
|
start_date?: string
|
||||||
|
end_date?: string
|
||||||
|
status?: string
|
||||||
|
created_at?: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface KappaUserStory {
|
||||||
|
id?: number
|
||||||
|
code?: string
|
||||||
|
title: string
|
||||||
|
description?: string
|
||||||
|
acceptance_criteria?: string
|
||||||
|
status?: string
|
||||||
|
priority?: string
|
||||||
|
initiative: number | string
|
||||||
|
created_at?: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface KappaLogbookMaster {
|
||||||
|
id?: number
|
||||||
|
initiative: number | string
|
||||||
|
name: string
|
||||||
|
description?: string
|
||||||
|
created_at?: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface KappaLogbookEntry {
|
||||||
|
id?: number
|
||||||
|
logbook_master?: number
|
||||||
|
initiative?: number | string
|
||||||
|
date: string
|
||||||
|
description: string
|
||||||
|
hours?: number
|
||||||
|
created_at?: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface KappaPlanningMaster {
|
||||||
|
id?: number
|
||||||
|
initiative: number | string
|
||||||
|
name: string
|
||||||
|
description?: string
|
||||||
|
start_date?: string
|
||||||
|
end_date?: string
|
||||||
|
created_at?: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface KappaPlanningEntry {
|
||||||
|
id?: number
|
||||||
|
planning_master?: number
|
||||||
|
initiative?: number | string
|
||||||
|
description: string
|
||||||
|
responsible?: string
|
||||||
|
start_date?: string
|
||||||
|
end_date?: string
|
||||||
|
created_at?: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface KappaBusinessRule {
|
||||||
|
name: string
|
||||||
|
description: string
|
||||||
|
initiative: number | string
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface KappaRequirement {
|
||||||
|
name: string
|
||||||
|
description: string
|
||||||
|
initiative: number | string
|
||||||
|
type: 'funcional' | 'no_funcional'
|
||||||
|
name_requirement?: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface PaginatedResponse<T> {
|
||||||
|
count: number
|
||||||
|
next: string | null
|
||||||
|
previous: string | null
|
||||||
|
results: T[]
|
||||||
|
}
|
||||||
@@ -0,0 +1,149 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
import { ref, computed } from 'vue'
|
||||||
|
import { getColombianHolidays, isHoliday } from '@/services/calendar'
|
||||||
|
|
||||||
|
const today = new Date()
|
||||||
|
const currentYear = ref(today.getFullYear())
|
||||||
|
const currentMonth = ref(today.getMonth())
|
||||||
|
const selectedDate = ref<Date | null>(null)
|
||||||
|
|
||||||
|
const MONTHS = [
|
||||||
|
'Enero', 'Febrero', 'Marzo', 'Abril', 'Mayo', 'Junio',
|
||||||
|
'Julio', 'Agosto', 'Septiembre', 'Octubre', 'Noviembre', 'Diciembre',
|
||||||
|
]
|
||||||
|
const WEEKDAYS = ['Dom', 'Lun', 'Mar', 'Mié', 'Jue', 'Vie', 'Sáb']
|
||||||
|
|
||||||
|
const holidays = computed(() => {
|
||||||
|
const h = getColombianHolidays(currentYear.value)
|
||||||
|
return new Map(h.map(h => [`${h.date.getFullYear()}-${h.date.getMonth()}-${h.date.getDate()}`, h.name]))
|
||||||
|
})
|
||||||
|
|
||||||
|
const daysInMonth = computed(() => {
|
||||||
|
const year = currentYear.value
|
||||||
|
const month = currentMonth.value
|
||||||
|
const firstDay = new Date(year, month, 1).getDay()
|
||||||
|
const totalDays = new Date(year, month + 1, 0).getDate()
|
||||||
|
|
||||||
|
return Array.from({ length: firstDay + totalDays }, (_, i) => {
|
||||||
|
if (i < firstDay) return { day: null, isToday: false, isHoliday: false, isWeekend: false, isSelected: false, holidayName: undefined as string | undefined }
|
||||||
|
const d = i - firstDay + 1
|
||||||
|
const date = new Date(year, month, d)
|
||||||
|
const key = `${year}-${month}-${d}`
|
||||||
|
const h = holidays.value.get(key)
|
||||||
|
const dow = date.getDay()
|
||||||
|
return {
|
||||||
|
day: d,
|
||||||
|
isToday: d === today.getDate() && month === today.getMonth() && year === today.getFullYear(),
|
||||||
|
isHoliday: !!h || dow === 0,
|
||||||
|
holidayName: h,
|
||||||
|
isWeekend: dow === 0 || dow === 6,
|
||||||
|
isSelected: selectedDate.value
|
||||||
|
? selectedDate.value.getDate() === d && selectedDate.value.getMonth() === month && selectedDate.value.getFullYear() === year
|
||||||
|
: false,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
const selectedHoliday = computed(() => {
|
||||||
|
if (!selectedDate.value) return null
|
||||||
|
const h = isHoliday(selectedDate.value)
|
||||||
|
return h.holiday ? h.name : null
|
||||||
|
})
|
||||||
|
|
||||||
|
function isWorkingDay(date: Date): boolean {
|
||||||
|
const dow = date.getDay()
|
||||||
|
if (dow === 0 || dow === 6) return false
|
||||||
|
return !isHoliday(date).holiday
|
||||||
|
}
|
||||||
|
|
||||||
|
function prevMonth() {
|
||||||
|
if (currentMonth.value === 0) { currentMonth.value = 11; currentYear.value-- }
|
||||||
|
else currentMonth.value--
|
||||||
|
}
|
||||||
|
|
||||||
|
function nextMonth() {
|
||||||
|
if (currentMonth.value === 11) { currentMonth.value = 0; currentYear.value++ }
|
||||||
|
else currentMonth.value++
|
||||||
|
}
|
||||||
|
|
||||||
|
function selectDay(day: number | null) {
|
||||||
|
if (day !== null) selectedDate.value = new Date(currentYear.value, currentMonth.value, day)
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="cal-view">
|
||||||
|
<div class="cal-nav">
|
||||||
|
<button @click="prevMonth" class="cal-nav-btn">←</button>
|
||||||
|
<h2>{{ MONTHS[currentMonth] }} {{ currentYear }}</h2>
|
||||||
|
<button @click="nextMonth" class="cal-nav-btn">→</button>
|
||||||
|
<button class="cal-today" @click="currentMonth = today.getMonth(); currentYear = today.getFullYear()">Hoy</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="cal-grid">
|
||||||
|
<div v-for="w in WEEKDAYS" :key="w" class="cal-header">{{ w }}</div>
|
||||||
|
<div
|
||||||
|
v-for="(d, i) in daysInMonth"
|
||||||
|
:key="i"
|
||||||
|
:class="['cal-day', { empty: d.day === null, today: d.isToday, weekend: d.isWeekend && !d.isHoliday, holiday: d.isHoliday, selected: d.isSelected }]"
|
||||||
|
@click="selectDay(d.day)"
|
||||||
|
>
|
||||||
|
<span v-if="d.day" class="cal-num">{{ d.day }}</span>
|
||||||
|
<span v-if="d.holidayName" class="cal-hol">{{ d.holidayName.slice(0, 3) }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="cal-legend">
|
||||||
|
<span><span class="leg-dot w-day"></span> Laboral</span>
|
||||||
|
<span><span class="leg-dot w-end"></span> Fin de semana</span>
|
||||||
|
<span><span class="leg-dot w-hol"></span> Feriado</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-if="selectedDate" class="cal-info">
|
||||||
|
<h3>{{ selectedDate.toLocaleDateString('es-CO', { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' }) }}</h3>
|
||||||
|
<p v-if="selectedHoliday">Feriado: <strong>{{ selectedHoliday }}</strong></p>
|
||||||
|
<p v-else-if="isWorkingDay(selectedDate)">Día laboral</p>
|
||||||
|
<p v-else>Fin de semana</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.cal-nav { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
|
||||||
|
.cal-nav h2 { margin: 0; font-size: 18px; color: var(--text-primary); min-width: 180px; font-weight: 700; }
|
||||||
|
.cal-nav-btn {
|
||||||
|
padding: 5px 14px;
|
||||||
|
background: var(--bg-secondary);
|
||||||
|
border: 1px solid var(--border);
|
||||||
|
border-radius: var(--radius);
|
||||||
|
color: var(--text-secondary);
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
.cal-nav-btn:hover { color: var(--text-primary); border-color: var(--border-hover); }
|
||||||
|
.cal-today { margin-left: auto; padding: 5px 14px; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius); color: var(--accent); cursor: pointer; font-size: 13px; font-weight: 500; }
|
||||||
|
.cal-today:hover { background: var(--bg-tertiary); }
|
||||||
|
|
||||||
|
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
|
||||||
|
.cal-header { padding: 9px 4px; text-align: center; font-size: 11px; font-weight: 600; color: var(--text-muted); background: var(--bg-secondary); text-transform: uppercase; letter-spacing: 0.3px; }
|
||||||
|
.cal-day { aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 4px; background: var(--bg-primary); cursor: pointer; transition: background 0.1s; }
|
||||||
|
.cal-day:hover { background: var(--bg-tertiary); }
|
||||||
|
.cal-day.empty { cursor: default; background: var(--bg-primary); }
|
||||||
|
.cal-day.today { background: #1E1040; }
|
||||||
|
.cal-day.today .cal-num { color: var(--accent); font-weight: 700; }
|
||||||
|
.cal-day.weekend { color: var(--text-muted); background: #161630; }
|
||||||
|
.cal-day.holiday { color: var(--accent); }
|
||||||
|
.cal-day.holiday .cal-hol { font-size: 8px; opacity: 0.8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
|
||||||
|
.cal-day.selected { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 2px; }
|
||||||
|
.cal-num { font-size: 14px; font-weight: 500; }
|
||||||
|
|
||||||
|
.cal-legend { display: flex; gap: 18px; margin-top: 12px; font-size: 11px; color: var(--text-muted); }
|
||||||
|
.leg-dot { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
|
||||||
|
.w-day { background: var(--border); }
|
||||||
|
.w-end { background: #161630; }
|
||||||
|
.w-hol { background: var(--accent); }
|
||||||
|
|
||||||
|
.cal-info { margin-top: 22px; padding: 18px 20px; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius); }
|
||||||
|
.cal-info h3 { margin: 0 0 6px; font-size: 15px; color: var(--text-primary); text-transform: capitalize; }
|
||||||
|
.cal-info p { margin: 0; font-size: 13px; color: var(--text-secondary); }
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,145 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
import { computed } from 'vue'
|
||||||
|
import { useProjectsStore } from '@/stores/projects'
|
||||||
|
import { useAuthStore } from '@/stores/auth'
|
||||||
|
|
||||||
|
const projects = useProjectsStore()
|
||||||
|
const auth = useAuthStore()
|
||||||
|
|
||||||
|
const project = computed(() => projects.selected)
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="dashboard" v-if="project">
|
||||||
|
<header class="dash-header">
|
||||||
|
<div>
|
||||||
|
<h2 class="dash-title">{{ project.name }}</h2>
|
||||||
|
<div class="dash-meta-row">
|
||||||
|
<span v-if="project.key" class="dash-meta">Clave: {{ project.key }}</span>
|
||||||
|
<span v-if="project.status" class="dash-badge">{{ project.status }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="dash-user">
|
||||||
|
<span class="user-name">{{ auth.user?.name }}</span>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<div class="dash-grid">
|
||||||
|
<section class="card">
|
||||||
|
<h3>Historia clínica</h3>
|
||||||
|
<p class="card-desc" v-if="project.description">{{ project.description }}</p>
|
||||||
|
<p class="card-empty" v-else>Sin descripción del paciente</p>
|
||||||
|
<dl class="card-dl" v-if="project.start_date">
|
||||||
|
<dt>Ingreso</dt><dd>{{ project.start_date }}</dd>
|
||||||
|
<dt v-if="project.end_date">Alta prevista</dt><dd v-if="project.end_date">{{ project.end_date }}</dd>
|
||||||
|
</dl>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="card">
|
||||||
|
<h3>Síntomas</h3>
|
||||||
|
<p class="card-empty">Historias de Usuario detectadas</p>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="card">
|
||||||
|
<h3>Bitácora</h3>
|
||||||
|
<p class="card-empty">Registro de sesiones</p>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="card">
|
||||||
|
<h3>Tratamiento</h3>
|
||||||
|
<p class="card-empty">Planeación del proyecto</p>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="card card-wide">
|
||||||
|
<h3>Transcripciones</h3>
|
||||||
|
<p class="card-empty">Pipeline consultas → diagnóstico</p>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.dashboard { max-width: 1200px; }
|
||||||
|
|
||||||
|
.dash-header {
|
||||||
|
display: flex;
|
||||||
|
align-items: flex-start;
|
||||||
|
justify-content: space-between;
|
||||||
|
margin-bottom: 28px;
|
||||||
|
}
|
||||||
|
.dash-title {
|
||||||
|
margin: 0 0 6px;
|
||||||
|
font-size: 22px;
|
||||||
|
font-weight: 700;
|
||||||
|
color: #FFFFFF;
|
||||||
|
}
|
||||||
|
.dash-meta-row {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 10px;
|
||||||
|
}
|
||||||
|
.dash-meta {
|
||||||
|
font-size: 12px;
|
||||||
|
color: #8888AA;
|
||||||
|
}
|
||||||
|
.dash-badge {
|
||||||
|
font-size: 11px;
|
||||||
|
padding: 2px 10px;
|
||||||
|
background: rgba(230,57,70,0.12);
|
||||||
|
color: #E63946;
|
||||||
|
border-radius: 10px;
|
||||||
|
font-weight: 600;
|
||||||
|
text-transform: capitalize;
|
||||||
|
}
|
||||||
|
.dash-user {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 12px;
|
||||||
|
}
|
||||||
|
.user-name {
|
||||||
|
font-size: 12px;
|
||||||
|
color: #8888AA;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dash-grid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1fr 1fr;
|
||||||
|
gap: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card {
|
||||||
|
background: #141428;
|
||||||
|
border: 1px solid #2A2A45;
|
||||||
|
border-radius: 8px;
|
||||||
|
padding: 22px;
|
||||||
|
}
|
||||||
|
.card-wide { grid-column: 1 / -1; }
|
||||||
|
.card h3 {
|
||||||
|
margin: 0 0 12px;
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #E63946;
|
||||||
|
text-transform: uppercase;
|
||||||
|
letter-spacing: 0.5px;
|
||||||
|
}
|
||||||
|
.card-desc {
|
||||||
|
margin: 0 0 12px;
|
||||||
|
font-size: 13px;
|
||||||
|
color: #B0B0CC;
|
||||||
|
line-height: 1.6;
|
||||||
|
}
|
||||||
|
.card-empty {
|
||||||
|
margin: 0;
|
||||||
|
font-size: 13px;
|
||||||
|
color: #555577;
|
||||||
|
}
|
||||||
|
.card-dl {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: auto 1fr;
|
||||||
|
gap: 4px 12px;
|
||||||
|
margin: 0;
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
.card-dl dt { color: #8888AA; font-size: 12px; }
|
||||||
|
.card-dl dd { color: #E6EDF3; margin: 0; }
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,184 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
import { ref } from 'vue'
|
||||||
|
import { useAuthStore } from '@/stores/auth'
|
||||||
|
|
||||||
|
const auth = useAuthStore()
|
||||||
|
const email = ref('')
|
||||||
|
const password = ref('')
|
||||||
|
const showPassword = ref(false)
|
||||||
|
|
||||||
|
async function handleLogin() {
|
||||||
|
if (!email.value || !password.value) return
|
||||||
|
await auth.login({ email: email.value, password: password.value })
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="login-bg">
|
||||||
|
<div class="login-card">
|
||||||
|
<div class="login-circles">
|
||||||
|
<span class="c c1"></span>
|
||||||
|
<span class="c c2"></span>
|
||||||
|
<span class="c c3"></span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h1 class="login-brand">teloprax</h1>
|
||||||
|
<p class="login-tagline">Tecnología con prescripción</p>
|
||||||
|
|
||||||
|
<div class="login-divider"></div>
|
||||||
|
|
||||||
|
<p class="login-sub">Centro de diagnóstico multi-proyecto</p>
|
||||||
|
|
||||||
|
<form @submit.prevent="handleLogin" class="login-form">
|
||||||
|
<div class="field">
|
||||||
|
<label>Email</label>
|
||||||
|
<input v-model="email" type="email" placeholder="ricardo@..." autocomplete="email" />
|
||||||
|
</div>
|
||||||
|
<div class="field">
|
||||||
|
<label>Contraseña</label>
|
||||||
|
<div class="password-wrap">
|
||||||
|
<input
|
||||||
|
v-model="password"
|
||||||
|
:type="showPassword ? 'text' : 'password'"
|
||||||
|
placeholder="••••••••"
|
||||||
|
autocomplete="current-password"
|
||||||
|
/>
|
||||||
|
<button type="button" class="toggle-btn" @click="showPassword = !showPassword">
|
||||||
|
{{ showPassword ? '◉' : '◎' }}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p v-if="auth.error" class="error-msg">{{ auth.error }}</p>
|
||||||
|
|
||||||
|
<button type="submit" class="login-btn" :disabled="auth.loading">
|
||||||
|
{{ auth.loading ? 'Ingresando...' : 'Iniciar diagnóstico' }}
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<p class="login-footer">kappa.lambdaanalytics.co</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.login-bg {
|
||||||
|
height: 100vh;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
background: #1A1A2E;
|
||||||
|
}
|
||||||
|
.login-card {
|
||||||
|
width: 420px;
|
||||||
|
padding: 44px 40px;
|
||||||
|
background: #141428;
|
||||||
|
border: 1px solid #2A2A45;
|
||||||
|
border-radius: 12px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-circles {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
gap: 4px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
.c {
|
||||||
|
display: block;
|
||||||
|
border-radius: 50%;
|
||||||
|
border: 2px solid #E63946;
|
||||||
|
}
|
||||||
|
.c1 { width: 10px; height: 10px; opacity: 0.35; }
|
||||||
|
.c2 { width: 14px; height: 14px; opacity: 0.65; }
|
||||||
|
.c3 { width: 18px; height: 18px; background: #E63946; border: none; }
|
||||||
|
|
||||||
|
.login-brand {
|
||||||
|
font-family: 'Space Grotesk', sans-serif;
|
||||||
|
font-weight: 700;
|
||||||
|
font-size: 26px;
|
||||||
|
color: #FFFFFF;
|
||||||
|
letter-spacing: -0.5px;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
.login-tagline {
|
||||||
|
margin: 4px 0 0;
|
||||||
|
font-size: 13px;
|
||||||
|
color: #E63946;
|
||||||
|
font-weight: 500;
|
||||||
|
letter-spacing: 0.2px;
|
||||||
|
}
|
||||||
|
.login-divider {
|
||||||
|
width: 40px;
|
||||||
|
height: 2px;
|
||||||
|
background: #2A2A45;
|
||||||
|
margin: 20px auto;
|
||||||
|
}
|
||||||
|
.login-sub {
|
||||||
|
margin: 0 0 28px;
|
||||||
|
font-size: 13px;
|
||||||
|
color: #8888AA;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-form { display: flex; flex-direction: column; gap: 14px; text-align: left; }
|
||||||
|
.field { display: flex; flex-direction: column; gap: 5px; }
|
||||||
|
.field label { font-size: 11px; color: #8888AA; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
|
||||||
|
.field input {
|
||||||
|
padding: 10px 12px;
|
||||||
|
background: #1A1A2E;
|
||||||
|
border: 1px solid #2A2A45;
|
||||||
|
border-radius: 6px;
|
||||||
|
color: #E6EDF3;
|
||||||
|
font-size: 14px;
|
||||||
|
outline: none;
|
||||||
|
transition: border-color 0.15s;
|
||||||
|
}
|
||||||
|
.field input:focus {
|
||||||
|
border-color: #E63946;
|
||||||
|
box-shadow: 0 0 0 2px rgba(230,57,70,0.12);
|
||||||
|
}
|
||||||
|
.field input::placeholder { color: #555577; }
|
||||||
|
.password-wrap { position: relative; }
|
||||||
|
.password-wrap input { width: 100%; box-sizing: border-box; padding-right: 40px; }
|
||||||
|
.toggle-btn {
|
||||||
|
position: absolute;
|
||||||
|
right: 8px; top: 50%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
background: none; border: none;
|
||||||
|
color: #8888AA; font-size: 16px;
|
||||||
|
cursor: pointer; padding: 4px;
|
||||||
|
}
|
||||||
|
.toggle-btn:hover { color: #E6EDF3; }
|
||||||
|
|
||||||
|
.error-msg {
|
||||||
|
margin: 0;
|
||||||
|
font-size: 12px;
|
||||||
|
color: #F85149;
|
||||||
|
padding: 8px 12px;
|
||||||
|
background: rgba(248,81,73,0.08);
|
||||||
|
border: 1px solid rgba(248,81,73,0.15);
|
||||||
|
border-radius: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.login-btn {
|
||||||
|
padding: 11px;
|
||||||
|
background: #E63946;
|
||||||
|
color: #fff;
|
||||||
|
border: none;
|
||||||
|
border-radius: 6px;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 600;
|
||||||
|
cursor: pointer;
|
||||||
|
margin-top: 6px;
|
||||||
|
transition: background 0.15s;
|
||||||
|
}
|
||||||
|
.login-btn:hover { background: #C62E3A; }
|
||||||
|
.login-btn:disabled { opacity: 0.5; cursor: default; }
|
||||||
|
|
||||||
|
.login-footer {
|
||||||
|
margin: 28px 0 0;
|
||||||
|
font-size: 11px;
|
||||||
|
color: #444466;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,261 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
import { ref, onMounted } from 'vue'
|
||||||
|
import { useSchedulerStore } from '@/stores/scheduler'
|
||||||
|
import { DAY_LABELS, computeNextRun, type ScheduleAction } from '@/services/scheduler'
|
||||||
|
|
||||||
|
const store = useSchedulerStore()
|
||||||
|
const showForm = ref(false)
|
||||||
|
|
||||||
|
const form = ref({
|
||||||
|
name: '', description: '',
|
||||||
|
daysOfWeek: [] as number[],
|
||||||
|
hour: 9, minute: 0,
|
||||||
|
actionType: 'reminder' as ScheduleAction['type'],
|
||||||
|
message: '',
|
||||||
|
})
|
||||||
|
|
||||||
|
function toggleDay(d: number) {
|
||||||
|
const idx = form.value.daysOfWeek.indexOf(d)
|
||||||
|
if (idx >= 0) form.value.daysOfWeek.splice(idx, 1)
|
||||||
|
else form.value.daysOfWeek.push(d)
|
||||||
|
}
|
||||||
|
|
||||||
|
async function handleSubmit() {
|
||||||
|
if (!form.value.name || form.value.daysOfWeek.length === 0) return
|
||||||
|
const action: ScheduleAction = form.value.actionType === 'reminder'
|
||||||
|
? { type: 'reminder', message: form.value.message || form.value.name }
|
||||||
|
: { type: form.value.actionType as Exclude<ScheduleAction['type'], 'reminder'> }
|
||||||
|
|
||||||
|
await store.addRule({
|
||||||
|
name: form.value.name, description: form.value.description,
|
||||||
|
daysOfWeek: form.value.daysOfWeek, hour: form.value.hour,
|
||||||
|
minute: form.value.minute, action, enabled: true,
|
||||||
|
})
|
||||||
|
showForm.value = false
|
||||||
|
form.value = { name: '', description: '', daysOfWeek: [], hour: 9, minute: 0, actionType: 'reminder', message: '' }
|
||||||
|
}
|
||||||
|
|
||||||
|
function fmtNextRun(date: Date | null | undefined): string {
|
||||||
|
if (!date) return '—'
|
||||||
|
return date.toLocaleDateString('es-CO', { weekday: 'short', month: 'short', day: 'numeric' })
|
||||||
|
+ ` ${String(date.getHours()).padStart(2, '0')}:${String(date.getMinutes()).padStart(2, '0')}`
|
||||||
|
}
|
||||||
|
|
||||||
|
function fmtLastRun(iso: string | null): string {
|
||||||
|
if (!iso) return 'Nunca'
|
||||||
|
const d = new Date(iso)
|
||||||
|
return d.toLocaleDateString('es-CO', { month: 'short', day: 'numeric' })
|
||||||
|
+ ` ${d.toLocaleTimeString('es-CO', { hour: '2-digit', minute: '2-digit' })}`
|
||||||
|
}
|
||||||
|
|
||||||
|
const actionLabels: Record<ScheduleAction['type'], string> = {
|
||||||
|
generate_progress_report: 'Informe semanal',
|
||||||
|
check_hus: 'Revisión HUs',
|
||||||
|
daily_prep: 'Daily prep',
|
||||||
|
reminder: 'Recordatorio',
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(async () => {
|
||||||
|
await store.seedDefaults()
|
||||||
|
await store.loadRules()
|
||||||
|
await store.loadLogs()
|
||||||
|
if (!store.running) store.start()
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="sch-view">
|
||||||
|
<div class="sch-header">
|
||||||
|
<div>
|
||||||
|
<h2>Recetas automáticas</h2>
|
||||||
|
<p>Tareas programadas que se ejecutan al abrir la app</p>
|
||||||
|
</div>
|
||||||
|
<div class="sch-header-right">
|
||||||
|
<span :class="['sch-status', store.running ? 'on' : 'off']">
|
||||||
|
{{ store.running ? 'Activo' : 'Pausado' }}
|
||||||
|
</span>
|
||||||
|
<button class="btn" @click="showForm = !showForm">
|
||||||
|
{{ showForm ? 'Cancelar' : '+ Nueva receta' }}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-if="showForm" class="sch-form">
|
||||||
|
<div class="form-row">
|
||||||
|
<div class="form-group flex-2">
|
||||||
|
<label>Nombre</label>
|
||||||
|
<input v-model="form.name" placeholder="Ej: Informe semanal de avance" />
|
||||||
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Descripción</label>
|
||||||
|
<input v-model="form.description" placeholder="Opcional" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-row">
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Días</label>
|
||||||
|
<div class="day-pills">
|
||||||
|
<button v-for="(l, i) in DAY_LABELS" :key="i"
|
||||||
|
:class="['day-pill', { active: form.daysOfWeek.includes(i) }]"
|
||||||
|
@click="toggleDay(i)">{{ l }}</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-row">
|
||||||
|
<div class="form-group">
|
||||||
|
<label>Hora</label>
|
||||||
|
<div class="time-inputs">
|
||||||
|
<input type="number" v-model.number="form.hour" min="0" max="23" class="time-in" />
|
||||||
|
<span>:</span>
|
||||||
|
<input type="number" v-model.number="form.minute" min="0" max="59" class="time-in" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-group flex-2">
|
||||||
|
<label>Acción</label>
|
||||||
|
<select v-model="form.actionType">
|
||||||
|
<option value="generate_progress_report">Generar informe de avance</option>
|
||||||
|
<option value="check_hus">Revisar estado de HUs</option>
|
||||||
|
<option value="daily_prep">Daily prep</option>
|
||||||
|
<option value="reminder">Recordatorio personalizado</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="form-row" v-if="form.actionType === 'reminder'">
|
||||||
|
<div class="form-group flex-2">
|
||||||
|
<label>Mensaje</label>
|
||||||
|
<input v-model="form.message" placeholder="Ej: Preparar informe para gerencia" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<button class="btn primary" @click="handleSubmit">Guardar receta</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="sch-rules">
|
||||||
|
<div v-for="rule in store.rules" :key="rule.id" :class="['sch-rule', { disabled: !rule.enabled }]">
|
||||||
|
<div class="rule-info">
|
||||||
|
<div class="rule-name">{{ rule.name }}</div>
|
||||||
|
<div v-if="rule.description" class="rule-desc">{{ rule.description }}</div>
|
||||||
|
<div class="rule-meta">
|
||||||
|
<span class="meta-tag">{{ rule.daysOfWeek.map(d => DAY_LABELS[d]).join(', ') }}</span>
|
||||||
|
<span class="meta-tag">{{ String(rule.hour).padStart(2,'0') }}:{{ String(rule.minute).padStart(2,'0') }}</span>
|
||||||
|
<span class="meta-tag type">{{ actionLabels[rule.action.type] }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="rule-exec">
|
||||||
|
<div class="exec-next">Próx: {{ fmtNextRun(computeNextRun(rule)) }}</div>
|
||||||
|
<div class="exec-last">Últ: {{ fmtLastRun(rule.lastRun) }}</div>
|
||||||
|
</div>
|
||||||
|
<div class="rule-actions">
|
||||||
|
<button :class="['toggle-btn', rule.enabled ? 'on' : 'off']" @click="store.toggleRule(rule.id!)">
|
||||||
|
{{ rule.enabled ? 'ON' : 'OFF' }}
|
||||||
|
</button>
|
||||||
|
<button class="del-btn" @click="store.deleteRule(rule.id!)">×</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<p v-if="store.rules.length === 0" class="empty">No hay recetas configuradas</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="sch-log" v-if="store.logs.length > 0">
|
||||||
|
<h3>Historial</h3>
|
||||||
|
<div v-for="log in store.logs.slice(0, 10)" :key="log.id" class="log-entry">
|
||||||
|
<span :class="['log-dot', log.success ? 'ok' : 'fail']"></span>
|
||||||
|
<span class="log-time">{{ fmtLastRun(log.executedAt) }}</span>
|
||||||
|
<span class="log-name">{{ log.ruleName }}</span>
|
||||||
|
<span class="log-msg">{{ log.message }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="sch-toasts" v-if="store.notifications.length > 0">
|
||||||
|
<div v-for="n in store.notifications.slice(0, 5)" :key="n.id" class="sch-toast">
|
||||||
|
<span class="toast-time">{{ n.time }}</span>
|
||||||
|
<span class="toast-msg">{{ n.message }}</span>
|
||||||
|
<button class="toast-close" @click="store.dismissNotification(n.id)">×</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.sch-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 22px; }
|
||||||
|
.sch-header h2 { margin: 0 0 3px; font-size: 18px; color: var(--text-primary); font-weight: 700; }
|
||||||
|
.sch-header p { margin: 0; font-size: 13px; color: var(--text-secondary); }
|
||||||
|
.sch-header-right { display: flex; align-items: center; gap: 12px; }
|
||||||
|
.sch-status { font-size: 11px; padding: 3px 10px; border-radius: 10px; font-weight: 600; }
|
||||||
|
.sch-status.on { background: rgba(63,185,80,0.1); color: var(--success); }
|
||||||
|
.sch-status.off { background: rgba(136,136,170,0.1); color: var(--text-muted); }
|
||||||
|
|
||||||
|
.btn {
|
||||||
|
padding: 6px 16px; background: var(--bg-secondary); border: 1px solid var(--border);
|
||||||
|
border-radius: var(--radius); color: var(--text-primary); font-size: 13px; cursor: pointer;
|
||||||
|
}
|
||||||
|
.btn:hover { border-color: var(--accent); }
|
||||||
|
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; margin-top: 6px; }
|
||||||
|
.btn.primary:hover { background: var(--accent-hover); }
|
||||||
|
|
||||||
|
.sch-form {
|
||||||
|
padding: 20px; background: var(--bg-secondary); border: 1px solid var(--border);
|
||||||
|
border-radius: var(--radius); margin-bottom: 22px; display: flex; flex-direction: column; gap: 12px;
|
||||||
|
}
|
||||||
|
.form-row { display: flex; gap: 12px; }
|
||||||
|
.form-group { display: flex; flex-direction: column; gap: 4px; flex: 1; }
|
||||||
|
.form-group.flex-2 { flex: 2; }
|
||||||
|
.form-group label { font-size: 10px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.4px; font-weight: 600; }
|
||||||
|
.form-group input, .form-group select {
|
||||||
|
padding: 8px 10px; background: var(--bg-input); border: 1px solid var(--border);
|
||||||
|
border-radius: 6px; color: var(--text-primary); font-size: 13px; outline: none;
|
||||||
|
}
|
||||||
|
.form-group input:focus, .form-group select:focus { border-color: var(--accent); }
|
||||||
|
.day-pills { display: flex; gap: 5px; }
|
||||||
|
.day-pill {
|
||||||
|
padding: 4px 10px; background: var(--bg-input); border: 1px solid var(--border);
|
||||||
|
border-radius: 14px; color: var(--text-secondary); font-size: 12px; cursor: pointer;
|
||||||
|
}
|
||||||
|
.day-pill.active { background: var(--accent); border-color: var(--accent); color: #fff; }
|
||||||
|
.time-inputs { display: flex; align-items: center; gap: 4px; }
|
||||||
|
.time-in { width: 50px; text-align: center; }
|
||||||
|
|
||||||
|
.sch-rules { display: flex; flex-direction: column; gap: 8px; }
|
||||||
|
.sch-rule {
|
||||||
|
display: flex; align-items: center; gap: 14px; padding: 14px 16px;
|
||||||
|
background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius);
|
||||||
|
}
|
||||||
|
.sch-rule.disabled { opacity: 0.4; }
|
||||||
|
.rule-info { flex: 1; min-width: 0; }
|
||||||
|
.rule-name { font-size: 14px; color: var(--text-primary); font-weight: 500; }
|
||||||
|
.rule-desc { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
|
||||||
|
.rule-meta { display: flex; gap: 5px; margin-top: 4px; flex-wrap: wrap; }
|
||||||
|
.meta-tag { font-size: 11px; padding: 1px 8px; background: var(--bg-primary); border-radius: 10px; color: var(--text-secondary); }
|
||||||
|
.meta-tag.type { color: var(--accent); }
|
||||||
|
.rule-exec { flex-shrink: 0; text-align: right; }
|
||||||
|
.exec-next { font-size: 12px; color: var(--success); }
|
||||||
|
.exec-last { font-size: 11px; color: var(--text-muted); }
|
||||||
|
.rule-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
|
||||||
|
.toggle-btn { padding: 3px 12px; border-radius: 10px; border: none; font-size: 10px; font-weight: 700; cursor: pointer; }
|
||||||
|
.toggle-btn.on { background: rgba(63,185,80,0.15); color: var(--success); }
|
||||||
|
.toggle-btn.off { background: rgba(136,136,170,0.1); color: var(--text-muted); }
|
||||||
|
.del-btn { background: none; border: none; cursor: pointer; font-size: 18px; color: var(--text-muted); }
|
||||||
|
.del-btn:hover { color: var(--error); }
|
||||||
|
|
||||||
|
.sch-log { margin-top: 28px; padding: 16px 18px; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius); }
|
||||||
|
.sch-log h3 { margin: 0 0 10px; font-size: 13px; color: var(--text-primary); text-transform: uppercase; letter-spacing: 0.4px; font-weight: 600; }
|
||||||
|
.log-entry { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: 12px; }
|
||||||
|
.log-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
|
||||||
|
.log-dot.ok { background: var(--success); }
|
||||||
|
.log-dot.fail { background: var(--error); }
|
||||||
|
.log-time { color: var(--text-muted); white-space: nowrap; }
|
||||||
|
.log-name { color: var(--text-secondary); font-weight: 500; white-space: nowrap; }
|
||||||
|
.log-msg { color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||||
|
|
||||||
|
.sch-toasts { position: fixed; bottom: 16px; right: 16px; z-index: 100; display: flex; flex-direction: column; gap: 6px; max-width: 380px; }
|
||||||
|
.sch-toast {
|
||||||
|
display: flex; align-items: center; gap: 8px; padding: 10px 14px;
|
||||||
|
background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius);
|
||||||
|
border-left: 3px solid var(--accent); font-size: 12px; animation: slideIn 0.3s ease;
|
||||||
|
}
|
||||||
|
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
|
||||||
|
.toast-time { color: var(--text-muted); white-space: nowrap; }
|
||||||
|
.toast-msg { color: var(--text-primary); flex: 1; }
|
||||||
|
.toast-close { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 16px; }
|
||||||
|
.toast-close:hover { color: var(--error); }
|
||||||
|
|
||||||
|
.empty { color: var(--text-muted); text-align: center; padding: 32px; font-size: 13px; }
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"target": "ES2020",
|
||||||
|
"module": "ESNext",
|
||||||
|
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
||||||
|
"moduleResolution": "bundler",
|
||||||
|
"strict": true,
|
||||||
|
"jsx": "preserve",
|
||||||
|
"resolveJsonModule": true,
|
||||||
|
"isolatedModules": true,
|
||||||
|
"esModuleInterop": true,
|
||||||
|
"skipLibCheck": true,
|
||||||
|
"noEmit": true,
|
||||||
|
"paths": {
|
||||||
|
"@/*": ["./src/*"]
|
||||||
|
},
|
||||||
|
"baseUrl": "."
|
||||||
|
},
|
||||||
|
"include": ["src/**/*.ts", "src/**/*.vue"],
|
||||||
|
"references": [{ "path": "./tsconfig.node.json" }]
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"composite": true,
|
||||||
|
"skipLibCheck": true,
|
||||||
|
"module": "ESNext",
|
||||||
|
"moduleResolution": "bundler",
|
||||||
|
"allowSyntheticDefaultImports": true
|
||||||
|
},
|
||||||
|
"include": ["vite.config.ts"]
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
import { defineConfig } from 'vite'
|
||||||
|
import vue from '@vitejs/plugin-vue'
|
||||||
|
import { resolve } from 'path'
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
plugins: [vue()],
|
||||||
|
resolve: {
|
||||||
|
alias: {
|
||||||
|
'@': resolve(__dirname, 'src'),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
server: {
|
||||||
|
proxy: {
|
||||||
|
'/api': {
|
||||||
|
target: 'https://kappa.lambdaanalytics.co',
|
||||||
|
changeOrigin: true,
|
||||||
|
secure: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
Reference in New Issue
Block a user