Update the support wizard to display local weekday.

This commit is contained in:
Darshan
2024-03-08 15:03:14 +05:30
parent d6ae9671b6
commit 119d382b79
+5 -3
View File
@@ -10,7 +10,7 @@
import { wizard } from '$lib/stores/wizard';
import { VARS } from '$lib/system';
import { organization } from '$lib/stores/organization';
import { localeTimezoneShortHand, utcHourToLocaleHour } from '$lib/helpers/date';
import { localeTimezoneShortHand, utcHourToLocaleHour, utcWeekDayToLocaleWeekDay } from '$lib/helpers/date';
onDestroy(() => {
$supportData = {
@@ -78,7 +78,9 @@
$wizard.finalAction = handleSubmit;
$: supportTimings = `${utcHourToLocaleHour('09:00')} - ${utcHourToLocaleHour('17:00')} ${localeTimezoneShortHand()}`;
const workTimings = { start: '09:00', end: '17:00', startDay: 'Monday', endDay: 'Friday' };
$: supportTimings = `${utcHourToLocaleHour(workTimings.start)} - ${utcHourToLocaleHour(workTimings.end)} ${localeTimezoneShortHand()}`;
$: supportWeekDays = `${utcWeekDayToLocaleWeekDay(workTimings.startDay, workTimings.start)} - ${utcWeekDayToLocaleWeekDay(workTimings.endDay, workTimings.end)}`;
</script>
<Wizard title="Contact us" steps={stepsComponents} finalAction="Submit" on:exit={resetData}>
@@ -88,7 +90,7 @@
If you found a bug or have questions, please reach out to the Appwrite team. We try to
respond to all messages within our office hours.
</p>
<p class="text u-margin-block-start-32">Available: <b>Mon-Fri, {supportTimings}</b></p>
<p class="text u-margin-block-start-32">Available: <b>{supportWeekDays}, {supportTimings}</b></p>
<div class="u-flex u-gap-4 u-cross-center">
<span>Currently:</span>
{#if isSupportOnline()}