{"version":3,"sources":["webpack:///./src/views/Flow/Step4LeasingCompany/Step4LeasingCompany.styles.scss?ffbf","webpack:///./src/views/Flow/Step4LeasingCompany/Step4LeasingCompany.vue?6631","webpack:///./src/views/Flow/Step4LeasingCompany/Step4LeasingCompany.controller.js","webpack:///./src/views/Flow/Step4LeasingCompany/Step4LeasingCompany.controller.js?8e0c","webpack:///./src/views/Flow/Step4LeasingCompany/Step4LeasingCompany.vue"],"names":["render","_vm","this","_h","$createElement","_c","_self","staticClass","attrs","$gettext","on","goToPreviousStep","directives","name","rawName","_v","ref","$event","preventDefault","save","class","scopedSlots","_u","key","fn","errors","classes","value","expression","$$selectedVal","Array","prototype","filter","call","target","options","o","selected","map","val","_value","leasingCompanyId","multiple","_l","leasingCompany","domProps","id","_s","personalDataState","company","personalData","setCompanyInformation","staticRenderFns","components","Title","ValidationObserver","ValidationProvider","CustomInput","props","data","computed","mapGetters","leasingCompanies","get","set","newModel","changePersonalDataStateObject","state","property","setPersonalDataMutation","methods","mapActions","getLeasingCompanies","setValidationMessages","extend","validate","Vue","$router","push","validationFlow","validateStep4LeasingCompanyInfo","mapMutations","created","length","component"],"mappings":"yIAAA,yBAAyc,EAAG,G,2CCA5c,I,EAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACE,YAAY,eAAe,CAACF,EAAG,QAAQ,CAACG,MAAM,CAAC,kBAAoBP,EAAIQ,SAAS,4BAA4BC,GAAG,CAAC,yBAAyBT,EAAIU,mBAAmB,CAACN,EAAG,KAAK,CAACO,WAAW,CAAC,CAACC,KAAK,YAAYC,QAAQ,iBAAiB,CAACb,EAAIc,GAAG,sBAAsBV,EAAG,IAAI,CAACO,WAAW,CAAC,CAACC,KAAK,YAAYC,QAAQ,gBAAgBP,YAAY,UAAU,CAACN,EAAIc,GAAG,6BAA6BV,EAAG,IAAI,CAACO,WAAW,CAAC,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FQ,yBAGRC,QAHQ,IAIPC,OAAY5C,KAAO4C,QAJZ,GAMVC,MAAO,GACPC,KAAM,iBAAO,IAGbC,SAAU,EAAF,GACHC,eAAW,cAAe,CAC3BX,aAAc,kBACdF,kBAAmB,oBAHf,GAKHa,eAAW,iBAAkB,CAC9BC,iBAAkB,wBANd,CAQNrB,iBAAkB,CAChBsB,IADgB,WAEd,OAAO7D,KAAK8C,kBAAkBP,kBAEhCuB,IAJgB,SAIZC,GACF,GAAgB,MAAZA,EAAkB,CACpB,IAAMC,EAAgC,CACpCC,MAAOF,EACPG,SAAU,oBAGZlE,KAAKmE,wBAAwBH,GAG/B,OAAOD,MAIbK,QAAS,EAAF,GACFC,eAAW,iBAAkB,CAC9BC,oBAAqB,iCAFlB,CAILC,sBAJO,WAOLC,eAAO,iBAAkB,CACvBC,SAAU,SAAChD,GACT,OAAc,IAAVA,GAIGiD,aAAI7C,UAAUtB,SAAS,oCAIpCE,iBAjBO,WAkBLT,KAAK2E,QAAQC,KAAK,CAChBjE,KAAM,mBAGVsC,sBAtBO,WAuBL,IAAMe,EAAgC,CACpCC,MAAOjE,KAAK8C,kBAAkBC,QAC9BmB,SAAU,WAGZlE,KAAKmE,wBAAwBH,GAEC,IAA1BhE,KAAKuC,kBACPsC,OAAeC,oCAGhBC,eAAa,cAAe,CAC7BZ,wBAAyB,sBAG7Ba,QA5Ea,WA6EXhF,KAAKuE,wBAEgC,IAAjCvE,KAAK4D,iBAAiBqB,QACxBjF,KAAKsE,wBCrGoT,I,wBCQ3TY,EAAY,eACd,EACApF,EACAoD,GACA,EACA,KACA,KACA,MAIa,aAAAgC,E","file":"js/chunk-41ebdcc4.6f0043c5.js","sourcesContent":["import mod from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!./Step4LeasingCompany.styles.scss?vue&type=style&index=0&lang=scss&\"; export default mod; export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!./Step4LeasingCompany.styles.scss?vue&type=style&index=0&lang=scss&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"l-container\"},[_c('Title',{attrs:{\"previousStepTitle\":_vm.$gettext('Step 4 - Previous title')},on:{\"on-go-to-previous-step\":_vm.goToPreviousStep}},[_c('h1',{directives:[{name:\"translate\",rawName:\"v-translate\"}]},[_vm._v(\"Step 4 - Title\")])]),_c('p',{directives:[{name:\"translate\",rawName:\"v-translate\"}],staticClass:\"u-hide\"},[_vm._v(\"Step 4 - Previous title\")]),_c('p',{directives:[{name:\"translate\",rawName:\"v-translate\"}],staticClass:\"u-hide\"},[_vm._v(\"Step 4 - Title\")]),_c('hr',{staticClass:\"hr--full-width\"}),_c('div',{staticClass:\"m-component\"},[_c('div',{staticClass:\"m-component__info\"},[_c('p',{directives:[{name:\"translate\",rawName:\"v-translate\"}],staticClass:\"m-component__title\"},[_vm._v(\" Component - Leasing company - Title \")])]),_c('div',{staticClass:\"m-component__container\"},[_c('ValidationObserver',{ref:\"form\",attrs:{\"slim\":\"\"}},[_c('form',{attrs:{\"id\":\"personalDataForm\"},on:{\"submit\":function($event){$event.preventDefault();return _vm.save($event)}}},[_c('div',{staticClass:\"u-hide\"},[_c('p',{directives:[{name:\"translate\",rawName:\"v-translate\"}]},[_vm._v(\"Validation - Leasing company\")])]),_c('ValidationProvider',{staticClass:\"a-input__validation-wrapper\",class:{\n 'form-control': 'form-control',\n },attrs:{\"rules\":\"objectNotEmpty\"},scopedSlots:_vm._u([{key:\"default\",fn:function(ref){\n var errors = ref.errors;\n var classes = ref.classes;\nreturn [_c('span',{staticClass:\"a-input__validation-wrapper form-control\"},[_c('label',{staticClass:\"a-input__label\"},[_c('p',{directives:[{name:\"translate\",rawName:\"v-translate\"}]},[_vm._v(\" Component - Peronsal data form - Leasing company \")]),_c('select',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.leasingCompanyId),expression:\"leasingCompanyId\"}],class:classes,attrs:{\"name\":\"leasingCompanyId\"},on:{\"change\":function($event){var $$selectedVal = Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = \"_value\" in o ? o._value : o.value;return val}); _vm.leasingCompanyId=$event.target.multiple ? $$selectedVal : $$selectedVal[0]}}},_vm._l((_vm.leasingCompanies),function(leasingCompany){return _c('option',{key:leasingCompany.name,domProps:{\"value\":leasingCompany.id}},[_vm._v(\" \"+_vm._s(leasingCompany.name)+\" \")])}),0),_c('span',{staticClass:\"a-input__validation-message\"},[_vm._v(_vm._s(errors[0]))])])])]}}])}),_c('CustomInput',{attrs:{\"label\":_vm.$gettext('Component - Peronsal data form - Company'),\"name\":_vm.$gettext('Component - Peronsal data form - Company'),\"property\":\"company\",\"modelState\":_vm.personalDataState.company}}),_c('p',{directives:[{name:\"translate\",rawName:\"v-translate\"}],staticClass:\"u-hide\"},[_vm._v(\" Component - Peronsal data form - Company \")])],1)])],1)]),_c('hr'),_c('div',{staticClass:\"a-button__flow-container\"},[_c('div',{staticClass:\"a-button a-button--primary u-full-width u-margin-bottom-3x\",class:{\n 'a-button--disabled': _vm.personalData.leasingCompanyId === 0,\n },on:{\"click\":function($event){return _vm.setCompanyInformation()}}},[_c('span',{directives:[{name:\"translate\",rawName:\"v-translate\"}]},[_vm._v(\"General - Next\")]),_c('div',{staticClass:\"a-spinner\"})])])],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import Vue from 'vue';\r\n\r\nimport {\r\n Title,\r\n CustomInput,\r\n} from '@/components';\r\n\r\nimport {\r\n mapActions,\r\n mapGetters,\r\n mapMutations,\r\n} from 'vuex';\r\n\r\nimport {\r\n extend,\r\n ValidationObserver,\r\n ValidationProvider,\r\n} from 'vee-validate';\r\n\r\nimport validationFlow from '@/validation-flow';\r\n\r\nexport default {\r\n name: 'Step4LeasingCompany',\r\n components: {\r\n [Title.name]: Title,\r\n ValidationObserver,\r\n ValidationProvider,\r\n [CustomInput.name]: CustomInput,\r\n },\r\n props: {},\r\n data: () => ({\r\n\r\n }),\r\n computed: {\r\n ...mapGetters('appointment', {\r\n personalData: 'getPersonalData',\r\n personalDataState: 'getPersonalData',\r\n }),\r\n ...mapGetters('leasingCompany', {\r\n leasingCompanies: 'getLeasingCompanies',\r\n }),\r\n leasingCompanyId: {\r\n get() {\r\n return this.personalDataState.leasingCompanyId;\r\n },\r\n set(newModel) {\r\n if (newModel != null) {\r\n const changePersonalDataStateObject = {\r\n state: newModel,\r\n property: 'leasingCompanyId',\r\n };\r\n\r\n this.setPersonalDataMutation(changePersonalDataStateObject);\r\n }\r\n\r\n return newModel;\r\n },\r\n },\r\n },\r\n methods: {\r\n ...mapActions('leasingCompany', {\r\n getLeasingCompanies: 'FETCH_DATA_LEASING_COMPANIES',\r\n }),\r\n setValidationMessages() {\r\n // Vee-validate\r\n // Translations are added in the PersonalDataFormComponent\r\n extend('objectNotEmpty', {\r\n validate: (value) => {\r\n if (value !== 0) {\r\n return true;\r\n }\r\n\r\n return Vue.prototype.$gettext('Validation - Leasing company');\r\n },\r\n });\r\n },\r\n goToPreviousStep() {\r\n this.$router.push({\r\n name: 'step5TireInfo',\r\n });\r\n },\r\n setCompanyInformation() {\r\n const changePersonalDataStateObject = {\r\n state: this.personalDataState.company,\r\n property: 'company',\r\n };\r\n\r\n this.setPersonalDataMutation(changePersonalDataStateObject);\r\n\r\n if (this.leasingCompanyId !== 0) {\r\n validationFlow.validateStep4LeasingCompanyInfo();\r\n }\r\n },\r\n ...mapMutations('appointment', {\r\n setPersonalDataMutation: 'SET_PERSONALDATA',\r\n }),\r\n },\r\n created() {\r\n this.setValidationMessages();\r\n\r\n if (this.leasingCompanies.length === 0) {\r\n this.getLeasingCompanies();\r\n }\r\n },\r\n};\r\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/eslint-loader/index.js??ref--13-0!./Step4LeasingCompany.controller.js?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/eslint-loader/index.js??ref--13-0!./Step4LeasingCompany.controller.js?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Step4LeasingCompany.vue?vue&type=template&id=27e0d785&\"\nimport script from \"./Step4LeasingCompany.controller.js?vue&type=script&lang=js&\"\nexport * from \"./Step4LeasingCompany.controller.js?vue&type=script&lang=js&\"\nimport style0 from \"./Step4LeasingCompany.styles.scss?vue&type=style&index=0&lang=scss&\"\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":""}