From 1adc943ede539e713b37085c5797e0cd44973cc4 Mon Sep 17 00:00:00 2001 From: smilerz Date: Tue, 18 Jan 2022 05:20:46 -0600 Subject: [PATCH] Squashed commit of the following: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit commit ba1f10cd3a72f600ae46c741aa69d3ad4deee857 Merge: 4e0cc34d4 ef4ce62f5 Author: vabene1111 Date: Tue Jan 18 07:59:32 2022 +0100 Merge branch 'develop' into facet-fix commit 4e0cc34d4104d21a54701e01db01906bceaa49a8 Author: smilerz Date: Mon Jan 17 17:18:43 2022 -0600 better fix for counting facets commit ef4ce62f5b4daf6fc1449cc9a49d0e0ee7e967c8 Author: Kaibu Date: Mon Jan 17 23:48:57 2022 +0100 custom class selection for lookupinput comp commit b990462bdb657bbe0bcf569921a540e2ada14694 Merge: c60141940 5e34c6ddf Author: Kaibu Date: Mon Jan 17 23:48:12 2022 +0100 Merge branch 'develop' of https://github.com/vabene1111/recipes into develop commit 5e34c6ddf03fe3c2e8b26c76ccec13ba4160b215 Merge: 532d32c19 d8d76ae9e Author: vabene1111 Date: Mon Jan 17 23:29:49 2022 +0100 Merge pull request #1353 from smilerz/supermarket-category fix missing label on first supermarket category commit d8d76ae9e0863cf11842871cf5c35759fc2ba7fb Author: smilerz Date: Mon Jan 17 16:12:54 2022 -0600 fix missing label supermarket category commit c60141940d658352aa102b5e6412eecf71ae65db Author: Kaibu Date: Mon Jan 17 23:02:42 2022 +0100 shopping list ux improvements commit 532d32c194d9fa3ef4b39c79d95379e48a40fe8c Author: vabene1111 Date: Mon Jan 17 22:41:38 2022 +0100 fixed shopping user save setting would not work commit 54721a0a62315bc656fe89011e74376ff6da7611 Author: vabene1111 Date: Mon Jan 17 22:37:14 2022 +0100 also added space to bot commit c27933548d23372653a92a69df463bd405a1686f Author: vabene1111 Date: Mon Jan 17 22:28:02 2022 +0100 fixed order of delete commit d04e9518cbb77c5fcc1d7d9bd225ea82f4e5001c Author: vabene1111 Date: Mon Jan 17 22:13:36 2022 +0100 fixed telegram shopping bot commit b9065f7052188bbbd24930008a7df4cc157ba6ef Author: vabene1111 Date: Mon Jan 17 22:03:57 2022 +0100 added space deletion feature commit c8c29e1b5a7db269c486a9fc9d6ec5cbf29b8e58 Author: vabene1111 Date: Mon Jan 17 21:14:22 2022 +0100 fixed performance issue commit 5724ef951132379e6326122f3637957cdf2d8fef Author: smilerz Date: Mon Jan 17 14:02:58 2022 -0600 fix boolean directive commit 2595a26fb4d3d6209c1b93298bfed62ac1c8cd49 Merge: e1c7305c0 437296415 Author: vabene1111 Date: Mon Jan 17 20:26:02 2022 +0100 Merge pull request #1351 from MaxJa4/patch-1 Add hint about trailing slashes for subpath setups commit e1c7305c0767136d297bf58c2292f3e4089e7b56 Author: vabene1111 Date: Mon Jan 17 20:22:37 2022 +0100 switcher basically working again commit 418c38423f843a142ba309d1adfcfa520c216e11 Merge: 90b6f9ad0 cc5be844d Author: vabene1111 Date: Mon Jan 17 20:15:01 2022 +0100 Merge pull request #1352 from smilerz/fix-search force list params to list commit cc5be844d539c55fe55e2d0755cc53bcff516fa5 Author: smilerz Date: Mon Jan 17 13:13:26 2022 -0600 force list params to list commit 90b6f9ad06dde36ced99aac6b9c25e1a601021dd Author: vabene1111 Date: Mon Jan 17 19:54:16 2022 +0100 fixed sub recipe issue commit 437296415eef8c75dfc4dd7a3928fd9c7dd9743b Author: MaxJa4 <74194322+MaxJa4@users.noreply.github.com> Date: Mon Jan 17 18:43:14 2022 +0100 Update .env.template commit a8c885bd2188ea9adfd43b4701bde8b2dee16516 Author: MaxJa4 <74194322+MaxJa4@users.noreply.github.com> Date: Mon Jan 17 18:41:41 2022 +0100 Remove newline at the end commit a539d14aadc3ffdb813e3428bf6789cd37b6eabd Author: vabene1111 Date: Mon Jan 17 18:15:23 2022 +0100 wip switcher commit 2b0541bd74566056f55fecc4c73bbafeb992227b Author: MaxJa4 <74194322+MaxJa4@users.noreply.github.com> Date: Mon Jan 17 18:05:39 2022 +0100 Add hint about trailing slashes for subpath setups Add hint about trailing slashes for subpath setups due to recent issue on Discord. commit 3f53a924e112a69dbe49b5abbef0b78cb8d2c64a Merge: d23158839 0ed9100fb Author: vabene1111 Date: Mon Jan 17 18:01:47 2022 +0100 Merge branch 'develop' of https://github.com/vabene1111/recipes into develop commit 0ed9100fb1393e527184cff45c2d22f4e8cfec3d Merge: d2b796ddd 85ecac3a1 Author: vabene1111 Date: Mon Jan 17 17:59:19 2022 +0100 Merge pull request #1350 from TandoorRecipes/patch-empty-recipe_list Update recipe_search.py commit d23158839b6ef19e7dd100842109f96d63103925 Author: vabene1111 Date: Mon Jan 17 17:58:09 2022 +0100 Revert "temporarily disable recipe switcher" This reverts commit d2b796ddd2796cbbee5dbf7f32c90b3bc6e5fd76. commit d2b796ddd2796cbbee5dbf7f32c90b3bc6e5fd76 Author: vabene1111 Date: Mon Jan 17 17:58:04 2022 +0100 temporarily disable recipe switcher commit 8b1e80efebc3092d7d296b348337f471903aa6cd Author: vabene1111 Date: Mon Jan 17 17:51:29 2022 +0100 wip commit 85ecac3a17439de3d42262be3d6f8a1b507aaec2 Author: smilerz Date: Mon Jan 17 10:10:38 2022 -0600 Update recipe_search.py commit e0b8d6fcc395fcbfee705c4a431c7544bbeb09d1 Author: vabene1111 Date: Mon Jan 17 17:00:08 2022 +0100 added exception catch to nextcloud importer to handle empty folders in sync commit edd47873f755633320a43ed8b42b58b657fe554c Author: vabene1111 Date: Mon Jan 17 16:51:04 2022 +0100 fixed signup button and autofocus on user input fields commit c14dd0426180210a91970d02931300ee1713203f Merge: a37672812 769365d62 Author: vabene1111 Date: Mon Jan 17 16:50:36 2022 +0100 Merge pull request #1348 from smilerz/fuzzy_search Fuzzy search commit 769365d6245d5d2ccd6a892374a071a75d296042 Merge: ddb9e70d3 30421d067 Author: smilerz Date: Mon Jan 17 09:46:33 2022 -0600 Merge branch 'fuzzy_search' of github.com:smilerz/recipes into fuzzy_search commit ddb9e70d31ea5201d56e2b3d066d0f7e4b65495d Author: smilerz Date: Mon Jan 17 09:46:26 2022 -0600 fix url_import commit a37672812005fe74914d68ada33175e80e04ea59 Author: vabene1111 Date: Mon Jan 17 16:29:29 2022 +0100 fixed keyword creation in exporter #1213 commit 306f90aa98020c6620bb9e11cd8b12ac31abbc39 Author: vabene1111 Date: Mon Jan 17 16:27:10 2022 +0100 recipe editor decimal fixes commit a19ad706ce22e9585b124f95724d34359b1be699 Merge: 4af6de742 8f3044dbe Author: vabene1111 Date: Mon Jan 17 16:22:18 2022 +0100 Merge branch 'develop' of https://github.com/vabene1111/recipes into develop commit 4af6de74254690a3fd7bf8acc748f8d1a0e5963c Author: vabene1111 Date: Mon Jan 17 16:22:11 2022 +0100 Revert "Merge pull request #1280 from MarcusWolschon/feature1275_readable_export_file_names" This reverts commit c4f40b96391f9f8d2ffa7ade6d2d26743c8f1668, reversing changes made to 93b868bc698cb096726f992687a72ece35739348. commit 8f3044dbee08d7232dce1377b501004163bdd4e8 Merge: 7c5ffdaef 51620a34d Author: vabene1111 Date: Mon Jan 17 16:04:40 2022 +0100 Merge pull request #1316 from tomtjes/docs-swag-example add swag config example commit 7c5ffdaef424ef2d449d84b85d52ec25a4346acc Merge: d3b71e40c 30421d067 Author: vabene1111 Date: Mon Jan 17 15:51:54 2022 +0100 Merge pull request #1347 from smilerz/fuzzy_search Fuzzy search commit 30421d067e17b96a1f51a52a8a420754d6541085 Merge: dde350c8a d3b71e40c Author: vabene1111 Date: Mon Jan 17 15:51:23 2022 +0100 Merge branch 'develop' into fuzzy_search commit d3b71e40c746a8f1c964135938e7f5695684e9af Author: vabene1111 Date: Mon Jan 17 15:43:35 2022 +0100 cleand up context menu code commit 1a84a8fe80cb55abbdd8c941d123297349a1830a Merge: 16cb99f91 934eeee5c Author: vabene1111 Date: Mon Jan 17 15:39:11 2022 +0100 Merge pull request #1289 from MarcusWolschon/features/1093_recipe_link_in_plan commit 16cb99f915f3f0fed5d120e86cc144404405a6b0 Merge: a451f722a f07690d7e Author: vabene1111 Date: Mon Jan 17 15:37:48 2022 +0100 Merge pull request #1317 from mheiland/patch-1 Example for third-party authentication commit a451f722a1dc0e4ac836acf1be2593e398fdbe31 Merge: f12196d1c 99b3ed846 Author: vabene1111 Date: Mon Jan 17 15:35:43 2022 +0100 Merge pull request #1327 from tomtjes/docs-faq-amendments FAQ amendments commit dde350c8afc72a9dbc4685e8e404ff5d3c0d441f Author: smilerz Date: Mon Jan 17 08:35:19 2022 -0600 prettier cleanup commit f12196d1c681b26df05d1ba3ba6f57b2402fb5ae Merge: d4242a244 b3e971fe0 Author: vabene1111 Date: Mon Jan 17 15:20:45 2022 +0100 Merge pull request #1343 from MatthiasLohr/feature/db-url-path Allow to specify an actual path using DATABASE_URL commit d4242a244d5b083b2b839d4633d66628e902ae3e Merge: 0c603e366 8a7c4e11c Author: vabene1111 Date: Mon Jan 17 15:16:37 2022 +0100 Merge branch 'master' into develop commit 8a7c4e11c924acaed05bc8935eb0ed8cd2de720a Author: vabene1111 Date: Mon Jan 17 15:16:13 2022 +0100 fixed invite link counting commit 745bb58c7ec8e4026a48fceca0baf20af9cbdd50 Author: vabene1111 Date: Sun Jan 9 18:25:38 2022 +0100 fixed valid filter on invite link counter commit b3e971fe09b96a4b877501611ec424157a4f579f Author: Matthias Lohr Date: Mon Jan 17 11:21:36 2022 +0100 allow to specify an actual path using DATABASE_URL commit 0c603e36658eb1f96ec0460e3a29a6767db5334e Author: Oliver Cervera Date: Sun Jan 16 15:21:49 2022 +0000 Translated using Weblate (Italian) Currently translated at 84.1% (239 of 284 strings) Translation: Tandoor/Recipes Frontend Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/it/ commit fed9cfeeb74fb630cd2bc14785042213e562e325 Author: Oliver Cervera Date: Sun Jan 16 15:44:28 2022 +0000 Translated using Weblate (Italian) Currently translated at 96.6% (492 of 509 strings) Translation: Tandoor/Recipes Backend Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-backend/it/ commit 5a65fd2231ed33cfd711dbc904385030b2443a48 Merge: c2a763fa4 24e42496a Author: vabene1111 Date: Sun Jan 16 17:29:35 2022 +0100 Merge pull request #1331 from TandoorRecipes/dependabot/npm_and_yarn/vue/follow-redirects-1.14.7 Bump follow-redirects from 1.14.6 to 1.14.7 in /vue commit c2a763fa4cc09edf46048cd21f736261c20748e6 Author: SMunos Date: Fri Jan 14 23:19:21 2022 +0000 Translated using Weblate (French) Currently translated at 100.0% (284 of 284 strings) Translation: Tandoor/Recipes Frontend Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/fr/ commit 528767a8351ce25fe56331cb17c3cc5b388e5709 Author: Josselin du PLESSIS Date: Fri Jan 14 23:20:10 2022 +0000 Translated using Weblate (French) Currently translated at 100.0% (284 of 284 strings) Translation: Tandoor/Recipes Frontend Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/fr/ commit 9b182f607627751a950304bd528424228858cef6 Author: 糖多 <1365143958@qq.com> Date: Sat Jan 15 06:09:40 2022 +0000 Translated using Weblate (Chinese (Simplified)) Currently translated at 32.0% (91 of 284 strings) Translation: Tandoor/Recipes Frontend Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/zh_Hans/ commit 968b710b4971659cbfc1f25930fb0b523a4333e6 Author: 糖多 <1365143958@qq.com> Date: Sat Jan 15 06:19:48 2022 +0000 Translated using Weblate (Chinese (Simplified)) Currently translated at 28.6% (146 of 509 strings) Translation: Tandoor/Recipes Backend Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-backend/zh_Hans/ commit f11e07d347ffe5c5546de0c874acf77cce578b79 Author: Josselin du PLESSIS Date: Fri Jan 14 23:23:05 2022 +0000 Translated using Weblate (French) Currently translated at 100.0% (509 of 509 strings) Translation: Tandoor/Recipes Backend Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-backend/fr/ commit 24e42496a79273886b6b0ad37b7d94d29c6cba5a Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun Jan 16 01:02:54 2022 +0000 Bump follow-redirects from 1.14.6 to 1.14.7 in /vue Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.6 to 1.14.7. - [Release notes](https://github.com/follow-redirects/follow-redirects/releases) - [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.14.6...v1.14.7) --- updated-dependencies: - dependency-name: follow-redirects dependency-type: indirect ... Signed-off-by: dependabot[bot] commit 9da496cb6d99b1d7067ddd204f58609cd4dffb54 Merge: 8cebc98d3 9221533ae Author: vabene1111 Date: Sat Jan 15 21:46:04 2022 +0100 Merge pull request #1323 from MaxJa4/patch-1 Added Apache2 in the bug report template commit 99b3ed84643386e1f18c7ad46ecbd1d8745000fd Author: tomtjes Date: Sat Jan 15 13:58:40 2022 -0500 add FAQ for PWA commit 281535e756e6ecd5a7a378a1b6eb0ae0a1900a50 Author: tomtjes Date: Sat Jan 15 13:57:20 2022 -0500 phrase FAQ as questions commit 9221533ae72d705e32ae061a63d00b2eeb3aae99 Author: MaxJa4 <74194322+MaxJa4@users.noreply.github.com> Date: Sat Jan 15 12:56:01 2022 +0100 Added Apache2 in the bug report template Added Apache2 as selectable option in the bug report template commit f07690d7e3d033fed69c024d6f52c9eaedcf81a0 Author: mheiland <15824364+mheiland@users.noreply.github.com> Date: Sat Jan 15 00:24:56 2022 +0100 Example for third-party authentication Providing an example to integrate Keycloak as IAM for Tandoor. Hinting that both SOCIAL* variables are required. commit 8cebc98d3b381f4033e93ee1403297ce5b8f4af6 Author: SMunos Date: Fri Jan 14 23:18:38 2022 +0000 Translated using Weblate (French) Currently translated at 100.0% (284 of 284 strings) Translation: Tandoor/Recipes Frontend Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/fr/ commit 965d2c05e74127e134bd76968382d39d0d2aa46b Author: FrenchAnon Date: Fri Jan 14 23:17:50 2022 +0000 Translated using Weblate (French) Currently translated at 100.0% (284 of 284 strings) Translation: Tandoor/Recipes Frontend Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/fr/ commit 17ad01ae8c0ba17923dffafbac22a6d39b79ca76 Author: Josselin du PLESSIS Date: Fri Jan 14 22:42:42 2022 +0000 Translated using Weblate (French) Currently translated at 100.0% (284 of 284 strings) Translation: Tandoor/Recipes Frontend Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/fr/ commit 51620a34d93a9745d6e356f77eb99fd43c91d283 Author: tomtjes Date: Fri Jan 14 15:10:22 2022 -0500 add swag config example commit 91fcb1b822b5bacc7d90245232ff14d21db7fe08 Author: Tomasz Klimczak Date: Thu Jan 6 12:50:29 2022 +0000 Translated using Weblate (Polish) Currently translated at 80.9% (225 of 278 strings) Translation: Tandoor/Recipes Frontend Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/pl/ commit 01d5ab92c5883c030873312ced62047abdbb0761 Author: Tiago Rascazzi Date: Thu Jan 6 16:30:49 2022 +0000 Translated using Weblate (French) Currently translated at 72.6% (202 of 278 strings) Translation: Tandoor/Recipes Frontend Translate-URL: http://translate.tandoor.dev/projects/tandoor/recipes-frontend/fr/ commit 79c8d26e8ceb381ae7f1ca9bbbc8e17090ae399d Merge: 9486b08e2 0e1153ce3 Author: vabene1111 Date: Fri Jan 14 17:18:30 2022 +0100 Merge pull request #1311 from smilerz/patch-2 fix bug creating food with create form commit 9486b08e204ef792665f4f6a31ddf23382ba0b2b Merge: d36033a8b ffa91863d Author: vabene1111 Date: Fri Jan 14 16:57:10 2022 +0100 Merge pull request #1309 from MaxJa4/develop Disabled old issue templates and added new ones with new GitHub issues format commit 934eeee5c4779fec09cb608f5274f2473bc0d686 Author: Marcus Wolschon Date: Fri Jan 14 13:56:46 2022 +0100 commit 2927333bf14f2f75fca4f1363cc8b59a249f7a26 Author: Marcus Wolschon Date: Fri Jan 14 13:52:42 2022 +0100 commit 0e1153ce3a818f2367f868587846b23f2bdd9c2f Author: smilerz Date: Thu Jan 13 17:40:26 2022 -0600 deleted extraneous emit commit b3f05b0bfdf5bc3e77a154cdaea6d520bb5d50e8 Author: smilerz Date: Thu Jan 13 16:50:15 2022 -0600 fix bug creating food with create form commit ffa91863dd131e25822b212821ed136162700812 Author: Maximilian Jannack Date: Thu Jan 13 21:26:15 2022 +0100 Added config.yml for FAQ link commit cf2d33daadc3b93609a57c5898137791ae1d9f0b Author: Maximilian Jannack Date: Thu Jan 13 21:17:08 2022 +0100 Disabled old issue templates and added new ones with new GitHub issues format commit 8f08ba71147cf3fce41cd1e24bd10df930c59149 Author: Marcus Wolschon Date: Wed Jan 12 16:15:55 2022 +0100 commit 8a4f35e5928d620294b286b83f2529126429f810 Author: Marcus Wolschon Date: Wed Jan 12 11:37:08 2022 +0100 --- .../ShoppingListView/ShoppingListView.vue | 434 ++++++------------ 1 file changed, 152 insertions(+), 282 deletions(-) diff --git a/vue/src/apps/ShoppingListView/ShoppingListView.vue b/vue/src/apps/ShoppingListView/ShoppingListView.vue index fa67fe0d60..6405c6627e 100644 --- a/vue/src/apps/ShoppingListView/ShoppingListView.vue +++ b/vue/src/apps/ShoppingListView/ShoppingListView.vue @@ -4,10 +4,10 @@
- + - + - +
@@ -29,7 +29,7 @@ {{ $t("Shopping_list") }} -
+
@@ -92,8 +92,8 @@
-
- {{ $t("Completed") }} +
+

