mirror of
https://github.com/grocy/grocy.git
synced 2025-08-18 03:25:50 +00:00
Fixed table filters
This commit is contained in:
@@ -29,7 +29,7 @@ $("#product-group-filter").on("change", function()
|
||||
value = "";
|
||||
}
|
||||
|
||||
productsTable.column(7).search(value).draw();
|
||||
productsTable.column(6).search(value).draw();
|
||||
});
|
||||
|
||||
$("#clear-filter-button").on("click", function()
|
||||
|
@@ -88,7 +88,7 @@ $("#status-filter").on("change", function()
|
||||
$('.recipe-gallery-item').removeClass('d-none');
|
||||
if (value !== "")
|
||||
{
|
||||
if (value === 'enoughinstock')
|
||||
if (value === 'Xenoughinstock')
|
||||
{
|
||||
$('.recipe-gallery-item').not('.recipe-enoughinstock').addClass('d-none');
|
||||
}
|
||||
|
@@ -30,7 +30,7 @@ $("#entity-filter").on("change", function()
|
||||
}
|
||||
|
||||
userfieldsTable.column(1).search(value).draw();
|
||||
$("#new-userfield-button").attr("href", U("/userfield/new?entity=" + value));
|
||||
$("#new-userfield-button").attr("href", U("/userfield/new?embedded&entity=" + value));
|
||||
});
|
||||
|
||||
$("#clear-filter-button").on("click", function()
|
||||
@@ -78,8 +78,9 @@ $(document).on('click', '.userfield-delete-button', function(e)
|
||||
});
|
||||
});
|
||||
|
||||
if (typeof GetUriParam("entity") !== "undefined" && !GetUriParam("entity").isEmpty())
|
||||
if (GetUriParam("entity") != undefined && !GetUriParam("entity").isEmpty())
|
||||
{
|
||||
$("#entity-filter").val(GetUriParam("entity"));
|
||||
$("#entity-filter").trigger("change");
|
||||
$("#name").focus();
|
||||
}
|
||||
|
@@ -59,7 +59,7 @@
|
||||
<select class="form-control"
|
||||
id="status-filter">
|
||||
<option value="all">{{ $__t('All') }}</option>
|
||||
<option value="enoughinstock">{{ $__t('Enough in stock') }}</option>
|
||||
<option value="Xenoughinstock">{{ $__t('Enough in stock') }}</option>
|
||||
<option value="enoughinstockwithshoppinglist">{{ $__t('Not enough in stock, but already on the shopping list') }}</option>
|
||||
<option value="notenoughinstock">{{ $__t('Not enough in stock') }}</option>
|
||||
</select>
|
||||
@@ -153,7 +153,7 @@
|
||||
{{ FindObjectInArrayByPropertyValue($recipesResolved, 'recipe_id', $recipe->id)->missing_products_count }}
|
||||
</td>
|
||||
<td class="d-none">
|
||||
@if(FindObjectInArrayByPropertyValue($recipesResolved, 'recipe_id', $recipe->id)->need_fulfilled == 1) enoughinstock @elseif(FindObjectInArrayByPropertyValue($recipesResolved, 'recipe_id', $recipe->id)->need_fulfilled_with_shopping_list == 1) enoughinstockwithshoppinglist @else notenoughinstock @endif
|
||||
@if(FindObjectInArrayByPropertyValue($recipesResolved, 'recipe_id', $recipe->id)->need_fulfilled == 1) Xenoughinstock @elseif(FindObjectInArrayByPropertyValue($recipesResolved, 'recipe_id', $recipe->id)->need_fulfilled_with_shopping_list == 1) enoughinstockwithshoppinglist @else notenoughinstock @endif
|
||||
</td>
|
||||
<td class="d-none">
|
||||
@foreach(FindAllObjectsInArrayByPropertyValue($recipePositionsResolved, 'recipe_id', $recipe->id) as $recipePos)
|
||||
|
@@ -25,7 +25,8 @@
|
||||
</div>
|
||||
<div class="related-links collapse d-md-flex order-2 width-xs-sm-100 m-1 mt-md-0 mb-md-0 float-right"
|
||||
id="related-links">
|
||||
<a class="btn btn-primary responsive-button show-as-dialog-link"
|
||||
<a id="new-userfield-button"
|
||||
class="btn btn-primary responsive-button show-as-dialog-link"
|
||||
href="{{ $U('/userfield/new?embedded') }}">
|
||||
{{ $__t('Add') }}
|
||||
</a>
|
||||
|
Reference in New Issue
Block a user