Changelog and small changes for #552)

This commit is contained in:
Bernd Bestel 2020-02-09 17:27:46 +01:00
parent 13f99ad5f2
commit 1953a26d7f
No known key found for this signature in database
GPG Key ID: 71BD34C0D4891300
2 changed files with 44 additions and 36 deletions

View File

@ -19,7 +19,11 @@
### Meal plan improvements
- Improved that all add-dialogs can be submitted by using `ENTER` and that the next input is automatically selected after selecting a recipe/product
- Added an edit button to all types of meal plan entries
- Fixed that the meal plan not used the full height on mobile devices (also applies/fixes the same for the calendar)
- Fixed that the meal plan not used the full height on mobile devices
### Calendar fixes
- Fixed to only include events when the corresponding feature flag is enabled (e. g. don't show expiring products when `FEATURE_FLAG_STOCK_BEST_BEFORE_DATE_TRACKING` is set to `false`) (thanks @kriddles)
- Fixed that the calendar not used the full height on mobile devices
### General & other improvements/fixes
- Optimized the top navbar height and overall spacing to waste less space

View File

@ -102,10 +102,13 @@ class CalendarService extends BaseService
}
}
$mealPlanRecipeEvents = array();
if (GROCY_FEATURE_FLAG_STOCK_BEST_BEFORE_DATE_TRACKING)
{
$recipes = $this->Database->recipes();
$mealPlanDayRecipes = $this->Database->recipes()->where('type', 'mealplan-day');
$titlePrefix = $this->LocalizationService->__t('Meal plan recipe') . ': ';
$mealPlanRecipeEvents = array();
foreach($mealPlanDayRecipes as $mealPlanDayRecipe)
{
$recipesOfCurrentDay = $this->Database->recipes_nestings_resolved()->where('recipe_id = :1 AND includes_recipe_id != :1', $mealPlanDayRecipe->id);
@ -144,6 +147,7 @@ class CalendarService extends BaseService
'date_format' => 'date'
);
}
}
return array_merge($stockEvents, $taskEvents, $choreEvents, $batteryEvents, $mealPlanRecipeEvents, $mealPlanNotesEvents, $mealPlanProductEvents);
}