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,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 }
|
||||
})
|
||||
Reference in New Issue
Block a user