{"version":3,"sources":["webpack:///./src/components/Settings/Industries/ModalDeleteIndustry.vue","webpack:///src/components/Settings/Industries/ModalDeleteIndustry.vue","webpack:///./src/components/Settings/Industries/ModalDeleteIndustry.vue?89c1","webpack:///./src/components/Settings/Industries/ModalDeleteIndustry.vue?aa79"],"names":["render","_vm","this","_c","_self","attrs","$t","isDeleting","isDeletingSuccess","isDeletingError","isDeleteConfirmed","onClickCancel","deleteIndustry","showModal","on","scopedSlots","_u","key","fn","staticClass","domProps","_s","name","industry","Name","model","value","callback","$$v","expression","proxy","slot","staticRenderFns","components","BaseCheckbox","props","type","Boolean","default","Function","required","Object","data","computed","_objectSpread","mapState","created","methods","self","industryProvider","Id","then","response","status","$emit","catch","finally","component"],"mappings":"yHAAA,IAAIA,EAAS,WAAkB,IAAIC,EAAIC,KAAKC,EAAGF,EAAIG,MAAMD,GAAG,OAAOA,EAAG,qBAAqB,CAACE,MAAM,CAAC,WAAaJ,EAAIK,GAAG,kEAAkE,sBAAwB,YAAY,mBAAqBL,EAAIK,GAAG,uBAAuB,SAAWL,EAAIM,WAAW,gBAAkBN,EAAIO,kBAAkB,cAAgBP,EAAIQ,gBAAgB,kBAAoBR,EAAIQ,iBAAmBR,EAAIO,kBAAkB,mBAAqBP,EAAIS,mBAAqBT,EAAIM,WAAW,cAAgBN,EAAIU,cAAc,YAAcV,EAAIW,eAAe,UAAYX,EAAIY,WAAWC,GAAG,CAAC,WAAab,EAAIU,eAAeI,YAAYd,EAAIe,GAAG,CAAC,CAACC,IAAI,UAAUC,GAAG,WAAW,MAAO,CAACf,EAAG,MAAM,CAACgB,YAAY,gDAAgDC,SAAS,CAAC,UAAYnB,EAAIoB,GACvwBpB,EAAIK,GAAG,iEAAkE,CACvEgB,KAAMrB,EAAIsB,SAASC,WAElBrB,EAAG,MAAM,CAACgB,YAAY,qBAAqB,CAAChB,EAAG,eAAe,CAACgB,YAAY,gBAAgBd,MAAM,CAAC,MAAQJ,EAAIK,GAC7G,oEACCmB,MAAM,CAACC,MAAOzB,EAAIS,kBAAmBiB,SAAS,SAAUC,GAAM3B,EAAIS,kBAAkBkB,GAAKC,WAAW,wBAAwB,KAAKC,OAAM,MAAS,CAAC3B,EAAG,WAAW,CAAC4B,KAAK,gBAAgB,IAE9LC,EAAkB,G,oECuCP,GACfC,WAAA,CACAC,aAAA,8EAGAC,MAAA,CACAtB,UAAA,CACAuB,KAAAC,QACAC,SAAA,GAGA3B,cAAA,CACAyB,KAAAG,SACAC,UAAA,GAGAjB,SAAA,CACAa,KAAAK,OACAH,QAAA,OAIAI,KAAA,WACA,OACAhC,mBAAA,EACAH,YAAA,EACAC,mBAAA,EACAC,iBAAA,IAIAkC,SAAAC,eAAA,GACAC,eAAA,oCAGAC,QAAA,aAEAC,QAAA,CACAnC,eAAA,WACA,IAAAoC,EAAA,KAEAA,EAAAzC,aACAyC,EAAAzC,YAAA,EAEA0C,OAAAF,QACAnC,eAAA,KAAAW,SAAA2B,IACAC,MAAA,SAAAC,GACA,MAAAA,EAAAC,SACAL,EAAAM,MAAA,kBAAAN,EAAAzB,UAEAyB,EAAArC,oBAGA4C,OAAA,WACAP,EAAAvC,iBAAA,KAEA+C,SAAA,WACAR,EAAAzC,YAAA,SCxG0X,I,YCOtXkD,EAAY,eACd,EACAzD,EACAgC,GACA,EACA,KACA,KACA,MAIa,aAAAyB,E","file":"js/chunk-2d0c08bd.js?id=ae1d96f04c2749f2e41a","sourcesContent":["var render = function render(){var _vm=this,_c=_vm._self._c;return _c('ui-component-modal',{attrs:{\"modalTitle\":_vm.$t('Components.Settings.Industries.ModalDeleteIndustry.Modal_Title'),\"confirmButtonCssClass\":\"is-danger\",\"buttonLabelConfirm\":_vm.$t('Form.Control.Delete'),\"isSaving\":_vm.isDeleting,\"isSavingSuccess\":_vm.isDeletingSuccess,\"isSavingError\":_vm.isDeletingError,\"hideFooterButtons\":_vm.isDeletingError || _vm.isDeletingSuccess,\"disableSaveButton\":!_vm.isDeleteConfirmed || _vm.isDeleting,\"onClickCancel\":_vm.onClickCancel,\"onClickSave\":_vm.deleteIndustry,\"showModal\":_vm.showModal},on:{\"closeModal\":_vm.onClickCancel},scopedSlots:_vm._u([{key:\"content\",fn:function(){return [_c('div',{staticClass:\"has-margin-bottom is-size-5 has-text-centered\",domProps:{\"innerHTML\":_vm._s(\n        _vm.$t('Components.Settings.Industries.ModalDeleteIndustry.Text_Delete', {\n          name: _vm.industry.Name,\n        })\n      )}}),_c('div',{staticClass:\"has-text-centered\"},[_c('BaseCheckbox',{staticClass:\"has-text-left\",attrs:{\"label\":_vm.$t(\n            'Components.Settings.Industries.ModalDeleteIndustry.Text_YesSure'\n          )},model:{value:(_vm.isDeleteConfirmed),callback:function ($$v) {_vm.isDeleteConfirmed=$$v},expression:\"isDeleteConfirmed\"}})],1)]},proxy:true}])},[_c('template',{slot:\"modalTitle\"})],2)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n  <ui-component-modal\n    :modalTitle=\"\n      $t('Components.Settings.Industries.ModalDeleteIndustry.Modal_Title')\n    \"\n    confirmButtonCssClass=\"is-danger\"\n    :buttonLabelConfirm=\"$t('Form.Control.Delete')\"\n    :isSaving=\"isDeleting\"\n    :isSavingSuccess=\"isDeletingSuccess\"\n    :isSavingError=\"isDeletingError\"\n    :hideFooterButtons=\"isDeletingError || isDeletingSuccess\"\n    :disableSaveButton=\"!isDeleteConfirmed || isDeleting\"\n    :onClickCancel=\"onClickCancel\"\n    :onClickSave=\"deleteIndustry\"\n    :showModal=\"showModal\"\n    @closeModal=\"onClickCancel\"\n  >\n    <template slot=\"modalTitle\"></template>\n    <template v-slot:content>\n      <div\n        class=\"has-margin-bottom is-size-5 has-text-centered\"\n        v-html=\"\n          $t('Components.Settings.Industries.ModalDeleteIndustry.Text_Delete', {\n            name: industry.Name,\n          })\n        \"\n      ></div>\n      <div class=\"has-text-centered\">\n        <BaseCheckbox\n          v-model=\"isDeleteConfirmed\"\n          class=\"has-text-left\"\n          :label=\"\n            $t(\n              'Components.Settings.Industries.ModalDeleteIndustry.Text_YesSure'\n            )\n          \"\n        />\n      </div>\n    </template>\n  </ui-component-modal>\n</template>\n\n<script>\nimport Vue from 'vue'\nimport { mapState } from 'vuex'\nimport industryProvider from '@/providers/industry'\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    industry: {\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    ...mapState('locationStore', ['locationState']),\n  },\n\n  created() {},\n\n  methods: {\n    deleteIndustry() {\n      let self = this\n\n      if (!self.isDeleting) {\n        self.isDeleting = true\n\n        industryProvider.methods\n          .deleteIndustry(this.industry.Id)\n          .then((response) => {\n            if (response.status === 204) {\n              self.$emit('industryDeleted', self.industry)\n\n              self.onClickCancel()\n            }\n          })\n          .catch(() => {\n            self.isDeletingError = true\n          })\n          .finally(() => {\n            self.isDeleting = false\n          })\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!./ModalDeleteIndustry.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!./ModalDeleteIndustry.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./ModalDeleteIndustry.vue?vue&type=template&id=4e132634\"\nimport script from \"./ModalDeleteIndustry.vue?vue&type=script&lang=js\"\nexport * from \"./ModalDeleteIndustry.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":""}