diff --git a/frontend/src/views/SecretApprovalPage/components/ApprovalPolicyList/components/AccessPolicyModal.tsx b/frontend/src/views/SecretApprovalPage/components/ApprovalPolicyList/components/AccessPolicyModal.tsx
index f2da726034..b0ec53accf 100644
--- a/frontend/src/views/SecretApprovalPage/components/ApprovalPolicyList/components/AccessPolicyModal.tsx
+++ b/frontend/src/views/SecretApprovalPage/components/ApprovalPolicyList/components/AccessPolicyModal.tsx
@@ -255,20 +255,76 @@ export const AccessPolicyForm = ({
name="secretPath"
render={({ field, fieldState: { error } }) => (
+
+
+ )}
+ />
+ (
+
-
+ field.onChange(parseInt(el.target.value, 10))}
+ />
)}
/>
+ (
+
+
+
+ )}
+ />
+ Approvers
(
@@ -276,7 +332,7 @@ export const AccessPolicyForm = ({
e.type=== ApproverType.User).length ? `${value.filter((e) => e.type=== ApproverType.User).length} selected` : "None"}
className="text-left"
/>
@@ -318,7 +374,7 @@ export const AccessPolicyForm = ({
name="approvers"
render={({ field: { value, onChange }, fieldState: { error } }) => (
@@ -326,7 +382,7 @@ export const AccessPolicyForm = ({
e.type=== ApproverType.Group).length ? `${value?.filter((e) => e.type=== ApproverType.Group).length} selected` : "None"}
className="text-left"
/>
@@ -339,7 +395,7 @@ export const AccessPolicyForm = ({
{groups && groups.map(({ group }) => {
const { id } = group;
- const isChecked = value?.includes({id, type: ApproverType.Group});
+ const isChecked = value?.filter((el: {id: string, type: ApproverType}) => el.id === id && el.type === ApproverType.Group).length > 0;
return (
)}
/>
- (
-
- field.onChange(parseInt(el.target.value, 10))}
- />
-
- )}
- />
- (
-
-
-
- )}
- />