ит заявка
This commit is contained in:
@@ -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');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user