{"version":3,"sources":["webpack:///./src/modules/organizations/components/partner-company/SalePoints.vue?d1a1","webpack:///./src/modules/organizations/components/partner-company/SalePoints.vue?4c8b","webpack:///./src/modules/organizations/components/partner-company/SalePoints.vue?736c","webpack:///./node_modules/cache-loader/dist/cjs.js","webpack:///./src/modules/organizations/components/partner-company/SalePoints.vue?6a24","webpack:///./src/modules/organizations/components/partner-company/SalePoints.vue"],"names":["module","exports","render","_vm","this","_h","$createElement","_c","_self","staticClass","attrs","company_is_cert","scopedSlots","_u","key","fn","ref","on","_g","_b","open_new_point_dialog","_v","_e","cols_default","cols_storage_name","$event","_l","header","idx","updated_cols","sale_points","loading","item","_s","is_active","class","is_mobile","stopPropagation","copy","address","$style","min_width","phone","id","min_width_mail","email","website","actionBtns","if_roles_confirm","edit_point","del_point","editable_point","add_or_edit","close_new_point_dialog","model","value","callback","$$v","new_point_dialog","expression","staticRenderFns","state","organizations_store","actions","SalePointsTab","cols","text","sortable","width","align","default_sale_point","ColsStorage","PARTNER_COMPANY_SALE_POINT","storageCols","localStorage","getItem","JSON","parse","get_sale_points","saved_cols","filteredCols","setItem","stringify","global_store","is_clear_locale_storage","isMobile","roles","user_store","getters","me_shared","map","slug","includes","UserRoles","Internal","PARTNER_MANAGER","VICE_PARTNER_MANAGER","user_orginazation","is_cert","get_partner_sale_points","confirm","open","is_del","del_sale_point","point","add_new_sale_point","code","upd_sale_point","copy_to_clipboard","Vue","__decorate","Ref","Watch","Component","components","Table","TextField","FileInput","ConfirmDialog","NewSalePointDialog","ResizeCols","ClearLocalStorage","injectStyles","context","locals","component","VBtn","VIcon","VTooltip"],"mappings":"8FACAA,EAAOC,QAAU,CAAC,gBAAgB,iCAAiC,UAAU,2BAA2B,UAAU,2BAA2B,WAAa,8BAA8B,UAAY,6BAA6B,eAAiB,oC,oCCDlP,oE,2CCAA,IAAIC,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EA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AAQwC,eAAe5D,GALjC,uBAMUoB,EAAQoC,0BANlB,OAOI/F,KAAK2B,SAAU,EAPnB,iDAlKgC,kFA6KhC,SAAWyE,GACTpG,KAAK+C,eAAiBqD,EACtBpG,KAAKsD,kBAAmB,IA/KM,mCAkLhC,WACMtD,KAAKO,kBACPP,KAAKsD,kBAAmB,KApLI,oCAwLhC,WACEtD,KAAKsD,kBAAmB,EACxBtD,KAAK+C,eAAiBmB,oCA1LQ,kFA6LhC,WAAkBkC,GAAlB,iGAGOA,QAHP,IAGOA,KAAO7D,GAHd,gCAIiBoB,EAAQ0C,mBAAmBD,GAJ5C,OAIIE,EAJJ,8CAMiB3C,EAAQ4C,eAAeH,GANxC,cAMIE,EANJ,iBAQUtG,KAAK0E,kBARf,QAWM4B,EAAO,KACTtG,KAAKiD,yBAZT,iDA7LgC,qIA6MhC,WAAWrB,GAAX,qFACMA,EADN,gCAEU4E,eAAkB5E,GAF5B,2CA7MgC,+DAAS6E,QAEzCC,gBADCC,kBACD,8BAGAD,gBADCE,eAAM,4BACP,4CALmBhD,EAAa,gBAXjCiD,eAAU,CACTC,WAAY,CACVC,aACAC,iBACAC,iBACAC,qBACAC,mBAAoB,kBAAM,0CAC1BC,WAAY,kBAAM,6CAClBC,kBAAmB,kBAAM,iDAGRzD,WC5Nsa,I,iFCQ3b,SAAS0D,EAAcC,GAErBvH,KAAK,UAAa,aAAOwH,QAAU,aAMrC,IAAIC,EAAY,eACd,EACA3H,EACA0D,GACA,EACA8D,EACA,KACA,MAIa,aAAAG,EAAiB,QAOhC,IAAkBA,EAAW,CAACC,OAAA,KAAKC,QAAA,KAAMC,WAAA","file":"js/home922.3282c75e.js","sourcesContent":["// extracted by mini-css-extract-plugin\nmodule.exports = {\"v-application\":\"SalePoints_v-application_gNa6Q\",\"text-h1\":\"SalePoints_text-h1_2WrnO\",\"text-h2\":\"SalePoints_text-h2_3hPvC\",\"actionBtns\":\"SalePoints_actionBtns_nBThD\",\"min_width\":\"SalePoints_min_width_zsxUy\",\"min_width_mail\":\"SalePoints_min_width_mail_2ZDIZ\"};","export { default } from \"-!../../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-0-0!../../../../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-0-1!../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-0-2!../../../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-0-3!../../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SalePoints.vue?vue&type=style&index=0&module=true&lang=scss&\"; export * from \"-!../../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-0-0!../../../../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-0-1!../../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-0-2!../../../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-0-3!../../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SalePoints.vue?vue&type=style&index=0&module=true&lang=scss&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('div',{staticClass:\"d-flex mb-6\"},[(_vm.if_roles_confirm)?_c('v-tooltip',{attrs:{\"bottom\":\"\",\"disabled\":_vm.company_is_cert},scopedSlots:_vm._u([{key:\"activator\",fn:function(ref){\nvar on = ref.on;\nvar attrs = ref.attrs;\nreturn [_c('div',_vm._g(_vm._b({staticClass:\"d-inline-block\"},'div',attrs,false),on),[_c('v-btn',{attrs:{\"color\":\"accent darken-4\",\"depressed\":\"\",\"disabled\":!_vm.company_is_cert},on:{\"click\":_vm.open_new_point_dialog}},[_c('v-icon',{staticClass:\"mr-2\"},[_vm._v(\"mdi-plus\")]),_vm._v(\" Добавить точку продаж \")],1)],1)]}}],null,false,1154538355)},[_vm._v(\" Добавление точки продаж доступно только для сертифицированных партнеров \")]):_vm._e(),_c('ClearLocalStorage',{attrs:{\"default_cols\":_vm.cols_default,\"storage_name\":_vm.cols_storage_name,\"cols_list\":_vm.cols_default},on:{\"update:cols_list\":function($event){_vm.cols_default=$event}}})],1),_vm._l((_vm.updated_cols),function(header,idx){return _c('ResizeCols',{key:idx,attrs:{\"header\":header,\"storage_name\":_vm.cols_storage_name}})}),_c('Table',{attrs:{\"headers\":_vm.updated_cols,\"items\":_vm.sale_points,\"loading\":_vm.loading,\"no-data-text\":\"Точки продаж отсутствуют\"},scopedSlots:_vm._u([{key:\"item.is_active\",fn:function(ref){\nvar item = ref.item;\nreturn [_vm._v(\" \"+_vm._s(item.is_active ? 'Включено' : 'Выключено')+\" \")]}},{key:\"item.address\",fn:function(ref){\nvar item = ref.item;\nreturn [_c('div',{class:{'d-flex align-center': !_vm.is_mobile}},[(item.address)?_c('v-tooltip',{attrs:{\"color\":\"primary darken-3\",\"bottom\":\"\"},scopedSlots:_vm._u([{key:\"activator\",fn:function(ref){\nvar on = ref.on;\nvar attrs = ref.attrs;\nreturn [_c('v-btn',_vm._g(_vm._b({attrs:{\"small\":\"\",\"icon\":\"\"},on:{\"click\":function($event){$event.stopPropagation();return _vm.copy(item.address)}}},'v-btn',attrs,false),on),[_c('v-icon',{attrs:{\"small\":\"\"}},[_vm._v(\"mdi-content-copy\")])],1)]}}],null,true)},[_c('span',[_vm._v(\"Копировать\")])]):_vm._e(),_c('span',[_vm._v(_vm._s(item.address))])],1)]}},{key:\"item.telephone\",fn:function(ref){\nvar item = ref.item;\nreturn [_c('div',{staticClass:\"d-flex flex-column\",class:_vm.$style.min_width},_vm._l((item.telephone),function(phone){return _c('div',{key:phone.id},[_c('v-tooltip',{attrs:{\"color\":\"primary darken-3\",\"bottom\":\"\"},scopedSlots:_vm._u([{key:\"activator\",fn:function(ref){\nvar on = ref.on;\nvar attrs = ref.attrs;\nreturn [_c('v-btn',_vm._g(_vm._b({attrs:{\"small\":\"\",\"icon\":\"\"},on:{\"click\":function($event){$event.stopPropagation();return _vm.copy(phone)}}},'v-btn',attrs,false),on),[_c('v-icon',{attrs:{\"small\":\"\"}},[_vm._v(\"mdi-content-copy\")])],1)]}}],null,true)},[_c('span',[_vm._v(\"Копировать\")])]),_c('span',[_vm._v(_vm._s(phone))])],1)}),0)]}},{key:\"item.email\",fn:function(ref){\nvar item = ref.item;\nreturn [_c('div',{class:_vm.$style.min_width_mail},[(item.email)?_c('v-tooltip',{attrs:{\"color\":\"primary darken-3\",\"bottom\":\"\"},scopedSlots:_vm._u([{key:\"activator\",fn:function(ref){\nvar on = ref.on;\nvar attrs = ref.attrs;\nreturn [_c('v-btn',_vm._g(_vm._b({attrs:{\"small\":\"\",\"icon\":\"\"},on:{\"click\":function($event){$event.stopPropagation();return _vm.copy(item.email)}}},'v-btn',attrs,false),on),[_c('v-icon',{attrs:{\"small\":\"\"}},[_vm._v(\"mdi-content-copy\")])],1)]}}],null,true)},[_c('span',[_vm._v(\"Копировать\")])]):_vm._e(),_c('span',[_vm._v(_vm._s(item.email))])],1)]}},{key:\"item.website\",fn:function(ref){\nvar item = ref.item;\nreturn [(item.website !== null && item.website !== '')?_c('div',{class:_vm.$style.min_width},[_c('v-tooltip',{attrs:{\"color\":\"primary darken-3\",\"bottom\":\"\"},scopedSlots:_vm._u([{key:\"activator\",fn:function(ref){\nvar on = ref.on;\nvar attrs = ref.attrs;\nreturn [_c('v-btn',_vm._g(_vm._b({attrs:{\"small\":\"\",\"icon\":\"\"},on:{\"click\":function($event){$event.stopPropagation();return _vm.copy(item.website)}}},'v-btn',attrs,false),on),[_c('v-icon',{attrs:{\"small\":\"\"}},[_vm._v(\"mdi-content-copy\")])],1)]}}],null,true)},[_c('span',[_vm._v(\"Копировать\")])]),_c('span',[_vm._v(_vm._s(item.website))])],1):_vm._e()]}},{key:\"item.action\",fn:function(ref){\nvar item = ref.item;\nreturn [_c('div',{class:_vm.$style.actionBtns},[_c('v-btn',{attrs:{\"disabled\":!_vm.if_roles_confirm,\"icon\":\"\",\"small\":\"\",\"color\":\"accent darken-4\"},on:{\"click\":function($event){return _vm.edit_point(item)}}},[_c('v-icon',[_vm._v(\"mdi-pencil-outline\")])],1),_c('v-btn',{staticClass:\"mr-1\",attrs:{\"disabled\":!_vm.if_roles_confirm,\"icon\":\"\",\"small\":\"\",\"color\":\"secondary darken-4\"},on:{\"click\":function($event){return _vm.del_point(item.id)}}},[_c('v-icon',[_vm._v(\"mdi-delete-outline\")])],1)],1)]}}],null,true)}),_c('NewSalePointDialog',{attrs:{\"sale_point\":_vm.editable_point},on:{\"submit\":_vm.add_or_edit,\"close\":_vm.close_new_point_dialog},model:{value:(_vm.new_point_dialog),callback:function ($$v) {_vm.new_point_dialog=$$v},expression:\"new_point_dialog\"}}),_c('ConfirmDialog',{ref:\"confirm\"})],2)}\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\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport {\n Component, Ref, Vue, Watch,\n} from 'vue-property-decorator';\nimport {\n Table,\n TextField,\n FileInput,\n ConfirmDialog,\n} from '@/components';\nimport { TableCol } from '@/types';\nimport { organizations_store, user_store, global_store } from '@/store';\nimport { UserRoles, ColsStorage } from '@/enums';\nimport { copy_to_clipboard } from '@/utils';\nimport { Organizations } from '../../types';\nimport { default_sale_point } from '../../services';\n\nconst { state, actions } = organizations_store;\n\n@Component({\n components: {\n Table,\n TextField,\n FileInput,\n ConfirmDialog,\n NewSalePointDialog: () => import('./NewSalePointDialog.vue'),\n ResizeCols: () => import('@/components/resize-cols/ResizeCols.vue'),\n ClearLocalStorage: () => import('@/components/clear-local-storage/ClearLocalStorage.vue'),\n },\n})\nexport default class SalePointsTab extends Vue {\n @Ref()\n readonly confirm!: ConfirmDialog;\n\n @Watch('is_clear_locale_storage')\n on_clear_storage_change(value: boolean) {\n if (value) {\n const storageCols = localStorage.getItem(this.cols_storage_name);\n\n if (storageCols) {\n this.updated_cols = JSON.parse(storageCols);\n }\n }\n }\n\n async mounted() {\n await this.get_sale_points();\n\n const saved_cols = localStorage.getItem(this.cols_storage_name);\n\n if (saved_cols) {\n this.updated_cols = JSON.parse(saved_cols as string);\n } else {\n const filteredCols = this.cols;\n\n localStorage.setItem(this.cols_storage_name, JSON.stringify(filteredCols));\n\n this.updated_cols = filteredCols;\n }\n }\n\n cols: TableCol[] = [\n {\n text: 'Наименование',\n value: 'name_sale_point',\n sortable: false,\n width: '250px',\n },\n {\n text: 'Адрес',\n value: 'address',\n sortable: false,\n width: '350px',\n },\n {\n text: 'Телефон',\n value: 'telephone',\n sortable: false,\n width: '250px',\n },\n {\n text: 'E-mail',\n value: 'email',\n sortable: false,\n width: '250px',\n },\n {\n text: 'Отображение на сайте',\n value: 'is_active',\n sortable: false,\n width: '260px',\n },\n {\n text: 'Сайт',\n value: 'website',\n sortable: false,\n width: '260px',\n },\n {\n text: 'Действие',\n value: 'action',\n align: 'center',\n sortable: false,\n width: '90px',\n },\n ];\n\n cols_default: TableCol[] = [\n {\n text: 'Наименование',\n value: 'name_sale_point',\n sortable: false,\n width: '250px',\n },\n {\n text: 'Адрес',\n value: 'address',\n sortable: false,\n width: '350px',\n },\n {\n text: 'Телефон',\n value: 'telephone',\n sortable: false,\n width: '250px',\n },\n {\n text: 'E-mail',\n value: 'email',\n sortable: false,\n width: '250px',\n },\n {\n text: 'Отображение на сайте',\n value: 'is_active',\n sortable: false,\n width: '260px',\n },\n {\n text: 'Сайт',\n value: 'website',\n sortable: false,\n width: '260px',\n },\n {\n text: 'Действие',\n value: 'action',\n align: 'center',\n sortable: false,\n width: '90px',\n },\n ];\n\n editable_point = default_sale_point();\n\n cols_storage_name = ColsStorage.PARTNER_COMPANY_SALE_POINT;\n\n updated_cols: TableCol[] = []\n\n new_point_dialog = false;\n\n loading = false;\n\n get is_clear_locale_storage() {\n return global_store.state.is_clear_locale_storage;\n }\n\n get is_mobile() {\n return global_store.state.isMobile;\n }\n\n get if_roles_confirm() {\n const roles = user_store.getters.me_shared.roles.map((item) => item.slug);\n\n return roles.includes(UserRoles.Internal.PARTNER_MANAGER)\n || roles.includes(UserRoles.Internal.VICE_PARTNER_MANAGER);\n }\n\n get company_is_cert() {\n return state.user_orginazation.is_cert;\n }\n\n get sale_points() {\n return state.sale_points;\n }\n\n async get_sale_points() {\n this.loading = true;\n await actions.get_partner_sale_points();\n this.loading = false;\n }\n\n async del_point(id: string | number) {\n const is_del = await this.confirm.open('Подтвердите удаление');\n\n if (is_del && typeof id !== 'undefined') {\n this.loading = true;\n await actions.del_sale_point(id);\n await actions.get_partner_sale_points();\n this.loading = false;\n }\n }\n\n edit_point(point: Organizations.SalePoint) {\n this.editable_point = point;\n this.new_point_dialog = true;\n }\n\n open_new_point_dialog() {\n if (this.company_is_cert) {\n this.new_point_dialog = true;\n }\n }\n\n close_new_point_dialog() {\n this.new_point_dialog = false;\n this.editable_point = default_sale_point();\n }\n\n async add_or_edit(point: Organizations.SalePoint) {\n let code;\n\n if (!point?.id) {\n code = await actions.add_new_sale_point(point) as number;\n } else {\n code = await actions.upd_sale_point(point) as number;\n\n await this.get_sale_points();\n }\n\n if (code < 299) {\n this.close_new_point_dialog();\n }\n }\n\n async copy(item: string) {\n if (item) {\n await copy_to_clipboard(item);\n }\n }\n}\n","import mod from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/ts-loader/index.js??ref--15-3!../../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SalePoints.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/ts-loader/index.js??ref--15-3!../../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SalePoints.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./SalePoints.vue?vue&type=template&id=4fa06ee9&\"\nimport script from \"./SalePoints.vue?vue&type=script&lang=ts&\"\nexport * from \"./SalePoints.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./SalePoints.vue?vue&type=style&index=0&module=true&lang=scss&\"\n\n\n\n\nfunction injectStyles (context) {\n \n this[\"$style\"] = (style0.locals || style0)\n\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 injectStyles,\n null,\n null\n \n)\n\nexport default component.exports\n\n/* vuetify-loader */\nimport installComponents from \"!../../../../../node_modules/vuetify-loader/lib/runtime/installComponents.js\"\nimport { VBtn } from 'vuetify/lib/components/VBtn';\nimport { VIcon } from 'vuetify/lib/components/VIcon';\nimport { VTooltip } from 'vuetify/lib/components/VTooltip';\ninstallComponents(component, {VBtn,VIcon,VTooltip})\n"],"sourceRoot":""}