{"version":3,"sources":["webpack:///src/views/Reports/ReviewScores.vue","webpack:///./src/views/Reports/ReviewScores.vue","webpack:///./src/views/Reports/ReviewScores.vue?34ca","webpack:///./src/views/Reports/ReviewScores.vue?6892","webpack:///./src/views/Reports/ReviewScores.vue?a177"],"names":["MonthYearSelector","ReviewMonth","ReviewScore","components","data","isLoadingLeft","isLoadingRight","locationId","Number","$route","params","month","selectedMonth","selectedYear","Date","getFullYear","year","showYearOverview","showMonthDetail","timestamp","getTime","computed","pageTitle","$t","period","$options","filters","getMonthName","$i18n","locale","beforeDestroy","statsProvider","methods","cancelGetReviewScores","backToYearView","setVisibleItem","monthYearSelected","self","reviewMonthSelected","setShowYearOverview","item","render","_vm","_c","_self","staticClass","attrs","title","name","mode","key","showMonthSelector","on","splitMonths","_e","staticRenderFns","_withStripped"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAgDA;AACA,IAAAA,iBAAA,YAAAA,kBAAA;EAAA;AAAA;AACA,IAAAC,WAAA,YAAAA,YAAA;EAAA;AAAA;AACA,IAAAC,WAAA,YAAAA,YAAA;EAAA;AAAA;AAEe;EACfC,UAAA;IACAH,iBAAA,EAAAA,iBAAA;IACAC,WAAA,EAAAA,WAAA;IACAC,WAAA,EAAAA;EACA;EAEAE,IAAA,WAAAA,KAAA;IACA;MACAC,aAAA;MACAC,cAAA;MACAC,UAAA,EAAAC,MAAA,MAAAC,MAAA,CAAAC,MAAA,CAAAH,UAAA;MACAI,KAAA;MACAC,aAAA;MACAC,YAAA,MAAAC,IAAA,GAAAC,WAAA;MACAC,IAAA,MAAAF,IAAA,GAAAC,WAAA;MACAE,gBAAA;MACAC,eAAA;MACAC,SAAA,MAAAL,IAAA,GAAAM,OAAA;IACA;EACA;EAEAC,QAAA;IACAC,SAAA,WAAAA,UAAA;MACA,SAAAL,gBAAA;QACA,YAAAM,EAAA;MACA;MACA,SAAAL,eAAA;QACA,YAAAK,EAAA;UACAC,MAAA,EACA,KAAAC,QAAA,CAAAC,OAAA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aAAa;MAAEI,IAAI,EAAE0B,GAAG,CAAC7B;IAAa,CAAC;IAC3DuC,EAAE,EAAE;MAAElB,cAAc,EAAEQ,GAAG,CAACH;IAAoB;EAChD,CAAC,CAAC,CACH,EACD,CACF,CAAC,GACDG,GAAG,CAACY,EAAE,CAAC,CAAC,CACb,CAAC,CACH,EACD,CACF,CAAC,CACF,CAAC;AACJ,CAAC;AACD,IAAIC,eAAe,GAAG,EAAE;AACxBd,MAAM,CAACe,aAAa,GAAG,IAAI;;;;;;;;;;;;;;AC3D3B;AAAA;AAAA;AAAA;AAA0F;AAC3B;AACL;;;AAG1D;AAC6F;AAC7F,gBAAgB,mHAAU;AAC1B,EAAE,yFAAM;AACR,EAAE,8FAAM;AACR,EAAE,uGAAe;AACjB;AACA;AACA;AACA;;AAEA;;AAEA;AACA,IAAI,KAAU,EAAE,YAiBf;AACD;AACe,gF;;;;;;;;;;;;;ACtCf;AAAoS,CAAgB,8UAAG,EAAC,C;;;;;;;;;;;;;ACAxT;AAAA;AAAA;AAAA;AAAA","file":"js/457.js?id=508cdbecfed2cf58346a","sourcesContent":["<template>\n  <div class=\"section\">\n    <div class=\"container\">\n      <ui-page-hero :title=\"pageTitle\" />\n\n      <transition\n        name=\"fade\"\n        mode=\"out-in\"\n      >\n        <div\n          v-if=\"showYearOverview\"\n          key=\"yearView\"\n        >\n          <MonthYearSelector\n            @monthYearSelected=\"monthYearSelected\"\n            :isLoadingLeft=\"isLoadingLeft\"\n            :isLoadingRight=\"isLoadingRight\"\n            :month=\"month\"\n            :year=\"year\"\n            :showMonthSelector=\"false\"\n          />\n\n          <ReviewScore\n            :locationId=\"locationId\"\n            :month=\"month\"\n            :year=\"year\"\n            :splitMonths=\"true\"\n            @reviewMonthSelected=\"reviewMonthSelected\"\n          />\n        </div>\n\n        <div\n          v-if=\"showMonthDetail\"\n          :key=\"'monthDetail' + timestamp\"\n        >\n          <ReviewMonth\n            :month=\"selectedMonth\"\n            :year=\"selectedYear\"\n            :key=\"'rvsm' + timestamp\"\n            @backToYearView=\"setShowYearOverview\"\n          />\n        </div>\n      </transition>\n    </div>\n  </div>\n</template>\n\n<script>\nimport statsProvider from '@/providers/stats'\nconst MonthYearSelector = () => import('@/components/UI/MonthYearSelector')\nconst ReviewMonth = () => import('@/components/Reviews/ReviewMonth')\nconst ReviewScore = () => import('@/components/Dashboards/ReviewScore')\n\nexport default {\n  components: {\n    MonthYearSelector,\n    ReviewMonth,\n    ReviewScore,\n  },\n\n  data() {\n    return {\n      isLoadingLeft: false,\n      isLoadingRight: false,\n      locationId: Number(this.$route.params.locationId),\n      month: 0,\n      selectedMonth: 0,\n      selectedYear: new Date().getFullYear(),\n      year: new Date().getFullYear(),\n      showYearOverview: true,\n      showMonthDetail: false,\n      timestamp: new Date().getTime(),\n    }\n  },\n\n  computed: {\n    pageTitle() {\n      if (this.showYearOverview) {\n        return this.$t('Views.Reports.ReviewScores.Main_Title_YearOverview')\n      }\n      if (this.showMonthDetail) {\n        return this.$t('Views.Reports.ReviewScores.Main_Title_MonthOverview', {\n          period:\n            this.$options.filters.getMonthName(\n              this.selectedMonth,\n              this.$i18n.locale\n            ) +\n            ' ' +\n            this.selectedYear,\n        })\n      }\n      return ''\n    },\n  },\n\n  beforeDestroy() {\n    statsProvider.methods.cancelGetReviewScores()\n  },\n\n  methods: {\n    backToYearView() {\n      this.setVisibleItem('year')\n    },\n\n    monthYearSelected(data) {\n      let self = this\n\n      self.month = Number(data.month)\n      self.year = Number(data.year)\n\n      self.timestamp = new Date().getTime()\n\n      // self.isLoadingLeft = data.direction === \"left\";\n      // self.isLoadingRight = data.direction === \"right\";\n    },\n\n    reviewMonthSelected(data) {\n      this.selectedMonth = Number(data.month)\n      this.selectedYear = Number(data.year)\n      this.setVisibleItem('detail')\n    },\n\n    setShowYearOverview() {\n      this.selectedMonth = 0\n      this.selectedYear = 0\n      this.setVisibleItem('year')\n    },\n\n    setVisibleItem(item) {\n      this.showYearOverview = item === 'year'\n      this.showMonthDetail = item === 'detail'\n    },\n  },\n}\n</script>\n","var render = function render() {\n  var _vm = this,\n    _c = _vm._self._c\n  return _c(\"div\", { staticClass: \"section\" }, [\n    _c(\n      \"div\",\n      { staticClass: \"container\" },\n      [\n        _c(\"ui-page-hero\", { attrs: { title: _vm.pageTitle } }),\n        _c(\"transition\", { attrs: { name: \"fade\", mode: \"out-in\" } }, [\n          _vm.showYearOverview\n            ? _c(\n                \"div\",\n                { key: \"yearView\" },\n                [\n                  _c(\"MonthYearSelector\", {\n                    attrs: {\n                      isLoadingLeft: _vm.isLoadingLeft,\n                      isLoadingRight: _vm.isLoadingRight,\n                      month: _vm.month,\n                      year: _vm.year,\n                      showMonthSelector: false,\n                    },\n                    on: { monthYearSelected: _vm.monthYearSelected },\n                  }),\n                  _c(\"ReviewScore\", {\n                    attrs: {\n                      locationId: _vm.locationId,\n                      month: _vm.month,\n                      year: _vm.year,\n                      splitMonths: true,\n                    },\n                    on: { reviewMonthSelected: _vm.reviewMonthSelected },\n                  }),\n                ],\n                1\n              )\n            : _vm._e(),\n          _vm.showMonthDetail\n            ? _c(\n                \"div\",\n                { key: \"monthDetail\" + _vm.timestamp },\n                [\n                  _c(\"ReviewMonth\", {\n                    key: \"rvsm\" + _vm.timestamp,\n                    attrs: { month: _vm.selectedMonth, year: _vm.selectedYear },\n                    on: { backToYearView: _vm.setShowYearOverview },\n                  }),\n                ],\n                1\n              )\n            : _vm._e(),\n        ]),\n      ],\n      1\n    ),\n  ])\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns }","import { render, staticRenderFns } from \"./ReviewScores.vue?vue&type=template&id=5608dac3\"\nimport script from \"./ReviewScores.vue?vue&type=script&lang=js\"\nexport * from \"./ReviewScores.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('5608dac3')) {\n      api.createRecord('5608dac3', component.options)\n    } else {\n      api.reload('5608dac3', component.options)\n    }\n    module.hot.accept(\"./ReviewScores.vue?vue&type=template&id=5608dac3\", function () {\n      api.rerender('5608dac3', {\n        render: render,\n        staticRenderFns: staticRenderFns\n      })\n    })\n  }\n}\ncomponent.options.__file = \"src/views/Reports/ReviewScores.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!./ReviewScores.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!./ReviewScores.vue?vue&type=script&lang=js\"","export * from \"-!../../../node_modules/cache-loader/dist/cjs.js?{\\\"cacheDirectory\\\":\\\"node_modules/.cache/vue-loader\\\",\\\"cacheIdentifier\\\":\\\"d2a26fb4-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!./ReviewScores.vue?vue&type=template&id=5608dac3\""],"sourceRoot":""}