feat(#36): Notification rework with single and all comments mark as read
This commit is contained in:
@@ -94,6 +94,8 @@
|
||||
<div class="space-y-3">
|
||||
<UCheckbox v-model="emailOnFormCreated" :label="$t('settings.email.onFormCreated')" />
|
||||
<UCheckbox v-model="emailOnFormSubmitted" :label="$t('settings.email.onFormSubmitted')" />
|
||||
<UCheckbox v-model="emailOnFormUpdated" :label="$t('settings.email.onFormUpdated')" />
|
||||
<UCheckbox v-model="emailOnCommentAdded" :label="$t('settings.email.onCommentAdded')" />
|
||||
</div>
|
||||
|
||||
<UButton :label="$t('common.save')" color="primary" :loading="isSaving" @click="saveEmailPreferences" />
|
||||
@@ -143,6 +145,8 @@ const colors = [
|
||||
const emailAddress = ref('')
|
||||
const emailOnFormCreated = ref(true)
|
||||
const emailOnFormSubmitted = ref(true)
|
||||
const emailOnFormUpdated = ref(true)
|
||||
const emailOnCommentAdded = ref(true)
|
||||
const isSaving = ref(false)
|
||||
|
||||
onMounted(async () => {
|
||||
@@ -152,6 +156,8 @@ onMounted(async () => {
|
||||
emailAddress.value = userData.email || ''
|
||||
emailOnFormCreated.value = userData.emailOnFormCreated ?? true
|
||||
emailOnFormSubmitted.value = userData.emailOnFormSubmitted ?? true
|
||||
emailOnFormUpdated.value = userData.emailOnFormUpdated ?? true
|
||||
emailOnCommentAdded.value = userData.emailOnCommentAdded ?? true
|
||||
} catch (error) {
|
||||
logger.error('Failed to load user email preferences:', error)
|
||||
}
|
||||
@@ -167,7 +173,9 @@ async function saveEmailPreferences() {
|
||||
userStore.user.keycloakId,
|
||||
emailAddress.value || null,
|
||||
emailOnFormCreated.value,
|
||||
emailOnFormSubmitted.value
|
||||
emailOnFormSubmitted.value,
|
||||
emailOnFormUpdated.value,
|
||||
emailOnCommentAdded.value
|
||||
)
|
||||
|
||||
toast.add({
|
||||
|
||||
Reference in New Issue
Block a user