diff --git a/public/version.json b/public/version.json index 64ee67a6cf4b..fea50d299123 100644 --- a/public/version.json +++ b/public/version.json @@ -1,3 +1,3 @@ { - "version": "7.5.2" + "version": "7.5.3" } \ No newline at end of file diff --git a/src/components/CippCards/CippUniversalSearch.jsx b/src/components/CippCards/CippUniversalSearch.jsx index 9d9c90d63c5f..c4b5ddbaf294 100644 --- a/src/components/CippCards/CippUniversalSearch.jsx +++ b/src/components/CippCards/CippUniversalSearch.jsx @@ -67,15 +67,60 @@ export const CippUniversalSearch = React.forwardRef( CippUniversalSearch.displayName = "CippUniversalSearch"; -const Results = ({ items = [], searchValue }) => ( - - {items.slice(0, 9).map((item, key) => ( - - +const Results = ({ items = [], searchValue }) => { + const [currentPage, setCurrentPage] = useState(1); + const resultsPerPage = 9; // Number of results per page + const totalResults = items.length; // Total number of results + const totalPages = Math.ceil(totalResults / resultsPerPage); // Total pages + + // Calculate the results to display for the current page + const startIndex = (currentPage - 1) * resultsPerPage; + const endIndex = startIndex + resultsPerPage; + const displayedResults = items.slice(startIndex, endIndex); + + const handleNextPage = () => { + if (currentPage < totalPages) { + setCurrentPage(currentPage + 1); + } + }; + + const handlePreviousPage = () => { + if (currentPage > 1) { + setCurrentPage(currentPage - 1); + } + }; + + return ( + <> + + {totalResults} results (Page {currentPage} of {totalPages}) + + + {displayedResults.map((item, key) => ( + + + + ))} - ))} - -); + + + + + + ); +}; const ResultsRow = ({ match, searchValue }) => { const highlightMatch = (text) => { @@ -118,7 +163,7 @@ const ResultsRow = ({ match, searchValue }) => { href={`identity/administration/users/user?tenantFilter=${ currentTenantInfo.data?.find((tenant) => tenant.customerId === match._tenantId) ?.defaultDomainName || match._tenantId - }&userId=${match.userPrincipalName}`} + }&userId=${match.id}`} variant="outlined" color="primary" size="small" diff --git a/src/components/CippComponents/CippApiDialog.jsx b/src/components/CippComponents/CippApiDialog.jsx index d083a3c9d2bf..87a9fe56b689 100644 --- a/src/components/CippComponents/CippApiDialog.jsx +++ b/src/components/CippComponents/CippApiDialog.jsx @@ -295,7 +295,7 @@ export const CippApiDialog = (props) => { return getNestedValue(row, key) || `[${key}]`; }); - if (linkWithRowData.startsWith("/")) { + if (linkWithRowData.startsWith("/") && !api?.external) { // Internal link navigation setLinkClicked(true); router.push(linkWithRowData, undefined, { shallow: true }); diff --git a/src/components/CippComponents/CippTenantSelector.jsx b/src/components/CippComponents/CippTenantSelector.jsx index ee87c0ca3fdf..61d0c32e37fd 100644 --- a/src/components/CippComponents/CippTenantSelector.jsx +++ b/src/components/CippComponents/CippTenantSelector.jsx @@ -66,7 +66,7 @@ export const CippTenantSelector = (props) => { }, [currentTenant?.value]); useEffect(() => { - if (tenant && currentTenant?.value && currentTenant?.value !== 'AllTenants') { + if (tenant && currentTenant?.value && currentTenant?.value !== "AllTenants") { tenantDetails.refetch(); } }, [tenant, offcanvasVisible]); @@ -85,6 +85,7 @@ export const CippTenantSelector = (props) => { defaultDomainName: matchingTenant.defaultDomainName, displayName: matchingTenant.displayName, customerId: matchingTenant.customerId, + initialDomainName: matchingTenant.initialDomainName, }, } : { @@ -192,12 +193,12 @@ export const CippTenantSelector = (props) => { actions={[ { label: "M365 Admin Portal", - link: `https://admin.microsoft.com/Partner/BeginClientSession.aspx?CTID=${currentTenant?.addedFields?.customerId}&CSDEST=o365admincenter`, + link: `https://admin.cloud.microsoft/?delegatedOrg=${currentTenant?.addedFields?.initialDomainName}`, icon: , }, { label: "Exchange Portal", - link: `https://admin.cloud.microsoft/exchange?landingpage=homepage&form=mac_sidebar&delegatedOrg=${currentTenant?.value}`, + link: `https://admin.cloud.microsoft/exchange?delegatedOrg=${currentTenant?.addedFields?.initialDomainName}`, icon: , }, { @@ -207,7 +208,7 @@ export const CippTenantSelector = (props) => { }, { label: "Teams Portal", - link: `https://admin.teams.microsoft.com/?delegatedOrg=${currentTenant?.value}`, + link: `https://admin.teams.microsoft.com/?delegatedOrg=${currentTenant?.addedFields?.initialDomainName}`, icon: , }, { @@ -222,8 +223,9 @@ export const CippTenantSelector = (props) => { }, { label: "SharePoint Portal", - link: `https://admin.microsoft.com/Partner/beginclientsession.aspx?CTID=${currentTenant?.addedFields?.customerId}&CSDEST=SharePoint`, + link: `/api/ListSharePointAdminUrl?tenantFilter=${currentTenant?.value}`, icon: , + external: true, }, { label: "Security Portal", diff --git a/src/components/CippStandards/CippStandardsSideBar.jsx b/src/components/CippStandards/CippStandardsSideBar.jsx index 522f2e69290e..d8c6092174d9 100644 --- a/src/components/CippStandards/CippStandardsSideBar.jsx +++ b/src/components/CippStandards/CippStandardsSideBar.jsx @@ -142,6 +142,7 @@ const CippStandardsSideBar = ({ name="excludedTenants" allTenants={false} formControl={formControl} + includeGroups={true} /> )} diff --git a/src/pages/email/administration/mailbox-rules/index.js b/src/pages/email/administration/mailbox-rules/index.js index 8dc0fcceb020..ba6a59439ea4 100644 --- a/src/pages/email/administration/mailbox-rules/index.js +++ b/src/pages/email/administration/mailbox-rules/index.js @@ -70,6 +70,7 @@ const Page = () => { title="Rule Details" propertyItems={properties} actionItems={actions} + data={data} /> ); }, diff --git a/src/pages/identity/administration/users/user/index.jsx b/src/pages/identity/administration/users/user/index.jsx index b36347b4a1f3..e91db17cadfc 100644 --- a/src/pages/identity/administration/users/user/index.jsx +++ b/src/pages/identity/administration/users/user/index.jsx @@ -81,7 +81,7 @@ const Page = () => { }, [userId]); const userRequest = ApiGetCall({ - url: `/api/ListUsers?UserId=${userId}&tenantFilter=${userSettingsDefaults.currentTenant}`, + url: `/api/ListUsers?UserId=${userId}&tenantFilter=${router.query.tenantFilter ?? userSettingsDefaults.currentTenant}`, queryKey: `ListUsers-${userId}`, waiting: waiting, }); diff --git a/src/pages/teams-share/onedrive/index.js b/src/pages/teams-share/onedrive/index.js index 842b0737cbcc..9ec970fbda1e 100644 --- a/src/pages/teams-share/onedrive/index.js +++ b/src/pages/teams-share/onedrive/index.js @@ -25,13 +25,21 @@ const Page = () => { multiple: false, creatable: false, api: { - url: "/api/listUsers", - labelField: (onedriveAccessUser) => - `${onedriveAccessUser.displayName} (${onedriveAccessUser.userPrincipalName})`, + url: "/api/ListGraphRequest", + data: { + Endpoint: "users", + $select: "id,displayName,userPrincipalName", + $top: 999, + $count: true, + }, + queryKey: "ListUsersAutoComplete", + dataKey: "Results", + labelField: (user) => `${user.displayName} (${user.userPrincipalName})`, valueField: "userPrincipalName", addedField: { - displayName: "displayName", + id: "id", }, + showRefresh: true, }, }, ], diff --git a/src/utils/get-cipp-formatting.js b/src/utils/get-cipp-formatting.js index 1cfdb1decd38..bda8d8954651 100644 --- a/src/utils/get-cipp-formatting.js +++ b/src/utils/get-cipp-formatting.js @@ -439,7 +439,7 @@ export const getCippFormatting = (data, cellName, type, canReceive, flatten = tr { - if (primaryEmail.includes(email)) { + if (primaryEmail && primaryEmail.includes(email)) { return { email: email, primary: true,