Skip to content
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
20 changes: 10 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions src/ui/app/AppContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { getUsername } from '@entando/apimanager';
import App from 'ui/app/App';
import { fetchCurrentTenant } from 'state/multi-tenancy/actions';
import { fetchCurrentSystemConfiguration } from 'state/current-system-configuration/actions';
import { fetchSystemReport } from 'state/system/actions';

export const mapStateToProps = (state, { location: { pathname } }) => ({
username: getUsername(state),
Expand All @@ -19,6 +20,7 @@ export const mapStateToProps = (state, { location: { pathname } }) => ({
export const mapDispatchToProps = dispatch => ({
fetchPlugins: () => dispatch(fetchPlugins()),
fetchCurrentSystemConfiguration: () => dispatch(fetchCurrentSystemConfiguration()),
fetchSystemReport: () => dispatch(fetchSystemReport()),
fetchUserPreferences: (username) => {
dispatch(clearAppTourProgress());
dispatch(fetchUserPreferences(username));
Expand Down
59 changes: 39 additions & 20 deletions src/ui/internal-page/VerticalMenuContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const renderCmsMenuItems = (intl, userPermissions, systemReport, currSysConfigAd
], userPermissions);
const hasMenuContentSettingsAccess = hasAccess(SUPERUSER_PERMISSION, userPermissions);

const { contentSchedulerPluginInstalled } = systemReport;
const { contentSchedulerPluginInstalled, contentWorkFlowPluginInstalled } = systemReport;

return (
<Item
Expand Down Expand Up @@ -132,11 +132,20 @@ const renderCmsMenuItems = (intl, userPermissions, systemReport, currSysConfigAd
hasMenuContentsAccess && contentSchedulerPluginInstalled && (
<SecondaryItem
id="menu-scheduler"
title={intl.formatMessage({ id: 'cms.menu.scheduler', defaultMessage: 'Content Scheduler' })}
title={intl.formatMessage({ id: 'cms.menu.scheduler', defaultMessage: 'Scheduler' })}
href={adminConsoleUrl('do/jpcontentscheduler/config/viewItem.action')}
/>
)
}
{
hasMenuContentsAccess && contentWorkFlowPluginInstalled && (
<SecondaryItem
id="menu-workflow"
title={intl.formatMessage({ id: 'cms.menu.workflow', defaultMessage: 'WorkFlow' })}
href={adminConsoleUrl('do/jpcontentworkflow/Workflow/list.action')}
/>
)
}
{
hasMenuContentTypeAccess && (
<SecondaryItem
Expand Down Expand Up @@ -438,32 +447,41 @@ const EntandoMenu = ({
};

const MfeMenuContainer = ({
menuId, headerId, onStartTutorial, appTourLastStep,
}) => (
<div className="MfeMenuContainer">
<div className="MfeMenuContainer__header-menu-container">
{
headerId ? <MfeContainer id={headerId} />
: getHeader(onStartTutorial)
menuId, headerId, onStartTutorial, appTourLastStep, onMount,
}) => {
useEffect(() => {
if (onMount) {
onMount();
}
}, [onMount]);

return (
<div className="MfeMenuContainer">
<div className="MfeMenuContainer__header-menu-container">
{
headerId ? <MfeContainer id={headerId} />
: getHeader(onStartTutorial)
}
</div>
{
menuId && (
<div
className={`MfeMenuContainer__left-menu-container ${appTourLastStep === 3 || appTourLastStep === 4 ? 'tour-focus' : ''}`}
>
<MfeContainer id={menuId} />
</div>
)
}
</div>
{
menuId && (
<div
className={`MfeMenuContainer__left-menu-container ${appTourLastStep === 3 || appTourLastStep === 4 ? 'tour-focus' : ''}`}
>
<MfeContainer id={menuId} />
</div>
)
}
</div>
);
);
};

MfeMenuContainer.propTypes = {
menuId: PropTypes.string.isRequired,
headerId: PropTypes.string.isRequired,
onStartTutorial: PropTypes.func.isRequired,
appTourLastStep: PropTypes.number.isRequired,
onMount: PropTypes.func.isRequired,
};

const VerticalMenu = (props) => {
Expand All @@ -480,6 +498,7 @@ const VerticalMenu = (props) => {
menuId={mfeMenu.id}
onStartTutorial={props.onStartTutorial}
appTourLastStep={props.appTourLastStep}
onMount={props.onMount}
/>
: <EntandoMenu {...props} />;
};
Expand Down
Loading