From 8469575ea3ee3f316b7e0a77e994d034ae33e9b9 Mon Sep 17 00:00:00 2001 From: amansinghbais Date: Mon, 21 Oct 2024 17:09:52 +0530 Subject: [PATCH] Implemented: spinner inside of the edit picker modal (#444) --- src/components/EditPickerModal.vue | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/components/EditPickerModal.vue b/src/components/EditPickerModal.vue index 40b792fc2..303cd53a0 100644 --- a/src/components/EditPickerModal.vue +++ b/src/components/EditPickerModal.vue @@ -15,9 +15,12 @@ {{ translate("Staff") }} -
- {{ translate("No picker found") }} +
+ + {{ translate("Fetching pickers") }}
+
{{ translate('No picker found') }}
+
@@ -55,6 +58,7 @@ import { IonRadio, IonRadioGroup, IonSearchbar, + IonSpinner, IonTitle, IonToolbar, alertController, @@ -88,14 +92,16 @@ export default defineComponent({ IonToolbar, IonRadio, IonRadioGroup, - IonSearchbar + IonSearchbar, + IonSpinner }, data () { return { availablePickers: [] as any, queryString: '', selectedPicker: {} as any, - selectedPickerId: this.order.pickerIds[0] + selectedPickerId: this.order.pickerIds[0], + isLoading: false } }, async mounted() { @@ -108,6 +114,7 @@ export default defineComponent({ this.selectedPicker = this.availablePickers.find((picker: any) => picker.id == id) }, async findPickers() { + this.isLoading = true; let inputFields = {} this.availablePickers = [] @@ -159,6 +166,7 @@ export default defineComponent({ } catch (err) { logger.error('Failed to fetch the pickers information or there are no pickers available', err) } + this.isLoading = false; }, async confirmSave() { const message = translate("Replace current pickers with new selection?");