Skip to content

Commit

Permalink
Merge pull request #4713 from bcgov/dev-rook
Browse files Browse the repository at this point in the history
Latest production changes to rook
  • Loading branch information
sumathi-thirumani authored Nov 14, 2023
2 parents d70eef2 + b7152d9 commit 6df8e8f
Show file tree
Hide file tree
Showing 23 changed files with 158 additions and 114 deletions.
60 changes: 38 additions & 22 deletions .github/workflows/forms-flow-bpm-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,49 +29,65 @@ jobs:
if: github.event_name == 'push' && github.repository == 'bcgov/foi-flow'
steps:
- uses: actions/checkout@v2
- name: Set ENV variables
id: set-variable
- name: Set ENV variables for dev branch
if: ${{ github.ref_name == 'dev' }}
shell: bash
run: |
if [ ${{ github.ref_name }} == 'dev' ]; then
echo "For ${{ github.ref_name }} branch"
echo "TOOLS_NAME=${{secrets.OPENSHIFT4_FRONTEND_REPOSITORY}}" >> $GITHUB_ENV
echo "TAG_NAME="dev"" >> $GITHUB_ENV
echo "BRANCH_NAME="dev"" >> $GITHUB_ENV
echo "ENV_NAME="dev"" >> $GITHUB_ENV
elif [ ${{ github.ref_name }} == 'dev-marshal' ]; then
echo "For ${{ github.ref_name }} branch"
echo "TOOLS_NAME=${{secrets.OPENSHIFT4_FRONTEND_REPOSITORY}}" >> $GITHUB_ENV
echo "TAG_NAME="dev-marshal"" >> $GITHUB_ENV
echo "BRANCH_NAME="dev-marshal"" >> $GITHUB_ENV
echo "ENV_NAME="dev"" >> $GITHUB_ENV
elif [ ${{ github.ref_name }} == 'test-marshal' ]; then
echo "For ${{ github.ref_name }} branch"
echo "TOOLS_NAME=${{secrets.OPENSHIFT4_FRONTEND_REPOSITORY}}" >> $GITHUB_ENV
echo "TAG_NAME="test-marshal"" >> $GITHUB_ENV
echo "BRANCH_NAME="test-marshal"" >> $GITHUB_ENV
echo "ENV_NAME="test"" >> $GITHUB_ENV
elif [ ${{ github.ref_name }} == 'dev-rook' ]; then
- name: Set ENV variables for dev-marshal branch
if: ${{ github.ref_name == 'dev-marshal' }}
shell: bash
run: |
echo "For ${{ github.ref_name }} branch"
echo "TOOLS_NAME=${{secrets.OPENSHIFT4_FRONTEND_REPOSITORY}}" >> $GITHUB_ENV
echo "TAG_NAME="dev-marshal"" >> $GITHUB_ENV
echo "BRANCH_NAME="dev-marshal"" >> $GITHUB_ENV
echo "ENV_NAME="dev"" >> $GITHUB_ENV
- name: Set ENV variables for test-marshal branch
if: ${{ github.ref_name == 'test-marshal' }}
shell: bash
run: |
echo "For ${{ github.ref_name }} branch"
echo "TOOLS_NAME=${{secrets.OPENSHIFT4_FRONTEND_REPOSITORY}}" >> $GITHUB_ENV
echo "TAG_NAME="test-marshal"" >> $GITHUB_ENV
echo "BRANCH_NAME="test-marshal"" >> $GITHUB_ENV
echo "ENV_NAME="test"" >> $GITHUB_ENV
- name: Set ENV variables for dev-rook branch
if: ${{ github.ref_name == 'dev-rook' }}
shell: bash
run: |
echo "For ${{ github.ref_name }} branch"
echo "TOOLS_NAME=${{secrets.OPENSHIFT4_FRONTEND_REPOSITORY}}" >> $GITHUB_ENV
echo "TAG_NAME="dev-rook"" >> $GITHUB_ENV
echo "BRANCH_NAME="dev-rook"" >> $GITHUB_ENV
echo "ENV_NAME="dev"" >> $GITHUB_ENV
elif [ ${{ github.ref_name }} == 'test-rook' ]; then
- name: Set ENV variables for test-rook branch
if: ${{ github.ref_name == 'test-rook' }}
shell: bash
run: |
echo "For ${{ github.ref_name }} branch"
echo "TOOLS_NAME=${{secrets.OPENSHIFT4_FRONTEND_REPOSITORY}}" >> $GITHUB_ENV
echo "TAG_NAME="test-rook"" >> $GITHUB_ENV
echo "BRANCH_NAME="test-rook"" >> $GITHUB_ENV
echo "ENV_NAME="test"" >> $GITHUB_ENV
elif [ ${{ github.ref_name }} == 'main' ]; then
- name: Set ENV variables for main branch
if: ${{ github.ref_name == 'main' }}
shell: bash
run: |
echo "For ${{ github.ref_name }} branch"
echo "TOOLS_NAME=${{secrets.OPENSHIFT4_FRONTEND_REPOSITORY}}" >> $GITHUB_ENV
echo "TAG_NAME="test"" >> $GITHUB_ENV
echo "BRANCH_NAME="main"" >> $GITHUB_ENV
echo "ENV_NAME="test"" >> $GITHUB_ENV
else
echo "For ${{ github.ref_name }} branch"
fi
shell: bash
- name: Login Openshift
shell: bash
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/katalon-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3.0
uses: actions/checkout@v2
with:
ref: dev-automationscripts
- name: set screen resolution
Expand All @@ -35,9 +35,9 @@ jobs:
dir
shell: cmd
- name: Katalon Studio Github Action
uses: katalon-studio/katalon-studio-github-action@v3.0
uses: katalon-studio/katalon-studio-github-action@v2
with:
version: '8.2.0'
version: '8.6.6'
projectPath: '${{ github.workspace }}/testing/foi-qa-automation/foi-qa-automation.prj'
args: '-noSplash -retry=0 -testSuiteCollectionPath="Test Suites/foi-test" -apiKey=${{ secrets.KATALON_API_KEY }} --config -webui.autoUpdateDrivers=true -licenseRelease=true -browserType="Chrome" -proxy.auth.option=NO_PROXY -proxy.system.option=NO_PROXY -proxy.system.applyToDesiredCapabilities=true -executionProfile="dev" '
- name: copy reports to one folder
Expand All @@ -50,15 +50,15 @@ jobs:
dir
shell: cmd
- name: Setup Node.js
uses: actions/setup-node@v3.0
uses: actions/setup-node@v2
with:
node-version: '14'
node-version: '16'
- name: Create collection report
run: |
npm i -g xunit-viewer
xunit-viewer -r artifacts\JUnit_Report.xml -o artifacts\foi-test.html
- name: Archive Katalon report
uses: actions/upload-artifact@v3.0
uses: actions/upload-artifact@v2
with:
name: katalon-report
path: artifacts
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ request-management-api/request_api/models/__pycache__/*.*
request-management-api/migrations/__pycache__/*.*
request-management-api/.env
notification-manager/env/*

*.pyc
*/__pycache__/*
request-management-api/request_api/__pycache__/*.pyc
Expand Down
7 changes: 3 additions & 4 deletions .sonarcloud.properties
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
sonar.projectName=foi-flow

# Path to sources
sonar.sources=request-management-api/,apps/forms-flow-ai/forms-flow-bpm,apps/forms-flow-ai/forms-flow-web
sonar.exclusions=**/*.test.js,request-management-api/migrations/versions/*,request-management-api/tests/**/*
#sonar.sources=request-management-api/request_api,apps/forms-flow-ai/forms-flow-bpm,forms-flow-web/src,notification-manager
sonar.exclusions=**/*.test.js,request-management-api/migrations/versions,request-management-api/tests
#sonar.inclusions=

# Path to tests
# sonar.tests=
#sonar.test.exclusions=
Expand All @@ -14,4 +13,4 @@ sonar.exclusions=**/*.test.js,request-management-api/migrations/versions/*,reque
sonar.sourceEncoding=UTF-8

# Exclusions for copy-paste detection
sonar.cpd.exclusions=**/*.test.js,request-management-api/migrations/versions/*,request-management-api/tests/**/*
sonar.cpd.exclusions=**/*.test.js,request-management-api/migrations/versions,request-management-api/tests
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ const BottomButtonGroup = React.memo(
case StateEnum.readytoscan.name:
case StateEnum.peerreview.name:
case StateEnum.section5pending.name:
case StateEnum.onholdapplicationfee.name:
case StateEnum.appfeeowing.name:
const status = Object.values(StateEnum).find(
(statusValue) => statusValue.name === currentSelectedStatus
);
Expand Down
7 changes: 3 additions & 4 deletions forms-flow-web/src/components/FOI/FOIRequest/FOIRequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -875,10 +875,9 @@ const FOIRequest = React.memo(({ userDetail }) => {
requestState !== StateEnum.intakeinprogress.name &&
requestState !== StateEnum.unopened.name &&
requestState !== StateEnum.open.name &&
requestDetails?.requestType ===
FOI_COMPONENT_CONSTANTS.REQUEST_TYPE_GENERAL
);
};
requestState !== StateEnum.appfeeowing.name &&
requestDetails?.requestType === FOI_COMPONENT_CONSTANTS.REQUEST_TYPE_GENERAL)
}

return (!isLoading &&
requestDetails &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {

import {
fetchFOIMinistryAssignedToList,
fetchFOIPersonalDivisionsAndSections
fetchFOIPersonalDivisionsAndSections,
} from "../../../../apiManager/services/FOI/foiMasterDataServices";

import { fetchFOIRequestAttachmentsList } from "../../../../apiManager/services/FOI/foiAttachmentServices";
Expand Down Expand Up @@ -227,7 +227,12 @@ const MinistryReview = React.memo(({ userDetail }) => {
const [originalDivisions, setOriginalDivisions] = React.useState([]);
const [hasReceivedDate, setHasReceivedDate] = React.useState(true);
const [isMinistryRestricted, setIsMinistryRestricted] = useState(false);
const [isMCFPersonal, setIsMCFPersonal] = useState(bcgovcode.replaceAll('"', '') == "MCF" && requestDetails.requestType == FOI_COMPONENT_CONSTANTS.REQUEST_TYPE_PERSONAL);
const [isMCFPersonal, setIsMCFPersonal] = useState(
bcgovcode.replaceAll('"', "") == "MCF" &&
requestDetails.requestType ==
FOI_COMPONENT_CONSTANTS.REQUEST_TYPE_PERSONAL
);
const [unSavedRequest, setUnSavedRequest] = React.useState(false);

let ministryassignedtousername = "Unassigned";
useEffect(() => {
Expand All @@ -249,9 +254,15 @@ const MinistryReview = React.memo(({ userDetail }) => {
);
}

if(MinistryNeedsScanning.includes(bcgovcode.replaceAll('"', '')) && requestDetails.requestType == FOI_COMPONENT_CONSTANTS.REQUEST_TYPE_PERSONAL) {
dispatch(fetchFOIPersonalDivisionsAndSections(bcgovcode.replaceAll('"', '')));
if(bcgovcode.replaceAll('"', '') == "MCF") {
if (
MinistryNeedsScanning.includes(bcgovcode.replaceAll('"', "")) &&
requestDetails.requestType ==
FOI_COMPONENT_CONSTANTS.REQUEST_TYPE_PERSONAL
) {
dispatch(
fetchFOIPersonalDivisionsAndSections(bcgovcode.replaceAll('"', ""))
);
if (bcgovcode.replaceAll('"', "") == "MCF") {
setIsMCFPersonal(true);
}
}
Expand All @@ -269,7 +280,6 @@ const MinistryReview = React.memo(({ userDetail }) => {
}
}, [isMinistryRestricted, requestWatchers]);

const [unSavedRequest, setUnSavedRequest] = React.useState(false);
const [recordsUploading, setRecordsUploading] = React.useState(false);
const [CFRUnsaved, setCFRUnsaved] = React.useState(false);
const hideBottomText = [
Expand Down Expand Up @@ -426,11 +436,11 @@ const MinistryReview = React.memo(({ userDetail }) => {
foitabheaderBG = "foitabheadercollection foitabheaderPeerreviewBG";
break;
case StateEnum.tagging.name:
foitabheaderBG = "foitabheadercollection foitabheaderTaggingBG";
break;
foitabheaderBG = "foitabheadercollection foitabheaderTaggingBG";
break;
case StateEnum.readytoscan.name:
foitabheaderBG = "foitabheadercollection foitabheaderReadytoScanBG";
break;
foitabheaderBG = "foitabheadercollection foitabheaderReadytoScanBG";
break;
default:
foitabheaderBG = "foitabheadercollection foitabheaderdefaultBG";
break;
Expand Down Expand Up @@ -632,15 +642,18 @@ const MinistryReview = React.memo(({ userDetail }) => {
? `(${requestNotes.length})`
: ""}
</div>
{(originalDivisions?.length > 0 || isMCFPersonal) && DISABLE_GATHERINGRECORDS_TAB?.toLowerCase() =='false' &&<div
className={clsx("tablinks", {
active: tabLinksStatuses.Records.active,
})}
name="Records"
onClick={() => tabclick("Records")}
>
Records
</div>}
{(originalDivisions?.length > 0 || isMCFPersonal) &&
DISABLE_GATHERINGRECORDS_TAB?.toLowerCase() == "false" && (
<div
className={clsx("tablinks", {
active: tabLinksStatuses.Records.active,
})}
name="Records"
onClick={() => tabclick("Records")}
>
Records
</div>
)}
</div>

<div className="foileftpanelstatus">
Expand Down Expand Up @@ -938,7 +951,8 @@ const MinistryReview = React.memo(({ userDetail }) => {
[classes.hidden]: !tabLinksStatuses.Records.display,
})}
>
{!isAttachmentListLoading && (originalDivisions?.length > 0 || isMCFPersonal) ? (
{!isAttachmentListLoading &&
(originalDivisions?.length > 0 || isMCFPersonal) ? (
<>
{url.indexOf("records") > -1 ? (
<Breadcrumbs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
}

.foitabheadercollection {
width: fit-content;
width: 200px;
// height: calc(100% - 96px - 67px);
// height: 100%;
border-radius: 0px 30px 30px 0px!important;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
}

.foitabheadercollection {
width: fit-content;
width: 200px;
// height: calc(100% - 96px - 67px);
// height: 100%;
border-radius: 0px 30px 30px 0px!important;
Expand All @@ -69,7 +69,7 @@
background-color: #C45303;
}

.foitabheaderIntakeInProgressBG, .foitabheaderOnHoldApplicationFeeBG, .foitabheaderSection5Pending {
.foitabheaderIntakeInProgressBG, .foitabheaderAppFeeOwingBG, .foitabheaderSection5Pending {
background-color: #8C3601;
}

Expand Down
4 changes: 2 additions & 2 deletions forms-flow-web/src/components/FOI/FOIRequest/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ export const getTabBG = (_tabStatus, _requestState) => {
return "foitabheadercollection foitabheaderReadytoScanBG";
case StateEnum.section5pending.name:
return "foitabheadercollection foitabheaderSection5Pending";
case StateEnum.onholdapplicationfee.name:
return "foitabheadercollection foitabheaderOnHoldApplicationFeeBG";
case StateEnum.appfeeowing.name:
return "foitabheadercollection foitabheaderAppFeeOwingBG";

default:
return "foitabheadercollection foitabheaderdefaultBG";
Expand Down
2 changes: 1 addition & 1 deletion forms-flow-web/src/components/FOI/Header/FOIHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ const adminDashboard = (_e) => {
</li>
}
<li className="help-icon foinavitem">
<a href={"https://help.foirequests.gov.bc.ca/"} target="_blank" aria-label="foi-help link">
<a href={"https://help.foirequests.gov.bc.ca/help-articles"} target="_blank" aria-label="foi-help link">
<HelpOutlineIcon style={{fontSize: "21px", color: "white", textDecoration: "none", cursor: "pointer"}} />
</a>
</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ import { getFullnameList } from "../../../../helper/FOI/helper";
return {title: "Ministry Sign Off", body: `Upload eApproval Logs, and enter in required approval fields to verify Ministry Approval and then change the state.`};
else
return {title: "Changing the state", body: `Are you sure you want to change Request #${_requestNumber} to ${StateEnum.response.name}?`};
case StateEnum.onholdapplicationfee.name.toLowerCase():
return {title: "Changing the state", body: `Are you sure you want to change Request #${_requestNumber} to ${StateEnum.onholdapplicationfee.name}?`};
case StateEnum.appfeeowing.name.toLowerCase():
return {title: "Changing the state", body: `Are you sure you want to change Request #${_requestNumber} to ${StateEnum.appfeeowing.name}?`};
default:
return {title: "", body: ""};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ const StateDropDown = ({
return _stateList.consult;
else if(previousState === StateEnum.response.name)
return _stateList.response;
else if(previousState === StateEnum.appfeeowing.name)
return _stateList.appfeeowing
}
else{
return _stateList.peerreview;
Expand Down Expand Up @@ -175,8 +177,8 @@ const StateDropDown = ({
return _stateList.section5pending;
}
break
case StateEnum.onholdapplicationfee.name.toLowerCase():
return _stateList.onholdapplicationfee;
case StateEnum.appfeeowing.name.toLowerCase():
return _stateList.appfeeowing;

default:
return [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
background-color: #595959;
}

.on-hold-applicationfee {
.appfeeowing {
background-color: #8C3601;
}

Expand Down
6 changes: 3 additions & 3 deletions forms-flow-web/src/constants/FOI/statusEnum.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const StateList = Object.freeze({
unopened: [{status: "Unopened", isSelected: false}, {status:"Intake in Progress", isSelected: false}],
intakeinprogress: [{status:"Intake in Progress", isSelected: false}, {status: "Open", isSelected: false}, {status:"Peer Review", isSelected: false}, {status: "Redirect", isSelected: false}, {status: "On-Hold - Application Fee", isSelected: false}, {status: "Closed", isSelected: false}],
intakeinprogress: [{status:"Intake in Progress", isSelected: false}, {status: "Open", isSelected: false}, {status:"Peer Review", isSelected: false}, {status: "Redirect", isSelected: false}, {status: "App Fee Owing", isSelected: false}, {status: "Closed", isSelected: false}],
intakeinprogressforpersonals: [{status:"Intake in Progress", isSelected: false}, {status: "Open", isSelected: false}, {status:"Peer Review", isSelected: false}, {status: "Redirect", isSelected: false}, {status: "Section 5 Pending", isSelected: false}, {status: "Closed", isSelected: false}],
redirect: [{status: "Redirect", isSelected: false}, {status:"Intake in Progress", isSelected: false}, {status: "Closed", isSelected: false}],
open: [{status: "Open", isSelected: false}, {status: "Call For Records", isSelected: false}, {status:"Peer Review", isSelected: false},{status: "Closed", isSelected: false}],
Expand All @@ -22,7 +22,7 @@ const StateList = Object.freeze({
//peerreview: [{status:"Peer Review", isSelected: false},{status:"Intake in Progress", isSelected: false}, {status: "Open", isSelected: false},{status: "Records Review", isSelected: false},{status: "Consult", isSelected: false},{status: "Response", isSelected: false}],
peerreview: [{status:"Peer Review", isSelected: false}],
section5pending: [{status: "Section 5 Pending", isSelected: false}, {status: "Open", isSelected: false}, {status:"Peer Review", isSelected: false}, {status: "Redirect", isSelected: false}, {status: "Closed", isSelected: false}],
onholdapplicationfee: [{status: "On-Hold - Application Fee", isSelected: false}, {status: "Open", isSelected: false}, {status:"Peer Review", isSelected: false}, {status: "Redirect", isSelected: false}, {status: "Closed", isSelected: false}]
appfeeowing: [{status: "App Fee Owing", isSelected: false}, {status: "Open", isSelected: false}, {status:"Peer Review", isSelected: false}, {status: "Redirect", isSelected: false}, {status: "Closed", isSelected: false}]
});

const MinistryStateList = Object.freeze({
Expand Down Expand Up @@ -67,7 +67,7 @@ const StateEnum = Object.freeze({
peerreview: {name: "Peer Review", id: 16},
tagging: {name: "Tagging", id: 17},
readytoscan: {name: "Ready to Scan", id: 18},
onholdapplicationfee: {name: "On-Hold - Application Fee", id: 19},
appfeeowing: {name: "App Fee Owing", id: 19},
section5pending: {name: "Section 5 Pending", id: 20},
});

Expand Down
Loading

0 comments on commit 6df8e8f

Please sign in to comment.