feat: change status partner & membership

This commit is contained in:
2021-12-15 18:14:02 +07:00
parent 08b82c55ab
commit d0b2aec893
7 changed files with 245 additions and 156 deletions

View File

@@ -26,8 +26,12 @@ export class Partner {
async getData() {
const response = await http.get(`/users/partner?page=${this.page}&pageSize=${this.pageSize}`);
this.data = response.body.data ?? []
//console.log(response.body,"ini dari store")
this.data = response.body.data.map((item, idx) => {
item.key = idx;
return item
}) ?? []
this.total_data = response.body.count ?? 0
}
@@ -55,6 +59,11 @@ export class Partner {
return response;
}
async changeStatus(id, status) {
const response = await http.get(`/users/partner/${id}/${status}`);
await this.getData();
return response;
}
}