Skip to content

Commit

Permalink
Merge branch 'main-AS-release-11.2-merge' into test-rook-AS-release-1…
Browse files Browse the repository at this point in the history
…1.2-merge
  • Loading branch information
aparna-aot committed Nov 12, 2024
2 parents 47e94c6 + 94598a9 commit 0af783b
Show file tree
Hide file tree
Showing 74 changed files with 748 additions and 210 deletions.
1 change: 1 addition & 0 deletions docker-compose-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ services:
- FOI_FFA_URL=${FOI_FFA_URL}
- REACT_APP_FOI_RECORD_FORMATS=${FOI_RECORD_FORMATS}
- REACT_APP_RECORD_PROCESSING_HRS=${RECORD_PROCESSING_HRS}
- REACT_APP_SESSION_SECURITY_KEY=${REACT_APP_SESSION_SECURITY_KEY}
volumes:
- ".:/app"
- "/app/node_modules"
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ services:
- REACT_APP_DISABLE_GATHERINGRECORDS_TAB=${DISABLE_GATHERINGRECORDS_TAB}
- REACT_APP_RECORD_DOWNLOAD_LIMIT=${RECORD_DOWNLOAD_LIMIT}
- REACT_APP_RECORD_DOWNLOAD_SIZE_LIMIT=${RECORD_DOWNLOAD_SIZE_LIMIT}
- REACT_APP_SESSION_SECURITY_KEY=${REACT_APP_SESSION_SECURITY_KEY}
volumes:
- ".:/app"
- "/app/node_modules"
Expand Down
2 changes: 2 additions & 0 deletions forms-flow-web/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ ARG REACT_APP_DISABLE_REDACT_WEBLINK
ARG REACT_APP_DISABLE_GATHERINGRECORDS_TAB
ARG REACT_APP_RECORD_DOWNLOAD_LIMIT
ARG REACT_APP_RECORD_DOWNLOAD_SIZE_LIMIT
ARG REACT_APP_SESSION_SECURITY_KEY

ENV NODE_ENV ${NODE_ENV}
ENV GENERATE_SOURCEMAP ${GENERATE_SOURCEMAP}
Expand Down Expand Up @@ -66,6 +67,7 @@ ENV REACT_APP_FOI_RECORD_FORMATS ${REACT_APP_FOI_RECORD_FORMATS}
ENV REACT_APP_RECORD_PROCESSING_HRS ${REACT_APP_RECORD_PROCESSING_HRS}
ENV REACT_APP_DISABLE_REDACT_WEBLINK ${REACT_APP_DISABLE_REDACT_WEBLINK}
ENV REACT_APP_DISABLE_GATHERINGRECORDS_TAB ${REACT_APP_DISABLE_GATHERINGRECORDS_TAB}
ENV REACT_APP_SESSION_SECURITY_KEY ${REACT_APP_SESSION_SECURITY_KEY}

ENV REACT_APP_SOCKETIO_CONNECT_NONCE ${REACT_APP_SOCKETIO_CONNECT_NONCE}
ENV REACT_APP_RECORD_DOWNLOAD_LIMIT ${REACT_APP_RECORD_DOWNLOAD_LIMIT}
Expand Down
2 changes: 2 additions & 0 deletions forms-flow-web/Dockerfile.local
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ ARG REACT_APP_DISABLE_REDACT_WEBLINK
ARG REACT_APP_DISABLE_GATHERINGRECORDS_TAB
ARG REACT_APP_RECORD_DOWNLOAD_LIMIT
ARG REACT_APP_RECORD_DOWNLOAD_SIZE_LIMIT
ARG REACT_APP_SESSION_SECURITY_KEY

