Fix email system issues and remove unsupported reminder feature
- Removed EOI reminder settings as the field is not supported in database schema - Fixed reply to thread button visibility with better styling (flat variant, larger size) - Optimized email loading by reducing fetch limit from 200 to 50 - Fixed thread view visual issues with accordion variant and zero elevation - Added explicit save button for email signatures - Fixed reminder-related TypeScript errors by removing unused code - Improved thread reply button positioning with proper margins
This commit is contained in:
parent
f0e03c278a
commit
5f299f389a
|
|
@ -174,12 +174,13 @@
|
||||||
</v-timeline>
|
</v-timeline>
|
||||||
|
|
||||||
<!-- Reply to thread button -->
|
<!-- Reply to thread button -->
|
||||||
<div class="text-center mt-3">
|
<div class="text-center mt-4 mb-2">
|
||||||
<v-btn
|
<v-btn
|
||||||
@click="replyToThread(thread)"
|
@click="replyToThread(thread)"
|
||||||
color="primary"
|
color="primary"
|
||||||
variant="tonal"
|
variant="flat"
|
||||||
prepend-icon="mdi-reply"
|
prepend-icon="mdi-reply"
|
||||||
|
size="default"
|
||||||
>
|
>
|
||||||
Reply to Thread
|
Reply to Thread
|
||||||
</v-btn>
|
</v-btn>
|
||||||
|
|
|
||||||
|
|
@ -156,38 +156,6 @@
|
||||||
</v-btn>
|
</v-btn>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Reminder Settings - Only show if EOI is generated but not uploaded/signed -->
|
|
||||||
<v-divider v-if="hasEOI && !isEOISigned" class="mt-4 mb-4" />
|
|
||||||
<v-row v-if="hasEOI && !isEOISigned" dense align="center">
|
|
||||||
<v-col :cols="mobile ? 12 : 'auto'">
|
|
||||||
<v-switch
|
|
||||||
v-model="remindersEnabled"
|
|
||||||
@update:model-value="updateReminderSettings"
|
|
||||||
color="primary"
|
|
||||||
hide-details
|
|
||||||
density="compact"
|
|
||||||
>
|
|
||||||
<template v-slot:label>
|
|
||||||
<span :class="mobile ? 'text-caption' : 'text-body-2'">
|
|
||||||
Automatic Reminders
|
|
||||||
<v-icon
|
|
||||||
v-if="mobile"
|
|
||||||
size="x-small"
|
|
||||||
class="ml-1"
|
|
||||||
@click.stop="showReminderInfo = true"
|
|
||||||
>
|
|
||||||
mdi-information-outline
|
|
||||||
</v-icon>
|
|
||||||
<v-tooltip v-else activator="parent" location="top">
|
|
||||||
<div style="max-width: 300px">
|
|
||||||
When enabled, automatic reminders will be sent at 9am and 4pm daily to unsigned recipients
|
|
||||||
</div>
|
|
||||||
</v-tooltip>
|
|
||||||
</span>
|
|
||||||
</template>
|
|
||||||
</v-switch>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
</v-card-text>
|
</v-card-text>
|
||||||
|
|
||||||
<!-- Upload Dialog -->
|
<!-- Upload Dialog -->
|
||||||
|
|
@ -296,23 +264,6 @@
|
||||||
</v-card>
|
</v-card>
|
||||||
</v-dialog>
|
</v-dialog>
|
||||||
|
|
||||||
<!-- Mobile Reminder Info Dialog -->
|
|
||||||
<v-dialog v-if="mobile" v-model="showReminderInfo" max-width="300">
|
|
||||||
<v-card>
|
|
||||||
<v-card-title class="text-h6">
|
|
||||||
Automatic Reminders
|
|
||||||
</v-card-title>
|
|
||||||
<v-card-text>
|
|
||||||
When enabled, automatic reminders will be sent at 9am and 4pm daily to unsigned recipients.
|
|
||||||
</v-card-text>
|
|
||||||
<v-card-actions>
|
|
||||||
<v-spacer />
|
|
||||||
<v-btn color="primary" variant="text" @click="showReminderInfo = false">
|
|
||||||
Got it
|
|
||||||
</v-btn>
|
|
||||||
</v-card-actions>
|
|
||||||
</v-card>
|
|
||||||
</v-dialog>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -336,17 +287,6 @@ const isUploading = ref(false);
|
||||||
const selectedFile = ref<File | null>(null);
|
const selectedFile = ref<File | null>(null);
|
||||||
const showDeleteConfirmDialog = ref(false);
|
const showDeleteConfirmDialog = ref(false);
|
||||||
const isDeleting = ref(false);
|
const isDeleting = ref(false);
|
||||||
const showReminderInfo = ref(false);
|
|
||||||
|
|
||||||
// Reminder settings
|
|
||||||
const remindersEnabled = ref(true);
|
|
||||||
|
|
||||||
// Initialize reminder state from interest data
|
|
||||||
watch(() => props.interest, (newInterest) => {
|
|
||||||
if (newInterest) {
|
|
||||||
remindersEnabled.value = (newInterest as any)['reminder_enabled'] !== false;
|
|
||||||
}
|
|
||||||
}, { immediate: true });
|
|
||||||
|
|
||||||
const hasEOI = computed(() => {
|
const hasEOI = computed(() => {
|
||||||
return !!(props.interest['Signature Link Client'] ||
|
return !!(props.interest['Signature Link Client'] ||
|
||||||
|
|
@ -523,32 +463,6 @@ const handleUpload = () => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const updateReminderSettings = async (value: boolean | null) => {
|
|
||||||
if (value === null) return;
|
|
||||||
|
|
||||||
try {
|
|
||||||
await $fetch('/api/update-interest', {
|
|
||||||
method: 'POST',
|
|
||||||
headers: {
|
|
||||||
'x-tag': '094ut234'
|
|
||||||
},
|
|
||||||
body: {
|
|
||||||
id: props.interest.Id.toString(),
|
|
||||||
data: {
|
|
||||||
'reminder_enabled': value
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
toast.success(`Automatic reminders ${value ? 'enabled' : 'disabled'}`);
|
|
||||||
emit('update'); // Refresh parent data
|
|
||||||
} catch (error) {
|
|
||||||
console.error('Failed to update reminder settings:', error);
|
|
||||||
toast.error('Failed to update reminder settings');
|
|
||||||
// Revert the switch on error
|
|
||||||
remindersEnabled.value = !value;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const closeUploadDialog = () => {
|
const closeUploadDialog = () => {
|
||||||
showUploadDialog.value = false;
|
showUploadDialog.value = false;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue