mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 17:45:39 +00:00
Transpose product column index when searching in it (fixes #2688)
This commit is contained in:
parent
27b79841fc
commit
72453eac0a
@ -11,6 +11,7 @@
|
|||||||
### Stock
|
### Stock
|
||||||
|
|
||||||
- Optimized that the built-in Open Food Facts external barcode lookup plugin now uses the localized product name (if provided by the Open Food Facts API, based on the set Grocy language of the current user)
|
- Optimized that the built-in Open Food Facts external barcode lookup plugin now uses the localized product name (if provided by the Open Food Facts API, based on the set Grocy language of the current user)
|
||||||
|
- Fixed that the product filter on the stock entires page didn't work when the product column was reordered / not the second one
|
||||||
|
|
||||||
### Shopping list
|
### Shopping list
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ $.fn.dataTable.ext.search.push(function(settings, data, dataIndex)
|
|||||||
{
|
{
|
||||||
var productId = Grocy.Components.ProductPicker.GetValue();
|
var productId = Grocy.Components.ProductPicker.GetValue();
|
||||||
|
|
||||||
if (!productId || Number.isNaN(productId) || productId == data[1])
|
if (!productId || Number.isNaN(productId) || productId == data[stockEntriesTable.colReorder.transpose(1)])
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -75,7 +75,7 @@
|
|||||||
data-table-selector="#stockentries-table"
|
data-table-selector="#stockentries-table"
|
||||||
href="#"><i class="fa-solid fa-eye"></i></a>
|
href="#"><i class="fa-solid fa-eye"></i></a>
|
||||||
</th>
|
</th>
|
||||||
<th class="d-none">Hidden product_id</th> <!-- This must be in the first column for searching -->
|
<th class="d-none">Hidden product_id</th>
|
||||||
<th class="allow-grouping">{{ $__t('Product') }}</th>
|
<th class="allow-grouping">{{ $__t('Product') }}</th>
|
||||||
<th>{{ $__t('Amount') }}</th>
|
<th>{{ $__t('Amount') }}</th>
|
||||||
<th class="@if(!GROCY_FEATURE_FLAG_STOCK_BEST_BEFORE_DATE_TRACKING) d-none @endif allow-grouping">{{ $__t('Due date') }}</th>
|
<th class="@if(!GROCY_FEATURE_FLAG_STOCK_BEST_BEFORE_DATE_TRACKING) d-none @endif allow-grouping">{{ $__t('Due date') }}</th>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user