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-marshal to Test #5502

Merged
merged 286 commits into from
Jan 6, 2025
Merged
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
286 commits
Select commit Hold shift + click to select a range
131fc2d
Remove console.log line
milosdes Jun 18, 2024
45295a1
Changes to list response.
Jun 18, 2024
a000dc5
Delete confirmation modal.
Jun 18, 2024
afa967a
Merge pull request #5282 from bcgov/dev-marshal-ST-3968
sumathi-thirumani Jun 18, 2024
c372e5f
Email checks to enable send + add applicant email as default first el…
Jun 19, 2024
46199b5
Changes to validations of correspondence
Jun 19, 2024
e766b47
Merge pull request #5284 from bcgov/dev-marshal-ST-3968
sumathi-thirumani Jun 19, 2024
ae65c1c
Merge pull request #5281 from bcgov/dev-marshal-MD-3968-templatelist
sumathi-thirumani Jun 19, 2024
2b1cf1f
Merge pull request #5286 from bcgov/dev-marshal
sumathi-thirumani Jun 19, 2024
06cfcfe
Formatting for add new button and layout for email button
milosdes Jun 19, 2024
1769ac6
add opic applicant consent extension html
Jun 19, 2024
e917608
add OIPC insert migration file
Jun 20, 2024
80f4986
Merge pull request #5287 from bcgov/dev-marshal-MD-3968-addnewbutton
sumathi-thirumani Jun 20, 2024
2ae5d59
Merge branch 'dev-marshal-ST-3968' of https://github.com/bcgov/foi-fl…
Jun 20, 2024
a7a03a2
Changes to include timestamp in templates.
Jun 20, 2024
b921d83
Merge pull request #5288 from bcgov/dev-marshal-ST-3968
sumathi-thirumani Jun 20, 2024
c56275d
Fix addCorrespondence button colors
milosdes Jun 20, 2024
04e9824
Merge pull request #5290 from bcgov/dev-marshal-MD-3968-addnewbutton
sumathi-thirumani Jun 20, 2024
a955de5
Merge branch 'dev-marshal-ST-3968' of https://github.com/bcgov/foi-fl…
JieunSon96 Jun 20, 2024
d3a54b8
Observational fixes.
Jun 21, 2024
e711e8d
Merge pull request #5291 from bcgov/dev-marshal-ST-3968
sumathi-thirumani Jun 21, 2024
84a59ef
Merge branch 'dev-marshal-ST-3968' of https://github.com/bcgov/foi-fl…
JieunSon96 Jun 21, 2024
b338acc
convert template to html
Jun 21, 2024
69c3185
add template name
Jun 21, 2024
7e58161
add migration file
Jun 21, 2024
c648864
fixed alembic revision issue
Jun 21, 2024
2070e92
Changes to include extension details.
Jun 24, 2024
6378262
Communication structure added
aparna-aot Jun 24, 2024
3dd4937
Changes to support image embedding.
Jun 24, 2024
eb2c7f5
Merge pull request #5295 from bcgov/dev-marshal-ST-3968
sumathi-thirumani Jun 24, 2024
1ad2b57
changed consent extension file
Jun 25, 2024
25eddf3
Merge branch 'dev-marshal-ST-3968' of https://github.com/bcgov/foi-fl…
Jun 25, 2024
272ec84
Merge branch 'dev-marshal-ST-3968' into origin/dev-marshal-SS-3968
Jun 25, 2024
19b454a
Test snippet to verify server for embedded image.
Jun 25, 2024
722b3b0
Merge pull request #5296 from bcgov/dev-marshal-ST-3968
sumathi-thirumani Jun 25, 2024
a9ec366
Create OperatingTeamEmails
milosdes Jun 25, 2024
5b9bb22
Refactor to send assignedGroupEmail from db to frontend
milosdes Jun 25, 2024
42bb649
Remove unused imports
milosdes Jun 25, 2024
c9e60a8
Changes to support embedded image.
Jun 26, 2024
5b0fa97
Merge pull request #5299 from bcgov/dev-marshal-ST-3968
sumathi-thirumani Jun 26, 2024
c8404d5
Refactor assignedGroupEmail to correspondencelog schema
milosdes Jun 26, 2024
dd92402
added functions to fetch template variables
JieunSon96 Jun 27, 2024
9807879
quick changes of the function
JieunSon96 Jun 27, 2024
4044dbe
remove unused revision file
JieunSon96 Jun 27, 2024
04e60a1
change down_revision to recent version
JieunSon96 Jun 27, 2024
8d04058
Merge pull request #5300 from bcgov/origin/dev-marshal-SS-3968
JieunSon96 Jun 27, 2024
3234a07
PB Extensions.
Jun 28, 2024
51c82ca
Merge branch 'dev-marshal' into dev-marshal-ST-3968
sumathi-thirumani Jun 28, 2024
d5bf18f
add fee estimate
JieunSon96 Jun 28, 2024
97f13fe
Merge pull request #5305 from bcgov/dev-marshal-ST-3968
milosdes Jun 28, 2024
108cf5d
Change down_revision version
milosdes Jun 28, 2024
f996a08
Merge branch 'dev-marshal' into dev-marshal-MD-3161
milosdes Jun 28, 2024
d6dea38
remove /env under gitignore
JieunSon96 Jun 28, 2024
f0af22c
Merge branch 'dev-marshal' into origin/dev-marshal-SS-3968
JieunSon96 Jun 28, 2024
e82ff81
fix undefined value error
JieunSon96 Jun 28, 2024
c7f4695
Merge pull request #5307 from bcgov/dev-marshal-3968-bug
sumathi-thirumani Jun 28, 2024
c16c43b
Merge pull request #5297 from bcgov/dev-marshal-MD-3161
milosdes Jul 3, 2024
3a6b0e5
CTE Secondary colors and other bug fix on state dropdown
aparna-aot Jul 5, 2024
d1146bf
Merge pull request #5308 from bcgov/dev-marshal-AS-communications
aparna-aot Jul 5, 2024
c0dc528
Toast added for response
aparna-aot Jul 8, 2024
54dc6e9
Merge pull request #5309 from bcgov/dev-marshal-AS-communications
aparna-aot Jul 8, 2024
a7df65c
Merge branch 'dev-marshal' into origin/dev-marshal-SS-3968
JieunSon96 Jul 9, 2024
e674c28
Create endpoint for deleting email response
milosdes Jul 9, 2024
e9f154f
Format template created_at values
milosdes Jul 9, 2024
0c38e72
Handle response_at time if present in request
milosdes Jul 9, 2024
3d2799e
Get responses by correspondenceid
milosdes Jul 9, 2024
839b602
Include response_at for getapplicantcorrespondences
milosdes Jul 9, 2024
6e8b44b
Update query to include only highest version of attachment separate q…
milosdes Jul 9, 2024
a517afc
Add FE endpoints for det and delete responses
milosdes Jul 9, 2024
e263fa3
Create edit and delete correspondence response services
milosdes Jul 9, 2024
285ee5e
Update attachment modal for changeresponsedate
milosdes Jul 9, 2024
33b924b
Update CommunicationStructure for change date and delete
milosdes Jul 9, 2024
ee7c18d
Update ContactApplicant for edit adn delete responses
milosdes Jul 9, 2024
c71db7d
Handle invalid dateString formats
milosdes Jul 10, 2024
bf66ccc
Merge branch 'dev-marshal' into dev-marshal-AS-FOIMOD-3132-milos
milosdes Jul 10, 2024
c490a46
Merge pull request #5310 from bcgov/dev-marshal-AS-FOIMOD-3132-milos
milosdes Jul 10, 2024
183b5fd
Fixes to existing issues
aparna-aot Jul 10, 2024
9cee842
Merge branch 'dev-marshal' into dev-marshal-AS-communications
aparna-aot Jul 10, 2024
c364a01
Merge pull request #5314 from bcgov/dev-marshal-AS-communications
aparna-aot Jul 10, 2024
0fe1580
Add assignedGroupEmail to FE post
milosdes Jul 11, 2024
a0e3022
change the code to show the template based on extensiontype
JieunSon96 Jul 11, 2024
9db1984
removed console log
JieunSon96 Jul 12, 2024
772bad8
Merge branch 'dev-marshal' into origin/dev-marshal-SS-3968
JieunSon96 Jul 12, 2024
8c627f8
Merge pull request #5317 from bcgov/origin/dev-marshal-SS-3968
JieunSon96 Jul 12, 2024
9a31d68
Fixes, close button on edit draft, removed unnecessary codes and cond…
aparna-aot Jul 12, 2024
d539b6c
Merge branch 'dev-marshal' into dev-marshal-AS-communications
aparna-aot Jul 12, 2024
7c95f69
Merge pull request #5318 from bcgov/dev-marshal-AS-communications
aparna-aot Jul 12, 2024
8c643cd
Merge pull request #5316 from bcgov/dev-marshal-MD-3161
milosdes Jul 12, 2024
c883376
Update correspondence sent_at and sent_by when not system generated
milosdes Jul 12, 2024
9165de0
Comment tab styling issue fix
aparna-aot Jul 15, 2024
97a3265
Merge pull request #5319 from bcgov/dev-marshal-AS-communications
aparna-aot Jul 15, 2024
25ecc67
Add chip placeholder for displaying emailed or exported comm
milosdes Jul 15, 2024
986e02c
Merge pull request #5321 from bcgov/dev-marshal-MD-3125
milosdes Jul 16, 2024
91b9c68
Add toast for download and remove info for draft download
milosdes Jul 18, 2024
195f87a
Filter templates and logs by name instead of text
milosdes Jul 18, 2024
c9d24e4
Fix bug with number of selected emails
milosdes Jul 18, 2024
8aba92a
fetch oipc templates variable from doc reviewer
JieunSon96 Jul 26, 2024
9106bcd
Merge branch 'dev-marshal' into origin/dev-marshal-SS-3968
JieunSon96 Jul 26, 2024
524f3c1
add display whole oipc approved list
JieunSon96 Jul 26, 2024
435d123
fixed pagecount
JieunSon96 Jul 31, 2024
a3b00d6
fixed totalpage value
JieunSon96 Aug 1, 2024
14dc9bf
changed extension template based on the condition
JieunSon96 Aug 1, 2024
cd243e3
fixed async getTemplateVariables func
JieunSon96 Aug 6, 2024
c79a35c
remove console log
JieunSon96 Aug 6, 2024
a6eafb2
remove unused code
JieunSon96 Aug 7, 2024
7a9fa63
Merge pull request #5349 from bcgov/origin/dev-marshal-SS-3968
JieunSon96 Aug 7, 2024
825c2d8
remove console.log
JieunSon96 Aug 8, 2024
27f83d6
add generic cover email template
JieunSon96 Aug 9, 2024
191217b
add migration file for generic cover template
JieunSon96 Aug 9, 2024
1f6ae3b
changed revision head
JieunSon96 Aug 9, 2024
2b4340f
Merge dev-marshal updates
milosdes Aug 12, 2024
5605c6f
Create models and migration file
milosdes Aug 13, 2024
64efc26
Add raw request id to endpoint
milosdes Aug 13, 2024
f7425a4
Add requestId and None to urls
milosdes Aug 13, 2024
6109483
Add requestId and none to urls
milosdes Aug 13, 2024
060831a
Show communication tab in all states
milosdes Aug 13, 2024
56a7ea6
Display emailed or exported chip
milosdes Aug 13, 2024
a33c788
Pass requestId to functions
milosdes Aug 13, 2024
7f9ee53
Add get correspondence attachment by correspondence ID
milosdes Aug 13, 2024
1cd053c
Add response_at column to table
milosdes Aug 13, 2024
c5e0929
Handle raw requests for correspondence endpoints
milosdes Aug 13, 2024
b401936
Handle raw requests
milosdes Aug 13, 2024
1b7d73e
Handle saving raw request correspondence emails
milosdes Aug 13, 2024
70760f3
Handle sending emails for raw requests
milosdes Aug 13, 2024
3a6c71b
Remove unused endpoints
milosdes Aug 13, 2024
533e5a2
Remove console logs
milosdes Aug 13, 2024
7d6c995
change to show on open state
JieunSon96 Aug 13, 2024
bebe45f
Merge pull request #5355 from bcgov/origin/dev-marshal-SS-3968
JieunSon96 Aug 13, 2024
891817e
Merge branch 'dev-marshal' into dev-marshal-MD-2981
milosdes Aug 13, 2024
9c74938
Resolve merge
milosdes Aug 13, 2024
807cd29
Fix small changes
milosdes Aug 14, 2024
1ca9f6a
Fix delete function
milosdes Aug 14, 2024
074d09e
Remove accidental commit
milosdes Aug 16, 2024
bd6c534
Update for sending draft emails
milosdes Aug 16, 2024
e59536f
Update down_revision for dev-marshal
milosdes Aug 16, 2024
4ac2ec1
add acknowledgement html and variables
JieunSon96 Aug 20, 2024
46ddc08
Merge pull request #5361 from bcgov/dev-marshal-MD-2981
milosdes Aug 20, 2024
973e176
add migration file
JieunSon96 Aug 20, 2024
a126f5e
Fix sql query for combining raw and ministry correspondences
milosdes Aug 20, 2024
2b54f1d
Merge pull request #5371 from bcgov/dev-marshal-MD-2981
milosdes Aug 20, 2024
8b96851
Retrieve rawrequestid when FOIRequest entry exists
milosdes Aug 20, 2024
db73140
Simplify naming
milosdes Aug 20, 2024
085055f
Clean up code
milosdes Aug 20, 2024
4233f29
Move logic to requestservice
milosdes Aug 20, 2024
9838753
Handle undefined requestids from frontend
milosdes Aug 20, 2024
afaf39b
Fix bug sending wrong correspondenceid
milosdes Aug 20, 2024
320c051
Merge pull request #5373 from bcgov/dev-marshal-MD-2981
milosdes Aug 20, 2024
6fd715b
add showing on some states
JieunSon96 Aug 21, 2024
f63b3e4
Merge branch 'dev-marshal' into dev-marshal-ss-372
JieunSon96 Aug 21, 2024
21917e8
multiple migration issue fixed
JieunSon96 Aug 21, 2024
5f2701f
Merge branch 'dev-marshal' into dev-marshal-MD-communication
milosdes Aug 21, 2024
e156c80
Merge pull request #5325 from bcgov/dev-marshal-MD-communication
milosdes Aug 21, 2024
84f77c9
Merge branch 'dev-marshal' into dev-marshal-ss-372
JieunSon96 Aug 21, 2024
287521a
Merge pull request #5375 from bcgov/dev-marshal-ss-372
JieunSon96 Aug 21, 2024
d68ceeb
Add israwrequest to delete
milosdes Aug 23, 2024
3f96a58
Add address to list of variables to remove for draft download
milosdes Aug 23, 2024
2ae8ee9
Add israwrequest to post data for correspondence services
milosdes Aug 24, 2024
a66a856
Add israwrequest column to migration file
milosdes Aug 24, 2024
5da1590
Add israwrequest to correspondence model
milosdes Aug 24, 2024
b40720a
Use israwrequest to route to raw or ministry requests
milosdes Aug 24, 2024
7c95ec2
Add israwrequest to correspondence schema
milosdes Aug 24, 2024
624549c
Sort merged correspondences and update raw and ministry separately
milosdes Aug 24, 2024
b7f1832
Use israwrequest to determine raw or ministry
milosdes Aug 24, 2024
4a3515e
Merge pull request #5379 from bcgov/dev-marshal-MD-2981
milosdes Aug 24, 2024
e31a920
Add download modal and adjust CommunicationStructure display
milosdes Sep 3, 2024
9c065ec
Remove unused imports
milosdes Sep 3, 2024
2cee90f
Merge pull request #5392 from bcgov/dev-marshal-MD-2981
milosdes Sep 3, 2024
36157f8
Save current time when changing date of response
milosdes Sep 4, 2024
a70c10d
Add draft templates to templatelist
milosdes Sep 4, 2024
10b92a5
Merge pull request #5394 from bcgov/dev-marshal-MD-2981
milosdes Sep 5, 2024
1575b17
remove console log
JieunSon96 Sep 5, 2024
06383f2
revert the changes
JieunSon96 Sep 5, 2024
c23bac2
Merge pull request #5400 from bcgov/dev-marshal-ss-372
JieunSon96 Sep 5, 2024
d10c9bb
Changes from UX review
milosdes Sep 6, 2024
460cf09
Merge pull request #5401 from bcgov/dev-marshal-MD-2981
milosdes Sep 6, 2024
4d95e14
FOIMOD-3176 added request history
Oct 9, 2024
cba9d95
Merge branch 'dev' of https://github.com/bcgov/foi-flow into dev-mars…
Oct 10, 2024
68ca1b9
Revert "Merge branch 'dev' of https://github.com/bcgov/foi-flow into …
Oct 10, 2024
ff3d8e2
Merge remote-tracking branch 'origin/dev' into dev-marshal-JC-FOIMOD-…
Oct 10, 2024
d280721
Comment button issue
Oct 11, 2024
fa63705
Merge branch 'dev-marshal-JC-FOIMOD-3176' into dev-marshal-JC-FOIMOD-…
Oct 11, 2024
d1b1415
Fix issue on flask migration
Oct 11, 2024
a163962
Exclude Internal and Peer review comments
Oct 12, 2024
5a93c14
Add fixes on sorting Oldest to Newest
Oct 16, 2024
a7b9ee6
Implemented (FOIMOD-3197) request history export and merged with late…
nagarajaPC-AOT Oct 19, 2024
fb8c5da
Merge pull request #5413 from bcgov/dev-marshal-NC-FOIMOD-RH
nagarajaPC-AOT Oct 19, 2024
918fd02
Changed folder name from model to modal and changed text
nagarajaPC-AOT Oct 21, 2024
da7f661
Merge pull request #5414 from bcgov/dev-marshal-NC-FOIMOD-RH
nagarajaPC-AOT Oct 21, 2024
9481c0c
Merge branch 'dev-marshal' into test-marshal-update-new
JieunSon96 Nov 6, 2024
61092ae
fixed revision head and conflict issue
JieunSon96 Nov 6, 2024
fe68d02
Merge pull request #5424 from bcgov/test-marshal-SS-FOIMOD-3574
JieunSon96 Nov 6, 2024
2a6e078
removed duplicated revision
JieunSon96 Nov 6, 2024
ba37f68
Merge pull request #5426 from bcgov/test-marshal-SS-FOIMOD-3574
JieunSon96 Nov 6, 2024
f895bc6
Merge pull request #5425 from bcgov/dev-marshal-JC-FOIMOD-3176-a
jocelyncabildo-aot Nov 6, 2024
8325f4d
Fix issue on correspondence date
Nov 8, 2024
4eb1ff2
Merge pull request #5428 from bcgov/dev-marshal-JC-FOIMOD-3176-a
jocelyncabildo-aot Nov 8, 2024
2679a08
debug auth
nkan-aot2 Nov 14, 2024
c3e62ab
debug dashboardpagination.py for hsg queue
nkan-aot2 Nov 14, 2024
ff2b8ef
Merge pull request #5435 from bcgov/test-marshal-NK-FOIMOD-3597
nkan-aot2 Nov 14, 2024
a36a494
remove comma from hsg enum
nkan-aot2 Nov 14, 2024
4052679
remove debug code from auth
nkan-aot2 Nov 14, 2024
9707b0c
remove debug code from dashboard endpoint
nkan-aot2 Nov 14, 2024
4a2e11f
Merge pull request #5437 from bcgov/test-marshal-NK-FOIMOD-3597
nkan-aot2 Nov 14, 2024
d83f842
Added request details and cfr forms in export request report FOIMOD-3197
nagarajaPC-AOT Nov 15, 2024
9f369ba
Merge branch 'dev-marshal' of https://github.com/bcgov/foi-flow into …
nagarajaPC-AOT Nov 15, 2024
b5de9dc
removed unnecessary promise added
nagarajaPC-AOT Nov 15, 2024
b2bc495
Merge pull request #5440 from bcgov/dev-marshal-NC-3197-request-details
nagarajaPC-AOT Nov 15, 2024
ad167ce
Corrected css issue and added condition for cfr
nagarajaPC-AOT Nov 16, 2024
7d68c75
Merge pull request #5441 from bcgov/dev-marshal-NC-3197-request-details
nagarajaPC-AOT Nov 18, 2024
787e5bf
removed duplicate cfr forms printing in export pdf
nagarajaPC-AOT Nov 18, 2024
1733c85
Merge pull request #5442 from bcgov/dev-marshal-NC-3197-request-details
nagarajaPC-AOT Nov 18, 2024
a36c594
Css changes to avoid page/line break
nagarajaPC-AOT Nov 18, 2024
c2bac5e
Added address and contact information tab, and removed page break bef…
nagarajaPC-AOT Nov 19, 2024
5b627b4
Merge pull request #5445 from bcgov/dev-marshal-NC-3197-request-details
nagarajaPC-AOT Nov 19, 2024
4e26cc1
Merge remote-tracking branch 'origin/dev-marshal' into test-marshal-J…
Nov 20, 2024
209caea
Merge pull request #5449 from bcgov/test-marshal-JC-FOIMOD-3176-3197
jocelyncabildo-aot Nov 20, 2024
3ea37f5
fix correspondence separator
Nov 20, 2024
9ec0544
Merge pull request #5452 from bcgov/test-marshal-JC-FOIMOD-3176-3197
jocelyncabildo-aot Nov 20, 2024
3e1246a
FOIMOD-3450 fix issues on applicant correspondence
Nov 27, 2024
76867a2
Merge pull request #5459 from bcgov/test-marshal-JC-FOIMOD-3450
jocelyncabildo-aot Nov 27, 2024
0796bb8
FOIMOD-3450 Fix issue on Update#8
Dec 3, 2024
d10c55c
FOIMOD-2981 Fix issue on validation to display Communication tab and …
Dec 3, 2024
5a965c7
revert
Dec 3, 2024
20ade1d
FOIMOD-3123 fix issue on deleting drafts
Dec 4, 2024
3054bcb
FOIMOD-3450 fix issue on reloading request
Dec 4, 2024
790a3af
Remove showContactApplicantTab condition
Dec 4, 2024
317304f
Merge pull request #5463 from bcgov/test-marshal-JC-FOIMOD-3450
jocelyncabildo-aot Dec 4, 2024
68f92b9
Merge pull request #5464 from bcgov/test-marshal-JC-FOIMOD-2981
jocelyncabildo-aot Dec 4, 2024
0957597
Merge pull request #5462 from bcgov/test-marshal-JC-FOIMOD-3123
jocelyncabildo-aot Dec 4, 2024
1303db1
Fix applicant correspondence issues
Dec 5, 2024
afef314
added save button validation
Dec 5, 2024
c2efa4e
Merge pull request #5472 from bcgov/test-marshal-JC-FOIMOD-2842-3132-…
jocelyncabildo-aot Dec 6, 2024
e63793e
FOIMOD-3131 Added margin on downloaded template
Dec 9, 2024
2aeebce
FOIMOD-3131 Added header in Template Prinout
Dec 12, 2024
3c2c328
Merge pull request #5477 from bcgov/test-marshal-JC-FOIMOD-3131
jocelyncabildo-aot Dec 12, 2024
bef7389
FOIMOD-3131 fix issue on rendering image
Dec 13, 2024
6673df1
Merge pull request #5478 from bcgov/test-marshal-JC-FOIMOD-3131
jocelyncabildo-aot Dec 13, 2024
10b3868
FOIMOD-3131 Update img src
Dec 13, 2024
f31b802
Merge pull request #5482 from bcgov/test-marshal-JC-FOIMOD-3131
jocelyncabildo-aot Dec 13, 2024
4be6e3f
FOIMOD-3123 update delete message
Dec 17, 2024
25a1bd2
Merge pull request #5483 from bcgov/test-marshal-JC-FOIMOD-3123
jocelyncabildo-aot Dec 17, 2024
9d5e2cd
Corrected filename format and added styles to success message on down…
nagarajaPC-AOT Dec 18, 2024
502048b
Refactored or condition
nagarajaPC-AOT Dec 19, 2024
b0c4518
fixed sonar issue
nagarajaPC-AOT Dec 19, 2024
caa047c
Merge pull request #5488 from bcgov/test-marshal-NC-3197
nagarajaPC-AOT Dec 19, 2024
44408d6
Fixed sorting issue and applicant details issue in pdf export
nagarajaPC-AOT Dec 27, 2024
2a7c7b7
Merge pull request #5491 from bcgov/test-marshal-NC-3197
nagarajaPC-AOT Dec 27, 2024
0608d77
FOIMOD-3674 Hide new templates
Dec 27, 2024
ede1b5e
Merge pull request #5492 from bcgov/test-marshal-JC-FOIMOD-3674
jocelyncabildo-aot Dec 27, 2024
aaaea41
Fix security issue
Jan 6, 2025
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
16 changes: 16 additions & 0 deletions forms-flow-web/src/apiManager/endpoints/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ const API = {
FOI_PUT_PROGRAMAREADIVISIONS: `${FOI_BASE_API_URL}/api/foiadmin/division/<divisionid>`,
FOI_DELETE_PROGRAMAREADIVISIONS: `${FOI_BASE_API_URL}/api/foiadmin/division/<divisionid>/disable`,

FOI_POST_COMMENT_REQUESTHISTORY: `${FOI_BASE_API_URL}/api/foicomment/requesthistory`,

FOI_POST_COMMENT_RAWREQUEST: `${FOI_BASE_API_URL}/api/foicomment/rawrequest`,
FOI_GET_COMMENT_RAWREQUEST: `${FOI_BASE_API_URL}/api/foicomment/rawrequest/<requestid>`,
FOI_PUT_COMMENT_RAWREQUEST: `${FOI_BASE_API_URL}/api/foicomment/rawrequest/<requestid>`,
Expand Down Expand Up @@ -94,7 +96,17 @@ const API = {
FOI_POST_CFR_FORM: `${FOI_BASE_API_URL}/api/foicfrfee/foirequest/<requestid>/ministryrequest/<ministryrequestid>`,
FOI_POST_CFR_FORM_IAO: `${FOI_BASE_API_URL}/api/foicfrfee/foirequest/<requestid>/ministryrequest/<ministryrequestid>/sanction`,

FOI_POST_REQUEST_CORRESPONDENCE_EMAIL: `${FOI_BASE_API_URL}/api/foiflow/applicantcorrespondence/email/<ministryid>/<rawrequestid>`,
FOI_GET_REQUEST_CORRESPONDENCE_EMAILS: `${FOI_BASE_API_URL}/api/foiflow/applicantcorrespondence/email/<ministryid>/<rawrequestid>`,

FOI_POST_EMAIL_CORRESPONDENCE: `${FOI_BASE_API_URL}/api/foiflow/applicantcorrespondence/<requestid>/<ministryrequestid>`,
FOI_POST_DRAFT_EMAIL_CORRESPONDENCE: `${FOI_BASE_API_URL}/api/foiflow/applicantcorrespondence/draft/<requestid>/<ministryrequestid>`,
FOI_EDIT_DRAFT_EMAIL_CORRESPONDENCE: `${FOI_BASE_API_URL}/api/foiflow/applicantcorrespondence/draft/edit/<requestid>/<ministryrequestid>`,
FOI_DELETE_DRAFT_EMAIL_CORRESPONDENCE: `${FOI_BASE_API_URL}/api/foiflow/applicantcorrespondence/draft/delete/<ministryrequestid>/<rawrequestid>/<correspondenceid>`,
FOI_POST_RESPONSE_EMAIL_CORRESPONDENCE: `${FOI_BASE_API_URL}/api/foiflow/applicantcorrespondence/response/<ministryrequestid>/<rawrequestid>`,
FOI_EDIT_RESPONSE_EMAIL_CORRESPONDENCE: `${FOI_BASE_API_URL}/api/foiflow/applicantcorrespondence/response/edit/<ministryrequestid>/<rawrequestid>`,
FOI_DELETE_RESPONSE_EMAIL_CORRESPONDENCE: `${FOI_BASE_API_URL}/api/foiflow/applicantcorrespondence/response/delete/<ministryrequestid>/<rawrequestid>/<correspondenceid>`,

FOI_GET_EMAIL_CORRESPONDENCE: `${FOI_BASE_API_URL}/api/foiflow/applicantcorrespondence/<requestid>/<ministryrequestid>`,
FOI_GET_EMAIL_CORRESPONDENCE_TEMPLATES: `${FOI_BASE_API_URL}/api/foiflow/applicantcorrespondence/templates`,

Expand All @@ -121,6 +133,10 @@ const API = {
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>`,

DOC_REVIEWER_REDACTED_DOCUMENT_RECORDS: `${DOC_REVIEWER_BASE_API_URL}/api/documentpage/ministryrequest/<ministryrequestid>`,

DOC_REVIEWER_REDACTED_PAGEFLAG_RECORDS: `${DOC_REVIEWER_BASE_API_URL}/api/documentpageflags/ministryrequest/<ministryrequestid>`,

FOI_TRIGGER_DOWNLOAD_RECORDS_FOR_HARMS: `${FOI_BASE_API_URL}/api/foirecord/<requestid>/ministryrequest/<ministryrequestid>/triggerdownload/harms`,

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
import {
httpPOSTRequest,
httpGETRequest,
} from "../../httpRequestHandler";
import API from "../../endpoints";
import {
serviceActionError,
setCorrespondenceEmails,
} from "../../../actions/FOI/foiRequestActions";
import UserService from "../../../services/UserService";
import { replaceUrl } from "../../../helper/FOI/helper";
import { catchError, fnDone } from "./foiServicesUtil";

export const fetchCorrespondenceEmailList = (ministryId, requestId, ...rest) => {
const done = fnDone(rest);
let apiUrl = '';
if (!ministryId) ministryId = 'None'
if (!requestId) requestId = 'None'

apiUrl = replaceUrl(
API.FOI_GET_REQUEST_CORRESPONDENCE_EMAILS,
"<ministryid>",
ministryId
);
apiUrl = replaceUrl(apiUrl, "<rawrequestid>", requestId);
return (dispatch) => {
httpGETRequest(apiUrl, {}, UserService.getToken())
.then((res) => {
if (res.data) {
done(null,res.data);
} else {
console.log("Error in fetching correspondence email list", res);
dispatch(serviceActionError(res));
}
})
.catch((error) => {
catchError(error, dispatch);
});
};
};

export const saveCorrespondenceEmail = (ministryId, requestId, data, ...rest) => {
const done = fnDone(rest);
let apiUrl = API.FOI_POST_REQUEST_CORRESPONDENCE_EMAIL;
if (!ministryId) ministryId = 'None';
if (!requestId) requestId = 'None';

apiUrl = replaceUrl(
API.FOI_POST_REQUEST_CORRESPONDENCE_EMAIL,
"<ministryid>",
ministryId
);
apiUrl = replaceUrl(apiUrl, "<rawrequestid>", requestId);
return (dispatch) => {
httpPOSTRequest(apiUrl, data)
.then((res) => {
if (res.data) {
done(null, res.data);
} else {
dispatch(serviceActionError(res));
throw new Error("Error in updating correspondence email list");
}
})
.catch((error) => {
dispatch(serviceActionError(error));
done(error);
});
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ export const fetchApplicantCorrespondence = (
ministryId,
errorCallback = null
) => {

if (ministryId == null) {
return () => {};
ministryId = 'None'
}
const apiUrl = replaceUrl(replaceUrl(
API.FOI_GET_EMAIL_CORRESPONDENCE,
Expand Down Expand Up @@ -55,7 +55,7 @@ export const saveEmailCorrespondence = (
errorCallback,
) => {
if (!ministryId) {
dispatch(serviceActionError("No request id"));
ministryId = 'None';
}
dispatch(setFOICorrespondenceLoader(true));
const apiUrl = replaceUrl(replaceUrl(
Expand Down Expand Up @@ -83,6 +83,236 @@ export const saveEmailCorrespondence = (
});
};

export const saveDraftCorrespondence = (
data,
requestId,
ministryId,
dispatch,
callback,
errorCallback,
) => {
if (!ministryId) {
ministryId = 'None';
}
dispatch(setFOICorrespondenceLoader(true));
const apiUrl = replaceUrl(replaceUrl(
API.FOI_POST_DRAFT_EMAIL_CORRESPONDENCE,
"<ministryrequestid>",
ministryId),"<requestid>",requestId
);
httpPOSTRequest(apiUrl, data)
.then((res) => {
if (res.data) {
if (callback) {
callback(res.data);
}
} else {
dispatch(serviceActionError(res));
throw new Error();
}
})
.catch((error) => {
console.log("An error occured while trying to send email to applicant", error);
catchError(error, dispatch);
if (errorCallback) {
errorCallback("An error occured while trying to send email to applicant");
}
});
};


export const editDraftCorrespondence = (
data,
requestId,
ministryId,
dispatch,
callback,
errorCallback,
) => {
if (!ministryId) {
ministryId = 'None';
}
dispatch(setFOICorrespondenceLoader(true));
const apiUrl = replaceUrl(replaceUrl(
API.FOI_EDIT_DRAFT_EMAIL_CORRESPONDENCE,
"<ministryrequestid>",
ministryId),"<requestid>",requestId
);
httpPOSTRequest(apiUrl, data)
.then((res) => {
if (res.data) {
if (callback) {
callback(res.data);
}
} else {
dispatch(serviceActionError(res));
throw new Error();
}
})
.catch((error) => {
console.log("An error occured while trying to send email to applicant", error);
catchError(error, dispatch);
if (errorCallback) {
errorCallback("An error occured while trying to send email to applicant");
}
});
};

export const deleteDraftCorrespondence = (
correspondenceid,
israwrequest,
ministryId,
requestId,
dispatch,
callback,
errorCallback,
) => {
if (!ministryId) {
ministryId = 'None';
}
dispatch(setFOICorrespondenceLoader(true));
let apiUrl = replaceUrl(replaceUrl(
API.FOI_DELETE_DRAFT_EMAIL_CORRESPONDENCE,
"<ministryrequestid>",
ministryId),"<correspondenceid>", correspondenceid,

);
apiUrl = replaceUrl(apiUrl,"<rawrequestid>",requestId);
httpPOSTRequest(apiUrl,{israwrequest: israwrequest})
.then((res) => {
if (res.data) {
if (callback) {
callback(res.data);
}
} else {
dispatch(serviceActionError(res));
throw new Error();
}
})
.catch((error) => {
console.log("An error occured while trying to send email to applicant", error);
catchError(error, dispatch);
if (errorCallback) {
errorCallback("An error occured while trying to send email to applicant");
}
});
};

export const deleteResponseCorrespondence = (
correspondenceid,
israwrequest,
ministryId,
requestId,
dispatch,
callback,
errorCallback,
) => {
if (!ministryId) {
ministryId = 'None';
}
dispatch(setFOICorrespondenceLoader(true));
let apiUrl = replaceUrl(replaceUrl(
API.FOI_DELETE_RESPONSE_EMAIL_CORRESPONDENCE,
"<ministryrequestid>",
ministryId),"<correspondenceid>", correspondenceid,

);
apiUrl = replaceUrl(apiUrl,"<rawrequestid>",requestId);
httpPOSTRequest(apiUrl,{israwrequest: israwrequest})
.then((res) => {
if (res.data) {
if (callback) {
callback(res.data);
}
} else {
dispatch(serviceActionError(res));
throw new Error();
}
})
.catch((error) => {
console.log("An error occured while trying to delete the response correspondence", error);
catchError(error, dispatch);
if (errorCallback) {
errorCallback("An error occured while trying to delete the response correspondence");
}
});
};

export const saveCorrespondenceResponse = (
data,
ministryId,
requestId,
dispatch,
callback,
errorCallback,
) => {
if (!ministryId) {
ministryId = 'None';
}
dispatch(setFOICorrespondenceLoader(true));
const apiUrl = replaceUrl(replaceUrl(
API.FOI_POST_RESPONSE_EMAIL_CORRESPONDENCE,
"<ministryrequestid>",
ministryId),
"<rawrequestid>", requestId);
httpPOSTRequest(apiUrl, data)
.then((res) => {
if (res.data) {
if (callback) {
callback(res.data);
}
} else {
dispatch(serviceActionError(res));
throw new Error();
}
})
.catch((error) => {
console.log("An error occured while trying to save response from applicant", error);
catchError(error, dispatch);
if (errorCallback) {
errorCallback("An error occured while trying to save response from applicant");
}
});
};

export const editCorrespondenceResponse = (
data,
ministryId,
rawRequestId,
dispatch,
callback,
errorCallback,
) => {
if (!ministryId) {
ministryId = 'None';
}
dispatch(setFOICorrespondenceLoader(true));
const apiUrl = replaceUrl(replaceUrl(
API.FOI_EDIT_RESPONSE_EMAIL_CORRESPONDENCE,
"<ministryrequestid>",
ministryId),
"<rawrequestid>", rawRequestId
);
httpPOSTRequest(apiUrl, data)
.then((res) => {
if (res.data) {
if (callback) {
callback(res.data);
}
} else {
dispatch(serviceActionError(res));
throw new Error();
}
})
.catch((error) => {
console.log("An error occured while trying to save response from applicant", error);
catchError(error, dispatch);
if (errorCallback) {
errorCallback("An error occured while trying to save response from applicant");
}
});
};

export const fetchApplicantCorrespondenceTemplates = (
errorCallback = null
) => {
Expand Down
Loading
Loading