diff --git a/web/themes/custom/materiotheme/assets/dist/main.js b/web/themes/custom/materiotheme/assets/dist/main.js index 28adfe37..199de1a0 100644 --- a/web/themes/custom/materiotheme/assets/dist/main.js +++ b/web/themes/custom/materiotheme/assets/dist/main.js @@ -17,7 +17,7 @@ } } ${_()} - `;s.E.post("",{query:(0,c.S)(i)}).then((t=>{e("updateItem",t.data.data.searchresult)})).catch((e=>{console.warn("Issue with refreshItem",e),Promise.reject(e)}))}}},k={namespaced:!0,state:{contenttype:null,items:[],page:0,infiniteLoadingState:null},getters:{},mutations:{setItems(e,t){e.items=e.items.concat(t)},incrementPage(e){e.page+=1},setInfiniteState(e,t){e.infiniteLoadingState=t}},actions:{getItems:({dispatch:e,commit:t,state:n})=>f.Z.get(`/blabla_rest?_format=json&page=${n.page}`,{}).then((({data:e})=>{e.length?(t("setItems",e),n.infiniteLoadingState&&n.infiniteLoadingState.loaded()):n.infiniteLoadingState&&n.infiniteLoadingState.complete()})).catch((e=>{console.warn("Issue with blabla getitems",e),Promise.reject(e)})),nextPage({dispatch:e,commit:t,state:n},i){t("incrementPage"),t("setInfiniteState",i),e("getItems")},getItemIndex:({dispatch:e,commit:t,state:n},i)=>n.items.findIndex((e=>e.nid===i)),getPrevNextItems:({dispatch:e,commit:t,state:n},i)=>({prev:n.items[i-1],next:n.items[i+1]})}},S={namespaced:!0,state:{items:[],showrooms_by_tid:{}},getters:{},mutations:{setItems(e,t){e.items=e.items.concat(t),t.forEach(((t,n)=>{e.showrooms_by_tid[t.tid]=t}))}},actions:{getItems({dispatch:e,commit:t,state:n}){f.Z.get("/showrooms_rest?_format=json",{}).then((({data:e})=>{t("setItems",e)})).catch((e=>{console.warn("Issue with showrooms",e),Promise.reject(e)}))}}};var x=n(5277),T=n.n(x);const O={namespaced:!0,state:{products_ids:[],products:[]},getters:{},mutations:{setProductsIds(e,t){e.products_ids=t},setProducts(e,t){e.products=t}},actions:{getProducts({dispatch:e,commit:t,state:n}){e("loadProductsIds")},loadProductsIds({dispatch:e,commit:t,state:n}){f.Z.get("/pricing_rest?_format=json",{}).then((({data:n})=>{const i=[];for(let e=0;e{console.warn("Issue with pricing",e),Promise.reject(e)}))},loadProducts({dispatch:e,commit:t,state:n}){const i=u()`{ + `;s.E.post("",{query:(0,c.S)(i)}).then((t=>{e("updateItem",t.data.data.searchresult)})).catch((e=>{console.warn("Issue with refreshItem",e),Promise.reject(e)}))}}},k={namespaced:!0,state:{contenttype:null,items:[],page:0,infiniteLoadingState:null},getters:{},mutations:{setItems(e,t){e.items=e.items.concat(t)},incrementPage(e){e.page+=1},setInfiniteState(e,t){e.infiniteLoadingState=t}},actions:{getItems:({dispatch:e,commit:t,state:n})=>f.Z.get(`/blabla_rest?_format=json&page=${n.page}`,{}).then((({data:e})=>{e.length?(t("setItems",e),n.infiniteLoadingState&&n.infiniteLoadingState.loaded()):n.infiniteLoadingState&&n.infiniteLoadingState.complete()})).catch((e=>{console.warn("Issue with blabla getitems",e),Promise.reject(e)})),nextPage({dispatch:e,commit:t,state:n},i){t("incrementPage"),t("setInfiniteState",i),e("getItems")},getItemIndex:({dispatch:e,commit:t,state:n},i)=>n.items.findIndex((e=>parseInt(e.nid)===i)),getPrevNextItems:({dispatch:e,commit:t,state:n},i)=>({prev:n.items[i-1],next:n.items[i+1]})}},S={namespaced:!0,state:{items:[],showrooms_by_tid:{}},getters:{},mutations:{setItems(e,t){e.items=e.items.concat(t),t.forEach(((t,n)=>{e.showrooms_by_tid[t.tid]=t}))}},actions:{getItems({dispatch:e,commit:t,state:n}){f.Z.get("/showrooms_rest?_format=json",{}).then((({data:e})=>{t("setItems",e)})).catch((e=>{console.warn("Issue with showrooms",e),Promise.reject(e)}))}}};var x=n(5277),T=n.n(x);const O={namespaced:!0,state:{products_ids:[],products:[]},getters:{},mutations:{setProductsIds(e,t){e.products_ids=t},setProducts(e,t){e.products=t}},actions:{getProducts({dispatch:e,commit:t,state:n}){e("loadProductsIds")},loadProductsIds({dispatch:e,commit:t,state:n}){f.Z.get("/pricing_rest?_format=json",{}).then((({data:n})=>{const i=[];for(let e=0;e{console.warn("Issue with pricing",e),Promise.reject(e)}))},loadProducts({dispatch:e,commit:t,state:n}){const i=u()`{ products(ids: [${n.products_ids}], lang: "${drupalDecoupled.lang_code}") { ...ProductsFields } diff --git a/web/themes/custom/materiotheme/assets/dist/main.js.gz b/web/themes/custom/materiotheme/assets/dist/main.js.gz index 7f715dad..002a23d2 100644 Binary files a/web/themes/custom/materiotheme/assets/dist/main.js.gz and b/web/themes/custom/materiotheme/assets/dist/main.js.gz differ diff --git a/web/themes/custom/materiotheme/assets/dist/report.html b/web/themes/custom/materiotheme/assets/dist/report.html index b2166ebb..8bf57664 100644 --- a/web/themes/custom/materiotheme/assets/dist/report.html +++ b/web/themes/custom/materiotheme/assets/dist/report.html @@ -3,7 +3,7 @@ - materio.com [8 Jun 2021 at 19:20] + materio.com [8 Jun 2021 at 19:34] diff --git a/web/themes/custom/materiotheme/vuejs/store/modules/blabla.js b/web/themes/custom/materiotheme/vuejs/store/modules/blabla.js index 6ebf4bfc..a493e5be 100644 --- a/web/themes/custom/materiotheme/vuejs/store/modules/blabla.js +++ b/web/themes/custom/materiotheme/vuejs/store/modules/blabla.js @@ -61,7 +61,7 @@ export default { console.log('getItemIndex nid', nid) return state.items.findIndex((e) => { // console.log('findIndex', e.nid, nid) - return e.nid === nid + return parseInt(e.nid) === nid }) }, getPrevNextItems ({ dispatch, commit, state }, index) {