{"version":3,"sources":["webpack:///./src/components/customer/ClientInfo.vue?3998","webpack:///./src/components/customer/ClientInfo.vue","webpack:///./src/components/customer/ClientInfo.vue?455e","webpack:///./src/components/customer/ClientInfo.vue?561f","webpack:///./src/components/customer/ClientInfo.vue?b232"],"names":["staticClass","_c","attrs","_v","scopedSlots","fn","loading","keyup","$event","nameFieldEnter","model","value","_vm","newName","expression","provider","dirty","slot","descFieldEnter","newDescription","key","on","snackBar","callback","$$v","staticRenderFns","ApiError","then","m","default","SelectPrimaryContact","isValidName","name","isValidDescription","description","extend","validate","message","required","Vue","components","ValidationProvider","ValidationObserver","props","clientPersons","type","Boolean","this","hasFetchedInfo","refreshClientInfo","loaded","setFieldsEditableFields","setOrgFieldsEditableFields","data","loadError","error","snackBarText","timeLeft","nameLoading","descLoading","orgName","orgDescription","bgField","watch","getSelectedClientInfo","deep","handler","console","log","computed","getSelectedClient","$store","state","context","selectedClient","selectedClientInfo","methods","hasDefault","$vStore","dispatch","hitCustomerClient","customerClients","find","client","id","hitAssociatedClient","associatedClients","e","warn","Error","errors","$refs","customerObserver1","length","newCompanyInfo","businessRegistryId","save","customerObserver2","Promise","resolve","uploadTimer","setInterval","clearInterval","disabled","companyInfo","requestAnimationFrame","reset","countDownTimer","JSON","stringify","retry","component"],"mappings":"yIAAA,W,6FCAiMA,aAAkB,IAAGC,EAAG,KAA2BD,UAAY,GAAsB,oB,OAAC,eAAU,0DAAG,oBAAG,CAACC,EAAG,WAAY,cAACC,YAAM,gB,MAAC,CAAiB,cAA0CF,eAAY,CAAW,MAAMG,CAAsBH,MAAW,cAA8C,OAAC,2BAAoB,YAAK,YAAuBE,GAAK,GAAC,kB,YAAQ,e,CAAU,wBAAQ,CAAe,IAAC,qBAACE,yBAAoB,C,MAAK,CAAUC,KAAG,U,MAA0B,iB,YAAkD,O,0BAAkB,G,MAAG,UAAcC,C,YAA2B,Y,MAA+B,CAAsB,QAAoC,QAAc,QAAU,EAAI,SAACA,cAAQ,6BAAG,UAAC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a,aAAAsF,E","file":"js/chunk-55c37e31.f81710d0.js","sourcesContent":["export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ClientInfo.vue?vue&type=style&index=0&id=50fe96b7&prod&lang=scss\"","var render = function render(){var _vm=this,_c=_vm._self._c,_setup=_vm._self._setupProxy;return (_vm.hasDefault())?_c('Card',[(_vm.getSelectedClientInfo && !_vm.loadError)?_c('v-simple-table',{staticClass:\"mt-3\"},[_c('thead',[_c('tr',[_c('th',{staticClass:\"primary--text\",attrs:{\"colspan\":\"2\"}},[_c('SubHeader',{attrs:{\"title\":\"DETAILS\"}})],1)])]),_c('tbody',[_c('tr',[_c('td',{staticClass:\"fixedCol\"},[_vm._v(\"Name\")]),_c('td',{staticClass:\"noPaddingtd\"},[_c('validation-observer',{ref:\"customerObserver1\"},[_c('validation-provider',{attrs:{\"name\":\"newName\",\"rules\":\"name|required\"},scopedSlots:_vm._u([{key:\"default\",fn:function(provider){return [_c('v-text-field',{staticClass:\"textField\",attrs:{\"solo\":\"\",\"flat\":\"\",\"loading\":_vm.loading && _vm.nameLoading,\"background-color\":_vm.bgField,\"v-model\":_vm.newName,\"error-messages\":provider.errors[0],\"required\":\"\",\"disabled\":_vm.loading},on:{\"keyup\":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,\"enter\",13,$event.key,\"Enter\"))return null;return _vm.nameFieldEnter()}},model:{value:(_vm.newName),callback:function ($$v) {_vm.newName=$$v},expression:\"newName\"}},[(provider.dirty && provider.changed)?_c('v-btn',{attrs:{\"slot\":\"append\",\"color\":\"rgba(115, 191, 69, 0.2)\",\"small\":\"\",\"elevation\":\"0\"},on:{\"click\":function($event){return _vm.nameFieldEnter()}},slot:\"append\"},[_vm._v(\" Save \")]):_vm._e()],1)]}}],null,false,1578273912)})],1)],1)]),_c('tr',[_c('td',[_vm._v(\"Description\")]),_c('td',{staticClass:\"noPaddingtd\"},[_c('validation-observer',{ref:\"customerObserver2\"},[_c('validation-provider',{attrs:{\"name\":\"newDescription\",\"rules\":\"description\"},scopedSlots:_vm._u([{key:\"default\",fn:function(provider){return [_c('v-text-field',{staticClass:\"textField\",attrs:{\"solo\":\"\",\"flat\":\"\",\"loading\":_vm.loading && _vm.descLoading,\"background-color\":_vm.bgField,\"v-model\":_vm.newDescription,\"error-messages\":provider.errors[0],\"required\":\"\",\"disabled\":_vm.loading},on:{\"keyup\":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,\"enter\",13,$event.key,\"Enter\"))return null;return _vm.descFieldEnter()}},model:{value:(_vm.newDescription),callback:function ($$v) {_vm.newDescription=$$v},expression:\"newDescription\"}},[(provider.dirty && provider.changed)?_c('v-btn',{attrs:{\"slot\":\"append\",\"color\":\"rgba(115, 191, 69, 0.2)\",\"small\":\"\",\"elevation\":\"0\"},on:{\"click\":function($event){return _vm.descFieldEnter()}},slot:\"append\"},[_vm._v(\" Save \")]):_vm._e()],1)]}}],null,false,3546904718)})],1)],1)]),_c('tr',[_c('td',[_vm._v(\"Primary Contact Person\")]),_c('td',[_c('SelectPrimaryContact',{attrs:{\"clientPersons\":true}})],1)])])]):(_vm.loadError)?_c('api-error',{attrs:{\"error\":_vm.error},on:{\"retry\":function($event){return _vm.retry()}}}):_vm._e(),_c('v-snackbar',{staticClass:\"px-10\",attrs:{\"timeout\":\"2000\",\"vertical\":true,\"color\":\"white\",\"max-height\":\"none\",\"max-width\":\"none\"},scopedSlots:_vm._u([{key:\"action\",fn:function({ attrs }){return [_c('v-btn',_vm._b({attrs:{\"plain\":\"\",\"loading\":_vm.loading,\"color\":\"info darken-1 black--text\"},on:{\"click\":function($event){_vm.snackBar = false}}},'v-btn',attrs,false),[_vm._v(\" Close \")])]}}],null,false,3684289820),model:{value:(_vm.snackBar),callback:function ($$v) {_vm.snackBar=$$v},expression:\"snackBar\"}},[_c('p',{staticClass:\"black--text\",domProps:{\"innerHTML\":_vm._s(_vm.snackBarText)}})])],1):_vm._e()\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\nimport { Client, ClientInfoResponse, Domain } from \"@/types/responses\"\nconst ApiError = () => import(\"@/common/ApiError.vue\").then(m => m.default || m)\nconst SelectPrimaryContact = () => import(\"@/components/customer/SelectPrimaryContact.vue\").then(m => m.default || m)\nimport Vue from \"vue\"\n\n// NB! For jest purposes. No actual impact on import.\n/* eslint-disable */\n// @ts-ignore\nimport { required } from \"vee-validate/dist/rules.umd.js\"\n/* eslint-enable */\n\nimport { extend, ValidationObserver, ValidationProvider, setInteractionMode } from \"vee-validate\"\nimport { CompanyInfo } from \"@/types/responses\"\n\n\nconst isValidName = (name: string) => {\n\t/*const regExp = /^[A-Za-zÀ-ÖØ-öø-ÿ0-9 ,.!?:;/'(){}&---+*÷=%]*$/g;\n\tif(!regExp.test(name)) {\n\t\treturn false\n\t}\n\t*/\n\treturn true;\n}\n\nconst isValidDescription = (description: string) => {\n\t/*const regExp = /^[A-Za-zÀ-ÖØ-öø-ÿ0-9 !@#$%^&*()_+=/\\---{}'\".,<>:;~`åæø]*$/g;\n\tif(!regExp.test(description)) {\n\t\treturn false\n\t}\n\t*/\n\treturn true;\n}\n\nextend(\"name\", {\n\tvalidate: (value) => isValidName(value),\n\tmessage: \"The name contains invalid characters\",\n})\n\nextend(\"description\", {\n\tvalidate: (value) => isValidDescription(value),\n\tmessage: \"The description contains invalid characters\",\n})\n\nextend(\"required\", {\n\t...required,\n\tmessage: \"This field cannot be empty\",\n})\n\nexport default Vue.extend({\n\tname: \"ClientInfo\",\n\tcomponents: {\n\t\tApiError,\n\t\tSelectPrimaryContact,\n\t\tValidationProvider,\n\t\tValidationObserver,\n\t},\n\tprops: {\n\t\tclientPersons: {\n\t\t\ttype: Boolean,\n\t\t\trequired: true\n\t\t}\n\t},\n async mounted() {\n\t\tif(!this.hasFetchedInfo()){\n\t\t\tawait this.refreshClientInfo();\n\t\t}\n\n\t\tthis.loaded = true;\n\n\t\tif(this.hasFetchedInfo()){\n\t\t\tthis.setFieldsEditableFields();\n\t\t\tthis.setOrgFieldsEditableFields();\n\t\t}\n\t},\n data(): {\n\t\tloadError: boolean\n\t\terror: string | null | undefined\n\n snackBar: boolean\n\t\tsnackBarText: string\n\t\ttimeLeft: number\n\n loaded: boolean\n\t\tloading: boolean\n\t\tnameLoading: boolean\n\t\tdescLoading: boolean\n\t\torgName: string | null | undefined\n\t\torgDescription: string | null | undefined\n\t\tnewName: string | null | undefined\n\t\tnewDescription: string | null | undefined\n\n\t\tbgField: string\n } {\n return {\n\t\t\tloadError: false,\n\t\t\terror: null,\n\n snackBar: false,\n\t\t\tsnackBarText: \"\",\n\t\t\ttimeLeft: 2,\n\n loaded: false,\n\t\t\tloading: false,\n\t\t\tnameLoading: false,\n\t\t\tdescLoading: false,\n\t\t\torgName: \"\",\n\t\t\torgDescription: \"\",\n\t\t\tnewName: \"\",\n\t\t\tnewDescription: \"\",\n\n\t\t\tbgField: \"rgba(241, 241, 241, 0.65)\"\n }\n },\n\twatch: {\n getSelectedClientInfo: {\n deep: true,\n handler(){\n console.log(\"updated client info\")\n }\n }\n\t},\n\tcomputed: {\n\t\tgetSelectedClient(): Client | null {\n\t\t\tif(this.loaded) return this.$store.state.context.selectedClient;\n return {} as Client;\n\t\t},\n getSelectedClientInfo(): ClientInfoResponse | null {\n if(this.loaded) return this.$store.state.context.selectedClientInfo;\n return {} as ClientInfoResponse;\n\t\t},\n\t},\n\tmethods: {\n hasDefault(): boolean{\n if(this.$store.state.context.selectedClient == null){\n return false // Dont load unnessecarily if user has not chosen a client\n }\n return true\n },\n async refreshClientInfo(): Promise {\n\t\t\ttry{\n\t\t\t\tawait this.$vStore.dispatch(\"context/getClientInfo\")\n \tconst hitCustomerClient = await this.$vStore.state.context.customerClients.find(client => client.id === this.$vStore.state.context.selectedClient!.id)\n const hitAssociatedClient = await this.$vStore.state.context.associatedClients.find(client => client.id === this.$vStore.state.context.selectedClient!.id)\n \tif(hitCustomerClient) await this.$vStore.dispatch(\"context/setClient\", hitCustomerClient)\n else if(hitAssociatedClient) await this.$vStore.dispatch(\"context/setClient\", hitAssociatedClient)\n\t\t\t} catch(e) {\n\t\t\t\tconsole.warn(\"clientInfo: \" + e)\n\t\t\t\tthis.loadError = true;\n\t\t\t\tif(e && e instanceof Error) this.error = e.message;\n\t\t\t\telse this.error = \"Error: Unknown error\"\n\t\t\t}\n\t\t\t\n\t\t},\n\t\thasFetchedInfo(): boolean {\n\t\t\tif(this.$store.state.context!.selectedClientInfo){\n if(\n this.$store.state.context!.selectedClient!.id == \n this.$store.state.context!.selectedClientInfo!.id\n ) return true\n return false;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t},\n async nameFieldEnter(): Promise {\n\t\t\tif(this.newName == this.orgName) return\n\t\t\tconst errors = await (this.$refs as any).customerObserver1.errors!.newName.length;\n\t\t\tif(errors > 0) return\n\n\t\t\tconst newCompanyInfo: CompanyInfo = {\n\t\t\t\tname: this.newName,\n\t\t\t\tdescription: null,\n\t\t\t\tbusinessRegistryId: null\n\t\t\t}\n\t\t\tthis.save(newCompanyInfo)\t\t\t\n\t\t},\n\t\tasync descFieldEnter(): Promise {\n\t\t\tif(this.newDescription == this.orgDescription) return\n\t\t\tconst errors = await (this.$refs as any).customerObserver2.errors!.newDescription.length;\n\t\t\tif(errors > 0) return\n\t\t\t\n\t\t\tconst newCompanyInfo: CompanyInfo = {\n\t\t\t\tname: null,\n\t\t\t\tdescription: this.newDescription,\n\t\t\t\tbusinessRegistryId: null\n\t\t\t}\n\t\t\tthis.save(newCompanyInfo)\t\t\n\t\t},\n\t\tasync countDownTimer(): Promise {\n\t\t\tthis.timeLeft = 2\n\t\t\tthis.snackBarText = `Successfully updated company info.

Finalizing in ${this.timeLeft} seconds.. `\n\t\t\treturn new Promise((resolve) => {\n\t\t\t\tconst uploadTimer = setInterval(() => {\n\t\t\t\t\tthis.timeLeft--\n\t\t\t\t\tthis.snackBarText = `Successfully updated company info.

Finalizing in ${this.timeLeft} seconds.. `\n\t\t\t\t\tif (this.timeLeft <= 0) {\n\t\t\t\t\t\tclearInterval(uploadTimer)\n\t\t\t\t\t\tresolve()\n\t\t\t\t\t}\n\t\t\t\t}, 1000)\n\t\t\t})\n\t\t},\n\t\tsetOrgFieldsEditableFields(): void {\n\t\t\t// eslint-disable-next-line\n\t\t\tthis.orgName = this.getSelectedClientInfo!.name\n\t\t\t// eslint-disable-next-line\n\t\t\tthis.orgDescription = this.getSelectedClientInfo!.description\n\t\t},\n\t\tsetFieldsEditableFields(): void {\n\t\t\t// eslint-disable-next-line\n\t\t\tthis.newName = this.getSelectedClientInfo!.name\n\t\t\t// eslint-disable-next-line\n\t\t\tthis.newDescription = this.getSelectedClientInfo!.description\n\t\t},\n\t\tdisabled(): boolean {\n\t\t\treturn false\n\t\t},\n\t\tasync save(companyInfo: CompanyInfo): Promise {\n\t\t\tif (this.loading) return\n\t\t\tthis.loading = true\n\t\t\ttry {\n\t\t\t\tif(companyInfo.name){ \n\t\t\t\t\tthis.nameLoading = true;\n\t\t\t\t\tawait this.$vStore.dispatch(\"context/setClientName\", companyInfo)\n\t\t\t\t\trequestAnimationFrame(() => {\n\t\t\t\t\t\t// eslint-disable-next-line\n\t\t\t\t\t\tif (this.$refs.customerObserver1) { ;(this.$refs as any).customerObserver1.reset() }\n\t\t\t\t\t})\n\t\t\t\t\tthis.orgName = this.newName;\n\t\t\t\t\t\n\t\t\t\t} else if (companyInfo.description) {\n\t\t\t\t\t// eslint-disable-next-line\n\t\t\t\t\tthis.descLoading = true;\n\t\t\t\t\tawait this.$vStore.dispatch(\"context/setClientDescription\", companyInfo)\n\t\t\t\t\trequestAnimationFrame(() => {\n\t\t\t\t\t\t// eslint-disable-next-line\n\t\t\t\t\t\tif (this.$refs.customerObserver2) { ;(this.$refs as any).customerObserver2.reset() }\n\t\t\t\t\t})\n\t\t\t\t\tthis.orgDescription = this.newDescription;\n\t\t\t\t}\n\n\t\t\t\t// Lock loading for snackbar reload page\n\t\t\t\tthis.snackBarText = `Successfully updated client info.

Finalizing in ${this.timeLeft} seconds.. `\n\t\t\t\tthis.snackBar = true\n\t\t\t\tawait this.countDownTimer()\n \n\t\t\t\tawait this.refreshClientInfo()\n\n\t\t\t\t// Stop all loading\n\t\t\t\tthis.nameLoading = false;\n\t\t\t\tthis.descLoading = false;\n\t\t\t\tthis.loading = false;\n\t\t\t} catch (e) {\n\t\t\t\tthis.snackBarText = \"Could not update client info.

Error: \" + JSON.stringify(e)\n\t\t\t\tthis.snackBar = true\n\t\t\t\t\n\t\t\t\t// Stop all loading\n\t\t\t\tthis.nameLoading = false;\n\t\t\t\tthis.descLoading = false;\n\t\t\t\tthis.loading = false\n\t\t\t}\n\t\t},\n\n\t\tretry(): void{\n\t\t\t//this.mounted()\n\t\t}\n\t},\n})\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--14-3!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ClientInfo.vue?vue&type=script&lang=ts\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--14-3!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ClientInfo.vue?vue&type=script&lang=ts\"","import { render, staticRenderFns } from \"./ClientInfo.vue?vue&type=template&id=50fe96b7\"\nimport script from \"./ClientInfo.vue?vue&type=script&lang=ts\"\nexport * from \"./ClientInfo.vue?vue&type=script&lang=ts\"\nimport style0 from \"./ClientInfo.vue?vue&type=style&index=0&id=50fe96b7&prod&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":""}