Skip to content

Commit

Permalink
Merge pull request #31 from vuestorefront-community/dev
Browse files Browse the repository at this point in the history
chore: release version 1.2.6
  • Loading branch information
odranoelBR authored Mar 21, 2022
2 parents f31cfc1 + ed8b505 commit 52c7afb
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/api-client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vue-storefront/odoo-api",
"version": "1.2.5",
"version": "1.2.6",
"private": false,
"sideEffects": false,
"server": "server/index.js",
Expand Down
2 changes: 2 additions & 0 deletions packages/api-client/src/types/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ export type OrderSortInput = {
export type ProductFilterInput = {
categoryId?: number[];
attributeValueId?: number[];
attribValues?: string[];
minPrice?: number;
maxPrice?: number;
};
Expand Down Expand Up @@ -567,6 +568,7 @@ export interface AgnosticFacetSearchParams {
sort?: string | string[];
filters?: Record<string, string[]>;
metadata?: any;
fetchCategory?: boolean;
[x: string]: any;
}
export interface SearchResultParams<S> {
Expand Down
4 changes: 2 additions & 2 deletions packages/composables/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vue-storefront/odoo",
"version": "1.2.5",
"version": "1.2.6",
"private": false,
"sideEffects": false,
"main": "lib/index.cjs.js",
Expand All @@ -19,7 +19,7 @@
"dependencies": {
"@nuxtjs/composition-api": "0.31.0",
"@vue-storefront/core": "2.5.4",
"@vue-storefront/odoo-api": "1.2.5"
"@vue-storefront/odoo-api": "1.2.6"
},
"peerDependencies": {
"@vue/composition-api": "1.2.5"
Expand Down
8 changes: 6 additions & 2 deletions packages/composables/src/composables/useFacet/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,21 @@ const factoryParams = {
filter: {
categoryId: params?.input?.filter?.categoryId,
attributeValueId: params.input?.filter?.attributeValueId?.map(id => parseInt(id)),
attribValues: params.input?.filter?.attribValues?.map(id => id),
minPrice: parseInt(params?.input?.minPrice),
maxPrice: parseInt(params?.input?.maxPrice)
}
};

const { data } = await context.$odoo.api.getCategory(categoryParams, customQueryCategories);
let categoryResponse = null;
if (params.input.fetchCategory) {
categoryResponse = await context.$odoo.api.getCategory(categoryParams, customQueryCategories);
}

const { data: productData } = await context.$odoo.api.getProductTemplatesList(productParams, customQueryProducts);

return {
categories: data.categories.categories,
categories: categoryResponse?.data?.categories?.categories || null,
products: productData.products.products,
attributes: productData.products.attributeValues,
itemsPerPage: 1,
Expand Down
1 change: 1 addition & 0 deletions packages/theme/composables/useUiHelpers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ const useUiHelpers = (): any => {
currentPage: page,
minPrice: price?.[0] || null,
maxPrice: price?.[1] || null,
fetchCategory: true,
filter: {
categoryId,
attributeValueId: filters
Expand Down
4 changes: 2 additions & 2 deletions packages/theme/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vue-storefront/odoo-theme",
"version": "1.2.5",
"version": "1.2.6",
"private": true,
"scripts": {
"build": "nuxt build -m --dotenv .env_production",
Expand All @@ -25,7 +25,7 @@
"@vue-storefront/middleware": "2.5.4",
"@vue-storefront/nuxt": "2.5.4",
"@vue-storefront/nuxt-theme": "2.5.4",
"@vue-storefront/odoo": "1.2.5",
"@vue-storefront/odoo": "1.2.6",
"cookie-universal-nuxt": "^2.1.3",
"core-js": "^2.6.5",
"nuxt": "2.15.6",
Expand Down

0 comments on commit 52c7afb

Please sign in to comment.