build ok,

This commit is contained in:
louiscklaw
2025-06-15 11:28:24 +08:00
parent c319c103f6
commit b7cd25b614
1088 changed files with 4376 additions and 7002 deletions

View File

@@ -25,13 +25,8 @@ const ENDPOINTS = {
};
function loggerData(action?: string, value?: unknown) {
const columnsWithTasks = boardData.columns.map(
(col) => `${col.name} (${boardData.tasks[col.id].length} tasks)`
);
logger(
'[Kanban] get-board',
`columns (${boardData.columns.length}): ${JSON.stringify(columnsWithTasks, null, 2)}`
);
const columnsWithTasks = boardData.columns.map((col) => `${col.name} (${boardData.tasks[col.id].length} tasks)`);
logger('[Kanban] get-board', `columns (${boardData.columns.length}): ${JSON.stringify(columnsWithTasks, null, 2)}`);
if (value || action) {
logger(`[Kanban] ${action}`, value);
}
@@ -126,9 +121,7 @@ async function updateColumn(req: NextRequest) {
// Find and update the specified column.
updateBoardData({
columns: boardData.columns.map((col) =>
col.id === columnId ? { ...col, name: columnName } : col
),
columns: boardData.columns.map((col) => (col.id === columnId ? { ...col, name: columnName } : col)),
});
loggerData('updated-column', columnName);
@@ -222,9 +215,7 @@ async function updateTask(req: NextRequest) {
updateBoardData({
tasks: {
...boardData.tasks,
[columnId]: boardData.tasks[columnId].map((task) =>
task.id === taskData.id ? { ...task, ...taskData } : task
),
[columnId]: boardData.tasks[columnId].map((task) => (task.id === taskData.id ? { ...task, ...taskData } : task)),
},
});