fix formatting.

This commit is contained in:
DarShan Pandya committed 2024-03-10 20:22:08 +05:30
1 parent 9ee4d0db0f
commit 2e4cc2229b
2 files changed
+20 -3

No files matched your search

+8 -1
View File
@@ -2,7 +2,14 @@ import { browser } from '$app/environment';
import dayjs from 'dayjs';
import relativeTime from 'dayjs/plugin/relativeTime';
export type WeekDay = 'Sunday' | 'Monday' | 'Tuesday' | 'Wednesday' | 'Thursday' | 'Friday' | 'Saturday';
export type WeekDay =
| 'Sunday'
| 'Monday'
| 'Tuesday'
| 'Wednesday'
| 'Thursday'
| 'Friday'
| 'Saturday';
if (browser) {
dayjs.extend(relativeTime);
+12 -2
View File
@@ -11,7 +11,11 @@
import { VARS } from '$lib/system';
import { organization } from '$lib/stores/organization';
import type { WeekDay } from '$lib/helpers/date';
import { localeTimezoneShortHand, utcHourToLocaleHour, utcWeekDayToLocaleWeekDay } from '$lib/helpers/date';
import {
localeTimezoneShortHand,
utcHourToLocaleHour,
utcWeekDayToLocaleWeekDay
} from '$lib/helpers/date';
onDestroy(() => {
$supportData = {
@@ -79,7 +83,13 @@
$wizard.finalAction = handleSubmit;
const workTimings = { start: '09:00', end: '17:00', startDay: 'Monday' as WeekDay, endDay: 'Friday' as WeekDay };
const workTimings = {
start: '09:00',
end: '17:00',
startDay: 'Monday' as WeekDay,
endDay: 'Friday' as WeekDay
};
$: supportTimings = `${utcHourToLocaleHour(workTimings.start)} - ${utcHourToLocaleHour(workTimings.end)} ${localeTimezoneShortHand()}`;
$: supportWeekDays = `${utcWeekDayToLocaleWeekDay(workTimings.startDay, workTimings.start)} - ${utcWeekDayToLocaleWeekDay(workTimings.endDay, workTimings.end)}`;
</script>