fix with extern user
This commit is contained in:
parent
bc2289173f
commit
0a6994e107
|
@ -109,7 +109,7 @@ export default {
|
|||
getAllUsers: 'sm/getAllUsers',
|
||||
getUsers: 'sm/getUsers',
|
||||
lockDay: 'sm/lockDay',
|
||||
getDBUsers: 'usermanager/getUsers',
|
||||
getDBUsers: 'usermanager/getUsersWithExtern',
|
||||
getAllJobKinds: 'jkm/getAllJobKinds',
|
||||
}),
|
||||
changeMonth(value) {
|
||||
|
|
|
@ -79,6 +79,23 @@ const actions = {
|
|||
const response = await axios.get(url.getUsers, {
|
||||
headers: { Token: rootState.login.user.accessToken }
|
||||
})
|
||||
console.log(response.data)
|
||||
commit('setUsers', response.data)
|
||||
commit('setUsersLoading', false)
|
||||
dispatch('getLifeTime', null, { root: true })
|
||||
} catch (e) {
|
||||
commit('setUsersLoading', false)
|
||||
if (e.response)
|
||||
if (e.response.status === 401) dispatch('logout', null, { root: true })
|
||||
}
|
||||
},
|
||||
async getUsersWithExtern({ commit, rootState, dispatch }) {
|
||||
try {
|
||||
commit('setUsersLoading', true)
|
||||
const response = await axios.get(url.getUsers + '?extern=1', {
|
||||
headers: { Token: rootState.login.user.accessToken }
|
||||
})
|
||||
console.log(response.data)
|
||||
commit('setUsers', response.data)
|
||||
commit('setUsersLoading', false)
|
||||
dispatch('getLifeTime', null, { root: true })
|
||||
|
|
Loading…
Reference in New Issue