ENV NODE_ENV ${NODE_ENV}
ENV GENERATE_SOURCEMAP ${GENERATE_SOURCEMAP}
Expand Down Expand Up @@ -63,6 +64,7 @@ ENV REACT_APP_DISABLE_REDACT_WEBLINK ${REACT_APP_DISABLE_REDACT_WEBLINK}
ENV REACT_APP_DISABLE_GATHERINGRECORDS_TAB ${REACT_APP_DISABLE_GATHERINGRECORDS_TAB}
ENV REACT_APP_RECORD_DOWNLOAD_LIMIT ${REACT_APP_RECORD_DOWNLOAD_LIMIT}
ENV REACT_APP_RECORD_DOWNLOAD_SIZE_LIMIT ${REACT_APP_RECORD_DOWNLOAD_SIZE_LIMIT}
ENV REACT_APP_SESSION_SECURITY_KEY ${REACT_APP_SESSION_SECURITY_KEY}
# add `/app/node_modules/.bin` to $PATH
ENV PATH /forms-flow-web/app/node_modules/.bin:$PATH

Expand Down
1 change: 1 addition & 0 deletions forms-flow-web/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ services:
- REACT_APP_FOI_FLOW_REPORTING_URL=${FOI_FLOW_REPORTING_URL}
- REACT_APP_AXIS_API_URL=${AXIS_API_URL}
- REACT_APP_SOCKETIO_CONNECT_NONCE=${SOCKETIO_CONNECT_NONCE}
- REACT_APP_SESSION_SECURITY_KEY=${REACT_APP_SESSION_SECURITY_KEY}
volumes:
- ".:/app"
- "/app/node_modules"
Expand Down
3 changes: 3 additions & 0 deletions forms-flow-web/src/actions/FOI/foiActionConstants.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ const FOI_ACTION_CONSTANTS = {
FOI_PDF_STITCHED_STATUS_FOR_OIPCREDLINE: "FOI_PDF_STITCHED_STATUS_FOR_OIPCREDLINE",
FOI_PDF_STITCHED_RECORD_FOR_OIPCREDLINE: "FOI_PDF_STITCHED_RECORD_FOR_OIPCREDLINE",

FOI_PDF_STITCHED_STATUS_FOR_CONSULTS: "FOI_PDF_STITCHED_STATUS_FOR_CONSULTS",
FOI_PDF_STITCHED_RECORD_FOR_CONSULTS: "FOI_PDF_STITCHED_RECORD_FOR_CONSULTS",

OIPC_OUTCOMES: "OIPC_OUTCOMES",
OIPC_STATUSES: "OIPC_STATUSES",
OIPC_REVIEWTYPES: "OIPC_REVIEWTYPES",
Expand Down
12 changes: 12 additions & 0 deletions forms-flow-web/src/actions/FOI/foiRequestActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,12 @@ export const setFOIPDFStitchedRecordForOipcRedline = (data) => (dispatch) => {
payload: data,
});
}
export const setFOIPDFStitchedRecordForConsults = (data) => (dispatch) => {
dispatch({
type: FOI_ACTION_CONSTANTS.FOI_PDF_STITCHED_RECORD_FOR_CONSULTS,
payload: data,
});
}
export const setFOIPDFStitchStatusForHarms = (data) => (dispatch) => {
dispatch({
type: FOI_ACTION_CONSTANTS.FOI_PDF_STITCHED_STATUS_FOR_HARMS,
Expand Down Expand Up @@ -196,6 +202,12 @@ export const setFOIPDFStitchStatusForOipcRedline = (data) => (dispatch) => {
payload: data,
});
};
export const setFOIPDFStitchStatusForConsults = (data) => (dispatch) => {
dispatch({
type: FOI_ACTION_CONSTANTS.FOI_PDF_STITCHED_STATUS_FOR_CONSULTS,
payload: data,
});
};

export const serviceActionError = (_data) => (dispatch) => {
//TODO update to a common file
Expand Down
3 changes: 3 additions & 0 deletions forms-flow-web/src/apiManager/endpoints/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@ const API = {
FOI_DOWNLOAD_RECORDS_FOR_OIPCREDLINE: `${FOI_BASE_API_URL}/api/foirecord/<requestid>/ministryrequest/<ministryrequestid>/download/oipcredline`,
FOI_PDF_STITCH_STATUS_FOR_OIPCREDLINE: `${FOI_BASE_API_URL}/api/foirecord/<requestid>/ministryrequest/<ministryrequestid>/oipcredline/pdfstitchjobstatus`,

FOI_DOWNLOAD_RECORDS_FOR_CONSULTPACKAGE: `${FOI_BASE_API_URL}/api/foirecord/<requestid>/ministryrequest/<ministryrequestid>/download/consultpackage`,
FOI_PDF_STITCH_STATUS_FOR_CONSULTPACKAGE: `${FOI_BASE_API_URL}/api/foirecord/<requestid>/ministryrequest/<ministryrequestid>/consultpackage/pdfstitchjobstatus`,

FOI_GET_OIPC_OUTCOMES: `${FOI_BASE_API_URL}/api/foiflow/oipc/outcomes`,
FOI_GET_OIPC_STATUSES: `${FOI_BASE_API_URL}/api/foiflow/oipc/statuses`,
FOI_GET_OIPC_REVIEWTYPES: `${FOI_BASE_API_URL}/api/foiflow/oipc/reviewtypes`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,7 @@ import {
.then((res) => {
if (res.data) {
const foiCommentTypes = res.data;
let data = foiCommentTypes.map((type) => {
let data = foiCommentTypes?.map((type) => {
return { ...type };
});
dispatch(setFOICommentTypes(data));
Expand Down
70 changes: 70 additions & 0 deletions forms-flow-web/src/apiManager/services/FOI/foiRecordServices.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ import {
setFOIPDFStitchStatusForOipcRedlineReview,
setFOIPDFStitchStatusForOipcRedline,
setFOIPDFStitchedRecordForOipcRedline,
setFOIPDFStitchStatusForConsults,
setFOIPDFStitchedRecordForConsults,
} from "../../../actions/FOI/foiRequestActions";
import { fnDone } from "./foiServicesUtil";
import UserService from "../../../services/UserService";
Expand Down Expand Up @@ -637,6 +639,74 @@ export const fetchPDFStitchedRecordForOIPCRedlineReview = (
};
}

export const fetchPDFStitchStatusForConsults = (
requestId,
ministryId,
...rest
) => {
if (!ministryId) {
return () => {};
}
const done = fnDone(rest);
let apiUrl = replaceUrl(
replaceUrl(
API.FOI_PDF_STITCH_STATUS_FOR_CONSULTPACKAGE,
"<ministryrequestid>",
ministryId
),
"<requestid>",
requestId
);
return (dispatch) => {
httpGETRequest(apiUrl, {}, UserService.getToken())
.then((res) => {
if (res.data) {
dispatch(setFOIPDFStitchStatusForConsults(res.data));
done(null, res.data);
}
})
.catch((error) => {
console.log("Error in fetching pdfstitch job status", error);
dispatch(serviceActionError(error));
done(error);
});
};
}

export const fetchPDFStitchedRecordForConsults = (
requestId,
ministryId,
...rest
) => {
if (!ministryId) {
return () => {};
}
const done = fnDone(rest);
let apiUrl = replaceUrl(
replaceUrl(
API.FOI_DOWNLOAD_RECORDS_FOR_CONSULTPACKAGE,
"<ministryrequestid>",
ministryId
),
"<requestid>",
requestId
);
return (dispatch) => {
httpGETRequest(apiUrl, {}, UserService.getToken())
.then((res) => {
if (res.data) {
dispatch(setFOIPDFStitchedRecordForConsults(res.data));
done(null, res.data);
}
})
.catch((error) => {
console.log("Error in fetching pdfstitch job status", error);
dispatch(serviceActionError(error));
done(error);
});
};
}

export const updateUserLockedRecords = (data, requestId, ministryId, ...rest) => {
const done = fnDone(rest);
let apiUrl= replaceUrl(replaceUrl(
Expand Down
4 changes: 2 additions & 2 deletions forms-flow-web/src/components/FOI/Dashboard/Ministry/Queue.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ const Queue = ({ userDetail, tableInfo }) => {
function getRecordsDue(params) {
let receivedDateString = params.row.cfrduedate;
const currentStatus = params.row.currentState;
if (currentStatus.toLowerCase() === StateEnum.onhold.name.toLowerCase()) {
if (currentStatus.toLowerCase() === StateEnum.onhold.name.toLowerCase() || currentStatus.toLowerCase() === StateEnum.onholdother.name.toLowerCase()) {
return "N/A";
} else if(!receivedDateString) {
return "";
Expand All @@ -102,7 +102,7 @@ const Queue = ({ userDetail, tableInfo }) => {
function getLDD(params) {
let receivedDateString = params.row.duedate;
const currentStatus = params.row.currentState;
if (currentStatus.toLowerCase() === StateEnum.onhold.name.toLowerCase()) {
if (currentStatus.toLowerCase() === StateEnum.onhold.name.toLowerCase() || currentStatus.toLowerCase() === StateEnum.onholdother.name.toLowerCase()) {
return "N/A";
} else if(!receivedDateString) {
return "";
Expand Down
6 changes: 3 additions & 3 deletions forms-flow-web/src/components/FOI/Dashboard/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export const onBehalfFullName = (params) => {
export const getRecordsDue = (params) => {
let receivedDateString = params.row.cfrduedate;
const currentStatus = params.row.currentState;
if (currentStatus.toLowerCase() === StateEnum.onhold.name.toLowerCase()) {
if (currentStatus.toLowerCase() === StateEnum.onhold.name.toLowerCase() || currentStatus.toLowerCase() === StateEnum.onholdother.name.toLowerCase()) {
return "N/A";
} else if(!receivedDateString) {
return "";
Expand All @@ -145,7 +145,7 @@ export const getRecordsDue = (params) => {
export const getLDD = (params) => {
let receivedDateString = params.row.duedate;
const currentStatus = params.row.currentState;
if (currentStatus.toLowerCase() === StateEnum.onhold.name.toLowerCase()) {
if (currentStatus.toLowerCase() === StateEnum.onhold.name.toLowerCase()||currentStatus.toLowerCase() === StateEnum.onholdother.name.toLowerCase()) {
return "N/A";
} else if(!receivedDateString) {
return "";
Expand All @@ -158,7 +158,7 @@ export const getDaysLeft = (params) => {
const receivedDateString = params.row.duedate;

if (
[StateEnum.onhold.name.toLowerCase(), StateEnum.closed.name.toLowerCase()].includes(params.row.currentState.toLowerCase())
[StateEnum.onhold.name.toLowerCase(), StateEnum.closed.name.toLowerCase(), StateEnum.onholdother.name.toLowerCase()].includes(params.row.currentState.toLowerCase())
) {
return "N/A";
} else if(!receivedDateString) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -369,12 +369,13 @@ const BottomButtonGroup = React.memo(
case StateEnum.peerreview.name:
case StateEnum.section5pending.name:
case StateEnum.appfeeowing.name:
case StateEnum.onholdother.name:
case StateEnum.recordsreadyforreview.name:
const status = Object.values(StateEnum).find(
(statusValue) => statusValue.name === currentSelectedStatus
);
saveRequestObject.requeststatuslabel = status.label;
if (currentSelectedStatus === StateEnum.onhold.name && !saveRequestObject.paymentExpiryDate) {
if ((currentSelectedStatus === StateEnum.onhold.name || currentSelectedStatus === StateEnum.onholdother.name) && !saveRequestObject.paymentExpiryDate) {
saveRequestObject.paymentExpiryDate = dueDateCalculation(new Date(), PAYMENT_EXPIRY_DAYS);
}
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const ExtensionDetailsBox = React.memo(() => {
setExtensionId(null);
}}
disabled={pendingExtensionExists || requestState?.toLowerCase() === StateEnum.onhold.name.toLowerCase() ||
requestState?.toLowerCase() === StateEnum.closed.name.toLowerCase()}
requestState?.toLowerCase() === StateEnum.onholdother.name.toLowerCase() || requestState?.toLowerCase() === StateEnum.closed.name.toLowerCase()}
>
New Extension
</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ const ExtensionsTable = ({ showActions = true }) => {
disabled={
(index > 0 &&
extension.extensionstatus !== extensionStatusId.pending) || requestState?.toLowerCase() === StateEnum.onhold.name.toLowerCase() ||
requestState?.toLowerCase() === StateEnum.closed.name.toLowerCase()
requestState?.toLowerCase() === StateEnum.onholdother.name.toLowerCase() || requestState?.toLowerCase() === StateEnum.closed.name.toLowerCase()
}
>
<MoreHorizIcon />
Expand Down
5 changes: 3 additions & 2 deletions forms-flow-web/src/components/FOI/FOIRequest/FOIRequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ import {
fetchPDFStitchStatusForResponsePackage,
fetchPDFStitchedStatusForOIPCRedlineReview,
fetchPDFStitchedStatusForOIPCRedline,
fetchPDFStitchStatusForConsults,
} from "../../../apiManager/services/FOI/foiRecordServices";
import { makeStyles } from "@material-ui/core/styles";
import FOI_COMPONENT_CONSTANTS from "../../../constants/FOI/foiComponentConstants";
Expand Down Expand Up @@ -325,6 +326,7 @@ const FOIRequest = React.memo(({ userDetail, openApplicantProfileModal }) => {
dispatch(fetchPDFStitchStatusForResponsePackage(requestId, ministryId));
dispatch(fetchPDFStitchedStatusForOIPCRedline(requestId, ministryId));
dispatch(fetchPDFStitchedStatusForOIPCRedlineReview(requestId, ministryId));
dispatch(fetchPDFStitchStatusForConsults(requestId, ministryId));
fetchCFRForm(ministryId, dispatch);
dispatch(fetchApplicantCorrespondence(requestId, ministryId));
dispatch(fetchApplicantCorrespondenceTemplates());
Expand Down Expand Up @@ -361,6 +363,7 @@ const FOIRequest = React.memo(({ userDetail, openApplicantProfileModal }) => {
currentState === StateEnum.peerreview.name ||
currentState === StateEnum.signoff.name ||
currentState === StateEnum.response.name ||
currentState === StateEnum.onholdother.name ||
currentState === StateEnum.closed.name
);
}
Expand Down Expand Up @@ -881,7 +884,6 @@ const FOIRequest = React.memo(({ userDetail, openApplicantProfileModal }) => {

const handleSaveRequest = (_state, _unSaved, id) => {
setHeader(_state);

if (!_unSaved) {
setUnSavedRequest(_unSaved);
dispatch(fetchFOIRequestDetailsWrapper(id || requestId, ministryId));
Expand Down Expand Up @@ -1030,7 +1032,6 @@ const FOIRequest = React.memo(({ userDetail, openApplicantProfileModal }) => {
(state) => state.foiRequests.showEventQueue
);

//console.log("IAO:::", iaoassignedToList)
const showRecordsTab = () => {
return (
requestState !== StateEnum.intakeinprogress.name &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ const FOIRequestHeader = React.memo(
status.toLowerCase() === StateEnum.onhold.name.toLowerCase() ||
status.toLowerCase() === StateEnum.response.name.toLowerCase() ||
status.toLowerCase() === StateEnum.recordsreadyforreview.name.toLowerCase() ||
status.toLowerCase() === StateEnum.onholdother.name.toLowerCase() ||
(ministryId && status.toLowerCase() === StateEnum.peerreview.name.toLowerCase());

const getMinistryAssignedTo = () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ const MinistryReview = React.memo(({ userDetail }) => {
currentState === StateEnum.peerreview.name ||
currentState === StateEnum.signoff.name ||
currentState === StateEnum.response.name ||
currentState === StateEnum.onholdother.name ||
currentState === StateEnum.closed.name
);
}
Expand Down Expand Up @@ -328,6 +329,7 @@ const MinistryReview = React.memo(({ userDetail }) => {
const [CFRUnsaved, setCFRUnsaved] = React.useState(false);
const hideBottomText = [
StateEnum.onhold.name.toLowerCase(),
StateEnum.onholdother.name.toLowerCase(),
StateEnum.closed.name.toLowerCase(),
];

Expand Down Expand Up @@ -489,6 +491,9 @@ const MinistryReview = React.memo(({ userDetail }) => {
break;
case StateEnum.recordsreadyforreview.name:
foitabheaderBG = "foitabheadercollection foitabheaderRecordsReadyForReviewBG";
break;
case StateEnum.onholdother.name:
foitabheaderBG = "foitabheadercollection foitabheaderOnHoldOtherBG";
break;
default:
foitabheaderBG = "foitabheadercollection foitabheaderdefaultBG";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,9 @@
.foitabheaderPeerreviewBG{
background-color: #096DD1;
}

.foitabheaderOnHoldOtherBG{
background-color: #595959;
}
.foileftpanelheader
{
padding-left: 12%;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,9 @@ const RequestDetails = React.memo((requestDetails) => {
<b>Records Due Date</b>
</span>
<span className="foi-rowtoppadding">
{_requestDetails?.currentState?.toLowerCase() !==
StateEnum.onhold.name.toLowerCase()
{(_requestDetails?.currentState?.toLowerCase() !==
StateEnum.onhold.name.toLowerCase() && _requestDetails?.currentState?.toLowerCase() !==
StateEnum.onholdother.name.toLowerCase())
? formatDate(
_requestDetails.cfrDueDate,
"MMM dd yyyy"
Expand All @@ -71,8 +72,9 @@ const RequestDetails = React.memo((requestDetails) => {
<b>Legislated Due Date</b>
</span>
<span className="foi-rowtoppadding">
{_requestDetails?.currentState?.toLowerCase() !==
StateEnum.onhold.name.toLowerCase()
{(_requestDetails?.currentState?.toLowerCase() !==
StateEnum.onhold.name.toLowerCase() && _requestDetails?.currentState?.toLowerCase() !==
StateEnum.onholdother.name.toLowerCase())
? formatDate(
_requestDetails.dueDate,
"MMM dd yyyy"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,8 @@ const RequestDetails = React.memo(
<TextField
id="dueDate"
label="Legislated Due Date"
type={requestDetails?.currentState?.toLowerCase() === StateEnum.onhold.name.toLowerCase() ? "text" : "date"}
value={requestDetails?.currentState?.toLowerCase() === StateEnum.onhold.name.toLowerCase() ? 'N/A' : (dueDateText || '')}
type={(requestDetails?.currentState?.toLowerCase() === StateEnum.onhold.name.toLowerCase() || requestDetails?.currentState?.toLowerCase() === StateEnum.onholdother.name.toLowerCase()) ? "text" : "date"}
value={(requestDetails?.currentState?.toLowerCase() === StateEnum.onhold.name.toLowerCase() || requestDetails?.currentState?.toLowerCase() === StateEnum.onholdother.name.toLowerCase()) ? 'N/A' : (dueDateText || '')}
inputProps={{ "aria-labelledby": "dueDate-label"}}
InputLabelProps={{
shrink: true,
Expand Down
Loading

0 comments on commit 0af783b

Please sign in to comment.