{"version":3,"sources":["webpack:///./src/views/Reports/ReviewScores.vue","webpack:///src/views/Reports/ReviewScores.vue","webpack:///./src/views/Reports/ReviewScores.vue?8a13","webpack:///./src/views/Reports/ReviewScores.vue?34ca"],"names":["render","_vm","this","_c","_self","staticClass","attrs","pageTitle","showYearOverview","key","isLoadingLeft","isLoadingRight","month","year","on","monthYearSelected","locationId","reviewMonthSelected","_e","showMonthDetail","timestamp","selectedMonth","selectedYear","setShowYearOverview","staticRenderFns","MonthYearSelector","ReviewMonth","ReviewScore","components","data","Number","$route","params","Date","getFullYear","getTime","computed","$t","period","$options","filters","getMonthName","$i18n","locale","beforeDestroy","statsProvider","methods","cancelGetReviewScores","backToYearView","setVisibleItem","self","item","component"],"mappings":"uHAAA,IAAIA,EAAS,WAAkB,IAAIC,EAAIC,KAAKC,EAAGF,EAAIG,MAAMD,GAAG,OAAOA,EAAG,MAAM,CAACE,YAAY,WAAW,CAACF,EAAG,MAAM,CAACE,YAAY,aAAa,CAACF,EAAG,eAAe,CAACG,MAAM,CAAC,MAAQL,EAAIM,aAAaJ,EAAG,aAAa,CAACG,MAAM,CAAC,KAAO,OAAO,KAAO,WAAW,CAAEL,EAAIO,iBAAkBL,EAAG,MAAM,CAACM,IAAI,YAAY,CAACN,EAAG,oBAAoB,CAACG,MAAM,CAAC,cAAgBL,EAAIS,cAAc,eAAiBT,EAAIU,eAAe,MAAQV,EAAIW,MAAM,KAAOX,EAAIY,KAAK,mBAAoB,GAAOC,GAAG,CAAC,kBAAoBb,EAAIc,qBAAqBZ,EAAG,cAAc,CAACG,MAAM,CAAC,WAAaL,EAAIe,WAAW,MAAQf,EAAIW,MAAM,KAAOX,EAAIY,KAAK,aAAc,GAAMC,GAAG,CAAC,oBAAsBb,EAAIgB,wBAAwB,GAAGhB,EAAIiB,KAAMjB,EAAIkB,gBAAiBhB,EAAG,MAAM,CAACM,IAAI,cAAgBR,EAAImB,WAAW,CAACjB,EAAG,cAAc,CAACM,IAAI,OAASR,EAAImB,U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=148df95a134a06fcb591","sourcesContent":["var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"section\"},[_c('div',{staticClass:\"container\"},[_c('ui-page-hero',{attrs:{\"title\":_vm.pageTitle}}),_c('transition',{attrs:{\"name\":\"fade\",\"mode\":\"out-in\"}},[(_vm.showYearOverview)?_c('div',{key:\"yearView\"},[_c('MonthYearSelector',{attrs:{\"isLoadingLeft\":_vm.isLoadingLeft,\"isLoadingRight\":_vm.isLoadingRight,\"month\":_vm.month,\"year\":_vm.year,\"showMonthSelector\":false},on:{\"monthYearSelected\":_vm.monthYearSelected}}),_c('ReviewScore',{attrs:{\"locationId\":_vm.locationId,\"month\":_vm.month,\"year\":_vm.year,\"splitMonths\":true},on:{\"reviewMonthSelected\":_vm.reviewMonthSelected}})],1):_vm._e(),(_vm.showMonthDetail)?_c('div',{key:'monthDetail' + _vm.timestamp},[_c('ReviewMonth',{key:'rvsm' + _vm.timestamp,attrs:{\"month\":_vm.selectedMonth,\"year\":_vm.selectedYear},on:{\"backToYearView\":_vm.setShowYearOverview}})],1):_vm._e()])],1)])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<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","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!./ReviewScores.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!./ReviewScores.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./ReviewScores.vue?vue&type=template&id=217eeaea\"\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\nexport default component.exports"],"sourceRoot":""}