|
|
@ -19,11 +19,19 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
async loadTrainerTrainee({ state, commit }) {
|
|
|
|
async loadTrainerTrainee({ state, commit }) {
|
|
|
|
let data = { pagination: state.pagination }
|
|
|
|
try {
|
|
|
|
let repository = new UserRepository();
|
|
|
|
commit("SET_LOADING_USERS", true);
|
|
|
|
const resource = await repository.indexMyTrainees(data);
|
|
|
|
let data = { pagination: state.pagination }
|
|
|
|
commit("SET_USERS", resource.data);
|
|
|
|
let repository = new UserRepository();
|
|
|
|
commit("SET_PAGINATION", resource.pagination);
|
|
|
|
const resource = await repository.indexMyTrainees(data);
|
|
|
|
|
|
|
|
commit("SET_USERS", resource.data);
|
|
|
|
|
|
|
|
commit("SET_PAGINATION", resource.pagination);
|
|
|
|
|
|
|
|
} catch (e) {
|
|
|
|
|
|
|
|
return e;
|
|
|
|
|
|
|
|
} finally {
|
|
|
|
|
|
|
|
commit("SET_LOADING_USERS", false);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
async laodRoles({ commit }) {
|
|
|
|
async laodRoles({ commit }) {
|
|
|
|
let repository = new RoleRepository();
|
|
|
|
let repository = new RoleRepository();
|
|
|
|