Skip to content
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

[pull] dev from KelvinTegelaar:dev #129

Merged
merged 5 commits into from
Feb 28, 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
5 changes: 2 additions & 3 deletions src/components/CippCards/CippPageCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { useRouter } from "next/router";
import { Box, Container, Stack, Button, SvgIcon, Typography, Card } from "@mui/material";
import ArrowLeftIcon from "@mui/icons-material/ArrowLeft";
import Head from "next/head";
import { CippHead } from "../CippComponents/CippHead";
const CippPageCard = (props) => {
const {
title,
Expand All @@ -20,9 +21,7 @@ const CippPageCard = (props) => {

return (
<>
<Head>
<title>{title}</title>
</Head>
<CippHead title={title} />
<Box
sx={{
flexGrow: 1,
Expand Down
11 changes: 11 additions & 0 deletions src/components/CippComponents/CippHead.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import Head from "next/head";
import { useSettings } from "../../hooks/use-settings";

export const CippHead = ({ title }) => {
const tenant = useSettings().currentTenant;
return (
<Head>
<title>{tenant ? `${tenant} - ${title}` : title}</title>
</Head>
);
};
5 changes: 2 additions & 3 deletions src/components/CippComponents/CippTablePage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Box, Container, Stack } from "@mui/system";
import Head from "next/head";
import { CippDataTable } from "../CippTable/CippDataTable";
import { useSettings } from "../../hooks/use-settings";
import { CippHead } from "./CippHead";

export const CippTablePage = (props) => {
const {
Expand All @@ -28,9 +29,7 @@ export const CippTablePage = (props) => {
const tenant = useSettings().currentTenant;
return (
<>
<Head>
<title>{title}</title>
</Head>
<CippHead title={title} />
<Box sx={sx}>
<Container maxWidth={false} sx={{ height: "100%" }}>
<Stack spacing={2} sx={{ height: "100%" }}>
Expand Down
1 change: 1 addition & 0 deletions src/components/CippComponents/CippTenantSelector.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export const CippTenantSelector = (props) => {
settings.handleUpdate({
currentTenant: currentTenant.value,
});
//if we have a tenantfilter, we add the tenantfilter to the title of the tab/page so its "Tenant - original title".
}
}, [currentTenant?.value]);

Expand Down
7 changes: 3 additions & 4 deletions src/components/CippFormPages/CippFormPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { ApiPostCall } from "../../api/ApiCall";
import { CippApiResults } from "../CippComponents/CippApiResults";
import { useEffect } from "react";
import { useFormState } from "react-hook-form";
import { CippHead } from "../CippComponents/CippHead";

const CippFormPage = (props) => {
const {
Expand Down Expand Up @@ -86,9 +87,7 @@ const CippFormPage = (props) => {
};
return (
<>
<Head>
<title>{title}</title>
</Head>
<CippHead title={title} />
<Box
sx={{
flexGrow: 1,
Expand Down Expand Up @@ -134,7 +133,7 @@ const CippFormPage = (props) => {
<Stack spacing={2} direction="row">
{addedButtons && addedButtons}
<Button
disabled={postCall.isPending || !isValid || (!allowResubmit && (!isDirty))}
disabled={postCall.isPending || !isValid || (!allowResubmit && !isDirty)}
onClick={formControl.handleSubmit(handleSubmit)}
type="submit"
variant="contained"
Expand Down
5 changes: 2 additions & 3 deletions src/components/CippWizard/CippWizardPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Box, Button, Container, Stack, SvgIcon } from "@mui/material";
import { CippWizard } from "./CippWizard";
import { useRouter } from "next/router";
import { ArrowLeftIcon } from "@mui/x-date-pickers";
import { CippHead } from "../CippComponents/CippHead";

const CippWizardPage = (props) => {
const router = useRouter();
Expand All @@ -17,9 +18,7 @@ const CippWizardPage = (props) => {
} = props;
return (
<>
<Head>
<title>{wizardTitle}</title>
</Head>
<CippHead title={wizardTitle} />
<Box
sx={{
backgroundColor: "background.default",
Expand Down
5 changes: 3 additions & 2 deletions src/pages/email/administration/mailboxes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,15 @@ const Page = () => {
url: "/api/ExecStartManagedFolderAssistant",
icon: <PlayCircleIcon />,
data: {
ID: "UPN",
ID: "ExchangeGuid",
UserPrincipalName: "UPN",
},
confirmText: "Are you sure you want to start the managed folder assistant for this user?",
},
{
label: "Delete Mailbox",
type: "POST",
icon: <TrashIcon />, // Added
icon: <TrashIcon />,
url: "/api/RemoveUser",
data: { ID: "UPN" },
confirmText: "Are you sure you want to delete this mailbox?",
Expand Down
2 changes: 1 addition & 1 deletion src/pages/identity/administration/devices/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const Page = () => {
type: "POST",
url: "/api/ExecGetRecoveryKey",
data: {
GUID: "id",
GUID: "deviceId",
},
confirmText: "Are you sure you want to retrieve the BitLocker keys?",
multiPost: false,
Expand Down
9 changes: 5 additions & 4 deletions src/pages/tenant/gdap-management/onboarding/start.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,9 @@ const Page = () => {
data: {
TenantFilter: "",
Endpoint: "tenantRelationships/delegatedAdminRelationships",
$filter:
"(status eq 'active' or status eq 'approvalPending') and not startsWith(displayName,'MLT_')",
},
queryKey: "GDAPRelationshipOnboarding",
});

const onboardingList = ApiGetCallWithPagination({
url: "/api/ListTenantOnboarding",
queryKey: "ListTenantOnboarding",
Expand Down Expand Up @@ -108,7 +105,11 @@ const Page = () => {
(relationship) => relationship?.id === queryId
);

if (relationship) {
if (
relationship &&
(relationship?.status === "active" || relationship?.status === "approvalPending") &&
!relationship?.customer?.displayName.startsWith("MLT_")
) {
formValue = {
label:
(relationship?.customer?.displayName ?? "Pending Invite") +
Expand Down
5 changes: 2 additions & 3 deletions src/pages/tenant/standards/bpa-report/builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import { useRouter } from "next/router";
import { CippFormCondition } from "../../../../components/CippComponents/CippFormCondition";
import { ApiGetCall, ApiPostCall } from "../../../../api/ApiCall";
import { CippApiResults } from "../../../../components/CippComponents/CippApiResults";
import { CippHead } from "../../../../components/CippComponents/CippHead";

const Page = () => {
const router = useRouter();
Expand Down Expand Up @@ -177,9 +178,7 @@ const Page = () => {
const onSubmit = (data) => {};
return (
<>
<Head>
<title>{pageTitle}</title>
</Head>
<CippHead title={pageTitle} />
<Box
sx={{
flexGrow: 1,
Expand Down