Skip to content

Commit

Permalink
Merge branch 'dev' of github.com:bcgov/foi-flow into dev-RQ-4548
Browse files Browse the repository at this point in the history
  • Loading branch information
richard-aot committed Nov 28, 2023
2 parents 9a3e59f + 16a16dd commit 5efd0e0
Show file tree
Hide file tree
Showing 11 changed files with 9,344 additions and 25,057 deletions.
32,197 changes: 7,900 additions & 24,297 deletions forms-flow-web/package-lock.json

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions forms-flow-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"clsx": "^1.1.1",
"connected-react-router": "^6.9.1",
"create-react-class": "^15.7.0",
"crypto-js": "^4.0.0",
"crypto-js": "^4.2.0",
"date-fns": "^2.23.0",
"date-fns-tz": "^1.1.6",
"date-holidays": "^3.15.1",
Expand All @@ -72,7 +72,6 @@
"html-to-draftjs": "1.5.0",
"html-to-pdf-js": "^0.9.3",
"jquery": "^3.5.1",
"jsonwebtoken": "^8.5.1",
"keycloak-js": "^20.0.2",
"popper.js": "^1.16.1",
"prop-types": "^15.7.2",
Expand All @@ -94,7 +93,7 @@
"react-quill": "^1.3.5",
"react-redux": "^7.2.4",
"react-router-dom": "^5.1.2",
"react-scripts": "^4.0.3",
"react-scripts": "^5.0.1",
"react-select": "^3.2.0",
"react-test-renderer": "^17.0.2",
"react-toastify": "9.0.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {

import {
fetchFOIMinistryAssignedToList,
fetchFOIPersonalDivisionsAndSections
fetchFOIPersonalDivisionsAndSections,
} from "../../../../apiManager/services/FOI/foiMasterDataServices";

import { fetchFOIRequestAttachmentsList } from "../../../../apiManager/services/FOI/foiAttachmentServices";
Expand Down Expand Up @@ -227,8 +227,12 @@ const MinistryReview = React.memo(({ userDetail }) => {
const [originalDivisions, setOriginalDivisions] = React.useState([]);
const [hasReceivedDate, setHasReceivedDate] = React.useState(true);
const [isMinistryRestricted, setIsMinistryRestricted] = useState(false);
const [isMCFPersonal, setIsMCFPersonal] = useState(bcgovcode.replaceAll('"', '') == "MCF" && requestDetails.requestType == FOI_COMPONENT_CONSTANTS.REQUEST_TYPE_PERSONAL);

const [isMCFPersonal, setIsMCFPersonal] = useState(
bcgovcode.replaceAll('"', "") == "MCF" &&
requestDetails.requestType ==
FOI_COMPONENT_CONSTANTS.REQUEST_TYPE_PERSONAL
);
const [unSavedRequest, setUnSavedRequest] = React.useState(false);
let ministryassignedtousername = "Unassigned";
useEffect(() => {
const requestDetailsValue = requestDetails;
Expand All @@ -249,9 +253,15 @@ const MinistryReview = React.memo(({ userDetail }) => {
);
}

if(MinistryNeedsScanning.includes(bcgovcode.replaceAll('"', '')) && requestDetails.requestType == FOI_COMPONENT_CONSTANTS.REQUEST_TYPE_PERSONAL) {
dispatch(fetchFOIPersonalDivisionsAndSections(bcgovcode.replaceAll('"', '')));
if(bcgovcode.replaceAll('"', '') == "MCF") {
if (
MinistryNeedsScanning.includes(bcgovcode.replaceAll('"', "")) &&
requestDetails.requestType ==
FOI_COMPONENT_CONSTANTS.REQUEST_TYPE_PERSONAL
) {
dispatch(
fetchFOIPersonalDivisionsAndSections(bcgovcode.replaceAll('"', ""))
);
if (bcgovcode.replaceAll('"', "") == "MCF") {
setIsMCFPersonal(true);
}
}
Expand All @@ -269,7 +279,6 @@ const MinistryReview = React.memo(({ userDetail }) => {
}
}, [isMinistryRestricted, requestWatchers]);

const [unSavedRequest, setUnSavedRequest] = React.useState(false);
const [recordsUploading, setRecordsUploading] = React.useState(false);
const [CFRUnsaved, setCFRUnsaved] = React.useState(false);
const hideBottomText = [
Expand Down Expand Up @@ -426,11 +435,11 @@ const MinistryReview = React.memo(({ userDetail }) => {
foitabheaderBG = "foitabheadercollection foitabheaderPeerreviewBG";
break;
case StateEnum.tagging.name:
foitabheaderBG = "foitabheadercollection foitabheaderTaggingBG";
break;
foitabheaderBG = "foitabheadercollection foitabheaderTaggingBG";
break;
case StateEnum.readytoscan.name:
foitabheaderBG = "foitabheadercollection foitabheaderReadytoScanBG";
break;
foitabheaderBG = "foitabheadercollection foitabheaderReadytoScanBG";
break;
default:
foitabheaderBG = "foitabheadercollection foitabheaderdefaultBG";
break;
Expand Down Expand Up @@ -632,15 +641,18 @@ const MinistryReview = React.memo(({ userDetail }) => {
? `(${requestNotes.length})`
: ""}
</div>
{(originalDivisions?.length > 0 || isMCFPersonal) && DISABLE_GATHERINGRECORDS_TAB?.toLowerCase() =='false' &&<div
className={clsx("tablinks", {
active: tabLinksStatuses.Records.active,
})}
name="Records"
onClick={() => tabclick("Records")}
>
Records
</div>}
{(originalDivisions?.length > 0 || isMCFPersonal) &&
DISABLE_GATHERINGRECORDS_TAB?.toLowerCase() == "false" && (
<div
className={clsx("tablinks", {
active: tabLinksStatuses.Records.active,
})}
name="Records"
onClick={() => tabclick("Records")}
>
Records
</div>
)}
</div>

<div className="foileftpanelstatus">
Expand Down Expand Up @@ -938,7 +950,8 @@ const MinistryReview = React.memo(({ userDetail }) => {
[classes.hidden]: !tabLinksStatuses.Records.display,
})}
>
{!isAttachmentListLoading && (originalDivisions?.length > 0 || isMCFPersonal) ? (
{!isAttachmentListLoading &&
(originalDivisions?.length > 0 || isMCFPersonal) ? (
<>
{url.indexOf("records") > -1 ? (
<Breadcrumbs
Expand Down
Loading

0 comments on commit 5efd0e0

Please sign in to comment.