@@ -12,7 +12,8 @@ import { PageHeader } from '@/components/PageHeader';
1212import { useInstrument } from '@/hooks/useInstrument' ;
1313import { useUploadInstrumentRecordsMutation } from '@/hooks/useUploadInstrumentRecordsMutation' ;
1414import { useAppStore } from '@/store' ;
15- import { createUploadTemplateCSV , processInstrumentCSV , reformatInstrumentData } from '@/utils/upload' ;
15+ import { processInstrumentCSV , reformatInstrumentData } from '@/utils/upload' ;
16+ import { createUploadTemplateCSV } from '@/utils/upload2' ;
1617
1718const $UploadError = z . object ( {
1819 message : z . string ( ) . nullable ( ) ,
@@ -39,8 +40,8 @@ const RouteComponent = () => {
3940
4041 const handleTemplateDownload = ( ) => {
4142 try {
42- const { content, fileName } = createUploadTemplateCSV ( instrument ! ) ;
43- void download ( fileName , content ) ;
43+ const { content, filename } = createUploadTemplateCSV ( instrument ! ) ;
44+ void download ( filename , content ) ;
4445 } catch ( error ) {
4546 console . error ( error ) ;
4647 void navigate ( {
@@ -80,7 +81,10 @@ const RouteComponent = () => {
8081 await uploadInstrumentRecordsMutation . mutateAsync ( reformattedData ) ;
8182 } else {
8283 addNotification ( {
83- message : processedDataResult . message ,
84+ message : t ( {
85+ en : processedDataResult . message . en ,
86+ fr : processedDataResult . message . fr
87+ } ) ,
8488 type : 'error'
8589 } ) ;
8690 }
0 commit comments