diff --git a/src/Components/Case/CaseDetailsPage.js b/src/Components/Case/CaseDetailsPage.js index 2d8d818..709466c 100644 --- a/src/Components/Case/CaseDetailsPage.js +++ b/src/Components/Case/CaseDetailsPage.js @@ -4,6 +4,7 @@ import { DetailCard } from "../../pageElements/DetailCard.js"; import Button from "../../pageElements/Button"; import CreateModal from "../Modals/CreateModal.js"; import UploadModal from "../Modals/UploadModal.js"; +import ConfirmModal from "../Modals/ConfirmModal.js"; import { db } from "../../firebase"; import { useParams } from "react-router-dom"; import { AppContext } from "../../Hooks/useContext/appContext.js"; @@ -17,6 +18,7 @@ const CaseDetailsPage = () => { const navigate = useNavigate(); const [showUploadModal, setShowUploadModal] = useState(); const [showCreateModal, setShowCreateModal] = useState(); + const [showConfirmModal, setShowConfirmModal] = useState(); const [isLoading, setIsLoading] = useState(false); const { appState } = useContext(AppContext); const { group } = appState; @@ -64,12 +66,19 @@ const CaseDetailsPage = () => { const allowed = Number(temp.docsAllowed); const generated = Number(temp.docsGenerated); if (allowed - generated > 0) { - console.log("greater than do some shit"); setShowUploadModal(true); } else { - console.log("fuck you"); + setShowConfirmModal(true); } }; + + const handleCancelConfirm = () => { + setShowConfirmModal(false); + }; + + const handleConfirmUpgrade = () => { + console.log("handle confirm upgrade"); + }; const handleSuccess = () => { setIsLoading(true); setShowUploadModal(false); @@ -127,6 +136,7 @@ const CaseDetailsPage = () => { const showUp = showUploadModal && subCase !== null ? true : false; const showCreate = showCreateModal && subCase !== null ? true : false; + const showConfirm = showConfirmModal && subCase !== null ? true : false; return (