diff --git a/frontend/web/components/App.js b/frontend/web/components/App.js index 21e5bb93720f..48242f0bf175 100644 --- a/frontend/web/components/App.js +++ b/frontend/web/components/App.js @@ -299,7 +299,8 @@ const App = class extends Component { } if ( AccountStore.getOrganisation() && - AccountStore.getOrganisation().block_access_to_admin + AccountStore.getOrganisation().block_access_to_admin && + pathname !== '/organisations' ) { return } diff --git a/frontend/web/components/Blocked.js b/frontend/web/components/Blocked.js index cbc8fc3a9f91..540296ec2798 100644 --- a/frontend/web/components/Blocked.js +++ b/frontend/web/components/Blocked.js @@ -1,6 +1,7 @@ import React from 'react' import ConfigProvider from 'common/providers/ConfigProvider' import Payment from './modals/Payment' +import BlockedOrgInfo from './BlockedOrgInfo' const Blocked = class extends React.Component { static contextTypes = { @@ -19,41 +20,31 @@ const Blocked = class extends React.Component { {!Utils.isSaas() ? (

Please get in touch

- Your organisation has been disabled. Please get in touch so we can - discuss enabling your account. - { - <> - {' '} - - support@flagsmith.com - - . - - } + + Your organisation has been disabled. Please contact Flagsmith + support at + { + <> + {' '} + + support@flagsmith.com + + . + + } + +
) : (
{ <> -
- -
} diff --git a/frontend/web/components/BlockedOrgInfo.tsx b/frontend/web/components/BlockedOrgInfo.tsx new file mode 100644 index 000000000000..492a80ecf6c3 --- /dev/null +++ b/frontend/web/components/BlockedOrgInfo.tsx @@ -0,0 +1,25 @@ +import React from 'react' +import AccountStore from 'common/stores/account-store' +import AppActions from 'common/dispatcher/app-actions' + +export default function BlockedOrgInfo() { + return ( +
+
Organisation name: {AccountStore.getOrganisation().name}
+
Organisation ID: {AccountStore.getOrganisation().id}
+
+ Switch to a different organisation +
+
+ { + AppActions.logout() + }} + > + Log out + +
+
+ ) +} diff --git a/frontend/web/components/modals/Payment.js b/frontend/web/components/modals/Payment.js index 43847008b1b5..9a4b00278e94 100644 --- a/frontend/web/components/modals/Payment.js +++ b/frontend/web/components/modals/Payment.js @@ -10,6 +10,7 @@ import Utils from 'common/utils/utils' import AccountProvider from 'common/providers/AccountProvider' import classNames from 'classnames' import Switch from 'components/Switch' +import BlockedOrgInfo from 'components/BlockedOrgInfo' const PaymentButton = (props) => { const activeSubscription = AccountStore.getOrganisationPlan( @@ -104,21 +105,25 @@ const Payment = class extends Component { '' return (
- -
Manage Payment Plan
+ {this.props.isDisableAccountText && ( - - - {this.props.isDisableAccountText}{' '} - - support@flagsmith.com - - - +
+
+

+ {this.props.isDisableAccountText}{' '} + + support@flagsmith.com + +

+
+
+ +
+
)}
diff --git a/frontend/web/components/pages/OrganisationSettingsPage.js b/frontend/web/components/pages/OrganisationSettingsPage.js index a03e48eb061e..0b308b963c9d 100644 --- a/frontend/web/components/pages/OrganisationSettingsPage.js +++ b/frontend/web/components/pages/OrganisationSettingsPage.js @@ -457,6 +457,7 @@ const OrganisationSettingsPage = class extends Component { )}
+
Manage Payment Plan