{"version":3,"sources":["webpack:///./src/views/pages/app/shopping-basket.vue?9c58","webpack:///./node_modules/cache-loader/dist/cjs.js","webpack:///./src/views/pages/app/shopping-basket.vue?cf92","webpack:///./src/views/pages/app/shopping-basket.vue"],"names":["render","_vm","this","_h","$createElement","_c","_self","attrs","model","value","callback","$$v","errorResponse","expression","staticClass","articles","length","_v","_s","$t","scopedSlots","_u","key","fn","ref","article","on","deleteArticle","_e","staticRenderFns","Vue","extend","layout","data","undefined","mounted","populateData","methods","$shoppingBasket","getLocalBasket","items","updateBasketFromServer","_a","basketItems","map","item","error_1","console","error","index","findIndex","articleInBasket","id","splice","component"],"mappings":"uHAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,QAAQ,CAACE,MAAM,CAAC,aAAa,GAAG,cAAc,KAAK,CAACF,EAAG,QAAQ,CAACE,MAAM,CAAC,KAAO,GAAG,IAAM,GAAG,IAAM,GAAG,IAAM,KAAK,CAACF,EAAG,cAAc,CAACA,EAAG,kBAAkB,CAACG,MAAM,CAACC,MAAOR,EAAiB,cAAES,SAAS,SAAUC,GAAMV,EAAIW,cAAcD,GAAKE,WAAW,mBAAmBR,EAAG,YAAY,CAACS,YAAY,OAAOP,MAAM,CAAC,UAAY,EAAE,KAAO,KAAK,CAACF,EAAG,UAAU,CAACS,YAAY,OAAOP,MAAM,CAAC,KAAO,OAAO,MAAQ,UAAU,OAASN,EAAIc,UAAoC,IAAxBd,EAAIc,SAASC,SAAe,CAACf,EAAIgB,GAAG,IAAIhB,EAAIiB,GAAGjB,EAAIkB,GAAG,8BAA8B,OAAQlB,EAAIc,UAAYd,EAAIc,SAASC,OAAS,EAAGX,EAAG,iBAAiB,CAACE,MAAM,CAAC,UAAW,GAAMa,YAAYnB,EAAIoB,GAAG,CAAC,CAACC,IAAI,iBAAiBC,GAAG,SAASC,GACvvB,IAAIC,EAAUD,EAAIC,QAClB,MAAO,CAACpB,EAAG,2BAA2B,CAACE,MAAM,CAAC,MAAQkB,GAASC,GAAG,CAAC,OAASzB,EAAI0B,qBAAqB,MAAK,EAAM,YAAYnB,MAAM,CAACC,MAAOR,EAAY,SAAES,SAAS,SAAUC,GAAMV,EAAIc,SAASJ,GAAKE,WAAW,cAAcZ,EAAI2B,MAAM,IAAI,IAAI,GAAGvB,EAAG,QAAQ,CAACE,MAAM,CAAC,KAAO,GAAG,IAAM,GAAG,IAAM,GAAG,IAAM,KAAK,CAACF,EAAG,0BAA0B,CAACE,MAAM,CAAC,GAAK,QAAQ,aAAa,sCAAsC,IAAI,IACjZsB,EAAkB,G,wDCwBPC,SAAIC,OAAO,CACxBC,OAAQ,UACRC,KAAM,WAAM,MAAC,CACXrB,mBAAesB,EACfnB,SAAU,KAEZoB,QAAO,WACLjC,KAAKkC,gBAEPC,QAAS,CACDD,aAAN,W,8HACElC,KAAKU,mBAAgBsB,EACrBhC,KAAKa,SAAWb,KAAKoC,gBAAgBC,iBAAiBC,M,iBAEpD,O,sBAAA,GAAMtC,KAAKoC,gBAAgBG,0B,cAA3BC,SACMC,EAAczC,KAAKoC,gBAAgBC,iBAAiBC,MACpDzB,EAAW4B,EAAYC,KAAI,SAACC,GAAc,OAAAA,EAAKpB,WACrDvB,KAAKa,SAAWA,E,+BAEhBb,KAAKU,cAAgBkC,EACrBC,QAAQC,MAAMF,G,+BAGlBnB,cAAA,SAAcF,GACZ,IAAMwB,EAAQ/C,KAAKa,SAASmC,WAAU,SAACC,GAAyB,OAAAA,EAAgBC,KAAO3B,EAAQ2B,MAC3FH,GAAS,GACX/C,KAAKa,SAASsC,OAAOJ,EAAO,OCrDkb,I,YCOldK,EAAY,eACd,EACAtD,EACA6B,GACA,EACA,KACA,KACA,MAIa,aAAAyB,E","file":"js/chunk-2d22b983.1153e053.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('p-row',{attrs:{\"no-gutters\":\"\",\"fill-height\":\"\"}},[_c('p-col',{attrs:{\"sm12\":\"\",\"md7\":\"\",\"lg8\":\"\",\"xl6\":\"\"}},[_c('p-container',[_c('p-request-alert',{model:{value:(_vm.errorResponse),callback:function ($$v) {_vm.errorResponse=$$v},expression:\"errorResponse\"}}),_c('p-surface',{staticClass:\"pa-4\",attrs:{\"elevation\":0,\"flat\":\"\"}},[_c('p-alert',{staticClass:\"ma-5\",attrs:{\"type\":\"info\",\"color\":\"primary\",\"value\":!_vm.articles || _vm.articles.length === 0}},[_vm._v(\" \"+_vm._s(_vm.$t('shoppingBasket.noArticles'))+\" \")]),(_vm.articles && _vm.articles.length > 0)?_c('v-article-list',{attrs:{\"disabled\":true},scopedSlots:_vm._u([{key:\"article-action\",fn:function(ref){\nvar article = ref.article;\nreturn [_c('v-article-basket-actions',{attrs:{\"value\":article},on:{\"delete\":_vm.deleteArticle}})]}}],null,false,4123761221),model:{value:(_vm.articles),callback:function ($$v) {_vm.articles=$$v},expression:\"articles\"}}):_vm._e()],1)],1)],1),_c('p-col',{attrs:{\"sm12\":\"\",\"md5\":\"\",\"lg4\":\"\",\"xl6\":\"\"}},[_c('v-shopping-basket-costs',{attrs:{\"to\":\"login\",\"label-back\":\"shoppingBasket.continueShopping\"}})],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport BasketItemModel from '@/src/services/types/model/BasketItemModel';\nimport Vue from 'vue';\n\nexport default Vue.extend({\n layout: 'reduced',\n data: () => ({\n errorResponse: undefined,\n articles: [] as BasketItemModel[],\n }),\n mounted() {\n this.populateData();\n },\n methods: {\n async populateData() {\n this.errorResponse = undefined;\n this.articles = this.$shoppingBasket.getLocalBasket().items;\n try {\n await this.$shoppingBasket.updateBasketFromServer();\n const basketItems = this.$shoppingBasket.getLocalBasket().items;\n const articles = basketItems.map((item: any) => item.article);\n this.articles = articles;\n } catch (error: any) {\n this.errorResponse = error;\n console.error(error);\n }\n },\n deleteArticle(article: any) {\n const index = this.articles.findIndex((articleInBasket: any) => articleInBasket.id === article.id);\n if (index >= 0) {\n this.articles.splice(index, 1);\n }\n },\n },\n});\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader/index.js??ref--14-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./shopping-basket.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader/index.js??ref--14-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./shopping-basket.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./shopping-basket.vue?vue&type=template&id=041a7d90&\"\nimport script from \"./shopping-basket.vue?vue&type=script&lang=ts&\"\nexport * from \"./shopping-basket.vue?vue&type=script&lang=ts&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""}