diff --git a/frontend/src/views/SecretApprovalPage/components/ApprovalPolicyList/ApprovalPolicyList.tsx b/frontend/src/views/SecretApprovalPage/components/ApprovalPolicyList/ApprovalPolicyList.tsx index fb21521c9..2639f2351 100644 --- a/frontend/src/views/SecretApprovalPage/components/ApprovalPolicyList/ApprovalPolicyList.tsx +++ b/frontend/src/views/SecretApprovalPage/components/ApprovalPolicyList/ApprovalPolicyList.tsx @@ -177,7 +177,7 @@ export const ApprovalPolicyList = ({ workspaceId }: IProps) => { } > Type diff --git a/frontend/src/views/SecretApprovalPage/components/SecretApprovalRequest/components/SecretApprovalRequestAction.tsx b/frontend/src/views/SecretApprovalPage/components/SecretApprovalRequest/components/SecretApprovalRequestAction.tsx index 8e9133e5b..05db75a9d 100644 --- a/frontend/src/views/SecretApprovalPage/components/SecretApprovalRequest/components/SecretApprovalRequestAction.tsx +++ b/frontend/src/views/SecretApprovalPage/components/SecretApprovalRequest/components/SecretApprovalRequestAction.tsx @@ -1,20 +1,22 @@ +import React, { useState } from "react"; import { faCheck, faClose, + faLandMineOn, faLockOpen, faSquareCheck, faSquareXmark, - faUserLock -} from "@fortawesome/free-solid-svg-icons"; + faUserLock} from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { twMerge } from "tailwind-merge"; import { createNotification } from "@app/components/notifications"; -import { Button } from "@app/components/v2"; +import { Button, Checkbox } from "@app/components/v2"; import { usePerformSecretApprovalRequestMerge, useUpdateSecretApprovalRequestStatus } from "@app/hooks/api"; +import { EnforcementLevel } from "@app/hooks/api/policies/enums"; type Props = { approvalRequestId: string; @@ -25,6 +27,7 @@ type Props = { canApprove?: boolean; statusChangeByEmail?: string; workspaceId: string; + enforcementLevel: EnforcementLevel; }; export const SecretApprovalRequestAction = ({ @@ -34,7 +37,8 @@ export const SecretApprovalRequestAction = ({ isMergable, approvals, statusChangeByEmail, - workspaceId, + workspaceId, + enforcementLevel, canApprove }: Props) => { const { mutateAsync: performSecretApprovalMerge, isLoading: isMerging } = @@ -43,6 +47,8 @@ export const SecretApprovalRequestAction = ({ const { mutateAsync: updateSecretStatusChange, isLoading: isStatusChanging } = useUpdateSecretApprovalRequestStatus(); + const [byPassApproval, setByPassApproval] = useState(false); + const handleSecretApprovalRequestMerge = async () => { try { await performSecretApprovalMerge({ @@ -82,6 +88,8 @@ export const SecretApprovalRequestAction = ({ } }; + const isSoftEnforcement = enforcementLevel === EnforcementLevel.Soft; + if (!hasMerged && status === "open") { return (