From a78f2ac362c40c958fff0e575e6942323c65e69d Mon Sep 17 00:00:00 2001 From: Matt Date: Tue, 10 Jun 2025 17:37:53 +0200 Subject: [PATCH] Fix UI/UX issues across email and interest components - Added email attachment viewing and downloading functionality - Removed 'Insert EOI link' button when EOI is already signed - Changed refresh button color to black for better visibility - Fixed Generate EOI button spacing with consistent margins - Changed 'Interest Details' title to display client's full name - Fixed mobile table scrolling cutoff in interest list by removing negative margins - Improved email section mobile layout: - Fixed button sizes and display for mobile screens - Fixed thread section width to prevent horizontal scrolling - Added proper padding and overflow handling for expansion panels - Improved timeline and card responsiveness --- components/ClientEmailSection.vue | 136 ++++++++++++++++++---------- components/EOISection.vue | 4 +- components/EmailDetailsDialog.vue | 22 ++++- components/InterestDetailsModal.vue | 2 +- pages/dashboard/interest-list.vue | 3 +- 5 files changed, 114 insertions(+), 53 deletions(-) diff --git a/components/ClientEmailSection.vue b/components/ClientEmailSection.vue index bd0975a..4c43155 100644 --- a/components/ClientEmailSection.vue +++ b/components/ClientEmailSection.vue @@ -15,62 +15,64 @@
-
- - Compose Email - - - Refresh Emails - - - +
+
- Reconnect + {{ mobile ? 'Compose' : 'Compose Email' }} - Disconnect + Refresh Emails - - - - - - Reconnect - - - Disconnect - - - + prepend-icon="mdi-connection" + > + Reconnect + + + Disconnect + + + + + + + Reconnect + + + Disconnect + + + +
@@ -636,6 +638,9 @@ onMounted(() => { // Check if interest has EOI or berth const hasEOI = computed(() => { + // Don't show EOI link if EOI is already signed + if (props.interest['EOI Status'] === 'Signed') return false; + const eoiDocs = props.interest['EOI Document']; const hasEOIDocs = Array.isArray(eoiDocs) && eoiDocs.length > 0; return !!(props.interest['Signature Link Client'] || hasEOIDocs); @@ -1100,9 +1105,46 @@ const saveSignature = () => { overflow-y: auto; } +/* Fix expansion panel width on mobile */ +:deep(.v-expansion-panel-text__wrapper) { + padding: 0 !important; +} + @media (max-width: 768px) { .email-threads { max-height: 400px; + /* Prevent horizontal scrolling */ + overflow-x: hidden; + } + + /* Adjust timeline and cards for mobile */ + :deep(.v-timeline) { + padding: 0; + } + + :deep(.v-timeline-item__body) { + max-width: 100%; + } + + /* Ensure email cards don't overflow */ + .email-card { + max-width: 100%; + word-break: break-word; + } + + /* Adjust expansion panel padding on mobile */ + :deep(.v-expansion-panel-text) { + padding: 8px !important; + } + + /* Ensure thread titles wrap properly */ + :deep(.v-expansion-panel-title) { + padding: 12px 16px !important; + min-height: auto !important; + } + + :deep(.v-expansion-panel-title__content) { + flex-wrap: wrap; } } diff --git a/components/EOISection.vue b/components/EOISection.vue index 83eca3e..dd21a4c 100644 --- a/components/EOISection.vue +++ b/components/EOISection.vue @@ -29,14 +29,14 @@
-
+
Generate EOI diff --git a/components/EmailDetailsDialog.vue b/components/EmailDetailsDialog.vue index deef7cc..e8d433d 100644 --- a/components/EmailDetailsDialog.vue +++ b/components/EmailDetailsDialog.vue @@ -62,8 +62,12 @@ variant="tonal" prepend-icon="mdi-paperclip" class="mr-2 mb-2" + :href="getAttachmentUrl(attachment)" + :download="getAttachmentName(attachment)" + component="a" + target="_blank" > - {{ attachment.name || attachment }} + {{ getAttachmentName(attachment) }}
@@ -128,6 +132,22 @@ const formatEmailContent = (content: string) => { .map(line => line.trim() ? `

${line}

` : '
') .join(''); }; + +const getAttachmentName = (attachment: any) => { + if (typeof attachment === 'string') return attachment; + return attachment.name || attachment.filename || 'attachment'; +}; + +const getAttachmentUrl = (attachment: any) => { + // If attachment has a path and bucket, construct the download URL + if (attachment.path && attachment.bucket) { + return `/api/files/proxy-download?path=${encodeURIComponent(attachment.path)}&bucket=${attachment.bucket}`; + } + // If it's just a URL, return it + if (attachment.url) return attachment.url; + // Otherwise return a placeholder + return '#'; +};