Skip to content

Commit

Permalink
feat(web.office): add datagrid for react app
Browse files Browse the repository at this point in the history
ref:MANAGER-16068

Signed-off-by: stif59100 <[email protected]>
  • Loading branch information
stif59100 authored and ghyenne committed Dec 3, 2024
1 parent e3227ec commit bf15336
Show file tree
Hide file tree
Showing 54 changed files with 1,160 additions and 935 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import useServiceLoader from "./useServiceLoader";
import OrderTrigger from '../order/OrderTrigger';
import webShopConfig from '../order/shop-config/web';
import { ShopItem } from '../order/OrderPopupContent';
import getIcon from './GetIcon';
import getIcon from './GetIcon';
import { useFeatureAvailability } from '@ovh-ux/manager-react-components';

export const webFeatures = [
Expand All @@ -23,13 +23,13 @@ export const webFeatures = [
'emails:delegate',
'emails',
'exchange:web-dashboard',
'office',
'office-reseller',
'sharepoint',
'web:microsoft',
'web-paas',
'cloud-web',
'cloud-database',
'web-office',
'zimbra'
];

Expand Down Expand Up @@ -259,21 +259,36 @@ export default function WebSidebar() {
...service,
}));
},
},
features.office && {
id: 'office',
}, features['web-office'] &&
{
id: 'web-office',
label: t('sidebar_license_office'),
icon: getIcon('ms-Icon ms-Icon--OfficeLogo'),
routeMatcher: new RegExp(`/office`),
routeMatcher: new RegExp(`^/web-office`),
async loader() {
const services = await loadServices('/license/office');
return services.map((service) => ({
icon: getIcon('ms-Icon ms-Icon--OfficeLogo'),
...service,
}));
return [
{
id: 'web_office_list',
label: t('sidebar_license_office_list'),
href: navigation.getURL(
'web-office',
`#/`
),
icon: getIcon('oui-icon oui-icon-list'),
ignoreSearch: true,
},
...services.map((service) => ({
...service,
icon: getIcon('ms-Icon ms-Icon--OfficeLogo'),
href: navigation.getURL(
'web-office',
`#/license/${service.serviceName}`
),
})),
];
},
}
],
},]
});
} else {
if (features['exchange:web-dashboard']) {
Expand Down Expand Up @@ -324,7 +339,7 @@ export default function WebSidebar() {
return menu;
};

const {data: availability} = useFeatureAvailability(webFeatures);
const { data: availability } = useFeatureAvailability(webFeatures);

useEffect(() => {
if (availability) {
Expand Down
Loading

0 comments on commit bf15336

Please sign in to comment.