tryiong to fix the details page

This commit is contained in:
2025-09-29 13:40:09 -07:00
parent fe76ada2dd
commit 79da5597d3
2 changed files with 6 additions and 2 deletions

View File

@@ -1590,6 +1590,8 @@ async def weekly_menu_page(request: Request, db: Session = Depends(get_db)):
})
weekly_menus_data.append(wm_dict)
logging.info(f"DEBUG: Loading weekly menu page with {len(weekly_menus_data)} weekly menus")
return templates.TemplateResponse("weeklymenu.html", {
"request": request,
"weekly_menus": weekly_menus_data,

View File

@@ -389,7 +389,8 @@ function createWeeklyMenu() {
if (data.status === 'success') {
bootstrap.Modal.getInstance(document.getElementById('createWeeklyMenuModal')).hide();
form.reset();
loadWeeklyMenus();
// Reload the page to get updated data
location.reload();
} else {
alert('Error creating weekly menu: ' + data.message);
}
@@ -492,7 +493,8 @@ function deleteWeeklyMenu(weeklyMenuId) {
.then(response => response.json())
.then(data => {
if (data.status === 'success') {
loadWeeklyMenus();
// Reload the page to get updated data
location.reload();
} else {
alert('Error deleting weekly menu: ' + data.message);
}