diff --git a/changelog/53_UNRELEASED_2019-xx-xx.md b/changelog/53_UNRELEASED_2019-xx-xx.md index 868e93fa..989ccdb1 100644 --- a/changelog/53_UNRELEASED_2019-xx-xx.md +++ b/changelog/53_UNRELEASED_2019-xx-xx.md @@ -9,6 +9,9 @@ - It's now possible to display a recipe directly from the meal plan (new "eye button") (thanks @kriddles) - Improved the responsiveness of the meal plan and calendar page by automatically switching to a day calendar view on smaller screens (thanks for the idea @kriddles) +### Chores improvements +- There is now a new sub feature flag `FEATURE_FLAG_CHORES_ASSIGNMENTS` to disable chore assignments if you don't need them (defaults to `true`, so no changed behavior when not configured) + ### Calendar improvements - The calendar now also contains all planned recipes from the meal plan on the corresponding day - Improved that dates in the iCal calendar export now include the server timezone diff --git a/config-dist.php b/config-dist.php index 53817a24..c83286bb 100644 --- a/config-dist.php +++ b/config-dist.php @@ -124,6 +124,7 @@ Setting('FEATURE_FLAG_STOCK_PRICE_TRACKING', true); Setting('FEATURE_FLAG_STOCK_LOCATION_TRACKING', true); Setting('FEATURE_FLAG_STOCK_BEST_BEFORE_DATE_TRACKING', true); Setting('FEATURE_FLAG_STOCK_PRODUCT_OPENED_TRACKING', true); +Setting('FEATURE_FLAG_CHORES_ASSIGNMENTS', true); # Feature settings diff --git a/public/viewjs/choreform.js b/public/viewjs/choreform.js index 730a2bcd..1bd77713 100644 --- a/public/viewjs/choreform.js +++ b/public/viewjs/choreform.js @@ -3,7 +3,11 @@ e.preventDefault(); var jsonData = $('#chore-form').serializeJSON({ checkboxUncheckedValue: "0" }); - jsonData.assignment_config = $("#assignment_config").val().join(","); + if (Grocy.FeatureFlags.GROCY_FEATURE_FLAG_CHORES_ASSIGNMENTS) + { + jsonData.assignment_config = $("#assignment_config").val().join(","); + } + Grocy.FrontendHelpers.BeginUiBusy("chore-form"); if (Grocy.EditMode === 'create') diff --git a/public/viewjs/choretracking.js b/public/viewjs/choretracking.js index 6218008b..05b60fa9 100644 --- a/public/viewjs/choretracking.js +++ b/public/viewjs/choretracking.js @@ -8,7 +8,7 @@ Grocy.Api.Get('chores/' + jsonForm.chore_id, function (choreDetails) { - Grocy.Api.Post('chores/' + jsonForm.chore_id + '/execute', { 'tracked_time': Grocy.Components.DateTimePicker.GetValue(), 'done_by': Grocy.Components.UserPicker.GetValue() }, + Grocy.Api.Post('chores/' + jsonForm.chore_id + '/execute', { 'tracked_time': Grocy.Components.DateTimePicker.GetValue(), 'done_by': $("#user_id").val() }, function(result) { Grocy.FrontendHelpers.EndUiBusy("choretracking-form"); diff --git a/views/choreform.blade.php b/views/choreform.blade.php index e965d1eb..0287b65e 100644 --- a/views/choreform.blade.php +++ b/views/choreform.blade.php @@ -86,6 +86,7 @@ + @if(GROCY_FEATURE_FLAG_CHORES_ASSIGNMENTS)