feat(sprints): interface de création et gestion des sprints (frontend)
Ticket #11 — surface UI de gestion des sprints (frontend pur). - Nouveau composant SprintManager : création (nom optionnel), édition et gestion du cycle de vie d'un sprint, contrôles accessibles (pas de DnD). - useTickets étendu aux opérations de gestion de sprint ; ports, adaptateurs (ticket.ts, mock/index.ts) et TicketsPanel câblés en conséquence. - Tests Vitest associés (tickets.test.tsx). Typecheck / vitest (497+ tests) / build verts. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@ -148,4 +148,38 @@ export class TauriTicketGateway implements TicketGateway {
|
||||
request: { projectId, ref, sprintId, expectedVersion },
|
||||
});
|
||||
}
|
||||
|
||||
async createSprint(projectId: string, name: string): Promise<Sprint> {
|
||||
return invoke<Sprint>("sprint_create", {
|
||||
request: { projectId, name },
|
||||
});
|
||||
}
|
||||
|
||||
async renameSprint(
|
||||
projectId: string,
|
||||
sprintId: string,
|
||||
name: string,
|
||||
expectedVersion: number,
|
||||
): Promise<Sprint> {
|
||||
return invoke<Sprint>("sprint_rename", {
|
||||
request: { projectId, sprintId, name, expectedVersion },
|
||||
});
|
||||
}
|
||||
|
||||
async reorderSprints(
|
||||
projectId: string,
|
||||
orderedIds: string[],
|
||||
): Promise<Sprint[]> {
|
||||
// `sprint_reorder` returns a `SprintListDto { items }`; unwrap to the array.
|
||||
const list = await invoke<{ items: Sprint[] }>("sprint_reorder", {
|
||||
request: { projectId, orderedIds },
|
||||
});
|
||||
return list.items;
|
||||
}
|
||||
|
||||
async deleteSprint(projectId: string, sprintId: string): Promise<void> {
|
||||
await invoke<void>("sprint_delete", {
|
||||
request: { projectId, sprintId },
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user