Skip to content

Commit

Permalink
text clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
al-rosenthal committed Dec 12, 2023
1 parent 5f942dd commit ebcb1f1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion app/src/components/security/SecuritiesDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ interface ISecuritiesDialogProps {
}

export const SecurityRuleYupSchema = yup.object().shape({
rules: yup.array(yup.number())
rules: yup.array(yup.object()).min(1)
});

export interface ISecurityRuleFormProps {
Expand Down
11 changes: 4 additions & 7 deletions app/src/components/security/SecurityRuleForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,26 +29,23 @@ const SecurityRuleForm = () => {
return (
<form onSubmit={handleSubmit}>
<Box component="fieldset">
<Typography component="legend">Manage Team Members</Typography>
<Typography component="legend">Manage Security Rules</Typography>
<Typography
variant="body1"
color="textSecondary"
sx={{
maxWidth: '72ch'
}}>
A minimum of one team member must be assigned the coordinator role.
A minimum of one security rule must be selected.
</Typography>
{errors?.['participants'] && !values.rules.length && (
{errors?.['rules'] && !values.rules.length && (
<Box mt={3}>
<Alert severity="error" variant="standard">
<AlertTitle>No Rules Selected</AlertTitle>
At least one team member needs to be added to this project.
At least one security rule needs to be selected.
</Alert>
</Box>
)}
{errors?.['participants'] && values.rules.length > 0 && (
<Box mt={3}>{/* <AlertBar severity="error" variant="standard" title={''} text={''} /> */}</Box>
)}
<FieldArray name="rules">
{(helpers: FieldArrayRenderProps) => (
<>
Expand Down

0 comments on commit ebcb1f1

Please sign in to comment.