From 3e6f5695a4aab3f222209c8c1d7cc6fc1d5ea55f Mon Sep 17 00:00:00 2001 From: Ritika-Patel08 Date: Fri, 5 Jan 2024 19:20:19 +0530 Subject: [PATCH 01/13] Implemented :Spinner in Timezone Model for Timezone Configuration (#210) --- src/locales/en.json | 1 + src/views/TimezoneModal.vue | 83 +++++++++++++++++++++++-------------- 2 files changed, 54 insertions(+), 30 deletions(-) diff --git a/src/locales/en.json b/src/locales/en.json index 07b5d7d1..39392806 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -37,6 +37,7 @@ "Make sure you've reviewed the products and their counts before uploading them for review": "Make sure you've reviewed the products and their counts before uploading them for review", "No results found": "No results found", "No time zone found": "No time zone found", + "Fetching time zones":"Fetching time zones", "Ok": "Ok", "OMS": "OMS", "OMS instance": "OMS instance", diff --git a/src/views/TimezoneModal.vue b/src/views/TimezoneModal.vue index 4db695e8..6f21c36c 100644 --- a/src/views/TimezoneModal.vue +++ b/src/views/TimezoneModal.vue @@ -2,44 +2,60 @@ - + {{ $t("Select time zone") }} - + - + + -
-

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

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

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

+
+
+
- {{ timeZone.label }} ({{ timeZone.id }}) + {{ timeZone.label }} ({{ timeZone.id + }})
- + + - - - \ No newline at end of file + }); + + \ No newline at end of file From aabd644247dc3d298596ff534f251f2f864c0e73 Mon Sep 17 00:00:00 2001 From: Ritika-Patel08 Date: Sat, 6 Jan 2024 12:28:44 +0530 Subject: [PATCH 02/13] Fixed: Reverted unwanted changes --- src/views/TimezoneModal.vue | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/src/views/TimezoneModal.vue b/src/views/TimezoneModal.vue index 6f21c36c..5b9ae04f 100644 --- a/src/views/TimezoneModal.vue +++ b/src/views/TimezoneModal.vue @@ -9,8 +9,8 @@ {{ $t("Select time zone") }} - + @@ -26,10 +26,8 @@
-
-
+

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

