@@ -27,7 +27,7 @@ import Link from '#components/Link';
2727import useAlert from '#hooks/useAlert' ;
2828import useRouting from '#hooks/useRouting' ;
2929import {
30- DREF_STATUS_IN_PROGRESS ,
30+ DREF_STATUS_DRAFT ,
3131 DREF_TYPE_IMMINENT ,
3232 DREF_TYPE_LOAN ,
3333 type DrefStatus ,
@@ -167,7 +167,7 @@ function DrefTableActions(props: Props) {
167167 pending : publishDrefPending ,
168168 } = useLazyRequest ( {
169169 method : 'POST' ,
170- url : '/api/v2/dref/{id}/publish /' ,
170+ url : '/api/v2/dref/{id}/approve /' ,
171171 pathVariables : { id : String ( id ) } ,
172172 // FIXME: typings should be fixed in the server
173173 body : ( ) => ( { } as never ) ,
@@ -198,7 +198,7 @@ function DrefTableActions(props: Props) {
198198 pending : publishOpsUpdatePending ,
199199 } = useLazyRequest ( {
200200 method : 'POST' ,
201- url : '/api/v2/dref-op-update/{id}/publish /' ,
201+ url : '/api/v2/dref-op-update/{id}/approve /' ,
202202 pathVariables : { id : String ( id ) } ,
203203 // FIXME: typings should be fixed in the server
204204 body : ( ) => ( { } as never ) ,
@@ -229,7 +229,7 @@ function DrefTableActions(props: Props) {
229229 pending : publishFinalReportPending ,
230230 } = useLazyRequest ( {
231231 method : 'POST' ,
232- url : '/api/v2/dref-final-report/{id}/publish /' ,
232+ url : '/api/v2/dref-final-report/{id}/approve /' ,
233233 pathVariables : { id : String ( id ) } ,
234234 // FIXME: typings should be fixed in the server
235235 body : ( ) => ( { } as never ) ,
@@ -385,7 +385,7 @@ function DrefTableActions(props: Props) {
385385
386386 const canDownloadAllocation = ( applicationType === 'DREF' || applicationType === 'OPS_UPDATE' ) ;
387387
388- const canApprove = status === DREF_STATUS_IN_PROGRESS && hasPermissionToApprove ;
388+ const canApprove = status === DREF_STATUS_DRAFT && hasPermissionToApprove ;
389389
390390 const shouldConfirmImminentAddOpsUpdate = drefType === DREF_TYPE_IMMINENT && isDrefImminentV2 ;
391391
@@ -494,7 +494,7 @@ function DrefTableActions(props: Props) {
494494 </ >
495495 ) }
496496 >
497- { status === DREF_STATUS_IN_PROGRESS && applicationType === 'DREF' && (
497+ { status === DREF_STATUS_DRAFT && applicationType === 'DREF' && (
498498 < Link
499499 to = "drefApplicationForm"
500500 urlParams = { { drefId : id } }
@@ -504,7 +504,7 @@ function DrefTableActions(props: Props) {
504504 { strings . dropdownActionEditLabel }
505505 </ Link >
506506 ) }
507- { status === DREF_STATUS_IN_PROGRESS && applicationType === 'OPS_UPDATE' && (
507+ { status === DREF_STATUS_DRAFT && applicationType === 'OPS_UPDATE' && (
508508 < Link
509509 to = "drefOperationalUpdateForm"
510510 urlParams = { { opsUpdateId : id } }
@@ -514,7 +514,7 @@ function DrefTableActions(props: Props) {
514514 { strings . dropdownActionEditLabel }
515515 </ Link >
516516 ) }
517- { status === DREF_STATUS_IN_PROGRESS && applicationType === 'FINAL_REPORT' && (
517+ { status === DREF_STATUS_DRAFT && applicationType === 'FINAL_REPORT' && (
518518 < Link
519519 to = { isDrefImminentV2 ? 'drefFinalReportForm' : 'oldDrefFinalReportForm' }
520520 urlParams = { { finalReportId : id } }
0 commit comments