From 4a9f386b7d616c9e713eddceb8b2141bff63b036 Mon Sep 17 00:00:00 2001 From: marina Date: Mon, 23 Jun 2025 16:17:09 +0300 Subject: [PATCH] =?utf8?q?=D0=BF=D1=80=D0=B0=D0=B2=D0=BA=D0=B0=20=D0=BE?= =?utf8?q?=D1=82=D0=BE=D0=B1=D1=80=D0=B0=D0=B6=D0=B5=D0=BD=D0=B8=D1=8F=20?= =?utf8?q?=D0=B8=20=D1=81=D0=BA=D1=80=D1=8B=D1=82=D0=B8=D1=8F=20=D0=BF?= =?utf8?q?=D0=BE=D0=B4=D0=BA=D0=B0=D1=82=D0=B5=D0=B3=D0=BE=D1=80=D0=B8?= =?utf8?q?=D0=B9=20=D0=B8=20=D0=BA=D0=B0=D1=82=D0=B5=D0=B3=D0=BE=D1=80?= =?utf8?q?=D0=B8=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../js/autoplannogramma/autoplannogramma.js | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/erp24/web/js/autoplannogramma/autoplannogramma.js b/erp24/web/js/autoplannogramma/autoplannogramma.js index a8e6cc1a..3428a00e 100644 --- a/erp24/web/js/autoplannogramma/autoplannogramma.js +++ b/erp24/web/js/autoplannogramma/autoplannogramma.js @@ -64,6 +64,34 @@ $('.subcategory .list-group-item').on('click', function (e) { const category = $link.data('category'); const subcategory = $link.data('subcategory'); const $row = $link.closest('tr'); + const $nextRow = $row.next(); + + if ($nextRow.hasClass('inserted-row')) { + if ($nextRow.hasClass('d-none')) { + $('tr.inserted-row').each(function () { + const $insertedRow = $(this); + const $prevLink = $insertedRow.prevAll('tr') + .find(`.list-group-item[data-category="${category}"][data-subcategory="${subcategory}"]`) + .first(); + + if ($prevLink.length) { + $insertedRow.removeClass('d-none'); + } + }); + } else { + $('tr.inserted-row').each(function () { + const $insertedRow = $(this); + const $prevLink = $insertedRow.prevAll('tr') + .find(`.list-group-item[data-category="${category}"][data-subcategory="${subcategory}"]`) + .first(); + + if ($prevLink.length) { + $insertedRow.addClass('d-none'); + } + }); + } + return; + } const filters = getFilterData(); filters.month = getMonthByWeek(week, year, true); -- 2.39.5