diff --git a/changelog/53_UNRELEASED_2019-xx-xx.md b/changelog/53_UNRELEASED_2019-xx-xx.md
index dcb1ea86..fc4244eb 100644
--- a/changelog/53_UNRELEASED_2019-xx-xx.md
+++ b/changelog/53_UNRELEASED_2019-xx-xx.md
@@ -3,6 +3,10 @@
- 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)
- The calendar now also contains all planned recipes from the meal plan on the corresponding day
- When adding a product to the shopping list from the new context/more menu from the stock overview page and if the product is already on the shopping list, the amount of that entry will be updated acccordingly instead of adding a new (double) shopping list item
+- Fixed that the browser barcode scanner button was not clickable on iOS Safari (thanks @DeeeeLAN)
+- Fixed a problem regarding quantity unit conversion handling for recipe ingredients of products with no unit relations, but only a different purchase/stock quantity unit
+- Improved that dates in the iCal calendar export now includes the server timezone
+- It's now also possible to set the meal plan page as the default/entry page (`config.php` setting `ENTRY_PAGE`) (thanks @lwis)
- The API Endpoint `GET /files/{group}/{fileName}` now also returns a `Cache-Control` header (defaults fixed to 30 days) to further increase page load times
- Fixed that the API endpoint `/stock/shoppinglist/add-product` failed when a product should be added which was not already on the shopping list (thanks @Forceu)
- Some style/CSS detail-refinements
diff --git a/config-dist.php b/config-dist.php
index a8f34897..53817a24 100644
--- a/config-dist.php
+++ b/config-dist.php
@@ -51,7 +51,7 @@ Setting('DISABLE_URL_REWRITING', false);
# Specify an custom homepage if desired - by default the homepage will be set to the stock overview,
# this needs to be one of the following values:
-# stock, shoppinglist, recipes, chores, tasks, batteries, equipment, calendar
+# stock, shoppinglist, recipes, chores, tasks, batteries, equipment, calendar, mealplan
Setting('ENTRY_PAGE', 'stock');
# Set this to true if you want to disable authentication / the login screen,
diff --git a/controllers/CalendarApiController.php b/controllers/CalendarApiController.php
index e579e532..a641a553 100644
--- a/controllers/CalendarApiController.php
+++ b/controllers/CalendarApiController.php
@@ -26,12 +26,20 @@ class CalendarApiController extends BaseApiController
$events = $this->CalendarService->GetEvents();
foreach($events as $event)
{
+ $date = new \DateTime($event['start']);
+ $date->setTimezone(date_default_timezone_get());
+
+ if ($event['date_format'] === 'date')
+ {
+ $date->setTime(23, 59, 59);
+ }
+
$vEvent = new \Eluceo\iCal\Component\Event();
- $vEvent->setDtStart(new \DateTime($event['start']))
- ->setDtEnd(new \DateTime($event['start']))
+ $vEvent->setDtStart($date)
+ ->setDtEnd($date)
->setSummary($event['title'])
->setNoTime($event['date_format'] === 'date')
- ->setUseUtc(false);
+ ->setUseTimezone(true);
$vCalendar->addComponent($vEvent);
}
diff --git a/controllers/SystemController.php b/controllers/SystemController.php
index 36b5dbf3..54cdb252 100644
--- a/controllers/SystemController.php
+++ b/controllers/SystemController.php
@@ -85,6 +85,11 @@ class SystemController extends BaseController
if ($entryPage === 'calendar' && constant('GROCY_FEATURE_FLAG_CALENDAR')) {
return '/calendar';
}
+
+ // Meal Plan
+ if ($entryPage === 'mealplan' && constant('GROCY_FEATURE_FLAG_RECIPES')) {
+ return '/mealplan';
+ }
return '/about';
}
diff --git a/public/viewjs/components/productamountpicker.js b/public/viewjs/components/productamountpicker.js
index ced3987c..0e34a587 100644
--- a/public/viewjs/components/productamountpicker.js
+++ b/public/viewjs/components/productamountpicker.js
@@ -11,7 +11,13 @@ Grocy.Components.ProductAmountPicker.Reload = function(productId, destinationQuI
$("#qu_id").attr("data-destination-qu-name", FindObjectInArrayByPropertyValue(Grocy.QuantityUnits, 'id', destinationQuId).name);
conversionsForProduct.forEach(conversion =>
{
- $("#qu_id").append('');
+ var factor = conversion.factor;
+ if (conversion.to_qu_id == destinationQuId)
+ {
+ factor = 1;
+ }
+
+ $("#qu_id").append('');
});
}