diff --git a/forms-flow-web/src/components/Form/constants/FormTable.js b/forms-flow-web/src/components/Form/constants/FormTable.js
index 9da3d37135..1dcacdcb35 100644
--- a/forms-flow-web/src/components/Form/constants/FormTable.js
+++ b/forms-flow-web/src/components/Form/constants/FormTable.js
@@ -300,12 +300,15 @@ function FormTable() {
-
+
diff --git a/forms-flow-web/src/components/ServiceFlow/list/sort/CreateNewFilter.js b/forms-flow-web/src/components/ServiceFlow/list/sort/CreateNewFilter.js
index ca6fed530a..cc665b3573 100644
--- a/forms-flow-web/src/components/ServiceFlow/list/sort/CreateNewFilter.js
+++ b/forms-flow-web/src/components/ServiceFlow/list/sort/CreateNewFilter.js
@@ -33,7 +33,14 @@ import TaskAttributeComponent from "./TaskAttributeComponent";
import { toast } from "react-toastify";
import { getUserRoles } from "../../../../apiManager/services/authorizationService";
import { setUserGroups } from "../../../../actions/authorizationActions";
-import { Badge, ListGroup, OverlayTrigger, Popover } from "react-bootstrap";
+import {
+ Badge,
+ ListGroup,
+ OverlayTrigger,
+ Popover,
+ Modal,
+ Button,
+} from "react-bootstrap";
import { trimFirstSlash } from "../../constants/taskConstants";
import { cloneDeep, omitBy } from "lodash";
import {
@@ -112,6 +119,8 @@ export default function CreateNewFilterDrawer({
const { t } = useTranslation();
const [modalShow, setModalShow] = useState(false);
const [checkboxes, setCheckboxes] = useState(initialValueOfTaskAttribute);
+ const [showDeleteModal, setShowDeleteModal] = useState(false);
+ const [showAlert, setShowAlert] = useState(false);
const fetchTasks = (resData) => {
const reqParamData = {
@@ -503,6 +512,11 @@ export default function CreateNewFilterDrawer({
setOpenFilterDrawer(!openFilterDrawer);
};
+ const deleteConfirmationModalToggleDrawer = () => {
+ setOpenFilterDrawer(!openFilterDrawer);
+ };
+
+
const candidateGroups = useSelector(
(state) => state.user?.userDetail?.groups || []
);
@@ -543,6 +557,38 @@ export default function CreateNewFilterDrawer({
setShowUndefinedVariable(showUndefinedVariable);
};
+
+ const hideDeleteConfirmation = () => {
+ setShowDeleteModal(false);
+ deleteConfirmationModalToggleDrawer();
+ };
+
+ const showDeleteConfirmation = () => {
+ setShowDeleteModal(true);
+ toggleDrawer();
+ };
+
+ const FilterDelete = () => {
+ hideDeleteConfirmation();
+ handleFilterDelete();
+ };
+
+ const textTruncate = (wordLength, targetLength, text) => {
+ return text?.length > wordLength
+ ? text.substring(0, targetLength) + "..."
+ : text;
+ };
+
+ const handleFilterName = (e) => {
+ const value = e.target.value;
+ setFilterName(value);
+ if (value.length >= 50) {
+ setShowAlert(true);
+ } else {
+ setShowAlert(false);
+ }
+ };
+
const list = () => (
@@ -835,8 +886,7 @@ export default function CreateNewFilterDrawer({
|