diff --git a/src/pages/TechnicalPage.tsx b/src/pages/TechnicalPage.tsx index c5e078e..acabfb9 100644 --- a/src/pages/TechnicalPage.tsx +++ b/src/pages/TechnicalPage.tsx @@ -90,10 +90,10 @@ export function TechnicalPage() { } const handleDelete = async (taskId: string) => { - if (!confirm('Удалить задачу?')) return + if (!confirm('Отменить задачу? Она останется в истории со статусом «Отменено».')) return try { - await api.housekeeping.delete(slug, taskId) - setTasks(prev => prev.filter(t => t.id !== taskId)) + const updated = await api.housekeeping.update(slug, taskId, { status: 'cancelled' }) + setTasks(prev => prev.map(t => t.id === taskId ? updated : t)) } catch (err) { console.error(err) }