From d82106e5067902b47b68fe3b9b02521178e1d039 Mon Sep 17 00:00:00 2001 From: "Satur@it-depot.ru" Date: Thu, 6 Mar 2025 16:58:07 +0300 Subject: [PATCH] img fix --- templates/index.html | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/templates/index.html b/templates/index.html index 7ec18b3..b12466d 100644 --- a/templates/index.html +++ b/templates/index.html @@ -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');