{"version":3,"sources":["webpack:///./src/Reporting/ReportingGenerator/ReportingGenerator.vue?b6ef","webpack:///./src/Reporting/ReportingGenerator/ReportingGenerator.vue?101c","webpack:///./src/Reporting/ReportingGenerator/ReportingGenerator.vue?c00f","webpack:///./src/Reporting/ReportingGenerator/ReportingGenerator.vue"],"names":["render","_vm","this","_h","$createElement","_c","_self","staticClass","_v","_s","$t","directives","name","rawName","on","categoryChanged","model","value","callback","$$v","selectedCategory","expression","_l","category","domProps","attrs","selectedReport","report","reportName","class","placement","visibility","startDate","endDate","options","selectedReportType","$event","runReport","staticRenderFns","NotificationsAdmin","LocationBasedMixin","extend","props","data","validationErrors","reports","categories","text","methods","getSelectedCategory","getReportNames","VatsAPI","get","axiosResponse","getReportCategories","url","vurl","window","location","hostname","indexOf","reportPage","replace","encodeURIComponent","toISOString","substr","set","delete","Object","keys","assign","open","mounted","component"],"mappings":"yHAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACE,YAAY,aAAa,CAACF,EAAG,KAAK,CAACJ,EAAIO,GAAGP,EAAIQ,GAAGR,EAAIS,GAAG,4CAA4CL,EAAG,MAAMA,EAAG,KAAK,CAACJ,EAAIO,GAAGP,EAAIQ,GAAGR,EAAIS,GAAG,+CAA+CL,EAAG,MAAM,CAACE,YAAY,OAAO,CAACF,EAAG,MAAM,CAACE,YAAY,gBAAgB,CAACF,EAAG,WAAW,CAACM,WAAW,CAAC,CAACC,KAAK,mBAAmBC,QAAQ,uBAAuBC,GAAG,CAAC,OAASb,EAAIc,iBAAiBC,MAAM,CAACC,MAAOhB,EAAoB,iBAAEiB,SAAS,SAAUC,GAAMlB,EAAImB,iBAAiBD,GAAKE,WAAW,qBAAqBpB,EAAIqB,GAAIrB,EAAc,YAAE,SAASsB,GAAU,OAAOlB,EAAG,SAAS,CAACmB,SAAS,CAAC,MAAQD,IAAW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Oc,KAAKhB,EAAM,OAAOvB,EAAS,OAAOC,EAAO,OAAO/B,KAAKiC,mBAAkB,QAAS,W,YAKjGqC,QAAO,W,4HACM,OAAf,EAAAtE,KAAe,GAAMA,KAAKgD,kB,OACR,OADlB,EAAKL,QAAU,SACf,EAAA3C,KAAkB,GAAMA,KAAKoD,uB,cAA7B,EAAKR,WAAa,S,cAIX,IC7JgZ,I,YCO3Z2B,EAAY,eACd,EACAzE,EACAsC,GACA,EACA,KACA,KACA,MAIa,aAAAmC,E","file":"js/chunk-2d0ba6ca.c8f491fe.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"container\"},[_c('h1',[_vm._v(_vm._s(_vm.$t('reporting.reportingGenerator.heading')))]),_c('br'),_c('h4',[_vm._v(_vm._s(_vm.$t('reporting.reportingGenerator.categories')))]),_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col col-sm-3\"},[_c('b-select',{directives:[{name:\"validation-error\",rawName:\"v-validation-error\"}],on:{\"change\":_vm.categoryChanged},model:{value:(_vm.selectedCategory),callback:function ($$v) {_vm.selectedCategory=$$v},expression:\"selectedCategory\"}},_vm._l((_vm.categories),function(category){return _c('option',{domProps:{\"value\":category}},[_vm._v(\"\\n \"+_vm._s(category)+\"\\n \")])}),0)],1)]),_c('br'),_c('h4',[_vm._v(_vm._s(_vm.$t('reporting.reportingGenerator.reports')))]),_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col col-sm-3\"},[_c('b-select',{directives:[{name:\"validation-error\",rawName:\"v-validation-error\"}],attrs:{\"t\":\"\"},model:{value:(_vm.selectedReport),callback:function ($$v) {_vm.selectedReport=$$v},expression:\"selectedReport\"}},_vm._l((_vm.reports),function(report){return _c('option',{domProps:{\"value\":report}},[_vm._v(\"\\n \"+_vm._s(report.reportName)+\"\\n \")])}),0)],1)]),_c('br'),_c('h4',[_vm._v(_vm._s(_vm.$t('reporting.reportingGenerator.startDate')))]),_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col col-sm-3\"},[_c('v-date-picker',{directives:[{name:\"validation-error\",rawName:\"v-validation-error\"}],staticClass:\"date-picker\",attrs:{\"input-props\":{ class: 'form-control' },\"popover\":{ placement: 'bottom-end', visibility: 'visible' },\"id\":\"Start-Date\"},model:{value:(_vm.startDate),callback:function ($$v) {_vm.startDate=$$v},expression:\"startDate\"}})],1)]),_c('br'),_c('h4',[_vm._v(_vm._s(_vm.$t('reporting.reportingGenerator.endDate')))]),_c('div',{staticClass:\"row\"},[_c('div',{staticClass:\"col col-sm-3\"},[_c('v-date-picker',{directives:[{name:\"validation-error\",rawName:\"v-validation-error\"}],staticClass:\"date-picker\",attrs:{\"input-props\":{ class: 'form-control' },\"popover\":{ placement: 'bottom-end', visibility: 'visible' },\"id\":\"End-Date\"},model:{value:(_vm.endDate),callback:function ($$v) {_vm.endDate=$$v},expression:\"endDate\"}})],1)]),_c('br'),[_c('div',[_c('h4',[_vm._v(_vm._s(_vm.$t('reporting.reportingGenerator.reportType')))]),_c('b-form-group',[_c('b-form-radio-group',{attrs:{\"id\":\"radio-reports\",\"options\":_vm.options,\"name\":\"radio-reports-options\"},model:{value:(_vm.selectedReportType),callback:function ($$v) {_vm.selectedReportType=$$v},expression:\"selectedReportType\"}})],1)],1)],_c('br'),_c('b-button',{attrs:{\"size\":\"sm\",\"variant\":\"success\"},on:{\"click\":function($event){return _vm.runReport()}}},[_vm._v(_vm._s(_vm.$t('reporting.reportingGenerator.runReport')))])],2)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport Vue from 'vue';\nimport VatsAPI from '@/Shared/VatsAPI';\nimport { ReportName } from './ReportName';\nimport LocationBasedMixin from '@/Shared/LocationBasedMixin';\nimport mixins from 'vue-typed-mixins';\n\nconst NotificationsAdmin = mixins(LocationBasedMixin).extend({\n props: ['location'],\n data() {\n return {\n validationErrors: {} as { [key: string]: string[] },\n reports: [] as ReportName[],\n categories: [] as string[],\n selectedCategory: null as string | null,\n selectedReport: null as ReportName | null,\n startDate: null as Date | null,\n endDate: null as Date | null,\n selectedReportType: 'Excel',\n options: [\n { text: 'HTML', value: 'HTML' },\n { text: 'Excel', value: 'Excel' },\n { text: 'PDF', value: 'PDF' }\n ]\n };\n },\n methods: {\n async categoryChanged() {\n this.reports = await this.getSelectedCategory();\n },\n async getReportNames() {\n const axiosResponse = await VatsAPI.get(`/ReportingGenerator/ReportNames`);\n return axiosResponse.data;\n },\n\n async getReportCategories() {\n const axiosResponse = await VatsAPI.get(`/ReportingGenerator/ReportCategories`);\n return axiosResponse.data;\n },\n async getSelectedCategory() {\n const url = `/ReportingGenerator/GetSelectedCategory?category=${this.selectedCategory}`;\n const axiosResponse = await VatsAPI.get(url);\n return axiosResponse.data;\n },\n async runReport() {\n let vurl = ``;\n if (((window.location.hostname).indexOf('localhost') > -1)\n || (window.location.hostname).indexOf('development') > -1) {\n vurl = `https://development.municipalcitationsolutions.com`;\n }\n const url = vurl + `${this.selectedReport?.reportPage}`.replace('..', '');\n const startDate = encodeURIComponent(this.startDate?.toISOString().substr(0, 10) || '');\n const endDate = encodeURIComponent(this.endDate?.toISOString().substr(0, 10) || '');\n if (this.selectedCategory == null) {\n Vue.set(this.validationErrors, 'selectedCategory', ['Please select a category']);\n }\n else {\n Vue.delete(this.validationErrors, 'selectedCategory');\n }\n if (this.selectedReport?.reportName == null) {\n Vue.set(this.validationErrors, 'selectedReport', ['Please select a report']);\n }\n else {\n Vue.delete(this.validationErrors, 'selectedReport');\n }\n if (endDate <= startDate) {\n Vue.set(this.validationErrors, 'startDate', ['End date must be after start date']);\n }\n else {\n Vue.delete(this.validationErrors, 'startDate');\n }\n if (Object.keys(this.validationErrors)) {\n if (this.selectedReportType === 'Excel') {\n window.location.assign(url + `?p1=${startDate}&p2=${endDate}&p3=${this.selectedReportType}&p4=0`);\n }\n else {\n window.open(url + `?p1=${startDate}&p2=${endDate}&p3=${this.selectedReportType}&p4=0`, '_blank');\n }\n }\n }\n },\n async mounted() {\n this.reports = await this.getReportNames();\n this.categories = await this.getReportCategories();\n },\n});\n\nexport default NotificationsAdmin;\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/ts-loader/index.js??ref--13-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ReportingGenerator.vue?vue&type=script&lang=ts&\"; 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/ts-loader/index.js??ref--13-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ReportingGenerator.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./ReportingGenerator.vue?vue&type=template&id=f4fcef9e&\"\nimport script from \"./ReportingGenerator.vue?vue&type=script&lang=ts&\"\nexport * from \"./ReportingGenerator.vue?vue&type=script&lang=ts&\"\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":""}