Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions frontend/src/pages/Reports/components/AiAnalysisTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import EmergencyAlert from './EmergencyAlert';
import FlaggedValuesSection from './FlaggedValuesSection';
import NormalValuesSection from './NormalValuesSection';
import LowConfidenceNotice from './LowConfidenceNotice';
import AiAssistantNotice from './AiAssistantNotice';

interface AiAnalysisTabProps {
reportData: MedicalReport;
Expand Down Expand Up @@ -59,6 +60,9 @@ const AiAnalysisTab: React.FC<AiAnalysisTabProps> = ({
isExpanded={normalValuesExpanded}
onToggle={toggleNormalValues}
/>

{/* AI Assistant Notice */}
<AiAssistantNotice />
</div>
);
};
Expand Down
28 changes: 28 additions & 0 deletions frontend/src/pages/Reports/components/AiAssistantNotice.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
.ai-assistant-notice {
padding: 20px 0;
display: flex;
justify-content: center;

&__content {
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
}

.clarification-text {
font-size: 15px;
margin-bottom: 8px;
}

.assistant-link {
color: #6177FF;
font-size: 15px;
cursor: pointer;
font-weight: 500;

&:hover {
text-decoration: underline;
}
}
}
40 changes: 40 additions & 0 deletions frontend/src/pages/Reports/components/AiAssistantNotice.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import React, { useState } from 'react';
import { IonText } from '@ionic/react';
import AIAssistantModal from '../../../common/components/AIAssistant/AIAssistantModal';
import './AiAssistantNotice.scss';

/**
* Component to display an AI Assistant notice with a link to open the AI Chat modal.
*/
const AiAssistantNotice: React.FC = () => {
const [isAIAssistantOpen, setIsAIAssistantOpen] = useState(false);

const handleOpenAIAssistant = () => {
setIsAIAssistantOpen(true);
};

return (
<div className="ai-assistant-notice">
<div className="ai-assistant-notice__content">
<IonText color="dark" className="clarification-text">
Still need further clarifications?
</IonText>

<div
className="assistant-link"
onClick={handleOpenAIAssistant}
>
Ask our AI Assistant &gt;
</div>
</div>

<AIAssistantModal
isOpen={isAIAssistantOpen}
setIsOpen={setIsAIAssistantOpen}
testid="report-ai-assistant-modal"
/>
</div>
);
};

export default AiAssistantNotice;
91 changes: 0 additions & 91 deletions frontend/src/pages/Reports/components/OriginalReport.tsx

This file was deleted.