File tree Expand file tree Collapse file tree 3 files changed +72
-0
lines changed
frontend/src/pages/Reports/components Expand file tree Collapse file tree 3 files changed +72
-0
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import EmergencyAlert from './EmergencyAlert';
44import FlaggedValuesSection from './FlaggedValuesSection' ;
55import NormalValuesSection from './NormalValuesSection' ;
66import LowConfidenceNotice from './LowConfidenceNotice' ;
7+ import AiAssistantNotice from './AiAssistantNotice' ;
78
89interface AiAnalysisTabProps {
910 reportData : MedicalReport ;
@@ -59,6 +60,9 @@ const AiAnalysisTab: React.FC<AiAnalysisTabProps> = ({
5960 isExpanded = { normalValuesExpanded }
6061 onToggle = { toggleNormalValues }
6162 />
63+
64+ { /* AI Assistant Notice */ }
65+ < AiAssistantNotice />
6266 </ div >
6367 ) ;
6468} ;
Original file line number Diff line number Diff line change 1+ .ai-assistant-notice {
2+ padding : 20px 0 ;
3+ display : flex ;
4+ justify-content : center ;
5+
6+ & __content {
7+ display : flex ;
8+ flex-direction : column ;
9+ align-items : center ;
10+ text-align : center ;
11+ }
12+
13+ .clarification-text {
14+ font-size : 15px ;
15+ margin-bottom : 8px ;
16+ }
17+
18+ .assistant-link {
19+ color : #6177FF ;
20+ font-size : 15px ;
21+ cursor : pointer ;
22+ font-weight : 500 ;
23+
24+ & :hover {
25+ text-decoration : underline ;
26+ }
27+ }
28+ }
Original file line number Diff line number Diff line change 1+ import React , { useState } from 'react' ;
2+ import { IonText } from '@ionic/react' ;
3+ import AIAssistantModal from '../../../common/components/AIAssistant/AIAssistantModal' ;
4+ import './AiAssistantNotice.scss' ;
5+
6+ /**
7+ * Component to display an AI Assistant notice with a link to open the AI Chat modal.
8+ */
9+ const AiAssistantNotice : React . FC = ( ) => {
10+ const [ isAIAssistantOpen , setIsAIAssistantOpen ] = useState ( false ) ;
11+
12+ const handleOpenAIAssistant = ( ) => {
13+ setIsAIAssistantOpen ( true ) ;
14+ } ;
15+
16+ return (
17+ < div className = "ai-assistant-notice" >
18+ < div className = "ai-assistant-notice__content" >
19+ < IonText color = "dark" className = "clarification-text" >
20+ Still need further clarifications?
21+ </ IonText >
22+
23+ < div
24+ className = "assistant-link"
25+ onClick = { handleOpenAIAssistant }
26+ >
27+ Ask our AI Assistant >
28+ </ div >
29+ </ div >
30+
31+ < AIAssistantModal
32+ isOpen = { isAIAssistantOpen }
33+ setIsOpen = { setIsAIAssistantOpen }
34+ testid = "report-ai-assistant-modal"
35+ />
36+ </ div >
37+ ) ;
38+ } ;
39+
40+ export default AiAssistantNotice ;
You can’t perform that action at this time.
0 commit comments