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
This commit is contained in:
parent
5f299f389a
commit
a78f2ac362
|
|
@ -15,23 +15,24 @@
|
||||||
<div v-else>
|
<div v-else>
|
||||||
|
|
||||||
<!-- Email Controls -->
|
<!-- Email Controls -->
|
||||||
<div class="mb-4 d-flex align-center gap-2 flex-wrap">
|
<div class="mb-4">
|
||||||
|
<div class="d-flex align-center gap-2 flex-wrap">
|
||||||
<v-btn
|
<v-btn
|
||||||
@click="showComposer = true"
|
@click="showComposer = true"
|
||||||
color="primary"
|
color="primary"
|
||||||
variant="flat"
|
variant="flat"
|
||||||
:prepend-icon="!mobile ? 'mdi-email-edit' : undefined"
|
prepend-icon="mdi-email-edit"
|
||||||
:icon="mobile ? 'mdi-email-edit' : undefined"
|
:size="mobile ? 'small' : 'default'"
|
||||||
:size="mobile ? 'default' : 'default'"
|
|
||||||
>
|
>
|
||||||
<span v-if="!mobile">Compose Email</span>
|
{{ mobile ? 'Compose' : 'Compose Email' }}
|
||||||
</v-btn>
|
</v-btn>
|
||||||
<v-btn
|
<v-btn
|
||||||
@click="loadEmailThread"
|
@click="loadEmailThread"
|
||||||
variant="text"
|
variant="text"
|
||||||
icon="mdi-refresh"
|
icon="mdi-refresh"
|
||||||
:loading="isRefreshing"
|
:loading="isRefreshing"
|
||||||
:size="mobile ? 'small' : 'small'"
|
size="small"
|
||||||
|
color="black"
|
||||||
>
|
>
|
||||||
<v-tooltip activator="parent">Refresh Emails</v-tooltip>
|
<v-tooltip activator="parent">Refresh Emails</v-tooltip>
|
||||||
</v-btn>
|
</v-btn>
|
||||||
|
|
@ -72,6 +73,7 @@
|
||||||
</v-list>
|
</v-list>
|
||||||
</v-menu>
|
</v-menu>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- Email Thread List -->
|
<!-- Email Thread List -->
|
||||||
<div v-if="emailThreads.length > 0 || threads.length > 0" class="email-threads">
|
<div v-if="emailThreads.length > 0 || threads.length > 0" class="email-threads">
|
||||||
|
|
@ -636,6 +638,9 @@ onMounted(() => {
|
||||||
|
|
||||||
// Check if interest has EOI or berth
|
// Check if interest has EOI or berth
|
||||||
const hasEOI = computed(() => {
|
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 eoiDocs = props.interest['EOI Document'];
|
||||||
const hasEOIDocs = Array.isArray(eoiDocs) && eoiDocs.length > 0;
|
const hasEOIDocs = Array.isArray(eoiDocs) && eoiDocs.length > 0;
|
||||||
return !!(props.interest['Signature Link Client'] || hasEOIDocs);
|
return !!(props.interest['Signature Link Client'] || hasEOIDocs);
|
||||||
|
|
@ -1100,9 +1105,46 @@ const saveSignature = () => {
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Fix expansion panel width on mobile */
|
||||||
|
:deep(.v-expansion-panel-text__wrapper) {
|
||||||
|
padding: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
.email-threads {
|
.email-threads {
|
||||||
max-height: 400px;
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -29,14 +29,14 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Generate EOI Button - Only show if no documents uploaded -->
|
<!-- Generate EOI Button - Only show if no documents uploaded -->
|
||||||
<div v-if="!hasEOI && !hasEOIDocuments" class="mb-4">
|
<div v-if="!hasEOI && !hasEOIDocuments" class="d-flex mb-4">
|
||||||
<v-btn
|
<v-btn
|
||||||
@click="generateEOI"
|
@click="generateEOI"
|
||||||
:loading="isGenerating"
|
:loading="isGenerating"
|
||||||
color="primary"
|
color="primary"
|
||||||
variant="flat"
|
variant="flat"
|
||||||
prepend-icon="mdi-file-document-plus"
|
prepend-icon="mdi-file-document-plus"
|
||||||
:size="mobile ? 'default' : 'default'"
|
size="default"
|
||||||
:block="mobile"
|
:block="mobile"
|
||||||
>
|
>
|
||||||
Generate EOI
|
Generate EOI
|
||||||
|
|
|
||||||
|
|
@ -62,8 +62,12 @@
|
||||||
variant="tonal"
|
variant="tonal"
|
||||||
prepend-icon="mdi-paperclip"
|
prepend-icon="mdi-paperclip"
|
||||||
class="mr-2 mb-2"
|
class="mr-2 mb-2"
|
||||||
|
:href="getAttachmentUrl(attachment)"
|
||||||
|
:download="getAttachmentName(attachment)"
|
||||||
|
component="a"
|
||||||
|
target="_blank"
|
||||||
>
|
>
|
||||||
{{ attachment.name || attachment }}
|
{{ getAttachmentName(attachment) }}
|
||||||
</v-chip>
|
</v-chip>
|
||||||
</div>
|
</div>
|
||||||
</v-card-text>
|
</v-card-text>
|
||||||
|
|
@ -128,6 +132,22 @@ const formatEmailContent = (content: string) => {
|
||||||
.map(line => line.trim() ? `<p>${line}</p>` : '<br>')
|
.map(line => line.trim() ? `<p>${line}</p>` : '<br>')
|
||||||
.join('');
|
.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 '#';
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
</v-btn>
|
</v-btn>
|
||||||
<v-toolbar-title>
|
<v-toolbar-title>
|
||||||
<v-icon class="mr-2">mdi-account-details</v-icon>
|
<v-icon class="mr-2">mdi-account-details</v-icon>
|
||||||
Interest Details
|
{{ interest?.['Full Name'] || 'Interest Details' }}
|
||||||
</v-toolbar-title>
|
</v-toolbar-title>
|
||||||
<v-spacer></v-spacer>
|
<v-spacer></v-spacer>
|
||||||
<v-toolbar-items v-if="!mobile">
|
<v-toolbar-items v-if="!mobile">
|
||||||
|
|
|
||||||
|
|
@ -588,12 +588,11 @@ const getRelativeTime = (dateString: string) => {
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
-webkit-overflow-scrolling: touch;
|
-webkit-overflow-scrolling: touch;
|
||||||
margin: 0 -16px;
|
/* Remove negative margins to prevent cutoff */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Add padding to the wrapper instead */
|
/* Add padding to the wrapper instead */
|
||||||
.modern-table :deep(.v-table__wrapper) {
|
.modern-table :deep(.v-table__wrapper) {
|
||||||
padding: 0 16px;
|
|
||||||
min-width: 600px; /* Minimum width to ensure scrolling */
|
min-width: 600px; /* Minimum width to ensure scrolling */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue