From 1812d03e550e119fa02258e532f33098c583aff9 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Fri, 26 Nov 2021 10:21:08 +0000 Subject: [PATCH] Bug 28854: Add count of scanned items to verification modal Signed-off-by: Katrin Fischer Signed-off-by: Kyle M Hall Signed-off-by: Tomas Cohen Arazi --- koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt index c41a8b599a..4ed6318f43 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt @@ -472,7 +472,7 @@
- + [% IF item.onloan %]
[% t('Scan all barcodes of items found in the items bundle. If any items are missing, they will be marked as lost') | html %]
@@ -1496,11 +1496,13 @@ if ( char.match(/\n/) ) { const barcodes = ev.target.value.split('\n').map(function(s) { return s.trim() }); const expected = []; + let found = 0; $('#items-bundle-contents-table tr').each(function () { const barcode = this.getAttribute('data-barcode'); expected.push(barcode); if (barcodes.includes(barcode)) { this.classList.add('ok'); + found++; } else { this.classList.remove('ok'); } @@ -1519,6 +1521,9 @@ feedback.addClass('alert-success').removeClass('alert-danger').html(string).fadeIn(100); }); } + $('#verify-progress').show(); + $('#verified').text(found); + $('#expected').text(expected.length); } }); -- 2.39.5