{"version":3,"sources":["webpack:///./src/components/Settings/Yield/Playground/YieldSettingsLocationUtilization.vue","webpack:///src/components/Settings/Yield/Playground/YieldSettingsLocationUtilization.vue","webpack:///./src/components/Settings/Yield/Playground/YieldSettingsLocationUtilization.vue?1558","webpack:///./src/components/Settings/Yield/Playground/YieldSettingsLocationUtilization.vue?1048"],"names":["render","_vm","this","_c","_self","staticClass","directives","name","rawName","value","yieldSettingsPlayground","ApplyLocationUtilization","expression","attrs","domProps","Array","isArray","_i","on","$event","$$a","$$el","target","$$c","checked","$$v","$$i","$set","concat","slice","updateYieldPlayground","_v","_s","$t","setShowInfo","showInfo","_e","mShowBox","MeetingtypeId","formatter","updateYieldSettingsLocationUtilizationValues","model","locationUtilizationValues","callback","roundToZero","LocationUtilizationBottomValue","LocationUtilizationTopValue","staticRenderFns","components","VueSlider","props","showBox","type","Boolean","default","data","v","computed","_objectSpread","mapState","watch","immediate","handler","newVal","oldVal","created","getLocationUtilizationValues","methods","mapMutations","setYieldSettingsPlayground","$emit","self","bottomValue","topValue","num","Math","round","roundToTwo","component"],"mappings":"iJAAIA,EAAS,WAAkB,IAAIC,EAAIC,KAAKC,EAAGF,EAAIG,MAAMD,GAAG,OAAOA,EAAG,MAAM,CAACE,YAAY,OAAO,CAACF,EAAG,MAAM,CAACE,YAAY,WAAW,CAACF,EAAG,MAAM,CAACE,YAAY,UAAU,CAACF,EAAG,QAAQ,CAACE,YAAY,sCAAsC,CAACF,EAAG,QAAQ,CAACG,WAAW,CAAC,CAACC,KAAK,QAAQC,QAAQ,UAAUC,MAAOR,EAAIS,wBAAwBC,yBAA0BC,WAAW,qDAAqDC,MAAM,CAAC,KAAO,YAAYC,SAAS,CAAC,QAAUC,MAAMC,QAAQf,EAAIS,wBAAwBC,0BAA0BV,EAAIgB,GAAGhB,EAAIS,wBAAwBC,yBAAyB,OAAO,EAAGV,EAAIS,wBAAwBC,0BAA2BO,GAAG,CAAC,OAAS,CAAC,SAASC,GAAQ,IAAIC,EAAInB,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0B,KAKAE,QAAA,WACA,KAAAvB,0BAAA,KAAAwB,gCAGAC,QAAAT,8BAAA,GACAU,eAAA,kDAEAlC,YAAA,WACA,KAAAC,UAAA,KAAAA,SACA,KAAAA,WACA,KAAAE,UAAA,IAIAP,sBAAA,WACA,KAAAuC,2BAAA,KAAA3D,yBACA,KAAA4D,MAAA,yBAGAJ,6BAAA,WACA,OACA,KAAAtB,YACA,SAAAlC,wBAAAmC,gCAEA,KAAAD,YACA,SAAAlC,wBAAAoC,+BAKAN,6CAAA,WACA,IAAA+B,EAAA,KAEAC,EAAAD,EAAA7B,0BAAA,OACA+B,EAAAF,EAAA7B,0BAAA,OAEA6B,EAAA7D,wBAAAmC,+BAAA2B,EACAD,EAAA7D,wBAAAoC,4BAAA2B,GAGA7B,YAAA,SAAA8B,GACA,IAAAH,EAAA,KACA,QAAAI,KAAAC,MAAAL,EAAAM,WAAAH,GAAA,eAGAG,WAAA,SAAAH,GACA,QAAAC,KAAAC,MAAAF,EAAA,mBC1KsZ,I,YCOlZI,EAAY,eACd,EACA9E,EACA+C,GACA,EACA,KACA,KACA,MAIa,aAAA+B,E","file":"js/chunk-2d0e9754.js?id=a293997899d5af46ce1b","sourcesContent":["var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"box\"},[_c('div',{staticClass:\"columns\"},[_c('div',{staticClass:\"column\"},[_c('label',{staticClass:\"checkbox has-text-weight-bold mb-4\"},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.yieldSettingsPlayground.ApplyLocationUtilization),expression:\"yieldSettingsPlayground.ApplyLocationUtilization\"}],attrs:{\"type\":\"checkbox\"},domProps:{\"checked\":Array.isArray(_vm.yieldSettingsPlayground.ApplyLocationUtilization)?_vm._i(_vm.yieldSettingsPlayground.ApplyLocationUtilization,null)>-1:(_vm.yieldSettingsPlayground.ApplyLocationUtilization)},on:{\"change\":[function($event){var $$a=_vm.yieldSettingsPlayground.ApplyLocationUtilization,$$el=$event.target,$$c=$$el.checked?(true):(false);if(Array.isArray($$a)){var $$v=null,$$i=_vm._i($$a,$$v);if($$el.checked){$$i<0&&(_vm.$set(_vm.yieldSettingsPlayground, \"ApplyLocationUtilization\", $$a.concat([$$v])))}else{$$i>-1&&(_vm.$set(_vm.yieldSettingsPlayground, \"ApplyLocationUtilization\", $$a.slice(0,$$i).concat($$a.slice($$i+1))))}}else{_vm.$set(_vm.yieldSettingsPlayground, \"ApplyLocationUtilization\", $$c)}},_vm.updateYieldPlayground]}}),_vm._v(\" \"+_vm._s(_vm.$t(`Components.Settings.Yield.YieldPlaygroundSettings.TableHeader_LocationUtilization`))+\" \")])]),_c('div',{staticClass:\"column has-text-right\"},[_c('span',[_c('a',{on:{\"click\":_vm.setShowInfo}},[_c('span',{staticClass:\"icon\"},[_c('font-awesome-icon',{attrs:{\"icon\":['fas', 'info-circle']}})],1)])])])]),(_vm.showInfo)?_c('div',{staticClass:\"message is-info mb-4\"},[_c('div',{staticClass:\"message-body\"},[_vm._v(\" \"+_vm._s(_vm.$t(`Components.Settings.Yield.YieldPlaygroundSettings.Message_LocationUtilizationInfo`))+\" \")])]):_vm._e(),(_vm.yieldSettingsPlayground.ApplyLocationUtilization && _vm.mShowBox)?_c('div',[(\n        _vm.yieldSettingsPlayground.ApplyLocationUtilization &&\n          _vm.yieldSettingsPlayground.MeetingtypeId === 1\n      )?_c('table',{staticClass:\"table is-fullwidth is-narrow\"},[_c('tbody',[(_vm.yieldSettingsPlayground.ApplyLocationUtilization)?_c('tr',[_c('td',{attrs:{\"width\":\"6\"}},[_vm._v(\"0%\")]),_c('td',[_c('vue-slider',{attrs:{\"min\":0,\"max\":200,\"enableCross\":false,\"interval\":1,\"tooltip-formatter\":_vm.formatter},on:{\"change\":_vm.updateYieldSettingsLocationUtilizationValues,\"drag-end\":_vm.updateYieldPlayground},model:{value:(_vm.locationUtilizationValues),callback:function ($$v) {_vm.locationUtilizationValues=$$v},expression:\"locationUtilizationValues\"}})],1),_c('td',{attrs:{\"width\":\"6\"}},[_vm._v(\"100%\")])]):_vm._e()])]):_vm._e(),_c('div',{staticClass:\"message is-info\"},[_c('div',{staticClass:\"message-body\"},[_c('div',[_vm._v(\" \"+_vm._s(_vm.$t(`Components.Settings.Yield.EditYieldSettings.Label_NoOccupancyApply`))+\" \"+_vm._s(_vm.roundToZero( _vm.yieldSettingsPlayground.LocationUtilizationBottomValue * 100 - 100 ))+_vm._s(_vm.$t(`Components.Settings.Yield.EditYieldSettings.Label_PercentageDiscount`))+\" \")]),_c('div',[_vm._v(\" \"+_vm._s(_vm.$t(`Components.Settings.Yield.EditYieldSettings.Label_FullOccupancyApply`))+\" \"+_vm._s(_vm.roundToZero( _vm.yieldSettingsPlayground.LocationUtilizationTopValue * 100 - 100 ))+_vm._s(_vm.$t(`Components.Settings.Yield.EditYieldSettings.Label_PercentageSurcharge`))+\" \")])])])]):_vm._e()])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n  <div class=\"box\">\n    <div class=\"columns\">\n      <div class=\"column\">\n        <label class=\"checkbox has-text-weight-bold mb-4\">\n          <input\n            type=\"checkbox\"\n            @change=\"updateYieldPlayground\"\n            v-model=\"yieldSettingsPlayground.ApplyLocationUtilization\"\n          />\n          {{ $t(`Components.Settings.Yield.YieldPlaygroundSettings.TableHeader_LocationUtilization`)}}\n        </label>\n      </div>\n      <div class=\"column has-text-right\">\n        <span>\n          <a @click=\"setShowInfo\">\n            <span class=\"icon\">\n              <font-awesome-icon :icon=\"['fas', 'info-circle']\" />\n            </span>\n          </a>\n        </span>\n      </div>\n    </div>\n\n    <div\n      v-if=\"showInfo\"\n      class=\"message is-info mb-4\"\n    >\n      <div class=\"message-body\">\n        {{ $t(`Components.Settings.Yield.YieldPlaygroundSettings.Message_LocationUtilizationInfo`)}}\n      </div>\n    </div>\n\n    <div v-if=\"yieldSettingsPlayground.ApplyLocationUtilization && mShowBox\">\n      <table\n        v-if=\"\n          yieldSettingsPlayground.ApplyLocationUtilization &&\n            yieldSettingsPlayground.MeetingtypeId === 1\n        \"\n        class=\"table is-fullwidth is-narrow\"\n      >\n        <tbody>\n          <tr v-if=\"yieldSettingsPlayground.ApplyLocationUtilization\">\n            <td width=\"6\">0%</td>\n            <td>\n              <vue-slider\n                v-model=\"locationUtilizationValues\"\n                :min=\"0\"\n                :max=\"200\"\n                :enableCross=\"false\"\n                :interval=\"1\"\n                :tooltip-formatter=\"formatter\"\n                @change=\"updateYieldSettingsLocationUtilizationValues\"\n                @drag-end=\"updateYieldPlayground\"\n              />\n            </td>\n            <td width=\"6\">100%</td>\n          </tr>\n        </tbody>\n      </table>\n\n      <div class=\"message is-info\">\n        <div class=\"message-body\">\n          <div>\n            {{ $t(`Components.Settings.Yield.EditYieldSettings.Label_NoOccupancyApply`)}}\n            {{\n              roundToZero(\n                yieldSettingsPlayground.LocationUtilizationBottomValue * 100 -\n                  100\n              )\n            }}{{ $t(`Components.Settings.Yield.EditYieldSettings.Label_PercentageDiscount`)}}\n          </div>\n          <div>\n            {{ $t(`Components.Settings.Yield.EditYieldSettings.Label_FullOccupancyApply`)}}\n            {{\n              roundToZero(\n                yieldSettingsPlayground.LocationUtilizationTopValue * 100 - 100\n              )\n            }}{{ $t(`Components.Settings.Yield.EditYieldSettings.Label_PercentageSurcharge`)}}\n          </div>\n        </div>\n      </div>\n    </div>\n  </div>\n</template>\n\n<script>\nimport { mapMutations, mapState } from 'vuex'\nimport VueSlider from 'vue-slider-component'\nimport 'vue-slider-component/theme/default.css'\n\nexport default {\n  components: {\n    VueSlider\n  },\n\n  props: {\n    showBox: {\n      type: Boolean,\n      default: true\n    }\n  },\n\n  data() {\n    return {\n      formatter: v => `${v - 100}%`,\n      mShowBox: this.showBox,\n      showInfo: false\n    }\n  },\n\n  computed: {\n    ...mapState('yieldStore', ['yieldSettingsPlayground'])\n  },\n\n  watch: {\n    showBox: {\n      immediate: true,\n      handler: function(newVal, oldVal) {\n        this.mShowBox = newVal\n      }\n    }\n  },\n\n  created() {\n    this.locationUtilizationValues = this.getLocationUtilizationValues()\n  },\n\n  methods: {\n    ...mapMutations('yieldStore', ['setYieldSettingsPlayground']),\n\n    setShowInfo() {\n      this.showInfo = !this.showInfo\n      if (this.showInfo) {\n        this.mShowBox = true\n      }\n    },\n\n    updateYieldPlayground() {\n      this.setYieldSettingsPlayground(this.yieldSettingsPlayground)\n      this.$emit('yieldSettingsUpdated')\n    },\n\n    getLocationUtilizationValues() {\n      return [\n        this.roundToZero(\n          this.yieldSettingsPlayground.LocationUtilizationBottomValue * 100\n        ),\n        this.roundToZero(\n          this.yieldSettingsPlayground.LocationUtilizationTopValue * 100\n        )\n      ]\n    },\n\n    updateYieldSettingsLocationUtilizationValues() {\n      let self = this\n\n      let bottomValue = self.locationUtilizationValues[0] / 100\n      let topValue = self.locationUtilizationValues[1] / 100\n\n      self.yieldSettingsPlayground.LocationUtilizationBottomValue = bottomValue\n      self.yieldSettingsPlayground.LocationUtilizationTopValue = topValue\n    },\n\n    roundToZero(num) {\n      let self = this\n      return +(Math.round(self.roundToTwo(num) + 'e+0') + 'e-0')\n    },\n\n    roundToTwo(num) {\n      return +(Math.round(num + 'e+2') + 'e-2')\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!./YieldSettingsLocationUtilization.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!./YieldSettingsLocationUtilization.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./YieldSettingsLocationUtilization.vue?vue&type=template&id=b1b2f83c\"\nimport script from \"./YieldSettingsLocationUtilization.vue?vue&type=script&lang=js\"\nexport * from \"./YieldSettingsLocationUtilization.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":""}