mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 09:39:57 +00:00
Fixed the "Shopping list to stock workflow" with disabled FEATURE_FLAG_STOCK_BEST_BEFORE_DATE_TRACKING (fixes #537)
This commit is contained in:
parent
5effa0c103
commit
890663bf63
@ -4,6 +4,7 @@
|
||||
### Shopping list improvements/fixes
|
||||
- Added an option to hide the month-calendar (in the shopping list settings / top right corner settings menu) (defaults to disabled, so please enable this option if you still want to have the month-calendar on the shopping list)
|
||||
- Optimized the new compact view (there was a little too much white space at the sides of the page)
|
||||
- Fixed that the "Shopping list to stock workflow" did not work when `FEATURE_FLAG_STOCK_BEST_BEFORE_DATE_TRACKING` was set to `false`
|
||||
|
||||
### Recipe improvements/fixes
|
||||
- Optimized the ordering of the inputs on the recipe ingredient edit page (moved "Only check if a single unit is in stock" before the amount)
|
||||
|
@ -163,7 +163,7 @@ function animateCSS(selector, animationName, callback, speed = "faster")
|
||||
{
|
||||
nodes.removeClass('animated').removeClass(speed).removeClass(animationName);
|
||||
nodes.unbind('animationend', handleAnimationEnd);
|
||||
|
||||
|
||||
if (typeof callback === 'function')
|
||||
{
|
||||
callback();
|
||||
|
@ -178,6 +178,11 @@ if (Grocy.Components.ProductPicker !== undefined)
|
||||
$("#tare-weight-handling-info").addClass("d-none");
|
||||
}
|
||||
|
||||
if (!Grocy.FeatureFlags.GROCY_FEATURE_FLAG_STOCK_BEST_BEFORE_DATE_TRACKING)
|
||||
{
|
||||
Grocy.Components.DateTimePicker.SetValue(moment().format('YYYY-MM-DD'));
|
||||
}
|
||||
|
||||
if (productDetails.product.default_best_before_days.toString() !== '0')
|
||||
{
|
||||
if (productDetails.product.default_best_before_days == -1)
|
||||
@ -192,12 +197,6 @@ if (Grocy.Components.ProductPicker !== undefined)
|
||||
Grocy.Components.DateTimePicker.SetValue(moment().add(productDetails.product.default_best_before_days, 'days').format('YYYY-MM-DD'));
|
||||
}
|
||||
$('#amount').focus();
|
||||
|
||||
Grocy.FrontendHelpers.ValidateForm('purchase-form');
|
||||
if (GetUriParam("flow") === "shoppinglistitemtostock" && BoolVal(Grocy.UserSettings.shopping_list_to_stock_workflow_auto_submit_when_prefilled) && document.getElementById("purchase-form").checkValidity() === true)
|
||||
{
|
||||
$("#save-purchase-button").click();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -207,11 +206,16 @@ if (Grocy.Components.ProductPicker !== undefined)
|
||||
}
|
||||
else
|
||||
{
|
||||
Grocy.Components.DateTimePicker.SetValue(moment().format('YYYY-MM-DD'));
|
||||
$('#amount').focus();
|
||||
}
|
||||
}
|
||||
|
||||
Grocy.FrontendHelpers.ValidateForm('purchase-form');
|
||||
if (GetUriParam("flow") === "shoppinglistitemtostock" && BoolVal(Grocy.UserSettings.shopping_list_to_stock_workflow_auto_submit_when_prefilled) && document.getElementById("purchase-form").checkValidity() === true)
|
||||
{
|
||||
$("#save-purchase-button").click();
|
||||
}
|
||||
|
||||
if (BoolVal(Grocy.UserSettings.scan_mode_purchase_enabled))
|
||||
{
|
||||
$("#amount").val(1);
|
||||
|
@ -95,7 +95,7 @@ $(document).on('click', '.shoppinglist-delete-button', function(e)
|
||||
var shoppingListItemId = $(e.currentTarget).attr('data-shoppinglist-id');
|
||||
Grocy.FrontendHelpers.BeginUiBusy();
|
||||
|
||||
Grocy.Api.Delete('objects/shopping_list/' + shoppingListItemId, {},
|
||||
Grocy.Api.Delete('objects/shopping_list/' + shoppingListItemId, { },
|
||||
function(result)
|
||||
{
|
||||
animateCSS("#shoppinglistitem-" + shoppingListItemId + "-row", "fadeOut", function()
|
||||
|
@ -5,7 +5,7 @@
|
||||
@section('viewJsName', 'barcodescannertesting')
|
||||
|
||||
@push('pageScripts')
|
||||
<link href="{{ $U('/node_modules/animate.css/animate.min.css?v', true) }}{{ $version }}" rel="stylesheet">
|
||||
<link href="{{ $U('/node_modules/animate.css/animate.min.css?v=', true) }}{{ $version }}" rel="stylesheet">
|
||||
@endpush
|
||||
|
||||
@section('content')
|
||||
|
@ -5,7 +5,7 @@
|
||||
@section('viewJsName', 'batteriesoverview')
|
||||
|
||||
@push('pageStyles')
|
||||
<link href="{{ $U('/node_modules/animate.css/animate.min.css?v', true) }}{{ $version }}" rel="stylesheet">
|
||||
<link href="{{ $U('/node_modules/animate.css/animate.min.css?v=', true) }}{{ $version }}" rel="stylesheet">
|
||||
@endpush
|
||||
|
||||
@section('content')
|
||||
|
@ -5,7 +5,7 @@
|
||||
@section('viewJsName', 'choresoverview')
|
||||
|
||||
@push('pageStyles')
|
||||
<link href="{{ $U('/node_modules/animate.css/animate.min.css?v', true) }}{{ $version }}" rel="stylesheet">
|
||||
<link href="{{ $U('/node_modules/animate.css/animate.min.css?v=', true) }}{{ $version }}" rel="stylesheet">
|
||||
@endpush
|
||||
|
||||
@section('content')
|
||||
|
@ -5,7 +5,7 @@
|
||||
@section('viewJsName', 'manageapikeys')
|
||||
|
||||
@push('pageStyles')
|
||||
<link href="{{ $U('/node_modules/animate.css/animate.min.css?v', true) }}{{ $version }}" rel="stylesheet">
|
||||
<link href="{{ $U('/node_modules/animate.css/animate.min.css?v=', true) }}{{ $version }}" rel="stylesheet">
|
||||
@endpush
|
||||
|
||||
@section('content')
|
||||
|
@ -5,7 +5,7 @@
|
||||
@section('viewJsName', 'quantityunitpluraltesting')
|
||||
|
||||
@push('pageStyles')
|
||||
<link href="{{ $U('/node_modules/animate.css/animate.min.css?v', true) }}{{ $version }}" rel="stylesheet">
|
||||
<link href="{{ $U('/node_modules/animate.css/animate.min.css?v=', true) }}{{ $version }}" rel="stylesheet">
|
||||
@endpush
|
||||
|
||||
@section('content')
|
||||
|
@ -11,7 +11,7 @@
|
||||
@endpush
|
||||
|
||||
@push('pageStyles')
|
||||
<link href="{{ $U('/node_modules/animate.css/animate.min.css?v', true) }}{{ $version }}" rel="stylesheet">
|
||||
<link href="{{ $U('/node_modules/animate.css/animate.min.css?v=', true) }}{{ $version }}" rel="stylesheet">
|
||||
<link href="{{ $U('/node_modules/datatables.net-rowgroup-bs4/css/rowGroup.bootstrap4.min.css?v=', true) }}{{ $version }}" rel="stylesheet">
|
||||
@endpush
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
@section('viewJsName', 'stockentries')
|
||||
|
||||
@push('pageStyles')
|
||||
<link href="{{ $U('/node_modules/animate.css/animate.min.css?v', true) }}{{ $version }}" rel="stylesheet">
|
||||
<link href="{{ $U('/node_modules/animate.css/animate.min.css?v=', true) }}{{ $version }}" rel="stylesheet">
|
||||
@endpush
|
||||
|
||||
@push('pageScripts')
|
||||
|
@ -5,7 +5,7 @@
|
||||
@section('viewJsName', 'stockoverview')
|
||||
|
||||
@push('pageStyles')
|
||||
<link href="{{ $U('/node_modules/animate.css/animate.min.css?v', true) }}{{ $version }}" rel="stylesheet">
|
||||
<link href="{{ $U('/node_modules/animate.css/animate.min.css?v=', true) }}{{ $version }}" rel="stylesheet">
|
||||
@endpush
|
||||
|
||||
@push('pageScripts')
|
||||
|
@ -10,7 +10,7 @@
|
||||
@endpush
|
||||
|
||||
@push('pageStyles')
|
||||
<link href="{{ $U('/node_modules/animate.css/animate.min.css?v', true) }}{{ $version }}" rel="stylesheet">
|
||||
<link href="{{ $U('/node_modules/animate.css/animate.min.css?v=', true) }}{{ $version }}" rel="stylesheet">
|
||||
<link href="{{ $U('/node_modules/datatables.net-rowgroup-bs4/css/rowGroup.bootstrap4.min.css?v=', true) }}{{ $version }}" rel="stylesheet">
|
||||
@endpush
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user