avant codex

This commit is contained in:
2026-02-22 15:05:40 +01:00
parent fed449c784
commit 20af00d653
291 changed files with 51868 additions and 424 deletions

View File

@@ -18,6 +18,13 @@ export const useTasksStore = defineStore('tasks', () => {
return created
}
async function update(id: number, data: Partial<Task>) {
const updated = await tasksApi.update(id, data)
const idx = tasks.value.findIndex(t => t.id === id)
if (idx !== -1) tasks.value[idx] = updated
return updated
}
async function updateStatut(id: number, statut: string) {
const t = tasks.value.find(t => t.id === id)
if (!t) return
@@ -30,5 +37,5 @@ export const useTasksStore = defineStore('tasks', () => {
tasks.value = tasks.value.filter(t => t.id !== id)
}
return { tasks, loading, fetchAll, create, updateStatut, remove }
return { tasks, loading, fetchAll, create, update, updateStatut, remove }
})