mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 09:39:57 +00:00
Workaround to improve stock overview table loading time (references #120)
This commit is contained in:
parent
b9f0470d76
commit
30e54997b2
@ -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()
|
||||
{
|
||||
|
@ -79,7 +79,7 @@
|
||||
<th class="d-none">Hidden product group</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tbody class="d-none">
|
||||
@foreach($currentStock as $currentStockEntry)
|
||||
<tr id="product-{{ $currentStockEntry->product_id }}-row" class="@if($currentStockEntry->best_before_date < date('Y-m-d 23:59:59', strtotime('-1 days')) && $currentStockEntry->amount > 0) table-danger @elseif($currentStockEntry->best_before_date < date('Y-m-d 23:59:59', strtotime("+$nextXDays days")) && $currentStockEntry->amount > 0) table-warning @elseif (FindObjectInArrayByPropertyValue($missingProducts, 'id', $currentStockEntry->product_id) !== null) table-info @endif">
|
||||
<td class="fit-content">
|
||||
|
Loading…
x
Reference in New Issue
Block a user