Skip to content
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: time zone selector displays user's current time (dxp-221) #671

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

shanmukhdutt
Copy link
Contributor

@shanmukhdutt shanmukhdutt commented Feb 2, 2024

Related Issues

Closes #

Short Description and Why It's Useful

Screenshots of Visual Changes

Screenshot from 2024-02-06 11-14-25

Screenshot from 2024-02-06 10-58-18

IMPORTANT NOTICE - Remember to add changelog entry

Contribution and Currently Important Rules Acceptance

@@ -111,6 +111,7 @@
"In 15 minutes": "In 15 minutes",
"In 5 minutes": "In 5 minutes",
"In an hour": "In an hour",
"India Standard Time(Asia/Culcutta)": "India Standard Time(Asia/Culcutta)",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to add this in locale

<ion-label> {{ userProfile && userProfile.userTimeZone ? userProfile.userTimeZone : '-' }} </ion-label>
<ion-button @click="changeTimeZone()" slot="end" fill="outline" color="dark">{{ $t("Change") }}</ion-button>
</ion-item>
<ion-item lines="none">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Improve indentation

<ion-button @click="changeTimeZone()" slot="end" fill="outline" color="dark">{{ $t("Change") }}</ion-button>
</ion-item>
<ion-item lines="none">
<ion-label>Browse time zone</ion-label>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add translation for static text

Suggested change
<ion-label>Browse time zone</ion-label>
<ion-label>Browser time zone</ion-label>

return this.userProfile?.userTimeZone || this.defaultTimeZone
},
defaultTimeZone(){
return DateTime.local().setZone('Asia/Kolkata').toFormat('hh:mm a ZZZZ');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need to hardcode the zone, the zone should be identified from the browser's timeZone.

</ion-item>
</ion-radio-group>
</ion-list>
<div>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there is no need for an extra div.

@shanmukhdutt shanmukhdutt changed the title Implemented: Time Zone Selector Should Display User's Current Time for Clarity(dxp-221) Implemented: time zone selector displays user's current time (dxp-221) Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants