From 050a823bcb89a409d37f5bad5d22b0343b5ff5e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cau=C3=AA=20Faleiros?= Date: Mon, 16 Nov 2026 13:41:19 -0300 Subject: [PATCH] fix: approving finals on an order changed elsewhere tries once more with the fresh version (DTF-WEB-7) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The first fix stays quiet when the finals were already approved or the order left Arte recebida/Correção. Order #28 changed in another tab while the panel was open and still waited for its finals, so the 409 came back. The person had already confirmed those files: the Kanban now reloads and sends them once more with the fresh version (the server checks everything again), and only reports if that fails too or the order was cancelled. Co-Authored-By: Claude Opus 5.5 (1M context) --- web/kanban-order.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/web/kanban-order.js b/web/kanban-order.js index 3b1d6cd..0a047a9 100644 --- a/web/kanban-order.js +++ b/web/kanban-order.js @@ -506,6 +506,13 @@ async function saveFinalFiles(order, files, note){ say('O arquivo final já estava aprovado.'); return true; } + // Changed elsewhere meanwhile (another tab or person) and still waiting for + // these finals: the person already confirmed them, so try once more with + // the fresh version; the server checks everything again (Sentry DTF-WEB-7). + if(fresh&&!fresh.cancelled_at){ + await api('/orders/'+order.id+'/final-files',{version:fresh.version,files,note}); + return false; + } throw error; } }