diff --git a/forms-flow-web/src/components/Form/Steps/PreviewStepper.js b/forms-flow-web/src/components/Form/Steps/PreviewStepper.js index dc476bc743..6fb3d23399 100644 --- a/forms-flow-web/src/components/Form/Steps/PreviewStepper.js +++ b/forms-flow-web/src/components/Form/Steps/PreviewStepper.js @@ -404,8 +404,9 @@ const Preview = React.memo( )} > - @@ -415,7 +416,7 @@ const Preview = React.memo(
-
+
)} > -
@@ -504,7 +506,7 @@ const Preview = React.memo(
-
+
)} > -
diff --git a/forms-flow-web/src/components/Form/Steps/TaskvariableCreate.js b/forms-flow-web/src/components/Form/Steps/TaskvariableCreate.js index a42102f38e..e0afc8b479 100644 --- a/forms-flow-web/src/components/Form/Steps/TaskvariableCreate.js +++ b/forms-flow-web/src/components/Form/Steps/TaskvariableCreate.js @@ -52,7 +52,7 @@ const TaskvariableCreate = ({ options, addTaskVariable }) => { inputId="selectTaskVariable" /> - + { placeholder={t("Enter Label")} /> - +
{t("Show in list")} { setShowInList(!showInList); }} @@ -79,15 +80,15 @@ const TaskvariableCreate = ({ options, addTaskVariable }) => { - + diff --git a/forms-flow-web/src/components/Form/constants/FormTable.js b/forms-flow-web/src/components/Form/constants/FormTable.js index f48eb3622a..32a73c74e0 100644 --- a/forms-flow-web/src/components/Form/constants/FormTable.js +++ b/forms-flow-web/src/components/Form/constants/FormTable.js @@ -1,9 +1,8 @@ -/* eslint-disable */ + import React, { useState, useEffect } from "react"; import { InputGroup, FormControl, - DropdownButton, Dropdown, } from "react-bootstrap"; import { useDispatch, useSelector } from "react-redux"; @@ -14,8 +13,7 @@ import { setBPMFormListPage, setBPMFormListSort, setBpmFormSearch, - setFormDeleteStatus, - // setBpmFormType, + setFormDeleteStatus, } from "../../../actions/formActions"; import SelectFormForDownload from "../FileUpload/SelectFormForDownload"; import LoadingOverlay from "react-loading-overlay"; @@ -28,7 +26,7 @@ import { import { useTranslation } from "react-i18next"; import { Translation } from "react-i18next"; import { getAllApplicationCount, getFormProcesses, resetFormProcessData } from "../../../apiManager/services/processServices"; -import { setIsApplicationCountLoading, setResetProcess } from "../../../actions/processActions"; +import { setIsApplicationCountLoading } from "../../../actions/processActions"; import { HelperServices } from "@formsflow/service"; import _ from "lodash"; @@ -52,18 +50,7 @@ function FormTable() { const searchText = useSelector((state) => state.bpmForms.searchText); const [search, setSearch] = useState(searchText || ""); const redirectUrl = MULTITENANCY_ENABLED ? `/tenant/${tenantKey}/` : "/"; - - const [openIndex, setOpenIndex] = useState(-1); // -1 means no dropdown open - - const toggleDropdown = (index) => { - if (openIndex === index) { - // Clicking on the currently open row should close it - setOpenIndex(-1); - } else { - // Clicking on a different row should open it and close the previous one - setOpenIndex(index); - } - }; + const isApplicationCountLoading = useSelector((state) => state.process.isApplicationCountLoading); const pageOptions = [ { @@ -92,12 +79,7 @@ function FormTable() { dispatch(setBPMFormListSort(updatedSort)); dispatch(setBPMFormListPage(1)); }; - - // const handleTypeChange = (type) => { - // dispatch(setBPMFormListPage(1)); - // dispatch(setBPMFormLimit(5)); - // dispatch(setBpmFormType(type)); - // }; + useEffect(() => { setSearch(searchText); @@ -116,13 +98,12 @@ function FormTable() { const viewOrEditForm = (formId) => { dispatch(resetFormProcessData()); - dispatch(setResetProcess()); dispatch(push(`${redirectUrl}formflow/${formId}/view-edit`)); }; const submitNewForm = (formId)=>{ dispatch(push(`${redirectUrl}form/${formId}`)); - } + }; const handleClearSearch = () => { setSearch(""); @@ -147,16 +128,7 @@ function FormTable() { ); - const submitNew = (formData) => { - return ( - - ); - }; + const deleteForms = (formData) => { dispatch(setIsApplicationCountLoading(true)); @@ -183,6 +155,21 @@ function FormTable() { }) ); }; + + const CustomToggle = React.forwardRef(({ children, onClick }, ref) => ( + + )); + + const noDataFound = () => { return ( @@ -203,7 +190,7 @@ function FormTable() { }; return ( <> - +
@@ -301,38 +288,44 @@ function FormTable() { - ); @@ -372,7 +365,7 @@ function FormTable() { - {t("Showing")} {limit * pageNo - (limit - 1)} {t("to")}{" "} + {t("Showing")} {(limit * pageNo) - (limit - 1)} {t("to")}{" "} {limit * pageNo > totalForms ? totalForms : limit * pageNo}{" "} {t("of")} {totalForms} {t("results")} diff --git a/forms-flow-web/src/components/Modeler/Editors/BpmnEditor/index.js b/forms-flow-web/src/components/Modeler/Editors/BpmnEditor/index.js index 90578c874c..11efdb1c00 100644 --- a/forms-flow-web/src/components/Modeler/Editors/BpmnEditor/index.js +++ b/forms-flow-web/src/components/Modeler/Editors/BpmnEditor/index.js @@ -54,8 +54,8 @@ export default React.memo( const [lintErrors, setLintErrors] = useState([]); const [deploymentLoading, setDeploymentLoading] = useState(false); const redirectUrl = MULTITENANCY_ENABLED ? `/tenant/${tenantKey}/` : "/"; - const [processName,setProcessName] = useState(true); - const bpmPropertyInput = document.getElementById("bio-properties-panel-name")?.value; + // const [processName,setProcessName] = useState(true); + // const bpmPropertyInput = document.getElementById("bio-properties-panel-name")?.value; const containerRef = useCallback((node) => { if (node !== null) { @@ -63,11 +63,11 @@ export default React.memo( } }, []); - useEffect(() => { - if (bpmPropertyInput) { - setProcessName(false); - } - }, [!bpmPropertyInput]); + // useEffect(() => { + // if (bpmPropertyInput) { + // setProcessName(false); + // } + // }, [!bpmPropertyInput]); const cancel = () => { dispatch(push(`${redirectUrl}processes`)); @@ -326,14 +326,14 @@ export default React.memo( variant="outline-dark" className="ml-3" onClick={handleExport} - disabled={processName || !bpmPropertyInput} + // disabled={processName || !bpmPropertyInput} > {t("Export")} diff --git a/forms-flow-web/src/components/Modeler/constants/bpmnTable.js b/forms-flow-web/src/components/Modeler/constants/bpmnTable.js index 3081c13bfc..e8f560aecb 100644 --- a/forms-flow-web/src/components/Modeler/constants/bpmnTable.js +++ b/forms-flow-web/src/components/Modeler/constants/bpmnTable.js @@ -46,7 +46,7 @@ function BpmnTable() { ) ); setCountLoading(true); - fetchAllBpmProcessesCount(tenantKey, search) + fetchAllBpmProcessesCount(tenantKey, searchText) .then((result) => { setTotalProcess(result.data?.count || 0); }) @@ -96,8 +96,8 @@ function BpmnTable() {
{e.anonymous ? t("Anonymous") : t("Private")} {" "} - + {viewOrEdit(e)} -
toggleDropdown(index)} - > - ... -
- {openIndex === index && ( - +
+ + + + + + + {userRoles.includes(STAFF_REVIEWER) || + userRoles.includes(CLIENT) ? ( + { + submitNewForm(e?._id); + }} + > + + {t("Submit New")} + + ) : null} deleteForms(e)}> {t("Delete")} - {(userRoles.includes(STAFF_REVIEWER) || userRoles.includes(CLIENT))?( - {console.log(e);submitNewForm(e?._id)}}> - - {t("Submit New")} - - ) : null} - - )} + +
- + @@ -148,13 +148,14 @@ function BpmnTable() { {process.map((processItem) => ( - + - diff --git a/forms-flow-web/src/components/Modeler/constants/dmnTable.js b/forms-flow-web/src/components/Modeler/constants/dmnTable.js index 98b8651abb..2b7dcf2dad 100644 --- a/forms-flow-web/src/components/Modeler/constants/dmnTable.js +++ b/forms-flow-web/src/components/Modeler/constants/dmnTable.js @@ -48,7 +48,7 @@ function DmnTable() { ) ); setCountLoading(true); - fetchAllDmnProcessesCount(tenantKey, search) + fetchAllDmnProcessesCount(tenantKey, searchText) .then((result) => { setTotalProcess(result.data?.count || 0); }) @@ -97,8 +97,8 @@ function DmnTable() {
{t("Key")} {t("Workflow Name")}{t("Key")} {t("Type")} @@ -140,7 +140,7 @@ function BpmnTable() { style={{ height: "300px" }} className="text-center" > - {t("No Process Found")} + { isLoading ? null : t("No Process Found")}
{processItem.key} {processItem.name}{processItem.key} {t("BPMN")} + + {t("Edit Workflow")}
- + @@ -149,13 +149,14 @@ function DmnTable() { {dmn.map((processItem) => ( - + -
{t("Key")} {t("Workflow Name")}{t("Key")} {t("Type")} @@ -141,7 +141,7 @@ function DmnTable() { style={{ height: "300px" }} className="text-center" > - {t("No DMN Found")} + { isLoading ? null : t("No Process Found")}
{processItem.key} {processItem.name}{processItem.key} {t("DMN")} + + {t("Edit Workflow")}