-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implemented: support to define the timezone selector in dxp(#139)
- Loading branch information
1 parent
9b5f091
commit 48a090f
Showing
4 changed files
with
62 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<template> | ||
<ion-card> | ||
<ion-card-header> | ||
<ion-card-title> | ||
{{ $t('Timezone') }} | ||
</ion-card-title> | ||
</ion-card-header> | ||
<ion-card-content> | ||
{{ $t('The timezone you select is used to ensure automations you schedule are always accurate to the time you select.') }} | ||
</ion-card-content> | ||
<ion-item lines="none"> | ||
<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-card> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { | ||
IonCard, | ||
IonCardHeader, | ||
IonCardTitle, | ||
IonCardContent, | ||
IonItem, | ||
IonLabel, | ||
IonButton, | ||
modalController | ||
} from '@ionic/vue'; | ||
import { appContext } from '../index'; | ||
import { computed } from 'vue'; | ||
import { defineAsyncComponent } from 'vue'; | ||
import TimeZoneModal from './TimeZoneModal.vue'; | ||
const appState = appContext.config.globalProperties.$store; | ||
const userProfile = computed(() => appState.getters['user/getUserProfile']) | ||
const changeTimeZone = async () => { | ||
const timeZoneModal = await modalController.create({ | ||
component: defineAsyncComponent(() => import('./TimeZoneModal.vue')), | ||
}); | ||
return timeZoneModal.present(); | ||
} | ||
</script> |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<template> | ||
<!-- <ion-page> --> | ||
<ion-label>{{"Hello"}}</ion-label> | ||
<!-- </ion-page> --> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { | ||
IonLabel | ||
} from '@ionic/vue'; | ||
</script> |
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