Allowed tasks to be moved freely up and down the order, made private windows display in vertical columns rather then horizontal and made both screens display tasks in the SAME order

This commit is contained in:
NPS Agent
2026-05-12 13:21:44 +09:30
parent b0fd767c80
commit cf3e4cfe41
3 changed files with 130 additions and 38 deletions
+7 -2
View File
@@ -169,12 +169,16 @@ function App() {
}
};
const moveTask = async (taskId, toUserId, position = null) => {
const moveTask = async (taskId, toUserId, position = null, status = null) => {
try {
const updates = { assignee_id: toUserId };
if (position !== null) updates.position = position;
if (status !== null) updates.status = status;
await api.updateTask(taskId, updates);
await api.addAudit({ actor: meId, action: 'task_moved', summary: 'Moved task to ' + (merge(toUserId)||{}).name, target: taskId });
const u = (merge(toUserId)||{}).name;
const summary = status ? `Moved task to ${u} and set to ${status}` : `Moved task to ${u}`;
await api.addAudit({ actor: meId, action: 'task_moved', summary, target: taskId });
} catch(e) {}
};
@@ -291,6 +295,7 @@ function App() {
user={merge(tab)} tasks={filteredTasks} density={t.density}
onOpen={(task) => setOpenTaskId(task.id)}
onAddFor={(uid) => setAdding(uid)}
onMoveTask={moveTask}
/>
)}
</main>