Added a sub feature flag to disable chore assignments when not needed

This commit is contained in:
Bernd Bestel
2019-09-26 17:20:25 +02:00
parent cf3217ada4
commit cf2e6f1039
9 changed files with 38 additions and 3 deletions

View File

@@ -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')

View File

@@ -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");