File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
DrefOperationalUpdateForm Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -305,6 +305,7 @@ export function Component() {
305305 method : 'PATCH' ,
306306 pathVariables : isDefined ( finalReportId ) ? { id : finalReportId } : undefined ,
307307 body : ( formFields : FinalReportRequestBody ) => formFields ,
308+ useCurrentLanguageForMutation : true ,
308309 onSuccess : ( response ) => {
309310 alert . show (
310311 strings . formSaveRequestSuccessMessage ,
Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ import NonFieldError from '#components/NonFieldError';
4343import Page from '#components/Page' ;
4444import useCurrentLanguage from '#hooks/domain/useCurrentLanguage' ;
4545import useAlert from '#hooks/useAlert' ;
46+ import { DREF_STATUS_APPROVED } from '#utils/constants' ;
4647import {
4748 type GoApiResponse ,
4849 useLazyRequest ,
@@ -313,7 +314,7 @@ export function Component() {
313314 const prevOperationalUpdateId = useMemo ( ( ) => {
314315 const currentOpsUpdate = drefResponse
315316 ?. operational_update_details
316- ?. find ( ( ou ) => ! ou . is_published ) ;
317+ ?. find ( ( ou ) => ! ( ou . status === DREF_STATUS_APPROVED ) ) ;
317318
318319 if ( isNotDefined ( currentOpsUpdate ) ) {
319320 return undefined ;
@@ -344,6 +345,7 @@ export function Component() {
344345 } = useLazyRequest ( {
345346 url : '/api/v2/dref-op-update/{id}/' ,
346347 method : 'PATCH' ,
348+ useCurrentLanguageForMutation : true ,
347349 pathVariables : isDefined ( opsUpdateId ) ? { id : opsUpdateId } : undefined ,
348350 body : ( formFields : OpsUpdateRequestBody ) => formFields ,
349351 onSuccess : ( response ) => {
You can’t perform that action at this time.
0 commit comments