Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#4707 changes to main #4985

Merged
merged 83 commits into from
Jan 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
d1190e0
migration script for statelabel
Nov 23, 2023
01e19cd
Merge branch 'test-marshal-DV-4707' into dev-shiva-4707-marshal
Nov 23, 2023
0b07ce8
statusEnum and migrationscript changes
Nov 24, 2023
0e7d832
stateEnum changes to FE and BE
Nov 27, 2023
1091827
Merge pull request #4807 from bcgov/test-marshal-merge
divyav-aot Nov 30, 2023
6efa717
Merge branch 'test-marshal' into test-marshal-DV-4707-1
Nov 30, 2023
f7960b1
updated the query sequence
Dec 8, 2023
1d91c85
Merge branch 'dev-shiva-4707-marshal' into test-marshal-DV-4707-1
Dec 8, 2023
73da845
fix issue related to assignment
Dec 11, 2023
ef04d7a
migration script for statelabel
Nov 23, 2023
2fef1e6
fixed migration script issue
Dec 12, 2023
4bc1107
Update notification refactoring
Nov 30, 2023
28320d8
statusEnum and migrationscript changes
Nov 24, 2023
939fd21
stateEnum changes to FE and BE
Nov 27, 2023
d871ad6
mute notifications for mcf #4548
richard-aot Nov 27, 2023
a2a9803
Fix indent
milosdes Nov 21, 2023
6128e78
Remove whitespace
milosdes Nov 21, 2023
d41dee4
bug fix:
richard-aot Nov 29, 2023
7a79e8d
add mute to notification manager
richard-aot Nov 29, 2023
825bccd
Refacoring status labels for notifications
Dec 11, 2023
b922383
Fix merge conflicts
Dec 12, 2023
5759e49
Merge branch 'test-shiva-4707-marshal' into test-marshal-DV-4707-1
Dec 12, 2023
33088b0
Merge branch 'dev' into test-shiva-4707-marshal
Dec 12, 2023
12cfdab
update to migration script
Dec 12, 2023
0f25791
Merge pull request #4881 from bcgov/test-shiva-4707-marshal
divyav-aot Dec 12, 2023
2ff0765
minor fix related to query
Dec 13, 2023
7608998
Merge branch 'test-marshal' into test-marshal-DV-4707-1
Dec 13, 2023
09c915d
Merge pull request #4884 from bcgov/test-marshal-DV-4707-1
divyav-aot Dec 13, 2023
289930b
small update to the query sequence
Dec 15, 2023
8120b28
Merge pull request #4903 from bcgov/test-marshal-DV-4707-1
divyav-aot Dec 15, 2023
f0368a7
Fix notifation manager issues
Dec 20, 2023
19b216a
Update and fix harms download message
Dec 20, 2023
26b37b6
Clean up print statement
Dec 20, 2023
f0dba1f
Clean up print statement
Dec 20, 2023
7e27d2f
Clean up print statement
Dec 20, 2023
f5240e3
Merge pull request #4918 from bcgov/test-shiva-4707-marshal
antsand Dec 21, 2023
7d8cb5d
event queue load error fixed
Dec 22, 2023
fca7aba
Merge pull request #4932 from bcgov/test-marshal-DV-4707-1
divyav-aot Dec 22, 2023
c5e41ec
Merge branch 'dev' into test-marshal-DV-merge-dev
Jan 3, 2024
d85267e
Merge pull request #4950 from bcgov/test-marshal-DV-merge-dev
divyav-aot Jan 3, 2024
c999ae5
fix to show notification for triggered user
Jan 3, 2024
43790bf
Merge pull request #4956 from bcgov/test-marshal-DV-4707-1
divyav-aot Jan 3, 2024
d782442
fix to show notification for triggered user
Jan 3, 2024
15f46e8
Merge pull request #4957 from bcgov/test-marshal-DV-4707-1
divyav-aot Jan 3, 2024
4d6d934
Merge pull request #4958 from bcgov/test-marshal
divyav-aot Jan 3, 2024
fa51cdd
Update FOIMinistryRequests.py
divyav-aot Jan 4, 2024
546ceab
query fixed
Jan 4, 2024
f906b1c
Merge branch 'dev' into test-marshal-DV-4707-1
Jan 4, 2024
3722c05
Merge pull request #4962 from bcgov/test-marshal-DV-4707-1
divyav-aot Jan 4, 2024
47ae0f7
debug statements
Jan 4, 2024
67e418c
Merge branch 'dev' into test-marshal-DV-4707-1
Jan 4, 2024
6a1adf2
Merge pull request #4965 from bcgov/test-marshal-DV-4707-1
divyav-aot Jan 4, 2024
76f2b4c
Added debug meesage for post reminder event
Jan 4, 2024
43bc173
Added debug meesage for post reminder event
Jan 4, 2024
0b77a82
Merge branch 'dev' into dev-shiva-4077
antsand Jan 4, 2024
25fd015
Merge pull request #4966 from bcgov/dev-shiva-4077
divyav-aot Jan 4, 2024
0eef0f9
added isdeleted=false
Jan 4, 2024
68255c1
Merge pull request #4968 from bcgov/test-marshal-DV-4707-1
divyav-aot Jan 4, 2024
e128094
Added more logs
Jan 4, 2024
e42b168
Added more logs
Jan 5, 2024
33139c9
Merge pull request #4969 from bcgov/dev-shiva-4077
antsand Jan 5, 2024
9274c3d
Added more logs
Jan 5, 2024
ef4e2a8
Merge pull request #4972 from bcgov/dev-shiva-4077
antsand Jan 5, 2024
6ab5bc1
Fetch data from enum not from the database
Jan 5, 2024
af1d67d
Merge pull request #4973 from bcgov/dev-shiva-4077
antsand Jan 5, 2024
8f478ad
query updated
Jan 5, 2024
f7ed9e8
Merge branch 'dev' into test-marshal-DV-4707-1
Jan 5, 2024
6d72783
Merge pull request #4974 from bcgov/test-marshal-DV-4707-1
divyav-aot Jan 5, 2024
1f922c7
Remove print statements
Jan 5, 2024
765e992
Merge pull request #4978 from bcgov/dev-shiva-4077
antsand Jan 5, 2024
a32c3f7
All notification/user labels must be fetched from cache first
Jan 8, 2024
a65a000
Update None type
Jan 8, 2024
2f3a56c
fixes to notificationtypeid=null, removed logs
Jan 8, 2024
d083be9
merge conflicts fixed
Jan 8, 2024
87c3b55
Merge pull request #4979 from bcgov/dev-shiva-4077
antsand Jan 8, 2024
907694b
Merge branch 'dev' into test-marshal-DV-4707-1
Jan 8, 2024
efa8b27
Merge pull request #4980 from bcgov/test-marshal-DV-4707-1
divyav-aot Jan 8, 2024
ef5d348
fixed issue related to groupmember notification
Jan 9, 2024
8545646
Merge branch 'dev' into test-marshal-DV-4707-1
Jan 9, 2024
4054e4e
Merge pull request #4981 from bcgov/test-marshal-DV-4707-1
divyav-aot Jan 9, 2024
d6a974d
removed logs
Jan 9, 2024
5fbf2cb
Merge branch 'dev' into test-marshal-DV-4707-1
Jan 9, 2024
ee34250
Merge pull request #4982 from bcgov/test-marshal-DV-4707-1
divyav-aot Jan 9, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -128,15 +128,14 @@ const AdvancedSearch = ({ userDetail }) => {
});

