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

Test-Rook <> Test-Marshal Merge August 12 2024 #5357

Merged
merged 138 commits into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
138 commits
Select commit Hold shift + click to select a range
8863c8b
CFD personal tags
richard-aot Apr 17, 2024
79f9939
list tags in record list
richard-aot Apr 18, 2024
d6a2bcf
Add TBD
richard-aot Apr 18, 2024
e737849
tag filter for records list
richard-aot Apr 19, 2024
935a093
personal tagging for ministry
richard-aot Apr 19, 2024
ba9bc16
1. Update text
richard-aot Apr 23, 2024
fa84ad4
1. clear person, vol, filetype, trackingid, personaltag
richard-aot Apr 24, 2024
2441a57
add missing scenario 18, 19, 20
richard-aot Apr 24, 2024
90469a1
add tag edit to dropdown menu
richard-aot Apr 25, 2024
50b3313
1. seperate cfd tag edit modal for iao and ministry
richard-aot May 6, 2024
5289636
bug fix
richard-aot May 7, 2024
52b8f16
Merge branch 'dev-rook' of github.com:bcgov/foi-flow into dev-rook-RQ…
richard-aot May 7, 2024
bd82002
fix tag chip sort order
richard-aot May 7, 2024
28e070e
Merge pull request #5215 from bcgov/dev-rook
nkan-aot2 May 13, 2024
e2f76cb
update api for docreviewer cfd personal
richard-aot May 15, 2024
647f27d
fix migration conflicts
richard-aot May 15, 2024
b33cc02
Merge pull request #5227 from bcgov/dev-rook-RQ-3044
richard-aot May 17, 2024
6192a08
handle the case that type is an empty string
richard-aot May 17, 2024
3b04a38
bug fix missing comparing trackingid
richard-aot May 21, 2024
0bb689d
bug fix, for ministry to edit division for cfd personal record
richard-aot May 22, 2024
27d26e3
Merge pull request #5232 from bcgov/dev-rook-RQ-3044
richard-aot May 22, 2024
bcf1f61
estimated page count for records
nkan-aot2 May 29, 2024
89edb03
Merge pull request #5235 from bcgov/dev-NK-FOIMOD-3079
nkan-aot2 May 29, 2024
c36e097
Merge pull request #5238 from bcgov/dev
richard-aot May 30, 2024
d6f21db
hide estimate page count if not mcf personal
nkan-aot2 May 30, 2024
ca96886
Merge pull request #5239 from bcgov/dev-rook-NK-FOIMOD-3079
nkan-aot2 May 30, 2024
707c8b5
fix migration script error
nkan-aot2 May 30, 2024
e969368
Merge pull request #5240 from bcgov/dev-rook-NK-FOIMOD-3079
nkan-aot2 May 30, 2024
628c4c7
Migration script update for new template document type
aparna-aot May 31, 2024
612b387
Merge pull request #5242 from bcgov/dev-rook-AS-FOIMOD-2980
aparna-aot May 31, 2024
daeb877
fixed selecting distinct queries based on id
JieunSon96 Jun 4, 2024
8664d63
hide "Update Divisions" button for iao - cfd personal
richard-aot Jun 4, 2024
a574e69
Merge branch 'dev-rook' of github.com:bcgov/foi-flow into dev-rook-RQ…
richard-aot Jun 4, 2024
8af383b
removed count func and replaced with exists to handle null values
JieunSon96 Jun 5, 2024
b34d183
Merge pull request #5249 from bcgov/foimod-3104-test
JieunSon96 Jun 5, 2024
73d8b25
Merge pull request #5255 from bcgov/foimod-3104-test
JieunSon96 Jun 10, 2024
1afd61d
bug fix: wrong page count
richard-aot Jun 10, 2024
6584969
bug fix: axis sync set mod page count to 0
richard-aot Jun 11, 2024
70a77e3
bug fix: axis sync set recordspagecount to 0
richard-aot Jun 11, 2024
76d6d94
Merge pull request #5258 from bcgov/test-RQ-FOIMOD-3204
richard-aot Jun 11, 2024
75503d4
Merge pull request #5261 from bcgov/main
richard-aot Jun 12, 2024
6670c49
fix redaction summary not showing up in request details
nkan-aot2 Jun 13, 2024
de89e1e
Merge pull request #5269 from bcgov/dev-NK-FOIMOD-3249
nkan-aot2 Jun 17, 2024
766f7a0
Merge pull request #5273 from bcgov/dev-rook-RQ-3080
richard-aot Jun 17, 2024
c525cf7
Merge pull request #5275 from bcgov/dev-rook
richard-aot Jun 17, 2024
9be1a11
Merge pull request #5276 from bcgov/dev
nkan-aot2 Jun 17, 2024
47b7407
bug fix: could not display personal tags for records uploaded by mini…
richard-aot Jun 19, 2024
23fb76b
bug fix: missed one condition
richard-aot Jun 19, 2024
aeedd7c
Merge pull request #5285 from bcgov/dev-rook-RQ-3080
richard-aot Jun 20, 2024
d559013
Merge pull request #5289 from bcgov/dev-rook
richard-aot Jun 20, 2024
c9cba48
fix recordspagecount and axislanpagecount not being copied over durin…
nkan-aot2 Jun 5, 2024
045d6a3
Merge pull request #5298 from bcgov/dev-NK-FOIMOD-3205
nkan-aot2 Jun 26, 2024
b5ffb39
Added F/E work and state for IAO users. WIP IAO User restrictions + M…
Aman-Hundal Jul 8, 2024
e5c4f00
Added migration script, and adjust FE code to follow new logic. WIP I…
Aman-Hundal Jul 9, 2024
8a5a087
Backend work completed to get lockrecords value from DB
Aman-Hundal Jul 9, 2024
669c6a0
adjusted section end point to consume lock records + adjusted FE init…
Aman-Hundal Jul 9, 2024
ecc18c4
Merge branch 'dev' of github.com:bcgov/foi-flow into dev-rook-RQ-sync…
richard-aot Jul 10, 2024
9483857
resolve migration conflict
richard-aot Jul 10, 2024
9d5c8d5
Merge pull request #5311 from bcgov/dev
aparna-aot Jul 10, 2024
c7743d5
Merge pull request #5312 from bcgov/dev-rook-RQ-sync-dev
richard-aot Jul 10, 2024
ea57ee3
FE and backend logic for state changing for IAO users connected. WIP …
Aman-Hundal Jul 11, 2024
09ff70a
Merge pull request #5315 from bcgov/dev-rook
richard-aot Jul 11, 2024
94a9b01
IAO Workflow for state lock records completed. WIP manual lock record…
Aman-Hundal Jul 11, 2024
25ef0c8
renamed lockrecords to userlockedrecords for DB/models
Aman-Hundal Jul 11, 2024
793f77c
controlling of lock records for IAO user completed. WIP ministry user
Aman-Hundal Jul 11, 2024
0e5d5ae
removed comment
Aman-Hundal Jul 11, 2024
475d11b
addjuste logic which resets requestobject user locked status to null
Aman-Hundal Jul 11, 2024
136fc8d
Ministry User work completed. WIP locking of features for IAO + Minis…
Aman-Hundal Jul 12, 2024
e1eea13
Ticket Completed. WIP code clean, and finalizing styling
Aman-Hundal Jul 12, 2024
f23d311
adjusted styling + logic for manual records log button. WIP styling
Aman-Hundal Jul 12, 2024
300faf7
renamed column for manual records lock in BE + adjusted styling for m…
Aman-Hundal Jul 12, 2024
97a96df
styling of records header grid
Aman-Hundal Jul 13, 2024
1c74912
Fix observation #2
richard-aot Jul 16, 2024
bfaf7b1
fix observation 3
richard-aot Jul 16, 2024
c378a34
Merge pull request #5313 from bcgov/dev-AH-FOIMOD-2880
Aman-Hundal Jul 16, 2024
183a3a6
Added logic to use error message from computing service response retr…
Aman-Hundal Jul 16, 2024
a1cd3c6
Added error handling messge for attachment as well
Aman-Hundal Jul 16, 2024
04a8ccf
small bug fix for string interpolation in python BE
Aman-Hundal Jul 16, 2024
6c0cb0d
Merge pull request #5320 from bcgov/dev-AH-FOIMOD-3232
Aman-Hundal Jul 16, 2024
200f043
1. fixed losing personal tags while replacing a reocrd
richard-aot Jul 17, 2024
cd27842
Revert "Ticket 2880 - Lock Records"
Aman-Hundal Jul 17, 2024
84dbce3
Merge pull request #5323 from bcgov/revert-5313-dev-AH-FOIMOD-2880
Aman-Hundal Jul 17, 2024
c9b01c6
Revert "Revert "Ticket 2880 - Lock Records""
Aman-Hundal Jul 17, 2024
9a8c5d6
Merge pull request #5324 from bcgov/revert-5323-revert-5313-dev-AH-FO…
Aman-Hundal Jul 17, 2024
474bbd8
Fix observations on FOIMOD-2976
richard-aot Jul 19, 2024
23edb14
Bug fix - FOIMOD-2976
richard-aot Jul 19, 2024
034f1f6
Fix observations for FOIMOD-2976
richard-aot Jul 19, 2024
bd11ea4
Merge pull request #5326 from bcgov/dev-rook-RQ-FOIMOD-2975-bugfix
richard-aot Jul 19, 2024
2dc36a4
Bug fix for new observation in FOIMOD-2976
richard-aot Jul 19, 2024
0d4c9c7
Merge pull request #5327 from bcgov/dev-rook-RQ-FOIMOD-2975-bugfix
richard-aot Jul 19, 2024
b97127a
locked upload files for ministry and scanning if in locked states + a…
Aman-Hundal Jul 19, 2024
40e7a3a
Merge pull request #5328 from bcgov/dev-AH-FOIMOD-2880
Aman-Hundal Jul 19, 2024
5058714
fix observation #7 in FOIMOD-3300
richard-aot Jul 22, 2024
9eb9c1d
Merge pull request #5329 from bcgov/dev-rook-RQ-FOIMOD-2975-bugfix
richard-aot Jul 22, 2024
dee7453
Merge pull request #5331 from bcgov/dev
Aman-Hundal Jul 22, 2024
fcdbc5a
Fix observation #1 for FOIMOD-#3300
richard-aot Jul 22, 2024
7bc5442
fix observatoin #1 FOIMOD-3300
richard-aot Jul 22, 2024
90aaabc
Fixes for FOIMOD-3079- CFD Requests - Estimated Page Counts
aparna-aot Jul 22, 2024
6e38c18
Merge pull request #5332 from bcgov/test-rook-AS-FOIMOD-3300
aparna-aot Jul 22, 2024
abe74c7
Merge pull request #5333 from bcgov/dev-rook-RQ-FOIMOD-2975-bugfix
richard-aot Jul 22, 2024
51d4471
adjusted styling/disabling of Delete ability for records to fix obser…
Aman-Hundal Jul 23, 2024
65b9032
Merge pull request #5334 from bcgov/dev-AH-FOIMOD-2880
Aman-Hundal Jul 23, 2024
4980912
Merge pull request #5335 from bcgov/dev
Aman-Hundal Jul 23, 2024
104803b
adjusted code to fix observation 2 where userlockedrecordstatis value…
Aman-Hundal Jul 23, 2024
c0bf149
Adjusted foiminsitry request version update BE to records userrecordl…
Aman-Hundal Jul 23, 2024
d0b6f91
Merge pull request #5336 from bcgov/dev-AH-FOIMOD-2880
Aman-Hundal Jul 24, 2024
8c967e8
Merge pull request #5339 from bcgov/dev
Aman-Hundal Jul 24, 2024
643e086
Merge branch 'main' of github.com:bcgov/foi-flow into dev-rook-RQ-FOI…
richard-aot Jul 25, 2024
a3c04bc
fix migration conflicts
richard-aot Jul 25, 2024
e87aaea
resolve merge conflicts
richard-aot Jul 25, 2024
701653d
Merge branch 'test-rook' of github.com:bcgov/foi-flow into dev-rook-R…
richard-aot Jul 25, 2024
58e48e0
Merge pull request #5340 from bcgov/dev-rook-RQ-FOIMOD-2975-bugfix
richard-aot Jul 25, 2024
740aa3f
Debug code for RRT notification check
aparna-aot Jul 26, 2024
4c7daa3
Merge branch 'test-rook' into test-rook-AS-FOIMOD-3300
aparna-aot Jul 26, 2024
47ea143
Merge pull request #5341 from bcgov/test-rook-AS-FOIMOD-3300
aparna-aot Jul 26, 2024
34b70b2
Adjusted request service builder for ministry changes to fix observat…
Aman-Hundal Jul 29, 2024
75ae24a
Merge pull request #5342 from bcgov/dev-AH-FOIMOD-2880
Aman-Hundal Jul 29, 2024
0e176aa
Fix observations in FOIMOD-3300
richard-aot Jul 29, 2024
1057331
Merge branch 'dev' of github.com:bcgov/foi-flow into dev-rook-RQ-FOIM…
richard-aot Jul 29, 2024
294d8bc
Merge pull request #5345 from bcgov/dev-rook-RQ-FOIMOD-2975-bugfix
richard-aot Jul 29, 2024
78a45fb
Enable editing personal tag for ministry users FOIMOD-2976
richard-aot Jul 30, 2024
d7e6187
Merge pull request #5346 from bcgov/dev-rook-RQ-FOIMOD-2975-bugfix
richard-aot Jul 30, 2024
b416d0b
Fix observation 7 in FOIMOD-2976
richard-aot Aug 2, 2024
15827ac
set division as a required value for observation #6 in FOIMOD-2976
richard-aot Aug 2, 2024
731b8f6
Merge pull request #5348 from bcgov/test-rook-RQ-FOIMOD-3300
richard-aot Aug 2, 2024
e8e6a20
fix migrations for unlock record release
richard-aot Aug 7, 2024
54e6aa0
Fix observation 6 in FOIMOD-2976
richard-aot Aug 7, 2024
140d144
fix observation 8 in FOIMOD-2976
richard-aot Aug 7, 2024
8bf8240
Bug fix on observation 6 in FOIMOD-2976
richard-aot Aug 7, 2024
9d5af82
Merge pull request #5352 from bcgov/test-rook-RQ-FOIMOD-3300
richard-aot Aug 7, 2024
c275fce
merged test-rook into test-marshal
Aman-Hundal Aug 8, 2024
5042421
Fix observation 16 on FOIMOD-3300
richard-aot Aug 8, 2024
6ee19f3
fix sonar warning
richard-aot Aug 8, 2024
8b9e3da
Merge pull request #5353 from bcgov/test-rook-RQ-FOIMOD-3300
richard-aot Aug 8, 2024
b736a08
disable drag and drop for observation #28 in FOIMOD-3300 (observation…
richard-aot Aug 9, 2024
826abba
Adjusted 2 head / migration conflict by adjusting migration files and…
Aman-Hundal Aug 9, 2024
85abaff
Merge pull request #5354 from bcgov/test-rook-RQ-FOIMOD-3300
richard-aot Aug 9, 2024
927f910
Merge branch 'test-rook' of https://github.com/bcgov/foi-flow into te…
Aman-Hundal Aug 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 @@ -196,7 +196,7 @@ private DataTable GetAxisRequestData(string request)
onbehalf.vcLastName as onbehalfLastName,
onbehalf.vcMiddleName as onbehalfMiddleName,
(SELECT terminology.vcTerminology from tblTerminologyLookup terminology WHERE terminology.iLabelID = requestTypes.iLabelID and terminology.tiLocaleID = 1) as requestType,
sum(distinct case when requests.IREQUESTID = reviewlog.IREQUESTID and reviewlog.IDOCID = documents.IDOCID then documents.SIPAGECOUNT
sum(case when requests.IREQUESTID = reviewlog.IREQUESTID and reviewlog.IDOCID = documents.IDOCID then documents.SIPAGECOUNT
when requests.IREQUESTID = redaction.IREQUESTID and redaction.IDOCID = ldocuments.IDOCID then ldocuments.SIPAGECOUNT
else 0 end) as requestPageCount,
(case when requestfields.CustomField91 > 0 then requestfields.CustomField91 else 0 end ) as lanPageCount,
Expand Down Expand Up @@ -353,7 +353,7 @@ private DataTable GetAxisRequestsPageCount(string[] arrayOfRequestId)
ConnectionString = SettingsManager.ConnectionString;
var inClauseValues = RequestsHelper.GetInClause(arrayOfRequestId);

string query = $@"Select vcVisibleRequestID as axisRequestId, sum(distinct case when requests.IREQUESTID = reviewlog.IREQUESTID and reviewlog.IDOCID = documents.IDOCID then documents.SIPAGECOUNT
string query = $@"Select vcVisibleRequestID as axisRequestId, sum(case when requests.IREQUESTID = reviewlog.IREQUESTID and reviewlog.IDOCID = documents.IDOCID then documents.SIPAGECOUNT
when requests.IREQUESTID = redaction.IREQUESTID and redaction.IDOCID = ldocuments.IDOCID then ldocuments.SIPAGECOUNT
else 0 end) as requestPageCount,
(case when requestfields.CustomField91 > 0 then requestfields.CustomField91 else 0 end ) as lanPageCount
Expand Down Expand Up @@ -394,7 +394,7 @@ private DataTable GetAxisRequestsPageCount()
{
ConnectionString = SettingsManager.ConnectionString;

string query = @"Select vcVisibleRequestID as axisRequestId, sum(distinct case when requests.IREQUESTID = reviewlog.IREQUESTID and reviewlog.IDOCID = documents.IDOCID then documents.SIPAGECOUNT
string query = @"Select vcVisibleRequestID as axisRequestId, sum(case when requests.IREQUESTID = reviewlog.IREQUESTID and reviewlog.IDOCID = documents.IDOCID then documents.SIPAGECOUNT
when requests.IREQUESTID = redaction.IREQUESTID and redaction.IDOCID = ldocuments.IDOCID then ldocuments.SIPAGECOUNT
else 0 end) as requestPageCount,
(case when requestfields.CustomField91 > 0 then requestfields.CustomField91 else 0 end ) as lanPageCount
Expand Down
2 changes: 1 addition & 1 deletion forms-flow-web/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ ARG REACT_APP_RECORD_DOWNLOAD_LIMIT
ARG REACT_APP_RECORD_DOWNLOAD_SIZE_LIMIT

