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) && (
-
-
-
-
-
-
-
- )}
+ {/*{helpers.canUser('accounts:import', true) && (*/}
+ {/* */}
+ {/* */}
+ {/* */}
+ {/* */}
+ {/* */}
+ {/* */}
+ {/* */}
+ {/*)}*/}
diff --git a/src/routes/index.js b/src/routes/index.js
index 307c2fe29..62a5053d7 100644
--- a/src/routes/index.js
+++ b/src/routes/index.js
@@ -237,10 +237,10 @@ function mainRoutes (router, middleware, controllers) {
router.get('/accounts/agents', middleware.redirectToLogin, middleware.loadCommonData, controllers.accounts.getAgents)
router.get('/accounts/admins', middleware.redirectToLogin, middleware.loadCommonData, controllers.accounts.getAdmins)
router.post('/accounts/uploadimage', middleware.redirectToLogin, controllers.accounts.uploadImage)
- router.get('/accounts/import', middleware.redirectToLogin, middleware.loadCommonData, controllers.accounts.importPage)
- router.post('/accounts/import/csv/upload', middleware.redirectToLogin, controllers.accounts.uploadCSV)
- router.post('/accounts/import/json/upload', middleware.redirectToLogin, controllers.accounts.uploadJSON)
- router.post('/accounts/import/ldap/bind', middleware.redirectToLogin, controllers.accounts.bindLdap)
+ // router.get('/accounts/import', middleware.redirectToLogin, middleware.loadCommonData, controllers.accounts.importPage)
+ // router.post('/accounts/import/csv/upload', middleware.redirectToLogin, controllers.accounts.uploadCSV)
+ // router.post('/accounts/import/json/upload', middleware.redirectToLogin, controllers.accounts.uploadJSON)
+ // router.post('/accounts/import/ldap/bind', middleware.redirectToLogin, controllers.accounts.bindLdap)
// Groups
router.get('/groups', middleware.redirectToLogin, middleware.loadCommonData, controllers.groups.get)
diff --git a/src/socketio/accountImportSocket.js b/src/socketio/accountImportSocket.js
index 834ba9086..358734f5c 100644
--- a/src/socketio/accountImportSocket.js
+++ b/src/socketio/accountImportSocket.js
@@ -29,7 +29,7 @@ function register (socket) {
function eventLoop () {}
-events.onImportCSV = async socket => {
+events.onImportCSV = socket => {
socket.on('$trudesk:accounts:import:csv', async data => {
const authUser = socket.request.user
if (!permissions.canThis(authUser.role, 'accounts:import')) {