File tree Expand file tree Collapse file tree 4 files changed +16
-1
lines changed
components/domain/DrefExportModal
AccountMyFormsDref/DrefTableActions Expand file tree Collapse file tree 4 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ interface Props {
4343 onCancel : ( ) => void ;
4444 applicationType : 'DREF' | 'OPS_UPDATE' | 'FINAL_REPORT' ;
4545 drefType ?: TypeOfDrefEnum | null ;
46+ isDrefImminentV2 ?: boolean ;
4647}
4748
4849function DrefExportModal ( props : Props ) {
@@ -51,6 +52,7 @@ function DrefExportModal(props: Props) {
5152 onCancel,
5253 applicationType,
5354 drefType,
55+ isDrefImminentV2,
5456 } = props ;
5557
5658 const strings = useTranslation ( i18n ) ;
@@ -65,8 +67,15 @@ function DrefExportModal(props: Props) {
6567 if ( applicationType === 'OPS_UPDATE' ) {
6668 type = 'dref-operational-updates' ;
6769 } else if ( applicationType === 'FINAL_REPORT' ) {
68- type = 'dref-final-reports' ;
70+ if ( isDrefImminentV2 ) {
71+ type = 'dref-final-reports' ;
72+ } else {
73+ type = 'old-dref-final-reports' ;
74+ }
75+ } else if ( applicationType === 'DREF' ) {
76+ type = 'dref-applications' ;
6977 } else {
78+ applicationType satisfies never ;
7079 type = 'dref-applications' ;
7180 }
7281
@@ -82,6 +91,7 @@ function DrefExportModal(props: Props) {
8291 id ,
8392 includePga ,
8493 applicationType ,
94+ isDrefImminentV2 ,
8595 ] ,
8696 ) ;
8797
Original file line number Diff line number Diff line change @@ -356,6 +356,8 @@ function DrefTableActions(props: Props) {
356356 publishOpsUpdate ( null ) ;
357357 } else if ( applicationType === 'FINAL_REPORT' ) {
358358 publishFinalReport ( null ) ;
359+ } else {
360+ applicationType satisfies never ;
359361 }
360362 } ,
361363 [
@@ -528,6 +530,7 @@ function DrefTableActions(props: Props) {
528530 id = { id }
529531 applicationType = { applicationType }
530532 drefType = { drefType }
533+ isDrefImminentV2 = { isDrefImminentV2 }
531534 />
532535 ) }
533536 { showShareModal && (
Original file line number Diff line number Diff line change @@ -626,6 +626,7 @@ export function Component() {
626626 onCancel = { setShowExportModalFalse }
627627 id = { Number ( finalReportId ) }
628628 applicationType = "FINAL_REPORT"
629+ isDrefImminentV2
629630 />
630631 ) }
631632 </ Page >
Original file line number Diff line number Diff line change @@ -565,6 +565,7 @@ export function Component() {
565565 onCancel = { setShowExportModalFalse }
566566 id = { Number ( finalReportId ) }
567567 applicationType = "FINAL_REPORT"
568+ isDrefImminentV2 = { false }
568569 />
569570 ) }
570571 </ Page >
You can’t perform that action at this time.
0 commit comments