diff --git a/package-lock.json b/package-lock.json index c29656a78..a8bfd48fb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5104,7 +5104,7 @@ "caller-callsite": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/caller-callsite/-/caller-callsite-2.0.0.tgz", - "integrity": "sha512-JuG3qI4QOftFsZyOn1qq87fq5grLIyk1JYd5lJmdA+fG7aQ9pA/i3JIJGcO3q0MrRcHlOt1U+ZeHW8Dq9axALQ==", + "integrity": "sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ=", "dev": true, "requires": { "callsites": "^2.0.0" @@ -5113,7 +5113,7 @@ "callsites": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz", - "integrity": "sha512-ksWePWBloaWPxJYQ8TL0JHvtci6G5QTKwQ95RcWAa/lzoAKuAOflGdAK92hpHXjkwb8zLxoLNUoNYZgVsaJzvQ==", + "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=", "dev": true } } @@ -6824,7 +6824,7 @@ "dotenv": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-4.0.0.tgz", - "integrity": "sha512-XcaMACOr3JMVcEv0Y/iUM2XaOsATRZ3U1In41/1jjK6vJZ2PZbQ1bzCG8uvaByfaBpl9gqc9QWJovpUGBXLLYQ==" + "integrity": "sha1-hk7xN5rO1Vzm+V3r7NzhefegzR0=" }, "dotenv-expand": { "version": "4.2.0", @@ -10884,7 +10884,7 @@ "parse-json": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", "dev": true, "requires": { "error-ex": "^1.3.1", @@ -10894,7 +10894,7 @@ "pify": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", "dev": true }, "pkg-dir": { @@ -10909,7 +10909,7 @@ "read-pkg": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-4.0.1.tgz", - "integrity": "sha512-+UBirHHDm5J+3WDmLBZYSklRYg82nMlz+enn+GMZ22nSR2f4bzxmhso6rzQW/3mT2PVzpzDTiYIZahk8UmZ44w==", + "integrity": "sha1-ljYlN48+HE1IyFhytabsfV0JMjc=", "dev": true, "requires": { "normalize-package-data": "^2.3.2", @@ -10968,7 +10968,7 @@ "import-fresh": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz", - "integrity": "sha512-eZ5H8rcgYazHbKC3PG4ClHNykCSxtAhxSSEM+2mb+7evD2CKF5V7c0dNum7AdpDh0ZdICwZY9sRSn8f+KH96sg==", + "integrity": "sha1-2BNVwVYS04bGH53dOSLUMEgipUY=", "dev": true, "requires": { "caller-path": "^2.0.0", @@ -10978,7 +10978,7 @@ "caller-path": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-2.0.0.tgz", - "integrity": "sha512-MCL3sf6nCSXOwCTzvPKhN18TU7AHTvdtam8DAogxcrJ8Rjfbbg7Lgng64H9Iy+vUV6VGFClN/TyxBkAebLRR4A==", + "integrity": "sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ=", "dev": true, "requires": { "caller-callsite": "^2.0.0" @@ -10987,7 +10987,7 @@ "resolve-from": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", - "integrity": "sha512-GnlH6vxLymXJNMBo7XP1fJIzBFbdYt49CuTwmB/6N53t+kMPRMFKz783LlQ4tv28XoQfMWinAJX6WCGf2IlaIw==", + "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", "dev": true } } @@ -19132,7 +19132,7 @@ "semver-compare": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz", - "integrity": "sha512-YM3/ITh2MJ5MtzaM429anh+x2jiLVjqILF4m4oyQB18W7Ggea7BfqdH/wGMK7dDiMghv/6WG7znWMwUDzJiXow==", + "integrity": "sha1-De4hahyUGrN+nvsXiPavxf9VN/w=", "dev": true }, "semver-diff": { diff --git a/src/ui/app/AppContainer.js b/src/ui/app/AppContainer.js index ccd69be40..0f56667dc 100644 --- a/src/ui/app/AppContainer.js +++ b/src/ui/app/AppContainer.js @@ -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), @@ -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)); diff --git a/src/ui/internal-page/VerticalMenuContainer.js b/src/ui/internal-page/VerticalMenuContainer.js index 311cb5cc1..f18a9da9a 100644 --- a/src/ui/internal-page/VerticalMenuContainer.js +++ b/src/ui/internal-page/VerticalMenuContainer.js @@ -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 ( ) } + { + hasMenuContentsAccess && contentWorkFlowPluginInstalled && ( + + ) + } { hasMenuContentTypeAccess && ( ( -
-
- { - headerId ? - : getHeader(onStartTutorial) + menuId, headerId, onStartTutorial, appTourLastStep, onMount, +}) => { + useEffect(() => { + if (onMount) { + onMount(); } + }, [onMount]); + + return ( +
+
+ { + headerId ? + : getHeader(onStartTutorial) + } +
+ { + menuId && ( +
+ +
+ ) + }
- { - menuId && ( -
- -
- ) - } -
-); + ); +}; 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) => { @@ -480,6 +498,7 @@ const VerticalMenu = (props) => { menuId={mfeMenu.id} onStartTutorial={props.onStartTutorial} appTourLastStep={props.appTourLastStep} + onMount={props.onMount} /> : ; };