This commit is contained in:
2026-02-19 21:39:17 +05:00
parent 2df88ad168
commit 99b968fcbf
7 changed files with 1993 additions and 3 deletions

View File

@@ -1,7 +1,22 @@
// task-endpoints.js
const path = require('path');
const fs = require('fs');
// Функция для добавления кнопки чата в HTML задачи
function addChatButtonToTask(taskElement, taskId) {
const chatButton = document.createElement('button');
chatButton.className = 'task-chat-btn';
chatButton.innerHTML = '💬 Чат';
chatButton.onclick = (e) => {
e.stopPropagation();
openTaskChat(taskId);
};
// Добавляем кнопку в шапку задачи или в actions
const header = taskElement.querySelector('.task-header');
if (header) {
header.appendChild(chatButton);
}
}
function getApproverUsers(groupId) {
return new Promise((resolve) => {
db.all(`