diff --git a/web/themes/custom/materiotheme/assets/dist/main.js b/web/themes/custom/materiotheme/assets/dist/main.js index 4d8450c..8652ea3 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=>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()`{ + `;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=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 a441dd2..4bcad1e 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 908adde..d49efef 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 [5 Aug 2021 at 10:06] + materio.com [5 Aug 2021 at 10:22] diff --git a/web/themes/custom/materiotheme/vuejs/components/Pages/Showrooms.vue b/web/themes/custom/materiotheme/vuejs/components/Pages/Showrooms.vue index ada19b1..7efadae 100644 --- a/web/themes/custom/materiotheme/vuejs/components/Pages/Showrooms.vue +++ b/web/themes/custom/materiotheme/vuejs/components/Pages/Showrooms.vue @@ -18,7 +18,7 @@ import Showroom from 'vuejs/components/Content/Showroom' import { mapState, mapActions } from 'vuex' export default { - name: "Showrooms", + name: 'Showrooms', // data() { // return { // items:[], diff --git a/web/themes/custom/materiotheme/vuejs/store/modules/showrooms.js b/web/themes/custom/materiotheme/vuejs/store/modules/showrooms.js index 3d7c6a4..a2c37ba 100644 --- a/web/themes/custom/materiotheme/vuejs/store/modules/showrooms.js +++ b/web/themes/custom/materiotheme/vuejs/store/modules/showrooms.js @@ -18,10 +18,11 @@ export default { // mutations mutations: { setItems (state, items) { - state.items = state.items.concat(items) + state.items = items items.forEach((item, i) => { state.showrooms_by_tid[item.tid] = item }) + // console.log('Showroom setitems', state.showrooms_by_tid) } },