Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved: added an all chip for selecting all products on product audit page (#266) #278

Merged
merged 2 commits into from
Mar 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading