Fixed usecase linking and added basic priorities to start making a priority system

This commit is contained in:
frikky
2022-05-21 14:31:43 +02:00
parent 2167be32f5
commit 7e42553fee
10 changed files with 413 additions and 86 deletions
@@ -924,10 +924,7 @@ const Framework = (props) => {
const shiftmodifier = 3*scale
//const svgSize = `${40*scale}px`
const svgSize = `${40}px`
console.log("Size: ", svgSize)
console.log("Framework: ", parsedFrameworkData)
const fontSize = `${12*scale}px`
const defaultSize = `${85*scale}px`
const iconSize = `${45*scale}px`
@@ -1265,14 +1262,11 @@ const Framework = (props) => {
changeUsecase(selectedUsecase, usecaseType)
if (inputUsecase !== undefined && inputUsecase !== null) {
console.log("Got usecase: ", inputUsecase)
for (var key in inputUsecase.process) {
if (inputUsecase.process[key].source === "" || inputUsecase.process[key].target === "") {
continue
}
console.log("Edge: ", inputUsecase.process[key])
inputUsecase.process[key].label = parseInt(key)+1
inputUsecase.process[key].id = uuidv4();
+7
View File
@@ -183,6 +183,13 @@ const ParsedAction = (props) => {
const [fieldCount, setFieldCount] = React.useState(0);
const [hiddenDescription, setHiddenDescription] = React.useState(true);
useEffect(() => {
if (setLastSaved !== undefined) {
setLastSaved(false)
}
}, [expansionModalOpen])
useEffect(() => {
if (selectedAction.parameters !== null && selectedAction.parameters !== undefined) {
const paramcheck = selectedAction.parameters.find(param => param.name === "body")
+16 -13
View File
@@ -2,23 +2,26 @@ import { useEffect } from "react";
//import { withRouter } from "react-router-dom";
import { useLocation } from "react-router-dom";
function ScrollToTop({ getUserNotifications, setCurpath, history }) {
// ensures scrolling happens in the right way on different pages and when changing
function ScrollToTop({ getUserNotifications, curpath, setCurpath, history }) {
let location = useLocation();
useEffect(() => {
//const unlisten = history.listen(() => {
window.scroll({
top: 0,
left: 0,
behavior: "smooth",
});
// Custom handler for certain scroll mechanics
//
console.log("OLD: ", curpath, "NeW: ", window.location.pathname)
if (curpath === window.location.pathname && curpath === "/usecases") {
} else {
setCurpath(window.location.pathname);
getUserNotifications();
//});
//return () => {
// unlisten();
//};
window.scroll({
top: 0,
left: 0,
behavior: "smooth",
});
setCurpath(window.location.pathname);
getUserNotifications();
}
}, [location]);
return null;