Skip to content

Commit

Permalink
Fix Reporting Details bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Onitoxan committed Oct 25, 2024
1 parent 86a5292 commit faa52c2
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions apps/hpc-ftsadmin/src/app/utils/parse-flow-form.ts
Original file line number Diff line number Diff line change
Expand Up @@ -568,12 +568,17 @@ const reportDetailsToReportingDetailProps = (
dateReported: reportDetail.date ? dayjs(reportDetail.date) : null,
reporterReferenceCode: reportDetail.refCode ?? '',
reporterContactInfo: reportDetail.contactInfo ?? '',
reportFileTitle: reportDetail.reportFiles[0]?.title ?? '',
reportFileTitle:
reportDetail.reportFiles.find((rF) => rF.type === 'file')?.title ?? '',
file: fileAssetEntityToFileUploadResult(
reportDetail.reportFiles[0]?.fileAssetEntity
reportDetail.reportFiles.find((rF) => rF.type === 'file')?.fileAssetEntity
),
reportURLTitle: reportDetail.reportFiles[1]?.title ?? '',
url: reportDetail.reportFiles[1]?.url ?? '',
reportURLTitle:
reportDetail.reportFiles.find((rF) => rF.type.toLowerCase() === 'url')
?.title ?? '',
url:
reportDetail.reportFiles.find((rF) => rF.type.toLowerCase() === 'url')
?.url ?? '',
}));
};

Expand Down

0 comments on commit faa52c2

Please sign in to comment.