refactoring

This commit is contained in:
frankknoll
2023-04-14 11:46:40 +02:00
parent 16ff49fd4e
commit 963f60dc5a
5 changed files with 12 additions and 9 deletions

View File

@@ -1,14 +1,14 @@
class BatchCodeSelectInitializer {
static initialize({batchCodeSelect, batchCodeDetails}) {
batchCodeSelect.select2({ minimumInputLength: 4 });
batchCodeSelect.on(
static initialize({batchCodeSelectElement, batchCodeDetailsElement}) {
batchCodeSelectElement.select2({ minimumInputLength: 4 });
batchCodeSelectElement.on(
'select2:select',
function (event) {
const batchcode = event.params.data.id;
new HistogramView(batchCodeDetails).displayHistogramView(batchcode);
new HistogramView(batchCodeDetailsElement).displayHistogramView(batchcode);
GoogleAnalytics.click_batchcode(batchcode);
});
batchCodeSelect.select2('open');
batchCodeSelectElement.select2('open');
}
}