From 0ce4d45eeb5c2ec902ca622f9db699e74705de93 Mon Sep 17 00:00:00 2001 From: vabene1111 Date: Wed, 27 Dec 2023 21:15:24 +0100 Subject: [PATCH] sorting --- .../ShoppingListView/ShoppingListView.vue | 67 +++++++++--------- vue/src/components/ShoppingLineItem.vue | 8 ++- vue/src/locales/en.json | 1 + vue/src/stores/ShoppingListStore.js | 69 +++++++++++++------ 4 files changed, 88 insertions(+), 57 deletions(-) diff --git a/vue/src/apps/ShoppingListView/ShoppingListView.vue b/vue/src/apps/ShoppingListView/ShoppingListView.vue index b616ddea4..02349f523 100644 --- a/vue/src/apps/ShoppingListView/ShoppingListView.vue +++ b/vue/src/apps/ShoppingListView/ShoppingListView.vue @@ -52,20 +52,19 @@ - - {{ $t('Undefined') }} + {{ $t('Undefined') }} {{ c.name }} - - + + @@ -371,8 +370,9 @@ - + + + { - if (!autosync) { - if (results.data?.length) { - this.items = results.data - } else { - console.log("no data returned") - } - this.loading = false - } else { - if (!this.auto_sync_blocked) { - this.getSyncQueueLength().then((r) => { - if (r === 0) { - this.mergeShoppingList(results.data) - } else { - this.auto_sync_running = false - this.replaySyncQueue() - } - }) - } - } - }) - .catch((err) => { - if (!autosync) { - StandardToasts.makeStandardToast(this, StandardToasts.FAIL_FETCH, err) - } - }) + // this.genericAPI(this.Models.SHOPPING_LIST, this.Actions.LIST, params).then((results) => { + // if (!autosync) { + // if (results.data?.length) { + // this.items = results.data + // } else { + // console.log("no data returned") + // } + // this.loading = false + // } else { + // if (!this.auto_sync_blocked) { + // this.getSyncQueueLength().then((r) => { + // if (r === 0) { + // this.mergeShoppingList(results.data) + // } else { + // this.auto_sync_running = false + // this.replaySyncQueue() + // } + // }) + // } + // } + // }) + // .catch((err) => { + // if (!autosync) { + // StandardToasts.makeStandardToast(this, StandardToasts.FAIL_FETCH, err) + // } + // }) }, getSupermarkets: function () { let api = new ApiApiFactory() diff --git a/vue/src/components/ShoppingLineItem.vue b/vue/src/components/ShoppingLineItem.vue index ba3078390..ffddc206b 100644 --- a/vue/src/components/ShoppingLineItem.vue +++ b/vue/src/components/ShoppingLineItem.vue @@ -31,7 +31,8 @@