diff --git a/frontend/src/views/Project/CaPage/CaPage.tsx b/frontend/src/views/Project/CaPage/CaPage.tsx index fcf56a50e..7721ed260 100644 --- a/frontend/src/views/Project/CaPage/CaPage.tsx +++ b/frontend/src/views/Project/CaPage/CaPage.tsx @@ -22,7 +22,6 @@ import { usePopUp } from "@app/hooks/usePopUp"; import { CaModal } from "@app/views/Project/CertificatesPage/components/CaTab/components/CaModal"; import { CaInstallCertModal } from "../CertificatesPage/components/CaTab/components/CaInstallCertModal"; -import { CaEnrollmentModal } from "./components/CaEnrollmentModal"; import { CaCertificatesSection, CaDetailsSection, CaRenewalModal } from "./components"; export const CaPage = withProjectPermission( @@ -126,7 +125,6 @@ export const CaPage = withProjectPermission( )} - { if (data) { @@ -143,6 +145,11 @@ export const CertificateTemplateEnrollmentModal = ({ popUp, handlePopUpToggle }: )} /> + {data && ( + + + + )} ( - + setIsPassphraseFocused.on()} + onBlur={() => setIsPassphraseFocused.off()} + /> )} /> diff --git a/frontend/src/views/Project/CertificatesPage/components/CertificatesTab/components/CertificateTemplatesTable.tsx b/frontend/src/views/Project/CertificatesPage/components/CertificatesTab/components/CertificateTemplatesTable.tsx index 0dddeb4e2..e5abf4b0e 100644 --- a/frontend/src/views/Project/CertificatesPage/components/CertificatesTab/components/CertificateTemplatesTable.tsx +++ b/frontend/src/views/Project/CertificatesPage/components/CertificatesTab/components/CertificateTemplatesTable.tsx @@ -80,16 +80,27 @@ export const CertificateTemplatesTable = ({ handlePopUpOpen }: Props) => { > Manage Policies - - handlePopUpOpen("enrollmentOptions", { - id: certificateTemplate.id - }) - } - icon={} + - Manage Enrollment - + {(isAllowed) => ( + + handlePopUpOpen("enrollmentOptions", { + id: certificateTemplate.id + }) + } + className={twMerge( + !isAllowed && "pointer-events-none cursor-not-allowed opacity-50" + )} + disabled={!isAllowed} + icon={} + > + Manage Enrollment + + )} +