Changed it so that tasks can be dragged and reordered, as well as having tasks breathe to leave a space where the task will go when you let go

This commit is contained in:
NPS Agent
2026-05-12 12:31:44 +09:30
parent 84592b8b3b
commit b0fd767c80
9 changed files with 127 additions and 30 deletions
+4 -2
View File
@@ -169,9 +169,11 @@ function App() {
}
};
const moveTask = async (taskId, toUserId) => {
const moveTask = async (taskId, toUserId, position = null) => {
try {
await api.updateTask(taskId, { assignee_id: toUserId });
const updates = { assignee_id: toUserId };
if (position !== null) updates.position = position;
await api.updateTask(taskId, updates);
await api.addAudit({ actor: meId, action: 'task_moved', summary: 'Moved task to ' + (merge(toUserId)||{}).name, target: taskId });
} catch(e) {}
};