ит заявка

This commit is contained in:
2026-03-18 09:50:11 +05:00
parent b9d813955d
commit 0bbe55929b
3 changed files with 60 additions and 2 deletions

View File

@@ -157,9 +157,22 @@ async function createTask(event) {
}
const title = document.getElementById('title').value;
const description = document.getElementById('description').value;
let description = document.getElementById('description').value;
const taskType = document.getElementById('task-type').value;
// Для типа it добавляем кабинет и тип проблемы в описание
if (taskType === 'it') {
const cabinet = document.getElementById('it-cabinet').value.trim();
const corpusType = document.getElementById('it-corpus-type').value;
const problemType = document.getElementById('it-problem-type').value;
if (!cabinet || !problemType) {
alert('Для заявки в ИТ необходимо указать номер кабинета и тип проблемы');
return;
}
// Добавляем в конец описания с переносом строки
description = description + '<br>Кабинет: ' + cabinet + '<br>Корпус: ' + corpusType + '<br>Тип проблемы: ' + problemType;
}
// Получаем полную дату и время из отдельных полей
const fullDateTime = getFullDateTime('due-date', 'due-time');