mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
final touches
This commit is contained in:
@@ -197,7 +197,7 @@ export const PoliciesTable = ({ handlePopUpOpen }: Props) => {
|
||||
{isExpanded && (
|
||||
<Tr className="bg-mineshaft-800">
|
||||
<Td colSpan={7} className="p-0">
|
||||
<div className="flex max-h-80 w-full gap-2 gap-4 overflow-auto overflow-x-hidden p-4">
|
||||
<div className="flex max-h-80 w-full gap-4 overflow-auto overflow-x-hidden p-4">
|
||||
<div className="flex-1">
|
||||
<div className="mb-2 text-sm font-medium text-mineshaft-300">
|
||||
Approval Conditions
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { useEffect } from "react";
|
||||
import { Controller, useFormContext } from "react-hook-form";
|
||||
|
||||
import { TtlFormLabel } from "@app/components/features";
|
||||
@@ -7,15 +6,7 @@ import { FormControl, Input } from "@app/components/v2";
|
||||
import { TPolicyForm } from "../PolicySchema";
|
||||
|
||||
export const PolicyDetailsStep = () => {
|
||||
const {
|
||||
control,
|
||||
formState: { errors }
|
||||
} = useFormContext<TPolicyForm>();
|
||||
|
||||
useEffect(() => {
|
||||
console.log("YOOOO");
|
||||
console.log(errors);
|
||||
}, [errors]);
|
||||
const { control } = useFormContext<TPolicyForm>();
|
||||
|
||||
return (
|
||||
<div className="flex flex-col gap-4">
|
||||
|
||||
@@ -24,7 +24,7 @@ export const PolicyReviewStep = () => {
|
||||
const { data: members = [] } = useGetWorkspaceUsers(projectId);
|
||||
const { data: groups = [] } = useListWorkspaceGroups(projectId);
|
||||
|
||||
const { name, maxRequestTtl, conditions, constraints, steps } = watch();
|
||||
const { name, conditions, constraints, steps } = watch();
|
||||
|
||||
const getApproverLabel = (approverId: string, approverType: ApproverType) => {
|
||||
if (approverType === ApproverType.User) {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
export { PolicyApprovalSteps } from "./PolicyApprovalSteps";
|
||||
export { PolicyConstraintsStep } from "./PolicyConstraintsStep";
|
||||
export { PolicyDetailsStep } from "./PolicyDetailsStep";
|
||||
export { PolicyReviewStep } from "./PolicyReviewStep";
|
||||
|
||||
@@ -5,10 +5,10 @@ import {
|
||||
faArrowDown,
|
||||
faArrowUp,
|
||||
faCheckCircle,
|
||||
faClipboardCheck,
|
||||
faFilter,
|
||||
faFolderPlus,
|
||||
faMagnifyingGlass,
|
||||
faPen,
|
||||
faPlus,
|
||||
faSearch
|
||||
} from "@fortawesome/free-solid-svg-icons";
|
||||
@@ -328,11 +328,11 @@ export const PamAccountsTable = ({ projectId }: Props) => {
|
||||
</DropdownMenu>
|
||||
<Button
|
||||
variant="outline_bg"
|
||||
leftIcon={<FontAwesomeIcon icon={faPen} />}
|
||||
leftIcon={<FontAwesomeIcon icon={faClipboardCheck} />}
|
||||
onClick={() => handlePopUpOpen("requestAccount")}
|
||||
className="h-10 transition-colors"
|
||||
>
|
||||
Request Account
|
||||
Request Access
|
||||
</Button>
|
||||
<ProjectPermissionCan
|
||||
I={ProjectPermissionPamAccountActions.Create}
|
||||
|
||||
@@ -111,6 +111,7 @@ const Content = ({ onOpenChange, account, accountPath }: Props) => {
|
||||
control={control}
|
||||
render={({ field, fieldState: { error } }) => (
|
||||
<FormControl
|
||||
isRequired
|
||||
helperText="Account path including the account name. Supports glob patterns (e.g., /folder/**, /*/account-name)"
|
||||
errorText={error?.message}
|
||||
isError={Boolean(error?.message)}
|
||||
@@ -126,7 +127,6 @@ const Content = ({ onOpenChange, account, accountPath }: Props) => {
|
||||
render={({ field, fieldState: { error } }) => (
|
||||
<FormControl
|
||||
label={<TtlFormLabel label="Access Duration" />}
|
||||
helperText="Duration of access requested"
|
||||
errorText={error?.message}
|
||||
isError={Boolean(error?.message)}
|
||||
>
|
||||
@@ -139,7 +139,6 @@ const Content = ({ onOpenChange, account, accountPath }: Props) => {
|
||||
control={control}
|
||||
render={({ field, fieldState: { error } }) => (
|
||||
<FormControl
|
||||
helperText="Provide a reason for requesting access"
|
||||
errorText={error?.message}
|
||||
isError={Boolean(error?.message)}
|
||||
label="Justification"
|
||||
@@ -178,7 +177,7 @@ export const PamRequestAccountAccessModal = (props: Props) => {
|
||||
<ModalContent
|
||||
className="max-w-2xl pb-2"
|
||||
title="Request Account Access"
|
||||
subTitle="Request access to this account path"
|
||||
subTitle="Request access to an account path"
|
||||
>
|
||||
<Content {...props} />
|
||||
</ModalContent>
|
||||
|
||||
Reference in New Issue
Block a user