From e2471645bffa8c021445fb6e09b689625c7af44b Mon Sep 17 00:00:00 2001 From: dinesh Date: Fri, 20 Dec 2024 13:45:28 -0800 Subject: [PATCH] Reopen confirmation dialog --- .../App/CaseFiles/Profile/CaseFileActions.tsx | 25 +++++++++++++------ 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/compliance-web/src/components/App/CaseFiles/Profile/CaseFileActions.tsx b/compliance-web/src/components/App/CaseFiles/Profile/CaseFileActions.tsx index fe474c4..a55343f 100644 --- a/compliance-web/src/components/App/CaseFiles/Profile/CaseFileActions.tsx +++ b/compliance-web/src/components/App/CaseFiles/Profile/CaseFileActions.tsx @@ -1,5 +1,6 @@ -import React, { useCallback } from "react"; +import LinkCaseFileModal from "@/components/App/CaseFiles/Profile/LinkCaseFileModal"; import MenuActionDropdown from "@/components/Shared/MenuActionDropdown"; +import ConfirmationModal from "@/components/Shared/Popups/ConfirmationModal"; import { useDeleteCaseFile, useLinkCaseFile, @@ -7,12 +8,11 @@ import { useUpdateCaseFileStatus, } from "@/hooks/useCaseFiles"; import { CaseFile } from "@/models/CaseFile"; -import { useQueryClient } from "@tanstack/react-query"; -import ConfirmationModal from "@/components/Shared/Popups/ConfirmationModal"; import { useModal } from "@/store/modalStore"; import { notify } from "@/store/snackbarStore"; +import { useQueryClient } from "@tanstack/react-query"; import { useRouter } from "@tanstack/react-router"; -import LinkCaseFileModal from "@/components/App/CaseFiles/Profile/LinkCaseFileModal"; +import React, { useCallback } from "react"; interface CaseFileActionsProps { status: string; @@ -132,9 +132,20 @@ const CaseFileActions: React.FC = ({ text: "Reopen Case File", onClick: () => { // Handle reopening case file - updateCaseFileStatus({ - id: caseFileData?.id ?? 0, - caseFileStatus: { status: "OPEN" }, + setOpen({ + content: ( + { + updateCaseFileStatus({ + id: caseFileData?.id ?? 0, + caseFileStatus: { status: "OPEN" }, + }); + }} + /> + ), }); }, hidden: status?.toLowerCase() === "open",