Skip to content

Commit

Permalink
Merge pull request #3354 from kris6673/gal
Browse files Browse the repository at this point in the history
Add Global Address List report page and update API methods to POST
  • Loading branch information
KelvinTegelaar authored Jan 19, 2025
2 parents 7b03168 + e4cd6a6 commit 2e9a739
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/layouts/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,10 @@ export const nativeMenuItems = [
title: "Shared Mailbox with Enabled Account",
path: "/email/reports/SharedMailboxEnabledAccount",
},
{
title: "Global Address List",
path: "/email/reports/global-address-list",
},
],
},
],
Expand Down
4 changes: 2 additions & 2 deletions src/pages/email/administration/mailboxes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const Page = () => {
},
{
label: "Hide from Global Address List",
type: "GET",
type: "POST",
url: "/api/ExecHideFromGAL",
data: {
ID: "UPN",
Expand All @@ -58,7 +58,7 @@ const Page = () => {
},
{
label: "Unhide from Global Address List",
type: "GET",
type: "POST",
url: "/api/ExecHideFromGAL",
data: {
ID: "UPN",
Expand Down
81 changes: 81 additions & 0 deletions src/pages/email/reports/global-address-list/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
import { Layout as DashboardLayout } from "/src/layouts/index.js";
import { CippTablePage } from "/src/components/CippComponents/CippTablePage.jsx";

const Page = () => {
const actions = [
{
label: "Unhide from Global Address List",
type: "POST",
url: "/api/ExecHideFromGAL",
data: {
HideFromGAL: false,
ID: "PrimarySmtpAddress",
},
confirmText: "Are you sure you want to show this mailbox in the Global Address List?",
},
{
label: "Hide from Global Address List",
type: "POST",
url: "/api/ExecHideFromGAL",
data: {
HideFromGAL: true,
ID: "PrimarySmtpAddress",
},
confirmText: "Are you sure you want to hide this mailbox from the Global Address List?",
},
];

const offCanvas = {
extendedInfoFields: [
"HiddenFromAddressListsEnabled",
"ExternalDirectoryObjectId",
"DisplayName",
"PrimarySmtpAddress",
"RecipientType",
"RecipientTypeDetails",
"IsDirSynced",
"SKUAssigned",
"EmailAddresses",
],
actions: actions,
};

const filters = [
{
filterName: "Hidden from GAL",
value: [{ id: "HiddenFromAddressListsEnabled", value: "Yes" }],
type: "column",
},
{
filterName: "Shown in GAL",
value: [{ id: "HiddenFromAddressListsEnabled", value: "No" }],
type: "column",
},
{
filterName: "Cloud only mailboxes",
value: [{ id: "IsDirSynced", value: "No" }],
type: "column",
},
];

return (
<CippTablePage
title="Global Address List"
apiUrl="/api/ListGlobalAddressList"
actions={actions}
offCanvas={offCanvas}
filters={filters}
simpleColumns={[
"HiddenFromAddressListsEnabled",
"DisplayName",
"PrimarySmtpAddress",
"RecipientTypeDetails",
"IsDirSynced",
]}
/>
);
};

Page.getLayout = (page) => <DashboardLayout>{page}</DashboardLayout>;

export default Page;

0 comments on commit 2e9a739

Please sign in to comment.