{{ $t("Completed") }}

@@ -122,17 +122,9 @@
- +
- - - +
@@ -146,63 +138,33 @@ -
- - - - - {{ $t("Servings") }} - - - - - - - - {{ $t("Add_to_Shopping") }} - - - - - - - - - - - - - - - - - - +
{{ $t("Meal_Plan") }}{{ $t("Recipe") }}{{ $t("Servings") }}
{{ r.recipe_mealplan.name }}{{ r.recipe_mealplan.recipe_name }} - - - -
+ + + + + + -
{{ $t("Meal_Plan") }}{{ $t("Recipe") }}{{ $t("Servings") }}
-
+ + + {{ r.recipe_mealplan.name }} + {{ r.recipe_mealplan.recipe_name }} + + + + + + + +
- + + - - - - {{ $t("Create") }} - - +
+ + {{ $t("Save") }} +
- - + +
-
-
- {{ s.name }} - - - - - - -
+
{{ s.name }}
+
+ + + + + +
- - + +
+
- + - - - - {{ $t("Create") }} - - +
+ + {{ $t("Save") }} +
{{ $t("CategoryInstruction") }} @@ -321,29 +284,16 @@ > - -
-
- -
-
-
- {{ categoryName(c) }} - - - -
-
-
-
+ {{ categoryName(c) }} + + +
@@ -353,29 +303,18 @@ class="list-group" :list="notSupermarketCategory" group="category" + v-if="new_supermarket.editmode" @start="drag = true" @end="drag = false" ghost-class="ghost" - v-if="new_supermarket.editmode" v-bind="{ animation: 200 }" > - - -
-
- -
-
-
- {{ categoryName(c) }} - - - -
-
-
-
+ + {{ categoryName(c) }} + + +
@@ -391,7 +330,7 @@
{{ $t("mealplan_autoadd_shopping") }}
- +
@@ -403,7 +342,7 @@
{{ $t("mealplan_autoexclude_onhand") }}
- +
@@ -416,7 +355,7 @@
{{ $t("mealplan_autoinclude_related") }}
- +
@@ -454,7 +393,7 @@
{{ $t("shopping_auto_sync") }}
- +
@@ -467,7 +406,7 @@
{{ $t("shopping_add_onhand") }}
- +
@@ -480,9 +419,10 @@
{{ $t("shopping_recent_days") }}
- +
+
@@ -493,7 +433,7 @@
{{ $t("filter_to_supermarket") }}
- +
@@ -506,7 +446,7 @@
{{ $t("default_delay") }}
- +
@@ -519,7 +459,7 @@
{{ $t("csv_delim_label") }}
- +
@@ -532,7 +472,7 @@
{{ $t("csv_prefix_label") }}
- +
@@ -542,19 +482,6 @@
-
-
{{ $t("left_handed") }}
-
- -
-
-
-
- - {{ $t("left_handed_help") }} - -
-
@@ -609,23 +536,26 @@ @@ -722,7 +648,6 @@ export default { DownloadPDF, DownloadCSV, CopyToClipboard, - ShoppingModal, }, data() { @@ -752,13 +677,11 @@ export default { csv_delim: ",", csv_prefix: undefined, shopping_add_onhand: true, - left_handed: false, }, new_supermarket: { entrymode: false, value: undefined, editmode: undefined }, new_category: { entrymode: false, value: undefined }, autosync_id: undefined, - auto_sync_running: false, // track to not start a new sync before old one was finished - auto_sync_blocked: false, // blocking auto sync while request to check item is still running + auto_sync_running: false, show_delay: false, drag: false, show_modal: false, @@ -767,10 +690,6 @@ export default { entrymode: false, new_item: { amount: 1, unit: undefined, food: undefined, ingredient: undefined }, online: true, - new_recipe: { - id: undefined, - }, - add_recipe_servings: 1, } }, computed: { @@ -808,9 +727,6 @@ export default { var groups = { false: {}, true: {} } // force unchecked to always be first if (this.selected_supermarket) { - // TODO: make nulls_first a user setting - groups.false[this.$t("Undefined")] = {} - groups.true[this.$t("Undefined")] = {} let super_cats = this.supermarkets .filter((x) => x.id === this.selected_supermarket) .map((x) => x.category_to_supermarket) @@ -821,6 +737,9 @@ export default { groups["true"][cat] = {} }) } else { + // TODO: make nulls_first a user setting + groups.false[this.$t("Undefined")] = {} + groups.true[this.$t("Undefined")] = {} this.shopping_categories.forEach((cat) => { groups.false[cat.name] = {} groups.true[cat.name] = {} @@ -869,8 +788,7 @@ export default { return (this.itemsDelayed && !this.show_delay) || !this.show_undefined_categories || (this.supermarket_categories_only && this.selected_supermarket) }, Recipes() { - // hiding recipes associated with shopping list items that are complete - return [...new Map(this.items.filter((x) => x.list_recipe && !x.checked).map((item) => [item["list_recipe"], item])).values()] + return [...new Map(this.items.filter((x) => x.list_recipe).map((item) => [item["list_recipe"], item])).values()] }, supermarketCategory() { return this.new_supermarket.editmode ? this.new_supermarket.value.category_to_supermarket : this.shopping_categories @@ -896,12 +814,6 @@ export default { this.supermarket_categories_only = this.settings.filter_to_supermarket localStorage.setItem("shopping_v2_selected_supermarket", JSON.stringify(this.selected_supermarket)) }, - new_recipe: { - handler() { - this.add_recipe_servings = this.new_recipe.servings - }, - deep: true, - }, "settings.filter_to_supermarket": function (newVal, oldVal) { this.supermarket_categories_only = this.settings.filter_to_supermarket }, @@ -954,21 +866,14 @@ export default { // this.genericAPI inherited from ApiMixin addItem: function () { if (this.entry_mode_simple) { - if (this.new_item.ingredient !== "" && this.new_item.ingredient !== undefined) { - this.genericPostAPI("api_ingredient_from_string", { text: this.new_item.ingredient }).then((result) => { - let unit = null - if (result.data.unit !== "") { - unit = { name: result.data.unit } - } - - this.new_item = { - amount: result.data.amount, - unit: unit, - food: { name: result.data.food }, - } - this.addEntry() - }) - } + this.genericPostAPI("api_ingredient_from_string", { text: this.new_item.ingredient }).then((result) => { + this.new_item = { + amount: result.data.amount, + unit: { name: result.data.unit }, + food: { name: result.data.food }, + } + this.addEntry() + }) } else { this.addEntry() } @@ -1125,9 +1030,7 @@ export default { } this.loading = false } else { - if (!this.auto_sync_blocked) { - this.mergeShoppingList(results.data) - } + this.mergeShoppingList(results.data) } }) .catch((err) => { @@ -1156,15 +1059,6 @@ export default { }) ) this.auto_sync_running = false - let new_entries = data.map((x) => x.id).filter((y) => !this.items.map((z) => z.id).includes(y)) - if (new_entries.length > 0) { - let api = new ApiApiFactory() - new_entries.forEach((new_id) => { - api.retrieveShoppingListEntry(new_id).then((result) => { - this.items.push(result.data) - }) - }) - } }, moveEntry: function (e, item) { if (!e) { @@ -1259,7 +1153,6 @@ export default { }, updateChecked: function (update) { // when checking a sub item don't refresh the screen until all entries complete but change class to cross out - this.auto_sync_blocked = true let promises = [] update.entries.forEach((x) => { const id = x?.id ?? x @@ -1274,20 +1167,15 @@ export default { Vue.set(item, "completed_at", completed_at) }) - Promise.all(promises) - .then(() => { - this.auto_sync_blocked = false - }) - .catch((err) => { - this.auto_sync_blocked = false - console.log(err, err.response) - StandardToasts.makeStandardToast(StandardToasts.FAIL_UPDATE) - }) + Promise.all(promises).catch((err) => { + console.log(err, err.response) + StandardToasts.makeStandardToast(StandardToasts.FAIL_UPDATE) + }) }, updateFood: function (food, field) { let api = new ApiApiFactory() if (field) { - // assume if field is changing it should no longer be inherited + // assume if field is changing it should no longer be inheritted food.inherit_fields = food.inherit_fields.filter((x) => x.field !== field) } @@ -1421,24 +1309,6 @@ export default { window.removeEventListener("online", this.updateOnlineStatus) window.removeEventListener("offline", this.updateOnlineStatus) }, - addRecipeToShopping() { - this.$bvModal.show(`shopping_${this.new_recipe.id}`) - }, - finishShopping() { - this.getShoppingList() - }, - }, - directives: { - hover: { - inserted: function (el) { - el.addEventListener("mouseenter", () => { - el.classList.add("shadow") - }) - el.addEventListener("mouseleave", () => { - el.classList.remove("shadow") - }) - }, - }, }, } @@ -1473,12 +1343,12 @@ export default { background: #c8ebfb; } -.slide-fade-enter-active, -.slide-fade-leave-active { - transition: all 0.2s ease; +.slider-fade-enter-active, +.slider-fade-leave-active { + transition: all 0.3s ease; } -.slide-fade-enter, .slide-fade-leave-to +.slider-fade-enter, .slider-fade-leave-to /* .slider-fade-leave-active below version 2.1.8 */ { transform: translateX(10px); opacity: 0;