Skip to content

Feat: Enhance tenant selection and add Deploy Policy button #4468

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const Page = () => {
name="selectedTenants"
type="multiple"
allTenants={true}
preselectedEnabled={true}
validators={{ required: "At least one tenant must be selected" }}
/>
</Grid>
Expand Down
1 change: 1 addition & 0 deletions src/pages/email/spamfilter/list-connectionfilter/add.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ const AddPolicy = () => {
name="selectedTenants"
type="multiple"
allTenants={true}
preselectedEnabled={true}
validators={{ required: "At least one tenant must be selected" }}
/>
</Grid>
Expand Down
127 changes: 61 additions & 66 deletions src/pages/email/spamfilter/list-quarantine-policies/add.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ const AddPolicy = () => {
name="selectedTenants"
type="multiple"
allTenants={true}
preselectedEnabled={true}
validators={{ required: "At least one tenant must be selected" }}
/>
</Grid>
Expand All @@ -72,73 +73,67 @@ const AddPolicy = () => {
</Grid> */}

<Divider sx={{ my: 2, width: "100%" }} />
<Grid xs={6} >
<CippFormComponent
type="textField"
label="Policy Name"
name="Name"
placeholder="Enter policy name"
formControl={formControl}
required={true}
/>
<Divider sx={{ my: 2, width: "100%" }} />
<CippFormComponent
type="autoComplete"
label="Release Action Preference"
name="ReleaseActionPreference"
placeholder="Select release action preference"
formControl={formControl}
required={true}
multiple={false}
options={[
{ label: "Release", value: "Release" },
{ label: "Request Release", value: "RequestRelease" },
]}
/>
</Grid>
<Grid xs={6}>
<CippFormComponent
type="textField"
label="Policy Name"
name="Name"
placeholder="Enter policy name"
formControl={formControl}
required={true}
/>
<Divider sx={{ my: 2, width: "100%" }} />
<CippFormComponent
type="autoComplete"
label="Release Action Preference"
name="ReleaseActionPreference"
placeholder="Select release action preference"
formControl={formControl}
required={true}
multiple={false}
options={[
{ label: "Release", value: "Release" },
{ label: "Request Release", value: "RequestRelease" },
]}
/>
</Grid>

<Grid xs={2}>

<CippFormComponent
type="switch"
label="Delete"
name="Delete"
formControl={formControl}
/>
<CippFormComponent
type="switch"
label="Preview"
name="Preview"
formControl={formControl}
/>
<CippFormComponent
type="switch"
label="Block Sender"
name="BlockSender"
formControl={formControl}
/>
<CippFormComponent
type="switch"
label="Allow Sender"
name="AllowSender"
formControl={formControl}
/>
</Grid>
<Grid xs={4}>
<CippFormComponent
type="switch"
label="Quarantine Notification"
name="QuarantineNotification"
formControl={formControl}
/>
<CippFormComponent
type="switch"
label="Include Messages From Blocked Sender Address"
name="IncludeMessagesFromBlockedSenderAddress"
formControl={formControl}
disabled={!quarantineNotification}
/>
</Grid>
<Grid xs={2}>
<CippFormComponent type="switch" label="Delete" name="Delete" formControl={formControl} />
<CippFormComponent
type="switch"
label="Preview"
name="Preview"
formControl={formControl}
/>
<CippFormComponent
type="switch"
label="Block Sender"
name="BlockSender"
formControl={formControl}
/>
<CippFormComponent
type="switch"
label="Allow Sender"
name="AllowSender"
formControl={formControl}
/>
</Grid>
<Grid xs={4}>
<CippFormComponent
type="switch"
label="Quarantine Notification"
name="QuarantineNotification"
formControl={formControl}
/>
<CippFormComponent
type="switch"
label="Include Messages From Blocked Sender Address"
name="IncludeMessagesFromBlockedSenderAddress"
formControl={formControl}
disabled={!quarantineNotification}
/>
</Grid>
</Grid>
</CippFormPage>
);
Expand Down
1 change: 1 addition & 0 deletions src/pages/email/spamfilter/list-spamfilter/add.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ const AddPolicy = () => {
name="selectedTenants"
type="multiple"
allTenants={true}
preselectedEnabled={true}
validators={{ required: "At least one tenant must be selected" }}
/>
</Grid>
Expand Down
1 change: 1 addition & 0 deletions src/pages/email/transport/list-connectors/add.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ const AddPolicy = () => {
name="selectedTenants"
type="multiple"
allTenants={true}
preselectedEnabled={true}
validators={{ required: "At least one tenant must be selected" }}
/>
</Grid>
Expand Down
1 change: 1 addition & 0 deletions src/pages/email/transport/list-rules/add.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ const AddPolicy = () => {
name="selectedTenants"
type="multiple"
allTenants={true}
preselectedEnabled={true}
validators={{ required: "At least one tenant must be selected" }}
/>
</Grid>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/endpoint/MEM/add-policy/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const Page = () => {
title: "Step 1",
description: "Tenant Selection",
component: CippTenantStep,
componentProps: { type: "multiple", valueField: "customerId" },
componentProps: { type: "multiple" },
},
{
title: "Step 2",
Expand Down
15 changes: 14 additions & 1 deletion src/pages/endpoint/MEM/list-appprotection-policies/index.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import { Layout as DashboardLayout } from "/src/layouts/index.js";
import { CippTablePage } from "/src/components/CippComponents/CippTablePage.jsx";
import { Book } from "@mui/icons-material";
import { Book, RocketLaunch } from "@mui/icons-material";
import { TrashIcon } from "@heroicons/react/24/outline";
import { PermissionButton } from "/src/utils/permissions.js";
import Link from "next/link";

const Page = () => {
const pageTitle = "App Protection & Configuration Policies";
const cardButtonPermissions = ["Endpoint.MEM.ReadWrite"];

const actions = [
{
Expand Down Expand Up @@ -58,6 +61,16 @@ const Page = () => {
actions={actions}
offCanvas={offCanvas}
simpleColumns={simpleColumns}
cardButton={
<PermissionButton
requiredPermissions={cardButtonPermissions}
component={Link}
href="/endpoint/MEM/add-policy"
startIcon={<RocketLaunch />}
>
Deploy Policy
</PermissionButton>
}
/>
);
};
Expand Down
15 changes: 14 additions & 1 deletion src/pages/endpoint/MEM/list-compliance-policies/index.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import { Layout as DashboardLayout } from "/src/layouts/index.js";
import { CippTablePage } from "/src/components/CippComponents/CippTablePage.jsx";
import { Book, LaptopChromebook } from "@mui/icons-material";
import { Book, LaptopChromebook, RocketLaunch } from "@mui/icons-material";
import { GlobeAltIcon, TrashIcon, UserIcon } from "@heroicons/react/24/outline";
import { PermissionButton } from "/src/utils/permissions.js";
import Link from "next/link";

const Page = () => {
const pageTitle = "Intune Compliance Policies";
const cardButtonPermissions = ["Endpoint.MEM.ReadWrite"];

const actions = [
{
Expand Down Expand Up @@ -99,6 +102,16 @@ const Page = () => {
actions={actions}
offCanvas={offCanvas}
simpleColumns={simpleColumns}
cardButton={
<PermissionButton
requiredPermissions={cardButtonPermissions}
component={Link}
href="/endpoint/MEM/add-policy"
startIcon={<RocketLaunch />}
>
Deploy Policy
</PermissionButton>
}
/>
);
};
Expand Down
15 changes: 14 additions & 1 deletion src/pages/endpoint/MEM/list-policies/index.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import { Layout as DashboardLayout } from "/src/layouts/index.js";
import { CippTablePage } from "/src/components/CippComponents/CippTablePage.jsx";
import { Book, LaptopChromebook } from "@mui/icons-material";
import { Book, LaptopChromebook, RocketLaunch } from "@mui/icons-material";
import { GlobeAltIcon, TrashIcon, UserIcon } from "@heroicons/react/24/outline";
import { PermissionButton } from "/src/utils/permissions.js";
import Link from "next/link";

const Page = () => {
const pageTitle = "Configuration Policies";
const cardButtonPermissions = ["Endpoint.MEM.ReadWrite"];

const actions = [
{
Expand Down Expand Up @@ -98,6 +101,16 @@ const Page = () => {
actions={actions}
offCanvas={offCanvas}
simpleColumns={simpleColumns}
cardButton={
<PermissionButton
requiredPermissions={cardButtonPermissions}
component={Link}
href="/endpoint/MEM/add-policy"
startIcon={<RocketLaunch />}
>
Deploy Policy
</PermissionButton>
}
/>
);
};
Expand Down
1 change: 1 addition & 0 deletions src/pages/endpoint/applications/list/add.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ const ApplicationDeploymentForm = () => {
name="selectedTenants"
type="multiple"
allTenants={true}
preselectedEnabled={true}
validators={{ required: "At least one tenant must be selected" }}
/>
</Grid>
Expand Down
3 changes: 2 additions & 1 deletion src/pages/endpoint/autopilot/add-status-page/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Divider } from "@mui/material";
import { Grid } from "@mui/system";
import { useForm} from "react-hook-form";
import { useForm } from "react-hook-form";
import { Layout as DashboardLayout } from "/src/layouts/index.js";
import CippFormPage from "/src/components/CippFormPages/CippFormPage";
import CippFormComponent from "/src/components/CippComponents/CippFormComponent";
Expand Down Expand Up @@ -40,6 +40,7 @@ const Page = () => {
name="selectedTenants"
type="multiple"
allTenants={true}
preselectedEnabled={true}
validators={{ required: "At least one tenant must be selected" }}
/>
</Grid>
Expand Down
1 change: 1 addition & 0 deletions src/pages/endpoint/autopilot/list-profiles/add.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ const AutopilotProfileForm = () => {
name="selectedTenants"
type="multiple"
allTenants={true}
preselectedEnabled={true}
validators={{ required: "At least one tenant must be selected" }}
/>
</Grid>
Expand Down
Loading
Loading