mirror of
https://github.com/opensupports/opensupports.git
synced 2025-07-31 01:35:15 +02:00
call get settings path on user login (#633)
* fix ticketEventId submit * staff allow manage ticket feature * edit-comment log * fix staff1/2 change own perfile pic * Makes frontend allow ticket editing for any staff member * Allows all staff members in charge of the department of a ticket to manage it (change its department, priority, comment on it, etc.) * fix comments github pt1 * tests ruby * fix * Fix ruby tests * add commenteed tests * call get setttings path on user login
This commit is contained in:
parent
63ef66198a
commit
896802f793
@ -2,6 +2,7 @@ import _ from 'lodash';
|
|||||||
|
|
||||||
import API from 'lib-app/api-call';
|
import API from 'lib-app/api-call';
|
||||||
import AdminDataActions from 'actions/admin-data-actions';
|
import AdminDataActions from 'actions/admin-data-actions';
|
||||||
|
import ConfigActions from 'actions/config-actions';
|
||||||
import sessionStore from 'lib-app/session-store';
|
import sessionStore from 'lib-app/session-store';
|
||||||
import store from 'app/store';
|
import store from 'app/store';
|
||||||
|
|
||||||
@ -16,11 +17,13 @@ export default {
|
|||||||
path: '/user/login',
|
path: '/user/login',
|
||||||
data: _.extend(loginData, {remember: loginData.remember * 1})
|
data: _.extend(loginData, {remember: loginData.remember * 1})
|
||||||
}).then((result) => {
|
}).then((result) => {
|
||||||
store.dispatch(this.getUserData(result.data.userId, result.data.token, result.data.staff)).then(() => {
|
store.dispatch(this.getUserData(result.data.userId, result.data.token, result.data.staff))
|
||||||
if(result.data.staff) {
|
.then(() => store.dispatch(ConfigActions.updateData()))
|
||||||
store.dispatch(AdminDataActions.retrieveCustomResponses());
|
.then(() => {
|
||||||
}
|
if(result.data.staff) {
|
||||||
});
|
store.dispatch(AdminDataActions.retrieveCustomResponses());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
resolve(result);
|
resolve(result);
|
||||||
}).catch((result) => {
|
}).catch((result) => {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
|
|
||||||
import {dispatch} from 'app/store';
|
import store from 'app/store';
|
||||||
import SessionActions from 'actions/session-actions';
|
import SessionActions from 'actions/session-actions';
|
||||||
import i18n from 'lib-app/i18n';
|
import i18n from 'lib-app/i18n';
|
||||||
|
|
||||||
@ -65,7 +65,7 @@ class DashboardMenu extends React.Component {
|
|||||||
if (itemIndex < this.getDashboardRoutes().length) {
|
if (itemIndex < this.getDashboardRoutes().length) {
|
||||||
this.goToPathByIndex(itemIndex)
|
this.goToPathByIndex(itemIndex)
|
||||||
} else {
|
} else {
|
||||||
dispatch(SessionActions.logout());
|
store.dispatch(SessionActions.logout());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user