File tree Expand file tree Collapse file tree 4 files changed +80
-3
lines changed
common/utils/i18n/resources/en Expand file tree Collapse file tree 4 files changed +80
-3
lines changed Original file line number Diff line number Diff line change 6666 "title" : " Flagged values"
6767 },
6868 "normal-values" : {
69- "title" : " Normal values"
69+ "title" : " Normal values" ,
70+ "empty" : " No values available." ,
71+ "empty-description" : " No normal values within the normal range were detected."
7072 },
7173 "conclusion" : {
7274 "title" : " Conclusion"
8890 "original-report" : " Original Report"
8991 }
9092 }
91- }
93+ }
Original file line number Diff line number Diff line change 191191 align-items : center ;
192192 }
193193
194+ & __section-empty {
195+ padding : 24px 16px 32px ;
196+ background-color : #fff ;
197+ }
198+
199+ & __section-empty-content {
200+ display : flex ;
201+ flex-direction : column ;
202+ align-items : center ;
203+ text-align : center ;
204+ }
205+
206+ & __section-empty-icon {
207+ background-color : #EEF1FF ;
208+ border-radius : 50% ;
209+ width : 90px ;
210+ height : 90px ;
211+ display : flex ;
212+ align-items : center ;
213+ justify-content : center ;
214+ margin-bottom : 32px ;
215+
216+ img {
217+ width : 48px ;
218+ height : 48px ;
219+ }
220+ }
221+
222+ & __section-empty-title {
223+ font-family : ' Inter' , sans-serif ;
224+ font-size : 18px ;
225+ font-weight : 600 ;
226+ color : #313e4c ;
227+ margin : 0 0 16px ;
228+ }
229+
230+ & __section-empty-description {
231+ font-family : ' Inter' , sans-serif ;
232+ font-size : 14px ;
233+ font-weight : 400 ;
234+ color : #313e4c ;
235+ margin : 0 ;
236+ max-width : 286px ;
237+ line-height : 22px ;
238+ }
239+
194240 & __item {
195241 background-color : #ffffff ;
196242 border-radius : 8px ;
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import Icon from '../../../common/components/Icon/Icon';
44import { LabValue } from '../../../common/models/medicalReport' ;
55import LabValueItem from './LabValueItem' ;
66import normalValuesIcon from '../../../assets/icons/normal-values.svg' ;
7+ import noValuesIcon from '../../../assets/icons/no-values.svg' ;
78
89interface NormalValuesSectionProps {
910 normalValues : LabValue [ ] ;
@@ -35,7 +36,23 @@ const NormalValuesSection: React.FC<NormalValuesSectionProps> = ({
3536 </ div >
3637 </ div >
3738
38- { isExpanded && normalValues . map ( ( item , index ) => < LabValueItem key = { index } item = { item } /> ) }
39+ { isExpanded && normalValues . length === 0 && (
40+ < div className = "report-detail-page__section-empty" >
41+ < div className = "report-detail-page__section-empty-content" >
42+ < img src = { noValuesIcon } alt = "No Values Icon" style = { { marginBottom : '2rem' } } />
43+ < h3 className = "report-detail-page__section-empty-title" >
44+ { t ( 'report.normal-values.empty' , { ns : 'reportDetail' } ) }
45+ </ h3 >
46+ < p className = "report-detail-page__section-empty-description" >
47+ { t ( 'report.normal-values.empty-description' , { ns : 'reportDetail' } ) }
48+ </ p >
49+ </ div >
50+ </ div >
51+ ) }
52+
53+ { isExpanded &&
54+ normalValues . length > 0 &&
55+ normalValues . map ( ( item , index ) => < LabValueItem key = { index } item = { item } /> ) }
3956 </ div >
4057 ) ;
4158} ;
You can’t perform that action at this time.
0 commit comments