Perbaikan Project PPOB
This commit is contained in:
@@ -27,7 +27,7 @@ export class Partner {
|
||||
async getData() {
|
||||
try {
|
||||
const response = await http.get(`/users/partner?page=${this.page}&pageSize=${this.pageSize}`);
|
||||
|
||||
//console.log(response)
|
||||
this.data = response.body.data.map((item, idx) => {
|
||||
item.key = idx;
|
||||
return item
|
||||
@@ -59,11 +59,12 @@ export class Partner {
|
||||
}
|
||||
}
|
||||
|
||||
// async updateStatus(id, data) {
|
||||
// const response = await http.put(`/users/partner/${id}`).send(data);
|
||||
// await this.getData();
|
||||
// return response;
|
||||
// }
|
||||
async updatePassword(id, data) {
|
||||
const response = await http.put(`/users/change-password-partner/${id}`).send(data);
|
||||
console.log(response)
|
||||
await this.getData();
|
||||
return response;
|
||||
}
|
||||
|
||||
async delete(id) {
|
||||
try {
|
||||
|
||||
@@ -26,9 +26,11 @@ export class Product {
|
||||
dataPriceHistory = [];
|
||||
totalDataPriceHistory = 0;
|
||||
pagePriceHistory = 0;
|
||||
pageProductPartner = 0;
|
||||
pageSizePriceHistory = 10
|
||||
|
||||
dataDetailProduct = {};
|
||||
dataProductPartner=[]
|
||||
|
||||
constructor(ctx) {
|
||||
this.ctx = ctx;
|
||||
@@ -94,6 +96,16 @@ export class Product {
|
||||
}
|
||||
}
|
||||
|
||||
async getProductPartner(id) {
|
||||
try {
|
||||
const response = await http.get(`/product/by-categories?page=${this.pageProductPartner}&sub-category=${id}`);
|
||||
console.log(response)
|
||||
this.dataProductPartner = response.body.data
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
}
|
||||
|
||||
async create(data) {
|
||||
try {
|
||||
const response = await http.post('/product').send(data);
|
||||
|
||||
Reference in New Issue
Block a user