diff --git a/src/locales/en.json b/src/locales/en.json index b3b4dca..bfce5d7 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -18,6 +18,7 @@ "Error getting preferred product store.": "Error getting preferred product store.", "Error getting user profile.": "Error getting user profile.", "Facility": "Facility", + "Fetching time zones": "Fetching time zones", "Filters": "Filters", "Go to OMS": "Go to OMS", "Go to Launchpad": "Go to Launchpad", diff --git a/src/theme/variables.css b/src/theme/variables.css index f58eda4..077a5c9 100644 --- a/src/theme/variables.css +++ b/src/theme/variables.css @@ -248,6 +248,23 @@ img { object-fit: contain; } +.empty-state { + max-width: 100%; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + padding: 10px; +} + +.empty-state > img { + object-fit: contain; +} + +.empty-state > p { + text-align: center; +} + @media (prefers-color-scheme: dark) { ion-chip > ion-icon { color: var(--ion-color-dark); @@ -260,4 +277,4 @@ img { ion-item { --border-color: var(--ion-color-medium) } -} \ No newline at end of file +} \ No newline at end of file diff --git a/src/views/TimezoneModal.vue b/src/views/TimezoneModal.vue index c801eb0..91fd3f4 100644 --- a/src/views/TimezoneModal.vue +++ b/src/views/TimezoneModal.vue @@ -15,8 +15,14 @@ -
-

{{ $t("No time zone found")}}

+
+ + + {{ $t("Fetching time zones") }} + +
+
+

{{ $t("No time zone found") }}

@@ -54,6 +60,7 @@ import { IonRadioGroup, IonRadio, IonSearchbar, + IonSpinner, IonTitle, IonToolbar, modalController, @@ -81,6 +88,7 @@ export default defineComponent({ IonRadioGroup, IonRadio, IonSearchbar, + IonSpinner, IonTitle, IonToolbar }, @@ -89,7 +97,8 @@ export default defineComponent({ queryString: '', filteredTimeZones: [], timeZones: [], - timeZoneId: '' + timeZoneId: '', + isLoading: false } }, methods: { @@ -126,6 +135,7 @@ export default defineComponent({ }); }, async getAvailableTimeZones() { + this.isLoading = true; const resp = await UserService.getAvailableTimeZones() if(resp.status === 200 && !hasError(resp)) { // We are filtering valid the timeZones coming with response here @@ -134,6 +144,7 @@ export default defineComponent({ }); this.findTimeZone(); } + this.isLoading = false; }, async selectSearchBarText(event: any) { const element = await event.target.getInputElement()