{"version":3,"sources":["webpack:///./src/components/ClientOrganization.vue","webpack:///./src/components/ClientOrganization.vue?b8f7","webpack:///./src/components/ClientOrganization.vue?218a","webpack:///./src/components/ClientOrganization.vue?353b"],"names":["attrs","_vm","getSelectedClientName","_c","model","callback","$$v","tab","tabContent","key","item","on","setTabsNavHeight","staticStyle","value","expression","component","tag","closeDialog","staticRenderFns","ClientInfo","then","m","default","PersonsList","Vue","extend","name","data","componentKey","currentModulePath","CustomerEnum","CustomerPersons","parentModulePath","this","$router","currentRoute","path","split","parentName","clientTabs","minHeight","$refs","components","watch","$route","to","from","getSelectedClient","deep","handler","console","log","updateComponentKey","computed","$store","state","context","selectedClient","tabs","id","title","subtitle","methods","isLastMember","$emit","$children","forEach","$el","clientHeight","undefined"],"mappings":"yLAA+H,EAAK,W,IAA+BA,EAAM,K,EAAC,EAAMC,MAAIC,GAAsB,QAAa,Y,OAAI,SAAG,IAAI,EAAG,cAAeF,GAAK,aAAC,iB,MAAC,CAAoB,4BAAIG,YAAY,MAAS,kBAAsBF,CAAyB,MAAE,CAACD,eAAM,KAAiB,SAAU,CAAG,OAAIG,aAAY,iC,MAAQ,CAAiC,UAAS,IAAC,cAAmCC,GAAK,OAAC,C,MAAM,CAAWC,mBAAmBC,c,KAAUC,GAAO,eAAC,oBAAiB,OAAGN,MAAQA,EAAIO,IAA2B,SAAU,SAAQ,GAACC,EAAIC,IAAO,GAA2BC,WAAG,Q,KAA0B,cAAWC,SAAiB,G,OAAC,UAAC,SAAE,YAAS,cAACC,IAAa,eAAc,GAAI,+B,CAAsD,OAAuB,aAAIZ,cAAWA,OAAsD,GAAC,QAAY,mBAACG,YAAM,CAACU,iBAAe,S,CAA0Bb,EAAIM,GAAG,IAAI,4BAAC,U,IAACQ,aAAgB,OAAGd,MAAQA,EAAIO,IAA2B,SAAU,SAAY,GAAEC,EAAIC,IAAO,GAAoBV,WAAM,Q,EAAsB,iBAAoB,SAAC,G,OAAO,UAAE,IAAKU,EAAKM,GAAWC,YA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mBACU,OAAsB,MAAnBsB,KAAKM,WACG,GAIPN,KAAKM,WAAW0B,UAAUC,QAAS5D,KAE3BA,EAAI6D,IAAIC,cAAgBnC,KAAKO,gBACX6B,GAAlBpC,KAAKO,WACa,QAAlBP,KAAKO,aAELP,KAAKO,UAAYlC,EAAI6D,IAAIC,gBAG1BnC,KAAKO,eC7GgX,I,YCOxYzB,EAAY,eACd,EACA,EACAG,GACA,EACA,KACA,KACA,MAIa,aAAAH,E","file":"js/chunk-2d0e585d.5d7b7441.js","sourcesContent":["var render = function render(){var _vm=this,_c=_vm._self._c,_setup=_vm._self._setupProxy;return _c('div',{key:_vm.componentKey},[_c('keep-alive',[_c('PageHeader',{attrs:{\"msg\":_vm.getSelectedClientName,\"noSelector\":true}})],1),_c('ClientInfo',{attrs:{\"clientPersons\":true}}),_c('v-card',{style:({'min-height': `calc(${_vm.minHeight}px + 50px)`}),attrs:{\"elevation\":\"0\",\"outlined\":\"\"}},[_c('v-tabs',{attrs:{\"background-color\":\"transparent\",\"grow\":\"\",\"active-class\":\"white dark--text\"},model:{value:(_vm.tab),callback:function ($$v) {_vm.tab=$$v},expression:\"tab\"}},_vm._l((_vm.tabContent),function(item){return _c('v-tab',{key:item.id,staticClass:\"flex-column\",on:{\"click\":function($event){return _vm.setTabsNavHeight()}}},[_c('b',{staticStyle:{\"padding-top\":\"2%\"}},[_vm._v(_vm._s(item.title))]),_c('p',{staticStyle:{\"text-transform\":\"none\"}},[_vm._v(\" \"+_vm._s(item.subtitle))])])}),1),_c('v-tabs-items',{ref:\"clientTabs\",model:{value:(_vm.tab),callback:function ($$v) {_vm.tab=$$v},expression:\"tab\"}},_vm._l((_vm.tabContent),function(item){return _c('v-tab-item',{key:item.id,staticClass:\"px-5\",attrs:{\"transition\":\"false\",\"reverse-transition\":\"false\"}},[_c(item.component,{tag:\"component\",attrs:{\"clientPersons\":true},on:{\"closeDialog\":_vm.closeDialog}})],1)}),1)],1)],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\nimport Vue from \"vue\"\nimport { aclWrapper } from \"@/utilities/aclWrapper\"\nimport { Client } from \"@/types/responses\"\n\nconst ClientInfo = () => import(\"@/components/customer/ClientInfo.vue\").then(m => m.default || m)\nconst PersonsList = () => import(\"@/components/customer/PersonsList.vue\").then(m => m.default || m)\n\nimport { CustomerEnum } from \"@/types/enums\"\nimport { Route } from \"vue-router\"\n\nexport default Vue.extend({\n\tname: \"ClientOrganization\",\n\tdata(): {\n componentKey: number\n\t\tcurrentModulePath: CustomerEnum.CustomerPersons\n\t\tparentModulePath: string\n\t\tparentName: string\n\t\t// eslint-disable-next-line\n tab: null | Record\n\t\t// eslint-disable-next-line\n clientTabs: null | Record\n minHeight: number | string\n\t} {\n\t\treturn {\n componentKey: 0,\n\t\t\tcurrentModulePath: CustomerEnum.CustomerPersons,\n\t\t\tparentModulePath: this.$router.currentRoute.path.split(\"/\")[1],\n\t\t\tparentName: this.$router.currentRoute.name ? this.$router.currentRoute.name : \"\",\n tab: null,\n\t\t\tclientTabs: null,\n minHeight: \"100%\"\n\t\t}\n\t},\n async mounted(){\n\t\tthis.clientTabs = (this.$refs as any).clientTabs;\n\t\tthis.setTabsNavHeight()\n },\n\tcomponents: {\n\t\tClientInfo\n\t},\n\twatch: {\n\t\t$route(to: Route, from: Route) {\n\t\t\tthis.parentModulePath = to.path.split(\"/\")[1]\n\t\t\tthis.parentName = to.name ? to.name : \"\"\n\t\t},\n\t\tgetSelectedClient: {\n deep: true,\n handler(){\n console.log(\"selected client has been updated\")\n this.updateComponentKey()\n }\n }\n\t},\n computed: {\n getSelectedClient(): Client | null {\n return this.$store.state.context.selectedClient\n },\n\t\tgetSelectedClientName(): string {\n\t\t\tif (this.$store.state.context.selectedClient) {\n\t\t\t\treturn this.$store.state.context.selectedClient.name\n\t\t\t} else {\n\t\t\t\treturn \"\"\n\t\t\t}\n\t\t},\n tabContent(): Array{\n const tabs = [\n {\n id: 1,\n title: \"CONTACTS\",\n subtitle:\"External contacts and employees with limited access\",\n component: PersonsList\n }\n ]\n\n return tabs;\n }\n\t},\n methods: {\n async updateComponentKey(): Promise {\n this.componentKey++;\n },\n closeDialog(isLastMember?: boolean): void{\n \n console.log(\"[ClientOrganization] Emitting closeDialog\")\n if(isLastMember){\n console.log(\"[ClientOrganization] Is Last member in ClientOrg.\")\n this.$emit('closeDialog', true)\n }else {\n \n this.$emit('closeDialog', null)\n }\n\n },\n\t\tsetTabsNavHeight(): number | string {\n if(this.clientTabs == null) {\n return 0\n }\n else {\n // eslint-disable-next-line\n this.clientTabs.$children.forEach((tab: any) => {\n if(\n tab.$el.clientHeight >= this.minHeight || \n this.minHeight == undefined || \n this.minHeight == \"100%\" \n ){\n this.minHeight = tab.$el.clientHeight;\n }\n });\n return this.minHeight\n }\n }\n }\n \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!./ClientOrganization.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!./ClientOrganization.vue?vue&type=script&lang=ts\"","import { render, staticRenderFns } from \"./ClientOrganization.vue?vue&type=template&id=037cf0e7\"\nimport script from \"./ClientOrganization.vue?vue&type=script&lang=ts\"\nexport * from \"./ClientOrganization.vue?vue&type=script&lang=ts\"\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":""}