{"version":3,"sources":["webpack:///./src/modules/clients/views/ClientDetail.vue?a180","webpack:///./node_modules/cache-loader/dist/cjs.js","webpack:///./src/modules/clients/views/ClientDetail.vue?d501","webpack:///./src/modules/clients/views/ClientDetail.vue","webpack:///./src/modules/clients/views/ClientDetail.vue?f155","webpack:///./src/modules/clients/views/ClientDetail.vue?c2e4"],"names":["render","_vm","this","_h","$createElement","_c","_self","attrs","go_to_clients","scopedSlots","_u","key","fn","_v","proxy","on","edit_btn_clicked","_s","current_client_field","info_message","staticClass","domProps","_e","main_info_cols","current_client","_f","$event","stopPropagation","del_handler","apply","arguments","contacts_cols","_l","col","i","slot_name","field","ref","item","text","success_dialog","message_dialog","model","value","callback","$$v","expression","staticRenderFns","clients_store","modules","client_detail","actions","state","mutations","ClientDetailPage","single_slot_name","loading","$route","params","id","undefined","get_client_by_id","code","ResponseStatuses","Fail","NOT_FOUND","$router","push","name","Clients","Pages","CLIENTS","RESET_CURRENT_CLIENT","user_store","me","available_pages","CLIENT_EDIT","confirm","open","is_del","remove_client","error","data","CONFLICT","message","alert_page","find","page","slug","info_message_detail","Vue","__decorate","Ref","Component","components","PageTitle","TextField","VerticalTable","BackBtn","ConfirmDialog","InfoAlert","SuccessDialog","injectStyles","context","locals","component","VBtn","VCol","VIcon","VRow","module","exports"],"mappings":"kHAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACA,EAAG,UAAU,CAACE,MAAM,CAAC,MAAQN,EAAIO,eAAeC,YAAYR,EAAIS,GAAG,CAAC,CAACC,IAAI,WAAWC,GAAG,WAAW,MAAO,CAACX,EAAIY,GAAG,yBAAyBC,OAAM,OAAUT,EAAG,YAAY,CAACU,GAAG,CAAC,iBAAmBd,EAAIe,kBAAkBP,YAAYR,EAAIS,GAAG,CAAC,CAACC,IAAI,QAAQC,GAAG,WAAW,MAAO,CAACX,EAAI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,QAAQC,KAAK,wBAFzC,UAEQC,EAFR,QAIMA,GAAwB,qBAAPpB,EAJvB,wBAKIzD,KAAKsD,SAAU,EALnB,SAMwBL,EAAQ6B,cAAcrB,GAN9C,UAMUsB,EANV,QAQgC,OAAvBA,QAAuB,IAAvBA,GAAA,UAAAA,EAAyBC,YAAzB,eAA+BpB,QAASC,QAAiBC,KAAKmB,SARvE,wBASMjF,KAAKuC,eAAL,OAAuBwC,QAAvB,IAAuBA,GAAvB,UAAuBA,EAAyBC,YAAhD,aAAuB,EAA+BE,QACtDlF,KAAKsC,gBAAiB,EACtBtC,KAAKsD,SAAU,EAXrB,2BAeItD,KAAKsD,SAAU,EACftD,KAAKgE,QAAQC,KAAK,CAChBC,KAAMC,aAAQC,MAAMC,UAjB1B,iDAzGmC,mFA+HnC,WAAY,MACJc,EAAanF,KAAKyE,gBAAgBW,MAAK,SAACC,GAAD,OAAUA,EAAKC,OAASnB,aAAQC,MAAMC,WAEnF,wBAAOc,QAAP,IAAOA,OAAP,EAAOA,EAAYI,2BAAnB,QAA0C,SAlIT,GAASC,QAE5CC,gBADCC,kBACD,8BAFmBtC,EAAgB,gBAXpCuC,eAAU,CACTC,WAAY,CACVC,iBACAC,iBACAC,qBACAC,eACAC,qBACAC,iBACAC,cAAe,kBAAM,iDAGJ/C,WCzIsZ,I,6FCQ3a,SAASgD,EAAcC,GAErBrG,KAAK,UAAa,aAAOsG,QAAU,aAMrC,IAAIC,EAAY,eACd,EACAzG,EACA+C,GACA,EACAuD,EACA,KACA,MAIa,aAAAG,EAAiB,QAQhC,IAAkBA,EAAW,CAACC,OAAA,KAAKC,OAAA,KAAKC,QAAA,KAAMC,OAAA,Q,uBClC9CC,EAAOC,QAAU,CAAC,gBAAgB,mCAAmC,UAAU,6BAA6B,UAAU,6BAA6B,YAAc,mC,kCCDjK","file":"js/home242.7d105cdc.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('BackBtn',{attrs:{\"go_to\":_vm.go_to_clients},scopedSlots:_vm._u([{key:\"btn-text\",fn:function(){return [_vm._v(\" К списку клиентов \")]},proxy:true}])}),_c('PageTitle',{on:{\"edit_btn_clicked\":_vm.edit_btn_clicked},scopedSlots:_vm._u([{key:\"title\",fn:function(){return [_vm._v(\" \"+_vm._s(_vm.current_client_field('name_client_company'))+\" \")]},proxy:true},{key:\"edit-btn-text\",fn:function(){return [_vm._v(\" Редактировать информацию клиента \")]},proxy:true}])}),(_vm.info_message())?_c('InfoAlert',{staticClass:\"mb-5\",attrs:{\"is_dark\":\"\"},scopedSlots:_vm._u([{key:\"alert_text\",fn:function(){return [_c('div',{domProps:{\"innerHTML\":_vm._s(_vm.info_message())}})]},proxy:true}],null,false,631939790)}):_vm._e(),_c('v-row',{staticClass:\"mt-1\"},[_c('v-col',{attrs:{\"cols\":\"12\",\"sm\":\"12\",\"lg\":\"8\"}},[_c('VerticalTable',{attrs:{\"cols\":_vm.main_info_cols,\"items_info\":_vm.current_client},scopedSlots:_vm._u([{key:\"text-item-created\",fn:function(){return [_c('td',[_c('small',[_vm._v(\" Дата заведения клиента \")])])]},proxy:true},{key:\"field-item-created_at\",fn:function(){return [_c('td',[_vm._v(\" \"+_vm._s(_vm._f(\"date_time\")(_vm.current_client_field('created_at')))+\" \")])]},proxy:true},{key:\"field-item-del_cell\",fn:function(){return [_c('td',[_c('v-btn',{staticClass:\"ml-n6\",attrs:{\"text\":\"\"},on:{\"click\":function($event){$event.stopPropagation();return _vm.del_handler.apply(null, arguments)}}},[_c('v-icon',[_vm._v(\"mdi-delete-outline\")]),_c('span',[_vm._v(\" Удалить \")])],1)],1)]},proxy:true}])})],1),_c('v-col',{attrs:{\"cols\":\"12\",\"sm\":\"12\",\"lg\":\"4\"}},[_c('VerticalTable',{attrs:{\"cols\":_vm.contacts_cols,\"items_info\":_vm.current_client,\"single_cell_render\":\"\"},scopedSlots:_vm._u([{key:\"table-title\",fn:function(){return [_vm._v(\" Контакты \")]},proxy:true},_vm._l((_vm.contacts_cols),function(col,i){return {key:_vm.slot_name(col.field),fn:function(ref){\nvar item = ref.item;\nreturn [_c('td',{key:i},[_vm._v(\" \"+_vm._s(_vm.current_client_field(item.field))+\" \"),_c('br'),_c('small',{domProps:{\"innerHTML\":_vm._s(item.text)}})])]}}})],null,true)})],1)],1),_c('ConfirmDialog',{ref:\"confirm\"}),_c('SuccessDialog',{attrs:{\"center_title\":\"\",\"center_text\":\"\"},on:{\"close\":function($event){_vm.success_dialog = false}},scopedSlots:_vm._u([{key:\"title\",fn:function(){return [_vm._v(\" Внимание! \")]},proxy:true},{key:\"text\",fn:function(){return [_vm._v(\" \"+_vm._s(_vm.message_dialog)+\" \")]},proxy:true}]),model:{value:(_vm.success_dialog),callback:function ($$v) {_vm.success_dialog=$$v},expression:\"success_dialog\"}})],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\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 { Component, Ref, Vue } from 'vue-property-decorator';\nimport { AxiosResponse } from 'axios';\nimport { clients_store, user_store } from '@/store';\nimport {\n PageTitle,\n TextField,\n VerticalTable,\n BackBtn,\n ConfirmDialog,\n InfoAlert,\n} from '@/components';\nimport { VerticalTableCol } from '@/components/vertical-table/types';\nimport { single_slot_name } from '@/utils';\nimport { ResponseStatuses } from '@/enums';\nimport { Clients } from '../types';\n\nconst { actions, state, mutations } = clients_store.modules.client_detail;\n\n@Component({\n components: {\n PageTitle,\n TextField,\n VerticalTable,\n BackBtn,\n ConfirmDialog,\n InfoAlert,\n SuccessDialog: () => import('@/components/dialogs/success/SuccessDialog.vue'),\n },\n})\nexport default class ClientDetailPage extends Vue {\n @Ref()\n readonly confirm!: ConfirmDialog;\n\n async mounted() {\n const { id = undefined } = this.$route.params;\n\n if (typeof id !== 'undefined') {\n const code = await actions.get_client_by_id(id);\n\n if (code === ResponseStatuses.Fail.NOT_FOUND) {\n this.$router.push({\n name: Clients.Pages.CLIENTS,\n });\n }\n }\n }\n\n destroyed() {\n mutations.RESET_CURRENT_CLIENT();\n }\n\n success_dialog = false;\n message_dialog = '';\n\n slot_name = single_slot_name;\n\n loading = false;\n\n main_info_cols: VerticalTableCol[] = [\n {\n field: 'name_client_company',\n text: 'Наименование компании',\n },\n {\n field: 'name_client_organization',\n text: 'Наименование юр.лица / физ.лица / ИП',\n },\n {\n field: 'inn_client',\n text: 'ИНН',\n },\n {\n field: 'kpp_client',\n text: 'КПП',\n },\n {\n field: 'region',\n text: 'Регион',\n },\n {\n field: 'city',\n text: 'Город',\n },\n {\n field: 'address',\n text: 'Адрес',\n },\n {\n field: 'created_at',\n text: 'Дата заведения клиента',\n },\n {\n field: 'del_cell',\n text: 'Удаление клиента',\n },\n ];\n\n contacts_cols: VerticalTableCol[] = [\n {\n field: 'contact_person',\n text: 'ФИО контактного лица',\n },\n {\n field: 'telephone',\n text: 'Телефон',\n },\n {\n field: 'email',\n text: 'Электронная почта',\n },\n ];\n\n get current_client() {\n return state.current_client;\n }\n\n get go_to_clients() {\n return { name: Clients.Pages.CLIENTS };\n }\n\n get available_pages() {\n return user_store.state.me.available_pages || [];\n }\n\n current_client_field(field: keyof Clients.Client) {\n return this.current_client[field] || '';\n }\n\n edit_btn_clicked() {\n this.$router.push({\n name: Clients.Pages.CLIENT_EDIT,\n });\n }\n\n async del_handler() {\n const { id } = this.current_client;\n const is_del = await this.confirm.open('Подтвердите удаление');\n\n if (is_del && typeof id !== 'undefined') {\n this.loading = true;\n const error = await actions.remove_client(id);\n\n if ((error as AxiosResponse)?.data?.code === ResponseStatuses.Fail.CONFLICT) {\n this.message_dialog = (error as AxiosResponse)?.data?.message;\n this.success_dialog = true;\n this.loading = false;\n return;\n }\n\n this.loading = false;\n this.$router.push({\n name: Clients.Pages.CLIENTS,\n });\n }\n }\n\n info_message() {\n const alert_page = this.available_pages.find((page) => page.slug === Clients.Pages.CLIENTS);\n\n return alert_page?.info_message_detail ?? null;\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!./ClientDetail.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!./ClientDetail.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./ClientDetail.vue?vue&type=template&id=7d201c45&\"\nimport script from \"./ClientDetail.vue?vue&type=script&lang=ts&\"\nexport * from \"./ClientDetail.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./ClientDetail.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 { VCol } from 'vuetify/lib/components/VGrid';\nimport { VIcon } from 'vuetify/lib/components/VIcon';\nimport { VRow } from 'vuetify/lib/components/VGrid';\ninstallComponents(component, {VBtn,VCol,VIcon,VRow})\n","// extracted by mini-css-extract-plugin\nmodule.exports = {\"v-application\":\"ClientDetail_v-application_2OBcJ\",\"text-h1\":\"ClientDetail_text-h1_LAO-n\",\"text-h2\":\"ClientDetail_text-h2_-BW7O\",\"tooltipInfo\":\"ClientDetail_tooltipInfo_3rdZ-\"};","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!./ClientDetail.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!./ClientDetail.vue?vue&type=style&index=0&module=true&lang=scss&\""],"sourceRoot":""}