This commit is contained in:
2026-02-03 21:47:17 +05:00
parent 70247bb3d8
commit cae562ee16
3 changed files with 247 additions and 26 deletions

View File

@@ -372,28 +372,3 @@ function showKanbanSection() {
showSection('kanban'); showSection('kanban');
} }
// Функции для работы с модальными окнами (добавьте если их нет)
function closeEditModal() {
document.getElementById('edit-task-modal').style.display = 'none';
document.getElementById('edit-file-list').innerHTML = '';
document.getElementById('edit-user-search').value = '';
editSelectedUsers = [];
currentEditTaskFiles = [];
filterEditUsers();
}
function closeCopyModal() {
document.getElementById('copy-task-modal').style.display = 'none';
document.getElementById('copy-user-search').value = '';
copySelectedUsers = [];
filterCopyUsers();
}
function closeEditAssignmentModal() {
document.getElementById('edit-assignment-modal').style.display = 'none';
}
function closeReworkModal() {
document.getElementById('rework-task-modal').style.display = 'none';
document.getElementById('rework-comment').value = '';
}

View File

@@ -2708,3 +2708,249 @@ small {
max-width: 100%; max-width: 100%;
} }
} }
/* Стили для календаря */
.calendar-wrapper {
background: white;
border-radius: 8px;
overflow: hidden;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.calendar-header {
display: grid;
grid-template-columns: repeat(7, 1fr);
background: #f8f9fa;
border-bottom: 2px solid #dee2e6;
}
.calendar-day-header {
padding: 12px;
text-align: center;
font-weight: bold;
color: #495057;
border-right: 1px solid #dee2e6;
}
.calendar-day-header:last-child {
border-right: none;
}
.calendar-grid {
display: grid;
grid-template-columns: repeat(7, 1fr);
grid-auto-rows: 120px;
}
.calendar-day {
border-right: 1px solid #dee2e6;
border-bottom: 1px solid #dee2e6;
padding: 8px;
overflow: hidden;
position: relative;
transition: background-color 0.2s;
}
.calendar-day.empty-day {
background-color: #d4edda !important; /* светло-зеленый */
}
.calendar-day.busy-day {
background-color: #f8d7da !important; /* розовый */
}
.calendar-day.today {
background-color: #e7f3ff !important;
border: 2px solid #007bff;
}
.calendar-day.weekend {
background-color: #f8f9fa;
}
.calendar-day.empty {
background-color: #f8f9fa;
opacity: 0.5;
}
.calendar-date {
font-weight: bold;
margin-bottom: 5px;
display: flex;
justify-content: space-between;
align-items: center;
}
.today-badge {
background: #007bff;
color: white;
padding: 2px 6px;
border-radius: 10px;
font-size: 10px;
font-weight: normal;
}
.calendar-tasks {
max-height: calc(100% - 25px);
overflow-y: auto;
}
.calendar-task {
background: white;
border: 1px solid #dee2e6;
border-radius: 4px;
padding: 4px 6px;
margin-bottom: 4px;
font-size: 12px;
cursor: move;
display: flex;
justify-content: space-between;
align-items: center;
}
.calendar-task:hover {
background: #f8f9fa;
}
.calendar-task.dragging {
opacity: 0.5;
}
.calendar-task-content {
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.calendar-task-id {
font-size: 10px;
color: #6c757d;
display: inline-block;
margin-right: 4px;
}
.calendar-task-title {
cursor: pointer;
color: #007bff;
display: inline;
}
.calendar-task-title:hover {
text-decoration: underline;
}
.calendar-task-status {
width: 8px;
height: 8px;
border-radius: 50%;
margin-left: 4px;
}
.calendar-task-status.assigned { background: #e74c3c; }
.calendar-task-status.in_progress { background: #f39c12; }
.calendar-task-status.rework { background: #f1c40f; }
.calendar-task-status.completed { background: #2ecc71; }
.no-tasks {
color: #6c757d;
font-style: italic;
text-align: center;
padding: 10px 0;
font-size: 12px;
}
.more-tasks {
color: #007bff;
font-size: 11px;
text-align: center;
padding: 2px;
cursor: pointer;
}
.more-tasks:hover {
text-decoration: underline;
}
.calendar-navigation {
display: flex;
align-items: center;
gap: 10px;
}
.month-nav-btn {
background: #007bff;
color: white;
border: none;
border-radius: 4px;
padding: 6px 12px;
cursor: pointer;
font-size: 16px;
}
.month-nav-btn:hover {
background: #0056b3;
}
.current-month {
font-weight: bold;
font-size: 16px;
min-width: 150px;
text-align: center;
}
.today-btn {
background: #28a745;
color: white;
border: none;
border-radius: 4px;
padding: 6px 12px;
cursor: pointer;
margin-right: 10px;
}
.today-btn:hover {
background: #218838;
}
.calendar-legend {
display: flex;
justify-content: center;
gap: 20px;
margin-top: 20px;
padding: 10px;
background: #f8f9fa;
border-radius: 4px;
}
.legend-item {
display: flex;
align-items: center;
gap: 8px;
}
.legend-color {
width: 20px;
height: 20px;
border-radius: 4px;
}
.legend-color.empty-day {
background-color: #d4edda;
border: 1px solid #c3e6cb;
}
.legend-color.normal-day {
background-color: white;
border: 1px solid #dee2e6;
}
.legend-color.busy-day {
background-color: #f8d7da;
border: 1px solid #f5c6cb;
}
.drag-over {
background-color: #e7f3ff !important;
border: 2px dashed #007bff !important;
}

View File

@@ -83,7 +83,7 @@ function renderTasks() {
<div class="task-actions"> <div class="task-actions">
${!isDeleted && !isClosed ? ` ${!isDeleted && !isClosed ? `
${canEdit ? `<button class="add-file-btn" onclick="openAddFileModal(${task.id})" title="Добавить файл">📎</button>` : ''} ${canEdit ? `<button class="add-file-btn" onclick="openAddFileModal(${task.id})" title="Добавить файл">📎</button>` : ''}
${canEdit ? `<button class="edit-btn" onclick="openEditModal(${task.id})" title="Редактировать">✏️</button>` : ''} ${currentUser && currentUser.login === 'kalugin.o' ? `<button class="edit-btn" onclick="openEditModal(${task.id})" title="Редактировать">✏️</button>` : ''}
<button class="copy-btn" onclick="openCopyModal(${task.id})" title="Создать копию">📋</button> <button class="copy-btn" onclick="openCopyModal(${task.id})" title="Создать копию">📋</button>
${canEdit ? `<button class="rework-btn" onclick="openReworkModal(${task.id})" title="Вернуть на доработку">🔄</button>` : ''} ${canEdit ? `<button class="rework-btn" onclick="openReworkModal(${task.id})" title="Вернуть на доработку">🔄</button>` : ''}
${canEdit ? `<button class="close-btn" onclick="closeTask(${task.id})" title="Закрыть задачу">🔒</button>` : ''} ${canEdit ? `<button class="close-btn" onclick="closeTask(${task.id})" title="Закрыть задачу">🔒</button>` : ''}