{"version":3,"sources":["webpack:///./src/eventbus/event-bus.js","webpack:///./src/components/Terms/ModalEditCancelRules.vue?12d7","webpack:///./src/components/Terms/ModalEditCancelRules.vue","webpack:///src/components/Terms/ModalEditCancelRules.vue","webpack:///./src/components/Terms/ModalEditCancelRules.vue?52f7","webpack:///./src/components/Terms/ModalEditCancelRules.vue?c1b9"],"names":["EventBus","Vue","render","_vm","this","_c","_self","attrs","$t","isSaving","isSavingSuccess","isSavingError","onClickCancel","save","showModal","on","scopedSlots","_u","key","fn","staticClass","_l","locationState","Meetingtypes","meetingType","MeetingtypeId","class","selectedMeetingtypeId","$event","setSelectedMeetingtypeId","_v","_s","_f","UtiliseGroupSize","setGroupSize","_e","tag","enter","leave","groupSizes","groupSize","index","Id","selectedGroupSizeId","directives","name","rawName","value","MinSeats","expression","staticStyle","domProps","target","composing","$set","MaxSeats","setSelectedGroupSize","deleteGroupSize","addGroupSize","selectedGroupSize","concat","showMessageNoRules","filteredBookingTerm","cancelRule","HoursUntilStart","Percentage","deleteCancelRule","addCancelRule","proxy","slot","staticRenderFns","components","props","type","Boolean","default","Function","required","bookingTerm","Object","data","selectedMeetingtype","mBookingTerm","originalBookingTerm","computed","_objectSpread","mapState","_this","typeIndex","CancelRules","findIndex","rule","length","result","_this2","filter","created","_this3","JSON","parse","stringify","map","Math","floor","push","self","t","size","methods","$objectHelper","cleanSource","termsProvider","updateBookingTerm","then","response","status","setTimeout","$emit","clearTimeout","catch","error","finally","meetingtypeId","meetingtypeIndex","m","ruleIndex","delete","groupIndex","group","trueOrFalse","component"],"mappings":"oJAAA,kDACaA,EAAW,IAAIC,aAEbD,U,oCCHf,W,yDCAIE,EAAS,WAAkB,IAAIC,EAAIC,KAAKC,EAAGF,EAAIG,MAAMD,GAAG,OAAOA,EAAG,qBAAqB,CAACE,MAAM,CAAC,WAAaJ,EAAIK,GAAG,oDAAoD,UAAY,QAAQ,SAAWL,EAAIM,SAAS,gBAAkBN,EAAIO,gBAAgB,cAAgBP,EAAI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kBAAA,MAEA,KAAA1B,mBACA,SAAAkD,oBAAAM,YAAA,GAAAlC,SAIA,KAAAtB,kBACA,KAAAkD,oBAAAM,YAAA,GAAAlC,UAAA,GAEA,KAAA2B,aAAAG,eAAA,QAAAF,qBACA,KAAAxB,kBAAA,KAAApB,WAAA,IAEA,KAAAN,mBACA,SAAAkD,oBAAAM,YAAA,GAAAlC,WAEA,KAAA2B,aAAAO,YAAA,GACA,KAAA9B,kBAAA,MAZA,KAAAuB,aAAAG,eAAA,QAAAF,uBAiBA3B,qBAAA,SAAAhB,GACA,KAAAmB,kBAAAnB,KC1hB4W,I,wBCQxW0F,EAAY,eACd,EACAhI,EACAoE,GACA,EACA,KACA,WACA,MAIa,aAAA4D,E","file":"js/chunk-c36eaa64.js?id=faf239b83f76d4bd38f1","sourcesContent":["import Vue from 'vue'\nexport const EventBus = new Vue()\n\nexport default EventBus\n","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.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!./ModalEditCancelRules.vue?vue&type=style&index=0&id=4c51b3fe&prod&lang=scss&scoped=true\"","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('ui-component-modal',{attrs:{\"modalTitle\":_vm.$t('Components.Terms.ModalEditCancelRules.Main_Title'),\"modalSize\":\"large\",\"isSaving\":_vm.isSaving,\"isSavingSuccess\":_vm.isSavingSuccess,\"isSavingError\":_vm.isSavingError,\"hideFooterButtons\":_vm.isSavingError || _vm.isSavingSuccess,\"onClickCancel\":_vm.onClickCancel,\"onClickSave\":_vm.save,\"showModal\":_vm.showModal},on:{\"closeModal\":_vm.onClickCancel},scopedSlots:_vm._u([{key:\"content\",fn:function(){return [_c('div',{staticClass:\"tabs is-boxed\"},[_c('ul',_vm._l((_vm.locationState.Meetingtypes),function(meetingType){return _c('li',{key:meetingType.MeetingtypeId,class:{\n            'is-active': meetingType.MeetingtypeId === _vm.selectedMeetingtypeId,\n          },on:{\"click\":function($event){return _vm.setSelectedMeetingtypeId(meetingType.MeetingtypeId)}}},[_c('a',[_vm._v(_vm._s(_vm._f(\"getMeetingtypeName\")(meetingType.MeetingtypeId)))])])}),0)]),(_vm.selectedMeetingtypeId !== 2)?_c('div',{staticClass:\"row is-flex is-align-items-center mb-6\"},[_c('div',{staticClass:\"has-text-weight-bold mr-2\"},[_vm._v(\" \"+_vm._s(_vm.$t('Components.Terms.ModalEditCancelRules.Label_GroupSize'))+\" \")]),_c('div',{staticClass:\"tabs is-small is-toggle\"},[_c('ul',[_c('li',{class:{ 'is-active': _vm.UtiliseGroupSize }},[_c('a',{on:{\"click\":function($event){return _vm.setGroupSize(true)}}},[_c('span',[_vm._v(_vm._s(_vm.$t('Form.Control.Yes')))])])]),_c('li',{class:{ 'is-active': !_vm.UtiliseGroupSize }},[_c('a',{on:{\"click\":function($event){return _vm.setGroupSize(false)}}},[_c('span',[_vm._v(_vm._s(_vm.$t('Form.Control.No')))])])])])])]):_vm._e(),_c('div',{staticClass:\"columns\"},[(_vm.UtiliseGroupSize)?_c('div',{staticClass:\"column is-half has-padding\"},[_c('p',{staticClass:\"subtitle is-size-4\"},[_vm._v(\" \"+_vm._s(_vm.$t('Components.Terms.ModalEditCancelRules.CardTitle_GroupSize'))+\" \")]),_c('div',{staticClass:\"card\"},[_c('div',{staticClass:\"card-content\"},[_c('table',{staticClass:\"table is-fullwidth\"},[_c('thead',[_c('tr',[_c('th',[_vm._v(\" \"+_vm._s(_vm.$t( 'Components.Terms.ModalEditCancelRules.TableHeader_MinSeats' ))+\" \")]),_c('th',[_vm._v(\" \"+_vm._s(_vm.$t( 'Components.Terms.ModalEditCancelRules.TableHeader_MaxSeats' ))+\" \")]),_c('th')])]),_c(\"transition-group\",{tag:\"tbody\",attrs:{\"name\":\"fade\",\"mode\":\"out-in\",\"duration\":{ enter: 300, leave: 300 }}},_vm._l((_vm.groupSizes),function(groupSize,index){return _c('tr',{key:index,class:{\n                  'has-background-link is-selected':\n                    groupSize.Id === _vm.selectedGroupSizeId,\n                }},[_c('td',[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(groupSize.MinSeats),expression:\"groupSize.MinSeats\"}],staticClass:\"input is-small\",staticStyle:{\"width\":\"100px\"},attrs:{\"type\":\"text\"},domProps:{\"value\":(groupSize.MinSeats)},on:{\"input\":function($event){if($event.target.composing)return;_vm.$set(groupSize, \"MinSeats\", $event.target.value)}}})]),_c('td',[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(groupSize.MaxSeats),expression:\"groupSize.MaxSeats\"}],staticClass:\"input is-small\",staticStyle:{\"width\":\"100px\"},attrs:{\"type\":\"text\"},domProps:{\"value\":(groupSize.MaxSeats)},on:{\"input\":function($event){if($event.target.composing)return;_vm.$set(groupSize, \"MaxSeats\", $event.target.value)}}})]),_c('td',[_c('a',{staticClass:\"button is-small is-info is-outlined mr-2\",on:{\"click\":function($event){return _vm.setSelectedGroupSize(groupSize)}}},[_vm._v(\" \"+_vm._s(_vm.$t( 'Components.Terms.ModalEditCancelRules.Button_ShowRules' ))+\" \")]),_c('a',{on:{\"click\":function($event){return _vm.deleteGroupSize(groupSize)}}},[_c('span',{staticClass:\"icon\"},[_c('font-awesome-icon',{staticStyle:{\"color\":\"red\"},attrs:{\"icon\":['fas', 'trash-alt']}})],1)])])])}),0),_c('tfoot',[_c('tr',[_c('td',{attrs:{\"colspan\":\"6\"}},[_c('a',{staticClass:\"button is-small is-primary\",on:{\"click\":_vm.addGroupSize}},[_vm._v(\" \"+_vm._s(_vm.$t( 'Components.Terms.ModalEditCancelRules.Button_AddGroupSize' ))+\" \")])])])])],1)])])]):_vm._e(),_c('div',{class:[\n        !_vm.UtiliseGroupSize ? 'column is-full' : 'column is-half',\n        'has-padding',\n      ]},[_c('p',{staticClass:\"subtitle is-size-4\"},[_vm._v(\" \"+_vm._s(_vm.$t('Components.Terms.ModalEditCancelRules.CardTitle_CancelRules'))+\" \"),(_vm.selectedGroupSize && _vm.UtiliseGroupSize)?_c('span',{staticClass:\"subtile is-size-6 ml-1\"},[_c('em',[_vm._v(_vm._s(_vm.$t('Components.Terms.ModalEditCancelRules.Text_ForGroupSize'))+\" \"+_vm._s(`${_vm.selectedGroupSize.MinSeats} - ${_vm.selectedGroupSize.MaxSeats}`))])]):_vm._e()]),_c('div',{staticClass:\"card\"},[_c('div',{staticClass:\"card-content\"},[_c('table',{staticClass:\"table is-fullwidth is-striped is-hoverable\"},[_c('thead',[_c('tr',[_c('th',[_vm._v(\" \"+_vm._s(_vm.$t( 'Components.Terms.ModalEditCancelRules.TableHeader_DaysTillBooking' ))+\" \")]),_c('th',[_vm._v(\" \"+_vm._s(_vm.$t( 'Components.Terms.ModalEditCancelRules.TableHeader_Percentage' ))+\" \")]),_c('th')])]),_c(\"transition-group\",{tag:\"tbody\",attrs:{\"name\":\"fade\",\"mode\":\"out-in\",\"duration\":{ enter: 300, leave: 300 }}},[(_vm.showMessageNoRules)?_c('tr',{key:\"NoConfig\"},[_c('td',{attrs:{\"colspan\":\"6\"}},[_c('article',{staticClass:\"message is-warning mb-2 mt-2\"},[_c('div',{staticClass:\"message-body\"},[_vm._v(\" \"+_vm._s(_vm.$t( 'Components.Terms.ModalEditCancelRules.Message_Warning' ))+\" \")])])])]):_vm._e(),_vm._l((_vm.filteredBookingTerm),function(cancelRule,index){return _c('tr',{key:index},[(cancelRule.MeetingtypeId === _vm.selectedMeetingtypeId)?_c('td',[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(cancelRule.HoursUntilStart),expression:\"cancelRule.HoursUntilStart\"}],staticClass:\"input is-small\",staticStyle:{\"width\":\"100px\"},attrs:{\"type\":\"text\"},domProps:{\"value\":(cancelRule.HoursUntilStart)},on:{\"input\":function($event){if($event.target.composing)return;_vm.$set(cancelRule, \"HoursUntilStart\", $event.target.value)}}})]):_vm._e(),(cancelRule.MeetingtypeId === _vm.selectedMeetingtypeId)?_c('td',[_c('div',{staticClass:\"field has-addons\"},[_c('p',{staticClass:\"control\"},[_c('input',{directives:[{name:\"model\",rawName:\"v-model\",value:(cancelRule.Percentage),expression:\"cancelRule.Percentage\"}],staticClass:\"input is-small\",staticStyle:{\"width\":\"75px\"},attrs:{\"type\":\"text\"},domProps:{\"value\":(cancelRule.Percentage)},on:{\"input\":function($event){if($event.target.composing)return;_vm.$set(cancelRule, \"Percentage\", $event.target.value)}}})]),_c('p',{staticClass:\"control\"},[_c('a',{staticClass:\"button is-small is-static\"},[_vm._v(\"%\")])])])]):_vm._e(),(cancelRule.MeetingtypeId === _vm.selectedMeetingtypeId)?_c('td',[_c('a',{on:{\"click\":function($event){return _vm.deleteCancelRule(cancelRule)}}},[_c('span',{staticClass:\"icon\"},[_c('font-awesome-icon',{staticStyle:{\"color\":\"red\"},attrs:{\"icon\":['fas', 'trash-alt']}})],1)])]):_vm._e()])})],2),_c('tfoot',[_c('tr',[_c('td',{attrs:{\"colspan\":\"6\"}},[_c('a',{staticClass:\"button is-small is-primary\",on:{\"click\":_vm.addCancelRule}},[_vm._v(\" \"+_vm._s(_vm.$t( 'Components.Terms.ModalEditCancelRules.Button_AddRule' ))+\" \")])])])])],1)])])])])]},proxy:true}])},[_c('template',{slot:\"modalTitle\"})],2)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n  <ui-component-modal\n    :modalTitle=\"$t('Components.Terms.ModalEditCancelRules.Main_Title')\"\n    modalSize=\"large\"\n    :isSaving=\"isSaving\"\n    :isSavingSuccess=\"isSavingSuccess\"\n    :isSavingError=\"isSavingError\"\n    :hideFooterButtons=\"isSavingError || isSavingSuccess\"\n    :onClickCancel=\"onClickCancel\"\n    :onClickSave=\"save\"\n    :showModal=\"showModal\"\n    @closeModal=\"onClickCancel\"\n  >\n    <template slot=\"modalTitle\"></template>\n    <template v-slot:content>\n      <div class=\"tabs is-boxed\">\n        <ul>\n          <li\n            v-for=\"meetingType in locationState.Meetingtypes\"\n            @click=\"setSelectedMeetingtypeId(meetingType.MeetingtypeId)\"\n            :class=\"{\n              'is-active': meetingType.MeetingtypeId === selectedMeetingtypeId,\n            }\"\n            :key=\"meetingType.MeetingtypeId\"\n          >\n            <a>{{ meetingType.MeetingtypeId | getMeetingtypeName }}</a>\n          </li>\n        </ul>\n      </div>\n\n      <div\n        v-if=\"selectedMeetingtypeId !== 2\"\n        class=\"row is-flex is-align-items-center mb-6\"\n      >\n        <div class=\"has-text-weight-bold mr-2\">\n          {{ $t('Components.Terms.ModalEditCancelRules.Label_GroupSize') }}\n        </div>\n        <div class=\"tabs is-small is-toggle\">\n          <ul>\n            <li :class=\"{ 'is-active': UtiliseGroupSize }\">\n              <a @click=\"setGroupSize(true)\">\n                <span>{{ $t('Form.Control.Yes') }}</span>\n              </a>\n            </li>\n            <li :class=\"{ 'is-active': !UtiliseGroupSize }\">\n              <a @click=\"setGroupSize(false)\">\n                <span>{{ $t('Form.Control.No') }}</span>\n              </a>\n            </li>\n          </ul>\n        </div>\n      </div>\n\n      <div class=\"columns\">\n        <div\n          class=\"column is-half has-padding\"\n          v-if=\"UtiliseGroupSize\"\n        >\n          <p class=\"subtitle is-size-4\">\n            {{\n              $t('Components.Terms.ModalEditCancelRules.CardTitle_GroupSize')\n            }}\n          </p>\n          <div class=\"card\">\n            <div class=\"card-content\">\n              <table class=\"table is-fullwidth\">\n                <thead>\n                  <tr>\n                    <th>\n                      {{\n                        $t(\n                          'Components.Terms.ModalEditCancelRules.TableHeader_MinSeats'\n                        )\n                      }}\n                    </th>\n                    <th>\n                      {{\n                        $t(\n                          'Components.Terms.ModalEditCancelRules.TableHeader_MaxSeats'\n                        )\n                      }}\n                    </th>\n                    <th></th>\n                  </tr>\n                </thead>\n                <tbody\n                  name=\"fade\"\n                  is=\"transition-group\"\n                  mode=\"out-in\"\n                  :duration=\"{ enter: 300, leave: 300 }\"\n                >\n                  <tr\n                    v-for=\"(groupSize, index) in groupSizes\"\n                    :key=\"index\"\n                    :class=\"{\n                    'has-background-link is-selected':\n                      groupSize.Id === selectedGroupSizeId,\n                  }\"\n                  >\n                    <td>\n                      <input\n                        style=\"width: 100px\"\n                        type=\"text\"\n                        class=\"input is-small\"\n                        v-model=\"groupSize.MinSeats\"\n                      />\n                    </td>\n                    <td>\n                      <input\n                        style=\"width: 100px\"\n                        type=\"text\"\n                        class=\"input is-small\"\n                        v-model=\"groupSize.MaxSeats\"\n                      />\n                    </td>\n                    <td>\n                      <a\n                        class=\"button is-small is-info is-outlined mr-2\"\n                        @click=\"setSelectedGroupSize(groupSize)\"\n                      >\n                        {{\n                          $t(\n                            'Components.Terms.ModalEditCancelRules.Button_ShowRules'\n                          )\n                        }}\n                      </a>\n\n                      <a @click=\"deleteGroupSize(groupSize)\">\n                        <span class=\"icon\">\n                          <font-awesome-icon\n                            :icon=\"['fas', 'trash-alt']\"\n                            style=\"color: red\"\n                          />\n                        </span>\n                      </a>\n                    </td>\n                  </tr>\n                </tbody>\n                <tfoot>\n                  <tr>\n                    <td colspan=\"6\">\n                      <a\n                        @click=\"addGroupSize\"\n                        class=\"button is-small is-primary\"\n                      >\n                        {{\n                          $t(\n                            'Components.Terms.ModalEditCancelRules.Button_AddGroupSize'\n                          )\n                        }}\n                      </a>\n                    </td>\n                  </tr>\n                </tfoot>\n              </table>\n            </div>\n          </div>\n        </div>\n\n        <div :class=\"[\n          !UtiliseGroupSize ? 'column is-full' : 'column is-half',\n          'has-padding',\n        ]\">\n          <p class=\"subtitle is-size-4\">\n            {{\n              $t('Components.Terms.ModalEditCancelRules.CardTitle_CancelRules')\n            }}\n            <span\n              v-if=\"selectedGroupSize && UtiliseGroupSize\"\n              class=\"subtile is-size-6 ml-1\"\n            >\n              <em>{{\n                $t('Components.Terms.ModalEditCancelRules.Text_ForGroupSize')\n              }}\n                {{\n                  `${selectedGroupSize.MinSeats} - ${selectedGroupSize.MaxSeats}`\n                }}</em>\n            </span>\n          </p>\n          <div class=\"card\">\n            <div class=\"card-content\">\n              <table class=\"table is-fullwidth is-striped is-hoverable\">\n                <thead>\n                  <tr>\n                    <th>\n                      {{\n                        $t(\n                          'Components.Terms.ModalEditCancelRules.TableHeader_DaysTillBooking'\n                        )\n                      }}\n                    </th>\n                    <th>\n                      {{\n                        $t(\n                          'Components.Terms.ModalEditCancelRules.TableHeader_Percentage'\n                        )\n                      }}\n                    </th>\n                    <th></th>\n                  </tr>\n                </thead>\n                <tbody\n                  name=\"fade\"\n                  is=\"transition-group\"\n                  mode=\"out-in\"\n                  :duration=\"{ enter: 300, leave: 300 }\"\n                >\n                  <tr\n                    v-if=\"showMessageNoRules\"\n                    key=\"NoConfig\"\n                  >\n                    <td colspan=\"6\">\n                      <article class=\"message is-warning mb-2 mt-2\">\n                        <div class=\"message-body\">\n                          {{\n                            $t(\n                              'Components.Terms.ModalEditCancelRules.Message_Warning'\n                            )\n                          }}\n                        </div>\n                      </article>\n                    </td>\n                  </tr>\n                  <tr\n                    v-for=\"(cancelRule, index) in filteredBookingTerm\"\n                    :key=\"index\"\n                  >\n                    <td v-if=\"cancelRule.MeetingtypeId === selectedMeetingtypeId\">\n                      <input\n                        style=\"width: 100px\"\n                        type=\"text\"\n                        class=\"input is-small\"\n                        v-model=\"cancelRule.HoursUntilStart\"\n                      />\n                    </td>\n                    <td v-if=\"cancelRule.MeetingtypeId === selectedMeetingtypeId\">\n                      <div class=\"field has-addons\">\n                        <p class=\"control\">\n                          <input\n                            style=\"width: 75px\"\n                            type=\"text\"\n                            class=\"input is-small\"\n                            v-model=\"cancelRule.Percentage\"\n                          />\n                        </p>\n                        <p class=\"control\">\n                          <a class=\"button is-small is-static\">%</a>\n                        </p>\n                      </div>\n                    </td>\n                    <td v-if=\"cancelRule.MeetingtypeId === selectedMeetingtypeId\">\n                      <a @click=\"deleteCancelRule(cancelRule)\">\n                        <span class=\"icon\">\n                          <font-awesome-icon\n                            :icon=\"['fas', 'trash-alt']\"\n                            style=\"color: red\"\n                          />\n                        </span>\n                      </a>\n                    </td>\n                  </tr>\n                </tbody>\n                <tfoot>\n                  <tr>\n                    <td colspan=\"6\">\n                      <a\n                        @click=\"addCancelRule\"\n                        class=\"button is-small is-primary\"\n                      >\n                        {{\n                          $t(\n                            'Components.Terms.ModalEditCancelRules.Button_AddRule'\n                          )\n                        }}\n                      </a>\n                    </td>\n                  </tr>\n                </tfoot>\n              </table>\n            </div>\n          </div>\n        </div>\n      </div>\n    </template>\n  </ui-component-modal>\n</template>\n\n<script>\nimport Vue from 'vue'\nimport { mapState, mapMutations } from 'vuex'\nimport { EventBus } from '@/eventbus/event-bus'\nimport termsProvider from '@/providers/terms'\n\nexport default {\n  components: {},\n\n  props: {\n    showModal: {\n      type: Boolean,\n      default: false,\n    },\n\n    onClickCancel: {\n      type: Function,\n      required: true,\n    },\n\n    bookingTerm: {\n      type: Object,\n      required: true,\n    },\n  },\n\n  data() {\n    return {\n      isSaving: false,\n      isSavingSuccess: false,\n      isSavingError: false,\n      selectedMeetingtype: null,\n      selectedMeetingtypeId: 1,\n      mBookingTerm: {},\n      originalBookingTerm: {},\n      UtiliseGroupSize: null,\n      groupSizes: [],\n      selectedGroupSize: null,\n    }\n  },\n\n  computed: {\n    ...mapState('locationStore', ['locationState']),\n\n    showMessageNoRules() {\n      let typeIndex = this.mBookingTerm.CancelRules.findIndex(\n        (rule) => rule.MeetingtypeId === this.selectedMeetingtypeId\n      )\n      if (typeIndex === -1 || this.mBookingTerm.CancelRules.length === 0) {\n        return true\n      }\n      return false\n    },\n\n    selectedGroupSizeId() {\n      let result = 0\n\n      if (this.selectedGroupSize) {\n        result = this.selectedGroupSize.Id\n      }\n\n      return result\n    },\n\n    filteredBookingTerm() {\n      let result = this.mBookingTerm\n\n      if (this.selectedGroupSize && this.UtiliseGroupSize) {\n        result = result.CancelRules.filter(\n          (rule) =>\n            rule.MinSeats === this.selectedGroupSize.MinSeats &&\n            rule.MaxSeats === this.selectedGroupSize.MaxSeats\n        )\n        return result\n      } else {\n        return result.CancelRules\n      }\n    },\n  },\n\n  created() {\n    if (this.bookingTerm) {\n      this.mBookingTerm = JSON.parse(JSON.stringify(this.bookingTerm))\n      this.mBookingTerm.CancelRules.map(\n        (rule) => (rule.HoursUntilStart = Math.floor(rule.HoursUntilStart / 24))\n      )\n\n      this.mBookingTerm.CancelRules.map((rule) =>\n        rule.MaxSeats > -1 || rule.MinSeats > -1\n          ? this.groupSizes.push({\n            Id: rule.Id,\n            MinSeats: rule.MinSeats,\n            MaxSeats: rule.MaxSeats,\n          })\n          : null\n      )\n\n      //filter out duplicates\n      this.groupSizes = this.groupSizes.filter(\n        (groupSizes, index, self) =>\n          index ===\n          self.findIndex(\n            (t) =>\n              t.MinSeats === groupSizes.MinSeats &&\n              t.MaxSeats === groupSizes.MaxSeats\n          )\n      )\n      this.originalBookingTerm = { ...this.mBookingTerm }\n\n      if (this.groupSizes.length > 0) {\n        this.groupSizes.map((size, index) => (size.Id = index + 1))\n        this.UtiliseGroupSize = true\n        this.setSelectedGroupSize(this.groupSizes[0])\n      }\n    }\n  },\n\n  methods: {\n    save() {\n      let self = this\n\n      if (!self.isSaving) {\n        self.isSaving = true\n        let bookingTerm = this.$objectHelper.cleanSource(this.mBookingTerm)\n        bookingTerm.CancelRules.map(\n          (rule) =>\n            (rule.HoursUntilStart = Math.floor(rule.HoursUntilStart * 24))\n        )\n\n        termsProvider.methods\n          .updateBookingTerm(bookingTerm)\n          .then((response) => {\n            if (response.status === 200) {\n              self.isSavingSuccess = true\n              let t = setTimeout(() => {\n                self.$emit('termUpdated')\n                self.onClickCancel()\n                clearTimeout(t)\n              }, 1500)\n            }\n          })\n          .catch((error) => {\n            //console.log(error.response)\n            self.isSavingError = true\n          })\n          .finally(() => {\n            self.isSaving = false\n          })\n      }\n    },\n\n    setSelectedMeetingtypeId(meetingtypeId) {\n      let self = this\n      self.selectedMeetingtype = null\n      self.selectedMeetingtypeId = meetingtypeId\n\n      let meetingtypeIndex = self.locationState.Meetingtypes.findIndex(\n        (m) => m.MeetingtypeId === meetingtypeId\n      )\n      if (meetingtypeIndex > -1) {\n        self.selectedMeetingtype =\n          self.locationState.Meetingtypes[meetingtypeIndex]\n      }\n\n      if (self.selectedMeetingtypeId === 2) {\n        self.UtiliseGroupSize = false\n        this.selectedGroupSize = null\n      }\n    },\n\n    addCancelRule() {\n      this.mBookingTerm.CancelRules.push({\n        // TermsId: this.mBookingTerm.Id,\n        MeetingtypeId: this.selectedMeetingtypeId,\n        MinSeats: this.selectedGroupSize ? this.selectedGroupSize.MinSeats : -1,\n        MaxSeats: this.selectedGroupSize ? this.selectedGroupSize.MaxSeats : -1,\n        HoursUntilStart: 0,\n        Percentage: 0,\n      })\n    },\n\n    addGroupSize() {\n      this.groupSizes.push({\n        Id: this.groupSizes.length + 1,\n        MinSeats: 0,\n        MaxSeats: 0,\n      })\n      this.selectedGroupSize = this.groupSizes[this.groupSizes.length - 1]\n    },\n\n    deleteCancelRule(cancelRule) {\n      let ruleIndex = this.mBookingTerm.CancelRules.findIndex(\n        (rule) => rule.Id === cancelRule.Id\n      )\n\n      if (ruleIndex > -1) {\n        Vue.delete(this.mBookingTerm.CancelRules, ruleIndex)\n      }\n    },\n\n    deleteGroupSize(groupSize) {\n      this.mBookingTerm.CancelRules = this.mBookingTerm.CancelRules.filter(\n        (rule) =>\n          rule.MinSeats !== groupSize.MinSeats &&\n          rule.MaxSeats !== groupSize.MaxSeats\n      )\n\n      let groupIndex = this.groupSizes.findIndex(\n        (group) =>\n          group.MinSeats === groupSize.MinSeats &&\n          group.MaxSeats === groupSize.MaxSeats\n      )\n\n      if (groupIndex > -1) {\n        Vue.delete(this.groupSizes, groupIndex)\n      }\n      this.selectedGroupSize = this.groupSizes[this.groupSizes.length - 1]\n    },\n\n    setGroupSize(trueOrFalse) {\n      this.UtiliseGroupSize = trueOrFalse\n      // if statements ensure that the original data is restored when toggling between group utilise yes/no\n      if (this.originalBookingTerm.CancelRules.length > 0) {\n        if (\n          !this.UtiliseGroupSize &&\n          this.originalBookingTerm.CancelRules[0].MaxSeats > -1\n        ) {\n          this.mBookingTerm.CancelRules = []\n          this.selectedGroupSize = null\n        } else if (\n          !this.UtiliseGroupSize &&\n          this.originalBookingTerm.CancelRules[0].MaxSeats === -1\n        ) {\n          this.mBookingTerm = { ...this.originalBookingTerm }\n        } else if (\n          this.UtiliseGroupSize &&\n          this.originalBookingTerm.CancelRules[0].MaxSeats > -1\n        ) {\n          this.mBookingTerm = { ...this.originalBookingTerm }\n          this.selectedGroupSize = this.groupSizes[0]\n        } else if (\n          this.UtiliseGroupSize &&\n          this.originalBookingTerm.CancelRules[0].MaxSeats === -1\n        ) {\n          this.mBookingTerm.CancelRules = []\n          this.selectedGroupSize = null\n        }\n      }\n    },\n\n    setSelectedGroupSize(groupSize) {\n      this.selectedGroupSize = groupSize\n    },\n  },\n}\n</script>\n\n<style lang=\"scss\" scoped>\n.columnWrapper {\n  border: 1px solid $grey-lighter;\n  overflow-y: scroll;\n  width: 100%;\n}\n</style>\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!./ModalEditCancelRules.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!./ModalEditCancelRules.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./ModalEditCancelRules.vue?vue&type=template&id=4c51b3fe&scoped=true\"\nimport script from \"./ModalEditCancelRules.vue?vue&type=script&lang=js\"\nexport * from \"./ModalEditCancelRules.vue?vue&type=script&lang=js\"\nimport style0 from \"./ModalEditCancelRules.vue?vue&type=style&index=0&id=4c51b3fe&prod&lang=scss&scoped=true\"\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  \"4c51b3fe\",\n  null\n  \n)\n\nexport default component.exports"],"sourceRoot":""}