Skip to content

Commit

Permalink
chore: fix typo and service message
Browse files Browse the repository at this point in the history
  • Loading branch information
Noggling committed Mar 15, 2024
1 parent bdfd7bb commit 40e5b1e
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 51 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ export const ServiceMessageFilter = () => {
useEffect(() => {
if (currentApps) {
registerCurrentApps(currentApps.map((app) => app.key));
} else {
registerCurrentApps([]);
}
}, [currentApps]);

Expand Down
98 changes: 47 additions & 51 deletions client/packages/portal-client/src/lib/portal-framework-config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,60 +42,56 @@ export function createPortalFramework(portalConfig: PortalConfig) {
portalId: portalConfig.portalId,
portalEnv: portalConfig.fusionLegacyEnvIdentifier,
});
builder.setRoutes({
root: {
pageKey: 'project-portal',
},
console.log(portalConfig.portalId === '0177ef5f-c49e-4d2a-7907-08db31e4e851');
if (portalConfig.portalId === '0177ef5f-c49e-4d2a-7907-08db31e4e851') {
builder.setRoutes({
root: {
pageKey: 'project-portal',
},

routes: [
{
path: 'project/*',
pageKey: 'project',
messages: {
errorMessage: 'Fail to load project page',
},
children: [
{
messages: {
errorMessage: 'Fail to load project page',
},
path: ':contextId',
pageKey: 'project',
routes: [
{
path: 'project/*',
pageKey: 'project',
messages: {
errorMessage: 'Fail to load project page',
},
],
},
{
path: 'facility/*',
pageKey: 'facility',
messages: {
errorMessage: 'Fail to load facility page',
},
children: [
{
messages: {
errorMessage: 'Fail to load facility page',
children: [
{
messages: {
errorMessage: 'Fail to load project page',
},
path: ':contextId',
pageKey: 'project',
},
path: ':contextId',
pageKey: 'facility',
],
},
{
path: 'facility/*',
pageKey: 'facility',
messages: {
errorMessage: 'Fail to load facility page',
},
],
children: [
{
messages: {
errorMessage: 'Fail to load facility page',
},
path: ':contextId',
pageKey: 'facility',
},
],
},
],
});
} else {
builder.setRoutes({
root: {
pageKey: 'resource-allocation-landingpage',
},
],
});

// builder.setPortalConfig({
// portal: {
// id: 'resource-allocation',
// name: 'Resource Allocation',
// },
// routes: {
// root: {
// pageKey: 'resource-allocation-landingpage',
// },
// routes: [],
// },
// apps:[]
// });
routes: [],
});
}
});

enableContext(config);
Expand Down Expand Up @@ -157,8 +153,8 @@ export function createPortalFramework(portalConfig: PortalConfig) {
},
{
key: 'project-prediction',
title: 'Project Prediction',
description: 'When enabled you will get project prediction on the project portal landing page',
title: 'Allocated Projects',
description: 'When enabled you will get your allocated projects on the portal landing page',
enabled: true,
},
{
Expand Down

0 comments on commit 40e5b1e

Please sign in to comment.