Reload calendar after color config changed (references #2368)

This commit is contained in:
Bernd Bestel 2023-11-04 14:18:51 +01:00
parent 80d7284d72
commit dc05476d09
No known key found for this signature in database
GPG Key ID: 71BD34C0D4891300
2 changed files with 9 additions and 2 deletions

View File

@ -65,3 +65,8 @@ $("#configure-colors-button").on("click", function(e)
$("#configure-colors-modal").modal("show");
});
$("#configure-colors-modal").on("hidden.bs.modal", function(e)
{
window.location.href = U('/calendar');
})

View File

@ -162,7 +162,8 @@ class CalendarService extends BaseService
'title' => $titlePrefix . $titlePrefix2 . $mealPlanDayNote->note,
'start' => $start,
'date_format' => $dateFormat,
'link' => $this->UrlManager->ConstructUrl('/mealplan' . '?start=' . $start)
'link' => $this->UrlManager->ConstructUrl('/mealplan' . '?start=' . $start),
'color' => $usersService->GetUserSettings(GROCY_USER_ID)['calendar_color_meal_plan']
];
}
@ -190,7 +191,8 @@ class CalendarService extends BaseService
'title' => $titlePrefix . $titlePrefix2 . FindObjectInArrayByPropertyValue($products, 'id', $mealPlanDayProduct->product_id)->name,
'start' => $start,
'date_format' => $dateFormat,
'link' => $this->UrlManager->ConstructUrl('/mealplan' . '?start=' . $start)
'link' => $this->UrlManager->ConstructUrl('/mealplan' . '?start=' . $start),
'color' => $usersService->GetUserSettings(GROCY_USER_ID)['calendar_color_meal_plan']
];
}
}