-
@@ -37,14 +35,12 @@ - {{ timeZone.label }} ({{ timeZone.id - }}) + {{ timeZone.label }} ({{ timeZone.id}})
- @@ -53,7 +49,6 @@
- - \ No newline at end of file From 7db799e2e95049da680a90d6fae10857156bd294 Mon Sep 17 00:00:00 2001 From: Ritika-Patel08 Date: Mon, 8 Jan 2024 11:19:26 +0530 Subject: [PATCH 05/13] Reverted: Removed unwanted changes such as spacing , indentation ,extra lines (#210) --- src/views/TimezoneModal.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/TimezoneModal.vue b/src/views/TimezoneModal.vue index 9f3cff1a..c3907c66 100644 --- a/src/views/TimezoneModal.vue +++ b/src/views/TimezoneModal.vue @@ -38,7 +38,7 @@ - + From ea00179fae2e8a4841f10cb78bcef50bde3c8a54 Mon Sep 17 00:00:00 2001 From: Ritika-Patel08 Date: Mon, 8 Jan 2024 12:30:08 +0530 Subject: [PATCH 06/13] Improved: refined the if-else logic in spinner --- src/views/TimezoneModal.vue | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/src/views/TimezoneModal.vue b/src/views/TimezoneModal.vue index c3907c66..ee5a89ed 100644 --- a/src/views/TimezoneModal.vue +++ b/src/views/TimezoneModal.vue @@ -12,22 +12,19 @@ - + -
-
- - - - {{ $t("Fetching time zones") }} - -
+
+ + + {{ $t("Fetching time zones") }} +
-
-

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

+
+

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

- +
@@ -38,7 +35,7 @@
- + @@ -46,7 +43,7 @@ - + +}); + From 7d7e3e6b377d17297763b213e34fc5014c67ed4b Mon Sep 17 00:00:00 2001 From: Ritika-Patel08 Date: Mon, 8 Jan 2024 12:31:01 +0530 Subject: [PATCH 07/13] Improved: refined the if-else logic in spinner --- src/views/TimezoneModal.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/TimezoneModal.vue b/src/views/TimezoneModal.vue index ee5a89ed..e1bd9104 100644 --- a/src/views/TimezoneModal.vue +++ b/src/views/TimezoneModal.vue @@ -163,4 +163,4 @@ export default defineComponent({ }; } }); - + \ No newline at end of file From 9dbc25b098344ab7f08f82240a17bdf451a10978 Mon Sep 17 00:00:00 2001 From: Ritika-Patel08 Date: Mon, 8 Jan 2024 12:32:00 +0530 Subject: [PATCH 08/13] Improved: refined the if-else logic in spinner --- src/views/TimezoneModal.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/TimezoneModal.vue b/src/views/TimezoneModal.vue index e1bd9104..a240fff4 100644 --- a/src/views/TimezoneModal.vue +++ b/src/views/TimezoneModal.vue @@ -9,7 +9,7 @@ {{ $t("Select time zone") }} - + From 65a328b3103da32fe73cc02ad9258d65c6c3a8d0 Mon Sep 17 00:00:00 2001 From: Ritika-Patel08 Date: Mon, 8 Jan 2024 12:47:22 +0530 Subject: [PATCH 09/13] Improved: removed spaces and used self closing tag in spinner --- src/views/TimezoneModal.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/TimezoneModal.vue b/src/views/TimezoneModal.vue index a240fff4..d6c2d98d 100644 --- a/src/views/TimezoneModal.vue +++ b/src/views/TimezoneModal.vue @@ -16,8 +16,8 @@
- - + + {{ $t("Fetching time zones") }}
From e0ab27fe94be4bf73eba4223d847c210c0199d68 Mon Sep 17 00:00:00 2001 From: Ritika-Patel08 Date: Mon, 8 Jan 2024 12:49:17 +0530 Subject: [PATCH 10/13] Fixed: added space --- src/locales/en.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/locales/en.json b/src/locales/en.json index 39392806..0854e10c 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -37,7 +37,7 @@ "Make sure you've reviewed the products and their counts before uploading them for review": "Make sure you've reviewed the products and their counts before uploading them for review", "No results found": "No results found", "No time zone found": "No time zone found", - "Fetching time zones":"Fetching time zones", + "Fetching time zones": "Fetching time zones", "Ok": "Ok", "OMS": "OMS", "OMS instance": "OMS instance", From 85cdac85e1a8c453461b8053ac93309af0f788c3 Mon Sep 17 00:00:00 2001 From: Ritika-Patel08 Date: Tue, 9 Jan 2024 10:39:01 +0530 Subject: [PATCH 11/13] Improved: replaced the variable name 'loading' to 'isLoading' --- src/views/TimezoneModal.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/views/TimezoneModal.vue b/src/views/TimezoneModal.vue index d6c2d98d..782f69a3 100644 --- a/src/views/TimezoneModal.vue +++ b/src/views/TimezoneModal.vue @@ -15,7 +15,7 @@ -
+
{{ $t("Fetching time zones") }} @@ -93,7 +93,7 @@ export default defineComponent({ filteredTimeZones: [], timeZones: [], timeZoneId: '', - loading: true + isLoading: true } }, methods: { @@ -138,7 +138,7 @@ export default defineComponent({ }); this.findTimeZone(); } - this.loading = false; + this.isLoading = false; }, async selectSearchBarText(event: any) { const element = await event.target.getInputElement() From 7df6acaddb606470aac280a9deba6481c6ff193f Mon Sep 17 00:00:00 2001 From: Ritika-Patel08 Date: Tue, 9 Jan 2024 17:02:45 +0530 Subject: [PATCH 12/13] Improved: isLoading value to false initially and changing the value according the API call --- src/views/TimezoneModal.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/views/TimezoneModal.vue b/src/views/TimezoneModal.vue index 782f69a3..caf9b0e2 100644 --- a/src/views/TimezoneModal.vue +++ b/src/views/TimezoneModal.vue @@ -93,7 +93,7 @@ export default defineComponent({ filteredTimeZones: [], timeZones: [], timeZoneId: '', - isLoading: true + isLoading: false } }, methods: { @@ -130,6 +130,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 From f93a39a9223f5f35a01bd596d8e837e8222d318d Mon Sep 17 00:00:00 2001 From: Ritika-Patel08 Date: Tue, 9 Jan 2024 17:04:49 +0530 Subject: [PATCH 13/13] Improved: isLoading value to false initially and changing the value according the API call --- src/views/TimezoneModal.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/TimezoneModal.vue b/src/views/TimezoneModal.vue index caf9b0e2..bc5846ea 100644 --- a/src/views/TimezoneModal.vue +++ b/src/views/TimezoneModal.vue @@ -139,7 +139,7 @@ export default defineComponent({ }); this.findTimeZone(); } - this.isLoading = false; + this.isLoading = false; }, async selectSearchBarText(event: any) { const element = await event.target.getInputElement()