{"version":3,"sources":["webpack:///./src/eventbus/event-bus.js","webpack:///./src/components/Customers/ModalDeleteCustomerCompany.vue","webpack:///src/components/Customers/ModalDeleteCustomerCompany.vue","webpack:///./src/components/Customers/ModalDeleteCustomerCompany.vue?5901","webpack:///./src/components/Customers/ModalDeleteCustomerCompany.vue?4485"],"names":["EventBus","Vue","render","_vm","this","_c","_self","attrs","$t","isDeleting","isDeletingSuccess","isDeletingError","isDeleteConfirmed","company","onClickCancel","deleteCustomerCompany","showModal","on","scopedSlots","_u","key","fn","staticClass","_v","_s","customer","FullName","Name","model","value","callback","$$v","expression","proxy","slot","staticRenderFns","components","BaseCheckbox","props","type","Boolean","default","Function","required","id","Number","Object","data","computed","created","methods","_this","self","customerProvider","Id","then","response","status","$emit","message","catch","err","finally","component"],"mappings":"oJAAA,kDACaA,EAAW,IAAIC,aAEbD,U,yCCHf,IAAIE,EAAS,WAAkB,IAAIC,EAAIC,KAAKC,EAAGF,EAAIG,MAAMD,GAAG,OAAOA,EAAG,qBAAqB,CAACE,MAAM,CAAC,WAAaJ,EAAIK,GAAG,8DAA8D,SAAWL,EAAIM,WAAW,gBAAkBN,EAAIO,kBAAkB,cAAgBP,EAAIQ,gBAAgB,kBAAoBR,EAAIQ,iBAAmBR,EAAIO,kBAAkB,mBAAqBP,EAAIS,oBAAsBT,EAAIU,QAAQ,mBAAqBV,EAAIK,GAAG,uBAAuB,sBAAwB,YAAY,cAAgBL,EAAIW,cAAc,YAAcX,EAAIY,sBAAsB,UAAYZ,EAAIa,WAAWC,GAAG,CAAC,WAAad,EAAIW,eAAeI,YAAYf,EAAIgB,GAAG,CAAC,CAACC,IAAI,UAAUC,GAAG,WAAW,MAAO,CAAChB,EAAG,MAAM,CAACiB,YAAY,0BAA0B,CAACjB,EAAG,SAAS,CAACF,EAAIoB,GAAGpB,EAAIqB,GAAGrB,EAAIK,GAAI,mEAAoE,CAAEiB,SAAUtB,EAAIsB,SAASC,SAAUb,QAASV,EAAIU,QAAQc,aAAgBtB,EAAG,MAAM,CAACiB,YAAY,qBAAqB,CAACjB,EAAG,eAAe,CAACiB,YAAY,gBAAgBf,MAAM,CAAC,MAAQJ,EAAIK,GAAG,kEAAkEoB,MAAM,CAACC,MAAO1B,EAAIS,kBAAmBkB,SAAS,SAAUC,GAAM5B,EAAIS,kBAAkBmB,GAAKC,WAAW,wBAAwB,KAAKC,OAAM,MAAS,CAAC5B,EAAG,WAAW,CAAC6B,KAAK,cAAc,CAAC/B,EAAIoB,GAAG,WAAW,IAErwCY,EAAkB,G,kECgDP,GACfC,WAAA,CACAC,aAAA,8EAGAC,MAAA,CACAtB,UAAA,CACAuB,KAAAC,QACAC,SAAA,GAGA3B,cAAA,CACAyB,KAAAG,SACAC,UAAA,GAGAC,GAAA,CACAL,KAAAM,OACAJ,QAAA,GAGAhB,SAAA,CACAc,KAAAO,OACAL,QAAA,MAGA5B,QAAA,CACA0B,KAAAO,OACAL,QAAA,OAIAM,KAAA,WACA,OACAnC,mBAAA,EACAH,YAAA,EACAC,mBAAA,EACAC,iBAAA,IAIAqC,SAAA,GAEAC,QAAA,aAEAC,QAAA,CACAnC,sBAAA,eAAAoC,EAAA,KACAC,EAAA,KAEAA,EAAA3C,aACA2C,EAAA3C,YAAA,EAEA4C,OAAAH,QACAnC,sBAAA,KAAAU,SAAA6B,GAAA,KAAAzC,QAAAyC,IACAC,MAAA,SAAAC,GACA,MAAAA,EAAAC,SACAzD,OAAA0D,MAAA,aACAnB,KAAA,OACAoB,QAAAR,EAAA3C,GACA,uEACA,CACAK,QAAAsC,EAAAtC,QAAAc,SAKAwB,EAAAO,MAAA,kBACAP,EAAArC,oBAGA8C,OAAA,SAAAC,OACAC,SAAA,mBCzHkX,I,YCO9WC,EAAY,eACd,EACA7D,EACAiC,GACA,EACA,KACA,KACA,MAIa,aAAA4B,E","file":"js/chunk-619027be.js?id=2db61d929d913eec356b","sourcesContent":["import Vue from 'vue'\nexport const EventBus = new Vue()\n\nexport default EventBus\n","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('ui-component-modal',{attrs:{\"modalTitle\":_vm.$t('Components.Customers.ModalDeleteCustomerCompany.Main_Title'),\"isSaving\":_vm.isDeleting,\"isSavingSuccess\":_vm.isDeletingSuccess,\"isSavingError\":_vm.isDeletingError,\"hideFooterButtons\":_vm.isDeletingError || _vm.isDeletingSuccess,\"disableSaveButton\":!_vm.isDeleteConfirmed || !_vm.company,\"buttonLabelConfirm\":_vm.$t('Form.Control.Delete'),\"confirmButtonCssClass\":\"is-danger\",\"onClickCancel\":_vm.onClickCancel,\"onClickSave\":_vm.deleteCustomerCompany,\"showModal\":_vm.showModal},on:{\"closeModal\":_vm.onClickCancel},scopedSlots:_vm._u([{key:\"content\",fn:function(){return [_c('div',{staticClass:\"has-text-centered mb-5\"},[_c('strong',[_vm._v(_vm._s(_vm.$t( 'Components.Customers.ModalDeleteCustomerCompany.Label_AreYouSure', { customer: _vm.customer.FullName, company: _vm.company.Name, } )))])]),_c('div',{staticClass:\"has-text-centered\"},[_c('BaseCheckbox',{staticClass:\"has-text-left\",attrs:{\"label\":_vm.$t('Components.Customers.ModalDeleteCustomerCompany.Label_YesSure')},model:{value:(_vm.isDeleteConfirmed),callback:function ($$v) {_vm.isDeleteConfirmed=$$v},expression:\"isDeleteConfirmed\"}})],1)]},proxy:true}])},[_c('template',{slot:\"modalTitle\"},[_vm._v(\"Test\")])],2)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n  <ui-component-modal\n    :modalTitle=\"\n      $t('Components.Customers.ModalDeleteCustomerCompany.Main_Title')\n    \"\n    :isSaving=\"isDeleting\"\n    :isSavingSuccess=\"isDeletingSuccess\"\n    :isSavingError=\"isDeletingError\"\n    :hideFooterButtons=\"isDeletingError || isDeletingSuccess\"\n    :disableSaveButton=\"!isDeleteConfirmed || !company\"\n    :buttonLabelConfirm=\"$t('Form.Control.Delete')\"\n    confirmButtonCssClass=\"is-danger\"\n    :onClickCancel=\"onClickCancel\"\n    :onClickSave=\"deleteCustomerCompany\"\n    :showModal=\"showModal\"\n    @closeModal=\"onClickCancel\"\n  >\n    <template slot=\"modalTitle\">Test</template>\n    <template v-slot:content>\n      <div class=\"has-text-centered mb-5\">\n        <strong>{{\n          $t(\n            'Components.Customers.ModalDeleteCustomerCompany.Label_AreYouSure',\n            {\n              customer: customer.FullName,\n              company: company.Name,\n            }\n          )\n        }}</strong>\n      </div>\n\n      <div class=\"has-text-centered\">\n        <BaseCheckbox\n          v-model=\"isDeleteConfirmed\"\n          class=\"has-text-left\"\n          :label=\"\n            $t('Components.Customers.ModalDeleteCustomerCompany.Label_YesSure')\n          \"\n        />\n      </div>\n    </template>\n  </ui-component-modal>\n</template>\n\n<script>\nimport Vue from 'vue'\nimport { mapState, mapMutations } from 'vuex'\nimport { EventBus } from '@/eventbus/event-bus'\nimport customerProvider from '@/providers/customer'\n\nexport default {\n  components: {\n    BaseCheckbox: () => import('@/components/UI/Form/BaseCheckbox'),\n  },\n\n  props: {\n    showModal: {\n      type: Boolean,\n      default: false,\n    },\n\n    onClickCancel: {\n      type: Function,\n      required: true,\n    },\n\n    id: {\n      type: Number,\n      default: 0,\n    },\n\n    customer: {\n      type: Object,\n      default: null,\n    },\n\n    company: {\n      type: Object,\n      default: null,\n    },\n  },\n\n  data() {\n    return {\n      isDeleteConfirmed: false,\n      isDeleting: false,\n      isDeletingSuccess: false,\n      isDeletingError: false,\n    }\n  },\n\n  computed: {},\n\n  created() {},\n\n  methods: {\n    deleteCustomerCompany() {\n      let self = this\n\n      if (!self.isDeleting) {\n        self.isDeleting = true\n\n        customerProvider.methods\n          .deleteCustomerCompany(this.customer.Id, this.company.Id)\n          .then((response) => {\n            if (response.status === 200) {\n              EventBus.$emit('showToast', {\n                type: 'info',\n                message: this.$t(\n                  'Components.Customers.ModalDeleteCustomerCompany.Toast_CompanyDeleted',\n                  {\n                    company: this.company.Name,\n                  }\n                ),\n              })\n\n              this.$emit('companyDeleted')\n              this.onClickCancel()\n            }\n          })\n          .catch((err) => {})\n          .finally(() => {})\n      }\n    },\n  },\n}\n</script>\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ModalDeleteCustomerCompany.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ModalDeleteCustomerCompany.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./ModalDeleteCustomerCompany.vue?vue&type=template&id=7b5a359d\"\nimport script from \"./ModalDeleteCustomerCompany.vue?vue&type=script&lang=js\"\nexport * from \"./ModalDeleteCustomerCompany.vue?vue&type=script&lang=js\"\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":""}