generated from hotwax/dxp-components
-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implemented: spinner in timezone modal for timezone configuration(#233) #254
Closed
Closed
Changes from 8 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
7e93992
Implemented: Spinner in Timezone Modal for Timezone Configuration(#233)
shanmukhdutt 4bbf152
Implemented the suggested changes
shanmukhdutt 30c1e71
Improved the display of spinner
shanmukhdutt 5a4161a
Updated spinner without using empty-state class
shanmukhdutt d002023
Improved empty-state
shanmukhdutt 6724dc1
Improved spinner in time modal
shanmukhdutt b97747f
Improved timezone
shanmukhdutt 0ebfc1b
Implemented suggested changes
shanmukhdutt 4d3b96a
Implemented suggested changes in css
shanmukhdutt File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,12 +12,18 @@ | |
<ion-searchbar @ionFocus="selectSearchBarText($event)" :placeholder="$t('Search time zones')" v-model="queryString" @keyup.enter="queryString = $event.target.value; findTimeZone()" @keydown="preventSpecialCharacters($event)" /> | ||
</ion-toolbar> | ||
</ion-header> | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unwanted change |
||
<ion-content class="ion-padding"> | ||
<!-- Empty state --> | ||
<div class="empty-state" v-if="filteredTimeZones.length === 0"> | ||
<p>{{ $t("No time zone found")}}</p> | ||
<div class="empty-state" v-if="isLoading"> | ||
<ion-item lines="none"> | ||
<ion-spinner name="crescent" class="ion-margin-end"></ion-spinner> | ||
<p>{{ $t("Fetching time zones")}}</p> | ||
</ion-item> | ||
</div> | ||
<div class="empty-state" v-else-if="filteredTimeZones.length === 0"> | ||
<p>{{ $t("No time zone found") }}</p> | ||
</div> | ||
|
||
<!-- Timezones --> | ||
<div v-else> | ||
|
@@ -48,6 +54,7 @@ import { | |
IonFabButton, | ||
IonHeader, | ||
IonItem, | ||
IonSpinner, | ||
IonIcon, | ||
IonLabel, | ||
IonList, | ||
|
@@ -76,6 +83,7 @@ export default defineComponent({ | |
IonHeader, | ||
IonIcon, | ||
IonItem, | ||
IonSpinner, | ||
IonLabel, | ||
IonList, | ||
IonRadioGroup, | ||
|
@@ -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() | ||
|
@@ -158,4 +169,4 @@ export default defineComponent({ | |
}; | ||
} | ||
}); | ||
</script> | ||
</script> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The styling needs to be added above the media-query styles