{"version":3,"sources":["webpack:///src/components/Reservations/ModalReviveReservation.vue","webpack:///./src/components/Reservations/ModalReviveReservation.vue","webpack:///./src/components/Reservations/ModalReviveReservation.vue?30bb","webpack:///./src/components/Reservations/ModalReviveReservation.vue?6352","webpack:///./src/components/Reservations/ModalReviveReservation.vue?5833"],"names":["Message","components","props","showModal","type","Boolean","default","onClickCancel","Function","required","data","isSaving","isSavingError","computed","_objectSpread","mapState","created","methods","mapMutations","reviveReservation","_this","self","reservationProvider","reservation","Key","then","response","status","setReservation","EventBus","$emit","message","$t","catch","error","finally","render","_vm","_c","_self","attrs","modalTitle","hideFooterButtons","onClickSave","buttonLabelConfirm","buttonLabelCancel","on","closeModal","scopedSlots","_u","key","fn","staticClass","proxy","staticRenderFns","_withStripped"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA+BA;AACA;AACA;AAEA,IAAAA,OAAA,YAAAA,QAAA;EAAA;AAAA;AAEe;EACfC,UAAA;IACAD,OAAA,EAAAA;EACA;EAEAE,KAAA;IACAC,SAAA;MACAC,IAAA,EAAAC,OAAA;MACAC,OAAA;IACA;IAEAC,aAAA;MACAH,IAAA,EAAAI,QAAA;MACAC,QAAA;IACA;EACA;EAEAC,IAAA,WAAAA,KAAA;IACA;MACAC,QAAA;MACAC,aAAA;IACA;EACA;EAEAC,QAAA,EAAAC,iIAAA,KACAC,6DAAA,sCACA;EAEAC,OAAA,WAAAA,QAAA;EAEAC,OAAA,EAAAH,iIAAA,CAAAA,iIAAA,KACAI,iEAAA;IAEAC,iBAAA,WAAAA,kBAAA;MAAA,IAAAC,KAAA;MACA,IAAAC,IAAA;MAEA,KAAAA,IAAA,CAAAV,QAAA;QACAU,IAAA,CAAAV,QAAA;QAEAW,sEAAA,CAAAL,OAAA,CACAE,iBAAA,MAAAI,WAAA,CAAAC,GAAA,EACAC,IAAA,WAAAC,QAAA;UACA,IAAAA,QAAA,CAAAC,MAAA;YACA;YACAP,KAAA,CAAAQ,cAAA,CAAAF,QAAA,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AAE,CACb,2DACF;UACF;QACF,CAAC,CAAC,CACH;MACH,CAAC;MACDqB,KAAK,EAAE;IACT,CAAC,CACF;EACH,CAAC,CAAC;AACJ,CAAC;AACD,IAAIC,eAAe,GAAG,EAAE;AACxBlB,MAAM,CAACmB,aAAa,GAAG,IAAI;;;;;;;;;;;;;;AC3C3B;AAAA;AAAA;AAAA;AAAoG;AAC3B;AACL;;;AAGpE;AAC6F;AAC7F,gBAAgB,mHAAU;AAC1B,EAAE,mGAAM;AACR,EAAE,wGAAM;AACR,EAAE,iHAAe;AACjB;AACA;AACA;AACA;;AAEA;;AAEA;AACA,IAAI,KAAU,EAAE,YAiBf;AACD;AACe,gF;;;;;;;;;;;;;ACtCf;AAA8S,CAAgB,wVAAG,EAAC,C;;;;;;;;;;;;;ACAlU;AAAA;AAAA;AAAA;AAAA","file":"js/397.js?id=30551edf60767a487757","sourcesContent":["<template>\n  <ui-component-modal\n    :modalTitle=\"\n      $t('Components.Reservation.ModalReviveReservation.Header_ModalHeader')\n    \"\n    :isSaving=\"isSaving\"\n    :isSavingError=\"isSavingError\"\n    :hideFooterButtons=\"isSavingError\"\n    :onClickCancel=\"onClickCancel\"\n    :onClickSave=\"reviveReservation\"\n    :showModal=\"showModal\"\n    :buttonLabelConfirm=\"\n      $t('Components.Reservation.ModalReviveReservation.Label_Yes')\n    \"\n    :buttonLabelCancel=\"\n      $t('Components.Reservation.ModalReviveReservation.Label_No')\n    \"\n    @closeModal=\"onClickCancel\"\n  >\n    <template v-slot:content>\n      <Message\n        class=\"is-info has-margin-bottom\"\n        :message=\"\n          $t('Components.Reservation.ModalReviveReservation.Text_Revive')\n        \"\n      />\n    </template>\n  </ui-component-modal>\n</template>\n\n<script>\nimport { mapState, mapMutations } from 'vuex'\nimport { EventBus } from '@/eventbus/event-bus'\nimport reservationProvider from '@/providers/reservation'\n\nconst Message = () => import('@/components/UI/Message')\n\nexport default {\n  components: {\n    Message,\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\n  data() {\n    return {\n      isSaving: false,\n      isSavingError: false,\n    }\n  },\n\n  computed: {\n    ...mapState('reservationStore', ['reservation']),\n  },\n\n  created() {},\n\n  methods: {\n    ...mapMutations('reservationStore', ['setReservation']),\n\n    reviveReservation() {\n      let self = this\n\n      if (!self.isSaving) {\n        self.isSaving = true\n\n        reservationProvider.methods\n          .reviveReservation(this.reservation.Key)\n          .then((response) => {\n            if (response.status === 200) {\n              // Update reservation store\n              this.setReservation(response.data)\n\n              // Send message to be shown as toast on page\n              EventBus.$emit('showToast', {\n                type: 'info',\n                message: this.$t('General.Toast_ReservationUpdated'),\n              })\n\n              self.onClickCancel()\n            }\n          })\n          .catch((error) => {\n            self.isSavingError = true\n          })\n          .finally(() => {\n            self.isSaving = false\n          })\n      }\n    },\n  },\n}\n</script>\n","var render = function render() {\n  var _vm = this,\n    _c = _vm._self._c\n  return _c(\"ui-component-modal\", {\n    attrs: {\n      modalTitle: _vm.$t(\n        \"Components.Reservation.ModalReviveReservation.Header_ModalHeader\"\n      ),\n      isSaving: _vm.isSaving,\n      isSavingError: _vm.isSavingError,\n      hideFooterButtons: _vm.isSavingError,\n      onClickCancel: _vm.onClickCancel,\n      onClickSave: _vm.reviveReservation,\n      showModal: _vm.showModal,\n      buttonLabelConfirm: _vm.$t(\n        \"Components.Reservation.ModalReviveReservation.Label_Yes\"\n      ),\n      buttonLabelCancel: _vm.$t(\n        \"Components.Reservation.ModalReviveReservation.Label_No\"\n      ),\n    },\n    on: { closeModal: _vm.onClickCancel },\n    scopedSlots: _vm._u([\n      {\n        key: \"content\",\n        fn: function () {\n          return [\n            _c(\"Message\", {\n              staticClass: \"is-info has-margin-bottom\",\n              attrs: {\n                message: _vm.$t(\n                  \"Components.Reservation.ModalReviveReservation.Text_Revive\"\n                ),\n              },\n            }),\n          ]\n        },\n        proxy: true,\n      },\n    ]),\n  })\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","import { render, staticRenderFns } from \"./ModalReviveReservation.vue?vue&type=template&id=1be4da12\"\nimport script from \"./ModalReviveReservation.vue?vue&type=script&lang=js\"\nexport * from \"./ModalReviveReservation.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\n/* hot reload */\nif (module.hot) {\n  var api = require(\"/github/workspace/node_modules/vue-hot-reload-api/dist/index.js\")\n  api.install(require('vue'))\n  if (api.compatible) {\n    module.hot.accept()\n    if (!api.isRecorded('1be4da12')) {\n      api.createRecord('1be4da12', component.options)\n    } else {\n      api.reload('1be4da12', component.options)\n    }\n    module.hot.accept(\"./ModalReviveReservation.vue?vue&type=template&id=1be4da12\", function () {\n      api.rerender('1be4da12', {\n        render: render,\n        staticRenderFns: staticRenderFns\n      })\n    })\n  }\n}\ncomponent.options.__file = \"src/components/Reservations/ModalReviveReservation.vue\"\nexport default component.exports","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../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!./ModalReviveReservation.vue?vue&type=script&lang=js\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../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!./ModalReviveReservation.vue?vue&type=script&lang=js\"","export * from \"-!../../../node_modules/cache-loader/dist/cjs.js?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"d2a26fb4-vue-loader-template\\\"}!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-loader/lib/loaders/templateLoader.js??ref--6!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ModalReviveReservation.vue?vue&type=template&id=1be4da12\""],"sourceRoot":""}