From 385c76510b5030db228a4cd974b690b4d5bee17c Mon Sep 17 00:00:00 2001 From: Hermes Agent Date: Sat, 24 Oct 2026 15:23:12 +0200 Subject: [PATCH] Fixed partnerui message viewer --- .../components/dashboard/DashboardPage.tsx | 61 ++++++++++--------- .../notifications/MessageViewer.tsx | 18 +++--- 2 files changed, 43 insertions(+), 36 deletions(-) diff --git a/PostFundManagement.PartnerUI/src/components/dashboard/DashboardPage.tsx b/PostFundManagement.PartnerUI/src/components/dashboard/DashboardPage.tsx index e1a93ce..57163cc 100644 --- a/PostFundManagement.PartnerUI/src/components/dashboard/DashboardPage.tsx +++ b/PostFundManagement.PartnerUI/src/components/dashboard/DashboardPage.tsx @@ -2123,7 +2123,8 @@ export function DashboardPage() { ===================================================================== */} {selectedNotification && (
-
+
+ {/* Modal Header */}

@@ -2141,38 +2142,42 @@ export function DashboardPage() {

-
+ + {/* Scrollable Modal Body containing the Message Reading Pane */} +
-
- - -
+
+ + {/* Sticky Modal Footer */} +
+ +
diff --git a/PostFundManagement.PartnerUI/src/components/notifications/MessageViewer.tsx b/PostFundManagement.PartnerUI/src/components/notifications/MessageViewer.tsx index 9d22279..a001d08 100644 --- a/PostFundManagement.PartnerUI/src/components/notifications/MessageViewer.tsx +++ b/PostFundManagement.PartnerUI/src/components/notifications/MessageViewer.tsx @@ -17,6 +17,7 @@ export interface MessageViewerProps { subject?: string; className?: string; showFormatHeader?: boolean; + maxHeightClass?: string; } export const MessageViewer: React.FC = ({ @@ -25,6 +26,7 @@ export const MessageViewer: React.FC = ({ subject, className = '', showFormatHeader = true, + maxHeightClass = 'max-h-[60vh]', }) => { const [copied, setCopied] = useState(false); const [showRaw, setShowRaw] = useState(false); @@ -90,10 +92,10 @@ export const MessageViewer: React.FC = ({ }; return ( -
+
{/* Format Header & Controls Bar */} {showFormatHeader && ( -
+
{isEmail ? ( @@ -112,7 +114,7 @@ export const MessageViewer: React.FC = ({
-
+
{/* View Mode Toggle: Formatted vs Raw */}
)} - {/* Message Body Content */} -
+ {/* Message Body Content - with explicit max height, max width, word wrapping, and automatic scrollbars */} +
{showRaw ? ( -
+          
             {content}
           
) : (
)}
{/* Footer Info Stamp */} -
+
PFM Communications • {isEmail ? 'Email HTML Format' : 'In-App Markup Format'}