From d9d2180f94507210583e4bf1c7f9f90d500765b0 Mon Sep 17 00:00:00 2001 From: bach Date: Tue, 8 Jun 2021 21:35:02 +0200 Subject: [PATCH] fixed article prev next --- .../custom/materiotheme/assets/dist/main.js | 2 +- .../materiotheme/assets/dist/main.js.gz | Bin 139158 -> 139167 bytes .../materiotheme/assets/dist/report.html | 4 ++-- .../vuejs/store/modules/blabla.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) 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 7f715dada7345c5b2d0e93f23ab0ebc0ca47ffb7..002a23d237a5a7f669301bb4641c3f1ed7a2ca87 100644 GIT binary patch delta 1968 zcmV;h2T%BxzX+ed2!MnEv;toje^IN-d=uw|dI@b4>so;00NIN~Ufwq}j8zDO+xKV4 zfjiLMoF$vRbH+neve7$d->8!%d}Z0lx{C}yei@b|p=R?x$vL5uc-!omsZO(>v$9k2 zk(}IMUEq)V^ebl{+_t>HAl@>LXz;*#P})fApWX%luLD zY&;#6#ZViY=9#bYEq5o;wO&@1qT7%*e@v}rl?BOUE8c^At=BlcdwSh>0a|$mwS&=0 z^Cz0AS!|u-e(~l`T?cL*aWjSMwjMK|^vmqK&}*J|N3gn5WPPUY)QDEaZMz;}rp(ce z-HHBVIx^`L2C94YiPMMce-p|wn#F0T9EHLR;6ZAx)6{YfG(M17=jR^`<2{G_X52Xr zxU_RplJ*olm7qf!cmGjuJ-@xpo<;~Z?%p7$?t=~z z5`1Ay(<6<8B;x2i2#~_eq^AIds;ZpJ?1CC&hdabl*%?Q?M&g{^BpyLl zr!puy8S66Z>yPkL@z3@fqzJ1zQ|a_tnea4NzXxzPn=`Z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R}#wj@oU4TUn{T45O_Fo$f~`#hq)tAw4Cs2a#q z9Cx2hNIyC2pFhnHsD%I{iKOs=f9oOAQq_4uGf01)N1%%Oe>h&~Yww^pdO9o5jdU$K zDc9FG^*M=;O?`8SV-#g_+OUhMsxmFJ<7te2?GQ_4XB_bwiPLqHZUniU%An|Etjnyg zKf+JNKilt(BADt-rPFI=g3@699>B?L&d^@SAQgZ%k8HUxsqoyX2%}=5??r@W@WE}|FP~v1Y zio;P&EapMQ#4TANi*LW2#+PqMedWA`$qjZ)rzDQ1-%Je4PffD%aWpxbveX?nvfUK< z$P1!Kf8E|T-(c0){G>kKU{{Q)q)7A|M`L~eV~*TUBgjA!R2Dut&DJ1RfCU`X5c}-j zw7l4S;?d$?%B|6;*Y84VjMmq&nc+f^A~2H2FN3i8vIbrV;7}zWacn*;97s4M-qL=` zhT1IdWGSbPi0})`nfP7ug+OzO^~T=z*6WmbKnkqkk$R9z^lwOk1H9FfzQuHeJkNd{ zg!%eQ@JpFQe|D8GrkyRPlT z1);jwA`P(I@{p8ti6exYJqTRS>ASsPtV(_fKZ zZ^P5Rm!1EiB|lQNQ!^WN^YcV zOprjKcA!7!qzN84pVCS$nUPqCkcx1vvSf{DFd?i>7PByIVm58!5Fw3- z4z4+YB7`efp}~y&LI=uC12R%G*GSDt4o_g?W;(kSQU%MuXWet;XFo#)Vj;pU%v(eV zNJ;saTy(S&#gk~xqDg_h^CiNl;xJq*IHjXobfM))tUk9`igW>-+Lu%x0z(K^dxO5D GN(TU&chATG 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) {