feat: handler modal dynamic

This commit is contained in:
caturbgs
2021-12-22 14:43:04 +07:00
parent 7edf7650ec
commit 7cf403f19d
3 changed files with 55 additions and 47 deletions

View File

@@ -21,7 +21,7 @@ export class Product {
pageSizeSubCategories = 10
dataSubCategories = [];
total_dataSubCategories = 0;
filterByCategory = null;
filterCategory = null;
constructor(ctx) {
this.ctx = ctx;
@@ -44,7 +44,7 @@ export class Product {
async getDataSubCategories() {
try {
const response = await http.get(`/product/sub-categories?category=${this.filterByCategory}&page=${this.pageSubCategories}&pageSize=${this.pageSizeSubCategories}`);
const response = await http.get(`/product/sub-categories?category=${this.filterCategory}&page=${this.pageSubCategories}&pageSize=${this.pageSizeSubCategories}`);
this.dataSubCategories = response.body.data.map((item, idx) => {
item.key = idx;
return item