From d86e4bb16eb20d7ecfe9cb468a4dc9faac693837 Mon Sep 17 00:00:00 2001 From: nkan-aot <96087745+nkan-aot@users.noreply.github.com> Date: Fri, 17 Nov 2023 14:27:51 -0800 Subject: [PATCH] allow assignment to processing teams for personal requests before open state --- .../src/apiManager/services/FOI/foiRequestServices.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/forms-flow-web/src/apiManager/services/FOI/foiRequestServices.js b/forms-flow-web/src/apiManager/services/FOI/foiRequestServices.js index 0d0c017ab..30bd94e36 100644 --- a/forms-flow-web/src/apiManager/services/FOI/foiRequestServices.js +++ b/forms-flow-web/src/apiManager/services/FOI/foiRequestServices.js @@ -21,6 +21,7 @@ import { catchError, fnDone} from './foiServicesUtil'; import UserService from "../../../services/UserService"; import { replaceUrl } from "../../../helper/FOI/helper"; import { persistRequestFieldsNotInAxis } from "../../../components/FOI/FOIRequest/utils"; +import { StateEnum } from "../../../constants/FOI/statusEnum"; export const fetchFOIRequestList = () => { return (dispatch) => { @@ -178,7 +179,8 @@ export const fetchFOIRawRequestDetails = (requestId) => { const foiRequest = res.data; dispatch(clearRequestDetails({})); dispatch(setFOIRequestDetail(foiRequest)); - dispatch(fetchFOIAssignedToList(foiRequest.requestType.toLowerCase(), foiRequest.currentState.replace(/\s/g, '').toLowerCase(), "")); + const ministryCode = (foiRequest.currentState !== StateEnum.redirect.name && foiRequest.requestType === 'personal') ? foiRequest.selectedMinistries[0].code.toLowerCase() : ""; + dispatch(fetchFOIAssignedToList(foiRequest.requestType.toLowerCase(), foiRequest.currentState.replace(/\s/g, '').toLowerCase(), ministryCode)); dispatch(fetchFOIProcessingTeamList(foiRequest.requestType.toLowerCase())); dispatch(setFOILoader(false)); } else {