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

Merge latest main to test-rook for 11.3 #1228

Merged
merged 24 commits into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
7550a68
Create errorToast for docReviewerService errors
milosdes Oct 28, 2024
6d01865
Merge pull request #1195 from bcgov/dev-rook-MD-3423
milosdes Oct 28, 2024
22f8732
Add filename to error toast
milosdes Nov 4, 2024
313dc5a
Merge pull request #1205 from bcgov/dev-rook-MD-3423
milosdes Nov 4, 2024
3d11b9c
make redline opacity configurable
nkan-aot2 Nov 5, 2024
61092ff
add toggle for redline opacity
nkan-aot2 Nov 5, 2024
3d817da
Merge pull request #1208 from bcgov/dev-rook-NK-FOIMOD-3563
nkan-aot2 Nov 5, 2024
431a4ee
trigger github actions for dev-rook after rebase
nkan-aot2 Nov 5, 2024
667febd
Merge branch 'dev' into dev-rook-NK-FOIMOD-3563
nkan-aot2 Nov 6, 2024
5437e9c
temp fix for watermark issues
nkan-aot2 Nov 7, 2024
d4afc25
Revert "3423 - Add filename to error toast"
milosdes Nov 8, 2024
9919941
Revert "3423 - Create errorToast for docReviewerService errors"
milosdes Nov 8, 2024
ed5464f
Merge pull request #1212 from bcgov/dev-rook-NK-FOIMOD-3563
nkan-aot2 Nov 8, 2024
bdc0416
Merge pull request #1210 from bcgov/revert-1205-dev-rook-MD-3423
milosdes Nov 8, 2024
acbc17d
Merge pull request #1211 from bcgov/revert-1195-dev-rook-MD-3423
milosdes Nov 8, 2024
4642102
Merge pull request #1215 from bcgov/main
Aman-Hundal Nov 12, 2024
c54e9df
Merge pull request #1217 from bcgov/dev-rook
nkan-aot2 Nov 13, 2024
3d129d9
fix cfd personal not loading in prod stemming from merge issue
nkan-aot2 Nov 13, 2024
03c8d72
Merge pull request #1218 from bcgov/main-NK-CFDpersonal-hotfix
nkan-aot2 Nov 13, 2024
d922aa6
Merge pull request #1222 from bcgov/dev
nkan-aot2 Nov 15, 2024
36fe968
new enums for ministry changes from new government
nkan-aot2 Nov 20, 2024
d449076
Merge pull request #1224 from bcgov/dev-NK-FOIMOD-3610
abin-aot Nov 20, 2024
c2b2c2a
Merge pull request #1225 from bcgov/dev
abin-aot Nov 20, 2024
76ba999
Add files via upload
abin-aot Nov 21, 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
2 changes: 1 addition & 1 deletion api/reviewer_api/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
MinistryTeamWithKeycloackGroup,
ProcessingTeamWithKeycloackGroup,
IAOTeamWithKeycloackGroup,
)
)

jwt = (
JwtManager()
Expand Down
5 changes: 4 additions & 1 deletion api/reviewer_api/utils/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,11 @@ class MinistryTeamWithKeycloackGroup(Enum):
ECC = "ECC Ministry Team"
JED = "JED Ministry Team"
COR = "COR Ministry Team"
HSG = "HSG Ministry Team",
HSG = "HSG Ministry Team"
LSB = "LSB Ministry Team"
INF = "INF Ministry Team"
MCM = "MCM Ministry Team"
ECS = "ECS Ministry Team"

@staticmethod
def list():
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion web/src/components/FOI/Home/Home.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ function Home() {
});

