{"version":3,"sources":["webpack:///./src/modules/commercial-offers/components/new-offer/BasicInformation.vue?c659","webpack:///./node_modules/eslint-loader/index.js","webpack:///./src/modules/commercial-offers/components/new-offer/BasicInformation.vue?085b","webpack:///./src/modules/commercial-offers/components/new-offer/BasicInformation.vue?fdc4","webpack:///./node_modules/cache-loader/dist/cjs.js","webpack:///./src/modules/commercial-offers/components/new-offer/BasicInformation.vue?4f38","webpack:///./src/modules/commercial-offers/components/new-offer/BasicInformation.vue"],"names":["module","exports","FuncsNewCommercialOfferStep","form_valid_val","val","$emit","form","validate","this","Vue","__decorate","Ref","Component","AddClientMixin","Mixins","add_client","actions","clients_store","StaffsInviteFunctionsMixin","add_new_client","add_new_client_key","client_id","client_exists_dialog","loading","payload","is_valid","client","data","title","code","ResponseStatuses","Success","CREATED","Fail","UNAUTHORIZED","FORBIDDEN","UNPROCESSABLE","CONFLICT","String","$dialog","open","center_title","bts_align","BtnsPosition","CENTER","url","$router","resolve","name","Clients","Pages","CLIENT_DETAIL","params","id","href","window","close","mutations","CLEAR_CLIENT","render","_vm","_h","$createElement","_c","_self","ref","attrs","on","$event","preventDefault","submit","apply","arguments","model","value","callback","$$v","form_valid","expression","staticClass","_v","class","$style","itemsRow","select","item","clients","set_client","btnNewOffer","new_offer","client_contact_full_name","v","is_require","require_message","upd_field","client_contact_email","is_email","invalid_email","directives","rawName","is_correct_phone","invalid_phone_number","$set","key","scopedSlots","_u","fn","proxy","go_to_exist_client","close_client_exists_dialog","staticRenderFns","state","commercial_offers_store","BasicInformationStep","get_clients","resetValidation","$route","get_commercial_offer_by_id","Number","find","c","required_fields","client_contact_phone","every","field","Boolean","SET_CLIENT_TO_OFFER","UPD_NEW_OFFER_KEY","NewOfferStepMixin","AddNewClientMixin","ValidateMixin","components","TextField","Datepicker","Select","Table","Textarea","ClientExistDialog","AddNewClientDialog","injectStyles","context","locals","component","VBtn","VCol","VDivider","VForm","VIcon","VRow"],"mappings":"0HACAA,EAAOC,QAAU,CAAC,gBAA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,EAAkB,CACtBV,EAAMtB,UAAUC,yBAChBqB,EAAMtB,UAAUM,qBAChBgB,EAAMtB,UAAUiC,sBAGlB,OAAOD,EAAgBE,OAAM,SAACC,GAAD,OAAWC,QAAQD,QA7BX,qBAgCvC,WACE,OAAOb,EAAMtB,YAjCwB,mBAoCvC,WACE,OAAOxE,OAAc8F,MAAMzB,UArCU,wBAwCvC,SAAW5D,GACLA,GACF+B,EAAUqE,oBAAoBpG,KA1CK,uBA8CvC,SAAU6E,EAA+B7B,GACvCjB,EAAUsE,kBAAkB,CAAExB,MAAK7B,YA/CE,mBAkDvC,WACElE,KAAKH,MAAM,aAnD0B,GAASS,eAChDkH,aACAC,aACAC,SAHmBjB,EAAoB,gBAXxCrG,eAAU,CACTuH,WAAY,CACVC,iBACAC,kBACAC,cACAC,aACAC,gBACAC,kBAAmB,kBAAM,0CACzBC,mBAAoB,kBAAM,8CAGTzB,WCnK4a,I,qHCQjc,SAAS0B,EAAcC,GAErBpI,KAAK,UAAa,aAAOqI,QAAU,aAMrC,IAAIC,EAAY,eACd,EACAnF,EACAmD,GACA,EACA6B,EACA,KACA,MAIa,aAAAG,EAAiB,QAUhC,IAAkBA,EAAW,CAACC,OAAA,KAAKC,OAAA,KAAKC,WAAA,KAASC,QAAA,KAAMC,QAAA,KAAMC,OAAA","file":"js/home256.db624b07.js","sourcesContent":["// extracted by mini-css-extract-plugin\nmodule.exports = {\"v-application\":\"BasicInformation_v-application_1sJWC\",\"text-h1\":\"BasicInformation_text-h1_1ASLO\",\"text-h2\":\"BasicInformation_text-h2_1yP9h\",\"itemsRow\":\"BasicInformation_itemsRow_1Jms6\",\"itemsTitle\":\"BasicInformation_itemsTitle_36esN\",\"item\":\"BasicInformation_item_UVXKc\",\"wide\":\"BasicInformation_wide_31z60\",\"itemThreePartsRow\":\"BasicInformation_itemThreePartsRow_2VNWG\",\"itemThreeParts\":\"BasicInformation_itemThreeParts_19YAr\",\"itemsRowEqual\":\"BasicInformation_itemsRowEqual_1NJMV\",\"fileList\":\"BasicInformation_fileList_2j1cb\",\"itemFull\":\"BasicInformation_itemFull_38rxD\",\"btnWrap\":\"BasicInformation_btnWrap_3wP7o\",\"btnNewOffer\":\"BasicInformation_btnNewOffer_3VKzm\",\"searchNewRepair\":\"BasicInformation_searchNewRepair_22QPw\",\"selectNewRepair\":\"BasicInformation_selectNewRepair_2jncT\"};","import { Vue, Component } from 'vue-property-decorator';\nimport { clients_store } from '@/store';\nimport { ResponseStatuses } from '@/enums';\nimport { BtnsPosition } from '@/components/dialogs/simple/types';\nimport { Clients, AddClientResponse } from '../types';\n\nconst { actions } = clients_store;\n\n@Component({})\nexport default class StaffsInviteFunctionsMixin extends Vue {\n add_new_client = false;\n add_new_client_key = 0;\n\n client_id = '';\n client_exists_dialog = false;\n\n loading = false;\n\n async add_client(payload: { is_valid: boolean; client: Clients.Client }) {\n const { is_valid, client } = payload;\n\n if (is_valid) {\n this.loading = true;\n const data = await actions.add_new_client(client) as AddClientResponse;\n\n this.add_new_client = false;\n let title = '';\n\n switch (data.code) {\n case ResponseStatuses.Success.CREATED:\n title = 'Новый клиент успешно добавлен.';\n break;\n\n case ResponseStatuses.Fail.UNAUTHORIZED:\n title = 'Необходима авторизация';\n break;\n\n case ResponseStatuses.Fail.FORBIDDEN:\n title = 'Компания на верификации';\n break;\n\n case ResponseStatuses.Fail.UNPROCESSABLE:\n title = 'Ошибка валидации';\n break;\n\n case ResponseStatuses.Fail.CONFLICT:\n title = 'Внимание!';\n this.client_id = String(data.data?.client_id);\n this.client_exists_dialog = true;\n this.loading = false;\n return;\n\n default:\n title = 'Внутренняя ошибка';\n break;\n }\n this.loading = false;\n\n this.$dialog.open({\n center_title: true,\n bts_align: BtnsPosition.CENTER,\n title,\n });\n }\n }\n\n go_to_exist_client() {\n this.client_exists_dialog = false;\n\n const url = this.$router.resolve({\n name: Clients.Pages.CLIENT_DETAIL,\n params: { id: this.client_id },\n }).href;\n\n window.open(url, '_blank');\n this.close();\n }\n\n close() {\n this.client_exists_dialog = false;\n clients_store.mutations.CLEAR_CLIENT();\n this.add_new_client_key += 1;\n }\n\n close_client_exists_dialog() {\n this.client_exists_dialog = false;\n this.add_new_client = true;\n }\n}\n","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!./BasicInformation.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!./BasicInformation.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('v-form',{ref:\"form\",attrs:{\"lazy-validation\":\"\"},on:{\"submit\":function($event){$event.preventDefault();return _vm.submit.apply(null, arguments)}},model:{value:(_vm.form_valid),callback:function ($$v) {_vm.form_valid=$$v},expression:\"form_valid\"}},[_c('v-row',{staticClass:\"mt-0\"},[_c('v-col',{attrs:{\"cols\":\"12\",\"sm\":\"12\",\"lg\":\"8\"}},[_c('h3',{staticClass:\"text-h3 mb-8\"},[_vm._v(\" Информация о клиенте \")]),_c('div',{class:[_vm.$style.itemsRow, 'mb-6']},[_c('Select',{class:[_vm.$style.select, _vm.$style.item],attrs:{\"value\":_vm.client,\"items\":_vm.clients,\"label\":\"Клиент\",\"item-text\":\"name_client_company\",\"return_object\":\"\",\"hide-details\":\"\",\"blue_icon\":\"\",\"background-color\":\"#fff\",\"require\":\"\",\"dense\":\"\",\"is_autocomplete\":\"\"},on:{\"input\":function($event){return _vm.set_client($event)}}}),_c('v-btn',{class:_vm.$style.btnNewOffer,attrs:{\"color\":\"accent darken-4 ml-4\",\"depressed\":\"\"},on:{\"click\":function($event){_vm.add_new_client = true}}},[_c('v-icon',{staticClass:\"mr-2\"},[_vm._v(\"mdi-plus\")]),_vm._v(\" Добавить нового клиента \")],1)],1),_c('div',{class:[_vm.$style.itemsRow, 'mb-6']},[_c('TextField',{class:_vm.$style.item,attrs:{\"value\":_vm.new_offer.client_contact_full_name,\"label\":\"ФИО контактного лица\",\"hide-details\":\"\",\"rules\":[\n function (v) { return _vm.is_require(v) || _vm.require_message; } ],\"require\":\"\",\"dense\":\"\"},on:{\"input\":function($event){return _vm.upd_field('client_contact_full_name', $event)}}}),_c('TextField',{class:_vm.$style.item,attrs:{\"value\":_vm.new_offer.client_contact_email,\"label\":\"E-mail контактного лица\",\"rules\":[\n function (v) { return _vm.is_require(v) || _vm.require_message; },\n function (v) { return _vm.is_email(v) || _vm.invalid_email; }\n ],\"hide-details\":\"\",\"require\":\"\",\"dense\":\"\"},on:{\"input\":function($event){return _vm.upd_field('client_contact_email', $event)}}})],1),_c('div',{class:[_vm.$style.itemsRow, 'mb-6']},[_c('TextField',{directives:[{name:\"mask\",rawName:\"v-mask\",value:(_vm.phone_mask),expression:\"phone_mask\"}],class:_vm.$style.item,attrs:{\"label\":\"Телефон контактного лица\",\"hide-details\":\"\",\"rules\":[\n function (v) { return _vm.is_require(v) || _vm.require_message; },\n function (v) { return _vm.is_correct_phone(v) || _vm.invalid_phone_number; }\n ],\"clearable\":\"\",\"require\":\"\",\"dense\":\"\"},on:{\"input\":function($event){return _vm.upd_field('client_contact_phone', $event)}},model:{value:(_vm.new_offer.client_contact_phone),callback:function ($$v) {_vm.$set(_vm.new_offer, \"client_contact_phone\", $$v)},expression:\"new_offer.client_contact_phone\"}})],1)])],1),_c('v-row',{staticClass:\"mt-0\"},[_c('v-col',[_c('v-divider',{staticClass:\"mb-6\"}),_c('div',{staticClass:\"d-flex mb-2\"},[_c('v-btn',{staticClass:\"mr-auto\",attrs:{\"depressed\":\"\"},on:{\"click\":_vm.close}},[_vm._v(\" Отменить \")]),_c('v-btn',{staticClass:\"ml-4\",attrs:{\"color\":\"accent darken-4\",\"depressed\":\"\",\"disabled\":!_vm.is_valid,\"type\":\"submit\"}},[_vm._v(\" Продолжить \")])],1)],1)],1)],1),_c('AddNewClientDialog',{key:_vm.add_new_client_key,on:{\"submit\":_vm.add_client,\"close\":function($event){_vm.add_new_client = false}},scopedSlots:_vm._u([{key:\"title\",fn:function(){return [_vm._v(\" Добавление клиента \")]},proxy:true},{key:\"exist_client\",fn:function(){return [_c('ClientExistDialog',{on:{\"close\":function($event){_vm.client_exists_dialog = false},\"go_to_exist_client\":_vm.go_to_exist_client,\"close_client_exists_dialog\":_vm.close_client_exists_dialog},model:{value:(_vm.client_exists_dialog),callback:function ($$v) {_vm.client_exists_dialog=$$v},expression:\"client_exists_dialog\"}})]},proxy:true}]),model:{value:(_vm.add_new_client),callback:function ($$v) {_vm.add_new_client=$$v},expression:\"add_new_client\"}},[_vm._v(\"] \")])],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\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, Mixins } from 'vue-property-decorator';\nimport {\n TextField, Datepicker, Select, Table, Textarea,\n} from '@/components';\nimport NewOfferStepMixin from '@/modules/commercial-offers/mixins/funcs_new_commercial_offer_step';\nimport { commercial_offers_store, clients_store } from '@/store';\nimport AddNewClientMixin from '@/modules/clients/shared/mixins/add_client';\nimport ValidateMixin from '@/mixins/validate';\nimport { Clients } from '@/modules/clients/types';\nimport { NewCommercialOffer } from '../../types';\n\nconst { state, mutations, actions } = commercial_offers_store;\n\n@Component({\n components: {\n TextField,\n Datepicker,\n Select,\n Table,\n Textarea,\n ClientExistDialog: () => import('@/modules/clients/shared/components/ClientExistDialog.vue'),\n AddNewClientDialog: () => import('@/modules/clients/shared/components/AddNewClientDialog.vue'),\n },\n})\nexport default class BasicInformationStep extends Mixins(\n NewOfferStepMixin,\n AddNewClientMixin,\n ValidateMixin,\n) {\n async mounted() {\n // TODO придумать как загружать клиентов\n await clients_store.actions.get_clients(100000);\n this.form.resetValidation();\n\n if (this.$route.params.id) {\n await actions.get_commercial_offer_by_id(Number(this.$route.params.id));\n\n if (state.new_offer.client_id) {\n this.client = clients_store.state.clients.find((c) => c.id === state.new_offer.client_id) as Clients.Client;\n }\n }\n }\n\n add_new_client = false\n client: Clients.Client | null = null\n\n get is_valid() {\n const required_fields = [\n state.new_offer.client_contact_full_name,\n state.new_offer.client_contact_email,\n state.new_offer.client_contact_phone,\n ];\n\n return required_fields.every((field) => Boolean(field));\n }\n\n get new_offer() {\n return state.new_offer;\n }\n\n get clients() {\n return clients_store.state.clients;\n }\n\n set_client(client: Clients.Client) {\n if (client) {\n mutations.SET_CLIENT_TO_OFFER(client);\n }\n }\n\n upd_field(key: keyof NewCommercialOffer, value: unknown) {\n mutations.UPD_NEW_OFFER_KEY({ key, value });\n }\n\n close() {\n this.$emit('close');\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!./BasicInformation.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!./BasicInformation.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./BasicInformation.vue?vue&type=template&id=50e4606f&\"\nimport script from \"./BasicInformation.vue?vue&type=script&lang=ts&\"\nexport * from \"./BasicInformation.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./BasicInformation.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 { VDivider } from 'vuetify/lib/components/VDivider';\nimport { VForm } from 'vuetify/lib/components/VForm';\nimport { VIcon } from 'vuetify/lib/components/VIcon';\nimport { VRow } from 'vuetify/lib/components/VGrid';\ninstallComponents(component, {VBtn,VCol,VDivider,VForm,VIcon,VRow})\n"],"sourceRoot":""}