From 683073c244fb43ec0bdfe8a017aff422f9d8f451 Mon Sep 17 00:00:00 2001 From: Martin Grigoryan Date: Wed, 29 Oct 2025 14:17:00 +0400 Subject: [PATCH 1/3] fix(partsTable): initialize new item matrice as empty and refresh on global filter change - Default new items' matrice to empty to prevent stale values leaking from prior state - Force matrice update when the global filter changes to keep items in sync --- public/userarea/partsTable.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/public/userarea/partsTable.js b/public/userarea/partsTable.js index 74a4e1a..8bd420a 100644 --- a/public/userarea/partsTable.js +++ b/public/userarea/partsTable.js @@ -1339,6 +1339,7 @@ $(document).ready(function () { partId, currentValue, selectedMacro, + true ); }); }); @@ -1415,6 +1416,7 @@ $(document).ready(function () { partId, idmatrice, selectedMacro = null, + fromFilter = false ) { if (typeof $.fn.select2 === "undefined") { $select.replaceWith( @@ -1484,14 +1486,19 @@ $(document).ready(function () { true, true, ); - $select.append(option).trigger("change"); + + if (!fromFilter) $select.append(option).trigger("change"); + else $select.append(option); + partMatrice[partNumber] = matrice.IdMatrice; } else { // Aggiusta valore non valido $select.val(null).trigger("change"); partMatrice[partNumber] = null; } - } + } else { + $select.val(null).trigger("change"); + } $select.on("change", function () { const idmatrice = $(this).val(); From d29563d20d6171caa16ab8ec88497ef670463585 Mon Sep 17 00:00:00 2001 From: Martin Grigoryan Date: Wed, 29 Oct 2025 18:27:33 +0400 Subject: [PATCH 2/3] feat(partsTable): add image icon to show/hide photo button - Add image icon alongside eye icon in show/hide photo button - Improve visual indication of photo toggle functionality --- public/userarea/modal_partsTable.php | 6 +++++- public/userarea/partsTable.js | 16 ++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/public/userarea/modal_partsTable.php b/public/userarea/modal_partsTable.php index 4959565..de3bed3 100644 --- a/public/userarea/modal_partsTable.php +++ b/public/userarea/modal_partsTable.php @@ -6,7 +6,7 @@