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erService.ts","webpack://website-js/./src/components/TogglePrices.vue","webpack://website-js/./src/components/TogglePrices.vue?df2a","webpack://website-js/./src/components/TogglePrices.vue?7c5a","webpack://website-js/./src/components/TogglePrices.vue?ca14"],"sourcesContent":["import axios, { AxiosResponse } from 'axios';\nimport { AccountStatementResponse, Customer, CustomerProfile } from '@/models/Customer';\nimport { AccountStatementFilterModel } from '@/models/Order';\n\nexport default class CustomerService {\n\n private profileId: string = (window as any).CbxApiContextKey;\n private endpoint: string;\n\n constructor(args: any = {}) {\n if (args.profileId)\n this.profileId = args.profileId;\n this.endpoint = `/contextapi/${this.profileId}/v1/customer`;\n }\n\n public async getCustomer(): Promise {\n try {\n const res: AxiosResponse = await axios.get(`${this.endpoint}`);\n return res.data;\n } catch (e) {\n console.log(e);\n }\n }\n\n public async search(query: string, limit: number = 15, offset: number = 0): Promise {\n try {\n const res: AxiosResponse = await axios.get(`${this.endpoint}/search/?query=${query}&limit=${limit}&offset=${offset}`);\n return res.data;\n } catch (e) {\n console.log(e);\n }\n } \n\n public async changeCustomer(selectedcustomer: string): Promise {\n try {\n const res: AxiosResponse = await axios.post(`${this.endpoint}/change/?selectedcustomer=${selectedcustomer}`);\n return res.data;\n } catch (e) {\n console.log(e);\n }\n } \n\n public async changeCustomerProfile(customerprofile: CustomerProfile): Promise {\n try {\n const res: AxiosResponse = await axios.get(`${this.endpoint}/changeprofile/?customerprofile=${customerprofile}`);\n return res.data;\n } catch (e) {\n console.log(e);\n }\n }\n\n public async togglePrices(hide: boolean): Promise {\n try {\n const res: AxiosResponse = await axios.get(`${this.endpoint}/toggleprices/?hide=${hide}`);\n return res.data;\n } catch (e) {\n console.log(e);\n }\n }\n\n public async getAccountStatement(filter: AccountStatementFilterModel): Promise {\n try {\n const res: AxiosResponse = await axios.post(`${this.endpoint}/accountstatement`, filter);\n return res.data;\n } catch (e) {\n console.log(e);\n }\n }\n}\n","var render = function render(){var _vm=this,_c=_vm._self._c,_setup=_vm._self._setupProxy;return _c('div',{staticClass:\"toggle-prices\"},[_c('button',{staticClass:\"uk-button\",on:{\"click\":function($event){return _vm.togglePrices(!_vm.isPricesHiddenByUser)}}},[(_vm.isPricesHiddenByUser)?[_vm._v(\" \"+_vm._s(_vm.showText)+\" \"),_c('span',{attrs:{\"uk-icon\":\"icon: show\"}})]:[_vm._v(\" \"+_vm._s(_vm.hideText)+\" \"),_c('span',{attrs:{\"uk-icon\":\"icon: hide\"}})]],2)])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\nimport { Component, Prop, Vue } from 'vue-property-decorator';\nimport CustomerService from '@/services/CustomerService';\n\n@Component({\n name: 'TogglePrices',\n})\nexport default class TogglePrices extends Vue {\n @Prop({ type: String, required: true }) private hideText: string;\n @Prop({ type: String, required: true }) private showText: string;\n @Prop({ type: Boolean, required: true }) private isPricesHiddenByUser: boolean;\n\n private cs: CustomerService = new CustomerService();\n\n private async togglePrices(hide: boolean) {\n if (this.isPricesHiddenByUser != hide) {\n await this.cs.togglePrices(hide);\n window.location.reload();\n }\n }\n}\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??clonedRuleSet-41.use[0]!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/ts-loader/index.js??clonedRuleSet-41.use[3]!../../node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!../../node_modules/@vue/cli-service/lib/config/vue-loader-v15-resolve-compat/vue-loader.js??vue-loader-options!./TogglePrices.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??clonedRuleSet-41.use[0]!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/ts-loader/index.js??clonedRuleSet-41.use[3]!../../node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!../../node_modules/@vue/cli-service/lib/config/vue-loader-v15-resolve-compat/vue-loader.js??vue-loader-options!./TogglePrices.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./TogglePrices.vue?vue&type=template&id=768f1005&\"\nimport script from \"./TogglePrices.vue?vue&type=script&lang=ts&\"\nexport * from \"./TogglePrices.vue?vue&type=script&lang=ts&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/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"],"names":["CustomerService","constructor","args","_defineProperty","window","CbxApiContextKey","profileId","this","endpoint","async","res","axios","data","e","console","log","query","limit","offset","selectedcustomer","customerprofile","hide","filter","render","_vm","_c","_self","_setupProxy","staticClass","on","$event","togglePrices","isPricesHiddenByUser","_v","_s","showText","attrs","hideText","staticRenderFns","TogglePrices","Vue","cs","location","reload","__decorate","Prop","type","String","required","Boolean","Component","name","component"],"sourceRoot":""}