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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user