From 688d24224f84204f1e32aa856b62befcf5dea722 Mon Sep 17 00:00:00 2001 From: pramod mahajan Date: Tue, 26 Aug 2025 14:51:07 +0530 Subject: [PATCH] updated Master modal --- src/components/master/MasterModal.jsx | 28 ++------------------------- src/pages/master/MasterPage.jsx | 16 ++++----------- src/pages/master/MasterTable.jsx | 9 ++------- 3 files changed, 8 insertions(+), 45 deletions(-) diff --git a/src/components/master/MasterModal.jsx b/src/components/master/MasterModal.jsx index 0a472727..44282be8 100644 --- a/src/components/master/MasterModal.jsx +++ b/src/components/master/MasterModal.jsx @@ -107,33 +107,9 @@ const MasterModal = ({ modaldata, closeModal }) => { ); return ( - + ); }; diff --git a/src/pages/master/MasterPage.jsx b/src/pages/master/MasterPage.jsx index 7904e6af..db377cc1 100644 --- a/src/pages/master/MasterPage.jsx +++ b/src/pages/master/MasterPage.jsx @@ -10,6 +10,7 @@ import { getCachedData } from "../../slices/apiDataManager"; import { useHasUserPermission } from "../../hooks/useHasUserPermission"; import { MANAGE_MASTER } from "../../utils/constants"; import { useQueryClient } from "@tanstack/react-query"; +import GlobalModel from "../../components/common/GlobalModel"; const MasterPage = () => { @@ -31,15 +32,6 @@ const MasterPage = () => { setIsCreateModalOpen(false); setModalConfig(null); - // Clean up Bootstrap modal manually - const modalEl = document.getElementById('master-modal'); - modalEl?.classList.remove('show'); - if (modalEl) modalEl.style.display = 'none'; - - document.body.classList.remove('modal-open'); - document.body.style.overflow = 'auto'; - - document.querySelectorAll('.modal-backdrop').forEach((el) => el.remove()); }; const handleModalData = (modalType, item, masterType = selectedMaster) => { @@ -87,8 +79,9 @@ const MasterPage = () => { return ( <> {isCreateModalOpen && ( - - + setIsCreateModalOpen(false)} size={modalConfig.masterType === "Application Role" ? "lg":"md"}> + + )}
@@ -162,7 +155,6 @@ const MasterPage = () => { data-bs-target="#master-modal" onClick={() => { handleModalData(selectedMaster, "null", selectedMaster) - }} > diff --git a/src/pages/master/MasterTable.jsx b/src/pages/master/MasterTable.jsx index bc7c10c0..bf27147d 100644 --- a/src/pages/master/MasterTable.jsx +++ b/src/pages/master/MasterTable.jsx @@ -75,13 +75,8 @@ const MasterTable = ({ data, columns, loading, handleModalData }) => { {loading ? (

Loading...

) : ( - - +
+ -- 2.43.0
{selectedMaster === "Activity" ? "Activity" : "Name"}