From 3503dffb9b0cbd55d9b6961855681e7310bfa138 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 --- 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 e61e056754..5ef3ce53b9 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.30.2