From 92cd4f9e33868cd3c83468a12f2b70ee6cceee40 Mon Sep 17 00:00:00 2001 From: amansinghbais Date: Mon, 21 Oct 2024 15:12:19 +0530 Subject: [PATCH 1/2] Improved: showing ion spinner until picker list is being fetched (#444) --- src/locales/en.json | 1 + src/locales/es.json | 1 + src/locales/ja.json | 1 + src/views/AssignPickerModal.vue | 15 +++++++++++++-- 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/locales/en.json b/src/locales/en.json index 142cf145a..ccbe9b43f 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -46,6 +46,7 @@ "Failed to update configuration": "Failed to update configuration", "Failed to print shipping label and packing slip": "Failed to print shipping label and packing slip", "Failed to update product store setting.": "Failed to update product store setting.", + "Fetching pickers": "Fetching pickers", "First name": "First name", "Generate packing slips": "Generate packing slips", "Generate shipping documents": "Generate shipping documents", diff --git a/src/locales/es.json b/src/locales/es.json index a440e2d3b..0c64387fb 100644 --- a/src/locales/es.json +++ b/src/locales/es.json @@ -44,6 +44,7 @@ "Failed to update configuration": "No se pudo actualizar la configuración", "Failed to print shipping label and packing slip": "Error al imprimir la etiqueta de envío y la hoja de embalaje", "Failed to update product store setting.": "Failed to update product store setting.", + "Fetching pickers": "Fetching pickers", "First name": "Nombre", "Generate packing slips": "Generar documentos de embalaje", "Generate shipping documents": "Generar documentos de envío", diff --git a/src/locales/ja.json b/src/locales/ja.json index 56404f3c3..e1eabb157 100644 --- a/src/locales/ja.json +++ b/src/locales/ja.json @@ -44,6 +44,7 @@ "Failed to update configuration": "設定の更新に失敗しました", "Failed to print shipping label and packing slip": "出荷ラベルと納品書の印刷に失敗しました。", "Failed to update product store setting.":"Failed to update product store setting.", + "Fetching pickers": "Fetching pickers", "First name": "名", "Generate packing slips": "内容明細票の作成", "Generate shipping documents": "出荷書類を生成する", diff --git a/src/views/AssignPickerModal.vue b/src/views/AssignPickerModal.vue index d009dc0b2..9de4075ee 100644 --- a/src/views/AssignPickerModal.vue +++ b/src/views/AssignPickerModal.vue @@ -13,7 +13,11 @@ -
{{ translate('No picker found') }}
+
+ + {{ translate("Fetching pickers") }} +
+
{{ translate('No picker found') }}
{{ translate("Staff") }} @@ -64,11 +68,13 @@ import { IonHeader, IonIcon, IonItem, + IonLabel, IonList, IonListHeader, IonRadio, IonRadioGroup, IonSearchbar, + IonSpinner, IonTitle, IonToolbar, IonInfiniteScroll, @@ -94,11 +100,13 @@ export default defineComponent({ IonHeader, IonIcon, IonItem, + IonLabel, IonList, IonListHeader, IonRadio, IonRadioGroup, IonSearchbar, + IonSpinner, IonTitle, IonToolbar, IonInfiniteScroll, @@ -111,7 +119,8 @@ export default defineComponent({ queryString: '', availablePickers: [], isScrollable: true, - isScrollingEnabled: false + isScrollingEnabled: false, + isLoading: false } }, methods: { @@ -155,6 +164,7 @@ export default defineComponent({ }); }, async getPicker(vSize, vIndex) { + this.isLoading = true; let inputFields = {} if(this.queryString.length > 0) { @@ -216,6 +226,7 @@ export default defineComponent({ logger.error(translate('Something went wrong')) } this.isScrollable = this.availablePickers.length < total; + this.isLoading = false; } }, async mounted() { From 18f060f003612e268c4b18e0d7081fdae8d5ba77 Mon Sep 17 00:00:00 2001 From: amansinghbais Date: Mon, 21 Oct 2024 15:20:06 +0530 Subject: [PATCH 2/2] Improved: used empty-state class in no record found (#444) --- src/views/AssignPickerModal.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/AssignPickerModal.vue b/src/views/AssignPickerModal.vue index 9de4075ee..24cf055a5 100644 --- a/src/views/AssignPickerModal.vue +++ b/src/views/AssignPickerModal.vue @@ -17,7 +17,7 @@ {{ translate("Fetching pickers") }} -
{{ translate('No picker found') }}
+
{{ translate('No picker found') }}
{{ translate("Staff") }}