{"version":3,"sources":["webpack:///./src/views/contacts/companies/ContactsCompanies.vue?92fe","webpack:///./src/views/contacts/companies/ContactsCompanies.vue","webpack:///./src/views/contacts/companies/ContactsCompanies.vue?9c3b","webpack:///./src/views/contacts/companies/ContactsCompanies.vue?36d1","webpack:///./src/views/contacts/companies/ContactsCompanies.vue?0165","webpack:///./src/components/CompanyContacts.vue?0b01","webpack:///./src/components/CompanyContacts.vue","webpack:///./src/components/CompanyContacts.vue?53af","webpack:///./src/components/CompanyContacts.vue?e2cf","webpack:///./src/components/CompanyContacts.vue?1a3d","webpack:///../../../src/components/VGrid/grid.ts","webpack:///../../../src/components/VGrid/VContainer.ts"],"names":["render","_vm","this","_h","$createElement","_c","_self","attrs","_v","_s","$t","scopedSlots","_u","key","fn","ref","on","_g","model","value","callback","$$v","createCompanyDialog","expression","name","address","$event","creating","create","staticClass","openCreatePersonDialog","closePersonFormDialog","createPersonDialog","onSaved","headers","companiesLoading","companies","item","openCompanyContactsDialog","openUpdateCompanyDialog","openDeleteCompanyDialog","deleteCompanyDialog","deleteCompany","updateCompanyDialog","updatedCompanyName","updatedCompanyAddress","updating","updateCompany","_e","closeCompanyContactsDialog","companyContactsDialog","CompanyId","staticRenderFns","namespace","ContactsCompanies","Vue","constructor","contentKey","search","text","align","filterable","selectedCompany","created","getCompanies","ContactsApiService","createCompany","companyName","companyAddress","then","res","Toast","success","toString","catch","err","error","finally","id","filter","x","company","Component","components","ConfirmDialog","CompanyContacts","PersonForm","component","VBtn","VCard","VCardActions","VCardText","VCardTitle","VCol","VContainer","VDataTable","VDialog","VIcon","VRow","VSpacer","VTextField","VTextarea","peopleLoading","people","openUpdatePersonDialog","openDeletePersonDialog","cancel","editPersonDialog","selectedPerson","save","deletePersonDialog","deletePerson","saving","onCompanyIdChange","newCompanyId","oldCompanyId","getPeople","getCompanyContacts","companyId","person","__decorate","Prop","Watch","VGrid","extend","functional","props","String","tag","type","default","h","data","children","trim","classes","Object","keys","startsWith","length","join","domProps","Grid","f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AI0G,EAAQK,KAAK,MAQ3D,OALId,EAAMhD,KACRsD,EAAKS,SAAWT,EAAKS,UAAY,GACjCT,EAAKS,SAAS/D,GAAKgD,EAAMhD,IAGpBqD,EAAEL,EAAME,IAAKI,EAAMC,M,gBC1CjBS,SAAK,aAAalB,OAAO,CACtCpG,KAAM,cACNqG,YAAY,EACZC,MAAO,CACLhD,GAAIiD,OACJC,IAAK,CACHC,KAAMF,OACNG,QAAS,OAEXa,MAAO,CACLd,KAAMe,QACNd,SAAS,IAGblI,OAAQmI,GAAG,MAAEL,EAAF,KAASM,EAAT,SAAeC,IACxB,IAAIE,EACJ,MAAM,MAAEhI,GAAU6H,EA2BlB,OA1BI7H,IAEF6H,EAAK7H,MAAQ,GACbgI,EAAUC,OAAOC,KAAKlI,GAAOwE,OAAOlE,IAGlC,GAAY,SAARA,EAAgB,OAAO,EAE3B,MAAMM,EAAQZ,EAAMM,GAIpB,OAAIA,EAAI6H,WAAW,UACjBN,EAAK7H,MAAOM,GAAOM,GACZ,GAGFA,GAA0B,kBAAVA,KAIvB2G,EAAMhD,KACRsD,EAAKS,SAAWT,EAAKS,UAAY,GACjCT,EAAKS,SAAS/D,GAAKgD,EAAMhD,IAGpBqD,EACLL,EAAME,IACNiB,eAAUb,EAAM,CACdvG,YAAa,YACbqH,MAAOC,MAAW,CAChB,mBAAoBrB,EAAMiB,QACzBK,OAAOb,GAAW,MAEvBF","file":"js/contacts-companies.9b626581.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('v-container',{attrs:{\"fluid\":\"\"}},[_c('div',[_c('v-row',[_c('v-col',[_c('h1',[_vm._v(_vm._s(_vm.$t('Companies.companies')))])])],1),_c('v-row',[_c('v-col',[_c('v-dialog',{attrs:{\"width\":\"600\"},scopedSlots:_vm._u([{key:\"activator\",fn:function(ref){\nvar on = ref.on;\nreturn [_c('v-btn',_vm._g({attrs:{\"type\":\"button\",\"color\":\"primary\",\"depressed\":\"\",\"rounded\":\"\",\"large\":\"\"}},on),[_vm._v(_vm._s(_vm.$t('Companies.addCompany')))])]}}]),model:{value:(_vm.createCompanyDialog),callback:function ($$v) {_vm.createCompanyDialog=$$v},expression:\"createCompanyDialog\"}},[_c('v-card',[_c('v-card-title',{attrs:{\"primary-title\":\"\"}},[_c('h2',[_vm._v(_vm._s(_vm.$t('Companies.addCompany')))])]),_c('v-card-text',[_c('v-text-field',{attrs:{\"id\":\"name\",\"outlined\":\"\",\"rounded\":\"\",\"type\":\"text\",\"placeholder\":_vm.$t('Companies.enterCompanyAddress'),\"label\":_vm.$t('Companies.companyName')},model:{value:(_vm.name),callback:function ($$v) {_vm.name=$$v},expression:\"name\"}}),_c('v-textarea',{attrs:{\"id\":\"address\",\"outlined\":\"\",\"autocomplete\":\"new\",\"rounded\":\"\",\"placeholder\":_vm.$t('Companies.enterCompanyAddress'),\"label\":_vm.$t('Companies.companyAddress')},model:{value:(_vm.address),callback:function ($$v) {_vm.address=$$v},expression:\"address\"}})],1),_c('v-card-actions',[_c('v-btn',{attrs:{\"large\":\"\",\"rounded\":\"\",\"text\":\"\"},on:{\"click\":function($event){_vm.createCompanyDialog = false}}},[_vm._v(_vm._s(_vm.$t('Companies.cancel')))]),_c('v-spacer'),_c('v-btn',{attrs:{\"loading\":_vm.creating,\"large\":\"\",\"color\":\"primary\",\"rounded\":\"\",\"text\":\"\"},on:{\"click\":function($event){return _vm.create()}}},[_vm._v(_vm._s(_vm.$t('Companies.add')))])],1)],1)],1),_c('v-btn',{staticClass:\"ma-1\",attrs:{\"type\":\"button\",\"color\":\"primary\",\"depressed\":\"\",\"rounded\":\"\",\"large\":\"\"},on:{\"click\":function($event){return _vm.openCreatePersonDialog()}}},[_vm._v(_vm._s(_vm.$t('CompanyContacts.addCompanyContact'))+\" \")]),_c('v-dialog',{attrs:{\"width\":\"600\"},on:{\"click:outside\":function($event){return _vm.closePersonFormDialog()}},model:{value:(_vm.createPersonDialog),callback:function ($$v) {_vm.createPersonDialog=$$v},expression:\"createPersonDialog\"}},[_c('PersonForm',{attrs:{\"cancel\":_vm.closePersonFormDialog,\"onSaved\":_vm.onSaved}})],1)],1)],1)],1),_c('div',{staticClass:\"header-divider\"}),_c('v-row',[_c('v-col',[_c('v-data-table',{attrs:{\"headers\":_vm.headers,\"loading\":_vm.companiesLoading,\"items\":_vm.companies,\"no-data-text\":_vm.$t('Companies.noData')},scopedSlots:_vm._u([{key:\"item.actions\",fn:function(ref){\nvar item = ref.item;\nreturn [_c('v-btn',{attrs:{\"icon\":\"\",\"title\":_vm.$t('Companies.viewContacts')},on:{\"click\":function($event){return _vm.openCompanyContactsDialog(item)}}},[_c('v-icon',[_vm._v(\"ri-contacts-line\")])],1),_c('v-btn',{attrs:{\"icon\":\"\",\"title\":_vm.$t('Companies.updateCompany')},on:{\"click\":function($event){return _vm.openUpdateCompanyDialog(item)}}},[_c('v-icon',[_vm._v(\"ri-edit-box-line\")])],1),_c('v-btn',{attrs:{\"icon\":\"\",\"color\":\"error\",\"title\":_vm.$t('Companies.deleteCompany')},on:{\"click\":function($event){return _vm.openDeleteCompanyDialog(item)}}},[_c('v-icon',[_vm._v(\"ri-delete-bin-5-line\")])],1)]}}])})],1)],1),_c('v-dialog',{attrs:{\"width\":\"600\"},model:{value:(_vm.deleteCompanyDialog),callback:function ($$v) {_vm.deleteCompanyDialog=$$v},expression:\"deleteCompanyDialog\"}},[_c('ConfirmDialog',{attrs:{\"actionText\":_vm.$t('Companies.delete'),\"color\":'error',\"header\":_vm.$t('Companies.deleteCompany'),\"onActionComplete\":function () {\n\t\t\t\t\t/* */\n\t\t\t\t},\"cancelText\":_vm.$t('Companies.cancel'),\"action\":function () { return _vm.deleteCompany(); },\"message\":_vm.$t('Companies.areYouSure'),\"cancelAction\":function () { return (_vm.deleteCompanyDialog = false); }}})],1),(_vm.selectedCompany)?_c('v-dialog',{attrs:{\"width\":\"600\"},model:{value:(_vm.updateCompanyDialog),callback:function ($$v) {_vm.updateCompanyDialog=$$v},expression:\"updateCompanyDialog\"}},[_c('v-card',[_c('v-card-title',[_c('h2',[_vm._v(_vm._s(_vm.$t('Companies.updateCompany')))])]),_c('v-card-text',[_c('v-text-field',{attrs:{\"id\":\"updatedCompanyName\",\"type\":\"text\",\"outlined\":\"\",\"rounded\":\"\",\"placeholder\":_vm.$t('Companies.enterCompanyName'),\"label\":_vm.$t('Companies.companyName')},model:{value:(_vm.updatedCompanyName),callback:function ($$v) {_vm.updatedCompanyName=$$v},expression:\"updatedCompanyName\"}}),_c('v-textarea',{attrs:{\"id\":\"updatedCompanyAddress\",\"outlined\":\"\",\"autocomplete\":\"new\",\"rounded\":\"\",\"placeholder\":_vm.$t('Companies.enterCompanyAddress'),\"label\":_vm.$t('Companies.companyAddress')},model:{value:(_vm.updatedCompanyAddress),callback:function ($$v) {_vm.updatedCompanyAddress=$$v},expression:\"updatedCompanyAddress\"}})],1),_c('v-card-actions',[_c('v-btn',{staticClass:\"ma-2\",attrs:{\"text\":\"\"},on:{\"click\":function($event){_vm.updateCompanyDialog = false}}},[_vm._v(_vm._s(_vm.$t('Companies.cancel')))]),_c('v-spacer'),_c('v-btn',{staticClass:\"ma-2\",attrs:{\"color\":\"primary\",\"loading\":_vm.updating,\"rounded\":\"\",\"depressed\":\"\",\"text\":\"\"},on:{\"click\":function($event){return _vm.updateCompany()}}},[_vm._v(_vm._s(_vm.$t('Companies.save')))])],1)],1)],1):_vm._e(),_c('v-dialog',{attrs:{\"width\":\"1000\"},on:{\"click:outside\":function($event){return _vm.closeCompanyContactsDialog()}},model:{value:(_vm.companyContactsDialog),callback:function ($$v) {_vm.companyContactsDialog=$$v},expression:\"companyContactsDialog\"}},[_c('CompanyContacts',{attrs:{\"cancel\":_vm.closeCompanyContactsDialog,\"companyId\":_vm.CompanyId}})],1)],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\r\nimport { Component, Vue, Watch } from 'vue-property-decorator';\r\nimport { namespace } from 'vuex-class';\r\nimport { Route } from 'vue-router';\r\nimport ContactsApiService from '@/api/contacts.api';\r\nimport Toast from '@/services/toast.service';\r\nimport ConfirmDialog from '@/components/ConfirmDialog.vue';\r\nimport CompanyContacts from '@/components/CompanyContacts.vue'\r\nimport PersonForm from '@/components/PersonForm.vue'\r\nimport { Company } from '@/models/company';\r\nimport { VSpacer } from 'vuetify/lib';\r\n\r\nconst auth = namespace('auth');\r\n\r\n@Component({\r\n\tcomponents: { ConfirmDialog, CompanyContacts, PersonForm }\r\n})\r\nexport default class ContactsCompanies extends Vue {\r\n\tpublic contentKey = 0;\r\n\tpublic name = '';\r\n\tpublic address = '';\r\n\tpublic updatedCompanyName = '';\r\n\tpublic updatedCompanyAddress = '';\r\n\r\n\tpublic search = '';\r\n\tpublic headers = [\r\n\t\t{\r\n\t\t\ttext: this.$t('Companies.name'),\r\n\t\t\talign: 'start',\r\n\t\t\tfilterable: true,\r\n\t\t\tvalue: 'name'\r\n\t\t},\r\n\t\t{\r\n\t\t\ttext: this.$t('Companies.address'),\r\n\t\t\talign: 'start',\r\n\t\t\tfilterable: true,\r\n\t\t\tvalue: 'address'\r\n\t\t},\r\n\t\t{\r\n\t\t\ttext: '',\r\n\t\t\talign: 'end',\r\n\t\t\tvalue: 'actions'\r\n\t\t}\r\n\t];\r\n\tpublic CompanyId = '';\r\n\tpublic updateCompanyDialog = false;\r\n\tpublic deleteCompanyDialog = false;\r\n\tpublic createCompanyDialog = false;\r\n\tpublic creating = false;\r\n\tpublic updating = false;\r\n\tpublic companiesLoading = false;\r\n\tpublic companies: Company[] = [];\r\n\tpublic selectedCompany: Company | null = null;\r\n\tpublic companyContactsDialog = false;\r\n\tpublic createPersonDialog = false;\r\n\r\n\tcreated() {\r\n\t\tthis.getCompanies();\r\n\t}\r\n\r\n\tpublic create() {\r\n\t\tthis.creating = true;\r\n\t\tContactsApiService.createCompany({\r\n\t\t\tcompanyName: this.name,\r\n\t\t\tcompanyAddress: this.address\r\n\t\t})\r\n\t\t\t.then(res => {\r\n\t\t\t\tToast.success(this.$t('Companies.companyCreated').toString());\r\n\t\t\t\tthis.createCompanyDialog = false;\r\n\t\t\t\tthis.name = '';\r\n\t\t\t\tthis.address = '';\r\n\t\t\t\tthis.getCompanies();\r\n\t\t\t})\r\n\t\t\t.catch(err => {\r\n\t\t\t\tToast.error(err);\r\n\t\t\t})\r\n\t\t\t.finally(() => (this.creating = false));\r\n\t}\r\n\r\n\tpublic updateCompany() {\r\n\t\tif (!this.selectedCompany) return;\r\n\r\n\t\tthis.updating = true;\r\n\t\tContactsApiService.updateCompany(this.selectedCompany.id, {\r\n\t\t\tcompanyName: this.updatedCompanyName,\r\n\t\t\tcompanyAddress: this.updatedCompanyAddress\r\n\t\t})\r\n\t\t\t.then(res => {\r\n\t\t\t\tToast.success(this.$t('Companies.companySaved').toString());\r\n\t\t\t\tthis.updateCompanyDialog = false;\r\n\t\t\t\tthis.getCompanies();\r\n\t\t\t})\r\n\t\t\t.catch(err => {\r\n\t\t\t\tToast.error(err);\r\n\t\t\t})\r\n\t\t\t.finally(() => (this.updating = false));\r\n\t}\r\n\r\n\tpublic deleteCompany() {\r\n\t\treturn ContactsApiService.deleteCompany((this.selectedCompany as Company).id)\r\n\t\t\t.then(res => {\r\n\t\t\t\tToast.success(this.$t('Companies.companyDeleted').toString());\r\n\t\t\t\tthis.companies = this.companies.filter(\r\n\t\t\t\t\tx => x.id !== (this.selectedCompany as Company).id\r\n\t\t\t\t);\r\n\t\t\t\tthis.selectedCompany = null;\r\n\t\t\t})\r\n\t\t\t.catch(err => {\r\n\t\t\t\tToast.error(err);\r\n\t\t\t});\r\n\t}\r\n\r\n\tpublic getCompanies() {\r\n\t\tthis.companiesLoading = true;\r\n\t\tContactsApiService.getCompanies()\r\n\t\t\t.then(res => {\r\n\t\t\t\tthis.companies = res.companies;\r\n\t\t\t})\r\n\t\t\t.catch(err => {\r\n\t\t\t\tToast.error(err);\r\n\t\t\t})\r\n\t\t\t.finally(() => (this.companiesLoading = false));\r\n\t}\r\n\r\n\tpublic openDeleteCompanyDialog(company: Company) {\r\n\t\tthis.selectedCompany = company;\r\n\t\tthis.deleteCompanyDialog = true;\r\n\t}\r\n\r\n\tpublic openUpdateCompanyDialog(company: Company) {\r\n\t\tthis.selectedCompany = company;\r\n\t\tthis.updatedCompanyName = company.name;\r\n\t\tthis.updatedCompanyAddress = company.address;\r\n\t\tthis.updateCompanyDialog = true;\r\n\t}\r\n\tpublic openCompanyContactsDialog(item) {\r\n\t\tthis.CompanyId = item.id;\r\n\t\tthis.companyContactsDialog = true;\r\n\t}\r\n\tpublic closeCompanyContactsDialog() {\r\n\t\tthis.companyContactsDialog = false;\r\n\t}\r\n\tpublic openCreatePersonDialog() {\r\n\t\tthis.createPersonDialog = true;\r\n\t}\r\n\tpublic closePersonFormDialog() {\r\n\t\tthis.createPersonDialog = false;\r\n\t}\r\n\tpublic onSaved() {\r\n\t\tthis.CompanyId = '';\r\n\t\tthis.getCompanies();\r\n\t}\r\n\r\n}\r\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--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ContactsCompanies.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--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ContactsCompanies.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./ContactsCompanies.vue?vue&type=template&id=f64e68a8&scoped=true&\"\nimport script from \"./ContactsCompanies.vue?vue&type=script&lang=ts&\"\nexport * from \"./ContactsCompanies.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./ContactsCompanies.vue?vue&type=style&index=0&id=f64e68a8&lang=scss&scoped=true&\"\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  \"f64e68a8\",\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 { VCard } from 'vuetify/lib/components/VCard';\nimport { VCardActions } from 'vuetify/lib/components/VCard';\nimport { VCardText } from 'vuetify/lib/components/VCard';\nimport { VCardTitle } from 'vuetify/lib/components/VCard';\nimport { VCol } from 'vuetify/lib/components/VGrid';\nimport { VContainer } from 'vuetify/lib/components/VGrid';\nimport { VDataTable } from 'vuetify/lib/components/VDataTable';\nimport { VDialog } from 'vuetify/lib/components/VDialog';\nimport { VIcon } from 'vuetify/lib/components/VIcon';\nimport { VRow } from 'vuetify/lib/components/VGrid';\nimport { VSpacer } from 'vuetify/lib/components/VGrid';\nimport { VTextField } from 'vuetify/lib/components/VTextField';\nimport { VTextarea } from 'vuetify/lib/components/VTextarea';\ninstallComponents(component, {VBtn,VCard,VCardActions,VCardText,VCardTitle,VCol,VContainer,VDataTable,VDialog,VIcon,VRow,VSpacer,VTextField,VTextarea})\n","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!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ContactsCompanies.vue?vue&type=style&index=0&id=f64e68a8&lang=scss&scoped=true&\"; 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!../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ContactsCompanies.vue?vue&type=style&index=0&id=f64e68a8&lang=scss&scoped=true&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('v-card',[_c('v-card-title',[_c('h2',[_vm._v(_vm._s(_vm.$t('Contact.ComapnyContactForm.CompanyContacts')))])]),_c('v-card-text',[_c('v-col',{attrs:{\"md\":\"12\"}},[_c('v-row',[_c('v-col',[_c('v-data-table',{attrs:{\"headers\":_vm.headers,\"loading\":_vm.peopleLoading,\"items\":_vm.people,\"no-data-text\":_vm.$t('CompanyContacts.noDataText')},scopedSlots:_vm._u([{key:\"item.actions\",fn:function(ref){\nvar item = ref.item;\nreturn [_c('v-btn',{attrs:{\"icon\":\"\",\"title\":_vm.$t('Contact.ComapnyContactForm.updateContact')},on:{\"click\":function($event){return _vm.openUpdatePersonDialog(item)}}},[_c('v-icon',[_vm._v(\"ri-edit-box-line\")])],1),_c('v-btn',{attrs:{\"icon\":\"\",\"color\":\"error\",\"title\":_vm.$t('Contact.ComapnyContactForm.deleteContact')},on:{\"click\":function($event){return _vm.openDeletePersonDialog(item)}}},[_c('v-icon',[_vm._v(\"ri-delete-bin-5-line\")])],1)]}}])})],1)],1)],1)],1),_c('v-card-actions',[_c('v-spacer'),_c('v-btn',{attrs:{\"rounded\":\"\"},on:{\"click\":function($event){return _vm.cancel()}}},[_vm._v(_vm._s(_vm.$t('Contact.ComapnyContactForm.Close')))])],1)],1),(_vm.selectedPerson)?_c('v-dialog',{attrs:{\"width\":\"600\"},on:{\"click:outside\":function($event){return _vm.closePersonFormDialog()}},model:{value:(_vm.editPersonDialog),callback:function ($$v) {_vm.editPersonDialog=$$v},expression:\"editPersonDialog\"}},[_c('PersonForm',{attrs:{\"person\":_vm.selectedPerson,\"cancel\":_vm.closePersonFormDialog,\"onSaved\":_vm.save}})],1):_vm._e(),_c('v-dialog',{attrs:{\"width\":\"600\"},model:{value:(_vm.deletePersonDialog),callback:function ($$v) {_vm.deletePersonDialog=$$v},expression:\"deletePersonDialog\"}},[_c('ConfirmDialog',{attrs:{\"actionText\":_vm.$t('CompanyContacts.delete'),\"color\":'error',\"header\":_vm.$t('CompanyContacts.deletePerson'),\"onActionComplete\":function () {\n\t\t\t\t/* */\n\t\t\t},\"cancelText\":_vm.$t('CompanyContacts.cancel'),\"action\":function () { return _vm.deletePerson(); },\"message\":_vm.$t('CompanyContacts.confirmDeletePerson'),\"cancelAction\":function () { return (_vm.deletePersonDialog = false); }}})],1)],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\r\nimport { Component, Prop, Vue, Watch } from 'vue-property-decorator';\r\nimport { namespace } from 'vuex-class';\r\nimport Toast from '@/services/toast.service';\r\nimport ConfirmDialog from '@/components/ConfirmDialog.vue';\r\nimport ContactsApiService from '@/api/contacts.api';\r\nimport PersonForm from '@/components/PersonForm.vue'\r\nimport { PersonContact } from '@/models/personContact';\r\n\r\nconst auth = namespace('auth');\r\n\r\n@Component({\r\n\tcomponents: { ConfirmDialog, PersonForm }\r\n})\r\nexport default class CompanyContacts extends Vue {\r\n\r\n\t@Prop() public cancel!: any;\r\n\t@Prop() public companyId!: any;\r\n\t@Watch('companyId')\r\n\tonCompanyIdChange(newCompanyId: any, oldCompanyId: any) {\r\n\t\tthis.getPeople();\r\n\t}\r\n\r\n\tpublic created() {\r\n\t\tthis.getPeople();\r\n\t}\r\n\r\n\tpublic headers = [\r\n\t\t{\r\n\t\t\ttext: this.$t('CompanyContacts.headers.name'),\r\n\t\t\talign: 'start',\r\n\t\t\tfilterable: true,\r\n\t\t\tvalue: 'name'\r\n\t\t},\r\n\t\t{\r\n\t\t\ttext: this.$t('CompanyContacts.headers.company'),\r\n\t\t\talign: 'start',\r\n\t\t\tfilterable: true,\r\n\t\t\tvalue: 'companyName'\r\n\t\t},\r\n\t\t{\r\n\t\t\ttext: this.$t('CompanyContacts.headers.phone'),\r\n\t\t\talign: 'start',\r\n\t\t\tfilterable: true,\r\n\t\t\tvalue: 'phoneNumber'\r\n\t\t},\r\n\t\t{\r\n\t\t\ttext: this.$t('CompanyContacts.headers.email'),\r\n\t\t\talign: 'start',\r\n\t\t\tfilterable: true,\r\n\t\t\tvalue: 'email'\r\n\t\t},\r\n\t\t{\r\n\t\t\ttext: '',\r\n\t\t\talign: 'end',\r\n\t\t\tvalue: 'actions'\r\n\t\t}\r\n\t];\r\n\tpublic peopleLoading = false;\r\n\tpublic people: PersonContact[] = [];\r\n\tpublic selectedPerson: PersonContact | null = null;\r\n\tpublic saving = false;\r\n\tpublic editPersonDialog = false;\r\n\tpublic deletePersonDialog = false;\r\n\r\n\tpublic save() {\r\n\t\tthis.getPeople();\r\n\t}\r\n\tpublic getPeople() {\r\n\t\tthis.peopleLoading = true;\r\n\t\tContactsApiService.getCompanyContacts(this.companyId)\r\n\t\t\t.then(res => {\r\n\t\t\t\tthis.people = res.people;\r\n\t\t\t})\r\n\t\t\t.catch(err => {\r\n\t\t\t\t\r\n\t\t\t\tToast.error(err);\r\n\t\t\t})\r\n\t\t\t.finally(() => (this.peopleLoading = false));\r\n\t}\r\n\r\n\tpublic openUpdatePersonDialog(person: PersonContact) {\r\n\t\tthis.selectedPerson = { ...person };\r\n\t\tthis.editPersonDialog = true;\r\n\t}\r\n\tpublic closePersonFormDialog() {\r\n\t\tthis.editPersonDialog = false;\r\n\t\tthis.selectedPerson = null;\r\n\t}\r\n\tpublic deletePerson() {\r\n\t\treturn ContactsApiService.deletePerson(\r\n\t\t\t(this.selectedPerson as PersonContact).id\r\n\t\t)\r\n\t\t\t.then(res => {\r\n\t\t\t\tToast.success(this.$t('CompanyContacts.personDeleted').toString());\r\n\t\t\t\tthis.people = this.people.filter(\r\n\t\t\t\t\tx => x.id !== (this.selectedPerson as PersonContact).id\r\n\t\t\t\t);\r\n\t\t\t\tthis.selectedPerson = null;\r\n\t\t\t})\r\n\t\t\t.catch(err => {\r\n\t\t\t\tToast.error(err);\r\n\t\t\t});\r\n\t}\r\n\tpublic openDeletePersonDialog(person: PersonContact) {\r\n\t\tthis.selectedPerson = { ...person };\r\n\t\tthis.deletePersonDialog = true;\r\n\t}\r\n}\r\n\r\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--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CompanyContacts.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--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CompanyContacts.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./CompanyContacts.vue?vue&type=template&id=73de8e4c&scoped=true&\"\nimport script from \"./CompanyContacts.vue?vue&type=script&lang=ts&\"\nexport * from \"./CompanyContacts.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./CompanyContacts.vue?vue&type=style&index=0&id=73de8e4c&lang=scss&scoped=true&\"\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  \"73de8e4c\",\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 { VCard } from 'vuetify/lib/components/VCard';\nimport { VCardActions } from 'vuetify/lib/components/VCard';\nimport { VCardText } from 'vuetify/lib/components/VCard';\nimport { VCardTitle } from 'vuetify/lib/components/VCard';\nimport { VCol } from 'vuetify/lib/components/VGrid';\nimport { VDataTable } from 'vuetify/lib/components/VDataTable';\nimport { VDialog } from 'vuetify/lib/components/VDialog';\nimport { VIcon } from 'vuetify/lib/components/VIcon';\nimport { VRow } from 'vuetify/lib/components/VGrid';\nimport { VSpacer } from 'vuetify/lib/components/VGrid';\ninstallComponents(component, {VBtn,VCard,VCardActions,VCardText,VCardTitle,VCol,VDataTable,VDialog,VIcon,VRow,VSpacer})\n","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!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CompanyContacts.vue?vue&type=style&index=0&id=73de8e4c&lang=scss&scoped=true&\"; 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!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./CompanyContacts.vue?vue&type=style&index=0&id=73de8e4c&lang=scss&scoped=true&\"","// Types\nimport Vue, { VNode } from 'vue'\n\nexport default function VGrid (name: string) {\n  /* @vue/component */\n  return Vue.extend({\n    name: `v-${name}`,\n\n    functional: true,\n\n    props: {\n      id: String,\n      tag: {\n        type: String,\n        default: 'div',\n      },\n    },\n\n    render (h, { props, data, children }): VNode {\n      data.staticClass = (`${name} ${data.staticClass || ''}`).trim()\n\n      const { attrs } = data\n      if (attrs) {\n        // reset attrs to extract utility clases like pa-3\n        data.attrs = {}\n        const classes = Object.keys(attrs).filter(key => {\n          // TODO: Remove once resolved\n          // https://github.com/vuejs/vue/issues/7841\n          if (key === 'slot') return false\n\n          const value = attrs[key]\n\n          // add back data attributes like data-test=\"foo\" but do not\n          // add them as classes\n          if (key.startsWith('data-')) {\n            data.attrs![key] = value\n            return false\n          }\n\n          return value || typeof value === 'string'\n        })\n\n        if (classes.length) data.staticClass += ` ${classes.join(' ')}`\n      }\n\n      if (props.id) {\n        data.domProps = data.domProps || {}\n        data.domProps.id = props.id\n      }\n\n      return h(props.tag, data, children)\n    },\n  })\n}\n","import './_grid.sass'\nimport './VGrid.sass'\n\nimport Grid from './grid'\n\nimport mergeData from '../../util/mergeData'\n\n/* @vue/component */\nexport default Grid('container').extend({\n  name: 'v-container',\n  functional: true,\n  props: {\n    id: String,\n    tag: {\n      type: String,\n      default: 'div',\n    },\n    fluid: {\n      type: Boolean,\n      default: false,\n    },\n  },\n  render (h, { props, data, children }) {\n    let classes\n    const { attrs } = data\n    if (attrs) {\n      // reset attrs to extract utility clases like pa-3\n      data.attrs = {}\n      classes = Object.keys(attrs).filter(key => {\n        // TODO: Remove once resolved\n        // https://github.com/vuejs/vue/issues/7841\n        if (key === 'slot') return false\n\n        const value = attrs[key]\n\n        // add back data attributes like data-test=\"foo\" but do not\n        // add them as classes\n        if (key.startsWith('data-')) {\n          data.attrs![key] = value\n          return false\n        }\n\n        return value || typeof value === 'string'\n      })\n    }\n\n    if (props.id) {\n      data.domProps = data.domProps || {}\n      data.domProps.id = props.id\n    }\n\n    return h(\n      props.tag,\n      mergeData(data, {\n        staticClass: 'container',\n        class: Array<any>({\n          'container--fluid': props.fluid,\n        }).concat(classes || []),\n      }),\n      children\n    )\n  },\n})\n"],"sourceRoot":""}