diff options
author | Arul.Nambi <arul.nambi@amdocs.com> | 2018-09-04 16:18:34 -0400 |
---|---|---|
committer | Arul.Nambi <arul.nambi@amdocs.com> | 2018-09-05 08:55:56 -0400 |
commit | b68cd9cee606372747f6fee4a864de994b0518a7 (patch) | |
tree | 5da47b9f152f7d8449639141f93fd23b43981cb5 /src/app/MainScreenHeader.jsx | |
parent | 3d6886c9c4ab551d3aefa00c5f1751459ee1140b (diff) |
Add network call as promise for ext views
Adding support for network calls that can be used in the extended views
without relying on the reducers of main app. Also adding functinality to
remove the view from the hanburger menu which will be useful for apps
that want to have a route but not an entry in main menu.
Issue-ID: AAI-1564
Change-Id: Ie4776d030d8458d3ce8d77782d5dfda11e01b878
Signed-off-by: Arul.Nambi <arul.nambi@amdocs.com>
Diffstat (limited to 'src/app/MainScreenHeader.jsx')
-rw-r--r-- | src/app/MainScreenHeader.jsx | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/app/MainScreenHeader.jsx b/src/app/MainScreenHeader.jsx index ec1efda..a3225e7 100644 --- a/src/app/MainScreenHeader.jsx +++ b/src/app/MainScreenHeader.jsx @@ -29,7 +29,6 @@ import {postAnalyticsData} from 'app/analytics/AnalyticsActions.js'; import GlobalInlineMessageBar from 'app/globalInlineMessageBar/GlobalInlineMessageBar.jsx'; import {getClearGlobalMessageEvent} from 'app/globalInlineMessageBar/GlobalInlineMessageBarActions.js'; import {externalUrlRequest, externalMessageRequest, getSubscriptionPayload} from 'app/contextHandler/ContextHandlerActions.js'; - import { filterBarActionTypes } from 'utils/GlobalConstants.js'; @@ -265,11 +264,19 @@ class MainScreenHeader extends Component { // add all custom view menu options for (let view in extensibleViews) { - menuOptions.push( - <MenuItem key={extensibleViews[view]['viewName'] + 'Menu'} to={'/' + extensibleViews[view]['viewName']} - label={extensibleViews[view]['displayName']} - iconClass={'button-icon ' + extensibleViews[view]['iconClass']}/> - ); + let shouldDisplayIcon = false; + if(extensibleViews[view]['onlyRoute'] === undefined){ + shouldDisplayIcon = true; + } else if(extensibleViews[view]['onlyRoute'] === false){ + shouldDisplayIcon = true; + } + if(shouldDisplayIcon === true){ + menuOptions.push( + <MenuItem key={extensibleViews[view]['viewName'] + 'Menu'} to={'/' + extensibleViews[view]['viewName']} + label={extensibleViews[view]['displayName']} + iconClass={'button-icon ' + extensibleViews[view]['iconClass']}/> + ); + } } let secondaryTitleClass = 'secondary-header'; |