Added timezone for user; Moved dashboard to controller

This commit is contained in:
Constantin Graf
2024-03-19 17:19:54 +01:00
parent 2133eb0c16
commit 6ecfef6bf1
16 changed files with 494 additions and 308 deletions

View File

@@ -20,6 +20,7 @@ const form = useForm({
name: props.user.name,
email: props.user.email,
photo: null as File | null,
timezone: props.user.timezone,
});
const verificationLinkSent = ref<boolean | null>(null);
@@ -198,6 +199,17 @@ const page = usePage<{
</div>
</div>
</div>
<!-- Timezone -->
<div class="col-span-6 sm:col-span-4">
<InputLabel for="timezone" value="Timezone" />
<select name="timezone" id="timezone" v-model="form.timezone" class="mt-1 block w-full border-input-border bg-input-background text-white focus:border-input-border-active rounded-md shadow-sm">
<option v-for="timezone in $page.props.timezones" :value="timezone">
{{ timezone }}
</option>
</select>
<InputError :message="form.errors.timezone" class="mt-2" />
</div>
</template>
<template #actions>

View File

@@ -110,6 +110,7 @@ export interface User {
two_factor_secret?: string | null;
two_factor_recovery_codes?: string | null;
two_factor_confirmed_at: string | null;
timezone: string;
// mutators
profile_photo_url: string;
// relations