{"version":3,"sources":["webpack:///./src/views/backoffice/administrator/dashboard/home.vue?a526","webpack:///./src/components/Charts/HorizontalBarChart.js","webpack:///src/views/backoffice/administrator/dashboard/home.vue","webpack:///./src/views/backoffice/administrator/dashboard/home.vue?be22","webpack:///./src/views/backoffice/administrator/dashboard/home.vue"],"names":["render","_vm","this","_h","$createElement","_c","_self","attrs","staticClass","_v","_s","$t","data","agents","count_agents","areas","count_area","Date","start_date","replace","toLocaleDateString","final_date","staticRenderFns","name","extends","HorizontalBar","props","vm","gross_value","awarded","chartdata","labels","datasets","pointBackgroundColor","borderWidth","pointBorderColor","backgroundColor","$vuetify","theme","themes","dark","primary","options","responsive","maintainAspectRatio","scales","xAxes","ticks","min","max","stepSize","gradient","computed","weekdays","mounted","label","watch","val","buildChart","methods","dados","forEach","item","indexDay","date_bet","getDay","renderChart","components","HorizontalBarChart","component","VCard","VCardText","VCardTitle","VCol","VIcon","VRow"],"mappings":"uHAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,GAAG,CAACA,EAAG,QAAQ,CAACA,EAAG,QAAQ,CAACE,MAAM,CAAC,KAAO,KAAK,GAAK,MAAM,CAACF,EAAG,SAAS,CAACA,EAAG,eAAe,CAACG,YAAY,cAAc,CAACH,EAAG,UAAUJ,EAAIQ,GAAG,IAAIR,EAAIS,GAAGT,EAAIU,GAAG,iBAAiB,MAAM,GAAGN,EAAG,cAAc,CAACJ,EAAIQ,GAAG,IAAIR,EAAIS,GAAGT,EAAIW,KAAKC,OAAOC,kBAAkB,IAAI,GAAGT,EAAG,QAAQ,CAACE,MAAM,CAAC,KAAO,KAAK,GAAK,MAAM,CAACF,EAAG,SAAS,CAACA,EAAG,eAAe,CAACG,YAAY,cAAc,CAACH,EAAG,UAAUJ,EAAIQ,GAAG,IAAIR,EAAIS,GAAGT,EAAIU,GAAG,UAAU,MAAM,G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AAY,eACd,EACArE,EACAsB,GACA,EACA,KACA,KACA,MAIa,aAAA+C,EAAiB,QAUhC,IAAkBA,EAAW,CAACC,QAAA,KAAMC,UAAA,OAAUC,WAAA,OAAWC,OAAA,KAAKC,QAAA,KAAMC,OAAA","file":"js/chunk-2d22236a.c1883c51.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{},[_c('v-row',[_c('v-col',{attrs:{\"cols\":\"12\",\"sm\":\"6\"}},[_c('v-card',[_c('v-card-title',{staticClass:\"subtitle-2\"},[_c('v-icon'),_vm._v(\" \"+_vm._s(_vm.$t(\"activeAgents\"))+\" \")],1),_c('v-card-text',[_vm._v(\" \"+_vm._s(_vm.data.agents.count_agents))])],1)],1),_c('v-col',{attrs:{\"cols\":\"12\",\"sm\":\"6\"}},[_c('v-card',[_c('v-card-title',{staticClass:\"subtitle-2\"},[_c('v-icon'),_vm._v(\" \"+_vm._s(_vm.$t(\"areas\"))+\" \")],1),_c('v-card-text',[_vm._v(_vm._s(_vm.data.areas.count_area))])],1)],1)],1),_c('v-row',[_c('v-col',{attrs:{\"cols\":\"12\"}},[_c('v-card',[_c('v-card-title',{staticClass:\"subtitle-2 pb-0\"},[_vm._v(_vm._s(_vm.$t(\"weeklyChart\"))+\" | \"+_vm._s(_vm.$t(\"grossAndPremium\"))+\" \")]),_c('v-card-text',{staticClass:\"pb-0\"},[_vm._v(\" \"+_vm._s(_vm.$t(\"from\"))+\" \"+_vm._s(new Date(_vm.start_date.replace(\" \", \"T\")).toLocaleDateString())+\" \"+_vm._s(_vm.$t(\"until\"))+\" \"+_vm._s(new Date(_vm.final_date.replace(\" \", \"T\")).toLocaleDateString())+\" \")]),_c('div',{staticClass:\"pa-6\"},[_c('HorizontalBarChart',{attrs:{\"data\":_vm.data}})],1)],1)],1)],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import {\n HorizontalBar\n} from \"vue-chartjs\";\n\nexport default {\n name: \"Home\",\n extends: HorizontalBar,\n props: [\"data\"],\n data: (vm) => ({\n // weekdays: [\"Segunda\", \"Terça\", \"Quarta\", \"Quinta\", \"Sexta\", \"Sábado\", \"Domingo\"],\n gross_value: [0, 0, 0, 0, 0, 0, 0],\n awarded: [0, 0, 0, 0, 0, 0, 0],\n chartdata: {\n labels: [],\n datasets: [{\n // label: \"R$ Bruto\",\n data: [],\n pointBackgroundColor: \"white\",\n borderWidth: 1,\n pointBorderColor: \"white\",\n backgroundColor: vm.$vuetify.theme.themes.dark.primary\n },\n {\n // label: \"R$ Prêmios\",\n data: [],\n pointBackgroundColor: \"white\",\n borderWidth: 1,\n pointBorderColor: \"white\",\n backgroundColor: 'rgba(0,250,154, 1)',\n },\n ],\n },\n options: {\n responsive: true,\n maintainAspectRatio: false,\n scales: {\n xAxes: [{\n ticks: {\n min: 0,\n max: 0,\n stepSize: 10,\n }\n }]\n }\n },\n\n gradient: ''\n }),\n\n computed: {\n weekdays() {\n return [this.$t('monday'), this.$t('tuesday'), this.$t('wednesday'), this.$t('thursday'), this.$t('friday'), this.$t('saturday'), this.$t('sunday')]\n },\n },\n mounted() {\n this.chartdata.datasets[0].label = `${this.$t('labelCurrency')} ${this.$t('gross')}`;\n this.chartdata.datasets[1].label = `${this.$t('labelCurrency')} ${this.$t('awards')}`;\n },\n\n watch: {\n data(val) {\n val && this.buildChart()\n },\n },\n\n methods: {\n async buildChart() {\n this.data.dados && this.data.dados.forEach((item) => {\n let indexDay = new Date(item.date_bet).getDay();\n this.awarded[indexDay] = item.awarded;\n this.gross_value[indexDay] = item.gross_value;\n });\n\n this.chartdata.datasets[0].data = this.gross_value\n this.chartdata.datasets[1].data = this.awarded\n\n this.chartdata.labels = this.weekdays\n this.options.scales.xAxes[0].ticks.max = await this.max;\n this.renderChart(this.chartdata, this.options);\n },\n },\n};","\n","import mod from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./home.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../../../node_modules/thread-loader/dist/cjs.js!../../../../../node_modules/babel-loader/lib/index.js!../../../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./home.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./home.vue?vue&type=template&id=59ca6916&\"\nimport script from \"./home.vue?vue&type=script&lang=js&\"\nexport * from \"./home.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\n\n/* vuetify-loader */\nimport installComponents from \"!../../../../../node_modules/vuetify-loader/lib/runtime/installComponents.js\"\nimport { VCard } from 'vuetify/lib/components/VCard';\nimport { VCardText } from 'vuetify/lib/components/VCard';\nimport { VCardTitle } from 'vuetify/lib/components/VCard';\nimport { VCol } from 'vuetify/lib/components/VGrid';\nimport { VIcon } from 'vuetify/lib/components/VIcon';\nimport { VRow } from 'vuetify/lib/components/VGrid';\ninstallComponents(component, {VCard,VCardText,VCardTitle,VCol,VIcon,VRow})\n"],"sourceRoot":""}