Skip to content

Commit

Permalink
Merge pull request #493 from bcgov/dev
Browse files Browse the repository at this point in the history
Second merge for 5th Sept PROD release
  • Loading branch information
nikhila-aot authored Sep 1, 2023
2 parents e480dcb + 542b4b5 commit cee44ad
Show file tree
Hide file tree
Showing 12 changed files with 903 additions and 783 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23006,7 +23006,7 @@
"eq": "",
"json": ""
},
"customConditional": "const UserDetails = JSON.parse(localStorage.getItem(\"UserDetails\"))\r\n\r\n\r\n\r\nconst roles = UserDetails[\"role\"];\r\n\r\n\r\nif(roles.includes(\"formsflow-reviewer/cssa-team\")) {\r\n show = false;\r\n}\r\nelse\r\n{\r\n show = true;\r\n}",
"customConditional": "const UserDetails = JSON.parse(localStorage.getItem(\"UserDetails\"))\r\nconst roles = UserDetails[\"role\"];\r\nif(roles.includes(\"formsflow-reviewer/cssa-team\")||\r\nroles.includes(\"formsflow-reviewer/caseworker\")||\r\nroles.includes(\"formsflow-reviewer/sdm\")||\r\nroles.includes(\"formsflow-reviewer/site-risk-classification-officer\")) {\r\n show = false;\r\n}\r\nelse\r\n{\r\n show = true;\r\n}",
"logic": [],
"attributes": {},
"overlay": {
Expand Down Expand Up @@ -23057,7 +23057,7 @@
"showWordCount": false,
"allowMultipleMasks": false,
"addons": [],
"id": "exzll48"
"id": "eixn6zp"
},
{
"label": "applicationId",
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -18664,7 +18664,7 @@
"eq": "",
"json": ""
},
"customConditional": "",
"customConditional": "const UserDetails = JSON.parse(localStorage.getItem(\"UserDetails\"))\r\nconst roles = UserDetails[\"role\"];\r\nif(roles.includes(\"formsflow-reviewer/cssa-team\")||\r\nroles.includes(\"formsflow-reviewer/caseworker\")||\r\nroles.includes(\"formsflow-reviewer/sdm\")||\r\nroles.includes(\"formsflow-reviewer/site-risk-classification-officer\")) {\r\n show = false;\r\n}\r\nelse\r\n{\r\n show = true;\r\n}",
"logic": [],
"attributes": {},
"overlay": {
Expand Down Expand Up @@ -18715,7 +18715,7 @@
"showWordCount": false,
"allowMultipleMasks": false,
"addons": [],
"id": "e2ae8ob"
"id": "ed8xzn"
},
{
"label": "applicationId",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ task.execution.setVariable('deleteReason', "completed");</camunda:script>
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${action == 'Returned'}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id="Flow_1oam11w" sourceRef="Activity_06nypz0" targetRef="Activity_0w5t5av">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${action == 'Accepted'}</bpmn:conditionExpression>
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${action == 'Accepted' || action == 'Approved' }</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id="Flow_00mjhxs" sourceRef="Activity_0w5t5av" targetRef="Activity_0ro66yt" />
<bpmn:sequenceFlow id="Flow_04l5mhw" sourceRef="Activity_0ro66yt" targetRef="Activity_040vqyo" />
Expand Down Expand Up @@ -186,7 +186,7 @@ task.execution.setVariable('applicationStatus', task.execution.getVariable('acti
<bpmn:outgoing>Flow_053df1n</bpmn:outgoing>
<bpmn:outgoing>Flow_1pdsmz6</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:scriptTask id="Activity_15ke6f4" name="Debug Log" scriptFormat="javascript">
<bpmn:scriptTask id="Activity_15ke6f4" name="Debug Logs" scriptFormat="javascript">
<bpmn:incoming>Flow_06k5uq7</bpmn:incoming>
<bpmn:incoming>Flow_1fquz60</bpmn:incoming>
<bpmn:incoming>Flow_03tdbh3</bpmn:incoming>
Expand Down Expand Up @@ -989,4 +989,4 @@ system.out.println (" here " + execution.getVariable('riskclassification'));</bp
</bpmndi:BPMNShape>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>
</bpmn:definitions>
32 changes: 16 additions & 16 deletions forms-flow-ai/forms-flow-bpm/processes/SRCR/SRCRWorkflow.bpmn
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@
<bpmn:incoming>Flow_08zx269</bpmn:incoming>
<bpmn:outgoing>Flow_1ifelq5</bpmn:outgoing>
</bpmn:userTask>
<bpmn:userTask id="Activity_0s3vft8" name="Caseworker Review" camunda:candidateGroups="formsflow/formsflow-reviewer/site-risk-classification-officer">
<bpmn:userTask id="Activity_0s3vft8" name="Caseworker Review" camunda:candidateGroups="formsflow/formsflow-reviewer/caseworker">
<bpmn:extensionElements>
<camunda:formData>
<camunda:formField id="action" label="Action" type="string" />
Expand Down Expand Up @@ -551,29 +551,29 @@ execution.setVariable('isSrco',false);</camunda:script>
<dc:Bounds x="160" y="80" width="1160" height="3850" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Lane_08r73ui_di" bpmnElement="Lane_08r73ui" isHorizontal="true">
<dc:Bounds x="190" y="2120" width="1130" height="630" />
<bpmndi:BPMNLabel />
<bpmndi:BPMNShape id="Lane_00mefnp_di" bpmnElement="Lane_00mefnp" isHorizontal="true">
<dc:Bounds x="190" y="3110" width="1130" height="820" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Lane_1mfcqjo_di" bpmnElement="Lane_1mfcqjo" isHorizontal="true">
<dc:Bounds x="190" y="80" width="1130" height="760" />
<bpmndi:BPMNLabel />
<bpmndi:BPMNShape id="Lane_1h4fynz_di" bpmnElement="Lane_1h4fynz" isHorizontal="true">
<dc:Bounds x="190" y="2750" width="1130" height="360" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Lane_1jh8ra0_di" bpmnElement="Lane_1jh8ra0" isHorizontal="true">
<dc:Bounds x="190" y="840" width="1130" height="390" />
<bpmndi:BPMNShape id="Lane_01ohwxm_di" bpmnElement="Lane_01ohwxm" isHorizontal="true">
<dc:Bounds x="190" y="1230" width="1130" height="470" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Lane_1th7fqb_di" bpmnElement="Lane_1th7fqb" isHorizontal="true">
<dc:Bounds x="190" y="1700" width="1130" height="420" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Lane_01ohwxm_di" bpmnElement="Lane_01ohwxm" isHorizontal="true">
<dc:Bounds x="190" y="1230" width="1130" height="470" />
<bpmndi:BPMNShape id="Lane_1jh8ra0_di" bpmnElement="Lane_1jh8ra0" isHorizontal="true">
<dc:Bounds x="190" y="840" width="1130" height="390" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Lane_1h4fynz_di" bpmnElement="Lane_1h4fynz" isHorizontal="true">
<dc:Bounds x="190" y="2750" width="1130" height="360" />
<bpmndi:BPMNShape id="Lane_1mfcqjo_di" bpmnElement="Lane_1mfcqjo" isHorizontal="true">
<dc:Bounds x="190" y="80" width="1130" height="760" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="Lane_00mefnp_di" bpmnElement="Lane_00mefnp" isHorizontal="true">
<dc:Bounds x="190" y="3110" width="1130" height="820" />
<bpmndi:BPMNShape id="Lane_08r73ui_di" bpmnElement="Lane_08r73ui" isHorizontal="true">
<dc:Bounds x="190" y="2120" width="1130" height="630" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="BPMNShape_0vrofck" bpmnElement="Activity_0dughh2">
<dc:Bounds x="1110" y="698" width="100" height="80" />
Expand Down Expand Up @@ -1037,4 +1037,4 @@ execution.setVariable('isSrco',false);</camunda:script>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>
</bpmn:definitions>
14 changes: 7 additions & 7 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"react-icons": "^4.6.0",
"react-leaflet": "^4.2.1",
"react-oidc-context": "^2.2.0",
"react-parcelmap-bc": "^1.0.4",
"react-parcelmap-bc": "^1.1.4",
"react-redux": "^8.0.2",
"react-router-dom": "^6.4.1",
"react-scripts": "5.0.1",
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/App.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ it('renders log in panel', () => {
<App />
</Provider>
);
const loginPanel = screen.getByText(/Log In to my LRS Account/i);
const loginPanel = screen.getByText(/Login/i);
expect(loginPanel).toBeInTheDocument();

});
Expand All @@ -33,7 +33,7 @@ test('Renders LRS Form Accordion', () =>{
<App />
</Provider>
);
const formAccordion = screen.getByText(/This is the first sample lrs form, please use this for lrs things/i)
const formAccordion = screen.getByText(/Welcome./i)
expect(formAccordion).toBeInTheDocument()
})

2 changes: 1 addition & 1 deletion frontend/src/app/features/Map/Map.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Map from "../../../../node_modules/react-parcelmap-bc/dist/Map";

export default React.memo(() => {
const [data, setData] = useState();
const [location, setLocation] = useState([49, -123]);
const [location, setLocation] = useState([48.41974533439947, -123.36781242160622]);
const [readOnly, setReadOnly] = useState(false);

useEffect(() => {
Expand Down
2 changes: 1 addition & 1 deletion map-package/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-parcelmap-bc",
"version": "1.0.4",
"version": "1.0.8",
"private": false,
"dependencies": {
"@testing-library/jest-dom": "^5.16.5",
Expand Down
48 changes: 33 additions & 15 deletions map-package/src/map/Map.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,33 @@ const Map = (props) => {
let map;
let routeLayer, waypointsLayer;
const identifyBufferDistance = 4;
const [show, setShow] = useState(true);
const [show, setShow] = useState(false);
const [address, setAddress] = useState("");
const [location, setLocation] = useState([ 48.419, -123.37]);
const [location, setLocation] = useState([ 48.46762, -123.25458 ]);
const [zoom, setZoom] = useState(13);
const [searchTrue, setSerachTrue] = useState(true);
//const [info, setInfo] = useState({});
let info;

useEffect(() => {
if (props.initLocation.length > 0 && props.initLocation !== null && props.initLocation !== undefined) {
setZoom(13);
setLocation(props.initLocation);
if(props.readOnly)
{
setShow(false);
}
if (props.initLocation.length > 0 && props.initLocation !== null && props.initLocation !== undefined && ( location[0] !== props.initLocation[0] || location[1] !== props.initLocation[1] )) {



const timeoutId = setTimeout(()=>{
//setSerachTrue(false);
setZoom(18);
setLocation(props.initLocation);
if(!props.readOnly)
{
setShow(true);
}

},1000);

return () => {
clearTimeout(timeoutId);
};
}
}, [props]);

Expand Down Expand Up @@ -171,7 +183,7 @@ const Map = (props) => {
.setLatLng(e.latlng)
.setContent(
"Site ID:" +
feature.properties[targetLayer.topLineProperty] +
feature.properties[targetLayer.tsopLineProperty] +
"<br/>" +
"Lat: " +
feature.properties[targetLayer.latitude] +
Expand Down Expand Up @@ -295,11 +307,12 @@ const Map = (props) => {
getGeoCode(address).then((x) => {
if (x.features.length > 0) {
console.log(x.features[0].geometry.coordinates);
setZoom(50);
setZoom(20);
setLocation([
x.features[0].geometry.coordinates[1],
x.features[0].geometry.coordinates[0],
]);
setSerachTrue(true);
}
});
};
Expand Down Expand Up @@ -338,14 +351,19 @@ const Map = (props) => {

const RecenterAutomatically = () => {
const map = useMap();
useEffect(() => {
//map.setZoom(zoom);
useEffect(() => {
map.setZoom(zoom);

if(searchTrue)
{
map.setView(location,zoom);
}

map.fire("click", {
latlng: L.latLng(location),
});
}, [location]);

}, [map]);
return null;
};

Expand Down Expand Up @@ -426,7 +444,7 @@ const Map = (props) => {
)}
</div>
<br />
<MapContainer center={location} zoom={zoom} minZoom={10} scrollWheelZoom={false} maxBounds={maxBounds} bounds={maxBounds} maxBoundsViscosity={1.0}>
<MapContainer center={location} zoom={zoom} minZoom={10} maxBounds={maxBounds} bounds={maxBounds} maxBoundsViscosity={1.0} >
<TileLayer
attribution='&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
Expand Down

0 comments on commit cee44ad

Please sign in to comment.