mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2025-12-27 04:00:48 -05:00
Compare commits
171 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
28e554d04b | ||
|
|
5040caf91c | ||
|
|
c5fcfd07a7 | ||
|
|
a1a172e223 | ||
|
|
0039654d40 | ||
|
|
17de37b9fc | ||
|
|
d0856ce3b7 | ||
|
|
24426c2b7e | ||
|
|
5380b7d697 | ||
|
|
1d0488fbb0 | ||
|
|
2213346297 | ||
|
|
e1a9938c0b | ||
|
|
126f21842f | ||
|
|
9dfc9e1020 | ||
|
|
84898b09f2 | ||
|
|
d4ded02c2a | ||
|
|
8db294255e | ||
|
|
c99d13e2e7 | ||
|
|
5608f80246 | ||
|
|
59040f4cdf | ||
|
|
af476480c1 | ||
|
|
9307e61c1a | ||
|
|
8f5593d5ca | ||
|
|
f4eded5b03 | ||
|
|
3d9c51053a | ||
|
|
0046233b6f | ||
|
|
78ede7b601 | ||
|
|
7e7e133604 | ||
|
|
b0ec569a00 | ||
|
|
7674084ae0 | ||
|
|
798e2ac48b | ||
|
|
714d4a32a9 | ||
|
|
66b5097872 | ||
|
|
c1d4fed142 | ||
|
|
1cc0806729 | ||
|
|
09487a0e94 | ||
|
|
89e58edcad | ||
|
|
887d7fe9f0 | ||
|
|
14696e3ce8 | ||
|
|
dd56bb4b35 | ||
|
|
8ec0ba9541 | ||
|
|
c105c9190e | ||
|
|
9c1700adb9 | ||
|
|
b43a87a7e3 | ||
|
|
01e78baecf | ||
|
|
0ee241524d | ||
|
|
2bd60a6f13 | ||
|
|
e0196f17da | ||
|
|
fe75052baa | ||
|
|
0a3b750294 | ||
|
|
fcd3918b5f | ||
|
|
e7aac06ca7 | ||
|
|
67e1f57723 | ||
|
|
10581329e8 | ||
|
|
553c06f291 | ||
|
|
e0cbfd824c | ||
|
|
a5a522d378 | ||
|
|
8502bb235b | ||
|
|
42f2ad624f | ||
|
|
3b95bf40da | ||
|
|
81a6837b06 | ||
|
|
a95e352250 | ||
|
|
a4ca66d287 | ||
|
|
ec30b81ae5 | ||
|
|
92211b1f51 | ||
|
|
8eeea42057 | ||
|
|
7e76a71ccc | ||
|
|
b397c94f0a | ||
|
|
9552564e59 | ||
|
|
4ecf323e4f | ||
|
|
d5d5c2c52b | ||
|
|
7ffabfe711 | ||
|
|
49e0b5b962 | ||
|
|
a05f1ece24 | ||
|
|
748b91bb8a | ||
|
|
bd2e9cc3d9 | ||
|
|
c40bb20a7a | ||
|
|
b377d2cd35 | ||
|
|
dc0e91d0f9 | ||
|
|
5f12907544 | ||
|
|
889ddac7dc | ||
|
|
b369e2618a | ||
|
|
5a4e0204c9 | ||
|
|
bfc2e96b54 | ||
|
|
f065ef80aa | ||
|
|
61c14b8b05 | ||
|
|
35d5d64809 | ||
|
|
63c711d18c | ||
|
|
59e3ea70d1 | ||
|
|
6771662a9f | ||
|
|
9b792a1393 | ||
|
|
862957c121 | ||
|
|
bdcbafd52f | ||
|
|
5e454a5212 | ||
|
|
20bea63997 | ||
|
|
8a265772c0 | ||
|
|
6febb4e3e8 | ||
|
|
04f9167fd8 | ||
|
|
8f29e01daf | ||
|
|
e810363b22 | ||
|
|
b5a2120bdf | ||
|
|
643fcbad9b | ||
|
|
4a3b834463 | ||
|
|
003149133a | ||
|
|
a43de0ca4d | ||
|
|
e05aaed75c | ||
|
|
4984e3e31b | ||
|
|
11dce4c6ad | ||
|
|
8d0d338ea2 | ||
|
|
d09e629415 | ||
|
|
53ef2ef99f | ||
|
|
d7b26d1b29 | ||
|
|
673d12d233 | ||
|
|
6359245925 | ||
|
|
a7c4822322 | ||
|
|
e94419f320 | ||
|
|
01f46483ff | ||
|
|
d6da5688af | ||
|
|
680ae39201 | ||
|
|
2472ee9c26 | ||
|
|
4428b06d4a | ||
|
|
e9c38d7d5e | ||
|
|
6f28d58807 | ||
|
|
88db611f0a | ||
|
|
f3302b4014 | ||
|
|
d4bb161275 | ||
|
|
32f1538938 | ||
|
|
029baea4c7 | ||
|
|
38d1b7cef5 | ||
|
|
85821bcc94 | ||
|
|
2345af8fd6 | ||
|
|
51107c64ee | ||
|
|
81983c5ae2 | ||
|
|
f7713a43a7 | ||
|
|
ffd951a7f4 | ||
|
|
319ac8e191 | ||
|
|
e292b72e34 | ||
|
|
4e795ecf55 | ||
|
|
e3c2a66723 | ||
|
|
eec3e97f97 | ||
|
|
3f481d6922 | ||
|
|
0810ab7210 | ||
|
|
abd621145c | ||
|
|
7d218aa93d | ||
|
|
1b41bd9115 | ||
|
|
aea247b4a3 | ||
|
|
e2843bb02f | ||
|
|
e3aa3e1137 | ||
|
|
da1187b03a | ||
|
|
f9ed79978c | ||
|
|
920a3ed4a3 | ||
|
|
2077eae142 | ||
|
|
b1ef35e415 | ||
|
|
0a687d840c | ||
|
|
6a3034b966 | ||
|
|
3d7afbfe4f | ||
|
|
02e43730bd | ||
|
|
6adf077ee5 | ||
|
|
d73ffa46ff | ||
|
|
8572f338ad | ||
|
|
920ec8e74b | ||
|
|
2328bf2342 | ||
|
|
85620a1431 | ||
|
|
0037858885 | ||
|
|
d4f654554b | ||
|
|
c8115545b8 | ||
|
|
6dbf0871ec | ||
|
|
f1c5c8bc43 | ||
|
|
22e0108992 | ||
|
|
e2e05c8d1d | ||
|
|
b02b36812d |
2
.github/workflows/build-docker.yml
vendored
2
.github/workflows/build-docker.yml
vendored
@@ -35,7 +35,7 @@ jobs:
|
||||
fi
|
||||
|
||||
# Build Vue 3 frontend
|
||||
- uses: actions/setup-node@v4
|
||||
- uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: '22'
|
||||
cache: yarn
|
||||
|
||||
6
.github/workflows/ci.yml
vendored
6
.github/workflows/ci.yml
vendored
@@ -13,14 +13,14 @@ jobs:
|
||||
node-version: ["22"]
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: awalsh128/cache-apt-pkgs-action@v1.5.3
|
||||
- uses: awalsh128/cache-apt-pkgs-action@v1.6.0
|
||||
with:
|
||||
packages: libsasl2-dev python3-dev libxml2-dev libxmlsec1-dev libxslt-dev libxmlsec1-openssl libxslt-dev libldap2-dev libssl-dev gcc musl-dev postgresql-dev zlib-dev jpeg-dev libwebp-dev openssl-dev libffi-dev cargo openldap-dev python3-dev xmlsec-dev xmlsec build-base g++ curl
|
||||
version: 1.0
|
||||
|
||||
# Setup python & dependencies
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v5
|
||||
uses: actions/setup-python@v6
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
cache: "pip"
|
||||
@@ -43,7 +43,7 @@ jobs:
|
||||
# Build Vue frontend & Dependencies
|
||||
- name: Set up Node ${{ matrix.node-version }}
|
||||
if: steps.django_cache.outputs.cache-hit != 'true'
|
||||
uses: actions/setup-node@v4
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
cache: "yarn"
|
||||
|
||||
4
.github/workflows/codeql-analysis.yml
vendored
4
.github/workflows/codeql-analysis.yml
vendored
@@ -25,7 +25,7 @@ jobs:
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v3
|
||||
uses: github/codeql-action/init@v4
|
||||
# Override language selection by uncommenting this and choosing your languages
|
||||
with:
|
||||
languages: python, javascript
|
||||
@@ -47,6 +47,6 @@ jobs:
|
||||
# make release
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v3
|
||||
uses: github/codeql-action/analyze@v4
|
||||
with:
|
||||
languages: javascript, python
|
||||
|
||||
2
.github/workflows/docs.yml
vendored
2
.github/workflows/docs.yml
vendored
@@ -13,7 +13,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-python@v5
|
||||
- uses: actions/setup-python@v6
|
||||
with:
|
||||
python-version: 3.x
|
||||
- run: pip install mkdocs-material mkdocs-include-markdown-plugin
|
||||
|
||||
16
boot.sh
16
boot.sh
@@ -2,7 +2,7 @@
|
||||
source venv/bin/activate
|
||||
|
||||
# these are envsubst in the nginx config, make sure they default to something sensible when unset
|
||||
export TANDOOR_PORT="${TANDOOR_PORT:-8080}"
|
||||
export TANDOOR_PORT="${TANDOOR_PORT:-80}"
|
||||
export MEDIA_ROOT=${MEDIA_ROOT:-/opt/recipes/mediafiles};
|
||||
export STATIC_ROOT=${STATIC_ROOT:-/opt/recipes/staticfiles};
|
||||
|
||||
@@ -12,11 +12,6 @@ GUNICORN_LOG_LEVEL="${GUNICORN_LOG_LEVEL:-'info'}"
|
||||
|
||||
PLUGINS_BUILD="${PLUGINS_BUILD:-0}"
|
||||
|
||||
if [ "${TANDOOR_PORT}" -eq 80 ]; then
|
||||
echo "TANDOOR_PORT set to 8080 because 80 is now taken by the integrated nginx"
|
||||
TANDOOR_PORT=8080
|
||||
fi
|
||||
|
||||
display_warning() {
|
||||
echo "[WARNING]"
|
||||
echo -e "$1"
|
||||
@@ -29,7 +24,6 @@ envsubst '$MEDIA_ROOT $STATIC_ROOT $TANDOOR_PORT' < /opt/recipes/http.d/Recipes.
|
||||
echo "Starting nginx"
|
||||
nginx
|
||||
|
||||
|
||||
echo "Checking configuration..."
|
||||
|
||||
# SECRET_KEY (or a valid file at SECRET_KEY_FILE) must be set in .env file
|
||||
@@ -110,9 +104,5 @@ chmod -R 755 ${MEDIA_ROOT:-/opt/recipes/mediafiles}
|
||||
ipv6_disable=$(cat /sys/module/ipv6/parameters/disable)
|
||||
|
||||
echo "Starting gunicorn"
|
||||
# Check if IPv6 is enabled, only then run gunicorn with ipv6 support
|
||||
if [ "$ipv6_disable" -eq 0 ]; then
|
||||
exec gunicorn -b "[::]:$TANDOOR_PORT" --workers $GUNICORN_WORKERS --threads $GUNICORN_THREADS --access-logfile - --error-logfile - --log-level $GUNICORN_LOG_LEVEL recipes.wsgi
|
||||
else
|
||||
exec gunicorn -b ":$TANDOOR_PORT" --workers $GUNICORN_WORKERS --threads $GUNICORN_THREADS --access-logfile - --error-logfile - --log-level $GUNICORN_LOG_LEVEL recipes.wsgi
|
||||
fi
|
||||
exec gunicorn --bind unix:/run/tandoor.sock --workers $GUNICORN_WORKERS --threads $GUNICORN_THREADS --timeout ${GUNICORN_TIMEOUT:-30} --access-logfile - --error-logfile - --log-level $GUNICORN_LOG_LEVEL recipes.wsgi
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ class FoodPropertyHelper:
|
||||
found_property = False
|
||||
# if food has a value for the given property type (no matter if conversion is possible)
|
||||
has_property_value = False
|
||||
if i.food.properties_food_amount == 0 or i.food.properties_food_unit is None and not (i.amount == 0 or i.no_amount): # if food is configured incorrectly
|
||||
if (i.food.properties_food_amount == 0 or i.food.properties_food_unit is None) and not (i.amount == 0 or i.no_amount): # if food is configured incorrectly
|
||||
computed_properties[pt.id]['food_values'][i.food.id] = {'id': i.food.id, 'food': {'id': i.food.id, 'name': i.food.name}, 'value': None}
|
||||
computed_properties[pt.id]['missing_value'] = True
|
||||
else:
|
||||
@@ -56,15 +56,16 @@ class FoodPropertyHelper:
|
||||
if p.property_type == pt and p.property_amount is not None:
|
||||
has_property_value = True
|
||||
for c in conversions:
|
||||
if c.unit == i.food.properties_food_unit:
|
||||
if c.unit == i.food.properties_food_unit and i.food.properties_food_amount != 0:
|
||||
found_property = True
|
||||
computed_properties[pt.id]['total_value'] += (c.amount / i.food.properties_food_amount) * p.property_amount
|
||||
computed_properties[pt.id]['food_values'] = self.add_or_create(
|
||||
computed_properties[p.property_type.id]['food_values'], c.food.id, (c.amount / i.food.properties_food_amount) * p.property_amount, c.food)
|
||||
if not found_property:
|
||||
# if no amount and food does not exist yet add it but don't count as missing
|
||||
if i.amount == 0 or i.no_amount and i.food.id not in computed_properties[pt.id]['food_values']:
|
||||
computed_properties[pt.id]['food_values'][i.food.id] = {'id': i.food.id, 'food': {'id': i.food.id, 'name': i.food.name}, 'value': 0}
|
||||
if i.amount == 0 or i.no_amount:
|
||||
if i.food.id not in computed_properties[pt.id]['food_values']:
|
||||
computed_properties[pt.id]['food_values'][i.food.id] = {'id': i.food.id, 'food': {'id': i.food.id, 'name': i.food.name}, 'value': 0}
|
||||
# if amount is present but unit is missing indicate it in the result
|
||||
elif i.unit is None:
|
||||
if i.food.id not in computed_properties[pt.id]['food_values']:
|
||||
@@ -72,7 +73,8 @@ class FoodPropertyHelper:
|
||||
computed_properties[pt.id]['food_values'][i.food.id]['missing_unit'] = True
|
||||
else:
|
||||
computed_properties[pt.id]['missing_value'] = True
|
||||
computed_properties[pt.id]['food_values'][i.food.id] = {'id': i.food.id, 'food': {'id': i.food.id, 'name': i.food.name}, 'value': None}
|
||||
if i.food.id not in computed_properties[pt.id]['food_values']:
|
||||
computed_properties[pt.id]['food_values'][i.food.id] = {'id': i.food.id, 'food': {'id': i.food.id, 'name': i.food.name}, 'value': None}
|
||||
if has_property_value and i.unit is not None:
|
||||
computed_properties[pt.id]['food_values'][i.food.id]['missing_conversion'] = {'base_unit': {'id': i.unit.id, 'name': i.unit.name}, 'converted_unit': {'id': i.food.properties_food_unit.id, 'name': i.food.properties_food_unit.name}}
|
||||
|
||||
@@ -82,8 +84,12 @@ class FoodPropertyHelper:
|
||||
# TODO move to central helper ? --> use defaultdict
|
||||
@staticmethod
|
||||
def add_or_create(d, key, value, food):
|
||||
if key in d and d[key]['value']:
|
||||
d[key]['value'] += value
|
||||
if key in d:
|
||||
# value can be None if a previous instance of the same food was missing a conversion
|
||||
if d[key]['value']:
|
||||
d[key]['value'] += value
|
||||
else:
|
||||
d[key]['value'] = value
|
||||
else:
|
||||
d[key] = {'id': food.id, 'food': {'id': food.id, 'name': food.name}, 'value': value}
|
||||
return d
|
||||
|
||||
@@ -324,7 +324,7 @@ class RecipeSearch():
|
||||
self._queryset = self._queryset.annotate(recent=Coalesce(Max(Case(When(pk__in=num_recent_recipes.values('recipe'), then='viewlog__pk'))), Value(0)))
|
||||
|
||||
def _favorite_recipes(self):
|
||||
if self._sort_includes('favorite') or self._timescooked or self._timescooked_gte or self._timescooked_lte:
|
||||
if self._sort_includes('favorite') or self._timescooked is not None or self._timescooked_gte is not None or self._timescooked_lte is not None:
|
||||
less_than = self._timescooked_lte and not self._sort_includes('-favorite')
|
||||
if less_than:
|
||||
default = 1000
|
||||
@@ -338,11 +338,11 @@ class RecipeSearch():
|
||||
)
|
||||
self._queryset = self._queryset.annotate(favorite=Coalesce(Subquery(favorite_recipes), default))
|
||||
|
||||
if self._timescooked:
|
||||
self._queryset = self._queryset.filter(favorite=0)
|
||||
elif self._timescooked_lte:
|
||||
if self._timescooked is not None:
|
||||
self._queryset = self._queryset.filter(favorite=self._timescooked)
|
||||
elif self._timescooked_lte is not None:
|
||||
self._queryset = self._queryset.filter(favorite__lte=int(self._timescooked_lte)).exclude(favorite=0)
|
||||
elif self._timescooked_gte:
|
||||
elif self._timescooked_gte is not None:
|
||||
self._queryset = self._queryset.filter(favorite__gte=int(self._timescooked_gte))
|
||||
|
||||
def keyword_filters(self, **kwargs):
|
||||
|
||||
@@ -69,15 +69,8 @@ def get_from_scraper(scrape, request):
|
||||
recipe_json['description'] = parse_description(description)
|
||||
recipe_json['description'] = automation_engine.apply_regex_replace_automation(recipe_json['description'], Automation.DESCRIPTION_REPLACE)
|
||||
|
||||
# assign servings attributes
|
||||
try:
|
||||
# dont use scrape.yields() as this will always return "x servings" or "x items", should be improved in scrapers directly
|
||||
servings = scrape.schema.data.get('recipeYield') or 1
|
||||
except Exception:
|
||||
servings = 1
|
||||
|
||||
recipe_json['servings'] = parse_servings(servings)
|
||||
recipe_json['servings_text'] = parse_servings_text(servings)
|
||||
recipe_json['servings'] = parse_servings(scrape.schema.data.get('recipeYield'))
|
||||
recipe_json['servings_text'] = parse_servings_text(scrape.schema.data.get('recipeYield'))
|
||||
|
||||
# assign time attributes
|
||||
try:
|
||||
@@ -406,7 +399,7 @@ def parse_servings(servings):
|
||||
def parse_servings_text(servings):
|
||||
if isinstance(servings, str):
|
||||
try:
|
||||
servings = re.sub("\\d+", '', servings).strip()
|
||||
servings = re.sub("\\d+", '', servings, 1).strip()
|
||||
except Exception:
|
||||
servings = ''
|
||||
if isinstance(servings, list):
|
||||
|
||||
@@ -75,7 +75,8 @@ class RecipeShoppingEditor():
|
||||
|
||||
@staticmethod
|
||||
def get_shopping_list_recipe(id, user, space):
|
||||
return ShoppingListRecipe.objects.filter(id=id).filter(entries__space=space).filter(
|
||||
# TODO this sucks since it wont find SLR's that no longer have any entries
|
||||
return ShoppingListRecipe.objects.filter(id=id, space=space).filter(
|
||||
Q(entries__created_by=user)
|
||||
| Q(entries__created_by__in=list(user.get_shopping_share()))
|
||||
).prefetch_related('entries').first()
|
||||
@@ -136,7 +137,8 @@ class RecipeShoppingEditor():
|
||||
self.servings = servings
|
||||
|
||||
self._delete_ingredients(ingredients=ingredients)
|
||||
if self.servings != self._shopping_list_recipe.servings:
|
||||
# need to check if there is a SLR because its possible it cant be found if all entries are deleted
|
||||
if self._shopping_list_recipe and self.servings != self._shopping_list_recipe.servings:
|
||||
self.edit_servings()
|
||||
self._add_ingredients(ingredients=ingredients)
|
||||
return True
|
||||
@@ -175,8 +177,9 @@ class RecipeShoppingEditor():
|
||||
existing = self._shopping_list_recipe.entries.filter(ingredient__in=ingredients).values_list('ingredient__pk', flat=True)
|
||||
add_ingredients = ingredients.exclude(id__in=existing)
|
||||
|
||||
entries = []
|
||||
for i in [x for x in add_ingredients if x.food]:
|
||||
ShoppingListEntry.objects.create(
|
||||
entry = ShoppingListEntry(
|
||||
list_recipe=self._shopping_list_recipe,
|
||||
food=i.food,
|
||||
unit=i.unit,
|
||||
@@ -185,6 +188,12 @@ class RecipeShoppingEditor():
|
||||
created_by=self.created_by,
|
||||
space=self.space,
|
||||
)
|
||||
entries.append(entry)
|
||||
|
||||
ShoppingListEntry.objects.bulk_create(entries)
|
||||
for e in entries:
|
||||
if e.food.shopping_lists.count() > 0:
|
||||
e.shopping_lists.set(e.food.shopping_lists.all())
|
||||
|
||||
# deletes shopping list entries not in ingredients list
|
||||
def _delete_ingredients(self, ingredients=None):
|
||||
|
||||
@@ -135,8 +135,9 @@ class UnitConversionHelper:
|
||||
:param food: base food
|
||||
:return: converted ingredient object from base amount/unit/food
|
||||
"""
|
||||
if uc.food is None or uc.food == food:
|
||||
if (uc.food is None or uc.food == food) and uc.converted_amount > 0 and uc.base_amount > 0:
|
||||
if unit == uc.base_unit:
|
||||
return Ingredient(amount=amount * (uc.converted_amount / uc.base_amount), unit=uc.converted_unit, food=food, space=self.space)
|
||||
else:
|
||||
return Ingredient(amount=amount * (uc.base_amount / uc.converted_amount), unit=uc.base_unit, food=food, space=self.space)
|
||||
return None
|
||||
|
||||
@@ -96,14 +96,20 @@ class Mealie1(Integration):
|
||||
self.import_log.msg += f"Ignoring {r['name']} because a recipe with this name already exists.\n"
|
||||
self.import_log.save()
|
||||
else:
|
||||
servings = 1
|
||||
try:
|
||||
servings = r['recipe_servings'] if r['recipe_servings'] and r['recipe_servings'] != 0 else 1
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
recipe = Recipe.objects.create(
|
||||
waiting_time=parse_time(r['perform_time']),
|
||||
working_time=parse_time(r['prep_time']),
|
||||
description=r['description'][:512],
|
||||
name=r['name'],
|
||||
source_url=r['org_url'],
|
||||
servings=r['recipe_servings'] if r['recipe_servings'] and r['recipe_servings'] != 0 else 1,
|
||||
servings_text=r['recipe_yield'].strip() if r['recipe_yield'] else "",
|
||||
servings=servings,
|
||||
servings_text=r['recipe_yield'].strip()[:32] if r['recipe_yield'] else "",
|
||||
internal=True,
|
||||
created_at=r['created_at'],
|
||||
space=self.request.space,
|
||||
@@ -128,20 +134,32 @@ class Mealie1(Integration):
|
||||
|
||||
steps_relation = []
|
||||
first_step_of_recipe_dict = {}
|
||||
step_id_dict = {}
|
||||
for s in mealie_database['recipe_instructions']:
|
||||
if s['recipe_id'] in recipes_dict:
|
||||
step = Step.objects.create(instruction=(s['text'] if s['text'] else "") + (f" \n {s['summary']}" if s['summary'] else ""),
|
||||
step = Step.objects.create(instruction=(s['text'] if s['text'] else "") + (f" \n {s['summary']}" if 'summary' in s and s['summary'] else ""),
|
||||
order=s['position'],
|
||||
name=s['title'],
|
||||
space=self.request.space)
|
||||
steps_relation.append(Recipe.steps.through(recipe_id=recipes_dict[s['recipe_id']], step_id=step.pk))
|
||||
step_id_dict[s["id"]] = step.pk
|
||||
if s['recipe_id'] not in first_step_of_recipe_dict:
|
||||
first_step_of_recipe_dict[s['recipe_id']] = step.pk
|
||||
|
||||
# it is possible for a recipe to not have steps but have ingredients, in that case create an empty step to add them to later
|
||||
for r in recipes_dict.keys():
|
||||
if r not in first_step_of_recipe_dict:
|
||||
step = Step.objects.create(instruction='',
|
||||
order=0,
|
||||
name='',
|
||||
space=self.request.space)
|
||||
steps_relation.append(Recipe.steps.through(recipe_id=recipes_dict[r], step_id=step.pk))
|
||||
first_step_of_recipe_dict[r] = step.pk
|
||||
|
||||
for n in mealie_database['notes']:
|
||||
if n['recipe_id'] in recipes_dict:
|
||||
step = Step.objects.create(instruction=n['text'],
|
||||
name=n['title'],
|
||||
name=n['title'][:128] if n['title'] else "",
|
||||
order=100,
|
||||
space=self.request.space)
|
||||
steps_relation.append(Recipe.steps.through(recipe_id=recipes_dict[n['recipe_id']], step_id=step.pk))
|
||||
@@ -153,6 +171,11 @@ class Mealie1(Integration):
|
||||
self.import_log.msg += f"Importing {len(mealie_database["recipes_ingredients"])} ingredients...\n"
|
||||
self.import_log.save()
|
||||
|
||||
# mealie stores the reference to a step (instruction) from an ingredient (reference) in the recipe_ingredient_ref_link table
|
||||
recipe_ingredient_ref_link_dict = {}
|
||||
for ref in mealie_database['recipe_ingredient_ref_link']:
|
||||
recipe_ingredient_ref_link_dict[ref["reference_id"]] = ref["instruction_id"]
|
||||
|
||||
ingredients_relation = []
|
||||
for i in mealie_database['recipes_ingredients']:
|
||||
if i['recipe_id'] in recipes_dict:
|
||||
@@ -162,19 +185,19 @@ class Mealie1(Integration):
|
||||
is_header=True,
|
||||
space=self.request.space,
|
||||
)
|
||||
ingredients_relation.append(Step.ingredients.through(step_id=first_step_of_recipe_dict[i['recipe_id']], ingredient_id=title_ingredient.pk))
|
||||
ingredients_relation.append(Step.ingredients.through(step_id=get_step_id(i, first_step_of_recipe_dict, step_id_dict,recipe_ingredient_ref_link_dict), ingredient_id=title_ingredient.pk))
|
||||
if i['food_id']:
|
||||
ingredient = Ingredient.objects.create(
|
||||
food_id=foods_dict[i['food_id']] if i['food_id'] in foods_dict else None,
|
||||
unit_id=units_dict[i['unit_id']] if i['unit_id'] in units_dict else None,
|
||||
original_text=i['original_text'],
|
||||
order=i['position'],
|
||||
amount=i['quantity'],
|
||||
amount=i['quantity'] if i['quantity'] else 0,
|
||||
note=i['note'],
|
||||
space=self.request.space,
|
||||
)
|
||||
ingredients_relation.append(Step.ingredients.through(step_id=first_step_of_recipe_dict[i['recipe_id']], ingredient_id=ingredient.pk))
|
||||
elif i['note'].strip():
|
||||
ingredients_relation.append(Step.ingredients.through(step_id=get_step_id(i, first_step_of_recipe_dict, step_id_dict,recipe_ingredient_ref_link_dict), ingredient_id=ingredient.pk))
|
||||
elif i['note'] and i['note'].strip():
|
||||
amount, unit, food, note = ingredient_parser.parse(i['note'].strip())
|
||||
f = ingredient_parser.get_food(food)
|
||||
u = ingredient_parser.get_unit(unit)
|
||||
@@ -186,7 +209,7 @@ class Mealie1(Integration):
|
||||
original_text=i['original_text'],
|
||||
space=self.request.space,
|
||||
)
|
||||
ingredients_relation.append(Step.ingredients.through(step_id=first_step_of_recipe_dict[i['recipe_id']], ingredient_id=ingredient.pk))
|
||||
ingredients_relation.append(Step.ingredients.through(step_id=get_step_id(i, first_step_of_recipe_dict, step_id_dict,recipe_ingredient_ref_link_dict), ingredient_id=ingredient.pk))
|
||||
Step.ingredients.through.objects.bulk_create(ingredients_relation)
|
||||
|
||||
self.import_log.msg += f"Importing {len(mealie_database["recipes_to_categories"]) + len(mealie_database["recipes_to_tags"])} category and keyword relations...\n"
|
||||
@@ -226,7 +249,7 @@ class Mealie1(Integration):
|
||||
for r in mealie_database['recipe_nutrition']:
|
||||
if r['recipe_id'] in recipes_dict:
|
||||
for key in property_types_dict:
|
||||
if r[key]:
|
||||
if key in r and r[key]:
|
||||
properties_relation.append(
|
||||
Property(property_type_id=property_types_dict[key].pk,
|
||||
property_amount=Decimal(str(r[key])) / (
|
||||
@@ -340,3 +363,10 @@ class Mealie1(Integration):
|
||||
|
||||
def get_file_from_recipe(self, recipe):
|
||||
raise NotImplementedError('Method not implemented in storage integration')
|
||||
|
||||
|
||||
def get_step_id(i, first_step_of_recipe_dict, step_id_dict, recipe_ingredient_ref_link_dict):
|
||||
try:
|
||||
return step_id_dict[recipe_ingredient_ref_link_dict[i['reference_id']]]
|
||||
except KeyError:
|
||||
return first_step_of_recipe_dict[i['recipe_id']]
|
||||
@@ -63,7 +63,15 @@ class MealMaster(Integration):
|
||||
current_recipe = ''
|
||||
|
||||
for fl in file.readlines():
|
||||
line = fl.decode("windows-1250")
|
||||
line = ""
|
||||
try:
|
||||
line = fl.decode("UTF-8")
|
||||
except UnicodeDecodeError:
|
||||
try:
|
||||
line = fl.decode("windows-1250")
|
||||
except Exception as e:
|
||||
line = "ERROR DECODING LINE"
|
||||
|
||||
if (line.startswith('MMMMM') or line.startswith('-----')) and 'meal-master' in line.lower():
|
||||
if current_recipe != '':
|
||||
recipe_list.append(current_recipe)
|
||||
|
||||
@@ -12,7 +12,7 @@ msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2025-09-22 20:15+0200\n"
|
||||
"PO-Revision-Date: 2025-09-22 10:09+0000\n"
|
||||
"PO-Revision-Date: 2025-11-18 07:01+0000\n"
|
||||
"Last-Translator: Vincenzo Reale <smart2128vr@gmail.com>\n"
|
||||
"Language-Team: Italian <http://translate.tandoor.dev/projects/tandoor/"
|
||||
"recipes-backend/it/>\n"
|
||||
@@ -21,7 +21,7 @@ msgstr ""
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"X-Generator: Weblate 5.13.1\n"
|
||||
"X-Generator: Weblate 5.13.3\n"
|
||||
|
||||
#: .\cookbook\forms.py:50
|
||||
msgid "Default"
|
||||
@@ -126,54 +126,52 @@ msgid "ferment"
|
||||
msgstr "fermentare"
|
||||
|
||||
#: .\cookbook\helper\recipe_url_import.py:325
|
||||
#, fuzzy
|
||||
#| msgid "Last cooked"
|
||||
msgid "slow cook"
|
||||
msgstr "Cucinato di recente"
|
||||
msgstr "cottura lenta"
|
||||
|
||||
#: .\cookbook\helper\recipe_url_import.py:326
|
||||
msgid "egg boiler"
|
||||
msgstr ""
|
||||
msgstr "bollitore per uova"
|
||||
|
||||
#: .\cookbook\helper\recipe_url_import.py:327
|
||||
msgid "kettle"
|
||||
msgstr ""
|
||||
msgstr "teiera"
|
||||
|
||||
#: .\cookbook\helper\recipe_url_import.py:328
|
||||
msgid "blend"
|
||||
msgstr ""
|
||||
msgstr "miscela"
|
||||
|
||||
#: .\cookbook\helper\recipe_url_import.py:329
|
||||
msgid "pre-clean"
|
||||
msgstr ""
|
||||
msgstr "pre-pulizia"
|
||||
|
||||
#: .\cookbook\helper\recipe_url_import.py:330
|
||||
msgid "high temperature"
|
||||
msgstr ""
|
||||
msgstr "alta temperatura"
|
||||
|
||||
#: .\cookbook\helper\recipe_url_import.py:331
|
||||
msgid "rice cooker"
|
||||
msgstr ""
|
||||
msgstr "cuociriso"
|
||||
|
||||
#: .\cookbook\helper\recipe_url_import.py:332
|
||||
msgid "caramelize"
|
||||
msgstr ""
|
||||
msgstr "caramellare"
|
||||
|
||||
#: .\cookbook\helper\recipe_url_import.py:333
|
||||
msgid "peeler"
|
||||
msgstr ""
|
||||
msgstr "pelapatate"
|
||||
|
||||
#: .\cookbook\helper\recipe_url_import.py:334
|
||||
msgid "slicer"
|
||||
msgstr ""
|
||||
msgstr "affettatrice"
|
||||
|
||||
#: .\cookbook\helper\recipe_url_import.py:335
|
||||
msgid "grater"
|
||||
msgstr ""
|
||||
msgstr "grattugia"
|
||||
|
||||
#: .\cookbook\helper\recipe_url_import.py:336
|
||||
msgid "spiralizer"
|
||||
msgstr ""
|
||||
msgstr "tagliaverdure a spirale"
|
||||
|
||||
#: .\cookbook\helper\recipe_url_import.py:337
|
||||
msgid "sous-vide"
|
||||
@@ -235,7 +233,7 @@ msgstr "Carboidrati"
|
||||
|
||||
#: .\cookbook\integration\mealie1.py:212
|
||||
msgid "Cholesterol"
|
||||
msgstr ""
|
||||
msgstr "Colesterolo"
|
||||
|
||||
#: .\cookbook\integration\mealie1.py:213
|
||||
#: .\cookbook\migrations\0190_auto_20230525_1506.py:17
|
||||
@@ -244,33 +242,31 @@ msgstr "Grassi"
|
||||
|
||||
#: .\cookbook\integration\mealie1.py:214
|
||||
msgid "Fiber"
|
||||
msgstr ""
|
||||
msgstr "Fibra"
|
||||
|
||||
#: .\cookbook\integration\mealie1.py:215
|
||||
#, fuzzy
|
||||
#| msgid "Proteins"
|
||||
msgid "Protein"
|
||||
msgstr "Proteine"
|
||||
msgstr "Proteina"
|
||||
|
||||
#: .\cookbook\integration\mealie1.py:216
|
||||
msgid "Saturated Fat"
|
||||
msgstr ""
|
||||
msgstr "Grasso saturo"
|
||||
|
||||
#: .\cookbook\integration\mealie1.py:217
|
||||
msgid "Sodium"
|
||||
msgstr ""
|
||||
msgstr "Sodio"
|
||||
|
||||
#: .\cookbook\integration\mealie1.py:218
|
||||
msgid "Sugar"
|
||||
msgstr ""
|
||||
msgstr "Zucchero"
|
||||
|
||||
#: .\cookbook\integration\mealie1.py:219
|
||||
msgid "Trans Fat"
|
||||
msgstr ""
|
||||
msgstr "Grasso trans"
|
||||
|
||||
#: .\cookbook\integration\mealie1.py:220
|
||||
msgid "Unsaturated Fat"
|
||||
msgstr ""
|
||||
msgstr "Grasso insaturo"
|
||||
|
||||
#: .\cookbook\integration\openeats.py:28
|
||||
msgid "Recipe source:"
|
||||
@@ -484,7 +480,7 @@ msgstr "Hai raggiungo il limite per il caricamento dei file."
|
||||
|
||||
#: .\cookbook\serializer.py:281
|
||||
msgid "The given file type is not allowed."
|
||||
msgstr ""
|
||||
msgstr "Il tipo di filo specificato non è consentito."
|
||||
|
||||
#: .\cookbook\serializer.py:421 .\cookbook\views\views.py:94
|
||||
msgid ""
|
||||
@@ -493,7 +489,7 @@ msgstr "Hai raggiunto il numero massimo di istanze di tua proprietà."
|
||||
|
||||
#: .\cookbook\serializer.py:434
|
||||
msgid "Space Name must be unique."
|
||||
msgstr ""
|
||||
msgstr "Il nome dello spazio deve essere univoco."
|
||||
|
||||
#: .\cookbook\serializer.py:469
|
||||
msgid "Cannot modify Space owner permission."
|
||||
@@ -847,10 +843,8 @@ msgid "We are sorry, but the sign up is currently closed."
|
||||
msgstr "Spiacenti, al momento le iscrizioni sono chiuse."
|
||||
|
||||
#: .\cookbook\templates\frontend\tandoor.html:15
|
||||
#, fuzzy
|
||||
#| msgid "Tandoor Recipes Invite"
|
||||
msgid "Tandoor Recipe Manager"
|
||||
msgstr "Invito per Tandoor Recipes"
|
||||
msgstr "Gestore delle ricette Tandoor"
|
||||
|
||||
#: .\cookbook\templates\index.html:28
|
||||
msgid "Search recipe ..."
|
||||
@@ -1442,8 +1436,6 @@ msgstr ""
|
||||
" %(site_name)s. Per finire, completa il modulo seguente:"
|
||||
|
||||
#: .\cookbook\templates\socialaccount\signup.html:32
|
||||
#, fuzzy
|
||||
#| msgid "I accept the follwoing"
|
||||
msgid "I accept the following"
|
||||
msgstr "Accetto i seguenti"
|
||||
|
||||
@@ -1529,15 +1521,6 @@ msgid "System"
|
||||
msgstr "Sistema"
|
||||
|
||||
#: .\cookbook\templates\system.html:24
|
||||
#, fuzzy
|
||||
#| msgid ""
|
||||
#| "\n"
|
||||
#| " Django Recipes is an open source free software application. It "
|
||||
#| "can be found on\n"
|
||||
#| " <a href=\"https://github.com/vabene1111/recipes\">GitHub</a>.\n"
|
||||
#| " Changelogs can be found <a href=\"https://github.com/vabene1111/"
|
||||
#| "recipes/releases\">here</a>.\n"
|
||||
#| " "
|
||||
msgid ""
|
||||
"\n"
|
||||
" Tandoor Recipes is an open source free software application. It can "
|
||||
@@ -1548,11 +1531,11 @@ msgid ""
|
||||
" "
|
||||
msgstr ""
|
||||
"\n"
|
||||
" Django Recipes è una applicazione gratuita e open source. È "
|
||||
" Tandoor Recipes è una applicazione gratuita e open source. È "
|
||||
"disponibile su\n"
|
||||
" <a href=\"https://github.com/vabene1111/recipes\">GitHub</a>.\n"
|
||||
" Puoi consultare le ultime novità <a href=\"https://github.com/"
|
||||
"vabene1111/recipes/releases\">qui</a>.\n"
|
||||
" <a href=\"https://github.com/TandoorRecipes/recipes\">GitHub</a>.\n"
|
||||
" Puoi consultare le ultime novità <a href="
|
||||
"\"https://github.com/TandoorRecipes/recipes/releases\">qui</a>.\n"
|
||||
" "
|
||||
|
||||
#: .\cookbook\templates\system.html:30
|
||||
@@ -1574,7 +1557,7 @@ msgstr ""
|
||||
|
||||
#: .\cookbook\templates\system.html:56
|
||||
msgid "Plugins"
|
||||
msgstr ""
|
||||
msgstr "Estensioni"
|
||||
|
||||
#: .\cookbook\templates\system.html:67
|
||||
msgid "Media Serving"
|
||||
@@ -1802,18 +1785,12 @@ msgid "{obj.name} was added to the shopping list."
|
||||
msgstr "{obj.name} è stato aggiunto alla lista della spesa."
|
||||
|
||||
#: .\cookbook\views\api.py:1239
|
||||
#, fuzzy
|
||||
#| msgid "Filter meal plans from date (inclusive) in the format of YYYY-MM-DD."
|
||||
msgid "Filter meal plans from date (inclusive)."
|
||||
msgstr ""
|
||||
"Filtra i piani alimentari in base alla data (inclusa) nel formato AAAA-MM-GG."
|
||||
msgstr "Filtra i piani alimentari dalla data (inclusa)."
|
||||
|
||||
#: .\cookbook\views\api.py:1241
|
||||
#, fuzzy
|
||||
#| msgid "Filter meal plans to date (inclusive) in the format of YYYY-MM-DD."
|
||||
msgid "Filter meal plans to date (inclusive)."
|
||||
msgstr ""
|
||||
"Filtra i piani alimentari fino alla data (inclusa) nel formato AAAA-MM-GG."
|
||||
msgstr "Filtra i piani alimentari fino alla data (inclusa)."
|
||||
|
||||
#: .\cookbook\views\api.py:1244
|
||||
msgid "Filter meal plans with MealType ID. For multiple repeat parameter."
|
||||
@@ -1940,115 +1917,70 @@ msgstr "ID dell'unità che una ricetta dovrebbe avere."
|
||||
|
||||
#: .\cookbook\views\api.py:1464
|
||||
msgid "Exact rating of recipe"
|
||||
msgstr ""
|
||||
msgstr "Valutazione precisa della ricetta"
|
||||
|
||||
#: .\cookbook\views\api.py:1465
|
||||
#, fuzzy
|
||||
#| msgid "ID of unit a recipe should have."
|
||||
msgid "Rating a recipe should have or greater."
|
||||
msgstr "ID dell'unità che una ricetta dovrebbe avere."
|
||||
msgstr "La valutazione che una ricetta dovrebbe avere o superiore."
|
||||
|
||||
#: .\cookbook\views\api.py:1466
|
||||
#, fuzzy
|
||||
#| msgid "ID of unit a recipe should have."
|
||||
msgid "Rating a recipe should have or smaller."
|
||||
msgstr "ID dell'unità che una ricetta dovrebbe avere."
|
||||
msgstr "La valutazione che una ricetta dovrebbe avere o inferiore."
|
||||
|
||||
#: .\cookbook\views\api.py:1468
|
||||
msgid "Filter recipes cooked X times."
|
||||
msgstr ""
|
||||
msgstr "Filtra le ricette cucinate N volte."
|
||||
|
||||
#: .\cookbook\views\api.py:1469
|
||||
#, fuzzy
|
||||
#| msgid ""
|
||||
#| "Filter recipes cooked X times or more. Negative values returns cooked "
|
||||
#| "less than X times"
|
||||
msgid "Filter recipes cooked X times or more."
|
||||
msgstr ""
|
||||
"Filtra le ricette cucinate X volte o più. I valori negativi restituiscono "
|
||||
"ricette cucinate meno di X volte"
|
||||
msgstr "Filtra le ricette cucinate N volte o più."
|
||||
|
||||
#: .\cookbook\views\api.py:1470
|
||||
msgid "Filter recipes cooked X times or less."
|
||||
msgstr ""
|
||||
msgstr "Filtra le ricette cucinate N volte o meno."
|
||||
|
||||
#: .\cookbook\views\api.py:1472
|
||||
#, fuzzy
|
||||
#| msgid "Filter for entries with the given recipe"
|
||||
msgid "Filter recipes created on the given date."
|
||||
msgstr "Filtra le voci con la ricetta specificata"
|
||||
msgstr "Filtra create alla data specificata."
|
||||
|
||||
#: .\cookbook\views\api.py:1473
|
||||
#, fuzzy
|
||||
#| msgid ""
|
||||
#| "Filter recipes created on or after YYYY-MM-DD. Prepending - filters on or "
|
||||
#| "before date."
|
||||
msgid "Filter recipes created on the given date or after."
|
||||
msgstr ""
|
||||
"Filtra le ricette create il o dopo AAAA-MM-GG. Anteponendo: filtra alla data "
|
||||
"o prima della data."
|
||||
msgstr "Filtra le ricette create alla data specificata o dopo."
|
||||
|
||||
#: .\cookbook\views\api.py:1474
|
||||
#, fuzzy
|
||||
#| msgid ""
|
||||
#| "Filter recipes created on or after YYYY-MM-DD. Prepending - filters on or "
|
||||
#| "before date."
|
||||
msgid "Filter recipes created on the given date or before."
|
||||
msgstr ""
|
||||
"Filtra le ricette create il o dopo AAAA-MM-GG. Anteponendo: filtra alla data "
|
||||
"o prima della data."
|
||||
msgstr "Filtra le ricette create alla data specificata o prima."
|
||||
|
||||
#: .\cookbook\views\api.py:1476 .\cookbook\views\api.py:1477
|
||||
#: .\cookbook\views\api.py:1478
|
||||
#, fuzzy
|
||||
#| msgid "Filter for entries with the given recipe"
|
||||
msgid "Filter recipes updated on the given date."
|
||||
msgstr "Filtra le voci con la ricetta specificata"
|
||||
msgstr "Filtra le ricette aggiornate alla data specificata."
|
||||
|
||||
#: .\cookbook\views\api.py:1480
|
||||
#, fuzzy
|
||||
#| msgid ""
|
||||
#| "Filter recipes last cooked on or after YYYY-MM-DD. Prepending - filters "
|
||||
#| "on or before date."
|
||||
msgid "Filter recipes last cooked on the given date or after."
|
||||
msgstr ""
|
||||
"Filtra le ricette cucinate l'ultima volta il o dopo AAAA-MM-GG. Anteponendo "
|
||||
"- filtra alla data o prima della data."
|
||||
msgstr "Filtra le ricette cucinate l'ultima volta alla data specificata o dopo."
|
||||
|
||||
#: .\cookbook\views\api.py:1481
|
||||
#, fuzzy
|
||||
#| msgid ""
|
||||
#| "Filter recipes last cooked on or after YYYY-MM-DD. Prepending - filters "
|
||||
#| "on or before date."
|
||||
msgid "Filter recipes last cooked on the given date or before."
|
||||
msgstr ""
|
||||
"Filtra le ricette cucinate l'ultima volta il o dopo AAAA-MM-GG. Anteponendo "
|
||||
"- filtra alla data o prima della data."
|
||||
"Filtra le ricette cucinate l'ultima volta alla data specificata o prima."
|
||||
|
||||
#: .\cookbook\views\api.py:1483 .\cookbook\views\api.py:1484
|
||||
#, fuzzy
|
||||
#| msgid ""
|
||||
#| "Filter recipes lasts viewed on or after YYYY-MM-DD. Prepending - filters "
|
||||
#| "on or before date."
|
||||
msgid "Filter recipes lasts viewed on the given date."
|
||||
msgstr ""
|
||||
"Filtra le ricette visualizzate per ultime il o dopo AAAA-MM-GG. Anteponendo "
|
||||
"- filtra alla data o prima della data."
|
||||
msgstr "Filtra le ricette visualizzate per ultime alla data specificata."
|
||||
|
||||
#: .\cookbook\views\api.py:1486
|
||||
#, fuzzy
|
||||
#| msgid "Filter for entries with the given recipe"
|
||||
msgid "Filter recipes for ones created by the given user ID"
|
||||
msgstr "Filtra le voci con la ricetta specificata"
|
||||
msgstr "Filtra le ricette create dall'ID utente specificato"
|
||||
|
||||
#: .\cookbook\views\api.py:1487
|
||||
msgid "If only internal recipes should be returned. [true/<b>false</b>]"
|
||||
msgstr ""
|
||||
"Se devono essere restituite solo le ricette interne. [vero/<b>falso</b>]"
|
||||
"Se devono essere restituite solo le ricette interne. [true/<b>false</b>]"
|
||||
|
||||
#: .\cookbook\views\api.py:1488
|
||||
msgid "Returns the results in randomized order. [true/<b>false</b>]"
|
||||
msgstr "Restituisce i risultati in ordine casuale. [vero/<b>falso</b>]"
|
||||
msgstr "Restituisce i risultati in ordine casuale. [true/<b>false</b>]"
|
||||
|
||||
#: .\cookbook\views\api.py:1490
|
||||
msgid ""
|
||||
@@ -2056,6 +1988,9 @@ msgid ""
|
||||
"lastcooked,-lastcooked,rating,-rating,times_cooked,-times_cooked,created_at,-"
|
||||
"created_at,lastviewed,-lastviewed"
|
||||
msgstr ""
|
||||
"Determina l'ordine dei risultati. Le opzioni sono: "
|
||||
"score,-score,name,-name,lastcooked,-lastcooked,rating,-rating,times_cooked,-times_cooked,created_at,-created_at,lastviewed,-lastviewed"
|
||||
""
|
||||
|
||||
#: .\cookbook\views\api.py:1492
|
||||
msgid "Returns new results first in search results. [true/<b>false</b>]"
|
||||
@@ -2068,10 +2003,14 @@ msgid ""
|
||||
"Returns the given number of recently viewed recipes before search results "
|
||||
"(if given)"
|
||||
msgstr ""
|
||||
"Restituisce il numero specificato di ricette visualizzate di recente prima "
|
||||
"dei risultati di ricerca (se indicati)"
|
||||
|
||||
#: .\cookbook\views\api.py:1494
|
||||
msgid "ID of a custom filter. Returns all recipes matched by that filter."
|
||||
msgstr ""
|
||||
"ID di un filtro personalizzato. Restituisce tutte le ricette verificate da "
|
||||
"quel filtro."
|
||||
|
||||
#: .\cookbook\views\api.py:1495
|
||||
msgid "Filter recipes that can be made with OnHand food. [true/<b>false</b>]"
|
||||
@@ -2084,48 +2023,47 @@ msgid ""
|
||||
"Return the PropertyTypes matching the property category. Repeat for "
|
||||
"multiple."
|
||||
msgstr ""
|
||||
"Restituisci i PropertyTypes corrispondenti alla categoria di proprietà. "
|
||||
"Ripeti per più di uno."
|
||||
|
||||
#: .\cookbook\views\api.py:1804 .\cookbook\views\api.py:1860
|
||||
#, fuzzy
|
||||
#| msgid "Filter for entries with the given recipe"
|
||||
msgid "Returns only entries associated with the given mealplan id"
|
||||
msgstr "Filtra le voci con la ricetta specificata"
|
||||
msgstr ""
|
||||
"Restituisce solo le voci associate all'ID del piano alimentare specificato"
|
||||
|
||||
#: .\cookbook\views\api.py:1858
|
||||
msgid ""
|
||||
"Returns only elements updated after the given timestamp in ISO 8601 format."
|
||||
msgstr ""
|
||||
"Restituisce solo gli elementi aggiornati dopo la marca temporale specificata "
|
||||
"nel formato ISO 8601."
|
||||
|
||||
#: .\cookbook\views\api.py:2031
|
||||
#, fuzzy
|
||||
#| msgid ""
|
||||
#| "Return the Automations matching the automation type. Multiple values "
|
||||
#| "allowed."
|
||||
msgid ""
|
||||
"Return the Automations matching the automation type. Repeat for multiple."
|
||||
msgstr ""
|
||||
"Restituisce le automazioni corrispondenti al tipo di automazione. Sono "
|
||||
"consentiti più valori."
|
||||
"Restituisci le automazioni corrispondenti al tipo di automazione. Ripeti per "
|
||||
"più automazioni."
|
||||
|
||||
#: .\cookbook\views\api.py:2048
|
||||
msgid ""
|
||||
"Text field to store data that gets carried over to the UserSpace created "
|
||||
"from the InviteLink"
|
||||
msgstr ""
|
||||
"Campo di testo per memorizzare i dati che vengono trasferiti allo spazio "
|
||||
"utente creato dal collegamento di invito"
|
||||
|
||||
#: .\cookbook\views\api.py:2049
|
||||
msgid "Only return InviteLinks that have not been used yet."
|
||||
msgstr ""
|
||||
"Restituisci solo i collegamenti di invito che non sono ancora stati "
|
||||
"utilizzati."
|
||||
|
||||
#: .\cookbook\views\api.py:2076
|
||||
#, fuzzy
|
||||
#| msgid ""
|
||||
#| "Return the Automations matching the automation type. Multiple values "
|
||||
#| "allowed."
|
||||
msgid "Return the CustomFilters matching the model type. Repeat for multiple."
|
||||
msgstr ""
|
||||
"Restituisce le automazioni corrispondenti al tipo di automazione. Sono "
|
||||
"consentiti più valori."
|
||||
"Restituisci i CustomFilters corrispondenti al tipo di modello. Ripeti per "
|
||||
"più di un modello."
|
||||
|
||||
#: .\cookbook\views\api.py:2176
|
||||
msgid "Nothing to do."
|
||||
@@ -2149,13 +2087,15 @@ msgstr "Nessuna informazione utilizzabile è stata trovata."
|
||||
|
||||
#: .\cookbook\views\api.py:2286 .\cookbook\views\api.py:2434
|
||||
msgid "You must select an AI provider to perform your request."
|
||||
msgstr ""
|
||||
msgstr "Devi selezionare un fornitore AI per eseguire la tua richiesta."
|
||||
|
||||
#: .\cookbook\views\api.py:2293 .\cookbook\views\api.py:2441
|
||||
msgid ""
|
||||
"You don't have any credits remaining to use AI or AI features are not "
|
||||
"enabled for your space."
|
||||
msgstr ""
|
||||
"Non hai credito rimanente per utilizzare l'AI o le funzionalità di AI "
|
||||
"abilitate per il tuo spazio."
|
||||
|
||||
#: .\cookbook\views\api.py:2499 .\cookbook\views\api.py:2667
|
||||
msgid "File is above space limit"
|
||||
|
||||
2453
cookbook/locale/ko/LC_MESSAGES/django.po
Normal file
2453
cookbook/locale/ko/LC_MESSAGES/django.po
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -8,7 +8,7 @@ msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2025-09-22 20:15+0200\n"
|
||||
"PO-Revision-Date: 2024-11-19 06:58+0000\n"
|
||||
"PO-Revision-Date: 2025-12-01 06:08+0000\n"
|
||||
"Last-Translator: \"Matjaž T.\" <matjaz@moj-svet.si>\n"
|
||||
"Language-Team: Slovenian <http://translate.tandoor.dev/projects/tandoor/"
|
||||
"recipes-backend/sl/>\n"
|
||||
@@ -16,9 +16,9 @@ msgstr ""
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=4; plural=n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n"
|
||||
"%100==4 ? 2 : 3;\n"
|
||||
"X-Generator: Weblate 5.6.2\n"
|
||||
"Plural-Forms: nplurals=4; plural=n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || "
|
||||
"n%100==4 ? 2 : 3;\n"
|
||||
"X-Generator: Weblate 5.13.3\n"
|
||||
|
||||
#: .\cookbook\forms.py:50
|
||||
msgid "Default"
|
||||
@@ -123,51 +123,51 @@ msgstr "fermentiramo"
|
||||
|
||||
#: .\cookbook\helper\recipe_url_import.py:325
|
||||
msgid "slow cook"
|
||||
msgstr ""
|
||||
msgstr "počasno kuhanje"
|
||||
|
||||
#: .\cookbook\helper\recipe_url_import.py:326
|
||||
msgid "egg boiler"
|
||||
msgstr ""
|
||||
msgstr "kuhalnik jajc"
|
||||
|
||||
#: .\cookbook\helper\recipe_url_import.py:327
|
||||
msgid "kettle"
|
||||
msgstr ""
|
||||
msgstr "kotel"
|
||||
|
||||
#: .\cookbook\helper\recipe_url_import.py:328
|
||||
msgid "blend"
|
||||
msgstr ""
|
||||
msgstr "mešanica"
|
||||
|
||||
#: .\cookbook\helper\recipe_url_import.py:329
|
||||
msgid "pre-clean"
|
||||
msgstr ""
|
||||
msgstr "predhodno čiščenje"
|
||||
|
||||
#: .\cookbook\helper\recipe_url_import.py:330
|
||||
msgid "high temperature"
|
||||
msgstr ""
|
||||
msgstr "visoka temperatura"
|
||||
|
||||
#: .\cookbook\helper\recipe_url_import.py:331
|
||||
msgid "rice cooker"
|
||||
msgstr ""
|
||||
msgstr "kuhalnik riža"
|
||||
|
||||
#: .\cookbook\helper\recipe_url_import.py:332
|
||||
msgid "caramelize"
|
||||
msgstr ""
|
||||
msgstr "karamelizirati"
|
||||
|
||||
#: .\cookbook\helper\recipe_url_import.py:333
|
||||
msgid "peeler"
|
||||
msgstr ""
|
||||
msgstr "lupilec"
|
||||
|
||||
#: .\cookbook\helper\recipe_url_import.py:334
|
||||
msgid "slicer"
|
||||
msgstr ""
|
||||
msgstr "rezalnik"
|
||||
|
||||
#: .\cookbook\helper\recipe_url_import.py:335
|
||||
msgid "grater"
|
||||
msgstr ""
|
||||
msgstr "strgalo"
|
||||
|
||||
#: .\cookbook\helper\recipe_url_import.py:336
|
||||
msgid "spiralizer"
|
||||
msgstr ""
|
||||
msgstr "spiralizator"
|
||||
|
||||
#: .\cookbook\helper\recipe_url_import.py:337
|
||||
msgid "sous-vide"
|
||||
@@ -229,7 +229,7 @@ msgstr "Ogljikovi hidrati"
|
||||
|
||||
#: .\cookbook\integration\mealie1.py:212
|
||||
msgid "Cholesterol"
|
||||
msgstr ""
|
||||
msgstr "Holesterol"
|
||||
|
||||
#: .\cookbook\integration\mealie1.py:213
|
||||
#: .\cookbook\migrations\0190_auto_20230525_1506.py:17
|
||||
@@ -238,33 +238,31 @@ msgstr "Maščoba"
|
||||
|
||||
#: .\cookbook\integration\mealie1.py:214
|
||||
msgid "Fiber"
|
||||
msgstr ""
|
||||
msgstr "Vlaknine"
|
||||
|
||||
#: .\cookbook\integration\mealie1.py:215
|
||||
#, fuzzy
|
||||
#| msgid "Proteins"
|
||||
msgid "Protein"
|
||||
msgstr "Beljakovine"
|
||||
|
||||
#: .\cookbook\integration\mealie1.py:216
|
||||
msgid "Saturated Fat"
|
||||
msgstr ""
|
||||
msgstr "Nasičene maščobe"
|
||||
|
||||
#: .\cookbook\integration\mealie1.py:217
|
||||
msgid "Sodium"
|
||||
msgstr ""
|
||||
msgstr "Natrij"
|
||||
|
||||
#: .\cookbook\integration\mealie1.py:218
|
||||
msgid "Sugar"
|
||||
msgstr ""
|
||||
msgstr "Sladkor"
|
||||
|
||||
#: .\cookbook\integration\mealie1.py:219
|
||||
msgid "Trans Fat"
|
||||
msgstr ""
|
||||
msgstr "Trans maščobe"
|
||||
|
||||
#: .\cookbook\integration\mealie1.py:220
|
||||
msgid "Unsaturated Fat"
|
||||
msgstr ""
|
||||
msgstr "Nenasičene maščobe"
|
||||
|
||||
#: .\cookbook\integration\openeats.py:28
|
||||
msgid "Recipe source:"
|
||||
@@ -478,7 +476,7 @@ msgstr "Dosegli ste omejitev nalaganja datotek."
|
||||
|
||||
#: .\cookbook\serializer.py:281
|
||||
msgid "The given file type is not allowed."
|
||||
msgstr ""
|
||||
msgstr "Navedena vrsta datoteke ni dovoljena."
|
||||
|
||||
#: .\cookbook\serializer.py:421 .\cookbook\views\views.py:94
|
||||
msgid ""
|
||||
@@ -487,7 +485,7 @@ msgstr "Dosegli ste največje število prostorov, ki so lahko v vaši lasti."
|
||||
|
||||
#: .\cookbook\serializer.py:434
|
||||
msgid "Space Name must be unique."
|
||||
msgstr ""
|
||||
msgstr "Ime prostora mora biti edinstveno."
|
||||
|
||||
#: .\cookbook\serializer.py:469
|
||||
msgid "Cannot modify Space owner permission."
|
||||
@@ -838,10 +836,8 @@ msgid "We are sorry, but the sign up is currently closed."
|
||||
msgstr "Žal nam je, vendar so registracije trenutno zaprte."
|
||||
|
||||
#: .\cookbook\templates\frontend\tandoor.html:15
|
||||
#, fuzzy
|
||||
#| msgid "Tandoor Recipes Invite"
|
||||
msgid "Tandoor Recipe Manager"
|
||||
msgstr "Tandoor Recepti vabilo"
|
||||
msgstr "Urejevalnik Tandoor Recepti"
|
||||
|
||||
#: .\cookbook\templates\index.html:28
|
||||
msgid "Search recipe ..."
|
||||
@@ -1428,8 +1424,6 @@ msgstr ""
|
||||
" %(site_name)s. Kot zadnji korak izpolnite naslednji obrazec:"
|
||||
|
||||
#: .\cookbook\templates\socialaccount\signup.html:32
|
||||
#, fuzzy
|
||||
#| msgid "I accept the follwoing"
|
||||
msgid "I accept the following"
|
||||
msgstr "Sprejemam naslednje"
|
||||
|
||||
@@ -1514,15 +1508,6 @@ msgid "System"
|
||||
msgstr "Sistem"
|
||||
|
||||
#: .\cookbook\templates\system.html:24
|
||||
#, fuzzy
|
||||
#| msgid ""
|
||||
#| "\n"
|
||||
#| " Django Recipes is an open source free software application. It "
|
||||
#| "can be found on\n"
|
||||
#| " <a href=\"https://github.com/vabene1111/recipes\">GitHub</a>.\n"
|
||||
#| " Changelogs can be found <a href=\"https://github.com/vabene1111/"
|
||||
#| "recipes/releases\">here</a>.\n"
|
||||
#| " "
|
||||
msgid ""
|
||||
"\n"
|
||||
" Tandoor Recipes is an open source free software application. It can "
|
||||
@@ -1533,11 +1518,11 @@ msgid ""
|
||||
" "
|
||||
msgstr ""
|
||||
"\n"
|
||||
" Django Recipes je odprtokodna brezplačna programska aplikacija. "
|
||||
"Najdete ga na GitHub\n"
|
||||
" <a href=\"https://github.com/vabene1111/recipes\"></a>.\n"
|
||||
" Dnevnike sprememb lahko najdete tukaj <a href=\"https://github.com/"
|
||||
"vabene1111/recipes/releases\"></a>.\n"
|
||||
" Tandoor Recipes je odprtokodna brezplačna programska oprema. Najdete "
|
||||
"jo na\n"
|
||||
" <a href=\"https://github.com/TandoorRecipes/recipes\">GitHub</a>.\n"
|
||||
" Dnevnike sprememb najdete <a href="
|
||||
"\"https://github.com/TandoorRecipes/recipes/releases\">tukaj</a>.\n"
|
||||
" "
|
||||
|
||||
#: .\cookbook\templates\system.html:30
|
||||
@@ -1559,7 +1544,7 @@ msgstr ""
|
||||
|
||||
#: .\cookbook\templates\system.html:56
|
||||
msgid "Plugins"
|
||||
msgstr ""
|
||||
msgstr "Vtičniki"
|
||||
|
||||
#: .\cookbook\templates\system.html:67
|
||||
msgid "Media Serving"
|
||||
@@ -1789,16 +1774,12 @@ msgid "{obj.name} was added to the shopping list."
|
||||
msgstr "{obj.name} je bil dodan na nakupovalni seznam."
|
||||
|
||||
#: .\cookbook\views\api.py:1239
|
||||
#, fuzzy
|
||||
#| msgid "Filter meal plans from date (inclusive) in the format of YYYY-MM-DD."
|
||||
msgid "Filter meal plans from date (inclusive)."
|
||||
msgstr "Filtrirajte načrte obrokov od datuma (vključno) v obliki LLLL-MM-DD."
|
||||
msgstr "Filtriraj načrte obrokov od datuma (vključno)."
|
||||
|
||||
#: .\cookbook\views\api.py:1241
|
||||
#, fuzzy
|
||||
#| msgid "Filter meal plans to date (inclusive) in the format of YYYY-MM-DD."
|
||||
msgid "Filter meal plans to date (inclusive)."
|
||||
msgstr "Filtrirajte dosedanje načrte obrokov (vključno) v obliki LLLL-MM-DD."
|
||||
msgstr "Filtriraj načrte obrokov do danes (vključno)."
|
||||
|
||||
#: .\cookbook\views\api.py:1244
|
||||
msgid "Filter meal plans with MealType ID. For multiple repeat parameter."
|
||||
@@ -1905,106 +1886,62 @@ msgstr "ID enote, ki bi jo moral imeti recept."
|
||||
|
||||
#: .\cookbook\views\api.py:1464
|
||||
msgid "Exact rating of recipe"
|
||||
msgstr ""
|
||||
msgstr "Natančna ocena recepta"
|
||||
|
||||
#: .\cookbook\views\api.py:1465
|
||||
#, fuzzy
|
||||
#| msgid "ID of unit a recipe should have."
|
||||
msgid "Rating a recipe should have or greater."
|
||||
msgstr "ID enote, ki bi jo moral imeti recept."
|
||||
msgstr "Ocena, ki bi jo moral imeti recept, ali višja."
|
||||
|
||||
#: .\cookbook\views\api.py:1466
|
||||
#, fuzzy
|
||||
#| msgid "ID of unit a recipe should have."
|
||||
msgid "Rating a recipe should have or smaller."
|
||||
msgstr "ID enote, ki bi jo moral imeti recept."
|
||||
msgstr "Ocena, ki jo mora imeti recept, je 1 ali manjša."
|
||||
|
||||
#: .\cookbook\views\api.py:1468
|
||||
msgid "Filter recipes cooked X times."
|
||||
msgstr ""
|
||||
msgstr "Filtriraj recepte, kuhane X-krat."
|
||||
|
||||
#: .\cookbook\views\api.py:1469
|
||||
#, fuzzy
|
||||
#| msgid ""
|
||||
#| "Filter recipes cooked X times or more. Negative values returns cooked "
|
||||
#| "less than X times"
|
||||
msgid "Filter recipes cooked X times or more."
|
||||
msgstr ""
|
||||
"Filtrirajte recepte, kuhane X-krat ali večkrat. Negativne vrednosti se "
|
||||
"vrnejo kuhane manj kot X-krat"
|
||||
msgstr "Filtriraj recepte, kuhane X-krat ali večkrat."
|
||||
|
||||
#: .\cookbook\views\api.py:1470
|
||||
msgid "Filter recipes cooked X times or less."
|
||||
msgstr ""
|
||||
msgstr "Filtriraj recepte, kuhane X-krat ali manj."
|
||||
|
||||
#: .\cookbook\views\api.py:1472
|
||||
#, fuzzy
|
||||
#| msgid "Filter for entries with the given recipe"
|
||||
msgid "Filter recipes created on the given date."
|
||||
msgstr "Filter za vnose z danim receptom"
|
||||
msgstr "Filtriraj recepte, ustvarjene na določen datum."
|
||||
|
||||
#: .\cookbook\views\api.py:1473
|
||||
#, fuzzy
|
||||
#| msgid ""
|
||||
#| "Filter recipes created on or after YYYY-MM-DD. Prepending - filters on or "
|
||||
#| "before date."
|
||||
msgid "Filter recipes created on the given date or after."
|
||||
msgstr ""
|
||||
"Filtrirajte recepte, ustvarjene LLLL-MM-DD ali pozneje. Pred - filtrira na "
|
||||
"ali pred datumom."
|
||||
msgstr "Filtriraj recepte, ustvarjene na določen datum ali pozneje."
|
||||
|
||||
#: .\cookbook\views\api.py:1474
|
||||
#, fuzzy
|
||||
#| msgid ""
|
||||
#| "Filter recipes created on or after YYYY-MM-DD. Prepending - filters on or "
|
||||
#| "before date."
|
||||
msgid "Filter recipes created on the given date or before."
|
||||
msgstr ""
|
||||
"Filtrirajte recepte, ustvarjene LLLL-MM-DD ali pozneje. Pred - filtrira na "
|
||||
"ali pred datumom."
|
||||
msgstr "Filtriraj recepte, ustvarjene na določen datum ali prej."
|
||||
|
||||
#: .\cookbook\views\api.py:1476 .\cookbook\views\api.py:1477
|
||||
#: .\cookbook\views\api.py:1478
|
||||
#, fuzzy
|
||||
#| msgid "Filter for entries with the given recipe"
|
||||
msgid "Filter recipes updated on the given date."
|
||||
msgstr "Filter za vnose z danim receptom"
|
||||
msgstr "Filtriraj recepte, posodobljene na navedeni datum."
|
||||
|
||||
#: .\cookbook\views\api.py:1480
|
||||
#, fuzzy
|
||||
#| msgid ""
|
||||
#| "Filter recipes last cooked on or after YYYY-MM-DD. Prepending - filters "
|
||||
#| "on or before date."
|
||||
msgid "Filter recipes last cooked on the given date or after."
|
||||
msgstr ""
|
||||
"Filtriraj recepte, nazadnje kuhane LLLL-MM-DD ali pozneje. Pred - filtrira "
|
||||
"na ali pred datumom."
|
||||
"Filtriraj recepte, ki so bili nazadnje kuhani na določen datum ali pozneje."
|
||||
|
||||
#: .\cookbook\views\api.py:1481
|
||||
#, fuzzy
|
||||
#| msgid ""
|
||||
#| "Filter recipes last cooked on or after YYYY-MM-DD. Prepending - filters "
|
||||
#| "on or before date."
|
||||
msgid "Filter recipes last cooked on the given date or before."
|
||||
msgstr ""
|
||||
"Filtriraj recepte, nazadnje kuhane LLLL-MM-DD ali pozneje. Pred - filtrira "
|
||||
"na ali pred datumom."
|
||||
"Filtriraj recepte, ki so bili nazadnje kuhani na določen datum ali prej."
|
||||
|
||||
#: .\cookbook\views\api.py:1483 .\cookbook\views\api.py:1484
|
||||
#, fuzzy
|
||||
#| msgid ""
|
||||
#| "Filter recipes lasts viewed on or after YYYY-MM-DD. Prepending - filters "
|
||||
#| "on or before date."
|
||||
msgid "Filter recipes lasts viewed on the given date."
|
||||
msgstr ""
|
||||
"Recepti filtrov so zadnjič prikazani LLLL-MM-DD ali pozneje. Pred - filtrira "
|
||||
"na ali pred datumom."
|
||||
msgstr "Filtriraj recepte, ki so bili nazadnje ogledani na določen datum."
|
||||
|
||||
#: .\cookbook\views\api.py:1486
|
||||
#, fuzzy
|
||||
#| msgid "Filter for entries with the given recipe"
|
||||
msgid "Filter recipes for ones created by the given user ID"
|
||||
msgstr "Filter za vnose z danim receptom"
|
||||
msgstr "Filtriraj recepte po tistih, ki jih je ustvaril dani uporabniški ID"
|
||||
|
||||
#: .\cookbook\views\api.py:1487
|
||||
msgid "If only internal recipes should be returned. [true/<b>false</b>]"
|
||||
@@ -2021,6 +1958,9 @@ msgid ""
|
||||
"lastcooked,-lastcooked,rating,-rating,times_cooked,-times_cooked,created_at,-"
|
||||
"created_at,lastviewed,-lastviewed"
|
||||
msgstr ""
|
||||
"Določa vrstni red rezultatov. Možnosti so: "
|
||||
"score,-score,name,-name,lastcooked,-lastcooked,rating,-rating,times_cooked,-times_cooked,created_at,-created_at,lastviewed,-lastviewed"
|
||||
""
|
||||
|
||||
#: .\cookbook\views\api.py:1492
|
||||
msgid "Returns new results first in search results. [true/<b>false</b>]"
|
||||
@@ -2031,10 +1971,12 @@ msgid ""
|
||||
"Returns the given number of recently viewed recipes before search results "
|
||||
"(if given)"
|
||||
msgstr ""
|
||||
"Vrne podano število nedavno ogledanih receptov pred rezultati iskanja "
|
||||
"(če je podano)"
|
||||
|
||||
#: .\cookbook\views\api.py:1494
|
||||
msgid "ID of a custom filter. Returns all recipes matched by that filter."
|
||||
msgstr ""
|
||||
msgstr "ID filtra po meri. Vrne vse recepte, ki se ujemajo s tem filtrom."
|
||||
|
||||
#: .\cookbook\views\api.py:1495
|
||||
msgid "Filter recipes that can be made with OnHand food. [true/<b>false</b>]"
|
||||
@@ -2047,48 +1989,43 @@ msgid ""
|
||||
"Return the PropertyTypes matching the property category. Repeat for "
|
||||
"multiple."
|
||||
msgstr ""
|
||||
"Vrne vrste lastnosti (PropertyTypes), ki ustrezajo kategoriji lastnosti. "
|
||||
"Ponovite za več vrst lastnosti."
|
||||
|
||||
#: .\cookbook\views\api.py:1804 .\cookbook\views\api.py:1860
|
||||
#, fuzzy
|
||||
#| msgid "Filter for entries with the given recipe"
|
||||
msgid "Returns only entries associated with the given mealplan id"
|
||||
msgstr "Filter za vnose z danim receptom"
|
||||
msgstr "Vrne samo vnose, povezane z danim ID-jem načrta obrokov"
|
||||
|
||||
#: .\cookbook\views\api.py:1858
|
||||
msgid ""
|
||||
"Returns only elements updated after the given timestamp in ISO 8601 format."
|
||||
msgstr ""
|
||||
"Vrne samo elemente, posodobljene po danem časovnem žigu v formatu ISO 8601."
|
||||
|
||||
#: .\cookbook\views\api.py:2031
|
||||
#, fuzzy
|
||||
#| msgid ""
|
||||
#| "Return the Automations matching the automation type. Multiple values "
|
||||
#| "allowed."
|
||||
msgid ""
|
||||
"Return the Automations matching the automation type. Repeat for multiple."
|
||||
msgstr ""
|
||||
"Vrnite avtomatizacije, ki ustrezajo vrsti avtomatizacije. Dovoljenih je "
|
||||
"več vrednosti."
|
||||
"Vrne avtomatizacije, ki ustrezajo vrsti avtomatizacije. Ponovite za več "
|
||||
"avtomatizacij."
|
||||
|
||||
#: .\cookbook\views\api.py:2048
|
||||
msgid ""
|
||||
"Text field to store data that gets carried over to the UserSpace created "
|
||||
"from the InviteLink"
|
||||
msgstr ""
|
||||
"Besedilno polje za shranjevanje podatkov, ki se prenesejo v uporabniški "
|
||||
"prostor, ustvarjen iz InviteLink"
|
||||
|
||||
#: .\cookbook\views\api.py:2049
|
||||
msgid "Only return InviteLinks that have not been used yet."
|
||||
msgstr ""
|
||||
msgstr "Vrni samo povezave InviteLink, ki še niso bile uporabljene."
|
||||
|
||||
#: .\cookbook\views\api.py:2076
|
||||
#, fuzzy
|
||||
#| msgid ""
|
||||
#| "Return the Automations matching the automation type. Multiple values "
|
||||
#| "allowed."
|
||||
msgid "Return the CustomFilters matching the model type. Repeat for multiple."
|
||||
msgstr ""
|
||||
"Vrnite avtomatizacije, ki ustrezajo vrsti avtomatizacije. Dovoljenih je "
|
||||
"več vrednosti."
|
||||
"Vrne filtre CustomFilters, ki ustrezajo vrsti modela. Ponovite za več "
|
||||
"filtrov."
|
||||
|
||||
#: .\cookbook\views\api.py:2176
|
||||
msgid "Nothing to do."
|
||||
@@ -2112,13 +2049,15 @@ msgstr "Uporabnih podatkov ni bilo mogoče najti."
|
||||
|
||||
#: .\cookbook\views\api.py:2286 .\cookbook\views\api.py:2434
|
||||
msgid "You must select an AI provider to perform your request."
|
||||
msgstr ""
|
||||
msgstr "Za izvedbo vaše zahteve morate izbrati ponudnika umetne inteligence."
|
||||
|
||||
#: .\cookbook\views\api.py:2293 .\cookbook\views\api.py:2441
|
||||
msgid ""
|
||||
"You don't have any credits remaining to use AI or AI features are not "
|
||||
"enabled for your space."
|
||||
msgstr ""
|
||||
"Nimate več kreditov za uporabo umetne inteligence ali pa funkcije umetne "
|
||||
"inteligence niso omogočene za vaš prostor."
|
||||
|
||||
#: .\cookbook\views\api.py:2499 .\cookbook\views\api.py:2667
|
||||
msgid "File is above space limit"
|
||||
@@ -2190,9 +2129,8 @@ msgid ""
|
||||
"please consult the django documentation on how to reset passwords."
|
||||
msgstr ""
|
||||
"Nastavitveno stran lahko uporabite samo za ustvarjanje prvega "
|
||||
"uporabnika! \n"
|
||||
" Če ste pozabili svoje poverilnice superuporabnika, si oglejte "
|
||||
"dokumentacijo django o tem, kako ponastaviti gesla."
|
||||
"uporabnika! Če ste pozabili poverilnice superuporabnika, "
|
||||
"si oglejte dokumentacijo django za ponastavitev gesel."
|
||||
|
||||
#: .\cookbook\views\views.py:304
|
||||
msgid "Passwords dont match!"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -16,7 +16,7 @@ import uuid
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
from cookbook.models import SearchFields
|
||||
|
||||
from django.contrib.postgres.operations import TrigramExtension, UnaccentExtension
|
||||
|
||||
def allSearchFields():
|
||||
return list(SearchFields.objects.values_list('id', flat=True))
|
||||
@@ -141,6 +141,8 @@ class Migration(migrations.Migration):
|
||||
]
|
||||
|
||||
operations = [
|
||||
TrigramExtension(),
|
||||
UnaccentExtension(),
|
||||
migrations.RunPython(create_default_groups),
|
||||
migrations.CreateModel(
|
||||
name='AiProvider',
|
||||
|
||||
15
cookbook/migrations/0230_auto_20250925_2056.py
Normal file
15
cookbook/migrations/0230_auto_20250925_2056.py
Normal file
@@ -0,0 +1,15 @@
|
||||
# Generated by Django 5.2.6 on 2025-09-25 18:56
|
||||
|
||||
from django.db import migrations
|
||||
from django.contrib.postgres.operations import TrigramExtension, UnaccentExtension
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('cookbook', '0229_alter_ailog_options_alter_aiprovider_options_and_more'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
TrigramExtension(),
|
||||
UnaccentExtension(),
|
||||
]
|
||||
@@ -0,0 +1,141 @@
|
||||
# Generated by Django 5.2.6 on 2025-09-30 18:47
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('cookbook', '0230_auto_20250925_2056'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name='aiprovider',
|
||||
options={'ordering': ('pk',)},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='automation',
|
||||
options={'ordering': ('pk',)},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='bookmarkletimport',
|
||||
options={'ordering': ('pk',)},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='comment',
|
||||
options={'ordering': ('pk',)},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='connectorconfig',
|
||||
options={'ordering': ('pk',)},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='cooklog',
|
||||
options={'ordering': ('pk',)},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='customfilter',
|
||||
options={'ordering': ('pk',)},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='exportlog',
|
||||
options={'ordering': ('pk',)},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='food',
|
||||
options={'ordering': ('name',)},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='importlog',
|
||||
options={'ordering': ('pk',)},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='invitelink',
|
||||
options={'ordering': ('pk',)},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='keyword',
|
||||
options={'ordering': ('name',)},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='mealplan',
|
||||
options={'ordering': ('pk',)},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='mealtype',
|
||||
options={'ordering': ('name',)},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='recipe',
|
||||
options={'ordering': ('name',)},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='recipebook',
|
||||
options={'ordering': ('name',)},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='recipeimport',
|
||||
options={'ordering': ('pk',)},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='sharelink',
|
||||
options={'ordering': ('pk',)},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='shoppinglistentry',
|
||||
options={'ordering': ('pk',)},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='shoppinglistrecipe',
|
||||
options={'ordering': ('pk',)},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='space',
|
||||
options={'ordering': ('pk',)},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='storage',
|
||||
options={'ordering': ('pk',)},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='supermarket',
|
||||
options={'ordering': ('name',)},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='supermarketcategory',
|
||||
options={'ordering': ('name',)},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='sync',
|
||||
options={'ordering': ('pk',)},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='synclog',
|
||||
options={'ordering': ('pk',)},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='telegrambot',
|
||||
options={'ordering': ('pk',)},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='unit',
|
||||
options={'ordering': ('name',)},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='unitconversion',
|
||||
options={'ordering': ('pk',)},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='userfile',
|
||||
options={'ordering': ('pk',)},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='userspace',
|
||||
options={'ordering': ('pk',)},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='viewlog',
|
||||
options={'ordering': ('pk',)},
|
||||
),
|
||||
]
|
||||
29
cookbook/migrations/0232_shoppinglist.py
Normal file
29
cookbook/migrations/0232_shoppinglist.py
Normal file
@@ -0,0 +1,29 @@
|
||||
# Generated by Django 5.2.7 on 2025-11-30 10:19
|
||||
|
||||
import cookbook.models
|
||||
import django.db.models.deletion
|
||||
import django_prometheus.models
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('cookbook', '0231_alter_aiprovider_options_alter_automation_options_and_more'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='ShoppingList',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('name', models.CharField(blank=True, default='', max_length=32)),
|
||||
('description', models.TextField(blank=True)),
|
||||
('color', models.CharField(blank=True, max_length=7, null=True)),
|
||||
('created_at', models.DateTimeField(auto_now_add=True)),
|
||||
('updated_at', models.DateTimeField(auto_now=True)),
|
||||
('space', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cookbook.space')),
|
||||
],
|
||||
bases=(django_prometheus.models.ExportModelOperationsMixin('shopping_list'), models.Model, cookbook.models.PermissionModelMixin),
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,28 @@
|
||||
# Generated by Django 5.2.7 on 2025-11-30 14:00
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('cookbook', '0232_shoppinglist'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='food',
|
||||
name='shopping_lists',
|
||||
field=models.ManyToManyField(blank=True, to='cookbook.shoppinglist'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='shoppinglistentry',
|
||||
name='shopping_lists',
|
||||
field=models.ManyToManyField(blank=True, to='cookbook.shoppinglist'),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='supermarket',
|
||||
name='shopping_lists',
|
||||
field=models.ManyToManyField(blank=True, to='cookbook.shoppinglist'),
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,22 @@
|
||||
# Generated by Django 5.2.8 on 2025-12-03 16:02
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('cookbook', '0233_food_shopping_lists_shoppinglistentry_shopping_lists_and_more'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name='shoppinglist',
|
||||
options={'ordering': ('pk',)},
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='userpreference',
|
||||
name='shopping_update_food_lists',
|
||||
field=models.BooleanField(default=True),
|
||||
),
|
||||
]
|
||||
@@ -402,6 +402,9 @@ class Space(ExportModelOperationsMixin('space'), models.Model):
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
||||
class Meta:
|
||||
ordering = ('pk',)
|
||||
|
||||
|
||||
class AiProvider(models.Model):
|
||||
name = models.CharField(max_length=128)
|
||||
@@ -421,13 +424,14 @@ class AiProvider(models.Model):
|
||||
return self.name
|
||||
|
||||
class Meta:
|
||||
ordering = ('id',)
|
||||
ordering = ('pk',)
|
||||
|
||||
|
||||
class AiLog(models.Model, PermissionModelMixin):
|
||||
F_FILE_IMPORT = 'FILE_IMPORT'
|
||||
F_STEP_SORT = 'STEP_SORT'
|
||||
F_FOOD_PROPERTIES = 'FOOD_PROPERTIES'
|
||||
F_RECIPE_PROPERTIES = 'RECIPE_PROPERTIES'
|
||||
|
||||
ai_provider = models.ForeignKey(AiProvider, on_delete=models.SET_NULL, null=True)
|
||||
function = models.CharField(max_length=64)
|
||||
@@ -476,6 +480,9 @@ class ConnectorConfig(models.Model, PermissionModelMixin):
|
||||
space = models.ForeignKey(Space, on_delete=models.CASCADE)
|
||||
objects = ScopedManager(space='space')
|
||||
|
||||
class Meta:
|
||||
ordering = ('pk',)
|
||||
|
||||
|
||||
class UserPreference(models.Model, PermissionModelMixin):
|
||||
# Themes
|
||||
@@ -544,6 +551,7 @@ class UserPreference(models.Model, PermissionModelMixin):
|
||||
show_step_ingredients = models.BooleanField(default=True)
|
||||
default_delay = models.DecimalField(default=4, max_digits=8, decimal_places=4)
|
||||
shopping_recent_days = models.PositiveIntegerField(default=7)
|
||||
shopping_update_food_lists = models.BooleanField(default=True)
|
||||
csv_delim = models.CharField(max_length=2, default=",")
|
||||
csv_prefix = models.CharField(max_length=10, blank=True, )
|
||||
|
||||
@@ -579,6 +587,9 @@ class UserSpace(models.Model, PermissionModelMixin):
|
||||
created_at = models.DateTimeField(auto_now_add=True)
|
||||
updated_at = models.DateTimeField(auto_now=True)
|
||||
|
||||
class Meta:
|
||||
ordering = ('pk',)
|
||||
|
||||
|
||||
class Storage(models.Model, PermissionModelMixin):
|
||||
DROPBOX = 'DB'
|
||||
@@ -603,6 +614,9 @@ class Storage(models.Model, PermissionModelMixin):
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
||||
class Meta:
|
||||
ordering = ('pk',)
|
||||
|
||||
|
||||
class Sync(models.Model, PermissionModelMixin):
|
||||
storage = models.ForeignKey(Storage, on_delete=models.PROTECT)
|
||||
@@ -618,6 +632,9 @@ class Sync(models.Model, PermissionModelMixin):
|
||||
def __str__(self):
|
||||
return self.path
|
||||
|
||||
class Meta:
|
||||
ordering = ('pk',)
|
||||
|
||||
|
||||
class SupermarketCategory(models.Model, PermissionModelMixin, MergeModelMixin):
|
||||
name = models.CharField(max_length=128, validators=[MinLengthValidator(1)])
|
||||
@@ -643,12 +660,14 @@ class SupermarketCategory(models.Model, PermissionModelMixin, MergeModelMixin):
|
||||
models.UniqueConstraint(fields=['space', 'name'], name='smc_unique_name_per_space'),
|
||||
models.UniqueConstraint(fields=['space', 'open_data_slug'], name='supermarket_category_unique_open_data_slug_per_space')
|
||||
]
|
||||
ordering = ('name',)
|
||||
|
||||
|
||||
class Supermarket(models.Model, PermissionModelMixin):
|
||||
name = models.CharField(max_length=128, validators=[MinLengthValidator(1)])
|
||||
description = models.TextField(blank=True, null=True)
|
||||
categories = models.ManyToManyField(SupermarketCategory, through='SupermarketCategoryRelation')
|
||||
shopping_lists = models.ManyToManyField("ShoppingList", blank=True)
|
||||
open_data_slug = models.CharField(max_length=128, null=True, blank=True, default=None)
|
||||
|
||||
space = models.ForeignKey(Space, on_delete=models.CASCADE)
|
||||
@@ -662,6 +681,7 @@ class Supermarket(models.Model, PermissionModelMixin):
|
||||
models.UniqueConstraint(fields=['space', 'name'], name='sm_unique_name_per_space'),
|
||||
models.UniqueConstraint(fields=['space', 'open_data_slug'], name='supermarket_unique_open_data_slug_per_space')
|
||||
]
|
||||
ordering = ('name',)
|
||||
|
||||
|
||||
class SupermarketCategoryRelation(models.Model, PermissionModelMixin):
|
||||
@@ -693,6 +713,9 @@ class SyncLog(models.Model, PermissionModelMixin):
|
||||
def __str__(self):
|
||||
return f"{self.created_at}:{self.sync} - {self.status}"
|
||||
|
||||
class Meta:
|
||||
ordering = ('pk',)
|
||||
|
||||
|
||||
class Keyword(ExportModelOperationsMixin('keyword'), TreeModel, PermissionModelMixin):
|
||||
if SORT_TREE_BY_NAME:
|
||||
@@ -710,6 +733,7 @@ class Keyword(ExportModelOperationsMixin('keyword'), TreeModel, PermissionModelM
|
||||
models.UniqueConstraint(fields=['space', 'name'], name='kw_unique_name_per_space')
|
||||
]
|
||||
indexes = (Index(fields=['id', 'name']),)
|
||||
ordering = ('name',)
|
||||
|
||||
|
||||
class Unit(ExportModelOperationsMixin('unit'), models.Model, PermissionModelMixin, MergeModelMixin):
|
||||
@@ -741,6 +765,7 @@ class Unit(ExportModelOperationsMixin('unit'), models.Model, PermissionModelMixi
|
||||
models.UniqueConstraint(fields=['space', 'name'], name='u_unique_name_per_space'),
|
||||
models.UniqueConstraint(fields=['space', 'open_data_slug'], name='unit_unique_open_data_slug_per_space')
|
||||
]
|
||||
ordering = ('name',)
|
||||
|
||||
|
||||
class Food(ExportModelOperationsMixin('food'), TreeModel, PermissionModelMixin):
|
||||
@@ -757,6 +782,7 @@ class Food(ExportModelOperationsMixin('food'), TreeModel, PermissionModelMixin):
|
||||
recipe = models.ForeignKey('Recipe', null=True, blank=True, on_delete=models.SET_NULL)
|
||||
url = models.CharField(max_length=1024, blank=True, null=True, default='')
|
||||
supermarket_category = models.ForeignKey(SupermarketCategory, null=True, blank=True, on_delete=models.SET_NULL) # inherited field
|
||||
shopping_lists = models.ManyToManyField("ShoppingList", blank=True)
|
||||
ignore_shopping = models.BooleanField(default=False) # inherited field
|
||||
onhand_users = models.ManyToManyField(User, blank=True)
|
||||
description = models.TextField(default='', blank=True)
|
||||
@@ -874,6 +900,7 @@ class Food(ExportModelOperationsMixin('food'), TreeModel, PermissionModelMixin):
|
||||
Index(fields=['id']),
|
||||
Index(fields=['name']),
|
||||
)
|
||||
ordering = ('name',)
|
||||
|
||||
|
||||
class UnitConversion(ExportModelOperationsMixin('unit_conversion'), models.Model, PermissionModelMixin):
|
||||
@@ -900,6 +927,7 @@ class UnitConversion(ExportModelOperationsMixin('unit_conversion'), models.Model
|
||||
models.UniqueConstraint(fields=['space', 'base_unit', 'converted_unit', 'food'], name='f_unique_conversion_per_space'),
|
||||
models.UniqueConstraint(fields=['space', 'open_data_slug'], name='unit_conversion_unique_open_data_slug_per_space')
|
||||
]
|
||||
ordering = ('pk',)
|
||||
|
||||
|
||||
class Ingredient(ExportModelOperationsMixin('ingredient'), models.Model, PermissionModelMixin):
|
||||
@@ -918,8 +946,8 @@ class Ingredient(ExportModelOperationsMixin('ingredient'), models.Model, Permiss
|
||||
space = models.ForeignKey(Space, on_delete=models.CASCADE)
|
||||
objects = ScopedManager(space='space')
|
||||
|
||||
def __str__(self):
|
||||
return f'{self.pk}: {self.amount} ' + (self.food.name if self.food else ' ') + (self.unit.name if self.unit else '')
|
||||
# def __str__(self):
|
||||
# return f'{self.pk}: {self.amount} ' + (self.food.name if self.food else ' ') + (self.unit.name if self.unit else '')
|
||||
|
||||
class Meta:
|
||||
ordering = ['order', 'pk']
|
||||
@@ -1104,13 +1132,14 @@ class Recipe(ExportModelOperationsMixin('recipe'), models.Model, PermissionModel
|
||||
sub_food_recipes = Q(id__in=Food.objects.filter(ingredient__step__recipe__in=related_recipes).exclude(recipe=None).values_list('recipe'))
|
||||
return Recipe.objects.filter(Q(id__in=related_recipes.values_list('id')) | sub_step_recipes | sub_food_recipes)
|
||||
|
||||
class Meta():
|
||||
class Meta:
|
||||
indexes = (
|
||||
GinIndex(fields=["name_search_vector"]),
|
||||
GinIndex(fields=["desc_search_vector"]),
|
||||
Index(fields=['id']),
|
||||
Index(fields=['name']),
|
||||
)
|
||||
ordering = ('name',)
|
||||
|
||||
|
||||
class Comment(ExportModelOperationsMixin('comment'), models.Model, PermissionModelMixin):
|
||||
@@ -1132,6 +1161,9 @@ class Comment(ExportModelOperationsMixin('comment'), models.Model, PermissionMod
|
||||
def __str__(self):
|
||||
return self.text
|
||||
|
||||
class Meta:
|
||||
ordering = ('pk',)
|
||||
|
||||
|
||||
class RecipeImport(models.Model, PermissionModelMixin):
|
||||
name = models.CharField(max_length=128)
|
||||
@@ -1159,6 +1191,9 @@ class RecipeImport(models.Model, PermissionModelMixin):
|
||||
self.delete()
|
||||
return recipe
|
||||
|
||||
class Meta:
|
||||
ordering = ('pk',)
|
||||
|
||||
|
||||
class RecipeBook(ExportModelOperationsMixin('book'), models.Model, PermissionModelMixin):
|
||||
name = models.CharField(max_length=128)
|
||||
@@ -1176,6 +1211,7 @@ class RecipeBook(ExportModelOperationsMixin('book'), models.Model, PermissionMod
|
||||
|
||||
class Meta():
|
||||
indexes = (Index(fields=['name']),)
|
||||
ordering = ('name',)
|
||||
|
||||
|
||||
class RecipeBookEntry(ExportModelOperationsMixin('book_entry'), models.Model, PermissionModelMixin):
|
||||
@@ -1221,6 +1257,7 @@ class MealType(models.Model, PermissionModelMixin):
|
||||
constraints = [
|
||||
models.UniqueConstraint(fields=['space', 'name', 'created_by'], name='mt_unique_name_per_space'),
|
||||
]
|
||||
ordering = ('name',)
|
||||
|
||||
|
||||
class MealPlan(ExportModelOperationsMixin('meal_plan'), models.Model, PermissionModelMixin):
|
||||
@@ -1248,6 +1285,9 @@ class MealPlan(ExportModelOperationsMixin('meal_plan'), models.Model, Permission
|
||||
def __str__(self):
|
||||
return f'{self.get_label()} - {self.from_date} - {self.meal_type.name}'
|
||||
|
||||
class Meta:
|
||||
ordering = ('pk',)
|
||||
|
||||
|
||||
class ShoppingListRecipe(ExportModelOperationsMixin('shopping_list_recipe'), models.Model, PermissionModelMixin):
|
||||
name = models.CharField(max_length=32, blank=True, default='')
|
||||
@@ -1260,11 +1300,30 @@ class ShoppingListRecipe(ExportModelOperationsMixin('shopping_list_recipe'), mod
|
||||
|
||||
objects = ScopedManager(space='space')
|
||||
|
||||
def __str__(self):
|
||||
return f'Shopping list recipe {self.id} - {self.recipe}'
|
||||
# def __str__(self):
|
||||
# return f'Shopping list recipe {self.id} - {self.recipe}'
|
||||
|
||||
class Meta:
|
||||
ordering = ('pk',)
|
||||
|
||||
|
||||
class ShoppingList(ExportModelOperationsMixin('shopping_list'), models.Model, PermissionModelMixin):
|
||||
name = models.CharField(max_length=32, blank=True, default='')
|
||||
description = models.TextField(blank=True)
|
||||
color = models.CharField(max_length=7, blank=True, null=True)
|
||||
|
||||
created_at = models.DateTimeField(auto_now_add=True)
|
||||
updated_at = models.DateTimeField(auto_now=True)
|
||||
|
||||
space = models.ForeignKey(Space, on_delete=models.CASCADE)
|
||||
objects = ScopedManager(space='space')
|
||||
|
||||
class Meta:
|
||||
ordering = ('pk',)
|
||||
|
||||
|
||||
class ShoppingListEntry(ExportModelOperationsMixin('shopping_list_entry'), models.Model, PermissionModelMixin):
|
||||
shopping_lists = models.ManyToManyField(ShoppingList, blank=True)
|
||||
list_recipe = models.ForeignKey(ShoppingListRecipe, on_delete=models.CASCADE, null=True, blank=True, related_name='entries')
|
||||
food = models.ForeignKey(Food, on_delete=models.CASCADE, related_name='shopping_entries')
|
||||
unit = models.ForeignKey(Unit, on_delete=models.SET_NULL, null=True, blank=True)
|
||||
@@ -1294,6 +1353,9 @@ class ShoppingListEntry(ExportModelOperationsMixin('shopping_list_entry'), model
|
||||
except AttributeError:
|
||||
return None
|
||||
|
||||
class Meta:
|
||||
ordering = ('pk',)
|
||||
|
||||
|
||||
class ShareLink(ExportModelOperationsMixin('share_link'), models.Model, PermissionModelMixin):
|
||||
recipe = models.ForeignKey(Recipe, on_delete=models.CASCADE)
|
||||
@@ -1309,6 +1371,9 @@ class ShareLink(ExportModelOperationsMixin('share_link'), models.Model, Permissi
|
||||
def __str__(self):
|
||||
return f'{self.recipe} - {self.uuid}'
|
||||
|
||||
class Meta:
|
||||
ordering = ('pk',)
|
||||
|
||||
|
||||
def default_valid_until():
|
||||
return date.today() + timedelta(days=14)
|
||||
@@ -1332,6 +1397,9 @@ class InviteLink(ExportModelOperationsMixin('invite_link'), models.Model, Permis
|
||||
def __str__(self):
|
||||
return f'{self.uuid}'
|
||||
|
||||
class Meta:
|
||||
ordering = ('pk',)
|
||||
|
||||
|
||||
class TelegramBot(models.Model, PermissionModelMixin):
|
||||
token = models.CharField(max_length=256)
|
||||
@@ -1346,6 +1414,9 @@ class TelegramBot(models.Model, PermissionModelMixin):
|
||||
def __str__(self):
|
||||
return f"{self.name}"
|
||||
|
||||
class Meta:
|
||||
ordering = ('pk',)
|
||||
|
||||
|
||||
class CookLog(ExportModelOperationsMixin('cook_log'), models.Model, PermissionModelMixin):
|
||||
recipe = models.ForeignKey(Recipe, on_delete=models.CASCADE)
|
||||
@@ -1363,7 +1434,7 @@ class CookLog(ExportModelOperationsMixin('cook_log'), models.Model, PermissionMo
|
||||
def __str__(self):
|
||||
return self.recipe.name
|
||||
|
||||
class Meta():
|
||||
class Meta:
|
||||
indexes = (
|
||||
Index(fields=['id']),
|
||||
Index(fields=['recipe']),
|
||||
@@ -1372,6 +1443,7 @@ class CookLog(ExportModelOperationsMixin('cook_log'), models.Model, PermissionMo
|
||||
Index(fields=['created_by']),
|
||||
Index(fields=['created_by', 'rating']),
|
||||
)
|
||||
ordering = ('pk',)
|
||||
|
||||
|
||||
class ViewLog(ExportModelOperationsMixin('view_log'), models.Model, PermissionModelMixin):
|
||||
@@ -1385,13 +1457,14 @@ class ViewLog(ExportModelOperationsMixin('view_log'), models.Model, PermissionMo
|
||||
def __str__(self):
|
||||
return self.recipe.name
|
||||
|
||||
class Meta():
|
||||
class Meta:
|
||||
indexes = (
|
||||
Index(fields=['recipe']),
|
||||
Index(fields=['-created_at']),
|
||||
Index(fields=['created_by']),
|
||||
Index(fields=['recipe', '-created_at', 'created_by']),
|
||||
)
|
||||
ordering = ('pk',)
|
||||
|
||||
|
||||
class ImportLog(models.Model, PermissionModelMixin):
|
||||
@@ -1412,6 +1485,9 @@ class ImportLog(models.Model, PermissionModelMixin):
|
||||
def __str__(self):
|
||||
return f"{self.created_at}:{self.type}"
|
||||
|
||||
class Meta:
|
||||
ordering = ('pk',)
|
||||
|
||||
|
||||
class ExportLog(models.Model, PermissionModelMixin):
|
||||
type = models.CharField(max_length=32)
|
||||
@@ -1432,6 +1508,9 @@ class ExportLog(models.Model, PermissionModelMixin):
|
||||
def __str__(self):
|
||||
return f"{self.created_at}:{self.type}"
|
||||
|
||||
class Meta:
|
||||
ordering = ('pk',)
|
||||
|
||||
|
||||
class BookmarkletImport(ExportModelOperationsMixin('bookmarklet_import'), models.Model, PermissionModelMixin):
|
||||
html = models.TextField()
|
||||
@@ -1442,6 +1521,9 @@ class BookmarkletImport(ExportModelOperationsMixin('bookmarklet_import'), models
|
||||
objects = ScopedManager(space='space')
|
||||
space = models.ForeignKey(Space, on_delete=models.CASCADE)
|
||||
|
||||
class Meta:
|
||||
ordering = ('pk',)
|
||||
|
||||
|
||||
# field names used to configure search behavior - all data populated during data migration
|
||||
# other option is to use a MultiSelectField from https://github.com/goinnn/django-multiselectfield
|
||||
@@ -1509,6 +1591,9 @@ class UserFile(ExportModelOperationsMixin('user_files'), models.Model, Permissio
|
||||
def __str__(self):
|
||||
return f'{self.name} (#{self.id})'
|
||||
|
||||
class Meta:
|
||||
ordering = ('pk',)
|
||||
|
||||
|
||||
class Automation(ExportModelOperationsMixin('automations'), models.Model, PermissionModelMixin):
|
||||
FOOD_ALIAS = 'FOOD_ALIAS'
|
||||
@@ -1555,6 +1640,9 @@ class Automation(ExportModelOperationsMixin('automations'), models.Model, Permis
|
||||
objects = ScopedManager(space='space')
|
||||
space = models.ForeignKey(Space, on_delete=models.CASCADE)
|
||||
|
||||
class Meta:
|
||||
ordering = ('pk',)
|
||||
|
||||
|
||||
class CustomFilter(models.Model, PermissionModelMixin):
|
||||
RECIPE = 'RECIPE'
|
||||
@@ -1585,3 +1673,4 @@ class CustomFilter(models.Model, PermissionModelMixin):
|
||||
constraints = [
|
||||
models.UniqueConstraint(fields=['space', 'name'], name='cf_unique_name_per_space')
|
||||
]
|
||||
ordering = ('pk',)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import traceback
|
||||
import uuid
|
||||
from datetime import datetime, timedelta
|
||||
from decimal import Decimal
|
||||
@@ -37,7 +38,7 @@ from cookbook.models import (Automation, BookmarkletImport, Comment, CookLog, Cu
|
||||
ShareLink, ShoppingListEntry, ShoppingListRecipe, Space,
|
||||
Step, Storage, Supermarket, SupermarketCategory,
|
||||
SupermarketCategoryRelation, Sync, SyncLog, Unit, UnitConversion,
|
||||
UserFile, UserPreference, UserSpace, ViewLog, ConnectorConfig, SearchPreference, SearchFields, AiLog, AiProvider)
|
||||
UserFile, UserPreference, UserSpace, ViewLog, ConnectorConfig, SearchPreference, SearchFields, AiLog, AiProvider, ShoppingList)
|
||||
from cookbook.templatetags.custom_tags import markdown
|
||||
from recipes.settings import AWS_ENABLED, MEDIA_URL, EMAIL_HOST
|
||||
|
||||
@@ -186,11 +187,37 @@ class SpaceFilterSerializer(serializers.ListSerializer):
|
||||
if isinstance(self.context['request'].user, AnonymousUser):
|
||||
data = []
|
||||
else:
|
||||
data = data.filter(userspace__space=self.context['request'].user.get_active_space()).all()
|
||||
iterable = data.all() if hasattr(data, 'all') else data
|
||||
if isinstance(iterable, list) or (isinstance(iterable, QuerySet) and getattr(iterable, '_result_cache', None) is not None):
|
||||
try:
|
||||
new_data = []
|
||||
for u in iterable:
|
||||
for us in u.userspace_set.all():
|
||||
if us.space.id == self.context['request'].space.id:
|
||||
new_data.append(u)
|
||||
data = new_data
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
data = data.filter(userspace__space=self.context['request'].user.get_active_space()).all()
|
||||
else:
|
||||
if hasattr(self.context['request'], 'space'):
|
||||
data = data.filter(userspace__space=self.context['request'].space).all()
|
||||
else:
|
||||
# not sure why but this branch can be hit (just normal page load, need to see why)
|
||||
data = data.filter(userspace__space=self.context['request'].user.get_active_space()).all()
|
||||
elif isinstance(data, list):
|
||||
data = [d for d in data if getattr(d, self.child.Meta.model.get_space_key()[0]) == self.context['request'].space]
|
||||
else:
|
||||
data = data.filter(**{'__'.join(self.child.Meta.model.get_space_key()): self.context['request'].space})
|
||||
iterable = data.all() if hasattr(data, 'all') else data
|
||||
if isinstance(iterable, list) or (isinstance(iterable, QuerySet) and getattr(iterable, '_result_cache', None) is not None):
|
||||
keys = self.child.Meta.model.get_space_key()
|
||||
if keys == ('space',):
|
||||
data = [d for d in iterable if getattr(d, 'space_id') == self.context['request'].space.id]
|
||||
else:
|
||||
# use cached results here too, just dont have time to test this now, probably obj.get_space()
|
||||
data = data.filter(**{'__'.join(self.child.Meta.model.get_space_key()): self.context['request'].space})
|
||||
else:
|
||||
data = data.filter(**{'__'.join(self.child.Meta.model.get_space_key()): self.context['request'].space})
|
||||
return super().to_representation(data)
|
||||
|
||||
|
||||
@@ -484,6 +511,20 @@ class SpacedModelSerializer(serializers.ModelSerializer):
|
||||
return super().create(validated_data)
|
||||
|
||||
|
||||
class ShoppingListSerializer(SpacedModelSerializer, WritableNestedModelSerializer):
|
||||
|
||||
def create(self, validated_data):
|
||||
validated_data['name'] = validated_data['name'].strip()
|
||||
space = validated_data.pop('space', self.context['request'].space)
|
||||
obj, created = ShoppingList.objects.get_or_create(name__iexact=validated_data['name'], space=space, defaults=validated_data)
|
||||
return obj
|
||||
|
||||
class Meta:
|
||||
model = ShoppingList
|
||||
fields = ('id', 'name', 'description', 'color',) # returning dates breaks breaks shopping list deviceSetting save due to date retrieved from local storage as string
|
||||
read_only_fields = ('id',)
|
||||
|
||||
|
||||
class MealTypeSerializer(SpacedModelSerializer, WritableNestedModelSerializer):
|
||||
|
||||
def create(self, validated_data):
|
||||
@@ -533,7 +574,7 @@ class UserPreferenceSerializer(WritableNestedModelSerializer):
|
||||
'ingredient_decimals', 'comments', 'shopping_auto_sync', 'mealplan_autoadd_shopping',
|
||||
'food_inherit_default', 'default_delay',
|
||||
'mealplan_autoinclude_related', 'mealplan_autoexclude_onhand', 'shopping_share', 'shopping_recent_days',
|
||||
'csv_delim', 'csv_prefix',
|
||||
'csv_delim', 'csv_prefix', 'shopping_update_food_lists',
|
||||
'filter_to_supermarket', 'shopping_add_onhand', 'left_handed', 'show_step_ingredients',
|
||||
'food_children_exist'
|
||||
)
|
||||
@@ -648,7 +689,7 @@ class KeywordLabelSerializer(serializers.ModelSerializer):
|
||||
|
||||
@extend_schema_field(str)
|
||||
def get_label(self, obj):
|
||||
return str(obj)
|
||||
return obj.name
|
||||
|
||||
class Meta:
|
||||
list_serializer_class = SpaceFilterSerializer
|
||||
@@ -665,7 +706,7 @@ class KeywordSerializer(UniqueFieldsMixin, ExtendedRecipeMixin):
|
||||
|
||||
@extend_schema_field(str)
|
||||
def get_label(self, obj):
|
||||
return str(obj)
|
||||
return obj.name
|
||||
|
||||
def create(self, validated_data):
|
||||
# since multi select tags dont have id's
|
||||
@@ -740,8 +781,9 @@ class SupermarketCategoryRelationSerializer(WritableNestedModelSerializer):
|
||||
fields = ('id', 'category', 'supermarket', 'order')
|
||||
|
||||
|
||||
class SupermarketSerializer(UniqueFieldsMixin, SpacedModelSerializer, OpenDataModelMixin):
|
||||
class SupermarketSerializer(UniqueFieldsMixin, SpacedModelSerializer, WritableNestedModelSerializer, OpenDataModelMixin):
|
||||
category_to_supermarket = SupermarketCategoryRelationSerializer(many=True, read_only=True)
|
||||
shopping_lists = ShoppingListSerializer(many=True, required=False)
|
||||
|
||||
def create(self, validated_data):
|
||||
validated_data['name'] = validated_data['name'].strip()
|
||||
@@ -752,7 +794,7 @@ class SupermarketSerializer(UniqueFieldsMixin, SpacedModelSerializer, OpenDataMo
|
||||
|
||||
class Meta:
|
||||
model = Supermarket
|
||||
fields = ('id', 'name', 'description', 'category_to_supermarket', 'open_data_slug')
|
||||
fields = ('id', 'name', 'description', 'shopping_lists', 'category_to_supermarket', 'open_data_slug')
|
||||
|
||||
|
||||
class PropertyTypeSerializer(OpenDataModelMixin, WritableNestedModelSerializer, UniqueFieldsMixin):
|
||||
@@ -836,7 +878,7 @@ class FoodSerializer(UniqueFieldsMixin, WritableNestedModelSerializer, ExtendedR
|
||||
substitute_onhand = serializers.SerializerMethodField('get_substitute_onhand')
|
||||
substitute = FoodSimpleSerializer(many=True, allow_null=True, required=False)
|
||||
parent = IntegerField(read_only=True)
|
||||
|
||||
shopping_lists = ShoppingListSerializer(many=True, required=False)
|
||||
properties = PropertySerializer(many=True, allow_null=True, required=False)
|
||||
properties_food_unit = UnitSerializer(allow_null=True, required=False)
|
||||
properties_food_amount = CustomDecimalField(required=False)
|
||||
@@ -947,7 +989,7 @@ class FoodSerializer(UniqueFieldsMixin, WritableNestedModelSerializer, ExtendedR
|
||||
fields = (
|
||||
'id', 'name', 'plural_name', 'description', 'shopping', 'recipe', 'url', 'properties', 'properties_food_amount', 'properties_food_unit', 'fdc_id',
|
||||
'food_onhand', 'supermarket_category', 'image', 'parent', 'numchild', 'numrecipe', 'inherit_fields', 'full_name', 'ignore_shopping',
|
||||
'substitute', 'substitute_siblings', 'substitute_children', 'substitute_onhand', 'child_inherit_fields', 'open_data_slug',
|
||||
'substitute', 'substitute_siblings', 'substitute_children', 'substitute_onhand', 'child_inherit_fields', 'open_data_slug', 'shopping_lists',
|
||||
)
|
||||
read_only_fields = ('id', 'numchild', 'parent', 'image', 'numrecipe')
|
||||
|
||||
@@ -1327,7 +1369,7 @@ class MealPlanSerializer(SpacedModelSerializer, WritableNestedModelSerializer):
|
||||
|
||||
@extend_schema_field(bool)
|
||||
def in_shopping(self, obj):
|
||||
return ShoppingListRecipe.objects.filter(mealplan=obj.id).exists()
|
||||
return obj.shoppinglistrecipe_set.count() > 0
|
||||
|
||||
def create(self, validated_data):
|
||||
validated_data['created_by'] = self.context['request'].user
|
||||
@@ -1393,13 +1435,23 @@ class ShoppingListRecipeSerializer(serializers.ModelSerializer):
|
||||
|
||||
class Meta:
|
||||
model = ShoppingListRecipe
|
||||
fields = ('id', 'name', 'recipe', 'recipe_data', 'mealplan', 'meal_plan_data', 'servings', 'created_by',)
|
||||
fields = ('id', 'name', 'recipe', 'recipe_data', 'meal_plan_data', 'mealplan', 'servings', 'created_by',)
|
||||
read_only_fields = ('id', 'created_by',)
|
||||
|
||||
|
||||
class FoodShoppingSerializer(serializers.ModelSerializer):
|
||||
supermarket_category = SupermarketCategorySerializer(read_only=True)
|
||||
shopping_lists = ShoppingListSerializer(read_only=True, many=True)
|
||||
|
||||
class Meta:
|
||||
model = Food
|
||||
fields = ('id', 'name', 'plural_name', 'supermarket_category', 'shopping_lists')
|
||||
|
||||
|
||||
class ShoppingListEntrySerializer(WritableNestedModelSerializer):
|
||||
food = FoodSerializer(allow_null=True)
|
||||
food = FoodShoppingSerializer(allow_null=True)
|
||||
unit = UnitSerializer(allow_null=True, required=False)
|
||||
shopping_lists = ShoppingListSerializer(many=True, required=False)
|
||||
list_recipe_data = ShoppingListRecipeSerializer(source='list_recipe', read_only=True)
|
||||
amount = CustomDecimalField()
|
||||
created_by = UserSerializer(read_only=True)
|
||||
@@ -1448,7 +1500,13 @@ class ShoppingListEntrySerializer(WritableNestedModelSerializer):
|
||||
created_by=self.context['request'].user)
|
||||
del validated_data['mealplan_id']
|
||||
|
||||
return super().create(validated_data)
|
||||
obj = super().create(validated_data)
|
||||
|
||||
if self.context['request'].user.userpreference.shopping_update_food_lists:
|
||||
obj.shopping_lists.clear()
|
||||
obj.shopping_lists.set(obj.food.shopping_lists.all())
|
||||
|
||||
return obj
|
||||
|
||||
def update(self, instance, validated_data):
|
||||
user = self.context['request'].user
|
||||
@@ -1468,7 +1526,7 @@ class ShoppingListEntrySerializer(WritableNestedModelSerializer):
|
||||
class Meta:
|
||||
model = ShoppingListEntry
|
||||
fields = (
|
||||
'id', 'list_recipe', 'food', 'unit', 'amount', 'order', 'checked', 'ingredient',
|
||||
'id', 'list_recipe', 'shopping_lists', 'food', 'unit', 'amount', 'order', 'checked', 'ingredient',
|
||||
'list_recipe_data', 'created_by', 'created_at', 'updated_at', 'completed_at', 'delay_until', 'mealplan_id'
|
||||
)
|
||||
read_only_fields = ('id', 'created_by', 'created_at')
|
||||
@@ -1729,6 +1787,7 @@ class GenericModelReferenceSerializer(serializers.Serializer):
|
||||
model = serializers.CharField()
|
||||
name = serializers.CharField()
|
||||
|
||||
|
||||
# Export/Import Serializers
|
||||
|
||||
class KeywordExportSerializer(KeywordSerializer):
|
||||
|
||||
@@ -99,19 +99,19 @@ def test_list_filter(obj_1, u1_s1):
|
||||
|
||||
response = json.loads(
|
||||
u1_s1.get(
|
||||
f'{reverse(LIST_URL)}?from_date={(timezone.now() + timedelta(days=2)).strftime("%Y-%m-%d")}'
|
||||
f'{reverse(LIST_URL)}?from_date={(timezone.localtime(timezone.now()) + timedelta(days=1)).strftime("%Y-%m-%d")}'
|
||||
).content)['results']
|
||||
assert len(response) == 0
|
||||
|
||||
response = json.loads(
|
||||
u1_s1.get(
|
||||
f'{reverse(LIST_URL)}?to_date={(timezone.now() - timedelta(days=2)).strftime("%Y-%m-%d")}'
|
||||
f'{reverse(LIST_URL)}?to_date={(timezone.localtime(timezone.now()) - timedelta(days=1)).strftime("%Y-%m-%d")}'
|
||||
).content)['results']
|
||||
assert len(response) == 0
|
||||
|
||||
response = json.loads(
|
||||
u1_s1.get(
|
||||
f'{reverse(LIST_URL)}?from_date={(timezone.now() - timedelta(days=2)).strftime("%Y-%m-%d")}&to_date={(timezone.now() + timedelta(days=2)).strftime("%Y-%m-%d")}'
|
||||
f'{reverse(LIST_URL)}?from_date={(timezone.localtime(timezone.now()) - timedelta(days=1)).strftime("%Y-%m-%d")}&to_date={(timezone.localtime(timezone.now()) + timedelta(days=1)).strftime("%Y-%m-%d")}'
|
||||
).content)['results']
|
||||
assert len(response) == 1
|
||||
|
||||
@@ -153,8 +153,8 @@ def test_add(arg, request, u1_s2, recipe_1_s1, meal_type):
|
||||
'id': meal_type.id,
|
||||
'name': meal_type.name
|
||||
},
|
||||
'from_date': (timezone.now()).strftime("%Y-%m-%d"),
|
||||
'to_date': (timezone.now()).strftime("%Y-%m-%d"),
|
||||
'from_date': (timezone.localtime(timezone.now())).strftime("%Y-%m-%d"),
|
||||
'to_date': (timezone.localtime(timezone.now())).strftime("%Y-%m-%d"),
|
||||
'servings': 1,
|
||||
'title': 'test',
|
||||
'shared': []
|
||||
@@ -196,8 +196,8 @@ def test_add_with_shopping(u1_s1, meal_type):
|
||||
'id': meal_type.id,
|
||||
'name': meal_type.name
|
||||
},
|
||||
'from_date': (timezone.now()).strftime("%Y-%m-%d"),
|
||||
'to_date': (timezone.now()).strftime("%Y-%m-%d"),
|
||||
'from_date': (timezone.localtime(timezone.now())).strftime("%Y-%m-%d"),
|
||||
'to_date': (timezone.localtime(timezone.now())).strftime("%Y-%m-%d"),
|
||||
'servings': 1,
|
||||
'title': 'test',
|
||||
'shared': [],
|
||||
@@ -212,13 +212,13 @@ def test_add_with_shopping(u1_s1, meal_type):
|
||||
|
||||
@pytest.mark.parametrize("arg", [
|
||||
['', 2],
|
||||
[f'?from_date={timezone.now().strftime("%Y-%m-%d")}', 1],
|
||||
[f'?from_date={timezone.localtime(timezone.now()).strftime("%Y-%m-%d")}', 1],
|
||||
[
|
||||
f'?to_date={(timezone.now() - timedelta(days=1)).strftime("%Y-%m-%d")}',
|
||||
f'?to_date={(timezone.localtime(timezone.now()) - timedelta(days=1)).strftime("%Y-%m-%d")}',
|
||||
1
|
||||
],
|
||||
[
|
||||
f'?from_date={(timezone.now() + timedelta(days=2)).strftime("%Y-%m-%d")}&to_date={(timezone.now() + timedelta(days=2)).strftime("%Y-%m-%d")}',
|
||||
f'?from_date={(timezone.localtime(timezone.now()) + timedelta(days=1)).strftime("%Y-%m-%d")}&to_date={(timezone.localtime(timezone.now()) + timedelta(days=1)).strftime("%Y-%m-%d")}',
|
||||
0
|
||||
],
|
||||
])
|
||||
|
||||
@@ -185,3 +185,32 @@ def test_unit_conversions(space_1, space_2, u1_s1):
|
||||
assert next(x for x in conversions if x.unit == unit_kg_space_2) is not None
|
||||
assert abs(next(x for x in conversions if x.unit == unit_kg_space_2).amount - Decimal(0.1)) < 0.0001
|
||||
print(conversions)
|
||||
|
||||
def test_conversion_with_zero(space_1, space_2, u1_s1):
|
||||
with scopes_disabled():
|
||||
uch = UnitConversionHelper(space_1)
|
||||
|
||||
unit_gram = Unit.objects.create(name='gram', base_unit='g', space=space_1)
|
||||
unit_fantasy = Unit.objects.create(name='Fantasy Unit', base_unit=None, space=space_1)
|
||||
|
||||
food_1 = Food.objects.create(name='Test Food 1', space=space_1)
|
||||
|
||||
ingredient_food_1_gram = Ingredient.objects.create(
|
||||
food=food_1,
|
||||
unit=unit_gram,
|
||||
amount=100,
|
||||
space=space_1,
|
||||
)
|
||||
|
||||
print('\n----------- TEST BASE CUSTOM CONVERSION - TO CUSTOM CONVERSION ---------------')
|
||||
UnitConversion.objects.create(
|
||||
base_amount=0,
|
||||
base_unit=unit_gram,
|
||||
converted_amount=0,
|
||||
converted_unit=unit_fantasy,
|
||||
space=space_1,
|
||||
created_by=auth.get_user(u1_s1),
|
||||
)
|
||||
conversions = uch.get_conversions(ingredient_food_1_gram)
|
||||
|
||||
assert len(conversions) == 1 # conversion always includes the ingredient, if count is 1 no other conversion was found
|
||||
|
||||
@@ -40,6 +40,7 @@ router.register(r'recipe-book-entry', api.RecipeBookEntryViewSet)
|
||||
router.register(r'unit-conversion', api.UnitConversionViewSet)
|
||||
router.register(r'property-type', api.PropertyTypeViewSet) # NOTE: if regenerating the legacy API these need renamed to food-property
|
||||
router.register(r'property', api.PropertyViewSet)
|
||||
router.register(r'shopping-list', api.ShoppingListViewSet)
|
||||
router.register(r'shopping-list-entry', api.ShoppingListEntryViewSet)
|
||||
router.register(r'shopping-list-recipe', api.ShoppingListRecipeViewSet)
|
||||
router.register(r'space', api.SpaceViewSet)
|
||||
|
||||
@@ -88,7 +88,7 @@ from cookbook.models import (Automation, BookmarkletImport, ConnectorConfig, Coo
|
||||
RecipeBookEntry, ShareLink, ShoppingListEntry,
|
||||
ShoppingListRecipe, Space, Step, Storage, Supermarket, SupermarketCategory,
|
||||
SupermarketCategoryRelation, Sync, SyncLog, Unit, UnitConversion,
|
||||
UserFile, UserPreference, UserSpace, ViewLog, RecipeImport, SearchPreference, SearchFields, AiLog, AiProvider
|
||||
UserFile, UserPreference, UserSpace, ViewLog, RecipeImport, SearchPreference, SearchFields, AiLog, AiProvider, ShoppingList
|
||||
)
|
||||
from cookbook.provider.dropbox import Dropbox
|
||||
from cookbook.provider.local import Local
|
||||
@@ -114,7 +114,7 @@ from cookbook.serializer import (AccessTokenSerializer, AutomationSerializer, Au
|
||||
LocalizationSerializer, ServerSettingsSerializer, RecipeFromSourceResponseSerializer, ShoppingListEntryBulkCreateSerializer, FdcQuerySerializer,
|
||||
AiImportSerializer, ImportOpenDataSerializer, ImportOpenDataMetaDataSerializer, ImportOpenDataResponseSerializer, ExportRequestSerializer,
|
||||
RecipeImportSerializer, ConnectorConfigSerializer, SearchPreferenceSerializer, SearchFieldsSerializer, RecipeBatchUpdateSerializer,
|
||||
AiProviderSerializer, AiLogSerializer, FoodBatchUpdateSerializer, GenericModelReferenceSerializer
|
||||
AiProviderSerializer, AiLogSerializer, FoodBatchUpdateSerializer, GenericModelReferenceSerializer, ShoppingListSerializer
|
||||
)
|
||||
from cookbook.version_info import TANDOOR_VERSION
|
||||
from cookbook.views.import_export import get_integration
|
||||
@@ -307,7 +307,8 @@ class FuzzyFilterMixin(viewsets.ModelViewSet, ExtendedRecipeMixin):
|
||||
filter = Q(name__icontains=query)
|
||||
if self.request.user.is_authenticated:
|
||||
if any([self.model.__name__.lower() in x for x in
|
||||
self.request.user.searchpreference.unaccent.values_list('field', flat=True)]):
|
||||
self.request.user.searchpreference.unaccent.values_list('field', flat=True)]) and (
|
||||
settings.DATABASES['default']['ENGINE'] == 'django.db.backends.postgresql'):
|
||||
filter |= Q(name__unaccent__icontains=query)
|
||||
|
||||
self.queryset = (
|
||||
@@ -372,11 +373,16 @@ class MergeMixin(ViewSetMixin):
|
||||
isTree = False
|
||||
|
||||
try:
|
||||
# TODO these checks could be improved to merge existing properties and conversion in a smart way. For now it will just loose them to prevent duplicates
|
||||
if isinstance(source, Food):
|
||||
source.properties.all().delete()
|
||||
source.properties.clear()
|
||||
UnitConversion.objects.filter(food=source).delete()
|
||||
|
||||
if isinstance(source, Unit):
|
||||
UnitConversion.objects.filter(base_unit=source).delete()
|
||||
UnitConversion.objects.filter(converted_unit=source).delete()
|
||||
|
||||
for link in [field for field in source._meta.get_fields() if issubclass(type(field), ForeignObjectRel)]:
|
||||
linkManager = getattr(source, link.get_accessor_name())
|
||||
related = linkManager.all()
|
||||
@@ -1125,7 +1131,7 @@ class FoodViewSet(LoggingMixin, TreeMixin, DeleteRelationMixing):
|
||||
"type": "text",
|
||||
"text": "Given the following food and the following different types of properties please update the food so that the properties attribute contains a list with all property types in the following format [{property_amount: <the property value>, property_type: {id: <the ID of the property type>, name: <the name of the property type>}}]."
|
||||
"The property values should be in the unit given in the property type and for the amount specified in the properties_food_amount attribute of the food, which is given in the properties_food_unit."
|
||||
"property_amount is a decimal number. Please try to keep a percision of two decimal places if given in your source data."
|
||||
"property_amount is a decimal number. Please try to keep a precision of two decimal places if given in your source data."
|
||||
"Do not make up any data. If there is no data available for the given property type that is ok, just return null as a property_amount for that property type. Do not change anything else!"
|
||||
"Most property types are likely going to be nutritional values. Please do not make up any values, only return values you can find in the sources available to you."
|
||||
"Only return values if you are sure they are meant for the food given. Under no circumstance are you allowed to change any other value of the given food or change the structure in any way or form."
|
||||
@@ -1805,6 +1811,82 @@ class RecipeViewSet(LoggingMixin, viewsets.ModelViewSet, DeleteRelationMixing):
|
||||
|
||||
return Response(serializer.errors, 400)
|
||||
|
||||
@extend_schema(
|
||||
parameters=[
|
||||
OpenApiParameter(name='provider', description='ID of the AI provider that should be used for this AI request', type=int),
|
||||
]
|
||||
)
|
||||
@decorators.action(detail=True, methods=['POST'], )
|
||||
def aiproperties(self, request, pk):
|
||||
serializer = RecipeSerializer(data=request.data, partial=True, context={'request': request})
|
||||
if serializer.is_valid():
|
||||
|
||||
if not request.query_params.get('provider', None) or not re.match(r'^(\d)+$', request.query_params.get('provider', None)):
|
||||
response = {
|
||||
'error': True,
|
||||
'msg': _('You must select an AI provider to perform your request.'),
|
||||
}
|
||||
return Response(response, status=status.HTTP_400_BAD_REQUEST)
|
||||
|
||||
if not can_perform_ai_request(request.space):
|
||||
response = {
|
||||
'error': True,
|
||||
'msg': _("You don't have any credits remaining to use AI or AI features are not enabled for your space."),
|
||||
}
|
||||
return Response(response, status=status.HTTP_400_BAD_REQUEST)
|
||||
|
||||
ai_provider = AiProvider.objects.filter(pk=request.query_params.get('provider')).filter(Q(space=request.space) | Q(space__isnull=True)).first()
|
||||
|
||||
litellm.callbacks = [AiCallbackHandler(request.space, request.user, ai_provider, AiLog.F_RECIPE_PROPERTIES)]
|
||||
|
||||
property_type_list = list(PropertyType.objects.filter(space=request.space).values('id', 'name', 'description', 'unit', 'category', 'fdc_id'))
|
||||
messages = [
|
||||
{
|
||||
"role": "user",
|
||||
"content": [
|
||||
{
|
||||
"type": "text",
|
||||
"text": "Given the following recipe and the following different types of properties please update the recipe so that the properties attribute contains a list with all property types in the following format [{property_amount: <the property value>, property_type: {id: <the ID of the property type>, name: <the name of the property type>}}]."
|
||||
"The property values should be in the unit given in the property type and calculated based on the total quantity of the foods used for the recipe."
|
||||
"property_amount is a decimal number. Please try to keep a precision of two decimal places if given in your source data."
|
||||
"Do not make up any data. If there is no data available for the given property type that is ok, just return null as a property_amount for that property type. Do not change anything else!"
|
||||
"Most property types are likely going to be nutritional values. Please do not make up any values, only return values you can find in the sources available to you."
|
||||
"Under no circumstance are you allowed to change any other value of the given food or change the structure in any way or form."
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"text": json.dumps(request.data)
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"text": json.dumps(property_type_list)
|
||||
},
|
||||
]
|
||||
},
|
||||
]
|
||||
|
||||
try:
|
||||
ai_request = {
|
||||
'api_key': ai_provider.api_key,
|
||||
'model': ai_provider.model_name,
|
||||
'response_format': {"type": "json_object"},
|
||||
'messages': messages,
|
||||
}
|
||||
if ai_provider.url:
|
||||
ai_request['api_base'] = ai_provider.url
|
||||
ai_response = completion(**ai_request)
|
||||
|
||||
response_text = ai_response.choices[0].message.content
|
||||
|
||||
return Response(json.loads(response_text), status=status.HTTP_200_OK)
|
||||
except BadRequestError as err:
|
||||
pass
|
||||
response = {
|
||||
'error': True,
|
||||
'msg': 'The AI could not process your request. \n\n' + err.message,
|
||||
}
|
||||
return Response(response, status=status.HTTP_400_BAD_REQUEST)
|
||||
|
||||
@extend_schema(responses=RecipeSerializer(many=False))
|
||||
@decorators.action(detail=True, pagination_class=None, methods=['PATCH'], serializer_class=RecipeSerializer)
|
||||
def delete_external(self, request, pk):
|
||||
@@ -1910,25 +1992,39 @@ class ShoppingListRecipeViewSet(LoggingMixin, viewsets.ModelViewSet):
|
||||
if serializer.is_valid():
|
||||
entries = []
|
||||
for e in serializer.validated_data['entries']:
|
||||
entries.append(
|
||||
ShoppingListEntry(
|
||||
list_recipe_id=obj.pk,
|
||||
amount=e['amount'],
|
||||
unit_id=e['unit_id'],
|
||||
food_id=e['food_id'],
|
||||
ingredient_id=e['ingredient_id'],
|
||||
created_by_id=request.user.id,
|
||||
space_id=request.space.id,
|
||||
)
|
||||
entry = ShoppingListEntry(
|
||||
list_recipe_id=obj.pk,
|
||||
amount=e['amount'],
|
||||
unit_id=e['unit_id'],
|
||||
food_id=e['food_id'],
|
||||
ingredient_id=e['ingredient_id'],
|
||||
created_by_id=request.user.id,
|
||||
space_id=request.space.id,
|
||||
)
|
||||
entries.append(entry)
|
||||
|
||||
ShoppingListEntry.objects.bulk_create(entries)
|
||||
for e in entries:
|
||||
if e.food.shopping_lists.count() > 0:
|
||||
e.shopping_lists.set(e.food.shopping_lists.all())
|
||||
|
||||
ConnectorManager.add_work(ActionType.CREATED, *entries)
|
||||
return Response(serializer.validated_data)
|
||||
else:
|
||||
return Response(serializer.errors, 400)
|
||||
|
||||
|
||||
class ShoppingListViewSet(LoggingMixin, viewsets.ModelViewSet, DeleteRelationMixing):
|
||||
queryset = ShoppingList.objects
|
||||
serializer_class = ShoppingListSerializer
|
||||
permission_classes = [CustomIsUser & CustomTokenHasReadWriteScope]
|
||||
pagination_class = DefaultPagination
|
||||
|
||||
def get_queryset(self):
|
||||
queryset = self.queryset.filter(space=self.request.space).all()
|
||||
return queryset
|
||||
|
||||
|
||||
@extend_schema_view(list=extend_schema(parameters=[
|
||||
OpenApiParameter(name='updated_after',
|
||||
description=_('Returns only elements updated after the given timestamp in ISO 8601 format.'),
|
||||
@@ -1948,19 +2044,23 @@ class ShoppingListEntryViewSet(LoggingMixin, viewsets.ModelViewSet):
|
||||
def get_queryset(self):
|
||||
self.queryset = self.queryset.filter(space=self.request.space)
|
||||
|
||||
# select_related("list_recipe")
|
||||
self.queryset = self.queryset.filter(
|
||||
Q(created_by=self.request.user)
|
||||
| Q(created_by__in=list(self.request.user.get_shopping_share()))).prefetch_related('created_by', 'food',
|
||||
'food__properties',
|
||||
'food__properties__property_type',
|
||||
'food__inherit_fields',
|
||||
'food__supermarket_category',
|
||||
'food__onhand_users',
|
||||
'food__substitute',
|
||||
'food__child_inherit_fields',
|
||||
'unit', 'list_recipe',
|
||||
| Q(created_by__in=list(self.request.user.get_shopping_share()))).prefetch_related('created_by',
|
||||
'food',
|
||||
'food__shopping_lists',
|
||||
'shopping_lists',
|
||||
'unit',
|
||||
'list_recipe',
|
||||
'list_recipe__recipe__keywords',
|
||||
'list_recipe__recipe__created_by',
|
||||
'list_recipe__mealplan',
|
||||
'list_recipe__mealplan__shared',
|
||||
'list_recipe__mealplan__shared__userspace_set',
|
||||
'list_recipe__mealplan__shoppinglistrecipe_set',
|
||||
'list_recipe__mealplan__recipe',
|
||||
'list_recipe__mealplan__recipe__keywords',
|
||||
).distinct().all()
|
||||
|
||||
updated_after = self.request.query_params.get('updated_after', None)
|
||||
@@ -2481,6 +2581,13 @@ class AiImportView(APIView):
|
||||
'msg': "Error parsing AI results. Response Text:\n\n" + response_text
|
||||
}
|
||||
return Response(RecipeFromSourceResponseSerializer(context={'request': request}).to_representation(response), status=status.HTTP_400_BAD_REQUEST)
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
response = {
|
||||
'error': True,
|
||||
'msg': "Error processing AI results. Response Text:\n\n" + response_text + "\n\n" + traceback.format_exc()
|
||||
}
|
||||
return Response(RecipeFromSourceResponseSerializer(context={'request': request}).to_representation(response), status=status.HTTP_400_BAD_REQUEST)
|
||||
else:
|
||||
response = {
|
||||
'error': True,
|
||||
@@ -2968,11 +3075,20 @@ def meal_plans_to_ical(queryset, filename):
|
||||
for p in queryset:
|
||||
event = Event()
|
||||
event['uid'] = p.id
|
||||
event.add('dtstart', p.from_date)
|
||||
|
||||
start_date_time = p.from_date
|
||||
end_date_time = p.from_date
|
||||
|
||||
if p.to_date:
|
||||
event.add('dtend', p.to_date)
|
||||
else:
|
||||
event.add('dtend', p.from_date)
|
||||
end_date_time = p.to_date
|
||||
|
||||
if p.meal_type.time:
|
||||
start_date_time = datetime.datetime.combine(p.from_date, p.meal_type.time)
|
||||
end_date_time = datetime.datetime.combine(p.to_date, p.meal_type.time) + datetime.timedelta(minutes=60)
|
||||
|
||||
event.add('dtstart', start_date_time)
|
||||
event.add('dtend', end_date_time)
|
||||
|
||||
event['summary'] = f'{p.meal_type.name}: {p.get_label()}'
|
||||
event['description'] = p.note
|
||||
cal.add_component(event)
|
||||
|
||||
@@ -43,7 +43,10 @@ def index(request, path=None, resource=None):
|
||||
return HttpResponseRedirect(reverse_lazy('view_setup'))
|
||||
|
||||
if 'signup_token' in request.session:
|
||||
return HttpResponseRedirect(reverse('view_invite', args=[request.session.pop('signup_token', '')]))
|
||||
value = request.session['signup_token']
|
||||
del request.session['signup_token']
|
||||
request.session.modified = True
|
||||
return HttpResponseRedirect(reverse('view_invite', args=[value]))
|
||||
|
||||
if request.user.is_authenticated or re.search(r'/recipe/\d+/', request.path[:512]) and request.GET.get('share'):
|
||||
return render(request, 'frontend/tandoor.html', {})
|
||||
|
||||
@@ -33,4 +33,4 @@ Convert pictures of recipes to a structure that can be imported to Tandoor with
|
||||
|
||||
Maintained by [smilerz](https://github.com/smilerz/tandoor-menu-generator)
|
||||
|
||||
Generate a mealplan tbased on complex criteria and optionally insert it into an SVG menu template.
|
||||
Generate a meal plan based on complex criteria and optionally insert it into an SVG menu template.
|
||||
|
||||
@@ -36,7 +36,7 @@ then make sure you have set [all required headers](install/docker.md#required-he
|
||||
If that doesn't fix it, you can also refer to the appropriate sub section in the [reverse proxy documentation](install/docker.md#reverse-proxy) and verify your general webserver configuration.
|
||||
|
||||
### Required Headers
|
||||
Navigate to `/system` and review the headers listed in the DEBUG section. At a minimum, if you are using a reverse proxy the headers must match the below conditions.
|
||||
Navigate to `/system/` and review the headers listed in the DEBUG section. At a minimum, if you are using a reverse proxy the headers must match the below conditions.
|
||||
|
||||
| Header | Requirement |
|
||||
| :--- | :---- |
|
||||
|
||||
@@ -15,14 +15,14 @@
|
||||
<a href="https://discord.gg/RhzBrfWgtp" target="_blank" rel="noopener noreferrer"><img src="https://badgen.net/badge/icon/discord?icon=discord&label" ></a>
|
||||
<a href="https://hub.docker.com/r/vabene1111/recipes" target="_blank" rel="noopener noreferrer"><img src="https://img.shields.io/docker/pulls/vabene1111/recipes" ></a>
|
||||
<a href="https://github.com/vabene1111/recipes/releases/latest" rel="noopener noreferrer"><img src="https://img.shields.io/github/v/release/vabene1111/recipes" ></a>
|
||||
<a href="https://app.tandoor.dev/accounts/login/?demo" rel="noopener noreferrer"><img src="https://img.shields.io/badge/demo-available-success" ></a>
|
||||
<a href="https://app.tandoor.dev/e/demo-auto-login/" rel="noopener noreferrer"><img src="https://img.shields.io/badge/demo-available-success" ></a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://tandoor.dev" target="_blank" rel="noopener noreferrer">Website</a> •
|
||||
<a href="https://docs.tandoor.dev/install/docker/" target="_blank" rel="noopener noreferrer">Installation</a> •
|
||||
<a href="https://docs.tandoor.dev/" target="_blank" rel="noopener noreferrer">Docs</a> •
|
||||
<a href="https://app.tandoor.dev/accounts/login/?demo" target="_blank" rel="noopener noreferrer">Demo</a> •
|
||||
<a href="https://app.tandoor.dev/e/demo-auto-login/" target="_blank" rel="noopener noreferrer">Demo</a> •
|
||||
<a href="https://community.tandoor.dev" target="_blank" rel="noopener noreferrer">Community</a> •
|
||||
<a href="https://discord.gg/RhzBrfWgtp" target="_blank" rel="noopener noreferrer">Discord</a>
|
||||
</p>
|
||||
|
||||
@@ -69,8 +69,6 @@ wget https://raw.githubusercontent.com/vabene1111/recipes/develop/docs/install/d
|
||||
|
||||
Most deployments will likely use a reverse proxy.
|
||||
|
||||
If your reverse proxy is not listed below, please refer to chapter [Others](#others).
|
||||
|
||||
#### **Traefik**
|
||||
|
||||
If you use Traefik, this configuration is the one for you.
|
||||
@@ -115,6 +113,17 @@ wget https://raw.githubusercontent.com/vabene1111/recipes/develop/docs/install/d
|
||||
{% include "./docker/nginx-proxy/docker-compose.yml" %}
|
||||
~~~
|
||||
|
||||
|
||||
#### **Apache proxy**
|
||||
|
||||
If you use Apache as a reverse proxy, this configuration is the one for you.
|
||||
|
||||
~~~yaml
|
||||
{% include "./docker/apache-proxy/docker-compose.yml" %}
|
||||
~~~
|
||||
|
||||
Keep in mind, that the port configured for the service `web_recipes` should be the same as in chapter [Required Headers: Apache](#apache).
|
||||
|
||||
## **DockSTARTer**
|
||||
|
||||
The main goal of [DockSTARTer](https://dockstarter.com/) is to make it quick and easy to get up and running with Docker.
|
||||
@@ -139,7 +148,8 @@ if you manually change it/bind the folder as a volume.
|
||||
|
||||
Please be sure to supply all required headers in your nginx/Apache/Caddy/... configuration!
|
||||
|
||||
nginx:
|
||||
#### **nginx**
|
||||
|
||||
```nginx
|
||||
location / {
|
||||
proxy_set_header Host $http_host; # try $host instead if this doesn't work
|
||||
@@ -149,7 +159,8 @@ location / {
|
||||
}
|
||||
```
|
||||
|
||||
Apache:
|
||||
#### **Apache**
|
||||
|
||||
```apache
|
||||
RequestHeader set X-Forwarded-Proto "https"
|
||||
Header always set Access-Control-Allow-Origin "*"
|
||||
|
||||
24
docs/install/docker/apache-proxy/docker-compose.yml
Normal file
24
docs/install/docker/apache-proxy/docker-compose.yml
Normal file
@@ -0,0 +1,24 @@
|
||||
services:
|
||||
db_recipes:
|
||||
restart: always
|
||||
image: postgres:16-alpine
|
||||
volumes:
|
||||
- ./postgresql:/var/lib/postgresql/data
|
||||
env_file:
|
||||
- ./.env
|
||||
|
||||
web_recipes:
|
||||
restart: always
|
||||
image: vabene1111/recipes
|
||||
ports:
|
||||
- 127.0.0.1:8080:80 # replace port
|
||||
env_file:
|
||||
- ./.env
|
||||
volumes:
|
||||
- staticfiles:/opt/recipes/staticfiles
|
||||
- ./mediafiles:/opt/recipes/mediafiles
|
||||
depends_on:
|
||||
- db_recipes
|
||||
|
||||
volumes:
|
||||
staticfiles:
|
||||
@@ -3,7 +3,7 @@
|
||||
These instructions are inspired from a standard django/gunicorn/postgresql instructions ([for example](https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-16-04))
|
||||
|
||||
!!! warning
|
||||
Make sure to use at least Python 3.10 (although 3.12 is preferred) or higher, and ensure that `pip` is associated with Python 3. Depending on your system configuration, using `python` or `pip` might default to Python 2. Make sure your machine has at least 2048 MB of memory; otherwise, the `yarn build` process may fail with the error: `FATAL ERROR: Reached heap limit - Allocation failed: JavaScript heap out of memory`.
|
||||
Make sure to use at least Python 3.12 or higher, and ensure that `pip` is associated with Python 3. Depending on your system configuration, using `python` or `pip` might default to Python 2. Make sure your machine has at least 2048 MB of memory; otherwise, the `yarn build` process may fail with the error: `FATAL ERROR: Reached heap limit - Allocation failed: JavaScript heap out of memory`.
|
||||
|
||||
!!! warning
|
||||
These instructions are **not** regularly reviewed and might be outdated.
|
||||
@@ -77,10 +77,10 @@ Using binaries from the virtual env:
|
||||
/var/www/recipes/bin/pip3 install -r requirements.txt
|
||||
```
|
||||
|
||||
You will also need to install front end requirements and build them. For this navigate to the `./vue` folder and run
|
||||
You will also need to install front end requirements and build them. For this navigate to the `./vue3` folder and run
|
||||
|
||||
```shell
|
||||
cd ./vue
|
||||
cd ./vue3
|
||||
yarn install
|
||||
yarn build
|
||||
```
|
||||
@@ -224,7 +224,7 @@ bin/python3 manage.py migrate
|
||||
bin/python3 manage.py collectstatic --no-input
|
||||
bin/python3 manage.py collectstatic_js_reverse
|
||||
# change to frontend directory
|
||||
cd vue
|
||||
cd vue3
|
||||
# install and build frontend
|
||||
yarn install
|
||||
yarn build
|
||||
|
||||
@@ -96,12 +96,15 @@ Configuration options for serving related services.
|
||||
|
||||
#### Port
|
||||
|
||||
> default `8080` - options: `1-65535`
|
||||
> default `80` - options: `1-65535`
|
||||
|
||||
Port for gunicorn to bind to. Should not be changed if using docker stack with reverse proxy.
|
||||
!!! warning
|
||||
Changed in version 2.3 to no longer configure the port of gunicorn but the port of the internal nginx
|
||||
|
||||
Port where Tandoor exposes its internal web server.
|
||||
|
||||
```
|
||||
TANDOOR_PORT=8080
|
||||
TANDOOR_PORT=80
|
||||
```
|
||||
|
||||
|
||||
@@ -186,6 +189,19 @@ See [Gunicorn docs](https://docs.gunicorn.org/en/stable/design.html#how-many-wor
|
||||
GUNICORN_THREADS=2
|
||||
```
|
||||
|
||||
|
||||
#### Gunicorn Timeout
|
||||
|
||||
> default `30` - options `1-X`
|
||||
|
||||
Set the timeout in seconds of gunicorn when starting using `boot.sh` (all container installations).
|
||||
The default is likely appropriate for most installations. However, if you are using a LLM which high response times gunicornmight time out during the wait until the LLM finished, in such cases you might want to increase the timeout.
|
||||
See [Gunicorn docs]([https://docs.gunicorn.org/en/stable/design.html#how-many-workers](https://docs.gunicorn.org/en/stable/settings.html#timeout)) for default settings.
|
||||
|
||||
```
|
||||
GUNICORN_TIMEOUT=30
|
||||
```
|
||||
|
||||
#### Gunicorn Media
|
||||
|
||||
> default `0` - options `0`, `1`
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80 ipv6only=on;
|
||||
listen ${TANDOOR_PORT};
|
||||
listen [::]:${TANDOOR_PORT} ipv6only=on;
|
||||
server_name localhost;
|
||||
|
||||
client_max_body_size 128M;
|
||||
client_max_body_size 512M;
|
||||
|
||||
# serve media files
|
||||
location /media {
|
||||
@@ -19,7 +19,10 @@ server {
|
||||
# pass requests for dynamic content to gunicorn
|
||||
location / {
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_pass http://localhost:${TANDOOR_PORT};
|
||||
proxy_pass http://unix:/run/tandoor.sock;
|
||||
|
||||
# param needed by django allauth sessions to log IP
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
|
||||
# disabled for now because it redirects to the error page and not back, also not showing html
|
||||
#error_page 502 /errors/http502.html;
|
||||
|
||||
@@ -675,4 +675,4 @@ DISABLE_EXTERNAL_CONNECTORS = extract_bool('DISABLE_EXTERNAL_CONNECTORS', False)
|
||||
EXTERNAL_CONNECTORS_QUEUE_SIZE = int(os.getenv('EXTERNAL_CONNECTORS_QUEUE_SIZE', 100))
|
||||
|
||||
mimetypes.add_type("text/javascript", ".js", True)
|
||||
mimetypes.add_type("text/javascript", ".mjs", True)
|
||||
mimetypes.add_type("text/javascript", ".mjs", True)
|
||||
@@ -34,7 +34,7 @@ urlpatterns = [
|
||||
),
|
||||
]
|
||||
|
||||
if settings.DEBUG:
|
||||
if settings.DEBUG and settings.DEBUG_TOOLBAR:
|
||||
urlpatterns += path('__debug__/', include('debug_toolbar.urls')),
|
||||
|
||||
if settings.ENABLE_METRICS:
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
Django==5.2.6
|
||||
Django==5.2.9
|
||||
cryptography===45.0.5
|
||||
django-annoying==0.10.6
|
||||
django-cleanup==9.0.0
|
||||
django-crispy-forms==2.4
|
||||
crispy-bootstrap4==2025.6
|
||||
djangorestframework==3.16.1
|
||||
drf-spectacular==0.27.1
|
||||
drf-spectacular==0.28.0
|
||||
drf-spectacular-sidecar==2025.8.1
|
||||
drf-writable-nested==0.7.2
|
||||
django-oauth-toolkit==2.4.0
|
||||
django-debug-toolbar==4.3.0
|
||||
django-debug-toolbar==6.0.0
|
||||
bleach==6.2.0
|
||||
gunicorn==23.0.0
|
||||
lxml==5.3.1
|
||||
lxml==6.0.2
|
||||
Markdown==3.7
|
||||
Pillow==11.3.0
|
||||
psycopg2-binary==2.9.10
|
||||
@@ -22,14 +22,14 @@ six==1.17.0
|
||||
webdavclient3==3.14.6
|
||||
whitenoise==6.8.2
|
||||
icalendar==6.3.1
|
||||
pyyaml==6.0.2
|
||||
pyyaml==6.0.3
|
||||
uritemplate==4.1.1
|
||||
beautifulsoup4==4.12.3
|
||||
microdata==0.8.0
|
||||
mock==5.2.0
|
||||
Jinja2==3.1.6
|
||||
django-allauth[mfa,socialaccount]==65.9.0
|
||||
recipe-scrapers==15.8.0
|
||||
recipe-scrapers==15.10.0
|
||||
django-scopes==2.0.0
|
||||
django-treebeard==4.7.1
|
||||
django-cors-headers==4.6.0
|
||||
@@ -37,7 +37,7 @@ django-storages==1.14.6
|
||||
boto3==1.28.75
|
||||
django-prometheus==2.4.1
|
||||
django-hCaptcha==0.2.0
|
||||
python-ldap==3.4.4
|
||||
python-ldap==3.4.5
|
||||
django-auth-ldap==4.6.0
|
||||
pyppeteer==2.0.0
|
||||
pytubefix==9.2.2
|
||||
@@ -53,7 +53,7 @@ django-vite==3.1.0
|
||||
litellm==1.64.1
|
||||
|
||||
# Development
|
||||
pytest==8.4.1
|
||||
pytest==8.4.2
|
||||
pytest-django==4.11.0
|
||||
pytest-cov===6.2.1
|
||||
pytest-factoryboy==2.8.1
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
"@types/sortablejs": "^1.15.8",
|
||||
"@vueform/multiselect": "^2.6.11",
|
||||
"@vueuse/core": "^13.6.0",
|
||||
"@vueuse/router": "^13.6.0",
|
||||
"@vueuse/router": "^13.9.0",
|
||||
"luxon": "^3.7.1",
|
||||
"mavon-editor": "^3.0.1",
|
||||
"pinia": "^3.0.2",
|
||||
@@ -23,7 +23,7 @@
|
||||
"vue-router": "^4.5.0",
|
||||
"vue-simple-calendar": "7.1.0",
|
||||
"vuedraggable": "^4.1.0",
|
||||
"vuetify": "^3.9.7"
|
||||
"vuetify": "^3.10.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@fortawesome/fontawesome-free": "^6.7.2",
|
||||
@@ -31,11 +31,11 @@
|
||||
"@types/jsdom": "^21.1.7",
|
||||
"@types/node": "^24.0.8",
|
||||
"@vitejs/plugin-vue": "^6.0.0",
|
||||
"@vue/tsconfig": "^0.7.0",
|
||||
"@vue/tsconfig": "^0.8.1",
|
||||
"esbuild-register": "^3.6.0",
|
||||
"jsdom": "^26.1.0",
|
||||
"typescript": "^5.8.3",
|
||||
"vite": "7.1.5",
|
||||
"vite": "7.1.11",
|
||||
"vite-plugin-pwa": "^1.0.3",
|
||||
"vite-plugin-vuetify": "^2.1.1",
|
||||
"vue-tsc": "^3.0.6",
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<template>
|
||||
<v-app>
|
||||
<v-app-bar color="tandoor" flat density="comfortable" v-if="!useUserPreferenceStore().isAuthenticated">
|
||||
<v-app-bar color="tandoor" flat density="comfortable" v-if="!useUserPreferenceStore().isAuthenticated && !useUserPreferenceStore().isPrintMode">
|
||||
|
||||
</v-app-bar>
|
||||
<v-app-bar :color="useUserPreferenceStore().activeSpace.navBgColor ? useUserPreferenceStore().activeSpace.navBgColor : useUserPreferenceStore().userSettings.navBgColor"
|
||||
flat density="comfortable" v-if="useUserPreferenceStore().isAuthenticated" :scroll-behavior="useUserPreferenceStore().userSettings.navSticky ? '' : 'hide'">
|
||||
flat density="comfortable" v-if="useUserPreferenceStore().isAuthenticated && !useUserPreferenceStore().isPrintMode" :scroll-behavior="useUserPreferenceStore().userSettings.navSticky ? '' : 'hide'">
|
||||
<router-link :to="{ name: 'StartPage', params: {} }">
|
||||
<v-img src="../../assets/brand_logo.svg" width="140px" class="ms-2"
|
||||
v-if="useUserPreferenceStore().userSettings.navShowLogo && !useUserPreferenceStore().activeSpace.navLogo"></v-img>
|
||||
@@ -58,7 +58,7 @@
|
||||
</p>
|
||||
</v-app-bar>
|
||||
|
||||
<v-app-bar color="info" density="compact" v-if="useUserPreferenceStore().isAuthenticated && useUserPreferenceStore().activeSpace.message != ''">
|
||||
<v-app-bar color="info" density="compact" v-if="useUserPreferenceStore().isAuthenticated && useUserPreferenceStore().activeSpace.message != '' && !useUserPreferenceStore().isPrintMode">
|
||||
<p class="text-center w-100">
|
||||
{{ useUserPreferenceStore().activeSpace.message }}
|
||||
</p>
|
||||
@@ -69,7 +69,7 @@
|
||||
</v-main>
|
||||
|
||||
<!-- completely hide in print mode because setting d-print-node keeps layout -->
|
||||
<v-navigation-drawer v-if="lgAndUp && useUserPreferenceStore().isAuthenticated && !isPrintMode">
|
||||
<v-navigation-drawer v-if="lgAndUp && useUserPreferenceStore().isAuthenticated && !useUserPreferenceStore().isPrintMode">
|
||||
<v-list nav>
|
||||
<v-list-item :to="{ name: 'SettingsPage', params: {} }">
|
||||
<template #prepend>
|
||||
@@ -96,7 +96,7 @@
|
||||
|
||||
</v-navigation-drawer>
|
||||
|
||||
<v-bottom-navigation grow v-if="useUserPreferenceStore().isAuthenticated && !lgAndUp">
|
||||
<v-bottom-navigation grow v-if="useUserPreferenceStore().isAuthenticated && !lgAndUp && !useUserPreferenceStore().isPrintMode">
|
||||
<v-btn value="recent" :to="{ name: 'StartPage', params: {} }">
|
||||
<v-icon icon="fa-fw fas fa-book "/>
|
||||
</v-btn>
|
||||
@@ -131,43 +131,44 @@
|
||||
<script lang="ts" setup>
|
||||
import GlobalSearchDialog from "@/components/inputs/GlobalSearchDialog.vue"
|
||||
|
||||
import {useDisplay} from "vuetify"
|
||||
import {useDisplay, useLocale} from "vuetify"
|
||||
import VSnackbarQueued from "@/components/display/VSnackbarQueued.vue";
|
||||
import MessageListDialog from "@/components/dialogs/MessageListDialog.vue";
|
||||
import {useUserPreferenceStore} from "@/stores/UserPreferenceStore";
|
||||
import NavigationDrawerContextMenu from "@/components/display/NavigationDrawerContextMenu.vue";
|
||||
import {useDjangoUrls} from "@/composables/useDjangoUrls";
|
||||
import {nextTick, onMounted} from "vue";
|
||||
import {nextTick, onMounted, ref} from "vue";
|
||||
import {isSpaceAboveLimit} from "@/utils/logic_utils";
|
||||
import {useMediaQuery, useTitle} from "@vueuse/core";
|
||||
import {useTitle} from "@vueuse/core";
|
||||
import HelpDialog from "@/components/dialogs/HelpDialog.vue";
|
||||
import {NAVIGATION_DRAWER} from "@/utils/navigation.ts";
|
||||
import {useNavigation} from "@/composables/useNavigation.ts";
|
||||
import {useRouter} from "vue-router";
|
||||
import {useI18n} from "vue-i18n";
|
||||
|
||||
const {lgAndUp} = useDisplay()
|
||||
const {getDjangoUrl} = useDjangoUrls()
|
||||
const {t} = useI18n()
|
||||
|
||||
const title = useTitle()
|
||||
const router = useRouter()
|
||||
|
||||
const isPrintMode = useMediaQuery('print')
|
||||
|
||||
onMounted(() => {
|
||||
useUserPreferenceStore().init().then(() => {
|
||||
if (useUserPreferenceStore().activeSpace.spaceSetupCompleted != undefined && !useUserPreferenceStore().activeSpace.spaceSetupCompleted) {
|
||||
router.push({name: 'WelcomePage'})
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
const {current} = useLocale()
|
||||
let locale = document.querySelector('html')!.getAttribute('lang')
|
||||
if (locale != null) {
|
||||
current.value = locale
|
||||
}
|
||||
})
|
||||
|
||||
/**
|
||||
* global title update handler, might be overridden by page specific handlers
|
||||
*/
|
||||
router.afterEach((to, from) => {
|
||||
if(to.name == 'StartPage' && useUserPreferenceStore().initCompleted && !useUserPreferenceStore().activeSpace.spaceSetupCompleted != undefined &&!useUserPreferenceStore().activeSpace.spaceSetupCompleted && useUserPreferenceStore().activeSpace.createdBy.id! == useUserPreferenceStore().userSettings.user.id!){
|
||||
if (to.name == 'StartPage' && useUserPreferenceStore().initCompleted && !useUserPreferenceStore().activeSpace.spaceSetupCompleted != undefined && !useUserPreferenceStore().activeSpace.spaceSetupCompleted && useUserPreferenceStore().activeSpace.createdBy.id! == useUserPreferenceStore().userSettings.user.id!) {
|
||||
router.push({name: 'WelcomePage'})
|
||||
}
|
||||
nextTick(() => {
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
<v-card-actions>
|
||||
<v-spacer></v-spacer>
|
||||
<v-btn @click="useMessageStore().deleteAllMessages()" color="error">{{$t('Delete_All')}}</v-btn>
|
||||
<v-btn @click="addTestMessage()" color="warning">{{$t('Add')}}</v-btn>
|
||||
<!-- <v-btn @click="addTestMessage()" color="warning">{{$t('Add')}}</v-btn>-->
|
||||
<v-btn @click="isActive.value = false">{{ $t('Close')}}</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
|
||||
<v-dialog v-model="dialog" activator="parent" style="max-width: 75vw;">
|
||||
<v-dialog v-model="dialog" :activator="props.activator" style="max-width: 75vw;">
|
||||
<v-card>
|
||||
|
||||
<v-closable-card-title :title="$t('Export')" v-model="dialog"></v-closable-card-title>
|
||||
@@ -48,7 +48,7 @@
|
||||
<script setup lang="ts">
|
||||
|
||||
import VClosableCardTitle from "@/components/dialogs/VClosableCardTitle.vue";
|
||||
import {computed, ref} from "vue";
|
||||
import {computed, PropType, ref, shallowRef} from "vue";
|
||||
import {useShoppingStore} from "@/stores/ShoppingStore.ts";
|
||||
import {isEntryVisible, isShoppingCategoryVisible, isShoppingListFoodVisible} from "@/utils/logic_utils.ts";
|
||||
import {useI18n} from "vue-i18n";
|
||||
@@ -56,10 +56,15 @@ import {useUserPreferenceStore} from "@/stores/UserPreferenceStore.ts";
|
||||
import {ShoppingListEntry} from "@/openapi";
|
||||
import BtnCopy from "@/components/buttons/BtnCopy.vue";
|
||||
import {useClipboard} from "@vueuse/core";
|
||||
import {EditorSupportedModels, getGenericModelFromString} from "@/types/Models.ts";
|
||||
|
||||
const {t} = useI18n()
|
||||
const {copy} = useClipboard()
|
||||
|
||||
const props = defineProps({
|
||||
activator: {default: 'parent'},
|
||||
})
|
||||
|
||||
const dialog = defineModel<boolean>()
|
||||
const mode = ref<'md_list' | 'md_table' | 'csv'>('md_list')
|
||||
|
||||
@@ -78,7 +83,7 @@ const exportText = computed(() => {
|
||||
|
||||
textArray.push(formatHeader())
|
||||
|
||||
useShoppingStore().getEntriesByGroup.forEach(category => {
|
||||
useShoppingStore().entriesByGroup.forEach(category => {
|
||||
if (isShoppingCategoryVisible(category)) {
|
||||
if (category.name === useShoppingStore().UNDEFINED_CATEGORY) {
|
||||
textArray.push(formatCategory(t('NoCategory')))
|
||||
|
||||
@@ -8,6 +8,9 @@
|
||||
<v-label>{{ $t('Choose_Category') }}</v-label>
|
||||
<model-select model="SupermarketCategory" @update:modelValue="categoryUpdate" allow-create></model-select>
|
||||
|
||||
<v-label>{{ $t('ShoppingList') }}</v-label>
|
||||
<model-select model="ShoppingList" @update:modelValue="shoppingListUpdate" mode="tags" allow-create></model-select>
|
||||
|
||||
<v-row>
|
||||
<v-col class="pr-0">
|
||||
<v-btn height="80px" color="info" density="compact" size="small" block stacked
|
||||
@@ -76,6 +79,9 @@
|
||||
<v-list-item-subtitle v-if="isDelayed(e)" class="text-info font-weight-bold">
|
||||
{{ $t('PostponedUntil') }} {{ DateTime.fromJSDate(e.delayUntil!).toLocaleString(DateTime.DATETIME_SHORT) }}
|
||||
</v-list-item-subtitle>
|
||||
<v-list-item-subtitle v-if="e.shoppingLists.length > 0" class="text-info font-weight-bold">
|
||||
<shopping-lists-bar :shopping-lists="e.shoppingLists"></shopping-lists-bar>
|
||||
</v-list-item-subtitle>
|
||||
|
||||
<v-btn-group divided border>
|
||||
<v-btn icon="" @click="e.amount = e.amount / 2; updateEntryAmount(e)" v-if="!e.ingredient">
|
||||
@@ -122,8 +128,8 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
|
||||
import {computed} from "vue";
|
||||
import {ApiApi, PatchedShoppingListEntry, ShoppingListEntry, SupermarketCategory} from "@/openapi";
|
||||
import {computed, ref} from "vue";
|
||||
import {ApiApi, PatchedShoppingListEntry, ShoppingList, ShoppingListEntry, SupermarketCategory} from "@/openapi";
|
||||
import ModelSelect from "@/components/inputs/ModelSelect.vue";
|
||||
import {IShoppingListFood} from "@/types/Shopping";
|
||||
import VClosableCardTitle from "@/components/dialogs/VClosableCardTitle.vue";
|
||||
@@ -133,12 +139,16 @@ import ModelEditDialog from "@/components/dialogs/ModelEditDialog.vue";
|
||||
import {useShoppingStore} from "@/stores/ShoppingStore";
|
||||
import {isDelayed, isShoppingListFoodDelayed} from "@/utils/logic_utils";
|
||||
import {ErrorMessageType, PreparedMessage, useMessageStore} from "@/stores/MessageStore";
|
||||
import ShoppingListsBar from "@/components/display/ShoppingListsBar.vue";
|
||||
import {useUserPreferenceStore} from "@/stores/UserPreferenceStore.ts";
|
||||
|
||||
const {mobile} = useDisplay()
|
||||
|
||||
const showDialog = defineModel<Boolean>()
|
||||
const shoppingListFood = defineModel<IShoppingListFood>('shoppingListFood', {required: true})
|
||||
|
||||
const shoppingListUpdateLoading = ref(false)
|
||||
|
||||
/**
|
||||
* returns a flat list of entries for the given shopping list food
|
||||
*/
|
||||
@@ -164,6 +174,8 @@ const isShoppingLineDelayed = computed(() => {
|
||||
function categoryUpdate(category: SupermarketCategory) {
|
||||
const api = new ApiApi()
|
||||
shoppingListFood.value.food.supermarketCategory = category
|
||||
shoppingListFood.value.entries.forEach(e => e.food.supermarketCategory = category)
|
||||
useShoppingStore().updateEntriesStructure()
|
||||
api.apiFoodUpdate({id: shoppingListFood.value.food.id, food: shoppingListFood.value.food}).then(r => {
|
||||
useMessageStore().addPreparedMessage(PreparedMessage.UPDATE_SUCCESS)
|
||||
}).catch(err => {
|
||||
@@ -171,6 +183,35 @@ function categoryUpdate(category: SupermarketCategory) {
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* change the shopping list for all entries
|
||||
* @param shoppingLists
|
||||
*/
|
||||
function shoppingListUpdate(shoppingLists: ShoppingList[]) {
|
||||
const api = new ApiApi()
|
||||
const promises: Promise<any>[] = []
|
||||
shoppingListUpdateLoading.value = true
|
||||
|
||||
shoppingListFood.value.entries.forEach(e => {
|
||||
e.shoppingLists = shoppingLists
|
||||
promises.push(api.apiShoppingListEntryUpdate({id: e.id, shoppingListEntry: e}).then(r => {
|
||||
|
||||
}).catch(err => {
|
||||
useMessageStore().addError(ErrorMessageType.UPDATE_ERROR, err)
|
||||
}))
|
||||
})
|
||||
if (useUserPreferenceStore().userSettings.shoppingUpdateFoodLists){
|
||||
shoppingListFood.value.food.shoppingLists = shoppingLists
|
||||
promises.push(api.apiFoodUpdate({id: shoppingListFood.value.food.id!, food: shoppingListFood.value.food}).then(r => {
|
||||
|
||||
}).catch(err => {
|
||||
useMessageStore().addError(ErrorMessageType.UPDATE_ERROR, err)
|
||||
}))
|
||||
}
|
||||
|
||||
Promise.all(promises).finally(() => shoppingListUpdateLoading.value = false)
|
||||
}
|
||||
|
||||
/**
|
||||
* add new entry for currently selected food type
|
||||
*/
|
||||
|
||||
@@ -10,15 +10,15 @@
|
||||
<!-- <v-text-field density="compact" variant="outlined" class="pt-2 pb-2" :label="$t('Search')" hide-details clearable></v-text-field>-->
|
||||
<!-- </v-list-item>-->
|
||||
<!-- <v-divider></v-divider>-->
|
||||
<v-list-item link title="Start" @click="window = 'start'" prepend-icon="fa-solid fa-house"></v-list-item>
|
||||
<v-list-item link title="Space" @click="window = 'space'" prepend-icon="fa-solid fa-database"></v-list-item>
|
||||
<v-list-item link :title="$t('Start')" @click="window = 'start'" prepend-icon="fa-solid fa-house"></v-list-item>
|
||||
<v-list-item link :title="$t('Space')" @click="window = 'space'" prepend-icon="fa-solid fa-database"></v-list-item>
|
||||
<v-list-item link :title="$t('Recipes')" @click="window = 'recipes'" prepend-icon="$recipes"></v-list-item>
|
||||
<v-list-item link :title="$t('Import')" @click="window = 'import'" prepend-icon="$import"></v-list-item>
|
||||
<v-list-item link :title="$t('AI')" @click="window = 'ai'" prepend-icon="$ai"></v-list-item>
|
||||
<v-list-item link :title="$t('Unit')" @click="window = 'unit'" prepend-icon="fa-solid fa-scale-balanced"></v-list-item>
|
||||
<v-list-item link :title="$t('Food')" @click="window = 'food'" prepend-icon="fa-solid fa-carrot"></v-list-item>
|
||||
<v-list-item link :title="$t('Keyword')" @click="window = 'keyword'" prepend-icon="fa-solid fa-tags"></v-list-item>
|
||||
<v-list-item link title="Recipe Structure" @click="window = 'recipe_structure'" prepend-icon="fa-solid fa-diagram-project"></v-list-item>
|
||||
<v-list-item link :title="$t('Recipe Structure')" @click="window = 'recipe_structure'" prepend-icon="fa-solid fa-diagram-project"></v-list-item>
|
||||
<v-list-item link :title="$t('Properties')" @click="window = 'properties'" prepend-icon="fa-solid fa-database"></v-list-item>
|
||||
<v-list-item link :title="$t('Search')" @click="window = 'recipe_search'" prepend-icon="$search"></v-list-item>
|
||||
<v-list-item link :title="$t('SavedSearch')" @click="window = 'search_filter'" prepend-icon="fa-solid fa-sd-card"></v-list-item>
|
||||
@@ -31,6 +31,8 @@
|
||||
|
||||
<v-main>
|
||||
<v-container>
|
||||
<v-select v-model="window" :items="mobileMenuItems" class="d-block d-lg-none"> </v-select>
|
||||
|
||||
<v-window v-model="window">
|
||||
<v-window-item value="start">
|
||||
<h2>Welcome to Tandoor 2</h2>
|
||||
@@ -46,7 +48,8 @@
|
||||
<v-btn class="mt-2 ms-2" color="info" href="https://github.com/TandoorRecipes/recipes" target="_blank" prepend-icon="fa-solid fa-code-branch">GitHub
|
||||
</v-btn>
|
||||
|
||||
<v-alert class="mt-3" border="start" variant="tonal" color="success" v-if="(!useUserPreferenceStore().serverSettings.hosted && !useUserPreferenceStore().activeSpace.demo)">
|
||||
<v-alert class="mt-3" border="start" variant="tonal" color="success"
|
||||
v-if="(!useUserPreferenceStore().serverSettings.hosted && !useUserPreferenceStore().activeSpace.demo)">
|
||||
<v-alert-title>Did you know?</v-alert-title>
|
||||
Tandoor is Open Source and available to anyone for free to host on their own server. Thousands of hours have been spend
|
||||
making Tandoor what it is today. You can help make Tandoor even better by contributing or helping financing the effort.
|
||||
@@ -60,10 +63,12 @@
|
||||
|
||||
</v-window-item>
|
||||
<v-window-item value="space">
|
||||
<p class="mt-3">All your data is stored in a Space where you can invite other people to collaborate on your recipe database. Typcially the members of a space
|
||||
<p class="mt-3">All your data is stored in a Space where you can invite other people to collaborate on your recipe database. Typcially the members of a
|
||||
space
|
||||
belong to one family/household/organization.</p>
|
||||
|
||||
<p class="mt-3">While everyone can access all recipes by default, Books, Shopping Lists and Mealplans are not shared by default. You can share them with other
|
||||
<p class="mt-3">While everyone can access all recipes by default, Books, Shopping Lists and Mealplans are not shared by default. You can share them with
|
||||
other
|
||||
members of your space
|
||||
using the settings.
|
||||
</p>
|
||||
@@ -77,19 +82,24 @@
|
||||
|
||||
</v-window-item>
|
||||
<v-window-item value="recipes">
|
||||
<p class="mt-3">Recipes are the foundation of your Tandoor space. A Recipe has one or more steps that contain ingredients, instructions and other information.
|
||||
<p class="mt-3">Recipes are the foundation of your Tandoor space. A Recipe has one or more steps that contain ingredients, instructions and other
|
||||
information.
|
||||
Ingredients in turn consist of an amount, a unit and a food, allowing recipes to be scaled, nutrition's to be calculated and shopping to be organized.
|
||||
</p>
|
||||
|
||||
<p class="mt-3">Besides manually creating them you can also import them from various different places.
|
||||
</p>
|
||||
<p class="mt-3">Recipes, by default, are visible to all members of your space. Setting them to private means only you can see it. After setting it to private you
|
||||
<p class="mt-3">Recipes, by default, are visible to all members of your space. Setting them to private means only you can see it. After setting it to
|
||||
private you
|
||||
can manually specify the people who should be able to view the recipe.
|
||||
You can also create a share link for the recipe to share it with everyone that has access to the link.
|
||||
</p>
|
||||
<p class="mt-3"></p>
|
||||
|
||||
<v-btn color="primary" variant="tonal" prepend-icon="$create" class="me-2" :to="{name: 'ModelEditPage', params: {model: 'Recipe'}}">{{ $t('Create') }}</v-btn>
|
||||
<v-btn color="primary" variant="tonal" prepend-icon="$create" class="me-2" :to="{name: 'ModelEditPage', params: {model: 'Recipe'}}">{{
|
||||
$t('Create')
|
||||
}}
|
||||
</v-btn>
|
||||
<v-btn color="primary" variant="tonal" prepend-icon="$search" class="me-2" :to="{name: 'SearchPage'}">{{ $t('Search') }}</v-btn>
|
||||
|
||||
</v-window-item>
|
||||
@@ -119,7 +129,8 @@
|
||||
</p>
|
||||
|
||||
<p class="mt-3" v-if="useUserPreferenceStore().serverSettings.hosted">
|
||||
To prevent accidental AI cost you can review your AI usage using the AI Log. The Server Administrator can also set AI usage limits for your space (either monthly or using a balance).
|
||||
To prevent accidental AI cost you can review your AI usage using the AI Log. The Server Administrator can also set AI usage limits for your space
|
||||
(either monthly or using a balance).
|
||||
</p>
|
||||
<p class="mt-3" v-if="!useUserPreferenceStore().serverSettings.hosted">
|
||||
Depending on your subscription you will have different AI Credits available for your space every month. Additionally you might have a Credit balance
|
||||
@@ -153,7 +164,8 @@
|
||||
<v-btn color="primary" variant="tonal" prepend-icon="fa-solid fa-scale-balanced" class="me-2" :to="{name: 'ModelListPage', params: {model: 'Unit'}}">
|
||||
{{ $t('Unit') }}
|
||||
</v-btn>
|
||||
<v-btn color="primary" variant="tonal" prepend-icon="fa-solid fa-exchange-alt" class="me-2" :to="{name: 'ModelListPage', params: {model: 'UnitConversion'}}">
|
||||
<v-btn color="primary" variant="tonal" prepend-icon="fa-solid fa-exchange-alt" class="me-2"
|
||||
:to="{name: 'ModelListPage', params: {model: 'UnitConversion'}}">
|
||||
{{ $t('Conversion') }}
|
||||
</v-btn>
|
||||
|
||||
@@ -223,7 +235,8 @@
|
||||
calculate the property amount if a Food is given in a different unit (e.g. 1kg or 1 cup).
|
||||
</p>
|
||||
|
||||
<v-btn color="primary" variant="tonal" prepend-icon="fa-solid fa-database" class="me-2 mt-2 mb-2" :to="{name: 'ModelListPage', params: {model: 'PropertyType'}}">
|
||||
<v-btn color="primary" variant="tonal" prepend-icon="fa-solid fa-database" class="me-2 mt-2 mb-2"
|
||||
:to="{name: 'ModelListPage', params: {model: 'PropertyType'}}">
|
||||
{{ $t('Property') }}
|
||||
</v-btn>
|
||||
<h3>Editor</h3>
|
||||
@@ -294,7 +307,8 @@
|
||||
</p>
|
||||
|
||||
<p class="mt-3">
|
||||
You can assign Supermarket Categories to your Foods, either trough the Food Editor or directly by clicking on a Shopping List Entry, to automatically sort the list
|
||||
You can assign Supermarket Categories to your Foods, either trough the Food Editor or directly by clicking on a Shopping List Entry, to automatically
|
||||
sort the list
|
||||
according to the Category Order defined in the Supermarket.
|
||||
</p>
|
||||
|
||||
@@ -333,7 +347,8 @@
|
||||
|
||||
<p class="mt-3">
|
||||
When selecting a Recipe in a Meal Plan you can automatically add its ingredients to the shopping list. You can also manually add more entries trough the
|
||||
shopping tab in the Meal Plan editor. When deleting a Meal Plan all Shopping List Entries associated with that Meal Plan are deleted as well. When changing the
|
||||
shopping tab in the Meal Plan editor. When deleting a Meal Plan all Shopping List Entries associated with that Meal Plan are deleted as well. When
|
||||
changing the
|
||||
number of servings in a Meal Plan the Servings of the connected Recipe in the Shopping list are automatically changed as well.
|
||||
|
||||
</p>
|
||||
@@ -368,10 +383,30 @@
|
||||
|
||||
import {ref} from "vue";
|
||||
import {useUserPreferenceStore} from "@/stores/UserPreferenceStore.ts";
|
||||
import {useI18n} from "vue-i18n";
|
||||
|
||||
const {t} = useI18n()
|
||||
const drawer = defineModel()
|
||||
const window = ref('start')
|
||||
|
||||
const mobileMenuItems = ref([
|
||||
{title: t('Start'), props: {prependIcon: 'fa-solid fa-house'}, value: 'start'},
|
||||
{title: t('Space'), props: {prependIcon: 'fa-solid fa-database'}, value: 'space'},
|
||||
{title: t('Recipes'), props: {prependIcon: '$recipes'}, value: 'recipes'},
|
||||
{title: t('Import'), props: {prependIcon: '$import'}, value: 'import'},
|
||||
{title: t('AI'), props: {prependIcon: '$ai'}, value: 'ai'},
|
||||
{title: t('Unit'), props: {prependIcon: 'fa-solid fa-scale-balanced'}, value: 'unit'},
|
||||
{title: t('Food'), props: {prependIcon: 'fa-solid fa-carrot'}, value: 'food'},
|
||||
{title: t('Keyword'), props: {prependIcon: 'fa-solid fa-tags'}, value: 'keyword'},
|
||||
{title: t('RecipeStructure'), props: {prependIcon: 'fa-solid fa-diagram-project'}, value: 'recipe_structure'},
|
||||
{title: t('Properties'), props: {prependIcon: 'fa-solid fa-database'}, value: 'properties'},
|
||||
{title: t('Search'), props: {prependIcon: '$search'}, value: 'recipe_search'},
|
||||
{title: t('SavedSearch'), props: {prependIcon: 'fa-solid fa-sd-card'}, value: 'search_filter'},
|
||||
{title: t('Books'), props: {prependIcon: '$books'}, value: 'books'},
|
||||
{title: t('Shopping'), props: {prependIcon: '$shopping'}, value: 'shopping'},
|
||||
{title: t('Meal_Plan'), props: {prependIcon: '$mealplan'}, value: 'meal_plan'}
|
||||
])
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
@@ -146,7 +146,11 @@ onMounted(() => {
|
||||
|
||||
function clickMealPlan(plan: MealPlan) {
|
||||
if (plan.recipe) {
|
||||
router.push({name: 'RecipeViewPage', params: {id: plan.recipe.id}})
|
||||
router.push({
|
||||
name: 'RecipeViewPage',
|
||||
params: { id: String(plan.recipe.id) }, // keep id in params
|
||||
query: { servings: String(plan.servings ?? '') } // pass servings as query
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -54,15 +54,13 @@
|
||||
</router-link>
|
||||
<a v-else-if="i.food.url" :href="i.food.url" target="_blank">{{ ingredientToFoodString(i, ingredientFactor) }}</a>
|
||||
<span v-else>{{ ingredientToFoodString(i, ingredientFactor) }}</span>
|
||||
<template v-if="i.note != '' && i.note != undefined">
|
||||
<span class="d-none d-print-block text-disabled font-italic"> {{ i.note }}</span>
|
||||
</template>
|
||||
|
||||
</template>
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
<td style="width: 1%; text-wrap: nowrap" class="d-print-none">
|
||||
<td v-if="useUserPreferenceStore().isPrintMode">
|
||||
<span class="text-disabled font-italic"> {{ i.note }}</span>
|
||||
</td>
|
||||
<td style="width: 1%; text-wrap: nowrap" v-if="!useUserPreferenceStore().isPrintMode">
|
||||
<v-icon class="far fa-comment float-right" v-if="i.note != '' && i.note != undefined">
|
||||
<v-tooltip activator="parent" open-on-click location="start">{{ i.note }}</v-tooltip>
|
||||
</v-icon>
|
||||
|
||||
@@ -157,6 +157,7 @@ function dropCalendarItemOnDate(undefinedItem: IMealPlanNormalizedCalendarItem,
|
||||
let new_entry = Object.assign({}, mealPlan)
|
||||
new_entry.fromDate = targetDate
|
||||
new_entry.toDate = DateTime.fromJSDate(targetDate).plus(fromToDiff).toJSDate()
|
||||
new_entry.addshopping = mealPlan.shopping
|
||||
useMealPlanStore().createObject(new_entry)
|
||||
} else {
|
||||
mealPlan.fromDate = targetDate
|
||||
|
||||
@@ -37,15 +37,15 @@
|
||||
|
||||
<v-dialog max-width="900px" v-model="dialog">
|
||||
<v-card v-if="dialogProperty" :loading="loading">
|
||||
<v-closable-card-title :title="`${dialogProperty.propertyAmountTotal} ${dialogProperty.unit} ${dialogProperty.name}`" :sub-title="$t('total')" icon="$properties"
|
||||
<v-closable-card-title :title="`${dialogProperty.propertyAmountTotal} ${(dialogProperty.unit != null) ? dialogProperty.unit : ''} ${dialogProperty.name}`" :sub-title="$t('total')" icon="$properties"
|
||||
v-model="dialog"></v-closable-card-title>
|
||||
<v-card-text>
|
||||
<v-list>
|
||||
<v-list-item border v-for="fv in dialogProperty.foodValues" :key="`${dialogProperty.id}_${fv.id}`">
|
||||
<template #prepend>
|
||||
<v-progress-circular size="55" width="5" :model-value="(fv.value/dialogProperty.propertyAmountTotal)*100"
|
||||
:color="colorScale((fv.value/dialogProperty.propertyAmountTotal)*100)" v-if="fv.value != null && dialogProperty.propertyAmountTotal > 0">
|
||||
{{ Math.round((fv.value / dialogProperty.propertyAmountTotal) * 100) }}%
|
||||
<v-progress-circular size="55" width="5" :model-value="(fv.value* props.ingredientFactor/dialogProperty.propertyAmountTotal)*100"
|
||||
:color="colorScale((fv.value* props.ingredientFactor/dialogProperty.propertyAmountTotal)*100)" v-if="fv.value != null && dialogProperty.propertyAmountTotal > 0">
|
||||
{{ Math.round((fv.value* props.ingredientFactor / dialogProperty.propertyAmountTotal) * 100) }}%
|
||||
</v-progress-circular>
|
||||
<v-progress-circular size="55" width="5" v-if="fv.value == null">?</v-progress-circular>
|
||||
</template>
|
||||
@@ -53,13 +53,13 @@
|
||||
{{ fv.food.name }}
|
||||
</span>
|
||||
<template #append>
|
||||
<v-chip v-if="fv.value != undefined">{{ $n(fv.value) }} {{ dialogProperty.unit }}</v-chip>
|
||||
<v-chip color="create" v-else-if="fv.missing_conversion" class="cursor-pointer" prepend-icon="$create">
|
||||
<v-chip color="create" v-if="fv.missing_conversion" class="cursor-pointer" prepend-icon="$create">
|
||||
{{ $t('Conversion') }}: {{ fv.missing_conversion.base_unit.name }} <i class="fa-solid fa-arrow-right me-1 ms-1"></i>
|
||||
{{ fv.missing_conversion.converted_unit.name }}
|
||||
<model-edit-dialog model="UnitConversion" @create="refreshRecipe()"
|
||||
:item-defaults="{baseAmount: 1, baseUnit: fv.missing_conversion.base_unit, convertedUnit: fv.missing_conversion.converted_unit, food: fv.food}"></model-edit-dialog>
|
||||
</v-chip>
|
||||
<v-chip v-else-if="fv.value != undefined">{{ $n(fv.value * props.ingredientFactor) }} {{ dialogProperty.unit }}</v-chip>
|
||||
<v-chip color="warning" prepend-icon="$edit" class="cursor-pointer" :to="{name: 'ModelEditPage', params: {model: 'Recipe', id: recipe.id}}" v-else-if="fv.missing_unit">
|
||||
{{ $t('NoUnit') }}
|
||||
</v-chip>
|
||||
@@ -101,7 +101,10 @@ type PropertyWrapper = {
|
||||
}
|
||||
|
||||
const props = defineProps({
|
||||
servings: {type: Number, required: true,},
|
||||
ingredientFactor: {
|
||||
type: Number,
|
||||
required: true,
|
||||
},
|
||||
})
|
||||
|
||||
const recipe = defineModel<Recipe>({required: true})
|
||||
@@ -143,7 +146,7 @@ const propertyList = computed(() => {
|
||||
description: rp.propertyType.description,
|
||||
foodValues: [],
|
||||
propertyAmountPerServing: rp.propertyAmount,
|
||||
propertyAmountTotal: rp.propertyAmount * recipe.value.servings * (props.servings / recipe.value.servings),
|
||||
propertyAmountTotal: rp.propertyAmount * recipe.value.servings * props.ingredientFactor,
|
||||
missingValue: false,
|
||||
unit: rp.propertyType.unit,
|
||||
type: rp.propertyType,
|
||||
@@ -161,7 +164,7 @@ const propertyList = computed(() => {
|
||||
icon: fp.icon,
|
||||
foodValues: fp.food_values,
|
||||
propertyAmountPerServing: fp.total_value / recipe.value.servings,
|
||||
propertyAmountTotal: fp.total_value * (props.servings / recipe.value.servings),
|
||||
propertyAmountTotal: fp.total_value * props.ingredientFactor,
|
||||
missingValue: fp.missing_value,
|
||||
unit: fp.unit,
|
||||
type: fp,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<v-card class="mt-1 d-print-none" v-if="useUserPreferenceStore().isAuthenticated" :loading="loading">
|
||||
<v-card class="mt-1" v-if="useUserPreferenceStore().isAuthenticated && !useUserPreferenceStore().isPrintMode" :loading="loading">
|
||||
<v-card-text>
|
||||
<v-textarea :label="$t('Comment')" rows="2" v-model="newCookLog.comment" auto-grow></v-textarea>
|
||||
<v-row dense>
|
||||
@@ -69,7 +69,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
|
||||
import {onMounted, PropType, ref} from "vue";
|
||||
import {onMounted, PropType, ref, watch} from "vue";
|
||||
import {ApiApi, CookLog, Recipe} from "@/openapi";
|
||||
import {DateTime} from "luxon";
|
||||
import {ErrorMessageType, useMessageStore} from "@/stores/MessageStore";
|
||||
@@ -82,6 +82,10 @@ const props = defineProps({
|
||||
type: Object as PropType<Recipe>,
|
||||
required: true
|
||||
},
|
||||
servings: {
|
||||
type: Number,
|
||||
required: true
|
||||
}
|
||||
})
|
||||
|
||||
const newCookLog = ref({} as CookLog);
|
||||
@@ -121,7 +125,7 @@ function recLoadCookLog(recipeId: number, page: number = 1) {
|
||||
*/
|
||||
function resetForm() {
|
||||
newCookLog.value = {} as CookLog
|
||||
newCookLog.value.servings = props.recipe.servings
|
||||
newCookLog.value.servings = props.servings
|
||||
newCookLog.value.createdAt = new Date()
|
||||
newCookLog.value.recipe = props.recipe.id!
|
||||
}
|
||||
@@ -140,6 +144,13 @@ function saveCookLog() {
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* watch for changes in servings prop and update the servings input field
|
||||
*/
|
||||
watch(() => props.servings, (newVal) => {
|
||||
newCookLog.value.servings = newVal
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<template v-if="!props.loading">
|
||||
|
||||
<router-link :to="{name: 'RecipeViewPage', params: {id: props.recipe.id}}" :target="linkTarget">
|
||||
<router-link :to="dest" :target="linkTarget">
|
||||
<recipe-image :style="{height: props.height}" :recipe="props.recipe" rounded="lg" class="mr-3 ml-3">
|
||||
|
||||
</recipe-image>
|
||||
@@ -36,7 +36,7 @@
|
||||
</div>
|
||||
|
||||
|
||||
<v-card :to="{name: 'RecipeViewPage', params: {id: props.recipe.id}}" :style="{'height': props.height}" v-if="false">
|
||||
<v-card :to="dest" :style="{'height': props.height}" v-if="false">
|
||||
<v-tooltip
|
||||
class="align-center justify-center"
|
||||
location="top center" origin="overlap"
|
||||
@@ -97,7 +97,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import {PropType} from 'vue'
|
||||
import {computed, PropType} from 'vue'
|
||||
import KeywordsComponent from "@/components/display/KeywordsBar.vue";
|
||||
import {Recipe, RecipeOverview} from "@/openapi";
|
||||
|
||||
@@ -113,20 +113,29 @@ const props = defineProps({
|
||||
show_description: {type: Boolean, required: false},
|
||||
height: {type: String, required: false, default: '15vh'},
|
||||
linkTarget: {type: String, required: false, default: ''},
|
||||
showMenu: {type: Boolean, default: true, required: false}
|
||||
showMenu: {type: Boolean, default: true, required: false},
|
||||
servings: {type: Number, required: false},
|
||||
})
|
||||
|
||||
const router = useRouter()
|
||||
|
||||
const dest = computed(() => {
|
||||
const route: any = { name: 'RecipeViewPage', params: { id: props.recipe.id } };
|
||||
if (props.servings !== undefined) {
|
||||
route.query = { servings: String(props.servings) };
|
||||
}
|
||||
return route;
|
||||
})
|
||||
|
||||
/**
|
||||
* open the recipe either in the same tab or in a new tab depending on the link target prop
|
||||
*/
|
||||
function openRecipe() {
|
||||
if (props.linkTarget != '') {
|
||||
const routeData = router.resolve({name: 'RecipeViewPage', params: {id: props.recipe.id}});
|
||||
const routeData = router.resolve(dest.value);
|
||||
window.open(routeData.href, props.linkTarget);
|
||||
} else {
|
||||
router.push({name: 'RecipeViewPage', params: {id: props.recipe.id}})
|
||||
router.push(dest.value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
<template v-if="recipe.name != undefined">
|
||||
|
||||
<template class="d-block d-lg-none">
|
||||
<template class="d-block d-lg-none d-print-none">
|
||||
|
||||
<!-- mobile layout -->
|
||||
<v-card class="rounded-0">
|
||||
@@ -25,7 +25,7 @@
|
||||
<span class="ps-2 text-h5 flex-grow-1 pa-1" :class="{'text-truncate': !showFullRecipeName}" @click="showFullRecipeName = !showFullRecipeName">
|
||||
{{ recipe.name }}
|
||||
</span>
|
||||
<recipe-context-menu :recipe="recipe" v-if="useUserPreferenceStore().isAuthenticated"></recipe-context-menu>
|
||||
<recipe-context-menu :recipe="recipe" :servings="servings" v-if="useUserPreferenceStore().isAuthenticated"></recipe-context-menu>
|
||||
</v-sheet>
|
||||
<keywords-component variant="flat" class="ms-1" :keywords="recipe.keywords"></keywords-component>
|
||||
<private-recipe-badge :users="recipe.shared" v-if="recipe._private"></private-recipe-badge>
|
||||
@@ -61,7 +61,7 @@
|
||||
</v-card>
|
||||
</template>
|
||||
<!-- Desktop horizontal layout -->
|
||||
<template class="d-none d-lg-block">
|
||||
<template class="d-none d-lg-block d-print-block">
|
||||
<v-row dense>
|
||||
<v-col cols="8">
|
||||
<recipe-image
|
||||
@@ -75,7 +75,7 @@
|
||||
<v-card-text class="flex-grow-1">
|
||||
<div class="d-flex">
|
||||
<h1 class="flex-column flex-grow-1">{{ recipe.name }}</h1>
|
||||
<recipe-context-menu :recipe="recipe" v-if="useUserPreferenceStore().isAuthenticated"
|
||||
<recipe-context-menu :recipe="recipe" :servings="servings" v-if="useUserPreferenceStore().isAuthenticated"
|
||||
class="flex-column mb-auto mt-2 float-right"></recipe-context-menu>
|
||||
</div>
|
||||
<p>
|
||||
@@ -118,13 +118,13 @@
|
||||
</v-row>
|
||||
</template>
|
||||
|
||||
<template v-if="recipe.filePath">
|
||||
<template v-if="recipe.filePath && !useUserPreferenceStore().isPrintMode">
|
||||
<external-recipe-viewer class="mt-2" :recipe="recipe"></external-recipe-viewer>
|
||||
|
||||
<v-card :title="$t('AI')" prepend-icon="$ai" :loading="fileApiLoading || loading" :disabled="fileApiLoading || loading || !useUserPreferenceStore().activeSpace.aiEnabled"
|
||||
<v-card :title="$t('AI')" prepend-icon="$ai" :loading="fileApiLoading || loading" :disabled="fileApiLoading || loading || !useUserPreferenceStore().activeSpace.aiEnabled"
|
||||
v-if="!recipe.internal">
|
||||
<v-card-text>
|
||||
{{$t('ConvertUsingAI')}}
|
||||
{{ $t('ConvertUsingAI') }}
|
||||
|
||||
<model-select model="AiProvider" v-model="selectedAiProvider">
|
||||
<template #append>
|
||||
@@ -135,7 +135,8 @@
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
<v-card class="mt-1" v-if="(recipe.steps.length > 1 || (recipe.steps.length == 1 && !recipe.steps[0].showIngredientsTable)) && recipe.showIngredientOverview">
|
||||
<v-card class="mt-1"
|
||||
v-if="(recipe.steps.length > 1 || (recipe.steps.length == 1 && !recipe.steps[0].showIngredientsTable)) && recipe.showIngredientOverview && !useUserPreferenceStore().isPrintMode">
|
||||
<steps-overview :steps="recipe.steps" :ingredient-factor="ingredientFactor"></steps-overview>
|
||||
</v-card>
|
||||
|
||||
@@ -143,12 +144,12 @@
|
||||
<step-view v-model="recipe.steps[index]" :step-number="index+1" :ingredientFactor="ingredientFactor"></step-view>
|
||||
</v-card>
|
||||
|
||||
<property-view v-model="recipe" :servings="servings"></property-view>
|
||||
<property-view v-model="recipe" :ingredientFactor="ingredientFactor"></property-view>
|
||||
|
||||
<v-card class="mt-2">
|
||||
<v-card-text>
|
||||
<v-row>
|
||||
<v-col cols="12" md="3">
|
||||
<v-row dense>
|
||||
<v-col cols="12" :sm="(recipe.sourceUrl) ? 3 : 4">
|
||||
<v-card
|
||||
variant="outlined"
|
||||
:title="$t('CreatedBy')"
|
||||
@@ -157,7 +158,7 @@
|
||||
:to="(useUserPreferenceStore().isAuthenticated) ? {name: 'SearchPage', query: {createdby: recipe.createdBy.id!}}: undefined">
|
||||
</v-card>
|
||||
</v-col>
|
||||
<v-col cols="12" md="3">
|
||||
<v-col cols="12" :sm="(recipe.sourceUrl) ? 3 : 4">
|
||||
<v-card
|
||||
variant="outlined"
|
||||
:title="$t('Created')"
|
||||
@@ -166,7 +167,7 @@
|
||||
:to="(useUserPreferenceStore().isAuthenticated) ? {name: 'SearchPage', query: {createdon: DateTime.fromJSDate(recipe.createdAt).toISODate()}} : undefined">
|
||||
</v-card>
|
||||
</v-col>
|
||||
<v-col cols="12" md="3">
|
||||
<v-col cols="12" :sm="(recipe.sourceUrl) ? 3 : 4">
|
||||
<v-card
|
||||
variant="outlined"
|
||||
:title="$t('Updated')"
|
||||
@@ -175,7 +176,7 @@
|
||||
:to="(useUserPreferenceStore().isAuthenticated) ? {name: 'SearchPage', query: {updatedon: DateTime.fromJSDate(recipe.updatedAt).toISODate()}}: undefined">
|
||||
</v-card>
|
||||
</v-col>
|
||||
<v-col cols="12" md="3" v-if="recipe.sourceUrl">
|
||||
<v-col cols="12" :sm="(recipe.sourceUrl) ? 3 : 4" v-if="recipe.sourceUrl">
|
||||
<v-card
|
||||
variant="outlined"
|
||||
:title="$t('Imported_From')"
|
||||
@@ -189,7 +190,7 @@
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
|
||||
<recipe-activity :recipe="recipe" v-if="useUserPreferenceStore().userSettings.comments"></recipe-activity>
|
||||
<recipe-activity :recipe="recipe" :servings="servings" v-if="useUserPreferenceStore().userSettings.comments"></recipe-activity>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
@@ -219,8 +220,11 @@ const {doAiImport, fileApiLoading} = useFileApi()
|
||||
|
||||
const loading = ref(false)
|
||||
const recipe = defineModel<Recipe>({required: true})
|
||||
const props = defineProps<{
|
||||
servings: {type: Number, required: false},
|
||||
}>()
|
||||
|
||||
const servings = ref(1)
|
||||
const servings = ref(props.servings ?? recipe.value.servings ?? 1)
|
||||
const showFullRecipeName = ref(false)
|
||||
|
||||
const selectedAiProvider = ref<undefined | AiProvider>(useUserPreferenceStore().activeSpace.aiDefaultProvider)
|
||||
@@ -229,17 +233,19 @@ const selectedAiProvider = ref<undefined | AiProvider>(useUserPreferenceStore().
|
||||
* factor for multiplying ingredient amounts based on recipe base servings and user selected servings
|
||||
*/
|
||||
const ingredientFactor = computed(() => {
|
||||
return servings.value / ((recipe.value.servings != undefined) ? recipe.value.servings : 1)
|
||||
return servings.value / ((recipe.value.servings != undefined) ? Math.max(recipe.value.servings, 1) : 1)
|
||||
})
|
||||
|
||||
/**
|
||||
* change servings when recipe servings are changed
|
||||
*/
|
||||
watch(() => recipe.value.servings, () => {
|
||||
if (recipe.value.servings) {
|
||||
servings.value = recipe.value.servings
|
||||
}
|
||||
})
|
||||
if (props.servings === undefined) {
|
||||
watch(() => recipe.value.servings, () => {
|
||||
if (recipe.value.servings) {
|
||||
servings.value = recipe.value.servings
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
//keep screen on while viewing a recipe
|
||||
@@ -257,7 +263,7 @@ onBeforeUnmount(() => {
|
||||
function aiConvertRecipe() {
|
||||
let api = new ApiApi()
|
||||
|
||||
doAiImport(selectedAiProvider.value.id!,null, '', recipe.value.id!).then(r => {
|
||||
doAiImport(selectedAiProvider.value.id!, null, '', recipe.value.id!).then(r => {
|
||||
if (r.recipe) {
|
||||
recipe.value.internal = true
|
||||
recipe.value.steps = r.recipe.steps
|
||||
|
||||
@@ -1,11 +1,17 @@
|
||||
<template>
|
||||
<v-list-item class="swipe-container border-t-sm mt-0 mb-0 pt-0 pb-0 pe-0 pa-0" :id="itemContainerId" @touchend="handleSwipe()" @click="dialog = true;"
|
||||
v-if="isShoppingListFoodVisible(props.shoppingListFood, useUserPreferenceStore().deviceSettings)"
|
||||
<v-list-item class="swipe-container border-t-sm mt-0 mb-0 pt-0 pb-0 pe-0 pa-0 shopping-border"
|
||||
:id="itemContainerId"
|
||||
@touchend="handleSwipe()"
|
||||
@click="dialog = true;"
|
||||
:value="shoppingListFood"
|
||||
>
|
||||
<!-- <div class="swipe-action" :class="{'bg-success': !isChecked , 'bg-warning': isChecked }">-->
|
||||
<!-- <i class="swipe-icon fa-fw fas" :class="{'fa-check': !isChecked , 'fa-cart-plus': isChecked }"></i>-->
|
||||
<!-- </div>-->
|
||||
|
||||
<div class="color-marker-container">
|
||||
<span :style="{background: sl.color}" v-for="sl in shoppingList"></span>
|
||||
</div>
|
||||
|
||||
<div class="flex-grow-1 p-2">
|
||||
<div class="d-flex">
|
||||
@@ -31,13 +37,18 @@
|
||||
</div>
|
||||
|
||||
|
||||
<template v-slot:[selectBtnSlot]="{ isSelected, select }" v-if="selectEnabled">
|
||||
<v-list-item-action class="ps-3 pe-3" start>
|
||||
<v-checkbox-btn :model-value="isSelected" @update:model-value="select" @click.native.stop=""></v-checkbox-btn>
|
||||
</v-list-item-action>
|
||||
</template>
|
||||
|
||||
<template v-slot:[checkBtnSlot]>
|
||||
<div class="ps-3 pe-3" @click.native.stop="useShoppingStore().setEntriesCheckedState(entries, !isChecked, true);">
|
||||
<v-btn color="success" size="large"
|
||||
:class="{'btn-success': !isChecked, 'btn-warning': isChecked}" :icon="actionButtonIcon" variant="plain">
|
||||
</v-btn>
|
||||
</div>
|
||||
<!-- <i class="d-print-none fa-fw fas" :class="{'fa-check': !isChecked , 'fa-cart-plus': isChecked }"></i>-->
|
||||
</template>
|
||||
|
||||
<!-- <div class="swipe-action bg-primary justify-content-end">-->
|
||||
@@ -56,20 +67,23 @@ import {computed, PropType, ref} from "vue";
|
||||
import {DateTime} from "luxon";
|
||||
import {useShoppingStore} from "@/stores/ShoppingStore.js";
|
||||
import {useUserPreferenceStore} from "@/stores/UserPreferenceStore.js";
|
||||
import {ApiApi, Food, ShoppingListEntry} from '@/openapi'
|
||||
import {ApiApi, Food, ShoppingList, ShoppingListEntry} from '@/openapi'
|
||||
import {ErrorMessageType, useMessageStore} from "@/stores/MessageStore";
|
||||
import {IShoppingListFood, ShoppingLineAmount} from "@/types/Shopping";
|
||||
import {isDelayed, isEntryVisible, isShoppingListFoodDelayed, isShoppingListFoodVisible} from "@/utils/logic_utils";
|
||||
import ShoppingLineItemDialog from "@/components/dialogs/ShoppingLineItemDialog.vue";
|
||||
import {pluralString} from "@/utils/model_utils.ts";
|
||||
import ShoppingListsBar from "@/components/display/ShoppingListsBar.vue";
|
||||
|
||||
const emit = defineEmits(['clicked'])
|
||||
|
||||
const props = defineProps({
|
||||
shoppingListFood: {type: {} as PropType<IShoppingListFood>, required: true},
|
||||
hideInfoRow: {type: Boolean, default: false}
|
||||
hideInfoRow: {type: Boolean, default: false},
|
||||
selectEnabled: {type: Boolean, default: false}
|
||||
})
|
||||
const checkBtnSlot = ref(useUserPreferenceStore().userSettings.leftHanded ? 'prepend' : 'append')
|
||||
const selectBtnSlot = ref(useUserPreferenceStore().userSettings.leftHanded ? 'append' : 'prepend')
|
||||
|
||||
const dialog = ref(false)
|
||||
|
||||
@@ -82,9 +96,7 @@ const entries = computed(() => {
|
||||
*/
|
||||
const itemContainerId = computed(() => {
|
||||
let id = 'id_sli_'
|
||||
for (let i in entries.value) {
|
||||
id += i + '_'
|
||||
}
|
||||
entries.value.forEach(e => id += e.id + '_')
|
||||
return id
|
||||
})
|
||||
|
||||
@@ -112,6 +124,22 @@ const actionButtonIcon = computed(() => {
|
||||
})
|
||||
|
||||
|
||||
const shoppingList = computed(() => {
|
||||
const lists = [] as ShoppingList[]
|
||||
entries.value.forEach(e => {
|
||||
if (e.shoppingLists) {
|
||||
e.shoppingLists.forEach(l => {
|
||||
if (lists.findIndex(sl => sl.id == l.id) == -1) {
|
||||
lists.push(l)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
return lists
|
||||
})
|
||||
|
||||
|
||||
/**
|
||||
* calculate the amounts for the given line
|
||||
* can combine 1 to n entries with the same unit
|
||||
@@ -123,34 +151,34 @@ const amounts = computed((): ShoppingLineAmount[] => {
|
||||
for (let i in entries.value) {
|
||||
let e = entries.value[i]
|
||||
|
||||
if (isEntryVisible(e, useUserPreferenceStore().deviceSettings)) {
|
||||
let unit = -1
|
||||
if (e.unit !== undefined && e.unit !== null) {
|
||||
unit = e.unit.id!
|
||||
}
|
||||
|
||||
if (e.amount > 0) {
|
||||
let unit = -1
|
||||
if (e.unit !== undefined && e.unit !== null) {
|
||||
unit = e.unit.id!
|
||||
}
|
||||
|
||||
let uaMerged = false
|
||||
unitAmounts.forEach(ua => {
|
||||
if (((ua.unit == null && e.unit == null) || (ua.unit != null && ua.unit.id! == unit)) && ua.checked == e.checked && ua.delayed == isDelayed(e)) {
|
||||
ua.amount += e.amount
|
||||
uaMerged = true
|
||||
}
|
||||
})
|
||||
if (e.amount > 0) {
|
||||
|
||||
if (!uaMerged) {
|
||||
unitAmounts.push({
|
||||
key: `${unit}_${e.checked}_${isDelayed(e)}`,
|
||||
amount: e.amount,
|
||||
unit: e.unit,
|
||||
checked: e.checked,
|
||||
delayed: isDelayed(e)
|
||||
} as ShoppingLineAmount)
|
||||
let uaMerged = false
|
||||
unitAmounts.forEach(ua => {
|
||||
if (((ua.unit == null && e.unit == null) || (ua.unit != null && ua.unit.id! == unit)) && ua.checked == e.checked && ua.delayed == isDelayed(e)) {
|
||||
ua.amount += e.amount
|
||||
uaMerged = true
|
||||
}
|
||||
})
|
||||
|
||||
if (!uaMerged) {
|
||||
unitAmounts.push({
|
||||
key: `${unit}_${e.checked}_${isDelayed(e)}`,
|
||||
amount: e.amount,
|
||||
unit: e.unit,
|
||||
checked: e.checked,
|
||||
delayed: isDelayed(e)
|
||||
} as ShoppingLineAmount)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return unitAmounts
|
||||
})
|
||||
|
||||
@@ -171,29 +199,28 @@ const infoRow = computed(() => {
|
||||
for (let i in entries.value) {
|
||||
let e = entries.value[i]
|
||||
|
||||
if (isEntryVisible(e, useUserPreferenceStore().deviceSettings)) {
|
||||
|
||||
if (authors.indexOf(e.createdBy.displayName) === -1) {
|
||||
authors.push(e.createdBy.displayName)
|
||||
}
|
||||
|
||||
if (e.listRecipe != null) {
|
||||
if (e.listRecipeData.recipe != null) {
|
||||
let recipe_name = e.listRecipeData.recipeData.name
|
||||
if (recipes.indexOf(recipe_name) === -1) {
|
||||
recipes.push(recipe_name.substring(0, 14) + (recipe_name.length > 14 ? '..' : ''))
|
||||
}
|
||||
}
|
||||
|
||||
if (e.listRecipeData.mealplan != null) {
|
||||
let meal_plan_entry = (e.listRecipeData.mealPlanData.mealType.name.substring(0, 8) || '') + (e.listRecipeData.mealPlanData.mealType.name.length > 8 ? '..' : '') + ' (' + DateTime.fromJSDate(e.listRecipeData.mealPlanData.fromDate).toLocaleString(DateTime.DATE_SHORT) + ')'
|
||||
if (meal_pans.indexOf(meal_plan_entry) === -1) {
|
||||
meal_pans.push(meal_plan_entry)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (authors.indexOf(e.createdBy.displayName) === -1) {
|
||||
authors.push(e.createdBy.displayName)
|
||||
}
|
||||
|
||||
if (e.listRecipe != null) {
|
||||
if (e.listRecipeData.recipe != null) {
|
||||
let recipe_name = e.listRecipeData.recipeData.name
|
||||
if (recipes.indexOf(recipe_name) === -1) {
|
||||
recipes.push(recipe_name.substring(0, 14) + (recipe_name.length > 14 ? '..' : ''))
|
||||
}
|
||||
}
|
||||
|
||||
if (e.listRecipeData.mealplan != null) {
|
||||
let meal_plan_entry = (e.listRecipeData.mealPlanData.mealType.name.substring(0, 8) || '') + (e.listRecipeData.mealPlanData.mealType.name.length > 8 ? '..' : '') + ' (' + DateTime.fromJSDate(e.listRecipeData.mealPlanData.fromDate).toLocaleString(DateTime.DATE_SHORT) + ')'
|
||||
if (meal_pans.indexOf(meal_plan_entry) === -1) {
|
||||
meal_pans.push(meal_plan_entry)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (useUserPreferenceStore().deviceSettings.shopping_item_info_created_by && authors.length > 0) {
|
||||
@@ -247,4 +274,22 @@ function handleSwipe() {
|
||||
|
||||
<style>
|
||||
/* TODO swipe system classes removed because not working (visually, touch detection was working), retrieve from old ShoppingLineItem VCS */
|
||||
|
||||
|
||||
/* 2. Container to wrap the color bars and place them to the far left */
|
||||
.color-marker-container {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 100%;
|
||||
width: 3px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.color-marker-container span {
|
||||
width: 100%;
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -2,7 +2,7 @@
|
||||
<v-tabs v-model="currentTab">
|
||||
<v-tab value="shopping"><i class="fas fa-fw"
|
||||
:class="{'fa-circle-notch fa-spin':useShoppingStore().currentlyUpdating, 'fa-shopping-cart ': !useShoppingStore().currentlyUpdating}"></i> <span
|
||||
class="d-none d-md-block ms-1">{{ $t('Shopping_list') }} ({{ useShoppingStore().stats.countUnchecked }})</span></v-tab>
|
||||
class="d-none d-md-block ms-1">{{ $t('Shopping_list') }} ({{ useShoppingStore().totalFoods }})</span></v-tab>
|
||||
<v-tab value="recipes"><i class="fas fa-book fa-fw"></i> <span class="d-none d-md-block ms-1">{{
|
||||
$t('Recipes')
|
||||
}} ({{ useShoppingStore().getAssociatedRecipes().length }})</span></v-tab>
|
||||
@@ -25,9 +25,13 @@
|
||||
|
||||
<v-list density="compact">
|
||||
<v-list-item @click="useShoppingStore().undoChange()" prepend-icon="fa-solid fa-arrow-rotate-left">{{ $t('Undo') }}</v-list-item>
|
||||
<v-list-item @click="exportDialog = true" link prepend-icon="fa-solid fa-download">
|
||||
{{ $t('Export') }}
|
||||
</v-list-item>
|
||||
<v-divider></v-divider>
|
||||
<v-list-item>
|
||||
<v-select hide-details :items="groupingOptionsItems" v-model="useUserPreferenceStore().deviceSettings.shopping_selected_grouping" :label="$t('GroupBy')">
|
||||
<v-select hide-details :items="groupingOptionsItems" v-model="useUserPreferenceStore().deviceSettings.shopping_selected_grouping"
|
||||
:label="$t('GroupBy')">
|
||||
</v-select>
|
||||
</v-list-item>
|
||||
<v-list-item v-if="useUserPreferenceStore().deviceSettings.shopping_selected_grouping == ShoppingGroupingOptions.CATEGORY">
|
||||
@@ -65,29 +69,94 @@
|
||||
</v-list>
|
||||
</v-menu>
|
||||
|
||||
<v-btn height="100%" rounded="0" variant="plain">
|
||||
<i class="fa-solid fa-download"></i>
|
||||
<shopping-export-dialog></shopping-export-dialog>
|
||||
</v-btn>
|
||||
<!-- <v-btn height="100%" rounded="0" variant="plain">-->
|
||||
<!-- <i class="fa-solid fa-download"></i>-->
|
||||
<!-- <shopping-export-dialog></shopping-export-dialog>-->
|
||||
<!-- </v-btn>-->
|
||||
|
||||
<v-btn height="100%" rounded="0" variant="plain" @click="useShoppingStore().undoChange()">
|
||||
<i class="fa-solid fa-arrow-rotate-left"></i>
|
||||
</v-btn>
|
||||
<!-- <v-btn height="100%" rounded="0" variant="plain" @click="useShoppingStore().undoChange()">-->
|
||||
<!-- <i class="fa-solid fa-arrow-rotate-left"></i>-->
|
||||
<!-- </v-btn>-->
|
||||
|
||||
</v-tabs>
|
||||
|
||||
<shopping-export-dialog v-model="exportDialog" activator="model"></shopping-export-dialog>
|
||||
|
||||
<v-window v-model="currentTab">
|
||||
<v-window-item value="shopping">
|
||||
<v-container>
|
||||
<!-- <v-row class="pa-0" dense>-->
|
||||
<!-- <v-col class="pa-0">-->
|
||||
<!-- <v-chip-group v-model="useUserPreferenceStore().deviceSettings.shopping_selected_supermarket" v-if="supermarkets.length > 0">-->
|
||||
<!-- <v-chip v-for="s in supermarkets" :value="s" :key="s.id" label density="compact" variant="outlined" color="primary">{{ s.name }}</v-chip>-->
|
||||
<!-- </v-chip-group>-->
|
||||
<!-- </v-col>-->
|
||||
<!-- </v-row>-->
|
||||
|
||||
<v-row class="pa-0" dense>
|
||||
<v-col class="pa-0">
|
||||
<v-chip-group v-model="useUserPreferenceStore().deviceSettings.shopping_selected_supermarket" v-if="supermarkets.length > 0">
|
||||
<v-chip v-for="s in supermarkets" :value="s" :key="s.id" label density="compact" variant="outlined" color="primary">{{ s.name }}</v-chip>
|
||||
</v-chip-group>
|
||||
<v-chip label density="compact" variant="outlined" style="max-width: 50%;" :prepend-icon="TSupermarket.icon" append-icon="fa-solid fa-caret-down">
|
||||
<span v-if="useUserPreferenceStore().deviceSettings.shopping_selected_supermarket != null">
|
||||
{{ useUserPreferenceStore().deviceSettings.shopping_selected_supermarket.name }}
|
||||
</span>
|
||||
<span v-else>{{ $t('Supermarket') }}</span>
|
||||
|
||||
<v-menu activator="parent">
|
||||
<v-list density="compact">
|
||||
<v-list-item @click="useUserPreferenceStore().deviceSettings.shopping_selected_shopping_list = []; useShoppingStore().updateEntriesStructure()">
|
||||
{{ $t('SelectNone') }}
|
||||
</v-list-item>
|
||||
<v-list-item v-for="s in supermarkets" :key="s.id" @click="useUserPreferenceStore().deviceSettings.shopping_selected_supermarket = s">
|
||||
{{ s.name }}
|
||||
</v-list-item>
|
||||
<v-list-item prepend-icon="$create" :to="{name: 'ModelEditPage', params: {model: 'Supermarket'}}">
|
||||
{{ $t('Create') }}
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
</v-menu>
|
||||
</v-chip>
|
||||
|
||||
<v-chip label density="compact" class="ms-1" variant="outlined"
|
||||
:color="(useUserPreferenceStore().deviceSettings.shopping_selected_shopping_list.length == 0 ? '' : 'secondary')" :prepend-icon="TShoppingList.icon"
|
||||
append-icon="fa-solid fa-caret-down">
|
||||
<template v-if="useUserPreferenceStore().deviceSettings.shopping_selected_shopping_list.filter(sl => sl != -1).length > 0">
|
||||
{{
|
||||
shoppingLists.filter(sl => useUserPreferenceStore().deviceSettings.shopping_selected_shopping_list.includes(sl.id)).flatMap(sl => sl.name).join(', ')
|
||||
}}
|
||||
</template>
|
||||
<template v-else>{{ $t('ShoppingList') }}</template>
|
||||
|
||||
<v-menu activator="parent" :close-on-content-click="false">
|
||||
<v-list density="compact" v-model:selected="useUserPreferenceStore().deviceSettings.shopping_selected_shopping_list" select-strategy="leaf">
|
||||
<v-list-item @click="useUserPreferenceStore().deviceSettings.shopping_selected_shopping_list = [] ">
|
||||
{{ $t('All') }}
|
||||
</v-list-item>
|
||||
<v-list-item :value="-1" @click="useUserPreferenceStore().deviceSettings.shopping_selected_shopping_list = [-1];">
|
||||
<template v-slot:prepend="{ isSelected, select }">
|
||||
<v-list-item-action start>
|
||||
<v-checkbox-btn :model-value="isSelected" @update:model-value="select"></v-checkbox-btn>
|
||||
</v-list-item-action>
|
||||
</template>
|
||||
{{ $t('None') }}
|
||||
</v-list-item>
|
||||
<v-list-item v-for="s in shoppingLists" :key="s.id" :value="s.id">
|
||||
<template v-slot:prepend="{ isSelected, select }">
|
||||
<v-list-item-action start>
|
||||
<v-checkbox-btn :model-value="isSelected" @update:model-value="select"></v-checkbox-btn>
|
||||
</v-list-item-action>
|
||||
</template>
|
||||
{{ s.name }}
|
||||
</v-list-item>
|
||||
<v-list-item prepend-icon="$create" :to="{name: 'ModelEditPage', params: {model: 'ShoppingList'}}">
|
||||
{{ $t('Create') }}
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
</v-menu>
|
||||
</v-chip>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
<v-row>
|
||||
<v-row class="mt-0">
|
||||
<v-col>
|
||||
<v-alert v-if="useShoppingStore().hasFailedItems()" color="warning" class="mb-2">
|
||||
<template #prepend>
|
||||
@@ -107,19 +176,18 @@
|
||||
<v-skeleton-loader type="list-item"></v-skeleton-loader>
|
||||
<v-skeleton-loader type="list-item"></v-skeleton-loader>
|
||||
</v-list>
|
||||
<v-list class="mt-3" density="compact" v-else>
|
||||
<template v-for="category in useShoppingStore().getEntriesByGroup" :key="category.name">
|
||||
<template v-if="isShoppingCategoryVisible(category)">
|
||||
<v-list class="mt-3" density="compact" v-model:selected="selectedLines" select-strategy="leaf" v-else>
|
||||
<template v-for="category in useShoppingStore().entriesByGroup" :key="category.name">
|
||||
|
||||
<v-list-subheader v-if="category.name === useShoppingStore().UNDEFINED_CATEGORY"><i>{{ $t('NoCategory') }}</i></v-list-subheader>
|
||||
<v-list-subheader v-else>{{ category.name }}</v-list-subheader>
|
||||
<v-divider></v-divider>
|
||||
|
||||
<template v-for="[i, value] in category.foods" :key="value.food.id">
|
||||
<shopping-line-item :shopping-list-food="value"></shopping-line-item>
|
||||
</template>
|
||||
<v-list-subheader v-if="category.name === useShoppingStore().UNDEFINED_CATEGORY"><i>{{ $t('NoCategory') }}</i></v-list-subheader>
|
||||
<v-list-subheader v-else>{{ category.name }}</v-list-subheader>
|
||||
<v-divider></v-divider>
|
||||
|
||||
<template v-for="[i, value] in category.foods" :key="value.food.id">
|
||||
<shopping-line-item :shopping-list-food="value"></shopping-line-item>
|
||||
</template>
|
||||
|
||||
</template>
|
||||
</v-list>
|
||||
|
||||
@@ -246,14 +314,14 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
|
||||
import {computed, onMounted, ref} from "vue";
|
||||
import {computed, onMounted, ref, shallowRef, toRef, watch} from "vue";
|
||||
import {useShoppingStore} from "@/stores/ShoppingStore";
|
||||
import {ApiApi, Recipe, ResponseError, ShoppingListEntry, ShoppingListRecipe, Supermarket} from "@/openapi";
|
||||
import {ApiApi, Recipe, ResponseError, ShoppingList, ShoppingListEntry, ShoppingListRecipe, Supermarket} from "@/openapi";
|
||||
import {ErrorMessageType, PreparedMessage, useMessageStore} from "@/stores/MessageStore";
|
||||
import ShoppingLineItem from "@/components/display/ShoppingLineItem.vue";
|
||||
import {useUserPreferenceStore} from "@/stores/UserPreferenceStore";
|
||||
import ModelSelect from "@/components/inputs/ModelSelect.vue";
|
||||
import {ShoppingGroupingOptions} from "@/types/Shopping";
|
||||
import {IShoppingListFood, ShoppingGroupingOptions} from "@/types/Shopping";
|
||||
import {useI18n} from "vue-i18n";
|
||||
import NumberScalerDialog from "@/components/inputs/NumberScalerDialog.vue";
|
||||
import SupermarketEditor from "@/components/model_editors/SupermarketEditor.vue";
|
||||
@@ -265,13 +333,18 @@ import {onBeforeRouteLeave} from "vue-router";
|
||||
import {isShoppingCategoryVisible} from "@/utils/logic_utils.ts";
|
||||
import ShoppingExportDialog from "@/components/dialogs/ShoppingExportDialog.vue";
|
||||
import AddToShoppingDialog from "@/components/dialogs/AddToShoppingDialog.vue";
|
||||
import {TShoppingList, TSupermarket} from "@/types/Models.ts";
|
||||
|
||||
const {t} = useI18n()
|
||||
|
||||
const exportDialog = ref(false)
|
||||
const currentTab = ref("shopping")
|
||||
const supermarkets = ref([] as Supermarket[])
|
||||
const shoppingLists = ref([] as ShoppingList[])
|
||||
const manualAddRecipe = ref<undefined | Recipe>(undefined)
|
||||
|
||||
const selectedLines = shallowRef([] as IShoppingListFood[])
|
||||
|
||||
/**
|
||||
* VSelect items for shopping list grouping options with localized names
|
||||
*/
|
||||
@@ -283,6 +356,10 @@ const groupingOptionsItems = computed(() => {
|
||||
return items
|
||||
})
|
||||
|
||||
watch(() => useUserPreferenceStore().deviceSettings, () => {
|
||||
useShoppingStore().updateEntriesStructure()
|
||||
}, {deep: true})
|
||||
|
||||
onMounted(() => {
|
||||
addEventListener("visibilitychange", (event) => {
|
||||
useShoppingStore().autoSyncHasFocus = (document.visibilityState === 'visible')
|
||||
@@ -304,6 +381,7 @@ onMounted(() => {
|
||||
}
|
||||
|
||||
loadSupermarkets()
|
||||
loadShoppingLists()
|
||||
})
|
||||
|
||||
/**
|
||||
@@ -378,6 +456,20 @@ function loadSupermarkets() {
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* load a list of supermarkets
|
||||
*/
|
||||
function loadShoppingLists() {
|
||||
let api = new ApiApi()
|
||||
|
||||
api.apiShoppingListList().then(r => {
|
||||
shoppingLists.value = r.results
|
||||
// TODO either recursive or add a "favorite" attribute to supermarkets for them to display at all
|
||||
}).catch(err => {
|
||||
useMessageStore().addError(ErrorMessageType.FETCH_ERROR, err)
|
||||
})
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
27
vue3/src/components/display/ShoppingListsBar.vue
Normal file
27
vue3/src/components/display/ShoppingListsBar.vue
Normal file
@@ -0,0 +1,27 @@
|
||||
<template>
|
||||
<div v-if="props.shoppingLists">
|
||||
<slot name="prepend"></slot>
|
||||
|
||||
<v-chip class="me-1 mb-1" :color="shoppingList.color" :size="props.size" :variant="props.variant" label v-for="shoppingList in props.shoppingLists">
|
||||
{{ shoppingList.name }}
|
||||
</v-chip>
|
||||
|
||||
<slot name="append"></slot>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
|
||||
import {Keyword, KeywordLabel, ShoppingList} from "@/openapi";
|
||||
import {computed, PropType} from "vue";
|
||||
import {useUserPreferenceStore} from "@/stores/UserPreferenceStore.ts";
|
||||
|
||||
const props = defineProps({
|
||||
shoppingLists: Array as PropType<Array<ShoppingList> | undefined>,
|
||||
size: {type: String, default: 'x-small'},
|
||||
variant: {type: String as PropType<NonNullable<"tonal" | "flat" | "text" | "elevated" | "outlined" | "plain"> | undefined>, default: 'outlined'},
|
||||
})
|
||||
|
||||
|
||||
</script>
|
||||
@@ -4,7 +4,6 @@
|
||||
<v-row>
|
||||
<v-col>
|
||||
<span v-if="step.name">{{ step.name }}</span>
|
||||
<span v-else-if="step.stepRecipe"><v-icon icon="$recipes"></v-icon> {{ step.stepRecipeData.name }}</span>
|
||||
<span v-else>{{ $t('Step') }} {{ props.stepNumber }}</span>
|
||||
</v-col>
|
||||
<v-col class="text-right">
|
||||
@@ -23,11 +22,12 @@
|
||||
<timer :seconds="step.time != undefined ? step.time*60 : 0" @stop="timerRunning = false" v-if="timerRunning"></timer>
|
||||
<v-card-text v-if="step.ingredients.length > 0 || step.instruction != ''">
|
||||
<v-row>
|
||||
<v-col cols="12" md="6" v-if="step.ingredients.length > 0 && step.showIngredientsTable">
|
||||
<v-col :cols="(useUserPreferenceStore().isPrintMode) ? 6 : 12" md="6" v-if="step.ingredients.length > 0 && (step.showIngredientsTable || step.show_ingredients_table)">
|
||||
<ingredients-table v-model="step.ingredients" :ingredient-factor="ingredientFactor"></ingredients-table>
|
||||
</v-col>
|
||||
<v-col cols="12" md="6" class="markdown-body">
|
||||
<instructions :instructions_html="step.instructionsMarkdown" :ingredient_factor="ingredientFactor" v-if="step.instructionsMarkdown != undefined"></instructions>
|
||||
<v-col :cols="(useUserPreferenceStore().isPrintMode) ? 6 : 12" md="6" class="markdown-body">
|
||||
<instructions :instructions_html="step.instructionsMarkdown" :ingredient_factor="ingredientFactor"
|
||||
v-if="step.instructionsMarkdown != undefined"></instructions>
|
||||
<!-- sub recipes dont have a correct schema, thus they use different variable naming -->
|
||||
<instructions :instructions_html="step.instructions_markdown" :ingredient_factor="ingredientFactor" v-else></instructions>
|
||||
</v-col>
|
||||
@@ -35,7 +35,12 @@
|
||||
</v-card-text>
|
||||
|
||||
<template v-if="step.stepRecipe">
|
||||
<v-card class="ma-2 border-md" prepend-icon="$recipes" :title="step.stepRecipeData.name">
|
||||
<v-card class="ma-2 border-md">
|
||||
<v-card-title>
|
||||
<v-icon icon="$recipes"></v-icon>
|
||||
{{ step.stepRecipeData.name }}
|
||||
<v-btn icon="fa-solid fa-up-right-from-square" size="x-small" :to="{name: 'RecipeViewPage', params: {id: step.stepRecipeData.id}}" target="_blank" variant="plain"></v-btn>
|
||||
</v-card-title>
|
||||
<v-card-text class="mt-1" v-for="(subRecipeStep, subRecipeStepIndex) in step.stepRecipeData.steps" :key="subRecipeStep.id">
|
||||
<step-view v-model="step.stepRecipeData.steps[subRecipeStepIndex]" :step-number="subRecipeStepIndex+1" :ingredientFactor="ingredientFactor"></step-view>
|
||||
</v-card-text>
|
||||
@@ -57,6 +62,7 @@ import {Step} from "@/openapi";
|
||||
|
||||
import Instructions from "@/components/display/Instructions.vue";
|
||||
import Timer from "@/components/display/Timer.vue";
|
||||
import {useUserPreferenceStore} from "@/stores/UserPreferenceStore.ts";
|
||||
|
||||
const step = defineModel<Step>({required: true})
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<template>
|
||||
<v-btn-group density="compact">
|
||||
<v-btn color="create" @click="food.properties.push({} as Property)" prepend-icon="$create">{{ $t('Add') }}</v-btn>
|
||||
<v-btn color="create" @click="editingObj.properties.push({} as Property); addPropertiesFoodUnit()" prepend-icon="$create">{{ $t('Add') }}</v-btn>
|
||||
<v-btn color="secondary" @click="addAllProperties" prepend-icon="fa-solid fa-list">{{ $t('AddAll') }}</v-btn>
|
||||
<ai-action-button color="info" @selected="propertiesFromAi" :loading="aiLoading" prepend-icon="$ai">{{ $t('AI') }}</ai-action-button>
|
||||
</v-btn-group>
|
||||
|
||||
<v-row class="d-none d-md-flex mt-2" v-for="p in food.properties" dense>
|
||||
<v-row class="d-none d-md-flex mt-2" v-for="p in editingObj.properties" dense>
|
||||
<v-col cols="0" md="6">
|
||||
<v-number-input :step="10" v-model="p.propertyAmount" control-variant="stacked" :precision="2">
|
||||
<template #append-inner v-if="p.propertyType">
|
||||
@@ -25,7 +25,7 @@
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-list class="d-md-none">
|
||||
<v-list-item v-for="p in food.properties" border>
|
||||
<v-list-item v-for="p in editingObj.properties" border>
|
||||
<span v-if="p.propertyType">{{ p.propertyAmount }} {{ p.propertyType.unit }} {{ p.propertyType.name }} / {{ props.amountFor }}
|
||||
</span>
|
||||
<span v-else><i><{{ $t('New') }}></i></span>
|
||||
@@ -41,18 +41,23 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
|
||||
import {ApiApi, Food, Property} from "@/openapi";
|
||||
import {ApiApi, Food, Property, Recipe, Unit} from "@/openapi";
|
||||
import ModelEditDialog from "@/components/dialogs/ModelEditDialog.vue";
|
||||
import ModelSelect from "@/components/inputs/ModelSelect.vue";
|
||||
import {PropType, ref} from "vue";
|
||||
import {computed, nextTick, onMounted, ref} from "vue";
|
||||
import AiActionButton from "@/components/buttons/AiActionButton.vue";
|
||||
import {ErrorMessageType, useMessageStore} from "@/stores/MessageStore.ts";
|
||||
import {useUserPreferenceStore} from "@/stores/UserPreferenceStore.ts";
|
||||
|
||||
const props = defineProps({
|
||||
amountFor: {type: String, required: true},
|
||||
})
|
||||
|
||||
const food = defineModel<Food>({required: true})
|
||||
const isFood = computed(() => {
|
||||
return !('steps' in editingObj.value)
|
||||
})
|
||||
|
||||
const editingObj = defineModel<Food | Recipe>({required: true})
|
||||
|
||||
const aiLoading = ref(false)
|
||||
|
||||
@@ -61,8 +66,8 @@ const aiLoading = ref(false)
|
||||
* @param property property to delete
|
||||
*/
|
||||
function deleteProperty(property: Property) {
|
||||
if (food.value.properties) {
|
||||
food.value.properties = food.value.properties.filter(p => p !== property)
|
||||
if (editingObj.value.properties) {
|
||||
editingObj.value.properties = editingObj.value.properties.filter(p => p !== property)
|
||||
// TODO delete from DB, needs endpoint for property relation to either recipe or food
|
||||
}
|
||||
}
|
||||
@@ -74,14 +79,16 @@ function deleteProperty(property: Property) {
|
||||
function addAllProperties() {
|
||||
const api = new ApiApi()
|
||||
|
||||
if (food.value.properties) {
|
||||
food.value.properties = []
|
||||
}
|
||||
// if (editingObj.value.properties) {
|
||||
// editingObj.value.properties = []
|
||||
// }
|
||||
|
||||
addPropertiesFoodUnit()
|
||||
|
||||
api.apiPropertyTypeList().then(r => {
|
||||
r.results.forEach(pt => {
|
||||
if (food.value.properties.findIndex(x => x.propertyType.name == pt.name) == -1) {
|
||||
food.value.properties.push({propertyAmount: 0, propertyType: pt} as Property)
|
||||
if (editingObj.value.properties.findIndex(x => x.propertyType.name == pt.name) == -1) {
|
||||
editingObj.value.properties.push({propertyAmount: 0, propertyType: pt} as Property)
|
||||
}
|
||||
})
|
||||
})
|
||||
@@ -90,13 +97,39 @@ function addAllProperties() {
|
||||
function propertiesFromAi(providerId: number) {
|
||||
const api = new ApiApi()
|
||||
aiLoading.value = true
|
||||
api.apiFoodAipropertiesCreate({id: food.value.id!, food: food.value, provider: providerId}).then(r => {
|
||||
food.value = r
|
||||
}).catch(err => {
|
||||
useMessageStore().addError(ErrorMessageType.FETCH_ERROR, err)
|
||||
}).finally(() => {
|
||||
aiLoading.value = false
|
||||
})
|
||||
|
||||
if (isFood.value) {
|
||||
api.apiFoodAipropertiesCreate({id: editingObj.value.id!, food: editingObj.value, provider: providerId}).then(r => {
|
||||
editingObj.value = r
|
||||
nextTick(() => {
|
||||
addPropertiesFoodUnit()
|
||||
})
|
||||
}).catch(err => {
|
||||
useMessageStore().addError(ErrorMessageType.FETCH_ERROR, err)
|
||||
}).finally(() => {
|
||||
aiLoading.value = false
|
||||
})
|
||||
} else {
|
||||
api.apiRecipeAipropertiesCreate({id: editingObj.value.id!, recipe: editingObj.value, provider: providerId}).then(r => {
|
||||
editingObj.value = r
|
||||
}).catch(err => {
|
||||
useMessageStore().addError(ErrorMessageType.FETCH_ERROR, err)
|
||||
}).finally(() => {
|
||||
aiLoading.value = false
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* if its empty add the properties food unit
|
||||
*/
|
||||
function addPropertiesFoodUnit(){
|
||||
console.log('ADDING UNIT', !editingObj.value.propertiesFoodUnit)
|
||||
if (isFood.value && !editingObj.value.propertiesFoodUnit) {
|
||||
console.log('ADDING UNIT ACTUALLY')
|
||||
editingObj.value.propertiesFoodUnit = (useUserPreferenceStore().defaultUnitObj != null) ? useUserPreferenceStore().defaultUnitObj! : {name: 'g'} as Unit
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -26,11 +26,9 @@
|
||||
<v-progress-circular v-if="duplicateLoading" indeterminate size="small"></v-progress-circular>
|
||||
</template>
|
||||
</v-list-item>
|
||||
|
||||
<!-- TODO when calling print() some timing or whatever issue makes it so the useMediaQuery does not work and the sidebar is still shown -->
|
||||
<!-- <v-list-item prepend-icon="fa-solid fa-print" @click="openPrintView()">-->
|
||||
<!-- {{ $t('Print') }}-->
|
||||
<!-- </v-list-item>-->
|
||||
<v-list-item :to="{ name: 'RecipeViewPage', params: { id: recipe.id}, query: {print: 'true', servings: props.servings} }" :active="false" target="_blank" prepend-icon="fa-solid fa-print">
|
||||
{{ $t('Print') }}
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
</v-menu>
|
||||
</v-btn>
|
||||
@@ -49,22 +47,21 @@ import AddToShoppingDialog from "@/components/dialogs/AddToShoppingDialog.vue";
|
||||
import {ErrorMessageType, useMessageStore} from "@/stores/MessageStore.ts";
|
||||
import {useRouter} from "vue-router";
|
||||
import {useFileApi} from "@/composables/useFileApi.ts";
|
||||
import {useI18n} from "vue-i18n";
|
||||
|
||||
const router = useRouter()
|
||||
const {t} = useI18n()
|
||||
const {updateRecipeImage} = useFileApi()
|
||||
|
||||
const props = defineProps({
|
||||
recipe: {type: Object as PropType<Recipe | RecipeOverview>, required: true},
|
||||
servings: {type: Number, default: undefined},
|
||||
size: {type: String, default: 'medium'},
|
||||
})
|
||||
|
||||
const mealPlanDialog = ref(false)
|
||||
const duplicateLoading = ref(false)
|
||||
|
||||
function openPrintView() {
|
||||
print()
|
||||
}
|
||||
|
||||
/**
|
||||
* create a duplicate of the recipe by pulling its current data and creating a new recipe with the same data
|
||||
*/
|
||||
@@ -72,7 +69,27 @@ function duplicateRecipe() {
|
||||
let api = new ApiApi()
|
||||
duplicateLoading.value = true
|
||||
api.apiRecipeRetrieve({id: props.recipe.id!}).then(originalRecipe => {
|
||||
api.apiRecipeCreate({recipe: originalRecipe}).then(newRecipe => {
|
||||
|
||||
let recipe = {...originalRecipe, ...{id: undefined, name: originalRecipe.name + `(${t('Copy')})`}}
|
||||
recipe.steps = recipe.steps.map((step) => {
|
||||
return {
|
||||
...step,
|
||||
...{
|
||||
id: undefined,
|
||||
ingredients: step.ingredients.map((ingredient) => {
|
||||
return {...ingredient, ...{id: undefined}}
|
||||
}),
|
||||
},
|
||||
}
|
||||
})
|
||||
|
||||
if (recipe.properties != null) {
|
||||
recipe.properties = recipe.properties.map((p) => {
|
||||
return {...p, ...{id: undefined}}
|
||||
})
|
||||
}
|
||||
|
||||
api.apiRecipeCreate({recipe: recipe}).then(newRecipe => {
|
||||
|
||||
if (originalRecipe.image) {
|
||||
updateRecipeImage(newRecipe.id!, null, originalRecipe.image).then(r => {
|
||||
|
||||
@@ -60,56 +60,58 @@
|
||||
<v-label>{{ $t('Ingredients') }}</v-label>
|
||||
<div v-if="!mobile">
|
||||
<vue-draggable v-model="step.ingredients" handle=".drag-handle" :on-sort="sortIngredients" :empty-insert-threshold="25" group="ingredients">
|
||||
<v-row v-for="(ingredient, index) in step.ingredients" :key="ingredient.id" class="d-flex flex-nowrap" dense>
|
||||
<v-col cols="12" class="pa-0 ma-0 text-center text-disabled" v-if="ingredient.originalText">
|
||||
<div v-for="(ingredient, index) in step.ingredients" :key="ingredient.id" dense>
|
||||
<div class="pa-0 ma-0 text-center text-disabled" v-if="ingredient.originalText">
|
||||
<v-icon icon="$import" size="x-small"></v-icon>
|
||||
{{ ingredient.originalText }}
|
||||
</v-col>
|
||||
<div class="flex-col flex-grow-0 ma-1" style="min-width: 15%" v-if="!ingredient.isHeader">
|
||||
<v-text-field :id="`id_input_amount_${step.id}_${index}`" :label="$t('Amount')" type="number" v-model="ingredient.amount" density="compact"
|
||||
hide-details :disabled="ingredient.noAmount">
|
||||
</div>
|
||||
<div class="d-flex flex-nowrap">
|
||||
<div class="flex-col flex-grow-0 ma-1" style="min-width: 15%" v-if="!ingredient.isHeader">
|
||||
<v-number-input :id="`id_input_amount_${props.stepIndex}_${index}`" :label="$t('Amount')" v-model="ingredient.amount" density="compact"
|
||||
hide-details control-variant="hidden" :disabled="ingredient.noAmount" :precision="useUserPreferenceStore().userSettings.ingredientDecimals">
|
||||
|
||||
<template #prepend>
|
||||
<v-icon icon="$dragHandle" class="drag-handle cursor-grab"></v-icon>
|
||||
</template>
|
||||
</v-text-field>
|
||||
</div>
|
||||
<div class="flex-col flex-grow-0 ma-1" style="min-width: 15%" v-if="!ingredient.isHeader ">
|
||||
<model-select model="Unit" v-model="ingredient.unit" density="compact" allow-create hide-details :disabled="ingredient.noAmount"></model-select>
|
||||
</div>
|
||||
<div class="flex-col flex-grow-1 ma-1" style="min-width: 15%" v-if="!ingredient.isHeader">
|
||||
<model-select model="Food" v-model="ingredient.food" density="compact" allow-create hide-details></model-select>
|
||||
</div>
|
||||
<div class="flex-col ma-1" style="min-width: 15%" :class="{'flex-grow-1': ingredient.isHeader, 'flex-grow-0': !ingredient.isHeader}" @keydown.tab="event => handleIngredientNoteTab(event, index)">
|
||||
<v-text-field :label="(ingredient.isHeader) ? $t('Headline') : $t('Note')" v-model="ingredient.note" density="compact" hide-details>
|
||||
<template #prepend v-if="ingredient.isHeader">
|
||||
<v-icon icon="$dragHandle" class="drag-handle cursor-grab"></v-icon>
|
||||
</template>
|
||||
</v-text-field>
|
||||
</div>
|
||||
<div class="flex-col flex-grow-0 d-flex ma-1">
|
||||
<div class="d-flex align-center justify-center">
|
||||
<v-btn variant="plain" class="" density="compact" tabindex="-1" icon>
|
||||
<v-icon icon="$menu"></v-icon>
|
||||
<v-menu activator="parent">
|
||||
<v-list>
|
||||
<v-list-item link>
|
||||
<v-switch v-model="step.ingredients[index].isHeader" :label="$t('Headline')" hide-details></v-switch>
|
||||
</v-list-item>
|
||||
<v-list-item link>
|
||||
<v-switch v-model="step.ingredients[index].noAmount" :label="$t('Disable_Amount')" hide-details></v-switch>
|
||||
</v-list-item>
|
||||
<v-list-item @click="editingIngredientIndex = index; dialogIngredientSorter = true" prepend-icon="fa-solid fa-sort">
|
||||
{{ $t('Move') }}
|
||||
</v-list-item>
|
||||
<v-list-item @click="step.ingredients.splice(index, 1)" prepend-icon="$delete">{{ $t('Delete') }}</v-list-item>
|
||||
</v-list>
|
||||
</v-menu>
|
||||
</v-btn>
|
||||
<template #prepend>
|
||||
<v-icon icon="$dragHandle" class="drag-handle cursor-grab"></v-icon>
|
||||
</template>
|
||||
</v-number-input>
|
||||
</div>
|
||||
<div class="flex-col flex-grow-0 ma-1" style="min-width: 15%" v-if="!ingredient.isHeader ">
|
||||
<model-select model="Unit" v-model="ingredient.unit" density="compact" allow-create hide-details :disabled="ingredient.noAmount"></model-select>
|
||||
</div>
|
||||
<div class="flex-col flex-grow-1 ma-1" style="min-width: 15%" v-if="!ingredient.isHeader">
|
||||
<model-select model="Food" v-model="ingredient.food" density="compact" allow-create hide-details></model-select>
|
||||
</div>
|
||||
<div class="flex-col ma-1" style="min-width: 15%" :class="{'flex-grow-1': ingredient.isHeader, 'flex-grow-0': !ingredient.isHeader}"
|
||||
@keydown.tab="event => handleIngredientNoteTab(event, index)">
|
||||
<v-text-field :label="(ingredient.isHeader) ? $t('Headline') : $t('Note')" v-model="ingredient.note" density="compact" hide-details>
|
||||
<template #prepend v-if="ingredient.isHeader">
|
||||
<v-icon icon="$dragHandle" class="drag-handle cursor-grab"></v-icon>
|
||||
</template>
|
||||
</v-text-field>
|
||||
</div>
|
||||
<div class="flex-col flex-grow-0 d-flex ma-1">
|
||||
<div class="d-flex align-center justify-center">
|
||||
<v-btn variant="plain" class="" density="compact" tabindex="-1" icon>
|
||||
<v-icon icon="$menu"></v-icon>
|
||||
<v-menu activator="parent">
|
||||
<v-list>
|
||||
<v-list-item link>
|
||||
<v-switch v-model="step.ingredients[index].isHeader" :label="$t('Headline')" hide-details></v-switch>
|
||||
</v-list-item>
|
||||
<v-list-item link>
|
||||
<v-switch v-model="step.ingredients[index].noAmount" :label="$t('Disable_Amount')" hide-details></v-switch>
|
||||
</v-list-item>
|
||||
<v-list-item @click="editingIngredientIndex = index; dialogIngredientSorter = true" prepend-icon="fa-solid fa-sort">
|
||||
{{ $t('Move') }}
|
||||
</v-list-item>
|
||||
<v-list-item @click="step.ingredients.splice(index, 1)" prepend-icon="$delete">{{ $t('Delete') }}</v-list-item>
|
||||
</v-list>
|
||||
</v-menu>
|
||||
</v-btn>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</v-row>
|
||||
</div>
|
||||
</vue-draggable>
|
||||
</div>
|
||||
|
||||
@@ -193,7 +195,7 @@
|
||||
<v-text-field :label="$t('Original_Text')" readonly v-model="step.ingredients[editingIngredientIndex].originalText"
|
||||
v-if="step.ingredients[editingIngredientIndex].originalText"></v-text-field>
|
||||
<v-number-input v-model="step.ingredients[editingIngredientIndex].amount" inset control-variant="stacked" autofocus :label="$t('Amount')"
|
||||
:min="0" :precision="2" v-if="!step.ingredients[editingIngredientIndex].isHeader"></v-number-input>
|
||||
:min="0" :precision="useUserPreferenceStore().userSettings.ingredientDecimals" v-if="!step.ingredients[editingIngredientIndex].isHeader"></v-number-input>
|
||||
<model-select model="Unit" v-model="step.ingredients[editingIngredientIndex].unit" :label="$t('Unit')" v-if="!step.ingredients[editingIngredientIndex].isHeader"
|
||||
allow-create></model-select>
|
||||
<model-select model="Food" v-model="step.ingredients[editingIngredientIndex].food" :label="$t('Food')" v-if="!step.ingredients[editingIngredientIndex].isHeader"
|
||||
@@ -259,24 +261,6 @@ const dialogIngredientSorter = ref(false)
|
||||
const editingIngredientIndex = ref(0)
|
||||
const ingredientTextInput = ref("")
|
||||
|
||||
const defaultUnit = ref<null | Unit>(null)
|
||||
|
||||
onMounted(() => {
|
||||
let api = new ApiApi()
|
||||
|
||||
if (useUserPreferenceStore().userSettings.defaultUnit) {
|
||||
api.apiUnitList({query: useUserPreferenceStore().userSettings.defaultUnit}).then(r => {
|
||||
r.results.forEach(u => {
|
||||
if (u.name == useUserPreferenceStore().userSettings.defaultUnit) {
|
||||
defaultUnit.value = u
|
||||
}
|
||||
})
|
||||
}).catch(err => {
|
||||
useMessageStore().addError(ErrorMessageType.FETCH_ERROR, err)
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
/**
|
||||
* sort function called by draggable when ingredient table is sorted
|
||||
*/
|
||||
@@ -299,8 +283,9 @@ function parseAndInsertIngredients() {
|
||||
}
|
||||
})
|
||||
Promise.allSettled(promises).then(r => {
|
||||
step.value.ingredients = step.value.ingredients.filter(i => i.food != null || i.note != null || i.amount != 0)
|
||||
|
||||
r.forEach(i => {
|
||||
console.log(i)
|
||||
step.value.ingredients.push({
|
||||
originalText: i.value.originalText,
|
||||
amount: i.value.amount,
|
||||
@@ -332,14 +317,10 @@ function handleIngredientNoteTab(event: KeyboardEvent, index: number) {
|
||||
function insertAndFocusIngredient() {
|
||||
let ingredient = {
|
||||
amount: 0,
|
||||
unit: null,
|
||||
unit: useUserPreferenceStore().defaultUnitObj,
|
||||
food: null,
|
||||
} as Ingredient
|
||||
|
||||
if (defaultUnit.value != null) {
|
||||
ingredient.unit = defaultUnit.value
|
||||
}
|
||||
|
||||
step.value.ingredients.push(ingredient)
|
||||
nextTick(() => {
|
||||
sortIngredients()
|
||||
@@ -347,7 +328,7 @@ function insertAndFocusIngredient() {
|
||||
editingIngredientIndex.value = step.value.ingredients.length - 1
|
||||
dialogIngredientEditor.value = true
|
||||
} else {
|
||||
document.getElementById(`id_input_amount_${step.value.id}_${step.value.ingredients.length - 1}`).select()
|
||||
document.getElementById(`id_input_amount_${props.stepIndex}_${step.value.ingredients.length - 1}`).select()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -17,10 +17,10 @@
|
||||
<v-list density="compact">
|
||||
<v-list-subheader>{{$t('Ingredients')}}</v-list-subheader>
|
||||
<v-list-item
|
||||
v-for="template in templates"
|
||||
@click="insertTextAtPosition(template.template + ' ')"
|
||||
v-for="t in templates"
|
||||
@click="insertTextAtPosition(t.template + ' ')"
|
||||
>
|
||||
<ingredient-string :ingredient="template.ingredient"></ingredient-string>
|
||||
<ingredient-string :ingredient="t.ingredient"></ingredient-string>
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
</v-menu>
|
||||
@@ -65,7 +65,7 @@ const templates = computed(() => {
|
||||
function insertTextAtPosition(text: string){
|
||||
let textarea = markdownEditor.value.getTextareaDom()
|
||||
let position = textarea.selectionStart
|
||||
if (step.value.instruction){
|
||||
if (step.value.instruction != undefined){
|
||||
step.value.instruction = step.value.instruction.slice(0, position) + text + step.value.instruction.slice(position)
|
||||
|
||||
nextTick(() => {
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
<v-rating v-model="editingObj.rating" clearable hover density="compact"></v-rating>
|
||||
</v-col>
|
||||
<v-col cols="12" md="4">
|
||||
|
||||
<v-number-input :label="$t('Servings')" v-model="editingObj.servings" :precision="2"></v-number-input>
|
||||
</v-col>
|
||||
<v-col cols="12" md="4">
|
||||
@@ -42,7 +41,7 @@ import {onMounted, PropType, watch} from "vue";
|
||||
import {CookLog} from "@/openapi";
|
||||
import ModelEditorBase from "@/components/model_editors/ModelEditorBase.vue";
|
||||
import {useModelEditorFunctions} from "@/composables/useModelEditorFunctions";
|
||||
|
||||
import {VDateInput} from 'vuetify/labs/VDateInput' //TODO remove once component is out of labs
|
||||
|
||||
const props = defineProps({
|
||||
item: {type: {} as PropType<CookLog>, required: false, default: null},
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
<v-textarea :label="$t('Description')" v-model="editingObj.description"></v-textarea>
|
||||
<!-- TODO fix card overflow invisible, overflow-visible class is not working -->
|
||||
<model-select :label="$t('Category')" v-model="editingObj.supermarketCategory" model="SupermarketCategory" allow-create append-to-body></model-select>
|
||||
<model-select :label="$t('ShoppingList')" :hint="$t('DefaultShoppingListHelp')" v-model="editingObj.shoppingLists" model="ShoppingList" mode="tags" allow-create append-to-body></model-select>
|
||||
</v-form>
|
||||
</v-tabs-window-item>
|
||||
|
||||
@@ -226,7 +227,7 @@ function initializeEditor() {
|
||||
setupState(props.item, props.itemId, {
|
||||
newItemFunction: () => {
|
||||
editingObj.value.propertiesFoodAmount = 100
|
||||
editingObj.value.propertiesFoodUnit = {name: (useUserPreferenceStore().userSettings.defaultUnit != undefined ? useUserPreferenceStore().userSettings.defaultUnit : 'g')} as Unit
|
||||
editingObj.value.propertiesFoodUnit = (useUserPreferenceStore().defaultUnitObj != null) ? useUserPreferenceStore().defaultUnitObj! : {name: 'g'} as Unit
|
||||
},
|
||||
itemDefaults: props.itemDefaults,
|
||||
})
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
@update:modelValue="editingObj.servings = editingObj.recipe ? editingObj.recipe.servings : 1"></ModelSelect>
|
||||
<!-- <v-number-input label="Days" control-variant="split" :min="1"></v-number-input>-->
|
||||
<!--TODO create days input with +/- synced to date -->
|
||||
<recipe-card :recipe="editingObj.recipe" v-if="editingObj && editingObj.recipe" link-target="_blank"></recipe-card>
|
||||
<recipe-card :recipe="editingObj.recipe" :servings="editingObj.servings" v-if="editingObj && editingObj.recipe" link-target="_blank"></recipe-card>
|
||||
<v-btn prepend-icon="$shopping" color="create" class="mt-1" v-if="!editingObj.shopping && editingObj.recipe && isUpdate()">
|
||||
{{$t('Add')}}
|
||||
<add-to-shopping-dialog :recipe="editingObj.recipe" :meal-plan="editingObj" @created="loadShoppingListEntries(); editingObj.shopping = true;"></add-to-shopping-dialog>
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
<v-tabs v-model="tab" :disabled="loading || fileApiLoading" grow>
|
||||
<v-tab value="recipe">{{ $t('Recipe') }}</v-tab>
|
||||
<v-tab value="steps">{{ $t('Steps') }}</v-tab>
|
||||
<v-tab value="properties">{{ $t('Properties') }}</v-tab>
|
||||
<v-tab value="settings">{{ $t('Miscellaneous') }}</v-tab>
|
||||
<v-tab value="properties" :disabled="!isUpdate()">{{ $t('Properties') }}</v-tab>
|
||||
<v-tab value="settings" :disabled="!isUpdate()">{{ $t('Miscellaneous') }}</v-tab>
|
||||
</v-tabs>
|
||||
</v-card-text>
|
||||
<v-card-text v-if="!isSpaceAtRecipeLimit(useUserPreferenceStore().activeSpace)">
|
||||
@@ -87,6 +87,12 @@
|
||||
</v-row>
|
||||
|
||||
<v-form :disabled="loading || fileApiLoading">
|
||||
<v-row v-if="editingObj.steps.length == 0">
|
||||
<v-col class="text-center">
|
||||
<v-btn icon="$create" variant="outlined" size="x-small" @click="addStep(i+1)"></v-btn>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
<v-row v-for="(s,i ) in editingObj.steps" :key="s.id" dense>
|
||||
<v-col>
|
||||
<step-editor v-model="editingObj.steps[i]" v-model:recipe="editingObj" :step-index="i" @delete="deleteStepAtIndex(i)" @move="dialogStepManager = true"></step-editor>
|
||||
@@ -106,7 +112,10 @@
|
||||
<v-tabs-window-item value="properties">
|
||||
<v-form :disabled="loading || fileApiLoading">
|
||||
<closable-help-alert :text="$t('PropertiesFoodHelp')"></closable-help-alert>
|
||||
<properties-editor v-model="editingObj.properties" :amount-for="$t('Serving')"></properties-editor>
|
||||
<properties-editor v-model="editingObj" :amount-for="$t('Serving')"></properties-editor>
|
||||
|
||||
<!-- TODO remove once append to body for model select is working properly -->
|
||||
<v-spacer style="margin-top: 100px;"></v-spacer>
|
||||
</v-form>
|
||||
</v-tabs-window-item>
|
||||
<v-tabs-window-item value="settings">
|
||||
@@ -226,7 +235,7 @@ function initializeEditor() {
|
||||
addStep()
|
||||
editingObj.value.steps[0].ingredients.push({
|
||||
food: null,
|
||||
unit: null,
|
||||
unit: useUserPreferenceStore().defaultUnitObj,
|
||||
amount: 0,
|
||||
} as Ingredient)
|
||||
editingObj.value.internal = true //TODO make database default after v2
|
||||
|
||||
68
vue3/src/components/model_editors/ShoppingListEditor.vue
Normal file
68
vue3/src/components/model_editors/ShoppingListEditor.vue
Normal file
@@ -0,0 +1,68 @@
|
||||
<template>
|
||||
<model-editor-base
|
||||
:loading="loading"
|
||||
:dialog="dialog"
|
||||
@save="saveObject"
|
||||
@delete="deleteObject"
|
||||
@close="emit('close'); editingObjChanged = false"
|
||||
:is-update="isUpdate()"
|
||||
:is-changed="editingObjChanged"
|
||||
:model-class="modelClass"
|
||||
:object-name="editingObjName()"
|
||||
:editing-object="editingObj">
|
||||
<v-card-text>
|
||||
<v-form :disabled="loading">
|
||||
<v-text-field :label="$t('Name')" v-model="editingObj.name"></v-text-field>
|
||||
<v-textarea :label="$t('Description')" v-model="editingObj.description" :rows="2" auto-grow></v-textarea>
|
||||
<v-color-picker :label="$t('Color')" v-model="editingObj.color" mode="hex" :modes="['hex']" show-swatches
|
||||
:swatches="[['#ddbf86'],['#b98766'],['#b55e4f'],['#82aa8b'],['#385f84']]"></v-color-picker>
|
||||
</v-form>
|
||||
</v-card-text>
|
||||
</model-editor-base>
|
||||
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
|
||||
import {onMounted, PropType, watch} from "vue";
|
||||
import {ShoppingList, ShoppingListEntry} from "@/openapi";
|
||||
import ModelEditorBase from "@/components/model_editors/ModelEditorBase.vue";
|
||||
import {useModelEditorFunctions} from "@/composables/useModelEditorFunctions";
|
||||
import ModelSelect from "@/components/inputs/ModelSelect.vue";
|
||||
|
||||
const props = defineProps({
|
||||
item: {type: {} as PropType<ShoppingList>, required: false, default: null},
|
||||
itemId: {type: [Number, String], required: false, default: undefined},
|
||||
itemDefaults: {type: {} as PropType<ShoppingList>, required: false, default: {} as ShoppingList},
|
||||
dialog: {type: Boolean, default: false}
|
||||
})
|
||||
|
||||
const emit = defineEmits(['create', 'save', 'delete', 'close', 'changedState'])
|
||||
const {setupState, deleteObject, saveObject, isUpdate, editingObjName, loading, editingObj, editingObjChanged, modelClass} = useModelEditorFunctions<ShoppingList>('ShoppingList', emit)
|
||||
|
||||
/**
|
||||
* watch prop changes and re-initialize editor
|
||||
* required to embed editor directly into pages and be able to change item from the outside
|
||||
*/
|
||||
watch([() => props.item, () => props.itemId], () => {
|
||||
initializeEditor()
|
||||
})
|
||||
|
||||
// object specific data (for selects/display)
|
||||
|
||||
onMounted(() => {
|
||||
initializeEditor()
|
||||
})
|
||||
|
||||
/**
|
||||
* component specific state setup logic
|
||||
*/
|
||||
function initializeEditor(){
|
||||
setupState(props.item, props.itemId, {itemDefaults: props.itemDefaults})
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -19,11 +19,11 @@
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col md="6">
|
||||
<v-number-input :label="$t('Amount')" :step="10" v-model="editingObj.baseAmount" control-variant="stacked" :precision="3"></v-number-input>
|
||||
<v-number-input :label="$t('Amount')" :step="10" v-model="editingObj.baseAmount" control-variant="stacked" :precision="3" :min="0.001"></v-number-input>
|
||||
</v-col>
|
||||
<v-col md="6">
|
||||
<!-- TODO fix card overflow invisible, overflow-visible class is not working -->
|
||||
<model-select :label="$t('Unit')" v-model="editingObj.baseUnit" model="Unit"></model-select>
|
||||
<model-select v-model="editingObj.baseUnit" model="Unit"></model-select>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row class="mt-0">
|
||||
@@ -33,11 +33,11 @@
|
||||
</v-row>
|
||||
<v-row>
|
||||
<v-col md="6">
|
||||
<v-number-input :label="$t('Amount')" :step="10" v-model="editingObj.convertedAmount" control-variant="stacked" :precision="3"></v-number-input>
|
||||
<v-number-input :label="$t('Amount')" :step="10" v-model="editingObj.convertedAmount" control-variant="stacked" :precision="3" :min="0.001"></v-number-input>
|
||||
</v-col>
|
||||
<v-col md="6">
|
||||
<!-- TODO fix card overflow invisible, overflow-visible class is not working -->
|
||||
<model-select :label="$t('Unit')" v-model="editingObj.convertedUnit" model="Unit"></model-select>
|
||||
<model-select v-model="editingObj.convertedUnit" model="Unit"></model-select>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row>
|
||||
|
||||
@@ -29,7 +29,11 @@
|
||||
<v-checkbox v-model="useUserPreferenceStore().deviceSettings.start_showMealPlan" :label="$t('ShowMealPlanOnStartPage')"></v-checkbox>
|
||||
|
||||
<v-btn @click="useUserPreferenceStore().resetDeviceSettings()" color="warning">{{ $t('Reset') }}</v-btn> <br/>
|
||||
<v-btn @click="useUserPreferenceStore().deviceSettings.general_closedHelpAlerts = []" color="warning" class="mt-1">{{ $t('ResetHelp') }}</v-btn>
|
||||
<v-btn @click="useUserPreferenceStore().deviceSettings.general_closedHelpAlerts = []" color="warning" class="mt-1">{{ $t('ResetHelp') }}</v-btn> <br/>
|
||||
<v-btn color="info" class="mt-1">
|
||||
<message-list-dialog></message-list-dialog>
|
||||
{{ $t('Messages') }}
|
||||
</v-btn>
|
||||
|
||||
</v-form>
|
||||
</template>
|
||||
@@ -43,6 +47,7 @@ import {ErrorMessageType, PreparedMessage, useMessageStore} from "@/stores/Messa
|
||||
import {useUserPreferenceStore} from "@/stores/UserPreferenceStore";
|
||||
import {useDjangoUrls} from "@/composables/useDjangoUrls";
|
||||
import ThankYouNote from "@/components/display/ThankYouNote.vue";
|
||||
import MessageListDialog from "@/components/dialogs/MessageListDialog.vue";
|
||||
|
||||
const {getDjangoUrl} = useDjangoUrls()
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
Authentication works by proving the word <code>Bearer</code> followed by an API Token as a request Authorization
|
||||
header as shown below. <br/>
|
||||
<code>Authorization: Bearer TOKEN</code> -or-<br/>
|
||||
<code>curl -X GET http://your.domain.com/api/recipes/ -H 'Authorization:
|
||||
<code>curl -X GET http://your.domain.com/api/recipe/ -H 'Authorization:
|
||||
Bearer TOKEN'</code>
|
||||
|
||||
<br/>
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
<v-checkbox :label="$t('mealplan_autoinclude_related')" :hint="$t('mealplan_autoinclude_related_desc')" persistent-hint v-model="useUserPreferenceStore().userSettings.mealplanAutoincludeRelated"></v-checkbox>
|
||||
<v-checkbox :label="$t('shopping_add_onhand')" :hint="$t('shopping_add_onhand_desc')" persistent-hint v-model="useUserPreferenceStore().userSettings.shoppingAddOnhand"></v-checkbox>
|
||||
<v-checkbox :label="$t('filter_to_supermarket')" :hint="$t('filter_to_supermarket_desc')" persistent-hint v-model="useUserPreferenceStore().userSettings.filterToSupermarket"></v-checkbox>
|
||||
<v-checkbox :label="$t('UpdateFoodLists')" :hint="$t('UpdateFoodListsHelp')" persistent-hint v-model="useUserPreferenceStore().userSettings.shoppingUpdateFoodLists"></v-checkbox>
|
||||
|
||||
<v-number-input
|
||||
class="mt-2"
|
||||
|
||||
@@ -124,6 +124,8 @@ export function useFileApi() {
|
||||
* @returns Promise resolving to the import ID of the app import
|
||||
*/
|
||||
function doAppImport(files: File[], app: string, includeDuplicates: boolean, mealPlans: boolean = true, shoppingLists: boolean = true, nutritionPerServing: boolean = false,) {
|
||||
fileApiLoading.value = true
|
||||
|
||||
let formData = new FormData()
|
||||
formData.append('type', app);
|
||||
formData.append('duplicates', includeDuplicates ? 'true' : 'false')
|
||||
|
||||
@@ -16,7 +16,7 @@ export function useNavigation() {
|
||||
{component: VListItem, prependIcon: '$recipes', title: 'Home', to: {name: 'StartPage', params: {}}},
|
||||
{component: VListItem, prependIcon: '$search', title: t('Search'), to: {name: 'SearchPage', params: {}}},
|
||||
{component: VListItem, prependIcon: '$mealplan', title: t('Meal_Plan'), to: {name: 'MealPlanPage', params: {}}},
|
||||
{component: VListItem, prependIcon: '$shopping', title: t('Shopping_list'), to: {name: 'ShoppingListPage', params: {}}},
|
||||
{component: VListItem, prependIcon: '$shopping', title: t('Shopping'), to: {name: 'ShoppingListPage', params: {}}},
|
||||
{component: VListItem, prependIcon: 'fas fa-globe', title: t('Import'), to: {name: 'RecipeImportPage', params: {}}},
|
||||
{component: VListItem, prependIcon: '$books', title: t('Books'), to: {name: 'BooksPage', params: {}}},
|
||||
{component: VListItem, prependIcon: 'fa-solid fa-folder-tree', title: t('Database'), to: {name: 'DatabasePage', params: {}}},
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
"AiModelHelp": "",
|
||||
"AiProvider": "",
|
||||
"AiProviderHelp": "",
|
||||
"All": "",
|
||||
"App": "",
|
||||
"Apply": "",
|
||||
"Are_You_Sure": "",
|
||||
@@ -115,6 +116,7 @@
|
||||
"Fats": "",
|
||||
"File": "",
|
||||
"Files": "",
|
||||
"Finish": "",
|
||||
"Food": "",
|
||||
"FoodInherit": "",
|
||||
"FoodNotOnHand": "",
|
||||
@@ -266,6 +268,7 @@
|
||||
"Ratings": "",
|
||||
"Recently_Viewed": "",
|
||||
"Recipe": "",
|
||||
"RecipeStructure": "",
|
||||
"Recipe_Book": "",
|
||||
"Recipe_Image": "",
|
||||
"Recipes": "",
|
||||
@@ -313,6 +316,7 @@
|
||||
"SpaceMembersHelp": "",
|
||||
"SpaceName": "",
|
||||
"SpacePrivateObjectsHelp": "",
|
||||
"Start": "",
|
||||
"Starting_Day": "",
|
||||
"StartsWith": "",
|
||||
"StartsWithHelp": "",
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
"AiModelHelp": "",
|
||||
"AiProvider": "",
|
||||
"AiProviderHelp": "",
|
||||
"All": "",
|
||||
"App": "Приложение",
|
||||
"Apply": "",
|
||||
"Are_You_Sure": "Сигурен ли си?",
|
||||
@@ -112,6 +113,7 @@
|
||||
"Fats": "Мазнини",
|
||||
"File": "Файл",
|
||||
"Files": "Файлове",
|
||||
"Finish": "",
|
||||
"Food": "Храна",
|
||||
"FoodInherit": "Хранителни наследствени полета",
|
||||
"FoodNotOnHand": "Нямате {храна} под ръка.",
|
||||
@@ -259,6 +261,7 @@
|
||||
"Ratings": "Рейтинги",
|
||||
"Recently_Viewed": "Наскоро разгледани",
|
||||
"Recipe": "Рецепта",
|
||||
"RecipeStructure": "",
|
||||
"Recipe_Book": "Книга с рецепти",
|
||||
"Recipe_Image": "Изображение на рецептата",
|
||||
"Recipes": "Рецепти",
|
||||
@@ -306,6 +309,7 @@
|
||||
"SpaceMembersHelp": "",
|
||||
"SpaceName": "",
|
||||
"SpacePrivateObjectsHelp": "",
|
||||
"Start": "",
|
||||
"Starting_Day": "Начален ден от седмицата",
|
||||
"StartsWith": "",
|
||||
"StartsWithHelp": "",
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
"AiProvider": "",
|
||||
"AiProviderHelp": "",
|
||||
"Alignment": "Alineació",
|
||||
"All": "",
|
||||
"Amount": "Quantitat",
|
||||
"App": "Aplicació",
|
||||
"Apply": "",
|
||||
@@ -154,6 +155,7 @@
|
||||
"Fats": "Greixos",
|
||||
"File": "Arxiu",
|
||||
"Files": "Arxius",
|
||||
"Finish": "",
|
||||
"First_name": "Nom",
|
||||
"Food": "Aliment",
|
||||
"FoodInherit": "Camps Heretats",
|
||||
@@ -336,6 +338,7 @@
|
||||
"Ratings": "Avaluació",
|
||||
"Recently_Viewed": "Vistos recentment",
|
||||
"Recipe": "Recepta",
|
||||
"RecipeStructure": "",
|
||||
"Recipe_Book": "Llibre de receptes",
|
||||
"Recipe_Image": "Imatge de la recepta",
|
||||
"Recipes": "Receptes",
|
||||
@@ -393,6 +396,7 @@
|
||||
"SpacePrivateObjectsHelp": "",
|
||||
"Space_Cosmetic_Settings": "Un administrador de l'espai podria canviar algunes configuracions estètiques i tindrien prioritat sobre la configuració dels usuaris per a aquest espai.",
|
||||
"Split_All_Steps": "Dividir totes les files en passos separats.",
|
||||
"Start": "",
|
||||
"StartDate": "Data d'inici",
|
||||
"Starting_Day": "Dia d'inici de la setmana",
|
||||
"StartsWith": "",
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
"AiProvider": "",
|
||||
"AiProviderHelp": "",
|
||||
"Alignment": "Zarovnání",
|
||||
"All": "",
|
||||
"Amount": "Množství",
|
||||
"App": "Aplikace",
|
||||
"Apply": "",
|
||||
@@ -153,6 +154,7 @@
|
||||
"Fats": "Tuky",
|
||||
"File": "Soubor",
|
||||
"Files": "Soubory",
|
||||
"Finish": "",
|
||||
"First_name": "Jméno",
|
||||
"Food": "Potravina",
|
||||
"FoodInherit": "Propisovatelná pole potraviny",
|
||||
@@ -333,6 +335,7 @@
|
||||
"Ratings": "Hodnocení",
|
||||
"Recently_Viewed": "Naposledy prohlížené",
|
||||
"Recipe": "Recept",
|
||||
"RecipeStructure": "",
|
||||
"Recipe_Book": "Kuchařka",
|
||||
"Recipe_Image": "Obrázek k receptu",
|
||||
"Recipes": "Recepty",
|
||||
@@ -388,6 +391,7 @@
|
||||
"SpacePrivateObjectsHelp": "",
|
||||
"Space_Cosmetic_Settings": "Některá kosmetická nastavení mohou měnit správci prostoru a budou mít přednost před nastavením klienta pro daný prostor.",
|
||||
"Split_All_Steps": "Rozdělit každý řádek do samostatného kroku.",
|
||||
"Start": "",
|
||||
"StartDate": "Počáteční datum",
|
||||
"Starting_Day": "První den v týdnu",
|
||||
"StartsWith": "",
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
"AiProvider": "",
|
||||
"AiProviderHelp": "",
|
||||
"Alignment": "Justering",
|
||||
"All": "",
|
||||
"Amount": "Mængde",
|
||||
"App": "App",
|
||||
"Apply": "",
|
||||
@@ -154,6 +155,7 @@
|
||||
"Fats": "Fedtstoffer",
|
||||
"File": "Fil",
|
||||
"Files": "Filer",
|
||||
"Finish": "",
|
||||
"First_name": "Fornavn",
|
||||
"Food": "Mad",
|
||||
"FoodInherit": "Nedarvelige mad felter",
|
||||
@@ -336,6 +338,7 @@
|
||||
"Ratings": "Bedømmelser",
|
||||
"Recently_Viewed": "Vist for nylig",
|
||||
"Recipe": "Opskrift",
|
||||
"RecipeStructure": "",
|
||||
"Recipe_Book": "Opskriftsbog",
|
||||
"Recipe_Image": "Opskriftsbillede",
|
||||
"Recipes": "Opskrifter",
|
||||
@@ -393,6 +396,7 @@
|
||||
"SpacePrivateObjectsHelp": "",
|
||||
"Space_Cosmetic_Settings": "Visse kosmetiske indstillinger kan ændres af område-administratorer og vil overskrive klient-indstillinger for pågældende område.",
|
||||
"Split_All_Steps": "Opdel rækker i separate trin.",
|
||||
"Start": "",
|
||||
"StartDate": "Startdato",
|
||||
"Starting_Day": "Første dag på ugen",
|
||||
"StartsWith": "",
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
"AiProvider": "AI Anbieter",
|
||||
"AiProviderHelp": "Je nach Präferenz können verschiedene AI Anbieter angelegt werden. Diese können auch Space übergreifend sein.",
|
||||
"Alignment": "Ausrichtung",
|
||||
"All": "Alle",
|
||||
"AllRecipes": "Alle Rezepte",
|
||||
"Amount": "Menge",
|
||||
"App": "App",
|
||||
@@ -57,7 +58,7 @@
|
||||
"BaseUnit": "Basiseinheit",
|
||||
"BaseUnitHelp": "Optionale Standardeinheit zur automatischen Umrechnung",
|
||||
"Basics": "Grundlagen",
|
||||
"BatchDeleteConfirm": "Möchtest du alle angezeigten Objekte löschen? Dies kann nicht rückgängig gemacht werden!",
|
||||
"BatchDeleteConfirm": "Möchtest du alle angezeigten Objekte löschen? Dies kann nicht rückgängig gemacht werden! ACHTUNG: Es ist möglich das Objekte gelöscht werden die an anderen Stellen verwendet werden!",
|
||||
"BatchDeleteHelp": "Wenn ein Objekt nicht gelöscht werden kann, wird es noch irgendwo verwendet. ",
|
||||
"BatchEdit": "Massenbearbeitung",
|
||||
"BatchEditUpdatingItemsCount": "Bearbeite {count} {type}",
|
||||
@@ -151,6 +152,7 @@
|
||||
"Decimals": "Nachkommastellen",
|
||||
"Default": "Standard",
|
||||
"DefaultPage": "Standardseite",
|
||||
"DefaultShoppingListHelp": "Standard Liste wenn dieses Lebensmittel auf die Einkaufsliste gesetzt wird.",
|
||||
"Default_Unit": "Standardeinheit",
|
||||
"DelayFor": "Um {hours} Stunden verschieben",
|
||||
"DelayUntil": "Verzögerung bis",
|
||||
@@ -212,6 +214,7 @@
|
||||
"Fats": "Fette",
|
||||
"File": "Datei",
|
||||
"Files": "Dateien",
|
||||
"Finish": "Fertigstellen",
|
||||
"FinishedAt": "Fertig um",
|
||||
"First": "Erstes",
|
||||
"First_name": "Vorname",
|
||||
@@ -374,6 +377,7 @@
|
||||
"NoUnit": "Keine Einheit",
|
||||
"No_ID": "ID nicht gefunden und kann nicht gelöscht werden.",
|
||||
"No_Results": "Keine Ergebnisse",
|
||||
"None": "Keine",
|
||||
"NotFound": "Nicht gefunden",
|
||||
"NotFoundHelp": "Die gesuchte Seite konnte nicht gefunden werden.",
|
||||
"NotInShopping": "{food} befindet sich nicht auf Ihrer Einkaufsliste.",
|
||||
@@ -453,6 +457,7 @@
|
||||
"RecipeBookHelp": "Rezeptbücher enthalten Rezeptbucheinträge oder können über hinterlegte gespeicherte Suchen automatisch gefüllt werden. ",
|
||||
"RecipeHelp": "Rezepte sind die Grundlage von Tandoor und bestehen aus allgemeinen Informationen und Schritten, die wiederrum aus Zutaten, Texten und mehr bestehen. ",
|
||||
"RecipeStepsHelp": "Zutaten, Anleitungen und mehr können unter dem Tab Schritte hinzugefügt werden.",
|
||||
"RecipeStructure": "Rezept Struktur",
|
||||
"Recipe_Book": "Kochbuch",
|
||||
"Recipe_Image": "Rezeptbild",
|
||||
"Recipes": "Rezepte",
|
||||
@@ -501,14 +506,17 @@
|
||||
"Share": "Teilen",
|
||||
"ShopLater": "Später kaufen",
|
||||
"ShopNow": "Jetzt kaufen",
|
||||
"Shopping": "Einkaufen",
|
||||
"ShoppingBackgroundSyncWarning": "Schlechte Netzwerkverbindung, Warten auf Synchronisation ...",
|
||||
"ShoppingList": "Einkaufsliste",
|
||||
"ShoppingListEntry": "Einkaufslisten Eintrag",
|
||||
"ShoppingListEntryHelp": "Einträge auf der Einkaufsliste können manuell oder automatisch durch Rezepte und Essenspläne erstellt werden.",
|
||||
"ShoppingListHelp": "Erlaubt es Einträge auf verschiedene Listen zu setzten. Beispielsweise für verschiedene Supermärkte, Angebote oder Ereignisse. ",
|
||||
"ShoppingListRecipe": "Einkaufslisten Rezepte",
|
||||
"Shopping_Categories": "Einkaufskategorien",
|
||||
"Shopping_Category": "Einkaufskategorie",
|
||||
"Shopping_List_Empty": "Deine Einkaufsliste ist aktuell leer. Einträge können über das Kontextmenü hinzugefügt werden (Rechtsklick auf einen Eintrag oder Klick auf das Menü-Icon)",
|
||||
"Shopping_input_placeholder": "z.B. Kartoffeln/ 100 Kartoffeln/ 100 g Kartoffeln",
|
||||
"Shopping_input_placeholder": "z.B. 100 g Kartoffeln",
|
||||
"Shopping_list": "Einkaufsliste",
|
||||
"ShowDelayed": "Zeige verschobene Elemente",
|
||||
"ShowIngredients": "Zutaten anzeigen",
|
||||
@@ -540,6 +548,7 @@
|
||||
"Space_Cosmetic_Settings": "Kosmetische Einstellungen auf Space Ebene überschreiben die Einstellungen der einzelnen Nutzer.",
|
||||
"Split": "Aufteilen",
|
||||
"Split_All_Steps": "Teile alle Zeilen in separate Schritte auf.",
|
||||
"Start": "Start",
|
||||
"StartDate": "Startdatum",
|
||||
"Starting_Day": "Wochenbeginn am",
|
||||
"StartsWith": "Beginnt mit",
|
||||
@@ -593,7 +602,7 @@
|
||||
"TrigramThresholdHelp": "Steuert bei der Verwendung unscharfer Suche wie viele Unterschiede zugelasen werden. Niedrigere Werte führen zu mehr Ergebnissen/größerer Unschärfe.",
|
||||
"Tuesday": "Dienstag",
|
||||
"Type": "Typ",
|
||||
"UPDATE_ERROR": "Fehler beim aktualisieren",
|
||||
"UPDATE_ERROR": "Fehler beim Aktualisieren",
|
||||
"Unchanged": "Unverändert",
|
||||
"Undefined": "undefiniert",
|
||||
"Undo": "Rückgängig",
|
||||
@@ -609,6 +618,8 @@
|
||||
"Unrated": "Unbewertet",
|
||||
"Up": "Hoch",
|
||||
"Update": "Aktualisieren",
|
||||
"UpdateFoodLists": "Lebensmittel Einkaufslisten aktualisieren",
|
||||
"UpdateFoodListsHelp": "Aktualisiert die Standardeinkaufslisten im Lebensmittel wenn diese beim Einkaufen geändert werden.",
|
||||
"Update_Existing_Data": "Vorhandene Daten aktualisieren",
|
||||
"Updated": "Aktualisiert",
|
||||
"UpgradeNow": "Jetzt Upgraden",
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
"AiProvider": "",
|
||||
"AiProviderHelp": "",
|
||||
"Alignment": "Ευθυγράμμιση",
|
||||
"All": "",
|
||||
"Amount": "Ποσότητα",
|
||||
"App": "Εφαρμογή",
|
||||
"Apply": "",
|
||||
@@ -154,6 +155,7 @@
|
||||
"Fats": "Λιπαρά",
|
||||
"File": "Αρχείο",
|
||||
"Files": "Αρχεία",
|
||||
"Finish": "",
|
||||
"First_name": "Όνομα",
|
||||
"Food": "Φαγητό",
|
||||
"FoodInherit": "Πεδία φαγητών που κληρονομούνται",
|
||||
@@ -336,6 +338,7 @@
|
||||
"Ratings": "Βαθμολογίες",
|
||||
"Recently_Viewed": "Προβλήθηκαν πρόσφατα",
|
||||
"Recipe": "Συνταγή",
|
||||
"RecipeStructure": "",
|
||||
"Recipe_Book": "Βιβλίο συνταγών",
|
||||
"Recipe_Image": "Εικόνα συνταγής",
|
||||
"Recipes": "Συνταγές",
|
||||
@@ -393,6 +396,7 @@
|
||||
"SpacePrivateObjectsHelp": "",
|
||||
"Space_Cosmetic_Settings": "Ορισμένες ρυθμίσεις εμφάνισης μπορούν να αλλάξουν από τους διαχειριστές του χώρου και θα παρακάμψουν τις ρυθμίσεις πελάτη για αυτόν τον χώρο.",
|
||||
"Split_All_Steps": "Διαχωρισμός όλων των γραμμών σε χωριστά βήματα.",
|
||||
"Start": "",
|
||||
"StartDate": "Ημερομηνία Έναρξης",
|
||||
"Starting_Day": "Πρώτη μέρα της εβδομάδας",
|
||||
"StartsWith": "",
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
"AiProvider": "AI Provider",
|
||||
"AiProviderHelp": "You can configure multiple AI providers according to your preferences. They can even be configured to work across multiple spaces.",
|
||||
"Alignment": "Alignment",
|
||||
"All": "All",
|
||||
"AllRecipes": "All Recipes",
|
||||
"Amount": "Amount",
|
||||
"App": "App",
|
||||
@@ -55,7 +56,7 @@
|
||||
"BaseUnit": "Base Unit",
|
||||
"BaseUnitHelp": "Standard unit for automatic unit conversion",
|
||||
"Basics": "Basics",
|
||||
"BatchDeleteConfirm": "Do you want to delete all shown items? This cannot be undone!",
|
||||
"BatchDeleteConfirm": "Do you want to delete all shown items? This cannot be undone! WARNING: It is possible that this deletes objects that are used elsewhere. ",
|
||||
"BatchDeleteHelp": "If an item cannot be deleted it is used somewhere. ",
|
||||
"BatchEdit": "Batch Edit",
|
||||
"BatchEditUpdatingItemsCount": "Editing {count} {type}",
|
||||
@@ -149,6 +150,7 @@
|
||||
"Decimals": "Decimals",
|
||||
"Default": "Default",
|
||||
"DefaultPage": "Default Page",
|
||||
"DefaultShoppingListHelp": "Default List when this Food is added to the Shoppinglist.",
|
||||
"Default_Unit": "Default Unit",
|
||||
"DelayFor": "Delay for {hours} hours",
|
||||
"DelayUntil": "Delay Until",
|
||||
@@ -210,6 +212,7 @@
|
||||
"Fats": "Fats",
|
||||
"File": "File",
|
||||
"Files": "Files",
|
||||
"Finish": "Finish",
|
||||
"FinishedAt": "Finished at",
|
||||
"First": "First",
|
||||
"First_name": "First Name",
|
||||
@@ -372,6 +375,7 @@
|
||||
"NoUnit": "No Unit",
|
||||
"No_ID": "ID not found, cannot delete.",
|
||||
"No_Results": "No Results",
|
||||
"None": "None",
|
||||
"NotFound": "Not found",
|
||||
"NotFoundHelp": "The page or object you are looking for could not be found.",
|
||||
"NotInShopping": "{food} is not in your shopping list.",
|
||||
@@ -451,6 +455,7 @@
|
||||
"RecipeBookHelp": "Recipebooks contain recipe book entries or can be automatically populated by using saved search filters. ",
|
||||
"RecipeHelp": "Recipes are the foundation of Tandoor and consist of general information and steps, made up of ingredients, instructions and more. ",
|
||||
"RecipeStepsHelp": "Ingredients, Instructions and more can be edited in the tab Steps.",
|
||||
"RecipeStructure": "Recipe Structure",
|
||||
"Recipe_Book": "Recipe Book",
|
||||
"Recipe_Image": "Recipe Image",
|
||||
"Recipes": "Recipes",
|
||||
@@ -499,14 +504,17 @@
|
||||
"Share": "Share",
|
||||
"ShopLater": "Shop later",
|
||||
"ShopNow": "Shop now",
|
||||
"Shopping": "Shopping",
|
||||
"ShoppingBackgroundSyncWarning": "Bad network, waiting to sync ...",
|
||||
"ShoppingList": "Shoppinglist",
|
||||
"ShoppingListEntry": "Shoppinglist Entry",
|
||||
"ShoppingListEntryHelp": "Shopping list entries can be created manually or trough recipes and meal plans.",
|
||||
"ShoppingListHelp": "Allows you to put entries on different lists. Can be used for different supermarkets, special offers or events. ",
|
||||
"ShoppingListRecipe": "Shoppinglist Recipe",
|
||||
"Shopping_Categories": "Shopping Categories",
|
||||
"Shopping_Category": "Shopping Category",
|
||||
"Shopping_List_Empty": "Your shopping list is currently empty, you can add items via the context menu of a meal plan entry (right click on the card or left click the menu icon)",
|
||||
"Shopping_input_placeholder": "e.g. Potato/100 Potatoes/100 g Potatoes",
|
||||
"Shopping_input_placeholder": "e.g. 100 g Potatoes",
|
||||
"Shopping_list": "Shopping List",
|
||||
"ShowDelayed": "Show delayed items",
|
||||
"ShowIngredients": "Show Ingredients",
|
||||
@@ -538,6 +546,7 @@
|
||||
"Space_Cosmetic_Settings": "Some cosmetic settings can be changed by space administrators and will override client settings for that space.",
|
||||
"Split": "Split",
|
||||
"Split_All_Steps": "Split all rows into separate steps.",
|
||||
"Start": "Start",
|
||||
"StartDate": "Start Date",
|
||||
"Starting_Day": "Starting day of the week",
|
||||
"StartsWith": "Starts with",
|
||||
@@ -607,6 +616,8 @@
|
||||
"Unrated": "Unrated",
|
||||
"Up": "Up",
|
||||
"Update": "Update",
|
||||
"UpdateFoodLists": "Update Food Shoppinglists",
|
||||
"UpdateFoodListsHelp": "Update the default shopping lists in the food when changing shopping lists during shopping.",
|
||||
"Update_Existing_Data": "Update Existing Data",
|
||||
"Updated": "Updated",
|
||||
"UpgradeNow": "Upgrade now",
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
"AiProvider": "",
|
||||
"AiProviderHelp": "",
|
||||
"Alignment": "Alineación",
|
||||
"All": "",
|
||||
"AllRecipes": "Todas las recetas",
|
||||
"Amount": "Cantidad",
|
||||
"App": "Aplicación",
|
||||
@@ -207,6 +208,7 @@
|
||||
"Fats": "Grasas",
|
||||
"File": "Archivo",
|
||||
"Files": "Archivos",
|
||||
"Finish": "",
|
||||
"FinishedAt": "Finaliza a las",
|
||||
"First": "Primero",
|
||||
"First_name": "Nombre",
|
||||
@@ -438,6 +440,7 @@
|
||||
"RecipeBookHelp": "Los recetarios contienen entradas de recetas o pueden ser rellenados automáticamente usando filtros de búsqueda guardados. ",
|
||||
"RecipeHelp": "Las recetas son la base de Tandoor y consisten de información general y pasos, que incluyen ingredientes, instrucciones y más. ",
|
||||
"RecipeStepsHelp": "Los ingredientes, las instrucciones y más se pueden editar en la pestaña «Pasos».",
|
||||
"RecipeStructure": "",
|
||||
"Recipe_Book": "Libro de recetas",
|
||||
"Recipe_Image": "Imagen de la receta",
|
||||
"Recipes": "Recetas",
|
||||
@@ -520,6 +523,7 @@
|
||||
"Space_Cosmetic_Settings": "Algunos ajustes de apariencia pueden ser cambiados por los administradores del espacio y anularán los ajustes del cliente para ese espacio.",
|
||||
"Split": "Dividir",
|
||||
"Split_All_Steps": "Dividir todas las filas en pasos separados.",
|
||||
"Start": "",
|
||||
"StartDate": "Fecha de Inicio",
|
||||
"Starting_Day": "Día de comienzo de la semana",
|
||||
"Step": "Paso",
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
"AiProvider": "",
|
||||
"AiProviderHelp": "",
|
||||
"Alignment": "Tasaus",
|
||||
"All": "",
|
||||
"Amount": "Määrä",
|
||||
"App": "Applikaatio",
|
||||
"Apply": "",
|
||||
@@ -151,6 +152,7 @@
|
||||
"Fats": "Rasvat",
|
||||
"File": "Tiedosto",
|
||||
"Files": "Tiedostot",
|
||||
"Finish": "",
|
||||
"First_name": "Etunimi",
|
||||
"Food": "Ruoka",
|
||||
"FoodInherit": "Ruoan perinnölliset kentät",
|
||||
@@ -325,6 +327,7 @@
|
||||
"Ratings": "Luokitukset",
|
||||
"Recently_Viewed": "Äskettäin katsotut",
|
||||
"Recipe": "Resepti",
|
||||
"RecipeStructure": "",
|
||||
"Recipe_Book": "Keittokirja",
|
||||
"Recipe_Image": "Reseptin Kuva",
|
||||
"Recipes": "Reseptit",
|
||||
@@ -380,6 +383,7 @@
|
||||
"SpaceName": "",
|
||||
"SpacePrivateObjectsHelp": "",
|
||||
"Split_All_Steps": "Jaa kaikki rivit erillisiin vaiheisiin.",
|
||||
"Start": "",
|
||||
"StartDate": "Aloituspäivä",
|
||||
"Starting_Day": "Viikon aloituspäivä",
|
||||
"StartsWith": "",
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
"AiProvider": "",
|
||||
"AiProviderHelp": "",
|
||||
"Alignment": "Alignement",
|
||||
"All": "",
|
||||
"AllRecipes": "Toutes les recettes",
|
||||
"Amount": "Quantité",
|
||||
"App": "Appli",
|
||||
@@ -210,6 +211,7 @@
|
||||
"Fats": "Matières grasses",
|
||||
"File": "Fichier",
|
||||
"Files": "Fichiers",
|
||||
"Finish": "",
|
||||
"FinishedAt": "Terminé à",
|
||||
"First": "Premier",
|
||||
"First_name": "Prénom",
|
||||
@@ -448,6 +450,7 @@
|
||||
"RecipeBookHelp": "Les livres de recettes contiennent des entrées de livre de recettes ou peuvent être automatiquement remplis à l'aide de filtres de recherche enregistrés. ",
|
||||
"RecipeHelp": "Les recettes sont la base de Tandoor et se composent d'informations générales et d'étapes, elles-mêmes composées d'ingrédients, d'instructions et plus encore. ",
|
||||
"RecipeStepsHelp": "Les ingrédients, les instructions et plus encore, peuvent être modifiés dans l'onglet Étapes.",
|
||||
"RecipeStructure": "",
|
||||
"Recipe_Book": "Livre de recettes",
|
||||
"Recipe_Image": "Image de la recette",
|
||||
"Recipes": "Recettes",
|
||||
@@ -535,6 +538,7 @@
|
||||
"Space_Cosmetic_Settings": "Certains paramètres cosmétiques peuvent être modifiés par un administrateur de l'espace et seront prioritaires sur les paramètres des utilisateurs pour cet espace.",
|
||||
"Split": "Diviser",
|
||||
"Split_All_Steps": "Diviser toutes les lignes en étapes séparées.",
|
||||
"Start": "",
|
||||
"StartDate": "Date de début",
|
||||
"Starting_Day": "Jour de début de la semaine",
|
||||
"StartsWith": "Commence par",
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
"AiProvider": "",
|
||||
"AiProviderHelp": "",
|
||||
"Alignment": "יישור",
|
||||
"All": "",
|
||||
"Amount": "כמות",
|
||||
"App": "אפליקציה",
|
||||
"Apply": "",
|
||||
@@ -154,6 +155,7 @@
|
||||
"Fats": "שומנים",
|
||||
"File": "קובץ",
|
||||
"Files": "קבצים",
|
||||
"Finish": "",
|
||||
"First_name": "שם פרטי",
|
||||
"Food": "אוכל",
|
||||
"FoodInherit": "ערכי מזון",
|
||||
@@ -336,6 +338,7 @@
|
||||
"Ratings": "דירוג",
|
||||
"Recently_Viewed": "נצפו לאחרונה",
|
||||
"Recipe": "מתכון",
|
||||
"RecipeStructure": "",
|
||||
"Recipe_Book": "ספר מתכון",
|
||||
"Recipe_Image": "תמונת מתכון",
|
||||
"Recipes": "מתכונים",
|
||||
@@ -393,6 +396,7 @@
|
||||
"SpacePrivateObjectsHelp": "",
|
||||
"Space_Cosmetic_Settings": "חלק מהגדרות הקוסמטיות יכולות להיות מעודכנות על ידי מנהל המרחב וידרסו את הגדרות הקליינט עבור מרחב זה.",
|
||||
"Split_All_Steps": "פצל את כל השורות לצעדים נפרדים.",
|
||||
"Start": "",
|
||||
"StartDate": "תאריך התחלה",
|
||||
"Starting_Day": "יום תחילת השבוע",
|
||||
"StartsWith": "",
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
"AiProvider": "",
|
||||
"AiProviderHelp": "",
|
||||
"Alignment": "Poravnanje",
|
||||
"All": "",
|
||||
"Amount": "Količina",
|
||||
"App": "Aplikacija",
|
||||
"Apply": "",
|
||||
@@ -154,6 +155,7 @@
|
||||
"Fats": "Masti",
|
||||
"File": "Datoteka",
|
||||
"Files": "Datoteke",
|
||||
"Finish": "",
|
||||
"First_name": "Ime",
|
||||
"Food": "Namirnica",
|
||||
"FoodInherit": "Nasljedna polja namirnice",
|
||||
@@ -336,6 +338,7 @@
|
||||
"Ratings": "Ocjene",
|
||||
"Recently_Viewed": "Nedavno pogledano",
|
||||
"Recipe": "Recept",
|
||||
"RecipeStructure": "",
|
||||
"Recipe_Book": "Knjiga recepata",
|
||||
"Recipe_Image": "Slika recepta",
|
||||
"Recipes": "Recepti",
|
||||
@@ -393,6 +396,7 @@
|
||||
"SpacePrivateObjectsHelp": "",
|
||||
"Space_Cosmetic_Settings": "Neke kozmetičke postavke mogu promijeniti administratori prostora i one će poništiti postavke klijenta za taj prostor.",
|
||||
"Split_All_Steps": "Podijeli sve retke u zasebne korake.",
|
||||
"Start": "",
|
||||
"StartDate": "Početni datum",
|
||||
"Starting_Day": "Početni dan u tjednu",
|
||||
"StartsWith": "",
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
"AiProvider": "",
|
||||
"AiProviderHelp": "",
|
||||
"Alignment": "Igazítás",
|
||||
"All": "",
|
||||
"Amount": "Összeg",
|
||||
"App": "Applikáció",
|
||||
"Apply": "",
|
||||
@@ -137,6 +138,7 @@
|
||||
"Fats": "Zsírok",
|
||||
"File": "Fájl",
|
||||
"Files": "Fájlok",
|
||||
"Finish": "",
|
||||
"First_name": "Keresztnév",
|
||||
"Food": "Alapanyag",
|
||||
"FoodInherit": "",
|
||||
@@ -309,6 +311,7 @@
|
||||
"Ratings": "Értékelések",
|
||||
"Recently_Viewed": "Nemrég megtekintett",
|
||||
"Recipe": "Recept",
|
||||
"RecipeStructure": "",
|
||||
"Recipe_Book": "Szakácskönyv",
|
||||
"Recipe_Image": "Receptkép",
|
||||
"Recipes": "Receptek",
|
||||
@@ -359,6 +362,7 @@
|
||||
"SpaceName": "",
|
||||
"SpacePrivateObjectsHelp": "",
|
||||
"Split_All_Steps": "Ossza fel az összes sort különálló lépésekbe.",
|
||||
"Start": "",
|
||||
"StartDate": "Kezdés dátuma",
|
||||
"Starting_Day": "A hét kezdőnapja",
|
||||
"StartsWith": "",
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
"AiModelHelp": "",
|
||||
"AiProvider": "",
|
||||
"AiProviderHelp": "",
|
||||
"All": "",
|
||||
"Apply": "",
|
||||
"Automate": "Ավտոմատացնել",
|
||||
"BatchDeleteConfirm": "",
|
||||
@@ -69,6 +70,7 @@
|
||||
"Fats": "",
|
||||
"File": "",
|
||||
"Files": "",
|
||||
"Finish": "",
|
||||
"Food": "Սննդամթերք",
|
||||
"FromBalance": "",
|
||||
"Fulltext": "",
|
||||
@@ -142,6 +144,7 @@
|
||||
"Rating": "",
|
||||
"Recently_Viewed": "Վերջերս դիտած",
|
||||
"Recipe": "Բաղադրատոմս",
|
||||
"RecipeStructure": "",
|
||||
"Recipe_Book": "Բաղադրատոմսերի գիրք",
|
||||
"Recipe_Image": "Բաղադրատոմսի նկար",
|
||||
"Recipes": "Բաղադրատոմսեր",
|
||||
@@ -176,6 +179,7 @@
|
||||
"SpaceMembersHelp": "",
|
||||
"SpaceName": "",
|
||||
"SpacePrivateObjectsHelp": "",
|
||||
"Start": "",
|
||||
"StartsWith": "",
|
||||
"StartsWithHelp": "",
|
||||
"Step": "",
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
"AiModelHelp": "",
|
||||
"AiProvider": "",
|
||||
"AiProviderHelp": "",
|
||||
"All": "",
|
||||
"App": "",
|
||||
"Apply": "",
|
||||
"Are_You_Sure": "",
|
||||
@@ -126,6 +127,7 @@
|
||||
"Fats": "Lemak",
|
||||
"File": "Berkas",
|
||||
"Files": "File",
|
||||
"Finish": "",
|
||||
"First_name": "",
|
||||
"Food": "",
|
||||
"FoodInherit": "",
|
||||
@@ -285,6 +287,7 @@
|
||||
"Ratings": "",
|
||||
"Recently_Viewed": "baru saja dilihat",
|
||||
"Recipe": "",
|
||||
"RecipeStructure": "",
|
||||
"Recipe_Book": "",
|
||||
"Recipe_Image": "Gambar Resep",
|
||||
"Recipes": "Resep",
|
||||
@@ -335,6 +338,7 @@
|
||||
"SpaceMembersHelp": "",
|
||||
"SpaceName": "",
|
||||
"SpacePrivateObjectsHelp": "",
|
||||
"Start": "",
|
||||
"Starting_Day": "",
|
||||
"StartsWith": "",
|
||||
"StartsWithHelp": "",
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
"AiProvider": "",
|
||||
"AiProviderHelp": "",
|
||||
"Alignment": "",
|
||||
"All": "",
|
||||
"Amount": "",
|
||||
"App": "",
|
||||
"Apply": "",
|
||||
@@ -153,6 +154,7 @@
|
||||
"Fats": "",
|
||||
"File": "",
|
||||
"Files": "",
|
||||
"Finish": "",
|
||||
"First_name": "",
|
||||
"Food": "",
|
||||
"FoodInherit": "",
|
||||
@@ -335,6 +337,7 @@
|
||||
"Ratings": "",
|
||||
"Recently_Viewed": "",
|
||||
"Recipe": "",
|
||||
"RecipeStructure": "",
|
||||
"Recipe_Book": "",
|
||||
"Recipe_Image": "",
|
||||
"Recipes": "",
|
||||
@@ -391,6 +394,7 @@
|
||||
"SpacePrivateObjectsHelp": "",
|
||||
"Space_Cosmetic_Settings": "",
|
||||
"Split_All_Steps": "",
|
||||
"Start": "",
|
||||
"StartDate": "",
|
||||
"Starting_Day": "",
|
||||
"StartsWith": "",
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"APIKey": "Chiave API",
|
||||
"API_Browser": "Navigatore API",
|
||||
"API_Documentation": "Documentazione API",
|
||||
"AboutTandoor": "",
|
||||
"AboutTandoor": "Tandoor è una piattaforma Open Source per gestire ricette, piani alimentari, liste della spesa e altro.",
|
||||
"AccessTokenHelp": "Chiavi di accesso per le API REST.",
|
||||
"Access_Token": "Token di accesso",
|
||||
"Account": "Account",
|
||||
@@ -38,6 +38,7 @@
|
||||
"AiProvider": "Fornitore AI",
|
||||
"AiProviderHelp": "Puoi configurare più fornitori AI in base alle tue preferenze. Possono essere configurati anche per lavorare tra più spazi.",
|
||||
"Alignment": "Allineamento",
|
||||
"All": "",
|
||||
"AllRecipes": "Tutte le ricette",
|
||||
"Amount": "Quantità",
|
||||
"App": "Applicazione",
|
||||
@@ -56,7 +57,7 @@
|
||||
"BaseUnit": "Unità di base",
|
||||
"BaseUnitHelp": "Unità standard per la conversione automatica di unità",
|
||||
"Basics": "Informazioni di base",
|
||||
"BatchDeleteConfirm": "Vuoi eliminare tutti gli elementi mostrati? Questo non può essere annullato!",
|
||||
"BatchDeleteConfirm": "Vuoi eliminare tutti gli elementi mostrati? Questo non può essere annullato. AVVISO: è possibile che ciò elimini oggetti che sono utilizzati altrove. ",
|
||||
"BatchDeleteHelp": "Se un elemento non può essere eliminato, è utilizzato altrove. ",
|
||||
"BatchEdit": "Modifica massiva",
|
||||
"BatchEditUpdatingItemsCount": "Modifica di {count} {type}",
|
||||
@@ -117,7 +118,7 @@
|
||||
"Create": "Crea",
|
||||
"Create Food": "Crea alimento",
|
||||
"Create Recipe": "Crea ricetta",
|
||||
"CreateAccount": "",
|
||||
"CreateAccount": "Crea account",
|
||||
"CreateFirstRecipe": "Crea la tua prima ricetta utilizzando l'editor delle ricette.",
|
||||
"CreateInvitation": "Crea un invito",
|
||||
"Create_Meal_Plan_Entry": "Crea voce nel piano alimentare",
|
||||
@@ -211,6 +212,7 @@
|
||||
"Fats": "Grassi",
|
||||
"File": "File",
|
||||
"Files": "File",
|
||||
"Finish": "Fine",
|
||||
"FinishedAt": "Finito alle",
|
||||
"First": "Primo",
|
||||
"First_name": "Nome",
|
||||
@@ -259,7 +261,7 @@
|
||||
"ImportAll": "Importa tutto",
|
||||
"ImportFirstRecipe": "Importa la tua prima ricetta da una delle migliaia di siti web o utilizza uno degli importatori per importare le collezioni esistenti, documenti o eventi di URL.",
|
||||
"ImportIntoTandoor": "Importa in Tandoor",
|
||||
"ImportIntoTandoorHelp": "",
|
||||
"ImportIntoTandoorHelp": "Per importare questa ricetta nella tua raccolta di Tandoor, procedi con i passaggi seguenti.",
|
||||
"ImportMealPlans": "Importa piani alimentari",
|
||||
"ImportShoppingList": "Imposta liste della spesa",
|
||||
"Import_Error": "Si è verificato un errore durante l'importazione. Per avere maggiori informazioni, espandi la sezione dettagli in fondo alla pagina.",
|
||||
@@ -452,6 +454,7 @@
|
||||
"RecipeBookHelp": "I ricettari contengono voci di ricette oppure possono essere compilati automaticamente utilizzando filtri di ricerca salvati. ",
|
||||
"RecipeHelp": "Le ricette sono la base del Tandoor e sono composte da informazioni generali e passaggi, oltre che da ingredienti, istruzioni e altro ancora. ",
|
||||
"RecipeStepsHelp": "Ingredienti, istruzioni e altro possono essere modificati nella scheda Step.",
|
||||
"RecipeStructure": "Struttura ricetta",
|
||||
"Recipe_Book": "Libro di ricette",
|
||||
"Recipe_Image": "Immagine ricetta",
|
||||
"Recipes": "Ricette",
|
||||
@@ -491,7 +494,7 @@
|
||||
"Select_File": "Seleziona file",
|
||||
"Selected": "Selezionato",
|
||||
"SelectedCategories": "Categorie selezionate",
|
||||
"SelfHosted": "",
|
||||
"SelfHosted": "Autonomo",
|
||||
"Serving": "Porzione",
|
||||
"Servings": "Porzioni",
|
||||
"ServingsText": "Testo porzioni",
|
||||
@@ -539,6 +542,7 @@
|
||||
"Space_Cosmetic_Settings": "Alcune impostazioni cosmetiche possono essere modificate dagli amministratori dell'istanza e sovrascriveranno le impostazioni client per quell'istanza.",
|
||||
"Split": "Dividi",
|
||||
"Split_All_Steps": "Divide tutte le righe in step separati.",
|
||||
"Start": "Avvia",
|
||||
"StartDate": "Data d'inizio",
|
||||
"Starting_Day": "Giorno di inizio della settimana",
|
||||
"StartsWith": "Inizia con",
|
||||
|
||||
869
vue3/src/locales/ko.json
Normal file
869
vue3/src/locales/ko.json
Normal file
@@ -0,0 +1,869 @@
|
||||
{
|
||||
"AI": "",
|
||||
"AIImportSubtitle": "",
|
||||
"AISettingsHostedHelp": "",
|
||||
"API": "",
|
||||
"APIKey": "",
|
||||
"API_Browser": "",
|
||||
"API_Documentation": "",
|
||||
"AccessTokenHelp": "",
|
||||
"Access_Token": "",
|
||||
"Account": "",
|
||||
"Actions": "",
|
||||
"Active": "",
|
||||
"Activity": "",
|
||||
"Add": "",
|
||||
"AddAll": "",
|
||||
"AddChild": "",
|
||||
"AddFilter": "",
|
||||
"AddFoodToShopping": "",
|
||||
"AddMany": "",
|
||||
"AddToShopping": "",
|
||||
"Add_Servings_to_Shopping": "",
|
||||
"Add_Step": "",
|
||||
"Add_nutrition_recipe": "",
|
||||
"Add_to_Plan": "",
|
||||
"Add_to_Shopping": "",
|
||||
"Added_To_Shopping_List": "",
|
||||
"Added_by": "",
|
||||
"Added_on": "",
|
||||
"Admin": "",
|
||||
"Advanced": "",
|
||||
"AiCreditsBalance": "",
|
||||
"AiLog": "",
|
||||
"AiLogHelp": "",
|
||||
"AiModelHelp": "",
|
||||
"AiProvider": "",
|
||||
"AiProviderHelp": "",
|
||||
"Alignment": "",
|
||||
"All": "",
|
||||
"AllRecipes": "",
|
||||
"Amount": "",
|
||||
"App": "",
|
||||
"AppImportSubtitle": "",
|
||||
"Apply": "",
|
||||
"Are_You_Sure": "",
|
||||
"Auto_Planner": "",
|
||||
"Auto_Sort": "",
|
||||
"Auto_Sort_Help": "",
|
||||
"Automate": "",
|
||||
"Automation": "",
|
||||
"AutomationHelp": "",
|
||||
"Available": "",
|
||||
"AvailableCategories": "",
|
||||
"Back": "",
|
||||
"BaseUnit": "",
|
||||
"BaseUnitHelp": "",
|
||||
"Basics": "",
|
||||
"BatchDeleteConfirm": "",
|
||||
"BatchDeleteHelp": "",
|
||||
"BatchEdit": "",
|
||||
"BatchEditUpdatingItemsCount": "",
|
||||
"Blocking": "",
|
||||
"BlockingHelp": "",
|
||||
"Book": "",
|
||||
"Bookmarklet": "",
|
||||
"BookmarkletHelp1": "",
|
||||
"BookmarkletHelp2": "",
|
||||
"BookmarkletHelp3": "",
|
||||
"BookmarkletImportSubtitle": "",
|
||||
"Books": "",
|
||||
"CREATE_ERROR": "",
|
||||
"Calculator": "",
|
||||
"Calories": "",
|
||||
"Cancel": "",
|
||||
"Cannot_Add_Notes_To_Shopping": "",
|
||||
"Carbohydrates": "",
|
||||
"Cards": "",
|
||||
"Cascading": "",
|
||||
"CascadingHelp": "",
|
||||
"Categories": "",
|
||||
"Category": "",
|
||||
"CategoryInstruction": "",
|
||||
"CategoryName": "",
|
||||
"Change_Password": "",
|
||||
"Changing": "",
|
||||
"ChildInheritFields": "",
|
||||
"ChildInheritFields_help": "",
|
||||
"Choose_Category": "",
|
||||
"Clear": "",
|
||||
"Click_To_Edit": "",
|
||||
"Clone": "",
|
||||
"Close": "",
|
||||
"Color": "",
|
||||
"Combine_All_Steps": "",
|
||||
"Coming_Soon": "",
|
||||
"Comment": "",
|
||||
"Comments_setting": "",
|
||||
"Completed": "",
|
||||
"Confirm": "",
|
||||
"ConnectorConfig": "",
|
||||
"ConnectorConfigHelp": "",
|
||||
"Continue": "",
|
||||
"Conversion": "",
|
||||
"ConversionsHelp": "",
|
||||
"ConvertUsingAI": "",
|
||||
"CookLog": "",
|
||||
"CookLogHelp": "",
|
||||
"Cooked": "",
|
||||
"Copied": "",
|
||||
"Copy": "",
|
||||
"Copy Link": "",
|
||||
"Copy Token": "",
|
||||
"Copy_template_reference": "",
|
||||
"Cosmetic": "",
|
||||
"CountMore": "",
|
||||
"Create": "",
|
||||
"Create Food": "",
|
||||
"Create Recipe": "",
|
||||
"CreateFirstRecipe": "",
|
||||
"CreateInvitation": "",
|
||||
"Create_Meal_Plan_Entry": "",
|
||||
"Create_New_Food": "",
|
||||
"Create_New_Keyword": "",
|
||||
"Create_New_Meal_Type": "",
|
||||
"Create_New_Shopping Category": "",
|
||||
"Create_New_Shopping_Category": "",
|
||||
"Create_New_Unit": "",
|
||||
"Created": "",
|
||||
"CreatedBy": "",
|
||||
"Credits": "",
|
||||
"Ctrl+K": "",
|
||||
"Current_Period": "",
|
||||
"Custom Filter": "",
|
||||
"CustomImageHelp": "",
|
||||
"CustomLogoHelp": "",
|
||||
"CustomLogos": "",
|
||||
"CustomNavLogoHelp": "",
|
||||
"CustomTheme": "",
|
||||
"CustomThemeHelp": "",
|
||||
"DELETE_ERROR": "",
|
||||
"Data_Import_Info": "",
|
||||
"Database": "",
|
||||
"DatabaseHelp": "",
|
||||
"Datatype": "",
|
||||
"Date": "",
|
||||
"Day": "",
|
||||
"Days": "",
|
||||
"Decimals": "",
|
||||
"Default": "",
|
||||
"DefaultPage": "",
|
||||
"Default_Unit": "",
|
||||
"DelayFor": "",
|
||||
"DelayUntil": "",
|
||||
"Delete": "",
|
||||
"DeleteConfirmQuestion": "",
|
||||
"DeleteShoppingConfirm": "",
|
||||
"DeleteSomething": "",
|
||||
"Delete_All": "",
|
||||
"Delete_Food": "",
|
||||
"Delete_Keyword": "",
|
||||
"Deleted": "",
|
||||
"Description": "",
|
||||
"Description_Replace": "",
|
||||
"DeviceSettings": "",
|
||||
"DeviceSettingsHelp": "",
|
||||
"Disable": "",
|
||||
"Disable_Amount": "",
|
||||
"Disabled": "",
|
||||
"Documentation": "",
|
||||
"DontChange": "",
|
||||
"Down": "",
|
||||
"Download": "",
|
||||
"DragToUpload": "",
|
||||
"Drag_Here_To_Delete": "",
|
||||
"Duplicate": "",
|
||||
"DuplicateFoundInfo": "",
|
||||
"Edit": "",
|
||||
"Edit_Food": "",
|
||||
"Edit_Keyword": "",
|
||||
"Edit_Meal_Plan_Entry": "",
|
||||
"Edit_Recipe": "",
|
||||
"Email": "",
|
||||
"Empty": "",
|
||||
"Enable": "",
|
||||
"Enable_Amount": "",
|
||||
"Enabled": "",
|
||||
"EndDate": "",
|
||||
"Energy": "",
|
||||
"Entries": "",
|
||||
"Error": "",
|
||||
"ErrorUrlListImport": "",
|
||||
"Events": "",
|
||||
"Export": "",
|
||||
"Export_As_ICal": "",
|
||||
"Export_Not_Yet_Supported": "",
|
||||
"Export_Supported": "",
|
||||
"Export_To_ICal": "",
|
||||
"External": "",
|
||||
"ExternalRecipe": "",
|
||||
"ExternalRecipeImport": "",
|
||||
"ExternalRecipeImportHelp": "",
|
||||
"ExternalStorage": "",
|
||||
"External_Recipe_Image": "",
|
||||
"FDC_ID": "",
|
||||
"FDC_ID_help": "",
|
||||
"FDC_Search": "",
|
||||
"FETCH_ERROR": "",
|
||||
"Failure": "",
|
||||
"Fats": "",
|
||||
"File": "",
|
||||
"Files": "",
|
||||
"FinishedAt": "",
|
||||
"First": "",
|
||||
"First_name": "",
|
||||
"Food": "",
|
||||
"FoodHelp": "",
|
||||
"FoodInherit": "",
|
||||
"FoodNotOnHand": "",
|
||||
"FoodOnHand": "",
|
||||
"Food_Alias": "",
|
||||
"Food_Replace": "",
|
||||
"Foods": "",
|
||||
"Friday": "",
|
||||
"FromBalance": "",
|
||||
"Fulltext": "",
|
||||
"FulltextHelp": "",
|
||||
"Fuzzy": "",
|
||||
"FuzzySearchHelp": "",
|
||||
"GettingStarted": "",
|
||||
"Global": "",
|
||||
"GlobalHelp": "",
|
||||
"Group": "",
|
||||
"GroupBy": "",
|
||||
"HeaderWarning": "",
|
||||
"Headline": "",
|
||||
"Help": "",
|
||||
"Hide_External": "",
|
||||
"Hide_Food": "",
|
||||
"Hide_Keyword": "",
|
||||
"Hide_Keywords": "",
|
||||
"Hide_Recipes": "",
|
||||
"Hide_as_header": "",
|
||||
"Hierarchy": "",
|
||||
"History": "",
|
||||
"HostedFreeVersion": "",
|
||||
"Hour": "",
|
||||
"Hours": "",
|
||||
"Icon": "",
|
||||
"IgnoreAccents": "",
|
||||
"IgnoreAccentsHelp": "",
|
||||
"IgnoreThis": "",
|
||||
"Ignore_Shopping": "",
|
||||
"IgnoredFood": "",
|
||||
"Image": "",
|
||||
"Import": "",
|
||||
"Import Recipe": "",
|
||||
"ImportAll": "",
|
||||
"ImportFirstRecipe": "",
|
||||
"ImportIntoTandoor": "",
|
||||
"ImportMealPlans": "",
|
||||
"ImportShoppingList": "",
|
||||
"Import_Error": "",
|
||||
"Import_Not_Yet_Supported": "",
|
||||
"Import_Result_Info": "",
|
||||
"Import_Supported": "",
|
||||
"Import_finished": "",
|
||||
"Imported": "",
|
||||
"Imported_From": "",
|
||||
"Importer_Help": "",
|
||||
"Information": "",
|
||||
"Ingredient": "",
|
||||
"Ingredient Editor": "",
|
||||
"Ingredient Overview": "",
|
||||
"IngredientEditorHelp": "",
|
||||
"IngredientHelp": "",
|
||||
"IngredientInShopping": "",
|
||||
"Ingredients": "",
|
||||
"Inherit": "",
|
||||
"InheritFields": "",
|
||||
"InheritFields_help": "",
|
||||
"InheritWarning": "",
|
||||
"Input": "",
|
||||
"Instruction_Replace": "",
|
||||
"Instructions": "",
|
||||
"InstructionsEditHelp": "",
|
||||
"Internal": "",
|
||||
"InviteLinkHelp": "",
|
||||
"Invite_Link": "",
|
||||
"Invites": "",
|
||||
"Key_Ctrl": "",
|
||||
"Key_Shift": "",
|
||||
"Keyword": "",
|
||||
"KeywordHelp": "",
|
||||
"Keyword_Alias": "",
|
||||
"Keywords": "",
|
||||
"Language": "",
|
||||
"Last": "",
|
||||
"Last_name": "",
|
||||
"Learn_More": "",
|
||||
"LeaveSpace": "",
|
||||
"Link": "",
|
||||
"Load": "",
|
||||
"Load_More": "",
|
||||
"LogCredits": "",
|
||||
"LogCreditsHelp": "",
|
||||
"Log_Cooking": "",
|
||||
"Log_Recipe_Cooking": "",
|
||||
"Logo": "",
|
||||
"Logout": "",
|
||||
"Make_Header": "",
|
||||
"Make_Ingredient": "",
|
||||
"ManageSubscription": "",
|
||||
"Manage_Books": "",
|
||||
"Manage_Emails": "",
|
||||
"MealPlanHelp": "",
|
||||
"MealPlanShoppingHelp": "",
|
||||
"MealTypeHelp": "",
|
||||
"Meal_Plan": "",
|
||||
"Meal_Plan_Days": "",
|
||||
"Meal_Type": "",
|
||||
"Meal_Type_Required": "",
|
||||
"Meal_Types": "",
|
||||
"Merge": "",
|
||||
"MergeAutomateHelp": "",
|
||||
"MergeInsteadOfDelete": "",
|
||||
"Merge_Keyword": "",
|
||||
"Message": "",
|
||||
"Messages": "",
|
||||
"Miscellaneous": "",
|
||||
"MissingConversion": "",
|
||||
"MissingProperties": "",
|
||||
"Model": "",
|
||||
"ModelSelectResultsHelp": "",
|
||||
"Monday": "",
|
||||
"Month": "",
|
||||
"MonthlyCredits": "",
|
||||
"MonthlyCreditsUsed": "",
|
||||
"More": "",
|
||||
"Move": "",
|
||||
"MoveCategory": "",
|
||||
"MoveToStep": "",
|
||||
"Move_Down": "",
|
||||
"Move_Food": "",
|
||||
"Move_Keyword": "",
|
||||
"Move_Up": "",
|
||||
"Multiple": "",
|
||||
"Name": "",
|
||||
"Name_Replace": "",
|
||||
"Nav_Color": "",
|
||||
"Nav_Color_Help": "",
|
||||
"Nav_Text_Mode": "",
|
||||
"Nav_Text_Mode_Help": "",
|
||||
"Never_Unit": "",
|
||||
"New": "",
|
||||
"New_Cookbook": "",
|
||||
"New_Entry": "",
|
||||
"New_Food": "",
|
||||
"New_Keyword": "",
|
||||
"New_Meal_Type": "",
|
||||
"New_Recipe": "",
|
||||
"New_Supermarket": "",
|
||||
"New_Supermarket_Category": "",
|
||||
"New_Unit": "",
|
||||
"Next": "",
|
||||
"Next_Day": "",
|
||||
"Next_Period": "",
|
||||
"No": "",
|
||||
"NoCategory": "",
|
||||
"NoMoreUndo": "",
|
||||
"NoUnit": "",
|
||||
"No_ID": "",
|
||||
"No_Results": "",
|
||||
"NotFound": "",
|
||||
"NotFoundHelp": "",
|
||||
"NotInShopping": "",
|
||||
"Note": "",
|
||||
"NullingHelp": "",
|
||||
"Number of Objects": "",
|
||||
"Nutrition": "",
|
||||
"NutritionsPerServing": "",
|
||||
"NutritionsPerServingHelp": "",
|
||||
"OfflineAlert": "",
|
||||
"Ok": "",
|
||||
"OnHand": "",
|
||||
"OnHand_help": "",
|
||||
"Open": "",
|
||||
"Open_Data_Import": "",
|
||||
"Open_Data_Slug": "",
|
||||
"Options": "",
|
||||
"Order": "",
|
||||
"OrderInformation": "",
|
||||
"Original_Text": "",
|
||||
"Owner": "",
|
||||
"Page": "",
|
||||
"Parameter": "",
|
||||
"Parent": "",
|
||||
"PartialMatch": "",
|
||||
"PartialMatchHelp": "",
|
||||
"Password": "",
|
||||
"Path": "",
|
||||
"PerPage": "",
|
||||
"Period": "",
|
||||
"Periods": "",
|
||||
"Pin": "",
|
||||
"Pinned": "",
|
||||
"PinnedConfirmation": "",
|
||||
"Plan_Period_To_Show": "",
|
||||
"Plan_Show_How_Many_Periods": "",
|
||||
"Planned": "",
|
||||
"Planner": "",
|
||||
"Planner_Settings": "",
|
||||
"Planning&Shopping": "",
|
||||
"Plural": "",
|
||||
"Postpone": "",
|
||||
"PostponedUntil": "",
|
||||
"PrecisionSearchHelp": "",
|
||||
"Preferences": "",
|
||||
"Preparation": "",
|
||||
"Preview": "",
|
||||
"Previous_Day": "",
|
||||
"Previous_Period": "",
|
||||
"Print": "",
|
||||
"Private": "",
|
||||
"Private_Recipe": "",
|
||||
"Private_Recipe_Help": "",
|
||||
"Profile": "",
|
||||
"Properties": "",
|
||||
"PropertiesFoodHelp": "",
|
||||
"Properties_Food_Amount": "",
|
||||
"Properties_Food_Unit": "",
|
||||
"Property": "",
|
||||
"PropertyHelp": "",
|
||||
"PropertyType": "",
|
||||
"PropertyTypeHelp": "",
|
||||
"Property_Editor": "",
|
||||
"Protected": "",
|
||||
"Proteins": "",
|
||||
"Quick actions": "",
|
||||
"QuickEntry": "",
|
||||
"Random Recipes": "",
|
||||
"RandomOrder": "",
|
||||
"RateLimit": "",
|
||||
"RateLimitHelp": "",
|
||||
"Rating": "",
|
||||
"Ratings": "",
|
||||
"Recently_Viewed": "",
|
||||
"Recipe": "",
|
||||
"RecipeBookEntryHelp": "",
|
||||
"RecipeBookHelp": "",
|
||||
"RecipeHelp": "",
|
||||
"RecipeStepsHelp": "",
|
||||
"RecipeStructure": "",
|
||||
"Recipe_Book": "",
|
||||
"Recipe_Image": "",
|
||||
"Recipes": "",
|
||||
"Recipes_In_Import": "",
|
||||
"Recipes_per_page": "",
|
||||
"Refresh": "",
|
||||
"Remove": "",
|
||||
"RemoveAllType": "",
|
||||
"RemoveFoodFromShopping": "",
|
||||
"RemoveParent": "",
|
||||
"Remove_nutrition_recipe": "",
|
||||
"Reset": "",
|
||||
"ResetHelp": "",
|
||||
"Reset_Search": "",
|
||||
"Reusable": "",
|
||||
"Role": "",
|
||||
"Root": "",
|
||||
"Saturday": "",
|
||||
"Save": "",
|
||||
"Save/Load": "",
|
||||
"Save_and_View": "",
|
||||
"SavedSearch": "",
|
||||
"SavedSearchHelp": "",
|
||||
"ScalableNumber": "",
|
||||
"Search": "",
|
||||
"Search Settings": "",
|
||||
"SearchMethod": "",
|
||||
"SearchSettingsOverview": "",
|
||||
"SearchSettingsWarning": "",
|
||||
"Second": "",
|
||||
"Seconds": "",
|
||||
"Select": "",
|
||||
"SelectAll": "",
|
||||
"SelectNone": "",
|
||||
"Select_App_To_Import": "",
|
||||
"Select_Book": "",
|
||||
"Select_File": "",
|
||||
"Selected": "",
|
||||
"SelectedCategories": "",
|
||||
"Serving": "",
|
||||
"Servings": "",
|
||||
"ServingsText": "",
|
||||
"Settings": "",
|
||||
"SettingsOnlySuperuser": "",
|
||||
"Share": "",
|
||||
"ShopLater": "",
|
||||
"ShopNow": "",
|
||||
"ShoppingBackgroundSyncWarning": "",
|
||||
"ShoppingListEntry": "",
|
||||
"ShoppingListEntryHelp": "",
|
||||
"ShoppingListRecipe": "",
|
||||
"Shopping_Categories": "",
|
||||
"Shopping_Category": "",
|
||||
"Shopping_List_Empty": "",
|
||||
"Shopping_input_placeholder": "",
|
||||
"Shopping_list": "",
|
||||
"ShowDelayed": "",
|
||||
"ShowIngredients": "",
|
||||
"ShowMealPlanOnStartPage": "",
|
||||
"ShowRecentlyCompleted": "",
|
||||
"ShowUncategorizedFood": "",
|
||||
"Show_Logo": "",
|
||||
"Show_Logo_Help": "",
|
||||
"Show_Week_Numbers": "",
|
||||
"Show_as_header": "",
|
||||
"Single": "",
|
||||
"Size": "",
|
||||
"Skip": "",
|
||||
"Social_Authentication": "",
|
||||
"Sort_by_new": "",
|
||||
"Source": "",
|
||||
"SourceImportHelp": "",
|
||||
"SourceImportSubtitle": "",
|
||||
"Space": "",
|
||||
"SpaceHelp": "",
|
||||
"SpaceLimitExceeded": "",
|
||||
"SpaceLimitReached": "",
|
||||
"SpaceMemberHelp": "",
|
||||
"SpaceMembers": "",
|
||||
"SpaceMembersHelp": "",
|
||||
"SpaceName": "",
|
||||
"SpacePrivateObjectsHelp": "",
|
||||
"SpaceSettings": "",
|
||||
"Space_Cosmetic_Settings": "",
|
||||
"Split": "",
|
||||
"Split_All_Steps": "",
|
||||
"Start": "",
|
||||
"StartDate": "",
|
||||
"Starting_Day": "",
|
||||
"StartsWith": "",
|
||||
"StartsWithHelp": "",
|
||||
"Step": "",
|
||||
"StepHelp": "",
|
||||
"Step_Name": "",
|
||||
"Step_Type": "",
|
||||
"Step_start_time": "",
|
||||
"Steps": "",
|
||||
"StepsOverview": "",
|
||||
"Sticky_Nav": "",
|
||||
"Sticky_Nav_Help": "",
|
||||
"Storage": "",
|
||||
"StorageHelp": "",
|
||||
"StoragePasswordTokenHelp": "",
|
||||
"Structured": "",
|
||||
"SubstituteOnHand": "",
|
||||
"Substitutes": "",
|
||||
"Success": "",
|
||||
"SuccessClipboard": "",
|
||||
"Summary": "",
|
||||
"Sunday": "",
|
||||
"Supermarket": "",
|
||||
"SupermarketCategoriesOnly": "",
|
||||
"SupermarketCategoryHelp": "",
|
||||
"SupermarketHelp": "",
|
||||
"SupermarketName": "",
|
||||
"Supermarkets": "",
|
||||
"SupportsDescriptionField": "",
|
||||
"SyncLog": "",
|
||||
"SyncLogHelp": "",
|
||||
"SyncedPath": "",
|
||||
"SyncedPathHelp": "",
|
||||
"System": "",
|
||||
"Table": "",
|
||||
"Table_of_Contents": "",
|
||||
"Text": "",
|
||||
"ThankYou": "",
|
||||
"ThanksTextHosted": "",
|
||||
"ThanksTextSelfhosted": "",
|
||||
"Theme": "",
|
||||
"Thursday": "",
|
||||
"Time": "",
|
||||
"Title": "",
|
||||
"Title_or_Recipe_Required": "",
|
||||
"Today": "",
|
||||
"Toggle": "",
|
||||
"Transpose_Words": "",
|
||||
"TrigramThreshold": "",
|
||||
"TrigramThresholdHelp": "",
|
||||
"Tuesday": "",
|
||||
"Type": "",
|
||||
"UPDATE_ERROR": "",
|
||||
"Unchanged": "",
|
||||
"Undefined": "",
|
||||
"Undo": "",
|
||||
"Unit": "",
|
||||
"UnitConversion": "",
|
||||
"UnitConversionHelp": "",
|
||||
"UnitHelp": "",
|
||||
"Unit_Alias": "",
|
||||
"Unit_Replace": "",
|
||||
"Units": "",
|
||||
"Unpin": "",
|
||||
"UnpinnedConfirmation": "",
|
||||
"Unrated": "",
|
||||
"Up": "",
|
||||
"Update": "",
|
||||
"Update_Existing_Data": "",
|
||||
"Updated": "",
|
||||
"UpgradeNow": "",
|
||||
"Url": "",
|
||||
"UrlImportSubtitle": "",
|
||||
"UrlList": "",
|
||||
"UrlListSubtitle": "",
|
||||
"Url_Import": "",
|
||||
"Use_Fractions": "",
|
||||
"Use_Fractions_Help": "",
|
||||
"Use_Kj": "",
|
||||
"Use_Metric": "",
|
||||
"Use_Plural_Food_Always": "",
|
||||
"Use_Plural_Food_Simple": "",
|
||||
"Use_Plural_Unit_Always": "",
|
||||
"Use_Plural_Unit_Simple": "",
|
||||
"User": "",
|
||||
"UserFileHelp": "",
|
||||
"UserHelp": "",
|
||||
"Username": "",
|
||||
"Users": "",
|
||||
"Valid Until": "",
|
||||
"View": "",
|
||||
"ViewLogHelp": "",
|
||||
"View_Recipes": "",
|
||||
"Viewed": "",
|
||||
"Visibility": "",
|
||||
"Waiting": "",
|
||||
"WaitingTime": "",
|
||||
"WarnPageLeave": "",
|
||||
"Warning": "",
|
||||
"WarningRecipeBookEntryDuplicate": "",
|
||||
"Warning_Delete_Supermarket_Category": "",
|
||||
"Website": "",
|
||||
"Wednesday": "",
|
||||
"Week": "",
|
||||
"Week_Numbers": "",
|
||||
"Welcome": "",
|
||||
"WelcomeSettingsHelp": "",
|
||||
"WelcometoTandoor": "",
|
||||
"WorkingTime": "",
|
||||
"Year": "",
|
||||
"Yes": "",
|
||||
"YourSpaces": "",
|
||||
"active": "",
|
||||
"add_keyword": "",
|
||||
"additional_options": "",
|
||||
"advanced": "",
|
||||
"advanced_search_settings": "",
|
||||
"after": "",
|
||||
"all": "",
|
||||
"all_fields_optional": "",
|
||||
"and": "",
|
||||
"and_down": "",
|
||||
"and_up": "",
|
||||
"any": "",
|
||||
"asc": "",
|
||||
"base_amount": "",
|
||||
"base_unit": "",
|
||||
"before": "",
|
||||
"book_filter_help": "",
|
||||
"click_image_import": "",
|
||||
"confirm_delete": "",
|
||||
"convert_internal": "",
|
||||
"converted_amount": "",
|
||||
"converted_unit": "",
|
||||
"copy_markdown_table": "",
|
||||
"copy_to_clipboard": "",
|
||||
"copy_to_new": "",
|
||||
"create_food_desc": "",
|
||||
"create_rule": "",
|
||||
"create_title": "",
|
||||
"created_by": "",
|
||||
"created_on": "",
|
||||
"csv_delim_help": "",
|
||||
"csv_delim_label": "",
|
||||
"csv_prefix_help": "",
|
||||
"csv_prefix_label": "",
|
||||
"date_created": "",
|
||||
"date_viewed": "",
|
||||
"default_delay": "",
|
||||
"default_delay_desc": "",
|
||||
"del_confirmation_tree": "",
|
||||
"delete_confirmation": "",
|
||||
"delete_title": "",
|
||||
"desc": "",
|
||||
"download_csv": "",
|
||||
"download_pdf": "",
|
||||
"edit_title": "",
|
||||
"empty_list": "",
|
||||
"enable_expert": "",
|
||||
"err_creating_resource": "",
|
||||
"err_deleting_protected_resource": "",
|
||||
"err_deleting_resource": "",
|
||||
"err_fetching_resource": "",
|
||||
"err_importing_recipe": "",
|
||||
"err_merge_self": "",
|
||||
"err_merging_resource": "",
|
||||
"err_move_self": "",
|
||||
"err_moving_resource": "",
|
||||
"err_updating_resource": "",
|
||||
"exact": "",
|
||||
"exclude": "",
|
||||
"expert_mode": "",
|
||||
"explain": "",
|
||||
"fields": "",
|
||||
"file_upload_disabled": "",
|
||||
"filter": "",
|
||||
"filter_name": "",
|
||||
"filter_to_supermarket": "",
|
||||
"filter_to_supermarket_desc": "",
|
||||
"fluid_ounce": "",
|
||||
"food_inherit_info": "",
|
||||
"food_recipe_help": "",
|
||||
"g": "",
|
||||
"gallon": "",
|
||||
"hide_step_ingredients": "",
|
||||
"hours": "",
|
||||
"ignore_shopping_help": "",
|
||||
"imperial_fluid_ounce": "",
|
||||
"imperial_gallon": "",
|
||||
"imperial_pint": "",
|
||||
"imperial_quart": "",
|
||||
"imperial_tbsp": "",
|
||||
"imperial_tsp": "",
|
||||
"import_duplicates": "",
|
||||
"import_running": "",
|
||||
"in_shopping": "",
|
||||
"ingredient_list": "",
|
||||
"kg": "",
|
||||
"l": "",
|
||||
"last_cooked": "",
|
||||
"last_viewed": "",
|
||||
"left_handed": "",
|
||||
"left_handed_help": "",
|
||||
"make_now": "",
|
||||
"make_now_count": "",
|
||||
"mark_complete": "",
|
||||
"mealplan_autoadd_shopping": "",
|
||||
"mealplan_autoadd_shopping_desc": "",
|
||||
"mealplan_autoexclude_onhand": "",
|
||||
"mealplan_autoexclude_onhand_desc": "",
|
||||
"mealplan_autoinclude_related": "",
|
||||
"mealplan_autoinclude_related_desc": "",
|
||||
"merge_confirmation": "",
|
||||
"merge_selection": "",
|
||||
"merge_title": "",
|
||||
"min": "",
|
||||
"ml": "",
|
||||
"move_confirmation": "",
|
||||
"move_selection": "",
|
||||
"move_title": "",
|
||||
"no_more_images_found": "",
|
||||
"no_pinned_recipes": "",
|
||||
"not": "",
|
||||
"nothing": "",
|
||||
"nothing_planned_today": "",
|
||||
"on": "",
|
||||
"one_url_per_line": "",
|
||||
"open_data_help_text": "",
|
||||
"or": "",
|
||||
"ounce": "",
|
||||
"parameter_count": "",
|
||||
"paste_ingredients": "",
|
||||
"paste_ingredients_placeholder": "",
|
||||
"paste_json": "",
|
||||
"per_serving": "",
|
||||
"pint": "",
|
||||
"plan_share_desc": "",
|
||||
"plural_short": "",
|
||||
"plural_usage_info": "",
|
||||
"pound": "",
|
||||
"property_type_fdc_hint": "",
|
||||
"quart": "",
|
||||
"recipe_filter": "",
|
||||
"recipe_name": "",
|
||||
"recipe_property_info": "",
|
||||
"related_recipes": "",
|
||||
"remember_hours": "",
|
||||
"remember_search": "",
|
||||
"remove_selection": "",
|
||||
"reset_children": "",
|
||||
"reset_children_help": "",
|
||||
"reset_food_inheritance": "",
|
||||
"reset_food_inheritance_info": "",
|
||||
"reusable_help_text": "",
|
||||
"review_shopping": "",
|
||||
"save_filter": "",
|
||||
"searchFilterCreatedByHelp": "",
|
||||
"searchFilterObjectsAndHelp": "",
|
||||
"searchFilterObjectsAndNotHelp": "",
|
||||
"searchFilterObjectsHelp": "",
|
||||
"searchFilterObjectsOrNotHelp": "",
|
||||
"search_create_help_text": "",
|
||||
"search_import_help_text": "",
|
||||
"search_no_recipes": "",
|
||||
"search_rank": "",
|
||||
"seconds": "",
|
||||
"select_file": "",
|
||||
"select_food": "",
|
||||
"select_keyword": "",
|
||||
"select_recipe": "",
|
||||
"select_unit": "",
|
||||
"shared_with": "",
|
||||
"shopping_add_onhand": "",
|
||||
"shopping_add_onhand_desc": "",
|
||||
"shopping_auto_sync": "",
|
||||
"shopping_auto_sync_desc": "",
|
||||
"shopping_category_help": "",
|
||||
"shopping_recent_days": "",
|
||||
"shopping_recent_days_desc": "",
|
||||
"shopping_share": "",
|
||||
"shopping_share_desc": "",
|
||||
"show_books": "",
|
||||
"show_filters": "",
|
||||
"show_foods": "",
|
||||
"show_ingredient_overview": "",
|
||||
"show_ingredients_table": "",
|
||||
"show_keywords": "",
|
||||
"show_only_internal": "",
|
||||
"show_rating": "",
|
||||
"show_sortby": "",
|
||||
"show_split_screen": "",
|
||||
"show_sql": "",
|
||||
"show_step_ingredients": "",
|
||||
"show_step_ingredients_setting": "",
|
||||
"show_step_ingredients_setting_help": "",
|
||||
"show_units": "",
|
||||
"simple_mode": "",
|
||||
"sort_by": "",
|
||||
"sql_debug": "",
|
||||
"step_time_minutes": "",
|
||||
"substitute_children": "",
|
||||
"substitute_children_help": "",
|
||||
"substitute_help": "",
|
||||
"substitute_siblings": "",
|
||||
"substitute_siblings_help": "",
|
||||
"success_creating_resource": "",
|
||||
"success_deleting_resource": "",
|
||||
"success_fetching_resource": "",
|
||||
"success_merging_resource": "",
|
||||
"success_moving_resource": "",
|
||||
"success_updating_resource": "",
|
||||
"tbsp": "",
|
||||
"theUsernameCannotBeChanged": "",
|
||||
"times_cooked": "",
|
||||
"to_close": "",
|
||||
"to_navigate": "",
|
||||
"to_select": "",
|
||||
"today_recipes": "",
|
||||
"total": "",
|
||||
"tree_root": "",
|
||||
"tree_select": "",
|
||||
"tsp": "",
|
||||
"unsaved": "",
|
||||
"updatedon": "",
|
||||
"view_recipe": "",
|
||||
"warning_duplicate_filter": "",
|
||||
"warning_feature_beta": "",
|
||||
"warning_space_delete": ""
|
||||
}
|
||||
@@ -26,6 +26,7 @@
|
||||
"AiProvider": "",
|
||||
"AiProviderHelp": "",
|
||||
"Alignment": "",
|
||||
"All": "",
|
||||
"Amount": "Suma",
|
||||
"App": "",
|
||||
"Apply": "",
|
||||
@@ -139,6 +140,7 @@
|
||||
"Fats": "",
|
||||
"File": "",
|
||||
"Files": "",
|
||||
"Finish": "",
|
||||
"First_name": "",
|
||||
"Food": "",
|
||||
"FoodInherit": "",
|
||||
@@ -313,6 +315,7 @@
|
||||
"Ratings": "",
|
||||
"Recently_Viewed": "Neseniai Žiūrėta",
|
||||
"Recipe": "",
|
||||
"RecipeStructure": "",
|
||||
"Recipe_Book": "",
|
||||
"Recipe_Image": "Recepto nuotrauka",
|
||||
"Recipes": "",
|
||||
@@ -364,6 +367,7 @@
|
||||
"SpaceName": "",
|
||||
"SpacePrivateObjectsHelp": "",
|
||||
"Split_All_Steps": "",
|
||||
"Start": "",
|
||||
"StartDate": "",
|
||||
"Starting_Day": "",
|
||||
"StartsWith": "",
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
"AiProvider": "",
|
||||
"AiProviderHelp": "",
|
||||
"Alignment": "",
|
||||
"All": "",
|
||||
"Amount": "",
|
||||
"App": "",
|
||||
"Apply": "",
|
||||
@@ -154,6 +155,7 @@
|
||||
"Fats": "",
|
||||
"File": "",
|
||||
"Files": "",
|
||||
"Finish": "",
|
||||
"First_name": "",
|
||||
"Food": "",
|
||||
"FoodInherit": "",
|
||||
@@ -336,6 +338,7 @@
|
||||
"Ratings": "",
|
||||
"Recently_Viewed": "",
|
||||
"Recipe": "",
|
||||
"RecipeStructure": "",
|
||||
"Recipe_Book": "",
|
||||
"Recipe_Image": "",
|
||||
"Recipes": "",
|
||||
@@ -393,6 +396,7 @@
|
||||
"SpacePrivateObjectsHelp": "",
|
||||
"Space_Cosmetic_Settings": "",
|
||||
"Split_All_Steps": "",
|
||||
"Start": "",
|
||||
"StartDate": "",
|
||||
"Starting_Day": "",
|
||||
"StartsWith": "",
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
"AiProvider": "",
|
||||
"AiProviderHelp": "",
|
||||
"Alignment": "Justering",
|
||||
"All": "",
|
||||
"Amount": "Mengde",
|
||||
"App": "App",
|
||||
"Apply": "",
|
||||
@@ -146,6 +147,7 @@
|
||||
"Fats": "Fett",
|
||||
"File": "Fil",
|
||||
"Files": "Filer",
|
||||
"Finish": "",
|
||||
"First_name": "Fornavn",
|
||||
"Food": "Matretter",
|
||||
"FoodInherit": "Arvbare felt for matvarer",
|
||||
@@ -320,6 +322,7 @@
|
||||
"Ratings": "",
|
||||
"Recently_Viewed": "Nylig vist",
|
||||
"Recipe": "Oppskrift",
|
||||
"RecipeStructure": "",
|
||||
"Recipe_Book": "Oppskriftsbok",
|
||||
"Recipe_Image": "Oppskriftsbilde",
|
||||
"Recipes": "Oppskrift",
|
||||
@@ -374,6 +377,7 @@
|
||||
"SpaceName": "",
|
||||
"SpacePrivateObjectsHelp": "",
|
||||
"Split_All_Steps": "",
|
||||
"Start": "",
|
||||
"StartDate": "Startdato",
|
||||
"Starting_Day": "Dag uken skal state på",
|
||||
"StartsWith": "",
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -35,6 +35,7 @@
|
||||
"AiProvider": "",
|
||||
"AiProviderHelp": "",
|
||||
"Alignment": "Wyrównanie",
|
||||
"All": "",
|
||||
"AllRecipes": "Wszystkie przepisy",
|
||||
"Amount": "Ilość",
|
||||
"App": "Aplikacja",
|
||||
@@ -180,6 +181,7 @@
|
||||
"Fats": "Tłuszcze",
|
||||
"File": "Plik",
|
||||
"Files": "Pliki",
|
||||
"Finish": "",
|
||||
"First_name": "Imię",
|
||||
"Food": "Żywność",
|
||||
"FoodInherit": "Pola dziedziczone w żywności",
|
||||
@@ -362,6 +364,7 @@
|
||||
"Ratings": "Oceny",
|
||||
"Recently_Viewed": "Ostatnio oglądane",
|
||||
"Recipe": "Przepis",
|
||||
"RecipeStructure": "",
|
||||
"Recipe_Book": "Książka z przepisami",
|
||||
"Recipe_Image": "Obrazek dla przepisu",
|
||||
"Recipes": "Przepisy",
|
||||
@@ -419,6 +422,7 @@
|
||||
"SpacePrivateObjectsHelp": "",
|
||||
"Space_Cosmetic_Settings": "Administratorzy przestrzeni mogą zmienić niektóre ustawienia kosmetyczne, które zastąpią ustawienia klienta dla tej przestrzeni.",
|
||||
"Split_All_Steps": "Traktuj każdy wiersz jako osobne kroki.",
|
||||
"Start": "",
|
||||
"StartDate": "Data początkowa",
|
||||
"Starting_Day": "Dzień rozpoczęcia tygodnia",
|
||||
"StartsWith": "",
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
"Added_on": "Adicionado a",
|
||||
"Advanced": "Avançado",
|
||||
"Alignment": "Alinhamento",
|
||||
"All": "",
|
||||
"Amount": "Quantidade",
|
||||
"Apply": "",
|
||||
"Auto_Planner": "",
|
||||
@@ -26,6 +27,7 @@
|
||||
"Auto_Sort_Help": "Mover todos os ingredientes para o passo mais indicado.",
|
||||
"Automate": "Automatizar",
|
||||
"Automation": "Automação",
|
||||
"BatchDeleteConfirm": "",
|
||||
"Books": "Livros",
|
||||
"Calculator": "Calculadora",
|
||||
"Calories": "Calorias",
|
||||
@@ -103,6 +105,7 @@
|
||||
"Fats": "Gorduras",
|
||||
"File": "Ficheiro",
|
||||
"Files": "Ficheiros",
|
||||
"Finish": "",
|
||||
"Food": "Comida",
|
||||
"FoodInherit": "Campos herdados por comida",
|
||||
"FoodNotOnHand": "Não têm {food} disponível.",
|
||||
@@ -234,6 +237,7 @@
|
||||
"Ratings": "Avaliações",
|
||||
"Recently_Viewed": "Vistos Recentemente",
|
||||
"Recipe": "Receita",
|
||||
"RecipeStructure": "",
|
||||
"Recipe_Book": "Livro de Receitas",
|
||||
"Recipe_Image": "Imagem da Receita",
|
||||
"Recipes": "Receitas",
|
||||
@@ -269,6 +273,7 @@
|
||||
"Show_as_header": "Mostrar como cabeçalho",
|
||||
"Size": "Tamanho",
|
||||
"Sort_by_new": "Ordenar por mais recente",
|
||||
"Start": "",
|
||||
"StartDate": "Data de início",
|
||||
"Starting_Day": "Dia de início da semana",
|
||||
"StartsWith": "",
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
"AiProvider": "",
|
||||
"AiProviderHelp": "",
|
||||
"Alignment": "Alinhamento",
|
||||
"All": "",
|
||||
"AllRecipes": "Todas Receitas",
|
||||
"Amount": "Quantidade",
|
||||
"App": "Aplicação",
|
||||
@@ -209,6 +210,7 @@
|
||||
"Fats": "Gorduras",
|
||||
"File": "Arquivo",
|
||||
"Files": "Arquivos",
|
||||
"Finish": "",
|
||||
"FinishedAt": "Finalizado em",
|
||||
"First": "Primeiro",
|
||||
"First_name": "Primeiro Nome",
|
||||
@@ -413,6 +415,7 @@
|
||||
"Ratings": "Classificações",
|
||||
"Recently_Viewed": "Visto recentemente",
|
||||
"Recipe": "Receita",
|
||||
"RecipeStructure": "",
|
||||
"Recipe_Book": "Livro de Receitas",
|
||||
"Recipe_Image": "Imagem da receita",
|
||||
"Recipes": "Receitas",
|
||||
@@ -467,6 +470,7 @@
|
||||
"SpacePrivateObjectsHelp": "",
|
||||
"Space_Cosmetic_Settings": "Algumas configurações cosméticas podem ser alteradas pelos administradores do espaço e substituirão as configurações do cliente para esse espaço.",
|
||||
"Split_All_Steps": "Divida todas as linhas em etapas separadas.",
|
||||
"Start": "",
|
||||
"StartDate": "Data Início",
|
||||
"Starting_Day": "Dia de início da semana",
|
||||
"Step": "Etapa",
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
"AiModelHelp": "",
|
||||
"AiProvider": "",
|
||||
"AiProviderHelp": "",
|
||||
"All": "",
|
||||
"Amount": "Cantitate",
|
||||
"App": "Aplicație",
|
||||
"Apply": "",
|
||||
@@ -133,6 +134,7 @@
|
||||
"Fats": "Grăsimi",
|
||||
"File": "Fișier",
|
||||
"Files": "Fișiere",
|
||||
"Finish": "",
|
||||
"First_name": "Prenume",
|
||||
"Food": "Mâncare",
|
||||
"FoodInherit": "Câmpuri moștenite de alimente",
|
||||
@@ -297,6 +299,7 @@
|
||||
"Ratings": "Evaluări",
|
||||
"Recently_Viewed": "Vizualizate recent",
|
||||
"Recipe": "Rețetă",
|
||||
"RecipeStructure": "",
|
||||
"Recipe_Book": "Carte de rețete",
|
||||
"Recipe_Image": "Imagine a rețetei",
|
||||
"Recipes": "Rețete",
|
||||
@@ -348,6 +351,7 @@
|
||||
"SpaceName": "",
|
||||
"SpacePrivateObjectsHelp": "",
|
||||
"Split_All_Steps": "Împărțiți toate rândurile în pași separați.",
|
||||
"Start": "",
|
||||
"Starting_Day": "Ziua de început a săptămânii",
|
||||
"StartsWith": "",
|
||||
"StartsWithHelp": "",
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user