main
Satur@it-depot.ru 2025-03-06 16:58:07 +03:00
parent acf86a2d64
commit d82106e506
1 changed files with 13 additions and 3 deletions

View File

@ -878,6 +878,7 @@
const install = allInstalls.find(i => i.id === installId);
if (install) {
data['protocol'] = install.protocol;
data['note'] = install.note; // Сохраняем текущую заметку
}
$.ajax({
url: `${API_URL}/install/${installId}`,
@ -917,13 +918,18 @@
console.error('Install not found:', installId);
return;
}
// Передаем все текущие данные записи, чтобы ничего не очистилось
$.ajax({
url: `${API_URL}/install/${installId}`,
type: 'PUT',
contentType: 'application/json',
data: JSON.stringify({
rust_id: install.rust_id,
computer_name: install.computer_name,
install_time: install.install_time,
folder_id: folderId,
protocol: install.protocol
protocol: install.protocol,
note: install.note // Явно передаем заметку
}),
success: function () {
console.log('Move successful');
@ -1033,8 +1039,12 @@
type: 'PUT',
contentType: 'application/json',
data: JSON.stringify({
note: note,
protocol: install.protocol // Сохраняем текущий protocol
rust_id: install.rust_id,
computer_name: install.computer_name,
install_time: install.install_time,
folder_id: install.folder_id,
protocol: install.protocol,
note: note
}),
success: function () {
console.log('Note saved successfully');