Skip to content

Commit

Permalink
Merge pull request #278 from amansinghbais/266-all-chip
Browse files Browse the repository at this point in the history
Improved: added an all chip for selecting all products on product audit page (#266)
  • Loading branch information
ravilodhi authored Mar 7, 2024
2 parents 2e0b73b + 3377337 commit 999f175
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/views/catalog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ export default defineComponent({
return {
prodCatalogCategoryTypeId: '', // 'All' is selected by default
filters: [{
name: 'All',
value: ''
}, {
name: 'Pre-order',
value: 'PCCT_PREORDR'
}, {
Expand Down Expand Up @@ -206,9 +209,10 @@ export default defineComponent({
})
},
async applyFilter(value: string) {
if(value === this.prodCatalogCategoryTypeId) this.prodCatalogCategoryTypeId = ''
else this.prodCatalogCategoryTypeId = value
this.getCatalogProducts()
if(value !== this.prodCatalogCategoryTypeId) {
this.prodCatalogCategoryTypeId = value
this.getCatalogProducts()
}
},
viewProduct(product: any) {
this.router.push({ path: `/catalog-product-details/${product.groupId}`, query: { variantId: product.productId } });
Expand Down

0 comments on commit 999f175

Please sign in to comment.