From 30e54997b2a0e67b86849c9eda8bc8bf610860d0 Mon Sep 17 00:00:00 2001 From: Bernd Bestel Date: Sat, 5 Jan 2019 14:27:40 +0100 Subject: [PATCH] Workaround to improve stock overview table loading time (references #120) --- public/viewjs/stockoverview.js | 3 ++- views/stockoverview.blade.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/public/viewjs/stockoverview.js b/public/viewjs/stockoverview.js index d150873b..cc9be350 100644 --- a/public/viewjs/stockoverview.js +++ b/public/viewjs/stockoverview.js @@ -2,7 +2,7 @@ 'paginate': false, 'order': [[3, 'asc']], 'columnDefs': [ - { 'orderable': false, 'targets': 0 }, + { 'orderable': false, 'searchable': false, 'visible': false, 'render': null, 'defaultContent': '', 'targets': 0 }, { 'visible': false, 'targets': 4 } ], 'language': JSON.parse(L('datatables_localization')), @@ -19,6 +19,7 @@ }); } }); +$('#stock-overview-table tbody').removeClass("d-none"); $("#location-filter").on("change", function() { diff --git a/views/stockoverview.blade.php b/views/stockoverview.blade.php index 8bfadd10..1ba746b0 100644 --- a/views/stockoverview.blade.php +++ b/views/stockoverview.blade.php @@ -79,7 +79,7 @@ Hidden product group - + @foreach($currentStock as $currentStockEntry) amount > 0) table-warning @elseif (FindObjectInArrayByPropertyValue($missingProducts, 'id', $currentStockEntry->product_id) !== null) table-info @endif">