Skip to content

Commit 0f0e031

Browse files
Merge pull request #4233 from Jr7468/DynamicM365
Modified CippAddGroupForm to add dynamic membership rules for M365 groups
2 parents 5d14889 + c07da99 commit 0f0e031

File tree

2 files changed

+31
-20
lines changed

2 files changed

+31
-20
lines changed

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,8 @@ yarn-error.log*
2727

2828
# vscode debug logs
2929
debug.log
30-
app.log
30+
app.log
31+
32+
# Cursor IDE
33+
.cursor/rules
34+

src/components/CippFormPages/CippAddGroupForm.jsx

Lines changed: 26 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,21 @@ import { CippFormCondition } from "/src/components/CippComponents/CippFormCondit
66
import { CippFormDomainSelector } from "../CippComponents/CippFormDomainSelector";
77
import { CippFormUserSelector } from "../CippComponents/CippFormUserSelector";
88

9+
const DynamicMembershipRules = ({ formControl }) => (
10+
<Grid item size={{ xs: 12 }}>
11+
<CippFormComponent
12+
type="textField"
13+
label="Dynamic Group Parameters"
14+
name="membershipRules"
15+
formControl={formControl}
16+
placeholder="Enter dynamic group parameters syntax"
17+
multiline
18+
rows={4}
19+
fullWidth
20+
/>
21+
</Grid>
22+
);
23+
924
const CippAddGroupForm = (props) => {
1025
const { formControl } = props;
1126

@@ -101,25 +116,17 @@ const CippAddGroupForm = (props) => {
101116
/>
102117
</Grid>
103118
</CippFormCondition>
104-
<CippFormCondition
105-
formControl={formControl}
106-
field="groupType"
107-
compareType="contains"
108-
compareValue="dynamic"
109-
>
110-
<Grid item size={{ xs: 12 }}>
111-
<CippFormComponent
112-
type="textField"
113-
label="Dynamic Group Parameters"
114-
name="membershipRules"
115-
formControl={formControl}
116-
placeholder="Enter dynamic group parameters syntax"
117-
multiline
118-
rows={4}
119-
fullWidth
120-
/>
121-
</Grid>
122-
</CippFormCondition>
119+
{["dynamic", "dynamicDistribution", "m365"].map((groupType) => (
120+
<CippFormCondition
121+
key={groupType}
122+
formControl={formControl}
123+
field="groupType"
124+
compareType="is"
125+
compareValue={groupType}
126+
>
127+
<DynamicMembershipRules formControl={formControl} />
128+
</CippFormCondition>
129+
))}
123130
</Grid>
124131
);
125132
};

0 commit comments

Comments
 (0)