updates
This commit is contained in:
@@ -160,14 +160,36 @@ const generateEOI = async () => {
|
||||
}
|
||||
};
|
||||
|
||||
const copyLink = (link: string | undefined) => {
|
||||
const copyLink = async (link: string | undefined) => {
|
||||
if (!link) return;
|
||||
|
||||
navigator.clipboard.writeText(link).then(() => {
|
||||
try {
|
||||
await navigator.clipboard.writeText(link);
|
||||
showToast('Signature link copied to clipboard');
|
||||
}).catch(() => {
|
||||
|
||||
// Update EOI Time Sent if not already set
|
||||
if (!props.interest['EOI Time Sent']) {
|
||||
try {
|
||||
await $fetch('/api/update-interest', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'x-tag': '094ut234'
|
||||
},
|
||||
body: {
|
||||
id: props.interest.Id.toString(),
|
||||
data: {
|
||||
'EOI Time Sent': new Date().toISOString()
|
||||
}
|
||||
}
|
||||
});
|
||||
emit('update'); // Refresh parent data
|
||||
} catch (error) {
|
||||
console.error('Failed to update EOI Time Sent:', error);
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
showToast('Failed to copy link');
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
const formatDate = (dateString: string) => {
|
||||
|
||||
Reference in New Issue
Block a user