let doclist = [];
let requestInfo = _requestInfo.requestinfo;
let requestInfo = _requestInfo;
getFOIS3DocumentPreSignedUrls(
documentObjs,
(newDocumentObjs) => {
Expand Down
60 changes: 56 additions & 4 deletions web/src/components/FOI/Home/Redlining.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ import useSaveResponsePackage from "./CreateResponsePDF/useSaveResponsePackage";
import {ConfirmationModal} from "./ConfirmationModal";
import { FOIPPASectionsModal } from "./FOIPPASectionsModal";
import { NRWarningModal } from "./NRWarningModal";
import Switch from "@mui/material/Switch";
import FeeOverrideModal from "./FeeOverrideModal";

const Redlining = React.forwardRef(
Expand Down Expand Up @@ -182,6 +183,27 @@ const Redlining = React.forwardRef(
enableSavingFinal,
} = useSaveResponsePackage();

const [isRedlineOpaque, setIsRedlineOpaque] = useState(localStorage.getItem('isRedlineOpaque') === 'true')

useEffect(() => {
if (annotManager) {
let annotations = annotManager.getAnnotationsList();
for (let annotation of annotations) {
if (annotation.Subject === 'Redact') {
annotation.FillDisplayColor = new docInstance.Core.Annotations.Color(
255,
255,
255,
isRedlineOpaque ? alpha : 0
);
annotManager.redrawAnnotation(annotation)
}
}
localStorage.setItem('isRedlineOpaque', isRedlineOpaque)
}

}, [isRedlineOpaque])

useEffect(() => {
let initializeWebViewer = async () => {
let currentDocumentS3Url = currentDocument?.currentDocumentS3Url;
Expand Down Expand Up @@ -261,6 +283,38 @@ const Redlining = React.forwardRef(
0,
newCustomElement
);


const opacityToggle = {
type: 'customElement',
render: () => (
<>
<input
style={{"float": "left"}}
type="checkbox"
onChange={(e) => {
setIsRedlineOpaque(e.target.checked)
}
}
defaultChecked={isRedlineOpaque}
id="isRedlineOpaqueToggle"
>
</input>
<label
for="isRedlineOpaqueToggle"
style={{"top": "1px", "position": "relative", "margin-right": 10}}
>
Toggle Opacity
</label>
</>
)
};

header.headers.default.splice(
header.headers.default.length - 4,
0,
opacityToggle
);
});

instance.UI.setHeaderItems(header => {
Expand Down Expand Up @@ -1026,7 +1080,7 @@ const Redlining = React.forwardRef(
`${currentLayer.redactionlayerid}`
);
annotations[i].IsHoverable = false;
annotations[i].FillDisplayColor = new docInstance.Core.Annotations.Color(255, 255, 255, alpha);
annotations[i].FillDisplayColor = new docInstance.Core.Annotations.Color(255, 255, 255, isRedlineOpaque ? alpha : 0);
});
setPageSelections(pageSelectionList);
let annot = annots[0].children[0];
Expand Down Expand Up @@ -1526,7 +1580,7 @@ const Redlining = React.forwardRef(
if (_annotation.Subject === "Redact") {
_annotation.IsHoverable = false;
_annotation.NoMove = true;
_annotation.FillDisplayColor = new annots.Color(255, 255, 255, alpha);
_annotation.FillDisplayColor = new annots.Color(255, 255, 255, isRedlineOpaque ? alpha : 0);

if (_annotation.type === "fullPage") {
_annotation.NoResize = true;
Expand Down Expand Up @@ -2448,7 +2502,6 @@ const Redlining = React.forwardRef(
return (
<div>
<div className="webviewer" ref={viewer}></div>
{/* { modalOpen && */}
<FOIPPASectionsModal
cancelRedaction={cancelRedaction}
modalOpen={modalOpen}
Expand All @@ -2466,7 +2519,6 @@ const Redlining = React.forwardRef(
saveDefaultSections={saveDefaultSections}
clearDefaultSections={clearDefaultSections}
/>
{/* } */}
{redlineModalOpen &&
<ConfirmationModal
cancelRedaction={cancelRedaction}
Expand Down
Loading