feat: show membership by superior

This commit is contained in:
2021-12-16 16:07:32 +07:00
parent a093174c7d
commit a29cfd5c92
4 changed files with 52 additions and 20 deletions

View File

@@ -17,16 +17,23 @@ export class Membership {
this.data = response.body.data.map((item, idx) => {
item.key = idx;
item.roleName = item.roles.name;
return item
}) ?? []
this.total_data = response.body.total_data ?? 0
}
async getDataBySuperior() {
const response = await http.get(`/users/find-by-supperior?page=${this.page}&pageSize=${this.pageSize}`);
this.data = response.body.data.map((item, idx) => {
item.key = idx;
item.roleName = item.roles.name;
return item
}) ?? []
this.total_data = response.body.total_data ?? 0
}
// async getData() {
// const response = await http.get(`/users/find-by-supperior?page=${this.page}&pageSize=${this.pageSize}`);
// this.data = response.body.data ?? []
// this.total_data = response.body.total_data ?? 0
// }
async create(data) {
return await http.post('/users').send(data)