From b5be3f96c79191d4c8205338e2a9d200d2c683f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CNaeel=E2=80=9D?= Date: Fri, 19 Jun 2026 10:51:47 +0400 Subject: [PATCH] =?UTF-8?q?debug:=20console.log=20=D0=B2=20refreshSupps=20?= =?UTF-8?q?(v1.0.61)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.cfm | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/index.cfm b/index.cfm index 2096b72..4940c5e 100644 --- a/index.cfm +++ b/index.cfm @@ -61,7 +61,7 @@
Nubes - Сверка договоров — LLM v1.0.60 — Lucee + Сверка договоров — LLM v1.0.61 — Lucee
@@ -323,15 +323,19 @@ parseBtn.addEventListener('click', async function() { // ── Обновить supplement_id/type для radio ────────────────── async function refreshSupps() { - if (!contractId) return; + if (!contractId) { console.log('refreshSupps: no contractId'); return; } try { var resp = await fetch('/api.cfm?action=query&sql=' + encodeURIComponent("SELECT s.id, s.type, s.document_id FROM supplements s WHERE s.contract_id='" + contractId + "'")); var data = await resp.json(); + console.log('refreshSupps: data=', data); + console.log('refreshSupps: fileQueue doc_ids=', fileQueue.map(function(f){return f.doc_id;})); if (data.OK && data.ROWS) { data.ROWS.forEach(function(r) { var supp = {}; data.COLUMNS.forEach(function(c, ci) { supp[c] = r[ci]; }); + console.log('refreshSupps: supp=', supp); for (var i = 0; i < fileQueue.length; i++) { + console.log(' cmp: doc_id=' + fileQueue[i].doc_id + ' vs document_id=' + supp.document_id + ' match=' + (fileQueue[i].doc_id === supp.document_id)); if (fileQueue[i].doc_id === supp.document_id) { fileQueue[i].supp_id = supp.id; fileQueue[i].supp_type = supp.type; @@ -340,7 +344,7 @@ async function refreshSupps() { }); renderTable(); } - } catch(e) {} + } catch(e) { console.log('refreshSupps error:', e); } } function setInitial(suppId) {