File tree Expand file tree Collapse file tree
pages/InspectionReportPage Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ export interface InspectionData {
5454 analysisId : string
5555 visualisedSAS ?: string
5656 fileType : FileType
57- anonymizedSAS : string
57+ anonymizedSAS ? : string
5858 analysisType ?: string
5959 tag : string
6060 createdAt : Date
@@ -88,15 +88,13 @@ export const inspectionRecordToInspectionData = (record: InspectionRecord): Insp
8888 if ( ! analysis ) return null
8989
9090 const sas = analysis . visualizedSAS ?? analysis . anonymizedSAS
91+ const fileType = sas ? sasURLToFileType ( sas ) : FileType . VALUE
9192
92- if ( ! sas ) return null
93-
94- const fileType = sasURLToFileType ( sas )
9593 return {
9694 inspectionId : record . inspectionId ,
9795 analysisId : analysis . id ,
9896 visualisedSAS : analysis . visualizedSAS ,
99- anonymizedSAS : analysis . anonymizedSAS ! ,
97+ anonymizedSAS : analysis . anonymizedSAS ,
10098 analysisType : record . inspectionType ,
10199 tag : record . tag ,
102100 createdAt : record . createdAt ,
Original file line number Diff line number Diff line change @@ -122,9 +122,8 @@ const InspectionVideoWithPlaceholder = ({
122122 isLargeImage : boolean
123123} ) => ( isLargeImage ? < LargeVideoWithPlaceholder inspection = { inspection } /> : < VideoPlaceholder /> )
124124
125- const LargeVideoWithPlaceholder = ( { inspection } : { inspection : InspectionData } ) => (
126- < VideoPlayer src = { inspection . anonymizedSAS } />
127- )
125+ const LargeVideoWithPlaceholder = ( { inspection } : { inspection : InspectionData } ) =>
126+ inspection . anonymizedSAS ? < VideoPlayer src = { inspection . anonymizedSAS } /> : < VideoPlaceholder />
128127
129128const InspectionResultWithPlaceholder = ( {
130129 inspection,
You can’t perform that action at this time.
0 commit comments