This commit is contained in:
chamikaJ
2025-04-17 18:28:54 +05:30
parent f583291d8a
commit 8825b0410a
2837 changed files with 241385 additions and 127578 deletions

View File

@@ -1,6 +1,6 @@
import {Server, Socket} from "socket.io";
import db from "../../config/db";
import {PriorityColorCodes, TASK_PRIORITY_COLOR_ALPHA} from "../../shared/constants";
import {PriorityColorCodes, PriorityColorCodesDark, TASK_PRIORITY_COLOR_ALPHA} from "../../shared/constants";
import {SocketEvents} from "../events";
import {log_error, notifyProjectUpdates} from "../util";
@@ -19,11 +19,13 @@ export async function on_task_priority_change(_io: Server, socket: Socket, data?
const [d] = result.rows;
d.color_code = (PriorityColorCodes[d.value] || PriorityColorCodes["0"]) + TASK_PRIORITY_COLOR_ALPHA;
d.color_code_dark = PriorityColorCodesDark[d.value] || PriorityColorCodesDark["0"];
socket.emit(SocketEvents.TASK_PRIORITY_CHANGE.toString(), {
id: body.task_id,
parent_task: body.parent_task,
color_code: d.color_code,
color_code_dark: d.color_code_dark,
priority_id: body.priority_id
});