diff --git a/forms-flow-web/src/components/Application/ViewApplication.js b/forms-flow-web/src/components/Application/ViewApplication.js index 21dc3efb0..dd8ebca6d 100644 --- a/forms-flow-web/src/components/Application/ViewApplication.js +++ b/forms-flow-web/src/components/Application/ViewApplication.js @@ -11,7 +11,6 @@ import { setApplicationDetailLoader, setApplicationDetailStatusCode, } from "../../actions/applicationActions"; -import ProcessDiagram from "../BPMN/ProcessDiagramHook"; import History from "./ApplicationHistory"; import View from "../Form/Item/Submission/Item/View"; import { getForm, getSubmission } from "@aot-technologies/formio-react"; @@ -33,9 +32,6 @@ const ViewApplication = React.memo(() => { const isApplicationDetailLoading = useSelector( (state) => state.applications.isApplicationDetailLoading ); - const applicationProcess = useSelector( - (state) => state.applications.applicationProcess - ); const tenantKey = useSelector((state) => state.tenants?.tenantId); const dispatch = useDispatch(); const redirectUrl = MULTITENANCY_ENABLED ? `/tenant/${tenantKey}/` : "/"; @@ -121,17 +117,6 @@ const ViewApplication = React.memo(() => { > - {(t) => t("Process Diagram")}} - > - - ); diff --git a/forms-flow-web/src/components/Draft/Edit.js b/forms-flow-web/src/components/Draft/Edit.js index 383bce433..87cc87982 100644 --- a/forms-flow-web/src/components/Draft/Edit.js +++ b/forms-flow-web/src/components/Draft/Edit.js @@ -306,7 +306,7 @@ const View = React.memo((props) => { }} /> {processData?.status === "active" ? ( -
+
{ const { t } = useTranslation(); @@ -96,16 +95,6 @@ const ViewDraft = React.memo(() => { > - {(t) => t("Process Diagram")}} - > - -
); diff --git a/forms-flow-web/src/components/Form/EditForm/FormEdit.js b/forms-flow-web/src/components/Form/EditForm/FormEdit.js index 0a8ff4793..b12d8507e 100644 --- a/forms-flow-web/src/components/Form/EditForm/FormEdit.js +++ b/forms-flow-web/src/components/Form/EditForm/FormEdit.js @@ -357,12 +357,29 @@ const EditComponent = () => { FORM: "FORM", WORKFLOW: "WORKFLOW", }; + useEffect(() => { + const queryParams = new URLSearchParams(location.search); + const view = queryParams.get("view"); + if (view === "flow") { + setCurrentLayout(FLOW_LAYOUT); + sideTabRef.current = true; + } else { + setCurrentLayout(FORM_LAYOUT); + } + }, [location.search]); - // handling form layout and flow layout const handleCurrentLayout = (e) => { //wehn the current is assigned with element then only the visible class will render sideTabRef.current = e; - setCurrentLayout(isFormLayout ? FLOW_LAYOUT : FORM_LAYOUT); + const newLayout = isFormLayout ? FLOW_LAYOUT : FORM_LAYOUT; + setCurrentLayout(newLayout); + + const queryParams = newLayout === FLOW_LAYOUT ? "view=flow" : ""; + const newUrl = `${redirectUrl}formflow/${formId}/edit${ + queryParams ? `?${queryParams}` : "" + }`; + + dispatch(push(newUrl)); }; const handleCloseSelectedAction = () => { @@ -661,7 +678,7 @@ const EditComponent = () => { .then((res) => { const form = res.data; dispatch(setFormSuccessData("form", form)); - dispatch(push(`${redirectUrl}formflow/${form._id}/edit/`)); + dispatch(push(`${redirectUrl}formflow/${form._id}/edit`)); }) .catch((err) => { let error; @@ -709,8 +726,6 @@ const EditComponent = () => { await actionFunction(processListData.id); if (isPublished) { await fetchProcessDetails(processListData); - } else { - backToForm(); } setPromptNewVersion(isPublished); setIsPublished(!isPublished); diff --git a/forms-flow-web/src/components/Form/Item/Submission/Item/View.js b/forms-flow-web/src/components/Form/Item/Submission/Item/View.js index 58e836083..80fe75d73 100644 --- a/forms-flow-web/src/components/Form/Item/Submission/Item/View.js +++ b/forms-flow-web/src/components/Form/Item/Submission/Item/View.js @@ -73,7 +73,7 @@ const View = React.memo((props) => { text={t("Loading...")} className="col-12" > -
+
{ text={{(t) => t("Loading...")}} className="col-12" > -
+
{(isPublic || (formStatus === "active") ) ? ( -
+
diff --git a/forms-flow-web/src/components/ServiceFlow/list/ServiceTaskListView.js b/forms-flow-web/src/components/ServiceFlow/list/ServiceTaskListView.js index 359c831b4..2348bdec1 100644 --- a/forms-flow-web/src/components/ServiceFlow/list/ServiceTaskListView.js +++ b/forms-flow-web/src/components/ServiceFlow/list/ServiceTaskListView.js @@ -128,7 +128,7 @@ const ServiceTaskListView = React.memo((props) => { if ((tasksCount || taskList.length) && selectedFilter) { return ( <> -
+
{taskList?.map((task, index) => { const adjustedValues = adjustTaskAttributes( task?._embedded?.variable