Move email preference to notifications section

This commit is contained in:
Constantin Graf
2026-08-31 11:43:32 +02:00
committed by Gregor Vostrak
parent 593372bae5
commit 77f14b696e
3 changed files with 113 additions and 22 deletions

View File

@@ -8,7 +8,6 @@ import { Button } from '@/packages/ui/src/Buttons';
import PrimaryButton from '@/packages/ui/src/Buttons/PrimaryButton.vue';
import SecondaryButton from '@/packages/ui/src/Buttons/SecondaryButton.vue';
import TextInput from '@/packages/ui/src/Input/TextInput.vue';
import { Checkbox } from '@/packages/ui/src';
import {
useResendUserEmailVerificationMutation,
useResetUserPendingEmailMutation,
@@ -27,7 +26,6 @@ const name = ref('');
const email = ref('');
const timezone = ref('');
const weekStart = ref('');
const sendTimeEntryStillRunningEmail = ref(true);
const photoBase64 = ref<string | null>(null);
const photoPreview = ref<string | null>(null);
@@ -42,7 +40,6 @@ function seedForm(u: User) {
email.value = u.email;
timezone.value = u.timezone;
weekStart.value = u.week_start;
sendTimeEntryStillRunningEmail.value = u.send_time_entry_still_running_email;
}
watch(
@@ -81,11 +78,6 @@ function buildPayload(): UpdateUserBody {
if (weekStart.value !== user.value.week_start) {
body.week_start = weekStart.value as UpdateUserBody['week_start'];
}
if (
sendTimeEntryStillRunningEmail.value !== user.value.send_time_entry_still_running_email
) {
body.send_time_entry_still_running_email = sendTimeEntryStillRunningEmail.value;
}
if (photoBase64.value !== null) body.photo = photoBase64.value;
return body;
}
@@ -339,20 +331,6 @@ const page = usePage<{
<FieldError v-if="fieldErrors.week_start">{{ fieldErrors.week_start }}</FieldError>
</Field>
<div class="col-span-6 sm:col-span-4">
<Field orientation="horizontal">
<Checkbox
id="send_time_entry_still_running_email"
v-model:checked="sendTimeEntryStillRunningEmail"
:disabled="!isUserLoaded" />
<FieldLabel for="send_time_entry_still_running_email">
Email me when a time entry has been running for more than 8 hours
</FieldLabel>
</Field>
<FieldError v-if="fieldErrors.send_time_entry_still_running_email">
{{ fieldErrors.send_time_entry_still_running_email }}
</FieldError>
</div>
</template>
<template #actions>