diff options
author | haraldox <hnaumann+github@gmail.com> | 2018-02-13 11:02:28 +0100 |
---|---|---|
committer | haraldox <hnaumann+github@gmail.com> | 2018-02-13 11:02:28 +0100 |
commit | 4284b88f44caa9b7adb180a1e07bdd834f5b7ad6 (patch) | |
tree | 619e5a42fb9100c4b7982a6ecf55d28fe276e546 /src/components/settings/navigation/SettingsNavigation.js | |
parent | Merge pull request #654 from meetfranz/feature/invite-button (diff) | |
download | ferdium-app-4284b88f44caa9b7adb180a1e07bdd834f5b7ad6.tar.gz ferdium-app-4284b88f44caa9b7adb180a1e07bdd834f5b7ad6.tar.zst ferdium-app-4284b88f44caa9b7adb180a1e07bdd834f5b7ad6.zip |
feat(App) Feature Added enterprise UI
##Account Dashboard:
- CHANGE account type to 'Enterprise Account' (green badge)
- REMOVE button 'Edit Account' if SSO login is used
- ADD company name and contact information
- REMOVE premium account plans section
- REMOVE account deletion
##Settings Navigation
- REMOVE available services if user not allowed to manage services
##Edit Service
- REMOVE delete button if user not allowed to manage services
- CHANGE disable team / custom URL if user not allowed to manage services
##Edit User
- REMOVE account type
##User.js
- ADD mock enterprise properties
##Input.js
- FIX disabled passthrough
Diffstat (limited to 'src/components/settings/navigation/SettingsNavigation.js')
-rw-r--r-- | src/components/settings/navigation/SettingsNavigation.js | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/src/components/settings/navigation/SettingsNavigation.js b/src/components/settings/navigation/SettingsNavigation.js index 66539f324..620f09189 100644 --- a/src/components/settings/navigation/SettingsNavigation.js +++ b/src/components/settings/navigation/SettingsNavigation.js | |||
@@ -1,6 +1,7 @@ | |||
1 | import React, { Component } from 'react'; | 1 | import React, { Component } from 'react'; |
2 | import PropTypes from 'prop-types'; | 2 | import PropTypes from 'prop-types'; |
3 | import { defineMessages, intlShape } from 'react-intl'; | 3 | import { defineMessages, intlShape } from 'react-intl'; |
4 | import { inject, observer } from 'mobx-react'; | ||
4 | 5 | ||
5 | import Link from '../../ui/Link'; | 6 | import Link from '../../ui/Link'; |
6 | 7 | ||
@@ -31,6 +32,7 @@ const messages = defineMessages({ | |||
31 | }, | 32 | }, |
32 | }); | 33 | }); |
33 | 34 | ||
35 | @inject('stores') @observer | ||
34 | export default class SettingsNavigation extends Component { | 36 | export default class SettingsNavigation extends Component { |
35 | static propTypes = { | 37 | static propTypes = { |
36 | serviceCount: PropTypes.number.isRequired, | 38 | serviceCount: PropTypes.number.isRequired, |
@@ -42,17 +44,20 @@ export default class SettingsNavigation extends Component { | |||
42 | 44 | ||
43 | render() { | 45 | render() { |
44 | const { serviceCount } = this.props; | 46 | const { serviceCount } = this.props; |
47 | const { data: user } = this.props.stores.user; | ||
45 | const { intl } = this.context; | 48 | const { intl } = this.context; |
46 | 49 | ||
47 | return ( | 50 | return ( |
48 | <div className="settings-navigation"> | 51 | <div className="settings-navigation"> |
49 | <Link | 52 | {user.clientSettings && user.clientSettings.userCanManageServices && ( |
50 | to="/settings/recipes" | 53 | <Link |
51 | className="settings-navigation__link" | 54 | to="/settings/recipes" |
52 | activeClassName="is-active" | 55 | className="settings-navigation__link" |
53 | > | 56 | activeClassName="is-active" |
54 | {intl.formatMessage(messages.availableServices)} | 57 | > |
55 | </Link> | 58 | {intl.formatMessage(messages.availableServices)} |
59 | </Link> | ||
60 | )} | ||
56 | <Link | 61 | <Link |
57 | to="/settings/services" | 62 | to="/settings/services" |
58 | className="settings-navigation__link" | 63 | className="settings-navigation__link" |
@@ -92,3 +97,12 @@ export default class SettingsNavigation extends Component { | |||
92 | ); | 97 | ); |
93 | } | 98 | } |
94 | } | 99 | } |
100 | |||
101 | SettingsNavigation.wrappedComponent.propTypes = { | ||
102 | stores: PropTypes.shape({ | ||
103 | user: PropTypes.shape({ | ||
104 | data: PropTypes.object.isRequired, | ||
105 | }).isRequired, | ||
106 | }).isRequired, | ||
107 | }; | ||
108 | |||