Skip to content

Commit

Permalink
Merge branch 'KelvinTegelaar:dev' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
bmsimp authored Jan 31, 2025
2 parents 9470053 + 2198b45 commit bcf469c
Show file tree
Hide file tree
Showing 52 changed files with 490 additions and 127 deletions.
4 changes: 2 additions & 2 deletions src/components/CippFormPages/CippAddGroupForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const CippAddGroupForm = (props) => {
formControl={formControl}
name="owners"
label="Owners"
multiple={false}
multiple={true}
select={"id,userPrincipalName,displayName"}
/>
</Grid>
Expand All @@ -62,7 +62,7 @@ const CippAddGroupForm = (props) => {
formControl={formControl}
name="members"
label="Members"
multiple={false}
multiple={true}
select={"id,userPrincipalName,displayName"}
/>
</Grid>
Expand Down
3 changes: 1 addition & 2 deletions src/components/CippFormPages/CippFormPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const CippFormPage = (props) => {
formControl,
postUrl,
customDataformatter,
resetForm = true,
resetForm = false,
hideBackButton = false,
hidePageType = false,
hideTitle = false,
Expand All @@ -36,7 +36,6 @@ const CippFormPage = (props) => {
...other
} = props;
const router = useRouter();

//check if there are
const postCall = ApiPostCall({
datafromUrl: true,
Expand Down
23 changes: 12 additions & 11 deletions src/components/CippStandards/CippStandardsSideBar.jsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
import PropTypes from "prop-types";
import {
Card,
CardContent,
CardHeader,
Divider,
formControlLabelClasses,
Stack,
SvgIcon,
Typography,
} from "@mui/material";
import { Card, CardContent, CardHeader, Divider, Stack, SvgIcon, Typography } from "@mui/material";
import { styled } from "@mui/material/styles";
import {
Timeline,
Expand All @@ -24,7 +15,7 @@ import { ActionListItem } from "/src/components/action-list-item";
import CheckIcon from "@heroicons/react/24/outline/CheckIcon";
import CloseIcon from "@mui/icons-material/Close";
import { useWatch } from "react-hook-form";
import { useEffect, useState } from "react";
import { use, useEffect, useState } from "react";
import _ from "lodash";
import CippFormComponent from "/src/components/CippComponents/CippFormComponent";
import { CippFormTenantSelector } from "../CippComponents/CippFormTenantSelector";
Expand Down Expand Up @@ -127,6 +118,15 @@ const CippStandardsSideBar = ({
fullWidth
/>
<Divider />
<CippFormComponent
type="richText"
name="description"
label="Description"
formControl={formControl}
placeholder="Enter a description for the template"
fullWidth
/>
<Divider />
<CippFormTenantSelector
allTenants={true}
label="Included Tenants"
Expand Down Expand Up @@ -225,6 +225,7 @@ const CippStandardsSideBar = ({
data: {
tenantFilter: "tenantFilter",
excludedTenants: "excludedTenants",
description: "description",
templateName: "templateName",
standards: "standards",
...(edit ? { GUID: "GUID" } : {}),
Expand Down
29 changes: 29 additions & 0 deletions src/components/bulk-actions-menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,33 @@ import PropTypes from "prop-types";
import ChevronDownIcon from "@heroicons/react/24/outline/ChevronDownIcon";
import { Button, Link, ListItemText, Menu, MenuItem, SvgIcon } from "@mui/material";
import { usePopover } from "../hooks/use-popover";
import { FilePresent, Laptop, Mail, Share, Shield, ShieldMoon } from "@mui/icons-material";
import { GlobeAltIcon, UsersIcon, ServerIcon } from "@heroicons/react/24/outline";

function getIconByName(iconName) {
switch (iconName) {
case "GlobeAltIcon":
return <GlobeAltIcon />;
case "Mail":
return <Mail />;
case "UsersIcon":
return <UsersIcon />;
case "FilePresent":
return <FilePresent />;
case "ServerIcon":
return <ServerIcon />;
case "Laptop":
return <Laptop />;
case "Share":
return <Share />;
case "Shield":
return <Shield />;
case "ShieldMoon":
return <ShieldMoon />;
default:
return null;
}
}

export const BulkActionsMenu = (props) => {
const { buttonName, sx, row, actions = [], ...other } = props;
Expand Down Expand Up @@ -55,12 +82,14 @@ export const BulkActionsMenu = (props) => {
target="_blank"
rel="noreferrer"
>
<SvgIcon sx={{ mr: 1 }}>{getIconByName(action.icon)}</SvgIcon>
<ListItemText primary={action.label} />
</MenuItem>
);
} else {
return (
<MenuItem key={index} onClick={action.onClick}>
<SvgIcon sx={{ mr: 1 }}>{getIconByName(action.icon)}</SvgIcon>
<ListItemText primary={action.label} />
</MenuItem>
);
Expand Down
34 changes: 17 additions & 17 deletions src/data/portals.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"variable": "customerId",
"target": "_blank",
"external": true,
"icon": "cog"
"icon": "GlobeAltIcon"
},
{
"label": "Exchange Portal",
Expand All @@ -15,7 +15,7 @@
"variable": "defaultDomainName",
"target": "_blank",
"external": true,
"icon": "mail-bulk"
"icon": "Mail"
},
{
"label": "Entra Portal",
Expand All @@ -24,7 +24,7 @@
"variable": "defaultDomainName",
"target": "_blank",
"external": true,
"icon": "users"
"icon": "UsersIcon"
},
{
"label": "Teams Portal",
Expand All @@ -33,7 +33,7 @@
"variable": "defaultDomainName",
"target": "_blank",
"external": true,
"icon": "comments"
"icon": "FilePresent"
},
{
"label": "Azure Portal",
Expand All @@ -42,7 +42,7 @@
"variable": "defaultDomainName",
"target": "_blank",
"external": true,
"icon": "server"
"icon": "ServerIcon"
},
{
"label": "Intune Portal",
Expand All @@ -51,7 +51,16 @@
"variable": "defaultDomainName",
"target": "_blank",
"external": true,
"icon": "laptop-code"
"icon": "Laptop"
},
{
"label": "SharePoint Admin",
"name": "SharePoint_Admin",
"url": "https://admin.microsoft.com/Partner/beginclientsession.aspx?CTID=customerId&CSDEST=SharePoint",
"variable": "customerId",
"target": "_blank",
"external": true,
"icon": "Share"
},
{
"label": "Security Portal",
Expand All @@ -60,7 +69,7 @@
"variable": "customerId",
"target": "_blank",
"external": true,
"icon": "shield-alt"
"icon": "Shield"
},
{
"label": "Compliance Portal",
Expand All @@ -69,15 +78,6 @@
"variable": "customerId",
"target": "_blank",
"external": true,
"icon": "shield-alt"
},
{
"label": "SharePoint Admin",
"name": "SharePoint_Admin",
"url": "https://admin.microsoft.com/Partner/beginclientsession.aspx?CTID=customerId&CSDEST=SharePoint",
"variable": "customerId",
"target": "_blank",
"external": true,
"icon": "book"
"icon": "ShieldMoon"
}
]
7 changes: 6 additions & 1 deletion src/pages/cipp/settings/tenants.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import tabOptions from "./tabOptions";
import { Button, SvgIcon } from "@mui/material";
import { CippApiDialog } from "/src/components/CippComponents/CippApiDialog";
import { useDialog } from "/src/hooks/use-dialog";
import { Sync } from "@mui/icons-material";
import { Sync, Block, PlayArrow, RestartAlt, Delete, Add } from "@mui/icons-material";

const Page = () => {
const pageTitle = "Tenants - Backend";
Expand All @@ -17,6 +17,7 @@ const Page = () => {
label: "Exclude Tenants",
type: "POST",
url: `/api/ExecExcludeTenant?AddExclusion=true`,
icon: <Block />,
data: { value: "customerId" },
confirmText: "Are you sure you want to exclude these tenants?",
multiPost: false,
Expand All @@ -25,6 +26,7 @@ const Page = () => {
label: "Include Tenants",
type: "POST",
url: `/api/ExecExcludeTenant?RemoveExclusion=true`,
icon: <Add />,
data: { value: "customerId" },
confirmText: "Are you sure you want to include these tenants?",
multiPost: false,
Expand All @@ -33,6 +35,7 @@ const Page = () => {
label: "Refresh CPV Permissions",
type: "POST",
url: `/api/ExecCPVPermissions`,
icon: <PlayArrow />,
data: { TenantFilter: "customerId" },
confirmText: "Are you sure you want to refresh the CPV permissions for these tenants?",
multiPost: false,
Expand All @@ -41,6 +44,7 @@ const Page = () => {
label: "Reset CPV Permissions",
type: "POST",
url: `/api/ExecCPVPermissions?&ResetSP=true`,
icon: <RestartAlt />,
data: { TenantFilter: "customerId" },
confirmText:
"Are you sure you want to reset the CPV permissions for these tenants? (This will delete the Service Principal and re-add it.)",
Expand All @@ -50,6 +54,7 @@ const Page = () => {
label: "Remove Tenant",
type: "POST",
url: `/api/ExecRemoveTenant`,
icon: <Delete />,
data: { TenantID: "customerId" },
confirmText: "Are you sure you want to remove this tenant?",
multiPost: false,
Expand Down
8 changes: 6 additions & 2 deletions src/pages/email/administration/contacts/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Layout as DashboardLayout } from "/src/layouts/index.js";
import { CippTablePage } from "/src/components/CippComponents/CippTablePage.jsx";
import { Edit } from "@mui/icons-material";
import { Edit, PersonAdd } from "@mui/icons-material";
import { Button } from "@mui/material";
import Link from "next/link";
import TrashIcon from '@heroicons/react/24/outline/TrashIcon';
Expand Down Expand Up @@ -40,7 +40,11 @@ const Page = () => {
simpleColumns={simpleColumns}
cardButton={
<>
<Button component={Link} href="/email/administration/contacts/add">
<Button
component={Link}
href="/email/administration/contacts/add"
startIcon={<PersonAdd />}
>
Add contact
</Button>
</>
Expand Down
7 changes: 6 additions & 1 deletion src/pages/email/administration/mailboxes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Layout as DashboardLayout } from "/src/layouts/index.js";
import { CippTablePage } from "/src/components/CippComponents/CippTablePage.jsx";
import Link from "next/link";
import { Button } from "@mui/material";
import { Add } from "@mui/icons-material";

import {
Archive,
Expand Down Expand Up @@ -269,7 +270,11 @@ const Page = () => {
filters={filterList}
cardButton={
<>
<Button component={Link} href="/email/administration/mailboxes/addshared">
<Button
component={Link}
startIcon={<Add />}
href="/email/administration/mailboxes/addshared"
>
Add Shared Mailbox
</Button>
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import { Layout as DashboardLayout } from "/src/layouts/index.js";
import { CippTablePage } from "/src/components/CippComponents/CippTablePage.jsx";
import { Button } from "@mui/material";
import Link from "next/link";
import TrashIcon from '@heroicons/react/24/outline/TrashIcon';
import TrashIcon from "@heroicons/react/24/outline/TrashIcon";
import { PlaylistAdd } from "@mui/icons-material";

const Page = () => {
const pageTitle = "Tenant Allow/Block Lists";
Expand Down Expand Up @@ -49,7 +50,11 @@ const Page = () => {
}}
cardButton={
<>
<Button component={Link} href="/email/administration/tenant-allow-block-lists/add">
<Button
component={Link}
href="/email/administration/tenant-allow-block-lists/add"
startIcon={<PlaylistAdd />}
>
Add Entry
</Button>
</>
Expand Down
7 changes: 6 additions & 1 deletion src/pages/email/resources/management/list-rooms/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Layout as DashboardLayout } from "/src/layouts/index.js";
import { CippTablePage } from "/src/components/CippComponents/CippTablePage.jsx";
import { Button } from "@mui/material";
import Link from "next/link";
import { AddHomeWork } from "@mui/icons-material";

const Page = () => {
const pageTitle = "Rooms";
Expand All @@ -12,7 +13,11 @@ const Page = () => {
apiUrl="/api/ListRooms"
simpleColumns={["displayName", "building", "floorNumber", "capacity", "bookingType"]}
cardButton={
<Button component={Link} href="/email/resources/management/list-rooms/add">
<Button
component={Link}
href="/email/resources/management/list-rooms/add"
startIcon={<AddHomeWork />}
>
Add Room
</Button>
}
Expand Down
4 changes: 3 additions & 1 deletion src/pages/email/resources/management/room-lists/index.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
import { Layout as DashboardLayout } from "/src/layouts/index.js";
import { CippTablePage } from "/src/components/CippComponents/CippTablePage.jsx";
import { Visibility } from "@mui/icons-material";

const Page = () => {
const pageTitle = "Room Lists";
const apiUrl = "/api/ListRoomLists"
const apiUrl = "/api/ListRoomLists";

const actions = [
{
label: "View included Rooms",
link: `/email/resources/management/room-lists/list/view?roomAddress=[emailAddress]`,
color: "info",
icon: <Visibility />,
},
];

Expand Down
8 changes: 6 additions & 2 deletions src/pages/email/spamfilter/list-connectionfilter/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Layout as DashboardLayout } from "/src/layouts/index.js";
import { CippTablePage } from "/src/components/CippComponents/CippTablePage.jsx";
import { Button } from "@mui/material";
import { Book } from "@mui/icons-material";
import { Book, AddModerator } from "@mui/icons-material";
import Link from "next/link";

const Page = () => {
Expand Down Expand Up @@ -45,7 +45,11 @@ const Page = () => {
simpleColumns={simpleColumns}
cardButton={
<>
<Button component={Link} href="/email/spamfilter/list-connectionfilter/add">
<Button
component={Link}
href="/email/spamfilter/list-connectionfilter/add"
startIcon={<AddModerator />}
>
Deploy ConnectionFilter
</Button>
</>
Expand Down
Loading

0 comments on commit bcf469c

Please sign in to comment.