diff --git a/cookbook/templates/manifest.json b/cookbook/templates/manifest.json index 0cec81bef..55f6b1847 100644 --- a/cookbook/templates/manifest.json +++ b/cookbook/templates/manifest.json @@ -37,12 +37,6 @@ "short_name": "Shopping", "description": "View your shopping lists", "url": "./list/shopping-list/" - }, - { - "name": "Latest Shopping List", - "short_name": "Shopping List", - "description": "View the latest shopping list", - "url": "./shopping/latest/" } ] } diff --git a/cookbook/urls.py b/cookbook/urls.py index 925926814..f852846ba 100644 --- a/cookbook/urls.py +++ b/cookbook/urls.py @@ -59,14 +59,13 @@ urlpatterns = [ path('space-overview', views.space_overview, name='view_space_overview'), path('space-manage/', views.space_manage, name='view_space_manage'), path('switch-space/', views.switch_space, name='view_switch_space'), + path('profile/', views.view_profile, name='view_profile'), path('no-perm', views.no_perm, name='view_no_perm'), path('invite/', views.invite_link, name='view_invite'), path('system/', views.system, name='view_system'), path('search/', views.search, name='view_search'), path('books/', views.books, name='view_books'), path('plan/', views.meal_plan, name='view_plan'), - path('plan/entry/', views.meal_plan_entry, name='view_plan_entry'), - path('shopping/latest/', lists.shopping_list, name='view_shopping_latest'), path('shopping/', lists.shopping_list, name='view_shopping'), path('settings/', views.user_settings, name='view_settings'), path('history/', views.history, name='view_history'), diff --git a/cookbook/views/views.py b/cookbook/views/views.py index db9266b5d..925c2f3a3 100644 --- a/cookbook/views/views.py +++ b/cookbook/views/views.py @@ -175,6 +175,10 @@ def meal_plan(request): def supermarket(request): return render(request, 'supermarket.html', {}) +@group_required('user') +def view_profile(request, user_id): + return render(request, 'supermarket.html', {}) + @group_required('user') def ingredient_editor(request): @@ -189,23 +193,6 @@ def ingredient_editor(request): return render(request, 'ingredient_editor.html', template_vars) -@group_required('user') -def meal_plan_entry(request, pk): - plan = MealPlan.objects.filter(space=request.space).get(pk=pk) - - if plan.created_by != request.user and plan.shared != request.user: - messages.add_message(request, messages.ERROR, _('You do not have the required permissions to view this page!')) - return HttpResponseRedirect(reverse_lazy('index')) - - same_day_plan = MealPlan.objects \ - .filter(date=plan.date, space=request.space) \ - .exclude(pk=plan.pk) \ - .filter(Q(created_by=request.user) | Q(shared=request.user)) \ - .order_by('meal_type').all() - - return render(request, 'meal_plan_entry.html', {'plan': plan, 'same_day_plan': same_day_plan}) - - @group_required('guest') def user_settings(request): if request.space.demo: diff --git a/vue/src/components/RecipeCard.vue b/vue/src/components/RecipeCard.vue index 6871f475d..80cbcdb25 100755 --- a/vue/src/components/RecipeCard.vue +++ b/vue/src/components/RecipeCard.vue @@ -1,6 +1,6 @@