From 9f68909f1065d0c3ef25db652de17ac7d8ebd96a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A2=D0=B8=D0=BC=D1=83=D1=80=20=D0=A4=D0=B0=D0=B9=D0=B7?= =?UTF-8?q?=D1=83=D0=BB=D0=BB=D0=B8=D0=BD?= Date: Sun, 17 May 2026 20:36:34 +0500 Subject: [PATCH] =?UTF-8?q?=D0=97=D0=B5=D0=BB=D0=B5=D0=BD=D1=8B=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Api/wwwroot/js/kanban.js | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/Api/wwwroot/js/kanban.js b/Api/wwwroot/js/kanban.js index d3ce1a1..2f1c76b 100644 --- a/Api/wwwroot/js/kanban.js +++ b/Api/wwwroot/js/kanban.js @@ -503,7 +503,25 @@ function selectElementText(element) { ========================= */ function createTaskCard(task, column, columnIndex, taskIndex) { - const color = task.color || column.color || "#ef6a35"; + const columnTitle = String( + column.title ?? + column.name ?? + column.Title ?? + column.Name ?? + "" + ).trim().toLowerCase(); + + const isDoneColumn = + column.done === true || + column.isDone === true || + column.Done === true || + column.IsDone === true || + columnTitle === "done" || + columnTitle === "готово"; + + const color = isDoneColumn + ? "#407d52" + : task.color || column.color || "#ef6a35"; const doneLabel = column.done ? "Дата выполнения" : "Дедлайн"; const tags = [ @@ -514,6 +532,8 @@ function createTaskCard(task, column, columnIndex, taskIndex) { const card = document.createElement("article"); card.className = "task-card is-draggable"; + console.log("COLUMN:", column); + console.log("TASK:", task.title, "COLOR:", color); card.style.setProperty("--task-color", color); card.dataset.taskId = task.id; card.dataset.columnId = column.id;