Merge branch 'develop' of gitlab.com:empatnusabangsa/ppob/ppob-frontend into develop

This commit is contained in:
rarsyansyahr 2021-12-16 21:40:54 +07:00
commit 2acf3c9d5e

View File

@ -49,14 +49,7 @@ export class Product {
async getDataCategories() { async getDataCategories() {
const response = await http.get(`/product/categories?page=${this.pageCategories}&pageSize=${this.pageSizeCategories}`); const response = await http.get(`/product/categories?page=${this.pageCategories}&pageSize=${this.pageSizeCategories}`);
this.dataCategories = response.body.data ?? [] this.dataCategories = response.body.data.map((item, idx) => {
this.total_dataCategories = response.body.total_data ?? 0
if (this.dataCategories.length > 0) {
this.filterCategory = this.dataCategories[0].id
}
this.dataCategories = this.dataCategories.map((item, idx) => {
item.key = idx; item.key = idx;
return item return item
}) ?? [] }) ?? []