{"version":3,"sources":["webpack:///src/components/Vouchers/ModalSetSpacePrice.vue","webpack:///./src/components/Vouchers/ModalSetSpacePrice.vue","webpack:///./node_modules/core-js/modules/web.self.js","webpack:///./src/components/Vouchers/ModalSetSpacePrice.vue?ca90","webpack:///./src/components/Vouchers/ModalSetSpacePrice.vue?9c37","webpack:///./src/components/Vouchers/ModalSetSpacePrice.vue?4571","webpack:///./src/components/Vouchers/ModalSetSpacePrice.vue?c2f8","webpack:///./src/components/Vouchers/ModalSetSpacePrice.vue?9e0f","webpack:///./src/components/Vouchers/ModalSetSpacePrice.vue?e4a7","webpack:///./src/eventbus/event-bus.js"],"names":["components","Message","props","showModal","type","Boolean","default","onClickCancel","Function","required","data","isSaving","isSavingSuccess","isSavingError","mPrice","mTaxPercentage","mYieldSettings","computed","_objectSpread","mapState","yieldSettings","settings","voucher","Prices","length","price","PriceParts","Price","taxPercentage","TaxPercentage","taxPercentages","result","locationState","TaxPercentages","map","t","created","JSON","parse","stringify","methods","mapMutations","saveSpacePrice","updateYieldSettings","createYieldSettings","criteria","YieldSettingId","LocationId","Number","$route","params","locationId","SpacePrice","saveYieldSetting","Id","_this","voucherProvider","saveVoucherSpacePrice","then","response","status","setVoucher","catch","error","finally","self","render","_vm","_c","_self","attrs","modalTitle","$t","hideFooterButtons","onClickSave","on","closeModal","scopedSlots","_u","key","fn","staticClass","domProps","innerHTML","_s","voucherName","Name","bold","endBold","proxy","width","_v","directives","name","rawName","value","expression","change","$event","$$selectedVal","Array","prototype","filter","call","target","options","o","selected","val","_value","multiple","_l","CurrencySymbol","modifiers","number","input","composing","_n","blur","$forceUpdate","staticRenderFns","_withStripped","EventBus","Vue"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkFA;AACA;AACA;AACA;AAEe;EACfA,UAAA;IACAC,OAAA,EAAAA;EACA;EAEAC,KAAA;IACAC,SAAA;MACAC,IAAA,EAAAC,OAAA;MACAC,OAAA;IACA;IAEAC,aAAA;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;;;;;;;;;;ACAA;AAAA;AAAqB;AACd,IAAMC,QAAQ,GAAG,IAAIC,2CAAG,CAAC,CAAC;AAElBD,iEAAQ,E","file":"js/205.js?id=08bd99eb67b9d68a1fc1","sourcesContent":["<template>\n  <ui-component-modal\n    :modalTitle=\"$t('Components.Vouchers.ModalSetSpacePrice.Modal_Title')\"\n    :isSaving=\"isSaving\"\n    :isSavingSuccess=\"isSavingSuccess\"\n    :isSavingError=\"isSavingError\"\n    :hideFooterButtons=\"isSavingError || isSavingSuccess\"\n    :onClickCancel=\"onClickCancel\"\n    :onClickSave=\"saveSpacePrice\"\n    :showModal=\"showModal\"\n    @closeModal=\"onClickCancel\"\n  >\n    <template v-slot:content>\n      <Message type=\"is-info\">\n        <template v-slot:content>\n          <span class=\"level\">\n            <span\n              class=\"is-pulled-left\"\n              v-html=\"\n                $t(\n                  'Components.Vouchers.ModalSetSpacePrice.Message_SetSpacePrice',\n                  { voucherName: voucher.Name, bold: '<b>', endBold: '</b>' }\n                )\n              \"\n            >\n            </span>\n          </span>\n        </template>\n      </Message>\n\n      <table class=\"table is-fullwidth is-striped\">\n        <thead>\n          <tr>\n            <th width=\"20%\"></th>\n            <th width=\"80%\"></th>\n          </tr>\n        </thead>\n        <tbody>\n          <tr class=\"has-text-vertical-middle\">\n            <td>{{ $t('General.VAT') }}</td>\n            <td>\n              <div class=\"field has-addons\">\n                <p class=\"select\">\n                  <select v-model=\"mTaxPercentage\">\n                    <option\n                      v-for=\"taxPercentage in taxPercentages\"\n                      :key=\"taxPercentage\"\n                      :value=\"taxPercentage\"\n                      :selected=\"taxPercentage === taxPercentage\"\n                      >{{ taxPercentage }}</option\n                    >\n                  </select>\n                </p>\n                <p class=\"control\">\n                  <a class=\"button is-static\">%</a>\n                </p>\n              </div>\n            </td>\n          </tr>\n          <tr>\n            <td>{{ $t('General.Price') }}</td>\n            <td>\n              <div class=\"field-price field has-addons\">\n                <p class=\"control\">\n                  <a\n                    class=\"button is-static\"\n                    v-html=\"locationState.CurrencySymbol\"\n                  ></a>\n                </p>\n                <p class=\"control\">\n                  <input type=\"text\" class=\"input\" v-model.number=\"mPrice\" />\n                </p>\n              </div>\n            </td>\n          </tr>\n        </tbody>\n      </table>\n    </template>\n  </ui-component-modal>\n</template>\n\n<script>\nimport { mapState, mapMutations } from 'vuex'\nimport { EventBus } from '@/eventbus/event-bus'\nimport voucherProvider from '@/providers/voucher'\nimport Message from '@/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      isSavingSuccess: false,\n      isSavingError: false,\n      mPrice: 0,\n      mTaxPercentage: 0,\n      mYieldSettings: null,\n    }\n  },\n\n  computed: {\n    ...mapState('locationStore', ['locationState']),\n    ...mapState('voucherStore', ['voucher']),\n\n    yieldSettings() {\n      let settings = null\n\n      if (\n        this.voucher &&\n        this.voucher.Prices &&\n        this.voucher.Prices.length > 0\n      ) {\n        settings = this.voucher.Prices[0]\n      }\n\n      return settings\n    },\n\n    price() {\n      let price = 0\n\n      if (this.yieldSettings && this.yieldSettings.PriceParts) {\n        price = this.yieldSettings.PriceParts[0].Price\n      }\n\n      return price\n    },\n\n    taxPercentage() {\n      let taxPercentage = 0\n\n      if (this.yieldSettings) {\n        taxPercentage = this.yieldSettings.TaxPercentage\n      }\n\n      return taxPercentage\n    },\n\n    taxPercentages() {\n      let result = []\n\n      if (this.locationState) {\n        result = this.locationState.TaxPercentages.map((t) => t.TaxPercentage)\n      }\n\n      return result\n    },\n  },\n\n  created() {\n    this.mYieldSettings = JSON.parse(JSON.stringify(this.yieldSettings))\n    this.mPrice = this.price ? JSON.parse(JSON.stringify(this.price)) : 0\n    this.mTaxPercentage = this.taxPercentage\n      ? JSON.parse(JSON.stringify(this.taxPercentage))\n      : 0\n  },\n\n  methods: {\n    ...mapMutations('voucherStore', ['setVoucher']),\n\n    saveSpacePrice() {\n      if (this.yieldSettings) {\n        this.updateYieldSettings();\n      } else {\n        this.createYieldSettings();\n      }\n    },\n\n    createYieldSettings() {\n      let criteria = {\n        YieldSettingId: 0,\n        LocationId: Number(this.$route.params.locationId),\n        TaxPercentage: this.mTaxPercentage,\n        SpacePrice: this.mPrice,\n      }\n\n      this.saveYieldSetting(criteria)\n    },\n\n    updateYieldSettings() {\n      let criteria = {\n        YieldSettingId: this.mYieldSettings.Id,\n        LocationId: Number(this.$route.params.locationId),\n        TaxPercentage: this.mTaxPercentage,\n        SpacePrice: this.mPrice,\n      }\n\n      this.saveYieldSetting(criteria)\n    },\n\n    saveYieldSetting(criteria) {\n      if (this.isSaving) {\n        return true;\n      }\n      this.isSaving = true;\n\n      voucherProvider.methods\n        .saveVoucherSpacePrice(this.voucher.Id, criteria)\n        .then((response) => {\n          if (response.status === 200) {\n            this.setVoucher(response.data);\n\n            this.onClickCancel();\n          }\n        })\n        .catch((error) => {\n        })\n        .finally(() => {\n          self.isSaving = false;\n        })\n    }\n  },\n}\n</script>\n<style lang=\"scss\">\n.input {\n  width: 38% !important;\n}\n</style>\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(\"Components.Vouchers.ModalSetSpacePrice.Modal_Title\"),\n      isSaving: _vm.isSaving,\n      isSavingSuccess: _vm.isSavingSuccess,\n      isSavingError: _vm.isSavingError,\n      hideFooterButtons: _vm.isSavingError || _vm.isSavingSuccess,\n      onClickCancel: _vm.onClickCancel,\n      onClickSave: _vm.saveSpacePrice,\n      showModal: _vm.showModal,\n    },\n    on: { closeModal: _vm.onClickCancel },\n    scopedSlots: _vm._u([\n      {\n        key: \"content\",\n        fn: function () {\n          return [\n            _c(\"Message\", {\n              attrs: { type: \"is-info\" },\n              scopedSlots: _vm._u([\n                {\n                  key: \"content\",\n                  fn: function () {\n                    return [\n                      _c(\"span\", { staticClass: \"level\" }, [\n                        _c(\"span\", {\n                          staticClass: \"is-pulled-left\",\n                          domProps: {\n                            innerHTML: _vm._s(\n                              _vm.$t(\n                                \"Components.Vouchers.ModalSetSpacePrice.Message_SetSpacePrice\",\n                                {\n                                  voucherName: _vm.voucher.Name,\n                                  bold: \"<b>\",\n                                  endBold: \"</b>\",\n                                }\n                              )\n                            ),\n                          },\n                        }),\n                      ]),\n                    ]\n                  },\n                  proxy: true,\n                },\n              ]),\n            }),\n            _c(\"table\", { staticClass: \"table is-fullwidth is-striped\" }, [\n              _c(\"thead\", [\n                _c(\"tr\", [\n                  _c(\"th\", { attrs: { width: \"20%\" } }),\n                  _c(\"th\", { attrs: { width: \"80%\" } }),\n                ]),\n              ]),\n              _c(\"tbody\", [\n                _c(\"tr\", { staticClass: \"has-text-vertical-middle\" }, [\n                  _c(\"td\", [_vm._v(_vm._s(_vm.$t(\"General.VAT\")))]),\n                  _c(\"td\", [\n                    _c(\"div\", { staticClass: \"field has-addons\" }, [\n                      _c(\"p\", { staticClass: \"select\" }, [\n                        _c(\n                          \"select\",\n                          {\n                            directives: [\n                              {\n                                name: \"model\",\n                                rawName: \"v-model\",\n                                value: _vm.mTaxPercentage,\n                                expression: \"mTaxPercentage\",\n                              },\n                            ],\n                            on: {\n                              change: function ($event) {\n                                var $$selectedVal = Array.prototype.filter\n                                  .call($event.target.options, function (o) {\n                                    return o.selected\n                                  })\n                                  .map(function (o) {\n                                    var val = \"_value\" in o ? o._value : o.value\n                                    return val\n                                  })\n                                _vm.mTaxPercentage = $event.target.multiple\n                                  ? $$selectedVal\n                                  : $$selectedVal[0]\n                              },\n                            },\n                          },\n                          _vm._l(_vm.taxPercentages, function (taxPercentage) {\n                            return _c(\n                              \"option\",\n                              {\n                                key: taxPercentage,\n                                domProps: {\n                                  value: taxPercentage,\n                                  selected: taxPercentage === taxPercentage,\n                                },\n                              },\n                              [_vm._v(_vm._s(taxPercentage))]\n                            )\n                          }),\n                          0\n                        ),\n                      ]),\n                      _c(\"p\", { staticClass: \"control\" }, [\n                        _c(\"a\", { staticClass: \"button is-static\" }, [\n                          _vm._v(\"%\"),\n                        ]),\n                      ]),\n                    ]),\n                  ]),\n                ]),\n                _c(\"tr\", [\n                  _c(\"td\", [_vm._v(_vm._s(_vm.$t(\"General.Price\")))]),\n                  _c(\"td\", [\n                    _c(\"div\", { staticClass: \"field-price field has-addons\" }, [\n                      _c(\"p\", { staticClass: \"control\" }, [\n                        _c(\"a\", {\n                          staticClass: \"button is-static\",\n                          domProps: {\n                            innerHTML: _vm._s(_vm.locationState.CurrencySymbol),\n                          },\n                        }),\n                      ]),\n                      _c(\"p\", { staticClass: \"control\" }, [\n                        _c(\"input\", {\n                          directives: [\n                            {\n                              name: \"model\",\n                              rawName: \"v-model.number\",\n                              value: _vm.mPrice,\n                              expression: \"mPrice\",\n                              modifiers: { number: true },\n                            },\n                          ],\n                          staticClass: \"input\",\n                          attrs: { type: \"text\" },\n                          domProps: { value: _vm.mPrice },\n                          on: {\n                            input: function ($event) {\n                              if ($event.target.composing) return\n                              _vm.mPrice = _vm._n($event.target.value)\n                            },\n                            blur: function ($event) {\n                              return _vm.$forceUpdate()\n                            },\n                          },\n                        }),\n                      ]),\n                    ]),\n                  ]),\n                ]),\n              ]),\n            ]),\n          ]\n        },\n        proxy: true,\n      },\n    ]),\n  })\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","'use strict';\nvar $ = require('../internals/export');\nvar globalThis = require('../internals/global-this');\nvar defineBuiltInAccessor = require('../internals/define-built-in-accessor');\nvar DESCRIPTORS = require('../internals/descriptors');\n\nvar $TypeError = TypeError;\n// eslint-disable-next-line es/no-object-defineproperty -- safe\nvar defineProperty = Object.defineProperty;\nvar INCORRECT_VALUE = globalThis.self !== globalThis;\n\n// `self` getter\n// https://html.spec.whatwg.org/multipage/window-object.html#dom-self\ntry {\n  if (DESCRIPTORS) {\n    // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\n    var descriptor = Object.getOwnPropertyDescriptor(globalThis, 'self');\n    // some engines have `self`, but with incorrect descriptor\n    // https://github.com/denoland/deno/issues/15765\n    if (INCORRECT_VALUE || !descriptor || !descriptor.get || !descriptor.enumerable) {\n      defineBuiltInAccessor(globalThis, 'self', {\n        get: function self() {\n          return globalThis;\n        },\n        set: function self(value) {\n          if (this !== globalThis) throw new $TypeError('Illegal invocation');\n          defineProperty(globalThis, 'self', {\n            value: value,\n            writable: true,\n            configurable: true,\n            enumerable: true\n          });\n        },\n        configurable: true,\n        enumerable: true\n      });\n    }\n  } else $({ global: true, simple: true, forced: INCORRECT_VALUE }, {\n    self: globalThis\n  });\n} catch (error) { /* empty */ }\n","// Imports\nvar ___CSS_LOADER_API_IMPORT___ = require(\"../../../node_modules/css-loader/dist/runtime/api.js\");\nexports = ___CSS_LOADER_API_IMPORT___(false);\n// Module\nexports.push([module.id, \"/**\\n* Colors\\n*/\\n/**\\n* Text sizes\\n*/\\n/**\\n* Column settings\\n*/\\n/**\\n* Font properties\\n*/\\n.input {\\n  width: 38% !important;\\n}\", \"\"]);\n// Exports\nmodule.exports = exports;\n","// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = require(\"!!../../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ModalSetSpacePrice.vue?vue&type=style&index=0&id=f62c97bc&lang=scss\");\nif(content.__esModule) content = content.default;\nif(typeof content === 'string') content = [[module.id, content, '']];\nif(content.locals) module.exports = content.locals;\n// add the styles to the DOM\nvar add = require(\"!../../../node_modules/vue-style-loader/lib/addStylesClient.js\").default\nvar update = add(\"080c35e2\", content, false, {\"sourceMap\":false,\"shadowMode\":false});\n// Hot Module Replacement\nif(module.hot) {\n // When the styles change, update the <style> tags\n if(!content.locals) {\n   module.hot.accept(\"!!../../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ModalSetSpacePrice.vue?vue&type=style&index=0&id=f62c97bc&lang=scss\", function() {\n     var newContent = require(\"!!../../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ModalSetSpacePrice.vue?vue&type=style&index=0&id=f62c97bc&lang=scss\");\n     if(newContent.__esModule) newContent = newContent.default;\n     if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\n     update(newContent);\n   });\n }\n // When the module is disposed, remove the <style> tags\n module.hot.dispose(function() { update(); });\n}","import { render, staticRenderFns } from \"./ModalSetSpacePrice.vue?vue&type=template&id=f62c97bc\"\nimport script from \"./ModalSetSpacePrice.vue?vue&type=script&lang=js\"\nexport * from \"./ModalSetSpacePrice.vue?vue&type=script&lang=js\"\nimport style0 from \"./ModalSetSpacePrice.vue?vue&type=style&index=0&id=f62c97bc&lang=scss\"\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('f62c97bc')) {\n      api.createRecord('f62c97bc', component.options)\n    } else {\n      api.reload('f62c97bc', component.options)\n    }\n    module.hot.accept(\"./ModalSetSpacePrice.vue?vue&type=template&id=f62c97bc\", function () {\n      api.rerender('f62c97bc', {\n        render: render,\n        staticRenderFns: staticRenderFns\n      })\n    })\n  }\n}\ncomponent.options.__file = \"src/components/Vouchers/ModalSetSpacePrice.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!./ModalSetSpacePrice.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!./ModalSetSpacePrice.vue?vue&type=script&lang=js\"","export * from \"-!../../../node_modules/vue-style-loader/index.js??ref--9-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ModalSetSpacePrice.vue?vue&type=style&index=0&id=f62c97bc&lang=scss\"","export * from \"-!../../../node_modules/cache-loader/dist/cjs.js?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"381a4baa-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!./ModalSetSpacePrice.vue?vue&type=template&id=f62c97bc\"","import Vue from 'vue'\nexport const EventBus = new Vue()\n\nexport default EventBus\n"],"sourceRoot":""}