Redesign productDetail dialog
This commit is contained in:
@@ -7,5 +7,5 @@ export class ProductModel {
|
||||
price: number = 0
|
||||
discount: number = 0
|
||||
rating: number = 1
|
||||
imageUrl: string = ""
|
||||
images: Array<string> = [""]
|
||||
}
|
||||
@@ -5,9 +5,9 @@ export class ProductWithCategoryModel {
|
||||
brand: string
|
||||
name: string
|
||||
description: string = ""
|
||||
category: CategoryModel
|
||||
category: CategoryModel = new CategoryModel()
|
||||
price: number = 0
|
||||
discount: number = 0
|
||||
rating: number = 1
|
||||
imageUrl: string = ""
|
||||
images: Array<string> = [""]
|
||||
}
|
||||
@@ -25,7 +25,7 @@ export const useProductStore = defineStore("productStore", {
|
||||
},
|
||||
|
||||
async filterProducts() {
|
||||
if (this.filteredCategory.id == -1) {
|
||||
if (this.filteredCategory.id == -1 || this.filteredCategory.id == 0) {
|
||||
this.filteredProducts = this.products
|
||||
} else {
|
||||
this.filteredProducts = this.products.filter((product: ProductWithCategoryModel) =>
|
||||
|
||||
Reference in New Issue
Block a user