{"version":3,"sources":["webpack:///./src/components/Reports/ModalExportGroupReservations.vue","webpack:///src/components/Reports/ModalExportGroupReservations.vue","webpack:///./src/components/Reports/ModalExportGroupReservations.vue?4d7e","webpack:///./src/components/Reports/ModalExportGroupReservations.vue?4d8e","webpack:///./src/components/UI/Message.vue","webpack:///src/components/UI/Message.vue","webpack:///./src/components/UI/Message.vue?5d20","webpack:///./src/components/UI/Message.vue?fb09"],"names":["render","_vm","this","_c","_self","attrs","$t","showModal","onClickCancel","scopedSlots","_u","key","fn","showSideDrawer","hideDrawer","showReservationSummary","reservationKey","locationId","_e","proxy","isLoading","reservations","length","loadError","staticClass","_v","_s","_l","reservation","index","Id","on","$event","setShowReservationSummary","ReservationKey","ReservationId","getTypeName","MeetingtypeId","ReservationName","Items","item","createItemKey","Date","ItemName","_f","Revenue","$i18n","locale","staticRenderFns","ReservationSummary","name","props","type","Boolean","default","Function","required","exportgroupId","Number","statusId","startDate","String","endDate","components","Message","data","created","getExportgroupReservations","beforeDestroy","reservationProvider","methods","cancelGetExportgroupReservations","ItemId","_this","then","response","finally","setVisibleSideBarItem","meetingtypeId","component","class","combindedClass","message","_t","size","computed","c"],"mappings":"2KAAA,IAAIA,EAAS,WAAkB,IAAIC,EAAIC,KAAKC,EAAGF,EAAIG,MAAMD,GAAG,OAAOA,EAAG,qBAAqB,CAACE,MAAM,CAAC,WAAaJ,EAAIK,GAAG,iDAAiD,UAAY,cAAc,UAAYL,EAAIM,UAAU,cAAgBN,EAAIO,cAAc,mBAAoB,GAAMC,YAAYR,EAAIS,GAAG,CAAC,CAACC,IAAI,UAAUC,GAAG,WAAW,MAAO,CAACT,EAAG,MAAM,CAAEF,EAAIY,eAAgBV,EAAG,sBAAsB,CAACE,MAAM,CAAC,YAAcJ,EAAIK,GAAG,2CAA2C,WAAaL,EAAIY,eAAe,aAAeZ,EAAIa,WAAW,SAAW,QAAQ,WAAa,eAAeL,YAAYR,EAAIS,GAAG,CAAC,CAACC,IAAI,UAAUC,GAAG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AAA,CACA9B,KAAAS,OACAP,QAAA,IAGA8B,KAAA,CACAhC,KAAAS,OACAP,QAAA,IAOAF,KAAA,CACAA,KAAAS,OACAP,QAAA,YAGAW,KAAA,WACA,UAGAoB,SAAA,CACAJ,eAAA,WACA,IAAAK,EAAA,KAAAlC,KAMA,OAJA,KAAAgC,KAAA9D,OAAA,IACAgE,IAAA,SAAAF,MAGAE,KCnD+V,I,YCO3VP,EAAY,eACd,EACA/E,EACAgD,GACA,EACA,KACA,WACA,MAIa,aAAA+B,E","file":"js/chunk-d849afd2.js?id=3bcacef7dfd899138bbc","sourcesContent":["var render = function render(){var _vm=this,_c=_vm._self._c;return _c('ui-component-modal',{attrs:{\"modalTitle\":_vm.$t('Views.Reports.RevenueMonth.Title_Reservations'),\"modalSize\":\"extra-large\",\"showModal\":_vm.showModal,\"onClickCancel\":_vm.onClickCancel,\"hideFooterButtons\":true},scopedSlots:_vm._u([{key:\"content\",fn:function(){return [_c('div',[(_vm.showSideDrawer)?_c('ui-component-drawer',{attrs:{\"drawerTitle\":_vm.$t('Views.Reports.RevenueMonth.Drawer_Title'),\"showDrawer\":_vm.showSideDrawer,\"onClickClose\":_vm.hideDrawer,\"position\":\"right\",\"drawerSize\":'extra-large'},scopedSlots:_vm._u([{key:\"content\",fn:function(){return [(_vm.showReservationSummary)?_c('ReservationSummary',{attrs:{\"reservationKey\":_vm.reservationKey,\"locationId\":_vm.locationId}}):_vm._e()]},proxy:true}],null,false,1419859495)}):_vm._e(),(_vm.isLoading)?_c('ui-loader'):_c('div',[(!_vm.reservations.length)?_c('Message',{attrs:{\"message\":_vm.$t('Views.Reports.RevenueMonth.Message_NoReservations')}}):_vm._e(),(_vm.loadError)?_c('Message',{staticClass:\"is-danger mb-6\",attrs:{\"message\":_vm.loadError}}):_vm._e(),(_vm.reservations.length)?_c('table',{staticClass:\"table is-fullwidth is-narrow is-hoverable\"},[_c('thead',[_c('tr',[_c('th',{attrs:{\"width\":\"50\"}},[_vm._v(\"#\")]),_c('th',{attrs:{\"width\":\"50\"}},[_vm._v(\" \"+_vm._s(_vm.$t('Views.Reports.RevenueMonth.Table_Type'))+\" \")]),_c('th',[_vm._v(_vm._s(_vm.$t('Views.Reports.RevenueMonth.Table_Name')))]),_c('th',{attrs:{\"width\":\"320\"}},[_vm._v(\" \"+_vm._s(_vm.$t('Views.Reports.RevenueMonth.Table_Items'))+\" \")])])]),_c('tbody',_vm._l((_vm.reservations),function(reservation,index){return _c('tr',{key:reservation.Id + '_' + index},[_c('td',{attrs:{\"width\":\"100px;\"}},[_c('a',{on:{\"click\":function($event){return _vm.setShowReservationSummary(reservation.ReservationKey)}}},[_vm._v(\"#\"+_vm._s(reservation.ReservationId))])]),_c('td',{attrs:{\"width\":\"50px;\"}},[_vm._v(_vm._s(_vm.getTypeName(reservation.MeetingtypeId)))]),_c('td',{attrs:{\"width\":\"250px;\"}},[_vm._v(_vm._s(reservation.ReservationName))]),_c('td',[_c('table',{staticClass:\"table is-fullwidth is-narrow\"},[_c('tbody',_vm._l((reservation.Items),function(item){return _c('tr',{key:_vm.createItemKey(reservation, item)},[_c('td',{attrs:{\"width\":\"250\"}},[_vm._v(_vm._s(item.Date))]),_c('td',{attrs:{\"width\":\"250\"}},[_vm._v(_vm._s(item.ItemName))]),_c('td',{staticClass:\"has-text-right\",attrs:{\"width\":\"90\"}},[_vm._v(\" \"+_vm._s(_vm._f(\"toCurrency\")(item.Revenue,_vm.$i18n.locale, 'EUR'))+\" \")])])}),0)])])])}),0)]):_vm._e()],1)],1)]},proxy:true}])})\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n  <ui-component-modal\n    :modalTitle=\"$t('Views.Reports.RevenueMonth.Title_Reservations')\"\n    modalSize=\"extra-large\"\n    :showModal=\"showModal\"\n    :onClickCancel=\"onClickCancel\"\n    :hideFooterButtons=\"true\"\n  >\n\n    <template #content>\n      <div>\n        <ui-component-drawer\n          v-if=\"showSideDrawer\"\n          :drawerTitle=\"$t('Views.Reports.RevenueMonth.Drawer_Title')\"\n          :showDrawer=\"showSideDrawer\"\n          :onClickClose=\"hideDrawer\"\n          position=\"right\"\n          :drawerSize=\"'extra-large'\"\n        >\n          <template v-slot:content>\n            <ReservationSummary\n              v-if=\"showReservationSummary\"\n              :reservationKey=\"reservationKey\"\n              :locationId=\"locationId\"\n            />\n          </template>\n        </ui-component-drawer>\n        <!-- <div class=\"title is-4\">\n          {{ month | getMonthName($i18n.locale) }}\n          {{ year }}\n        </div> -->\n        <ui-loader v-if=\"isLoading\" />\n        <div v-else>\n          <Message\n            v-if=\"!reservations.length\"\n            :message=\"$t('Views.Reports.RevenueMonth.Message_NoReservations')\"\n          />\n\n          <Message\n            v-if=\"loadError\"\n            :message=\"loadError\"\n            class=\"is-danger mb-6\"\n          />\n\n          <table\n            v-if=\"reservations.length\"\n            class=\"table is-fullwidth is-narrow is-hoverable\"\n          >\n            <thead>\n              <tr>\n                <th width=\"50\">#</th>\n                <th width=\"50\">\n                  {{ $t('Views.Reports.RevenueMonth.Table_Type') }}\n                </th>\n                <th>{{ $t('Views.Reports.RevenueMonth.Table_Name') }}</th>\n                <th width=\"320\">\n                  {{ $t('Views.Reports.RevenueMonth.Table_Items') }}\n                </th>\n              </tr>\n            </thead>\n            <tbody>\n              <tr\n                v-for=\"(reservation, index) in reservations\"\n                :key=\"reservation.Id + '_' + index\"\n              >\n                <td width=\"100px;\">\n                  <a @click=\"\n                      setShowReservationSummary(reservation.ReservationKey)\n                    \">#{{ reservation.ReservationId }}</a>\n                </td>\n                <td width=\"50px;\">{{ getTypeName(reservation.MeetingtypeId) }}</td>\n                <td width=\"250px;\">{{ reservation.ReservationName }}</td>\n                <td>\n                  <table class=\"table is-fullwidth is-narrow\">\n                    <tbody>\n                      <tr\n                        v-for=\"item in reservation.Items\"\n                        :key=\"createItemKey(reservation, item)\"\n                      >\n                        <td width=\"250\">{{ item.Date }}</td>\n                        <td width=\"250\">{{ item.ItemName }}</td>\n                        <td\n                          width=\"90\"\n                          class=\"has-text-right\"\n                        >\n                          {{ item.Revenue | toCurrency($i18n.locale, 'EUR') }}\n                        </td>\n                      </tr>\n                    </tbody>\n                  </table>\n                </td>\n              </tr>\n            </tbody>\n          </table>\n        </div>\n      </div>\n    </template>\n  </ui-component-modal>\n</template>\n\n<script>\nimport reservationProvider from '@/providers/reservation'\nimport Message from '@/components/UI/Message'\nimport { format, isEqual, parseISO } from 'date-fns'\nconst ReservationSummary = () => import('@/components/Reservations/ReservationSummary')\n\nexport default {\n  name: 'ModalExportGroupReservations',\n\n  props: {\n    showModal: {\n      type: Boolean,\n      default: false\n    },\n    onClickCancel: {\n      type: Function,\n      default: function() { },\n      required: false,\n    },\n    exportgroupId: {\n      type: Number,\n      required: true\n    },\n    statusId: {\n      type: Number,\n      required: true\n    },\n    startDate: {\n      type: String,\n      default: '1900-01-01'\n    },\n    endDate: {\n      type: String,\n      default: '1900-01-01'\n    },\n  },\n\n  components: {\n    ReservationSummary,\n    Message\n  },\n\n\n  data() {\n    return {\n      isLoading: true,\n      reservations: [],\n      loadError: '',\n      showSideDrawer: false,\n      showReservationSummary: false,\n      reservationKey: ''\n    }\n  },\n\n  created() {\n    this.getExportgroupReservations();\n  },\n\n  beforeDestroy() {\n    reservationProvider.methods.cancelGetExportgroupReservations();\n  },\n\n  methods: {\n    createItemKey(reservation, item) {\n      return reservation.ReservationId + '-' + item.Date + '-' + item.ItemId;\n    },\n\n    getExportgroupReservations() {\n      this.isLoading = true;\n      \n      reservationProvider.methods.getExportgroupReservations(\n          this.exportgroupId,\n          this.startDate,\n          this.endDate,\n          this.statusId\n        ).then(response => {\n          this.reservations = response.data;\n        })\n        .finally(() => {\n          this.isLoading = false;\n        })\n    },\n\n    setShowReservationSummary(reservationKey) {\n      this.showSideDrawer = true;\n      this.reservationKey = reservationKey;\n      this.setVisibleSideBarItem('reservationSummary');\n    },\n\n    setVisibleSideBarItem(item) {\n      this.showReservationSummary = item === 'reservationSummary';\n    },\n\n    hideDrawer() {\n      this.showSideDrawer = false;\n      this.reservationKey = '';\n      this.setVisibleSideBarItem('');\n    },\n\n    getTypeName(meetingtypeId) {\n      let name = ''\n\n      switch (meetingtypeId) {\n        case 1:\n          name = 'MS'\n          break\n        case 2:\n          name = 'WS'\n          break\n        case 3:\n          name = 'DS'\n          break\n      }\n\n      return name\n    },\n  }\n}\n</script>","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!./ModalExportGroupReservations.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!./ModalExportGroupReservations.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./ModalExportGroupReservations.vue?vue&type=template&id=6d692d27\"\nimport script from \"./ModalExportGroupReservations.vue?vue&type=script&lang=js\"\nexport * from \"./ModalExportGroupReservations.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","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('article',{staticClass:\"message\",class:_vm.combindedClass},[_c('div',{staticClass:\"message-body\"},[(_vm.message)?[_vm._v(\" \"+_vm._s(_vm.message)+\" \")]:_vm._e(),_vm._t(\"content\")],2)])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n  <article\n    class=\"message\"\n    :class=\"combindedClass\"\n  >\n    <div class=\"message-body\">\n      <template v-if=\"message\">\n        {{ message }}\n      </template>\n      <slot name=\"content\"></slot>\n    </div>\n  </article>\n</template>\n\n<script>\nexport default {\n  props: {\n    /**\n     * For what'll be shown inside of the message box.\n     */\n    message: {\n      type: String,\n      default: ''\n    },\n\n    size: {\n      type: String,\n      default: ''\n    },\n\n    /**\n     * type bepaalt het type weergave\n     * eq. is-info = for information style. It defines the style of the message\n     */\n    type: {\n      type: String,\n      default: 'is-info'\n    }\n  },\n  data() {\n    return {};\n  },\n\n  computed: {\n    combindedClass() {\n      let c = this.type;\n\n      if (this.size.length > 0) {\n        c = c + ' ' + this.size;\n      }\n\n      return c;\n    }\n  }\n};\n</script>\n\n<style lang=\"scss\" scoped></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!./Message.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!./Message.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./Message.vue?vue&type=template&id=509443f1&scoped=true\"\nimport script from \"./Message.vue?vue&type=script&lang=js\"\nexport * from \"./Message.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  \"509443f1\",\n  null\n  \n)\n\nexport default component.exports"],"sourceRoot":""}