mirror of
https://github.com/grocy/grocy.git
synced 2026-04-07 05:16:15 +02:00
view stockoverview.blade: display product_group column
This commit is contained in:
parent
4b0ab25c77
commit
56ab8add27
|
|
@ -4,9 +4,9 @@
|
|||
'columnDefs': [
|
||||
{ 'orderable': false, 'targets': 0 },
|
||||
{ 'searchable': false, "targets": 0 },
|
||||
{ 'searchable': false, "targets": 0 },
|
||||
{ 'visible': false, 'targets': 4 },
|
||||
{ 'visible': false, 'targets': 5 },
|
||||
{ 'visible': false, 'targets': 6 }
|
||||
{ 'visible': false, 'targets': 5 }
|
||||
],
|
||||
});
|
||||
$('#stock-overview-table tbody').removeClass("d-none");
|
||||
|
|
@ -20,7 +20,7 @@ $("#location-filter").on("change", function()
|
|||
value = "";
|
||||
}
|
||||
|
||||
stockOverviewTable.column(4).search(value).draw();
|
||||
stockOverviewTable.column(5).search(value).draw();
|
||||
});
|
||||
|
||||
$("#product-group-filter").on("change", function()
|
||||
|
|
@ -31,7 +31,7 @@ $("#product-group-filter").on("change", function()
|
|||
value = "";
|
||||
}
|
||||
|
||||
stockOverviewTable.column(6).search(value).draw();
|
||||
stockOverviewTable.column(2).search(value).draw();
|
||||
});
|
||||
|
||||
$("#status-filter").on("change", function()
|
||||
|
|
@ -45,7 +45,7 @@ $("#status-filter").on("change", function()
|
|||
// Transfer CSS classes of selected element to dropdown element (for background)
|
||||
$(this).attr("class", $("#" + $(this).attr("id") + " option[value='" + value + "']").attr("class") + " form-control");
|
||||
|
||||
stockOverviewTable.column(5).search(value).draw();
|
||||
stockOverviewTable.column(6).search(value).draw();
|
||||
});
|
||||
|
||||
$(".status-filter-message").on("click", function()
|
||||
|
|
|
|||
|
|
@ -104,11 +104,11 @@
|
|||
<tr>
|
||||
<th class="border-right"></th>
|
||||
<th>{{ $__t('Product') }}</th>
|
||||
<th>{{ $__t('Product Group') }}</th>
|
||||
<th>{{ $__t('Amount') }}</th>
|
||||
<th class="@if(!GROCY_FEATURE_FLAG_STOCK_BEST_BEFORE_DATE_TRACKING) d-none @endif">{{ $__t('Next best before date') }}</th>
|
||||
<th class="d-none">Hidden location</th>
|
||||
<th class="d-none">Hidden status</th>
|
||||
<th class="d-none">Hidden product group</th>
|
||||
|
||||
@include('components.userfields_thead', array(
|
||||
'userfields' => $userfields
|
||||
|
|
@ -206,6 +206,10 @@
|
|||
<td class="product-name-cell cursor-link" data-product-id="{{ $currentStockEntry->product_id }}">
|
||||
{{ FindObjectInArrayByPropertyValue($products, 'id', $currentStockEntry->product_id)->name }}
|
||||
</td>
|
||||
@php $productGroup = FindObjectInArrayByPropertyValue($productGroups, 'id', FindObjectInArrayByPropertyValue($products, 'id', $currentStockEntry->product_id)->product_group_id) @endphp
|
||||
<td>
|
||||
@if($productGroup !== null){{ $productGroup->name }}@endif
|
||||
</td>
|
||||
<td>
|
||||
<span id="product-{{ $currentStockEntry->product_id }}-amount" class="locale-number locale-number-quantity-amount">{{ $currentStockEntry->amount }}</span> <span id="product-{{ $currentStockEntry->product_id }}-qu-name">{{ $__n($currentStockEntry->amount, FindObjectInArrayByPropertyValue($quantityunits, 'id', FindObjectInArrayByPropertyValue($products, 'id', $currentStockEntry->product_id)->qu_id_stock)->name, FindObjectInArrayByPropertyValue($quantityunits, 'id', FindObjectInArrayByPropertyValue($products, 'id', $currentStockEntry->product_id)->qu_id_stock)->name_plural) }}</span>
|
||||
<span id="product-{{ $currentStockEntry->product_id }}-opened-amount" class="small font-italic">@if($currentStockEntry->amount_opened > 0){{ $__t('%s opened', $currentStockEntry->amount_opened) }}@endif</span>
|
||||
|
|
@ -239,10 +243,6 @@
|
|||
<td class="d-none">
|
||||
@if($currentStockEntry->best_before_date < date('Y-m-d 23:59:59', strtotime('-1 days')) && $currentStockEntry->amount > 0) expired @elseif($currentStockEntry->best_before_date < date('Y-m-d 23:59:59', strtotime("+$nextXDays days")) && $currentStockEntry->amount > 0) expiring @endif @if(FindObjectInArrayByPropertyValue($missingProducts, 'id', $currentStockEntry->product_id) !== null) belowminstockamount @endif
|
||||
</td>
|
||||
@php $productGroup = FindObjectInArrayByPropertyValue($productGroups, 'id', FindObjectInArrayByPropertyValue($products, 'id', $currentStockEntry->product_id)->product_group_id) @endphp
|
||||
<td class="d-none">
|
||||
@if($productGroup !== null){{ $productGroup->name }}@endif
|
||||
</td>
|
||||
|
||||
@include('components.userfields_tbody', array(
|
||||
'userfields' => $userfields,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user