From cb0e8067b6b957e2b50362ccd1dcc33c5cc5a011 Mon Sep 17 00:00:00 2001 From: Ricardo Gonzalez Date: Fri, 29 May 2026 22:50:38 -0500 Subject: [PATCH] K-12 Priorizador diario: HUs vencidas, hoy, esta semana y bloqueadas MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - PrioritizerCard.vue: nuevo componente con secciones de priorización - Tarjetas resumen: total HUs, en progreso, vencidas, bloqueadas - Listas agrupadas: vencidas (rojo), hoy (ámbar), esta semana, bloqueadas - Cada item: código, título, prioridad, fecha - KappaUserStory: agregados end_date, sprint, initial_date - enrichHU: pasa end_date y sprint al objeto enriquecido --- src/components/PrioritizerCard.vue | 218 +++++++++++++++++++++++++++++ src/stores/workitems.ts | 4 +- src/types/kappa.ts | 4 +- src/views/DashboardView.vue | 4 + 4 files changed, 228 insertions(+), 2 deletions(-) create mode 100644 src/components/PrioritizerCard.vue diff --git a/src/components/PrioritizerCard.vue b/src/components/PrioritizerCard.vue new file mode 100644 index 0000000..20999d9 --- /dev/null +++ b/src/components/PrioritizerCard.vue @@ -0,0 +1,218 @@ + + + diff --git a/src/stores/workitems.ts b/src/stores/workitems.ts index 5d076f7..febf5e0 100644 --- a/src/stores/workitems.ts +++ b/src/stores/workitems.ts @@ -93,7 +93,7 @@ export const useWorkItemsStore = defineStore('workitems', () => { return { id: null, name: '', employeeId: null } } - function enrichHU(hu: { title?: string; id?: number; description?: string | null; status?: string | number | null; status_name?: string | null; priority?: string | number | null; story_points?: number | null; acceptance_criteria?: string | null; criterios_aceptacion?: string | null; assigned_to?: number | null; asignado_a?: number[] | string[] | null; asignado_a_names?: string[] | string | null; assigned_name?: string }, initiativeId: number): EnrichedUserStory { + function enrichHU(hu: { title?: string; id?: number; description?: string | null; status?: string | number | null; status_name?: string | null; priority?: string | number | null; story_points?: number | null; end_date?: string | null; sprint?: number | string | null; acceptance_criteria?: string | null; criterios_aceptacion?: string | null; assigned_to?: number | null; asignado_a?: number[] | string[] | null; asignado_a_names?: string[] | string | null; assigned_name?: string }, initiativeId: number): EnrichedUserStory { const h = parseHierarchy(hu.title || '') const rawCriteria = hu.acceptance_criteria || hu.criterios_aceptacion || '' const criteriaList = rawCriteria ? parseQuillList(rawCriteria) : [] @@ -104,6 +104,8 @@ export const useWorkItemsStore = defineStore('workitems', () => { status: String(hu.status ?? ''), priority: String(hu.priority ?? ''), story_points: hu.story_points ?? undefined, + end_date: hu.end_date || undefined, + sprint: hu.sprint != null ? String(hu.sprint) : undefined, description: hu.description || '', acceptance_criteria: rawCriteria, criterios_aceptacion: rawCriteria, diff --git a/src/types/kappa.ts b/src/types/kappa.ts index 40a4111..ba1b83e 100644 --- a/src/types/kappa.ts +++ b/src/types/kappa.ts @@ -48,7 +48,9 @@ export interface KappaUserStory { priority?: string | number initiative: number | string story_points?: number - sprint?: string + sprint?: number | string + end_date?: string + initial_date?: string | null created_at?: string assigned_to?: number | null asignado_a?: number[] | string[] | null diff --git a/src/views/DashboardView.vue b/src/views/DashboardView.vue index 874234a..155df58 100644 --- a/src/views/DashboardView.vue +++ b/src/views/DashboardView.vue @@ -11,6 +11,7 @@ import { Button } from '@/components/ui/button' import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogTrigger } from '@/components/ui/dialog' import HuDrafts from '@/components/HuDrafts.vue' import AiProjectChat from '@/components/AiProjectChat.vue' +import PrioritizerCard from '@/components/PrioritizerCard.vue' import { analyzeProjectEpics, analyzeProjectHUs, saveEpicDrafts, saveHUDrafts } from '@/services/project-analyzer' import { getDrafts, deleteDraft, type HuDraftRecord } from '@/services/hu-drafts-db' import { kappa } from '@/services/kappa-api' @@ -663,6 +664,9 @@ const statusLabel = (status: unknown) => { + + +