ENV NODE_ENV ${NODE_ENV}
ENV GENERATE_SOURCEMAP false
ENV GENERATE_SOURCEMAP ${GENERATE_SOURCEMAP}
ENV REACT_APP_API_SERVER_URL ${REACT_APP_API_SERVER_URL}
ENV REACT_APP_API_PROJECT_URL ${REACT_APP_API_PROJECT_URL}
ENV REACT_APP_KEYCLOAK_CLIENT ${REACT_APP_KEYCLOAK_CLIENT}
Expand Down
2 changes: 1 addition & 1 deletion forms-flow-web/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ services:
dockerfile: Dockerfile
args:
- NODE_ENV=${NODE_ENV:-development}
- GENERATE_SOURCEMAP=false
- GENERATE_SOURCEMAP=${GENERATE_SOURCEMAP}
- REACT_APP_CLIENT_ROLE=${CLIENT_ROLE:-formsflow-client}
- REACT_APP_STAFF_REVIEWER_ROLE=${REVIEWER_ROLE:-formsflow-reviewer}
- REACT_APP_STAFF_DESIGNER_ROLE=${DESIGNER_ROLE:-formsflow-designer}
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 @@ -44,6 +44,9 @@ const FOI_ACTION_CONSTANTS = {
FOI_MINISTRY_DIVISIONALSTAGES: "FOI_MINISTRY_DIVISIONALSTAGES",
FOI_PERSONAL_DIVISIONS_SECTIONS: "FOI_PERSONAL_DIVISIONS_SECTIONS",
FOI_PERSONAL_SECTIONS: "FOI_PERSONAL_SECTIONS",
FOI_PERSONAL_PEOPLE: "FOI_PERSONAL_PEOPLE",
FOI_PERSONAL_FILETYPES: "FOI_PERSONAL_FILETYPES",
FOI_PERSONAL_VOLUMES: "FOI_PERSONAL_VOLUMES",

FOI_WATCHER_LIST: "FOI_WATCHER_LIST",

Expand Down
18 changes: 18 additions & 0 deletions forms-flow-web/src/actions/FOI/foiRequestActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,24 @@ export const setFOIPersonalSections = (data) => dispatch => {
payload:data
})
}
export const setFOIPersonalPeople = (data) => dispatch => {
dispatch({
type:FOI_ACTION_CONSTANTS.FOI_PERSONAL_PEOPLE,
payload:data
})
}
export const setFOIPersonalFiletypes = (data) => dispatch => {
dispatch({
type:FOI_ACTION_CONSTANTS.FOI_PERSONAL_FILETYPES,
payload:data
})
}
export const setFOIPersonalVolumes = (data) => dispatch => {
dispatch({
type:FOI_ACTION_CONSTANTS.FOI_PERSONAL_VOLUMES,
payload:data
})
}
export const setFOIWatcherList = (data) => (dispatch) => {
dispatch({
type: FOI_ACTION_CONSTANTS.FOI_WATCHER_LIST,
Expand Down
4 changes: 4 additions & 0 deletions forms-flow-web/src/apiManager/endpoints/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ const API = {
FOI_PERSONAL_DIVISIONS_SECTIONS: `${FOI_BASE_API_URL}/api/foiflow/divisions/<bcgovcode>/true/divisionsandsections`,
FOI_PERSONAL_SECTIONS: `${FOI_BASE_API_URL}/api/foiflow/divisions/<bcgovcode>/true/sections`,
FOI_PERSONAL_DIVISIONS: `${FOI_BASE_API_URL}/api/foiflow/divisions/<bcgovcode>/true/divisions`,
FOI_PERSONAL_PEOPLE: `${FOI_BASE_API_URL}/api/foiflow/divisions/<bcgovcode>/true/people`,
FOI_PERSONAL_FILETYPES: `${FOI_BASE_API_URL}/api/foiflow/divisions/<bcgovcode>/true/filetypes`,
FOI_PERSONAL_VOLUMES: `${FOI_BASE_API_URL}/api/foiflow/divisions/<bcgovcode>/true/volumes`,
FOI_POST_RAW_REQUEST_WATCHERS: `${FOI_BASE_API_URL}/api/foiwatcher/rawrequest`,
FOI_GET_RAW_REQUEST_WATCHERS: `${FOI_BASE_API_URL}/api/foiwatcher/rawrequest/<requestid>`,
FOI_POST_MINISTRY_REQUEST_WATCHERS: `${FOI_BASE_API_URL}/api/foiwatcher/ministryrequest`,
Expand Down Expand Up @@ -115,6 +118,7 @@ const API = {
FOI_REPLACE_RECORDS: `${FOI_BASE_API_URL}/api/foirecord/<requestid>/ministryrequest/<ministryrequestid>/record/<recordid>/replace`,
FOI_POST_RECORDS: `${FOI_BASE_API_URL}/api/foirecord/<requestid>/ministryrequest/<ministryrequestid>`,
FOI_UPDATE_RECORDS: `${FOI_BASE_API_URL}/api/foirecord/<requestid>/ministryrequest/<ministryrequestid>/update`,
FOI_UPDATE_PERSONAL_ATTRIBUTES: `${FOI_BASE_API_URL}/api/foirecord/<requestid>/ministryrequest/<ministryrequestid>/updatepersonalattributes`,
DOC_REVIEWER_DELETE_RECORDS: `${DOC_REVIEWER_BASE_API_URL}/api/document/delete`,
DOC_REVIEWER_REDACTED_SECTIONS: `${DOC_REVIEWER_BASE_API_URL}/api/redactedsections/ministryrequest/<ministryrequestid>`,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ import {
setFOIReceivedModeList,
setFOIMinistryDivisionalStages,
setFOIPersonalDivisionsAndSections,
setFOIPersonalPeople,
setFOIPersonalFiletypes,
setFOIPersonalVolumes,
setFOIPersonalSections,
setClosingReasons,
setFOISubjectCodeList,
Expand Down Expand Up @@ -418,6 +421,93 @@ import {
}
};

export const fetchFOIPersonalPeople = (bcgovcode) => {
switch(bcgovcode) {
case "MCF":
const apiUrlMCF = replaceUrl(API.FOI_PERSONAL_PEOPLE, "<bcgovcode>", bcgovcode);
return (dispatch) => {
httpGETRequest(apiUrlMCF, {}, UserService.getToken())
.then((res) => {
if (res.data) {
const foiPersonalSections = res.data;
dispatch(setFOIPersonalPeople({}));
dispatch(setFOIPersonalPeople(foiPersonalSections));
dispatch(setFOILoader(false));
} else {
console.log(`Error while fetching (${bcgovcode}) FOI records people`, res);
dispatch(serviceActionError(res));
dispatch(setFOILoader(false));
}
})
.catch((error) => {
console.log(`Error while fetching (${bcgovcode}) FOI records people`, error);
dispatch(serviceActionError(error));
dispatch(setFOILoader(false));
});
};
default:
break;
}
};

export const fetchFOIPersonalFiletypes = (bcgovcode) => {
switch(bcgovcode) {
case "MCF":
const apiUrlMCF = replaceUrl(API.FOI_PERSONAL_FILETYPES, "<bcgovcode>", bcgovcode);
return (dispatch) => {
httpGETRequest(apiUrlMCF, {}, UserService.getToken())
.then((res) => {
if (res.data) {
const foiPersonalSections = res.data;
dispatch(setFOIPersonalFiletypes({}));
dispatch(setFOIPersonalFiletypes(foiPersonalSections));
dispatch(setFOILoader(false));
} else {
console.log(`Error while fetching (${bcgovcode}) FOI records people`, res);
dispatch(serviceActionError(res));
dispatch(setFOILoader(false));
}
})
.catch((error) => {
console.log(`Error while fetching (${bcgovcode}) FOI records people`, error);
dispatch(serviceActionError(error));
dispatch(setFOILoader(false));
});
};
default:
break;
}
};

export const fetchFOIPersonalVolumes = (bcgovcode) => {
switch(bcgovcode) {
case "MCF":
const apiUrlMCF = replaceUrl(API.FOI_PERSONAL_VOLUMES, "<bcgovcode>", bcgovcode);
return (dispatch) => {
httpGETRequest(apiUrlMCF, {}, UserService.getToken())
.then((res) => {
if (res.data) {
const foiPersonalSections = res.data;
dispatch(setFOIPersonalVolumes({}));
dispatch(setFOIPersonalVolumes(foiPersonalSections));
dispatch(setFOILoader(false));
} else {
console.log(`Error while fetching (${bcgovcode}) FOI records people`, res);
dispatch(serviceActionError(res));
dispatch(setFOILoader(false));
}
})
.catch((error) => {
console.log(`Error while fetching (${bcgovcode}) FOI records people`, error);
dispatch(serviceActionError(error));
dispatch(setFOILoader(false));
});
};
default:
break;
}
};

export const fetchFOIPersonalDivisions = (bcgovcode) => {
const apiUrl = replaceUrl(API.FOI_PERSONAL_DIVISIONS, "<bcgovcode>", bcgovcode);
return (dispatch) => {
Expand Down
39 changes: 39 additions & 0 deletions forms-flow-web/src/apiManager/services/FOI/foiRecordServices.js
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,21 @@ export const updateFOIRecords = (requestId, ministryId, data, ...rest) => {
};
};

export const editPersonalAttributes = (requestId, ministryId, data, ...rest) => {
if (!ministryId) {
return () => {};
}
const done = fnDone(rest);
let apiUrl = replaceUrl(
replaceUrl(API.FOI_UPDATE_PERSONAL_ATTRIBUTES, "<ministryrequestid>", ministryId),
"<requestid>",
requestId
);
return (dispatch) => {
postRecord(dispatch, apiUrl, data, "Error in updating records", rest);
};
};

export const deleteReviewerRecords = (filepaths, ...rest) => {
const done = fnDone(rest);
let apiUrl = API.DOC_REVIEWER_DELETE_RECORDS;
Expand Down Expand Up @@ -690,4 +705,28 @@ export const fetchPDFStitchedRecordForConsults = (
done(error);
});
};
}

export const updateUserLockedRecords = (data, requestId, ministryId, ...rest) => {
const done = fnDone(rest);
let apiUrl= replaceUrl(replaceUrl(
API.FOI_REQUEST_SECTION_API,
"<ministryid>",
ministryId),"<requestid>",requestId
);
return (dispatch) => {
httpPOSTRequest(`${apiUrl}/userrecordslockstatus`, data)
.then((res) => {
if (res.data) {
done(null, res.data);
} else {
dispatch(serviceActionError(res));
throw new Error(`Error while updating records lock status for the (request# ${requestId}, ministry# ${ministryId})`);
}
})
.catch((error) => {
dispatch(serviceActionError(error));
done(error);
});
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ const BottomButtonGroup = React.memo(
axisMessage,
attachmentsArray,
oipcData,
validLockRecordsState,
}) => {
/**
* Bottom Button Group of Review request Page
Expand Down Expand Up @@ -120,6 +121,11 @@ const BottomButtonGroup = React.memo(
setIsAddRequest(false);
}

//Logic to reset user lock records status to null (and have FE useEffect in FOIRequest.js/MinistryView.js logic takeover) if request is in unlocked request states
if (!validLockRecordsState(currentSelectedStatus)) {
saveRequestObject.userrecordslockstatus = null;
}

//add oipc Data to save request object and sync/validate isoipcreview attribute
if (requestState.toLowerCase() !== StateEnum.intakeinprogress.name.toLowerCase() && requestState.toLowerCase() !== StateEnum.unopened.name.toLowerCase()) {
saveRequestObject.oipcdetails = oipcData ? oipcData : [];
Expand Down
47 changes: 44 additions & 3 deletions forms-flow-web/src/components/FOI/FOIRequest/FOIRequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ import {
fetchFOIMinistryAssignedToList,
fetchFOISubjectCodeList,
fetchFOIPersonalDivisionsAndSections,
fetchFOIPersonalPeople,
fetchFOIPersonalFiletypes,
fetchFOIPersonalVolumes,
fetchOIPCOutcomes,
fetchOIPCStatuses,
fetchOIPCReviewtypes,
Expand Down Expand Up @@ -273,7 +276,8 @@ const FOIRequest = React.memo(({ userDetail, openApplicantProfileModal }) => {
const [isMCFPersonal, setIsMCFPersonal] = useState(bcgovcode.replaceAll('"', '') == "MCF" && requestDetails.requestType == FOI_COMPONENT_CONSTANTS.REQUEST_TYPE_PERSONAL);
const {oipcData, addOIPC, removeOIPC, updateOIPC, isOIPCReview, setIsOIPCReview, removeAllOIPCs} = useOIPCHook();
const [oipcDataInitial, setOipcDataInitial] = useState(oipcData);

const [lockRecordsTab, setLockRecordsTab] = useState(false);

//Update disableInput when requestState changes
useEffect(() => {
setDisableInput(requestState?.toLowerCase() === StateEnum.closed.name.toLowerCase() && !isOIPCReview);
Expand Down Expand Up @@ -323,7 +327,7 @@ const FOIRequest = React.memo(({ userDetail, openApplicantProfileModal }) => {
dispatch(
fetchRedactedSections(ministryId, (_err, res) => {
if (!_err) {
setRedactedSections(res.sections);
setRedactedSections(res);
}
})
);
Expand All @@ -343,6 +347,20 @@ const FOIRequest = React.memo(({ userDetail, openApplicantProfileModal }) => {
if (bcgovcode) dispatch(fetchFOIMinistryAssignedToList(bcgovcode));
}, [requestId, ministryId, comment, attachments]);

const validLockRecordsState = (currentState=requestDetails.currentState) => {
return (
currentState === StateEnum.harms.name ||
currentState === StateEnum.onhold.name ||
currentState === StateEnum.recordsreadyforreview.name ||
currentState === StateEnum.review.name ||
currentState === StateEnum.consult.name ||
currentState === StateEnum.peerreview.name ||
currentState === StateEnum.signoff.name ||
currentState === StateEnum.response.name ||
currentState === StateEnum.closed.name
);
}

useEffect(() => {
const requestDetailsValue = requestDetails;
setSaveRequestObject(requestDetailsValue);
Expand All @@ -367,9 +385,16 @@ const FOIRequest = React.memo(({ userDetail, openApplicantProfileModal }) => {
setIsIAORestricted(isRequestRestricted(requestDetails, ministryId));
}

if(MinistryNeedsScanning.includes(bcgovcode.replaceAll('"', '')) && requestDetails.requestType == FOI_COMPONENT_CONSTANTS.REQUEST_TYPE_PERSONAL) {
if(
MinistryNeedsScanning.includes(bcgovcode.replaceAll('"', '')) &&
requestDetails.requestType ==
FOI_COMPONENT_CONSTANTS.REQUEST_TYPE_PERSONAL
) {
dispatch(fetchFOIPersonalDivisionsAndSections(bcgovcode.replaceAll('"', '')));
if(bcgovcode.replaceAll('"', '') == "MCF") {
dispatch(fetchFOIPersonalPeople(bcgovcode.replaceAll('"', '')));
dispatch(fetchFOIPersonalFiletypes(bcgovcode.replaceAll('"', '')));
dispatch(fetchFOIPersonalVolumes(bcgovcode.replaceAll('"', '')));
setIsMCFPersonal(true);
}
}
Expand All @@ -378,6 +403,16 @@ const FOIRequest = React.memo(({ userDetail, openApplicantProfileModal }) => {
} else {
setIsOIPCReview(false);
}

//Adjust lockRecords value based on requestState if there is no manual user lockedrecords value present in requestDetails from DB
const updateRecordsTabAccess = () => {
if(requestDetails.userrecordslockstatus === null) {
return validLockRecordsState(requestDetails.currentState);
} else {
return requestDetails.userrecordslockstatus;
}
}
setLockRecordsTab(updateRecordsTabAccess());
}, [requestDetails]);

//useEffect to manage isoipcreview attribute for requestdetails state
Expand Down Expand Up @@ -1397,6 +1432,7 @@ const FOIRequest = React.memo(({ userDetail, openApplicantProfileModal }) => {
axisMessage={axisMessage}
attachmentsArray={requestAttachments}
oipcData={oipcData}
validLockRecordsState={validLockRecordsState}
/>
</>
</ConditionalComponent>
Expand Down Expand Up @@ -1641,6 +1677,11 @@ const FOIRequest = React.memo(({ userDetail, openApplicantProfileModal }) => {
divisions={requestDetails.divisions}
recordsTabSelect={tabLinksStatuses.Records.active}
requestType={requestDetails?.requestType}
lockRecords={lockRecordsTab}
setLockRecordsTab={setLockRecordsTab}
validLockRecordsState={validLockRecordsState}
setSaveRequestObject={setSaveRequestObject}
handleSaveRequest={handleSaveRequest}
/>
</>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ const BottomButtonGroup = React.memo(
hasStatusRequestSaved,
attachmentsArray,
stateChanged,
validLockRecordsState,
}) => {
/**
* Bottom Button Group of Review request Page
Expand Down Expand Up @@ -109,6 +110,10 @@ const BottomButtonGroup = React.memo(
};

const saveMinistryRequest = async () => {
//Logic to reset user lock records status to null (and have FE useEffect in FOIRequest.js/MinistryView.js logic takeover) if request is in unlocked request states
if (!validLockRecordsState(currentSelectedStatus)) {
saveMinistryRequestObject.userrecordslockstatus = null;
}
dispatch(
saveMinistryRequestDetails(
{
Expand Down
Loading
Loading