const intitialRequestState = {
[StateEnum.unopened.id]: false,
[StateEnum.open.id]: false,
[StateEnum.callforrecords.id]: false,
[StateEnum.review.id]: false,
[StateEnum.signoff.id]: false,
[StateEnum.closed.id]: false,
[StateEnum.callforrecordsoverdue.id]: false
[StateEnum.unopened.label]: false,
[StateEnum.open.label]: false,
[StateEnum.callforrecords.label]: false,
[StateEnum.review.label]: false,
[StateEnum.signoff.label]: false,
[StateEnum.closed.label]: false,
[StateEnum.callforrecordsoverdue.label]: false
};

const [requestState, setRequestState] = useState(() => {
if (Object.keys(advancedSearchParams).length > 0 && advancedSearchParams.requestState.length > 0) {
let savedRequestState = {...intitialRequestState}
Expand Down Expand Up @@ -579,9 +578,9 @@ const AdvancedSearch = ({ userDetail }) => {
<Checkbox
size="small"
name="unopened"
stateid={StateEnum.unopened.id}
stateid={StateEnum.unopened.label}
onChange={handleRequestStateChange}
checked={requestState[StateEnum.unopened.id]}
checked={requestState[StateEnum.unopened.label]}
color="success"
/>
}
Expand All @@ -593,9 +592,9 @@ const AdvancedSearch = ({ userDetail }) => {
<Checkbox
size="small"
name="callforrecords"
stateid={StateEnum.callforrecords.id}
stateid={StateEnum.callforrecords.label}
onChange={handleRequestStateChange}
checked={requestState[StateEnum.callforrecords.id]}
checked={requestState[StateEnum.callforrecords.label]}
color="success"
/>
}
Expand All @@ -607,9 +606,9 @@ const AdvancedSearch = ({ userDetail }) => {
<Checkbox
size="small"
name="review"
stateid={StateEnum.review.id}
stateid={StateEnum.review.label}
onChange={handleRequestStateChange}
checked={requestState[StateEnum.review.id]}
checked={requestState[StateEnum.review.label]}
color="success"
/>
}
Expand All @@ -621,9 +620,9 @@ const AdvancedSearch = ({ userDetail }) => {
<Checkbox
size="small"
name="signoff"
stateid={StateEnum.signoff.id}
stateid={StateEnum.signoff.label}
onChange={handleRequestStateChange}
checked={requestState[StateEnum.signoff.id]}
checked={requestState[StateEnum.signoff.label]}
color="success"
/>
}
Expand All @@ -635,9 +634,9 @@ const AdvancedSearch = ({ userDetail }) => {
<Checkbox
size="small"
name="closed"
stateid={StateEnum.closed.id}
stateid={StateEnum.closed.label}
onChange={handleRequestStateChange}
checked={requestState[StateEnum.closed.id]}
checked={requestState[StateEnum.closed.label]}
color="success"
/>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,12 @@ const AdvancedSearch = ({ userDetail }) => {
});

const intitialRequestState = {
[StateEnum.callforrecords.id]: false,
[StateEnum.review.id]: false,
[StateEnum.signoff.id]: false,
[StateEnum.closed.id]: false,
[StateEnum.callforrecordsoverdue.id]: false
[StateEnum.callforrecords.label]: false,
[StateEnum.review.label]: false,
[StateEnum.signoff.label]: false,
[StateEnum.closed.label]: false,
[StateEnum.callforrecordsoverdue.label]: false
};

const [requestState, setRequestState] = useState(() => {
if (Object.keys(advancedSearchParams).length > 0 && advancedSearchParams.requestState.length > 0) {
let savedRequestState = {...intitialRequestState}
Expand Down Expand Up @@ -592,9 +591,9 @@ const AdvancedSearch = ({ userDetail }) => {
<Checkbox
size="small"
name="callforrecords"
stateid={StateEnum.callforrecords.id}
stateid={StateEnum.callforrecords.label}
onChange={handleRequestStateChange}
checked={requestState[StateEnum.callforrecords.id]}
checked={requestState[StateEnum.callforrecords.label]}
color="success"
/>
}
Expand All @@ -606,9 +605,9 @@ const AdvancedSearch = ({ userDetail }) => {
<Checkbox
size="small"
name="review"
stateid={StateEnum.review.id}
stateid={StateEnum.review.label}
onChange={handleRequestStateChange}
checked={requestState[StateEnum.review.id]}
checked={requestState[StateEnum.review.label]}
color="success"
/>
}
Expand All @@ -620,9 +619,9 @@ const AdvancedSearch = ({ userDetail }) => {
<Checkbox
size="small"
name="signoff"
stateid={StateEnum.signoff.id}
stateid={StateEnum.signoff.label}
onChange={handleRequestStateChange}
checked={requestState[StateEnum.signoff.id]}
checked={requestState[StateEnum.signoff.label]}
color="success"
/>
}
Expand All @@ -634,9 +633,9 @@ const AdvancedSearch = ({ userDetail }) => {
<Checkbox
size="small"
name="closed"
stateid={StateEnum.closed.id}
stateid={StateEnum.closed.label}
onChange={handleRequestStateChange}
checked={requestState[StateEnum.closed.id]}
checked={requestState[StateEnum.closed.label]}
color="success"
/>
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,9 @@ const AxisSyncModal = ({ axisSyncModalOpen, setAxisSyncModalOpen, saveRequestObj


const saveAxisData = async () => {
if (urlIndexCreateRequest > -1)
updatedSaveReqObj.requeststatusid = StateEnum.intakeinprogress.id;
if (urlIndexCreateRequest > -1) {
updatedSaveReqObj.requeststatuslabel = StateEnum.intakeinprogress.label;
}
dispatch(saveRequestDetails(updatedSaveReqObj, urlIndexCreateRequest,requestId,ministryId,
(err, res) => {
if (!err) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ const BottomButtonGroup = React.memo(

const saveRequest = async (setLoader = false) => {
if (urlIndexCreateRequest > -1) {
saveRequestObject.requeststatusid = StateEnum.intakeinprogress.id;
saveRequestObject.requeststatuslabel = StateEnum.intakeinprogress.label;
setIsAddRequest(false);
}
dispatch(setFOILoader(setLoader))
Expand Down Expand Up @@ -176,7 +176,7 @@ const BottomButtonGroup = React.memo(
if (
currentSelectedStatus &&
currentSelectedStatus !== StateEnum.open.name &&
saveRequestObject.requeststatusid &&
saveRequestObject.requeststatuslabel &&
saveRequestObject.currentState
) {
//scanning team - MSD/CFD personal
Expand All @@ -200,7 +200,7 @@ const BottomButtonGroup = React.memo(
}
saveRequestModal();
} else {
saveRequestObject.requeststatusid = StateEnum.open.id;
saveRequestObject.requeststatuslabel = StateEnum.open.label;
if (currentSelectedStatus === StateEnum.open.name && ministryId) {
saveRequestModal();
}
Expand Down Expand Up @@ -231,7 +231,7 @@ const BottomButtonGroup = React.memo(
saveRequestObject.id = saveRequestObject.id
? saveRequestObject.id
: requestId;
saveRequestObject.requeststatusid = 1;
saveRequestObject.requeststatuslabel = StateEnum.open.label;
setOpenModal(true);
};

Expand Down Expand Up @@ -292,14 +292,14 @@ const BottomButtonGroup = React.memo(
if (currentSelectedStatus) {
switch (currentSelectedStatus) {
case StateEnum.closed.name:
saveRequestObject.requeststatusid = StateEnum.closed.id;
saveRequestObject.requeststatuslabel = StateEnum.closed.label;
saveRequestObject.closedate = closingDate;
saveRequestObject.closereasonid = closingReasonId;
break;

case StateEnum.callforrecords.name:
saveRequestObject.paymentExpiryDate = ""
saveRequestObject.requeststatusid = StateEnum.callforrecords.id;
saveRequestObject.requeststatuslabel = StateEnum.callforrecords.label;
if (
!("cfrDueDate" in saveRequestObject) ||
saveRequestObject.cfrDueDate === ""
Expand Down Expand Up @@ -354,7 +354,7 @@ const BottomButtonGroup = React.memo(
const status = Object.values(StateEnum).find(
(statusValue) => statusValue.name === currentSelectedStatus
);
saveRequestObject.requeststatusid = status.id;
saveRequestObject.requeststatuslabel = status.label;
if (currentSelectedStatus === StateEnum.onhold.name && !saveRequestObject.paymentExpiryDate) {
saveRequestObject.paymentExpiryDate = dueDateCalculation(new Date(), PAYMENT_EXPIRY_DAYS);
}
Expand Down
4 changes: 2 additions & 2 deletions forms-flow-web/src/components/FOI/FOIRequest/FOIRequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -301,8 +301,8 @@ const FOIRequest = React.memo(({ userDetail }) => {
const assignedTo = getAssignedTo(requestDetails);
setAssignedToValue(assignedTo);
if (Object.entries(requestDetails)?.length !== 0) {
let requestStateFromId = findRequestState(requestDetails.requeststatusid)
? findRequestState(requestDetails.requeststatusid)
let requestStateFromId = findRequestState(requestDetails.requeststatuslabel)
? findRequestState(requestDetails.requeststatuslabel)
: StateEnum.unopened.name;
setRequestState(requestStateFromId);
settabStatus(requestStateFromId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,34 +186,34 @@ const BottomButtonGroup = React.memo(
const [successCount, setSuccessCount] = useState(0);
const [fileCount, setFileCount] = useState(0);
const [documents, setDocuments] = useState([]);

const saveStatusId = () => {
if (currentSelectedStatus) {
switch (currentSelectedStatus.toLowerCase()) {
case StateEnum.review.name.toLowerCase():
saveMinistryRequestObject.requeststatusid = StateEnum.review.id;
saveMinistryRequestObject.requeststatuslabel = StateEnum.review.label;
break;
case StateEnum.feeassessed.name.toLowerCase():
saveMinistryRequestObject.requeststatusid =
StateEnum.feeassessed.id;
saveMinistryRequestObject.requeststatuslabel =
StateEnum.feeassessed.label;
break;
case StateEnum.deduplication.name.toLowerCase():
saveMinistryRequestObject.requeststatusid =
StateEnum.deduplication.id;
saveMinistryRequestObject.requeststatuslabel =
StateEnum.deduplication.label;
break;
case StateEnum.harms.name.toLowerCase():
saveMinistryRequestObject.requeststatusid = StateEnum.harms.id;
saveMinistryRequestObject.requeststatuslabel = StateEnum.harms.label;
break;
case StateEnum.signoff.name.toLowerCase():
saveMinistryRequestObject.requeststatusid = StateEnum.signoff.id;
saveMinistryRequestObject.requeststatuslabel = StateEnum.signoff.label;
break;
case StateEnum.response.name.toLowerCase():
saveMinistryRequestObject.ministrysignoffapproval = ministryApprovalState;
saveMinistryRequestObject.requeststatusid = StateEnum.response.id;
saveMinistryRequestObject.requeststatuslabel = StateEnum.response.label;
break;
case StateEnum.callforrecords.name.toLowerCase():
saveMinistryRequestObject.requeststatusid =
StateEnum.callforrecords.id;
saveMinistryRequestObject.requeststatuslabel =
StateEnum.callforrecords.label;
break;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -436,10 +436,10 @@ const MinistryReview = React.memo(({ userDetail }) => {
break;
case StateEnum.tagging.name:
foitabheaderBG = "foitabheadercollection foitabheaderTaggingBG";
break;
break;
case StateEnum.readytoscan.name:
foitabheaderBG = "foitabheadercollection foitabheaderReadytoScanBG";
break;
break;
default:
foitabheaderBG = "foitabheadercollection foitabheaderdefaultBG";
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ const RequestDetails = React.memo(
receivedDate: !!receivedDate ? formatDate(receivedDate): "",
requestStartDate: startDate ? formatDate(startDate): "",
dueDate: validateFields(requestDetails, FOI_COMPONENT_CONSTANTS.DUE_DATE, startDate ? formatDate(startDate): ""),
requestState: findRequestState(requestDetails?.requeststatusid)
requestState: findRequestState(requestDetails?.requeststatuslabel)
}
//event bubble up - sets the initial value to validate the required fields
handleRequestDetailsInitialValue(requestDetailsObject);
Expand Down
6 changes: 3 additions & 3 deletions forms-flow-web/src/components/FOI/FOIRequest/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -359,10 +359,10 @@ export const alertUser = (e) => {
e.returnValue = "";
};

export const findRequestState = (requestStatusId) => {
if (requestStatusId != undefined) {
export const findRequestState = (requestStatusLabel) => {
if (requestStatusLabel != undefined) {
let stateArray = Object.entries(StateEnum).find(
(value) => value[1].id === requestStatusId
(value) => value[1].label === requestStatusLabel
);
return stateArray[1].name;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ const NotificationPopup = ({notifications, isMinistry, ministryCode}) => {
},[notifications]);

const tabTitle = () =>{
let myRequestList = notifications?.filter(x => (x.notificationusertype === 'Assignee' || x.notificationusertype === 'Comment User'));
let myRequestList = notifications?.filter(x => (x.notificationusertype === 'Assignee' || x.notificationusertype === 'Comment User' || x.notificationusertype === 'Triggered User'));
let watchingRequestList = notifications?.filter(x => x.notificationusertype === 'Watcher');
setMyRequestTitle(myRequestList?.length > 0 ? "My Notifications ("+myRequestList.length+")": "My Notifications");
setWatchingRequestTitle(watchingRequestList?.length > 0 ? "Watching Notifications ("+watchingRequestList.length+")": "Watching Notifications");
}

const assigmentNotifications = notifications?.map((notification,index) =>
{return (notification.notificationusertype === 'Assignee' || notification.notificationusertype === "Comment User") &&
{return (notification.notificationusertype === 'Assignee' || notification.notificationusertype === "Comment User" || notification.notificationusertype === "Triggered User") &&
<NotificationList key= {index} notification={notification} isMinistry ={isMinistry}
ministryCode ={ministryCode}></NotificationList>
}
Expand All @@ -45,7 +45,7 @@ const NotificationPopup = ({notifications, isMinistry, ministryCode}) => {

const checkIfNotificationExists = (type) => {
if(type ==='assignee' && notifications.find(notification =>
(notification.notificationusertype === 'Assignee'|| notification.notificationusertype === "Comment User"))){
(notification.notificationusertype === 'Assignee'|| notification.notificationusertype === "Comment User" || notification.notificationusertype === "Triggered User"))){
return true;
}
if(type ==='watcher' && notifications.find(notification =>
Expand Down
Loading
Loading