mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-11 17:16:59 -05:00
small fixes
This commit is contained in:
@@ -54,7 +54,7 @@ def hook(request, token):
|
|||||||
f = ingredient_parser.get_food(food)
|
f = ingredient_parser.get_food(food)
|
||||||
u = ingredient_parser.get_unit(unit)
|
u = ingredient_parser.get_unit(unit)
|
||||||
|
|
||||||
ShoppingListEntry.objects.create(food=f, unit=u, amount=amount, created_by=request.user, space=request.space)
|
ShoppingListEntry.objects.create(food=f, unit=u, amount=max(1, amount), created_by=request.user, space=request.space)
|
||||||
|
|
||||||
return JsonResponse({'data': data['message']['text']})
|
return JsonResponse({'data': data['message']['text']})
|
||||||
except Exception:
|
except Exception:
|
||||||
|
|||||||
@@ -163,7 +163,7 @@ onMounted(() => {
|
|||||||
* global title update handler, might be overridden by page specific handlers
|
* global title update handler, might be overridden by page specific handlers
|
||||||
*/
|
*/
|
||||||
router.afterEach((to, from) => {
|
router.afterEach((to, from) => {
|
||||||
if(to.name == 'StartPage' && !useUserPreferenceStore().activeSpace.spaceSetupCompleted && useUserPreferenceStore().activeSpace.createdBy.id! == useUserPreferenceStore().userSettings.user.id!){
|
if(to.name == 'StartPage' && !useUserPreferenceStore().activeSpace.spaceSetupCompleted != undefined &&!useUserPreferenceStore().activeSpace.spaceSetupCompleted && useUserPreferenceStore().activeSpace.createdBy.id! == useUserPreferenceStore().userSettings.user.id!){
|
||||||
router.push({name: 'WelcomePage'})
|
router.push({name: 'WelcomePage'})
|
||||||
}
|
}
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<v-list-item class="swipe-container border-t-sm" :id="itemContainerId" @touchend="handleSwipe()"
|
<v-list-item class="swipe-container border-t-sm" :id="itemContainerId" @touchend="handleSwipe()" @click="dialog = true;"
|
||||||
v-if="isShoppingListFoodVisible(props.shoppingListFood, useUserPreferenceStore().deviceSettings)"
|
v-if="isShoppingListFoodVisible(props.shoppingListFood, useUserPreferenceStore().deviceSettings)"
|
||||||
>
|
>
|
||||||
<!-- <div class="swipe-action" :class="{'bg-success': !isChecked , 'bg-warning': isChecked }">-->
|
<!-- <div class="swipe-action" :class="{'bg-success': !isChecked , 'bg-warning': isChecked }">-->
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
|
|
||||||
|
|
||||||
<div class="flex-grow-1 p-2" @click="dialog = true;">
|
<div class="flex-grow-1 p-2">
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
<div class="d-flex flex-column pr-2">
|
<div class="d-flex flex-column pr-2">
|
||||||
<span v-for="a in amounts" v-bind:key="a.key">
|
<span v-for="a in amounts" v-bind:key="a.key">
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
<i class="fas fa-check text-success fa-fw" v-if="a.checked"></i>
|
<i class="fas fa-check text-success fa-fw" v-if="a.checked"></i>
|
||||||
<i class="fas fa-clock-rotate-left text-info fa-fw" v-if="a.delayed"></i> <b>
|
<i class="fas fa-clock-rotate-left text-info fa-fw" v-if="a.delayed"></i> <b>
|
||||||
<span :class="{'text-disabled': a.checked || a.delayed}" class="text-no-wrap">
|
<span :class="{'text-disabled': a.checked || a.delayed}" class="text-no-wrap">
|
||||||
<span v-if="amounts.length > 1 || (amounts.length == 1 && a.amount != 1)">{{ $n(a.amount) }}</span>
|
<span v-if="amounts.length > 1 || (amounts.length == 1 && a.amount != 1) || a.unit">{{ $n(a.amount) }}</span>
|
||||||
<span class="ms-1" v-if="a.unit">{{ pluralString(a.unit, a.amount) }}</span>
|
<span class="ms-1" v-if="a.unit">{{ pluralString(a.unit, a.amount) }}</span>
|
||||||
</span>
|
</span>
|
||||||
</b>
|
</b>
|
||||||
|
|||||||
Reference in New Issue
Block a user