@@ -24,9 +24,7 @@ import useBooleanState from '#hooks/useBooleanState';
2424import useTranslation from '#hooks/useTranslation' ;
2525import useAlert from '#hooks/useAlert' ;
2626import { useLazyRequest } from '#utils/restRequest' ;
27- import {
28- DREF_STATUS_IN_PROGRESS ,
29- } from '#utils/constants' ;
27+ import { DREF_STATUS_IN_PROGRESS } from '#utils/constants' ;
3028
3129import { exportDrefAllocation } from './drefAllocationExport' ;
3230import i18n from './i18n.json' ;
@@ -42,7 +40,7 @@ export interface Props {
4240 applicationType : 'DREF' | 'OPS_UPDATE' | 'FINAL_REPORT' ;
4341 canAddOpsUpdate : boolean ;
4442 canCreateFinalReport : boolean ;
45- isUserRegionCoordinator ?: boolean ;
43+ hasPermissionToApprove ?: boolean ;
4644
4745 onPublishSuccess ?: ( ) => void ;
4846}
@@ -55,7 +53,7 @@ function DrefTableActions(props: Props) {
5553 applicationType,
5654 canAddOpsUpdate,
5755 canCreateFinalReport,
58- isUserRegionCoordinator ,
56+ hasPermissionToApprove ,
5957 onPublishSuccess,
6058 } = props ;
6159
@@ -358,7 +356,7 @@ function DrefTableActions(props: Props) {
358356
359357 const canDownloadAllocation = ( applicationType === 'DREF' || applicationType === 'OPS_UPDATE' ) ;
360358
361- const canApprove = status === DREF_STATUS_IN_PROGRESS && isUserRegionCoordinator ;
359+ const canApprove = status === DREF_STATUS_IN_PROGRESS && hasPermissionToApprove ;
362360
363361 const disabled = fetchingDref
364362 || fetchingOpsUpdate
0 commit comments