Skip to content

Commit

Permalink
Merge pull request #4939 from bcgov/dev-MD-4679bugfix
Browse files Browse the repository at this point in the history
Bugfixes
  • Loading branch information
sumathi-thirumani authored Dec 28, 2023
2 parents 58e19e8 + a1bf379 commit ec638ca
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
8 changes: 6 additions & 2 deletions forms-flow-web/src/components/FOI/FOIRequest/FOIRequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ const FOIRequest = React.memo(({ userDetail }) => {
if (JSON.stringify(oipcData) != JSON.stringify(oipcDataInitial)) {
setDisableInput(false)
}
}, [oipcData]);
}, [oipcData, requestDetails.isoipcreview]);

useEffect(() => {
if (window.location.href.indexOf("comments") > -1) {
Expand Down Expand Up @@ -670,6 +670,7 @@ const FOIRequest = React.memo(({ userDetail }) => {
};

const saveOIPCNoReview = () => {
const toastID = toast.loading("Saving request with removed OIPC review...")
removeAllOIPCs();
setIsOIPCReview(false);
dispatch(
Expand All @@ -678,8 +679,11 @@ const FOIRequest = React.memo(({ userDetail }) => {
ministryId,
(err, _res) => {
if(!err) {
toast.success("OIPC details have been saved successfully.", {
toast.update(toastID, {
type: "success",
render: "OIPC details have been saved successfully.",
position: "top-right",
isLoading: false,
autoClose: 3000,
hideProgressBar: true,
closeOnClick: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const RequestFlag = ({ isActive, type, handleSelect, showFlag = true, isDisabled
);

//when setting to inactive
modalHeadingActive = "OIPC Review";
modalHeadingInactive = "OIPC Review";
modalMessageInactive =
"Are you sure you want to remove the OIPC review flag from this request?";
modalDescriptionInactive = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -564,8 +564,11 @@ def getrequestssubquery(cls, groups, filterfields, keyword, additionalfilter, us
SubjectCode,
SubjectCode.subjectcodeid == FOIMinistryRequestSubjectCode.subjectcodeid,
isouter=True
).filter(or_(FOIMinistryRequest.requeststatusid != 3, and_(FOIMinistryRequest.isoipcreview == True, FOIMinistryRequest.requeststatusid == 3)))

).join(
FOIRequestOIPC,
and_(FOIRequestOIPC.foiministryrequest_id == FOIMinistryRequest.foiministryrequestid, FOIRequestOIPC.foiministryrequestversion_id == FOIMinistryRequest.version),
isouter=True
).filter(or_(FOIMinistryRequest.requeststatusid != 3, and_(FOIMinistryRequest.isoipcreview == True, FOIMinistryRequest.requeststatusid == 3, FOIRequestOIPC.outcomeid == None)))


if(additionalfilter == 'watchingRequests'):
Expand Down

0 comments on commit ec638ca

Please sign in to comment.