{"version":3,"sources":["webpack:///src/components/Settings/Yield/Playground/YieldPlayground.vue","webpack:///./src/components/Settings/Yield/Playground/YieldPlayground.vue","webpack:///./src/components/Settings/Yield/Playground/YieldPlayground.vue?8e27","webpack:///./src/components/Settings/Yield/Playground/YieldPlayground.vue?4e1c","webpack:///./src/components/Settings/Yield/Playground/YieldPlayground.vue?b1c5"],"names":["components","PlaygroundSettings","PlaygroundTable","YieldSettingsPrices","YieldSettingsDayPercentage","YieldSettingsGroupSize","YieldSettingsLocationUtilization","YieldSettingsSpaceUtilization","props","activeIndex","type","Number","default","data","isLoading","endMinutes","formatter","v","concat","locationId","$route","params","locationUtilizationValues","nrOfDayParts","minSeats","maxSeats","percentages","playground","selectedSpace","showAllSettings","space","spaceConfiguration","MinSeats","MaxSeats","spaceUtilizationValues","startMinutes","timeSlots","yieldSettingsOriginal","computed","_objectSpread","mapState","watch","immediate","handler","newVal","oldVal","buildYieldPlayground","created","cleanSource","yieldSettingsPlayground","calculateMinMaxSeats","SpaceId","getSpaceData","beforeDestroy","setYieldSettingsPlayground","methods","mapMutations","self","spaceProvider","getSpaceById","then","response","status","min","max","spaceMin","spaceMax","i","Settings","filter","s","IsPublic","length","setting","MeetingtypeId","yieldSettingsUpdated","$emit","showResults","settings","_this","yieldProvider","builYieldPlayground","finally","resetValues","startBlank","dayPercentages","DayPercentages","Percentage","ys","JSON","parse","stringify","ApplyDayPercentage","ApplyGroupSize","ApplyLocationUtilization","ApplySpacePercentage","ApplySpaceUtilization","GroupSizes","LocationUtilizationBottomValue","LocationUtilizationCalculationType","LocationUtilizationDefaultHours","LocationUtilizationTopValue","PriceParts","SpaceUtilizationBottomValue","SpaceUtilizationTopValue","render","_vm","_c","_self","staticClass","attrs","on","showAveragePrice","click","icon","_v","_s","$t","showBox","_e","staticRenderFns","_withStripped"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyFA;AACA;AACA;AACA;AAEe;EACfA,UAAA;IACAC,k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nG,gBAAgB,mHAAU;AAC1B,EAAE,4FAAM;AACR,EAAE,iGAAM;AACR,EAAE,0GAAe;AACjB;AACA;AACA;AACA;;AAEA;;AAEA;AACA,IAAI,KAAU,EAAE,YAiBf;AACD;AACe,gF;;;;;;;;;;;;;ACtCf;AAA+T,CAAgB,iVAAG,EAAC,C;;;;;;;;;;;;;ACAnV;AAAA;AAAA;AAAA;AAAA","file":"js/150.js?id=caa3b34c73834d6bc48d","sourcesContent":["<template>\n  <div\n    v-if=\"yieldSettingsPlayground\"\n    class=\"columns\"\n  >\n    <!-- MAIN COLUMN -->\n    <div class=\"column\">\n      <PlaygroundSettings\n        @showResults=\"showResults\"\n        :isLoading=\"isLoading\"\n        :minSeats=\"minSeats\"\n        :maxSeats=\"maxSeats\"\n      />\n\n      <div class=\"is-divider\"></div>\n\n      <PlaygroundTable\n        :showAveragePrice=\"!yieldSettingsPlayground.ApplyLocationUtilization\"\n        :playground=\"playground\"\n      />\n    </div>\n\n    <!-- RIGHT COLUMN -->\n    <div class=\"column is-one-third\">\n      <div class=\"field is-grouped is-grouped-right mb-2\">\n        <p class=\"control\">\n          <a\n            @click=\"startBlank\"\n            class=\"has-icon has-text-link\"\n          >\n            <span class=\"icon is-small\">\n              <font-awesome-icon :icon=\"['fas', 'file']\" />\n            </span>\n            <span>{{\n            $t(`Components.Settings.Yield.YieldPlayground.Button_StartBlank`)\n          }}</span>\n          </a>\n        </p>\n        <p class=\"control\">\n          <a\n            @click=\"resetValues\"\n            class=\"has-icon has-text-link\"\n          >\n            <span class=\"icon is-small\">\n              <font-awesome-icon :icon=\"['fas', 'undo']\" />\n            </span>\n            <span>{{\n            $t(`Components.Settings.Yield.YieldPlayground.Button_ResetValues`)\n          }}</span>\n          </a>\n        </p>\n      </div>\n\n      <!-- PRICES -->\n      <YieldSettingsPrices\n        :showBox=\"showAllSettings\"\n        @yieldSettingsUpdated=\"yieldSettingsUpdated\"\n      />\n\n      <!-- LOCATION UTILIZATION SETTINGS -->\n      <YieldSettingsLocationUtilization\n        :showBox=\"showAllSettings\"\n        @yieldSettingsUpdated=\"yieldSettingsUpdated\"\n      />\n\n      <!-- SPACE UTILIZATION SETTINGS -->\n      <YieldSettingsSpaceUtilization\n        v-if=\"yieldSettingsPlayground.MeetingtypeId === 1\"\n        :showBox=\"showAllSettings\"\n        @yieldSettingsUpdated=\"yieldSettingsUpdated\"\n      />\n\n      <!-- DAY PERCENTAGES SETTINGS -->\n      <YieldSettingsDayPercentage\n        :showBox=\"showAllSettings\"\n        @yieldSettingsUpdated=\"yieldSettingsUpdated\"\n      />\n\n      <!-- GROUP SIZE SETTINGS -->\n      <YieldSettingsGroupSize\n        v-if=\"yieldSettingsPlayground.MeetingtypeId === 1\"\n        :showBox=\"showAllSettings\"\n        @yieldSettingsUpdated=\"yieldSettingsUpdated\"\n      />\n    </div>\n  </div>\n</template>\n\n<script>\nimport { mapMutations, mapState } from 'vuex'\nimport spaceProvider from '@/providers/space'\nimport yieldProvider from '@/providers/yield'\nimport { cleanSource } from '@/utils/objectHelper'\n\nexport default {\n  components: {\n    PlaygroundSettings: () => import('@/components/Settings/Yield/Playground/PlaygroundSettings'),\n    PlaygroundTable: () => import('@/components/Settings/Yield/Playground/PlaygroundTable'),\n    YieldSettingsPrices: () => import('@/components/Settings/Yield/Playground/YieldSettingsPrices'),\n    YieldSettingsDayPercentage: () => import('@/components/Settings/Yield/Playground/YieldSettingsDayPercentage'),\n    YieldSettingsGroupSize: () => import('@/components/Settings/Yield/Playground/YieldSettingsGroupSize'),\n    YieldSettingsLocationUtilization: () => import('@/components/Settings/Yield/Playground/YieldSettingsLocationUtilization'),\n    YieldSettingsSpaceUtilization: () => import('@/components/Settings/Yield/Playground/YieldSettingsSpaceUtilization'),\n  },\n\n  props: {\n    activeIndex: {\n      type: Number,\n      default: 0,\n    },\n  },\n\n  data() {\n    return {\n      isLoading: false,\n      endMinutes: 1020,\n      formatter: (v) => `${v - 100}%`,\n      locationId: Number(this.$route.params.locationId),\n      locationUtilizationValues: [],\n      nrOfDayParts: 8,\n      minSeats: 1,\n      maxSeats: 1,\n      percentages: [0, 25, 50, 75, 100],\n      playground: null,\n      selectedSpace: null,\n      showAllSettings: true,\n      space: null,\n      spaceConfiguration: { MinSeats: 1, MaxSeats: 20 },\n      spaceUtilizationValues: [],\n      startMinutes: 540,\n      timeSlots: [],\n      yieldSettingsOriginal: null,\n    }\n  },\n\n  computed: {\n    ...mapState('yieldStore', ['yieldSettingsPlayground']),\n  },\n\n  watch: {\n    activeIndex: {\n      immediate: true,\n      handler: function(newVal, oldVal) {\n        if (newVal !== oldVal) {\n          this.buildYieldPlayground()\n        }\n      },\n    },\n  },\n\n  created() {\n    this.yieldSettingsOriginal = cleanSource(this.yieldSettingsPlayground);\n    this.calculateMinMaxSeats();\n\n    if (this.yieldSettingsPlayground.SpaceId > 0) {\n      this.getSpaceData();\n    }\n  },\n\n  beforeDestroy() {\n    this.setYieldSettingsPlayground(null)\n  },\n\n  methods: {\n    ...mapMutations('yieldStore', ['setYieldSettingsPlayground']),\n\n    getSpaceData() {\n      let self = this\n      spaceProvider.methods\n        .getSpaceById(self.yieldSettingsPlayground.SpaceId)\n        .then((response) => {\n          if (response.status === 200) {\n            self.space = response.data\n\n            self.calculateMinMaxSeats()\n          }\n        })\n    },\n\n    calculateMinMaxSeats() {\n      let min = 1\n      let max = 1\n\n      if (this.space) {\n        let spaceMin = 9999\n        let spaceMax = 0\n\n        for (\n          let i = 0;\n          i < this.space.Settings.filter((s) => s.IsPublic).length;\n          i++\n        ) {\n          let setting = this.space.Settings[i]\n\n          if (setting.MinSeats < spaceMin) {\n            spaceMin = setting.MinSeats\n          }\n\n          if (setting.MaxSeats > spaceMax) {\n            spaceMax = setting.MaxSeats\n          }\n        }\n\n        min = spaceMin\n        max = spaceMax\n      } else {\n        max = this.yieldSettingsPlayground.MeetingtypeId === 1 ? 20 : 1\n      }\n\n      this.minSeats = min\n      this.maxSeats = max\n\n      this.buildYieldPlayground()\n    },\n\n    yieldSettingsUpdated() {\n      this.buildYieldPlayground()\n      this.$emit('yieldSettingsUpdated', this.yieldSettingsPlayground)\n    },\n\n    showResults(settings) {\n      this.percentages = settings.percentages\n      this.minSeats = settings.minSeats\n      this.maxSeats = settings.maxSeats\n      this.nrOfDayParts = settings.nrOfDayParts\n      this.buildYieldPlayground()\n    },\n\n    buildYieldPlayground() {\n      // if (this.isLoading) {\n      //   return\n      // }\n\n      this.isLoading = true\n\n      yieldProvider.methods\n        .builYieldPlayground(\n          this.locationId,\n          this.minSeats,\n          this.maxSeats,\n          this.nrOfDayParts,\n          this.yieldSettingsPlayground,\n          this.percentages\n        )\n        .then((response) => {\n          if (response.status === 200) {\n            this.playground = response.data\n          }\n        })\n        .finally(() => {\n          this.isLoading = false\n        })\n    },\n\n    resetValues() {\n      this.setYieldSettingsPlayground(this.yieldSettingsOriginal)\n      this.$emit('yieldSettingsUpdated', this.yieldSettingsPlayground)\n\n      this.buildYieldPlayground()\n    },\n\n    startBlank() {\n      let dayPercentages = this.yieldSettingsPlayground.DayPercentages\n      for (let i = 0; i < dayPercentages.length; i++) {\n        dayPercentages[i].Percentage = 0\n      }\n\n      let ys = JSON.parse(JSON.stringify(this.yieldSettingsPlayground))\n      ys.ApplyDayPercentage = false\n      ys.ApplyGroupSize = false\n      ys.ApplyLocationUtilization = false\n      ys.ApplySpacePercentage = false\n      ys.ApplySpaceUtilization = false\n      ys.DayPercentages = dayPercentages\n      ys.GroupSizes = []\n      ys.LocationUtilizationBottomValue = 1\n      ys.LocationUtilizationCalculationType = 0\n      ys.LocationUtilizationDefaultHours = 8\n      ys.LocationUtilizationTopValue = 1\n      ys.PriceParts = []\n      ys.SpaceUtilizationBottomValue = 1\n      ys.SpaceUtilizationTopValue = 1\n\n      this.setYieldSettingsPlayground(ys)\n      this.$emit('yieldSettingsUpdated', ys)\n\n      this.buildYieldPlayground()\n    },\n  },\n}\n</script>\n\n<style></style>\n","var render = function render() {\n  var _vm = this,\n    _c = _vm._self._c\n  return _vm.yieldSettingsPlayground\n    ? _c(\"div\", { staticClass: \"columns\" }, [\n        _c(\n          \"div\",\n          { staticClass: \"column\" },\n          [\n            _c(\"PlaygroundSettings\", {\n              attrs: {\n                isLoading: _vm.isLoading,\n                minSeats: _vm.minSeats,\n                maxSeats: _vm.maxSeats,\n              },\n              on: { showResults: _vm.showResults },\n            }),\n            _c(\"div\", { staticClass: \"is-divider\" }),\n            _c(\"PlaygroundTable\", {\n              attrs: {\n                showAveragePrice:\n                  !_vm.yieldSettingsPlayground.ApplyLocationUtilization,\n                playground: _vm.playground,\n              },\n            }),\n          ],\n          1\n        ),\n        _c(\n          \"div\",\n          { staticClass: \"column is-one-third\" },\n          [\n            _c(\n              \"div\",\n              { staticClass: \"field is-grouped is-grouped-right mb-2\" },\n              [\n                _c(\"p\", { staticClass: \"control\" }, [\n                  _c(\n                    \"a\",\n                    {\n                      staticClass: \"has-icon has-text-link\",\n                      on: { click: _vm.startBlank },\n                    },\n                    [\n                      _c(\n                        \"span\",\n                        { staticClass: \"icon is-small\" },\n                        [\n                          _c(\"font-awesome-icon\", {\n                            attrs: { icon: [\"fas\", \"file\"] },\n                          }),\n                        ],\n                        1\n                      ),\n                      _c(\"span\", [\n                        _vm._v(\n                          _vm._s(\n                            _vm.$t(\n                              `Components.Settings.Yield.YieldPlayground.Button_StartBlank`\n                            )\n                          )\n                        ),\n                      ]),\n                    ]\n                  ),\n                ]),\n                _c(\"p\", { staticClass: \"control\" }, [\n                  _c(\n                    \"a\",\n                    {\n                      staticClass: \"has-icon has-text-link\",\n                      on: { click: _vm.resetValues },\n                    },\n                    [\n                      _c(\n                        \"span\",\n                        { staticClass: \"icon is-small\" },\n                        [\n                          _c(\"font-awesome-icon\", {\n                            attrs: { icon: [\"fas\", \"undo\"] },\n                          }),\n                        ],\n                        1\n                      ),\n                      _c(\"span\", [\n                        _vm._v(\n                          _vm._s(\n                            _vm.$t(\n                              `Components.Settings.Yield.YieldPlayground.Button_ResetValues`\n                            )\n                          )\n                        ),\n                      ]),\n                    ]\n                  ),\n                ]),\n              ]\n            ),\n            _c(\"YieldSettingsPrices\", {\n              attrs: { showBox: _vm.showAllSettings },\n              on: { yieldSettingsUpdated: _vm.yieldSettingsUpdated },\n            }),\n            _c(\"YieldSettingsLocationUtilization\", {\n              attrs: { showBox: _vm.showAllSettings },\n              on: { yieldSettingsUpdated: _vm.yieldSettingsUpdated },\n            }),\n            _vm.yieldSettingsPlayground.MeetingtypeId === 1\n              ? _c(\"YieldSettingsSpaceUtilization\", {\n                  attrs: { showBox: _vm.showAllSettings },\n                  on: { yieldSettingsUpdated: _vm.yieldSettingsUpdated },\n                })\n              : _vm._e(),\n            _c(\"YieldSettingsDayPercentage\", {\n              attrs: { showBox: _vm.showAllSettings },\n              on: { yieldSettingsUpdated: _vm.yieldSettingsUpdated },\n            }),\n            _vm.yieldSettingsPlayground.MeetingtypeId === 1\n              ? _c(\"YieldSettingsGroupSize\", {\n                  attrs: { showBox: _vm.showAllSettings },\n                  on: { yieldSettingsUpdated: _vm.yieldSettingsUpdated },\n                })\n              : _vm._e(),\n          ],\n          1\n        ),\n      ])\n    : _vm._e()\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","import { render, staticRenderFns } from \"./YieldPlayground.vue?vue&type=template&id=a93607bc\"\nimport script from \"./YieldPlayground.vue?vue&type=script&lang=js\"\nexport * from \"./YieldPlayground.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('a93607bc')) {\n      api.createRecord('a93607bc', component.options)\n    } else {\n      api.reload('a93607bc', component.options)\n    }\n    module.hot.accept(\"./YieldPlayground.vue?vue&type=template&id=a93607bc\", function () {\n      api.rerender('a93607bc', {\n        render: render,\n        staticRenderFns: staticRenderFns\n      })\n    })\n  }\n}\ncomponent.options.__file = \"src/components/Settings/Yield/Playground/YieldPlayground.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!./YieldPlayground.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!./YieldPlayground.vue?vue&type=script&lang=js\"","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!./YieldPlayground.vue?vue&type=template&id=a93607bc\""],"sourceRoot":""}