From d5695cf356f205e6b6dd44a84d6b6f071dd3d97a Mon Sep 17 00:00:00 2001 From: Chris Brame Date: Sat, 9 Apr 2022 20:10:52 -0400 Subject: [PATCH] chore(accounts): disable accounts import during rewrite --- src/client/components/StepWizard/index.jsx | 12 ++++++++ src/client/containers/Accounts/index.jsx | 32 +++++++++++----------- src/routes/index.js | 8 +++--- src/socketio/accountImportSocket.js | 2 +- 4 files changed, 33 insertions(+), 21 deletions(-) diff --git a/src/client/components/StepWizard/index.jsx b/src/client/components/StepWizard/index.jsx index da33903df..40cf8d51e 100644 --- a/src/client/components/StepWizard/index.jsx +++ b/src/client/components/StepWizard/index.jsx @@ -24,10 +24,22 @@ class StepWizard extends React.Component { this.init = this.init.bind(this) this.show = this.show.bind(this) this.hide = this.hide.bind(this) + + this.onImportStatusChange = this.onImportStatusChange.bind(this) } componentDidMount () { this.init() + + socket.socket.on('$trudesk:accounts:import:onStatusChange', this.onImportStatusChange) + } + + componentWillUnmount () { + socket.socket.removeAllListeners('$trudesk:accounts:import:onStatusChange') + } + + onImportStatusChange = data => { + console.log(data) } init = () => { diff --git a/src/client/containers/Accounts/index.jsx b/src/client/containers/Accounts/index.jsx index 22845cf6a..85977233a 100644 --- a/src/client/containers/Accounts/index.jsx +++ b/src/client/containers/Accounts/index.jsx @@ -237,22 +237,22 @@ class AccountsContainer extends React.Component { extraClass={'hover-accent'} onClick={() => this.props.showModal('CREATE_ACCOUNT')} /> - {helpers.canUser('accounts:import', true) && ( - -