\n\t\t\n\t\t\t\n\t\t\t\t \n\t\t\t\tDrop image file here or\n\t\t\t\tbrowse\n\t\t\t\n\t\t\n\n\t\t\n\t
\n\n\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!./ImageFileInput.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!./ImageFileInput.vue?vue&type=script&lang=js\"","import { render, staticRenderFns } from \"./ImageFileInput.vue?vue&type=template&id=67c86fc7\"\nimport script from \"./ImageFileInput.vue?vue&type=script&lang=js\"\nexport * from \"./ImageFileInput.vue?vue&type=script&lang=js\"\nimport style0 from \"./ImageFileInput.vue?vue&type=style&index=0&id=67c86fc7&prod&lang=scss\"\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 () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"reports-settings\"},[_c('h4',[_vm._v(\"Template Sets\")]),_c('p',{staticStyle:{\"margin\":\"16px 0\"}},[_vm._v(\"\\n\\t\\tThese template sets can be used for internal reporting and may consist of a web form as well as a PDF report.\\n\\t\")]),(_vm.isLoading)?_c('p',{staticClass:\"is-muted\",staticStyle:{\"font-size\":\"2em\"}},[_c('svg-icon',{attrs:{\"icon\":\"spinner\",\"pulse\":\"\"}})],1):_c('div',[_c('div',{staticStyle:{\"display\":\"flex\"}},[_c('ast-checkbox',{staticStyle:{\"font-size\":\"0.9em\"},attrs:{\"title\":\"Check to show template sets that were once published but are now retired\"},model:{value:(_vm.showRetired),callback:function ($$v) {_vm.showRetired=$$v},expression:\"showRetired\"}},[_vm._v(\"\\n\\t\\t\\t\\tShow retired template sets\\n\\t\\t\\t\")])],1),_c('div',{staticClass:\"template-set-list\"},[_c('div',{staticClass:\"template-set new\",attrs:{\"title\":\"New template set\"},on:{\"click\":function($event){return _vm.newWorkflow()}}},[_c('svg-icon',{attrs:{\"icon\":\"plus-circle-outline\"}}),_vm._v(\"\\n\\t\\t\\t\\tNew\\n\\t\\t\\t\")],1),_vm._l((_vm.filteredSets),function(set){return _c('template-set',{key:set.id,attrs:{\"set\":set},on:{\"delete-template-set\":_vm.deleteWorkflow}})})],2)]),_c('div',{staticClass:\"group\"},[_c('div',[_c('h4',[_vm._v(\"Clinic Logo\")]),_c('div',{staticStyle:{\"margin\":\"16px 0\"}},[_c('image-file-input',{attrs:{\"url\":_vm.logoUrl},on:{\"change\":_vm.selectLogoFile,\"clear\":_vm.clearLogo}})],1)]),_c('div',[_c('h4',[_vm._v(\"Data Analysis\")]),_c('button',{staticClass:\"btn btn-default\",staticStyle:{\"margin-top\":\"16px\"},on:{\"click\":function($event){return _vm.openAnalyzeReports('standard')}}},[_c('svg-icon',{attrs:{\"icon\":\"database-search\",\"fixed\":\"\"}}),_vm._v(\"\\n\\t\\t\\t\\tAnalyze Reports\\n\\t\\t\\t\")],1)])])])}\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\nimport AstCheckbox from '@components/Checkbox.vue'\nimport ImageFileInput from '@components/ImageFileInput.vue'\nimport state from '@services/reportService'\nimport { openNewReportTemplateDlg } from '@reporting/dialogs/NewReportTemplateDlg.vue'\nimport { TemplateSetStatus } from '@reporting/classes'\nimport TemplateSet from '@reporting/components/TemplateSet.vue'\nimport { showConfirm } from '@dialogs/ConfirmDlg.vue'\nimport { openAnalyzeReports } from '@dialogs/AnalyzeReports.vue'\nimport { userData } from '@services/userData'\nimport api, { Annex } from '@services/api'\n\nexport default {\n\tname: 'ReportsSettingView',\n\tcomponents: {\n\t\tAstCheckbox,\n\t\tImageFileInput,\n\t\tTemplateSet,\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tsets: [],\n\t\t\treporting: false,\n\t\t\tstate,\n\t\t\tshowRetired: false,\n\t\t\tisLoading: false,\n\t\t\tlogoUrl: null,\n\t\t}\n\t},\n\tcomputed: {\n\t\tfilteredSets() {\n\t\t\treturn this.sets.filter(s => this.showRetired || s.status !== TemplateSetStatus.Retired)\n\t\t},\n\t},\n\tasync created() {\n\t\tthis.isLoading = true\n\t\tthis.sets = await state.getTemplateSets(true)\n\t\tthis.isLoading = false\n\n\t\tconst cc = userData.claims.activeClinicCode\n\t\tconst rand = Math.random()\n\t\tconst base = Annex.defaults.baseURL\n\t\t// TODO: confirm that this will work, overloading the logo endpoint\n\t\tthis.logoUrl = `${base}/logo.aspx?ClinicCode=${cc}&Type=logo&invalidate=${rand}`\n\t},\n\tmethods: {\n\t\topenAnalyzeReports,\n\t\tasync newWorkflow() {\n\t\t\tlet setid = await openNewReportTemplateDlg('Report')\n\t\t\tif (setid) {\n\t\t\t\tthis.$router.push({\n\t\t\t\t\tname: 'report-editor',\n\t\t\t\t\tparams: { setId: setid },\n\t\t\t\t})\n\t\t\t}\n\t\t},\n\t\tasync deleteWorkflow(set: ITemplateSet) {\n\t\t\tlet confirmed = await showConfirm('Are you sure you want to delete this workflow?')\n\t\t\tif (confirmed) {\n\t\t\t\tstate.setTemplateSetStatus(set, TemplateSetStatus.Deleted)\n\t\t\t\tthis.sets.splice(this.sets.indexOf(set), 1)\n\t\t\t}\n\t\t},\n\t\tselectLogoFile({ target }) {\n\t\t\tif (!target.files.length) return\n\t\t\tlet file = target.files[0]\n\t\t\tconst reader = new FileReader()\n\t\t\treader.addEventListener(\n\t\t\t\t'load',\n\t\t\t\tasync () => {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tawait api.clinic.updateLogo(file)\n\t\t\t\t\t\tthis.logoUrl = reader.result\n\t\t\t\t\t} catch (err) {\n\t\t\t\t\t\t// TODO: user error message?\n\t\t\t\t\t\tconsole.error(err)\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tfalse\n\t\t\t)\n\t\t\treader.readAsDataURL(file)\n\t\t},\n\t\tasync clearLogo() {\n\t\t\ttry {\n\t\t\t\tawait api.clinic.updateLogo(null)\n\t\t\t\tthis.logoUrl = null\n\t\t\t} catch (err) {\n\t\t\t\tconsole.error(err)\n\t\t\t}\n\t\t},\n\t},\n}\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--14-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Reports.vue?vue&type=script&lang=ts\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--14-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Reports.vue?vue&type=script&lang=ts\"","import { render, staticRenderFns } from \"./Reports.vue?vue&type=template&id=21b5fd7b\"\nimport script from \"./Reports.vue?vue&type=script&lang=ts\"\nexport * from \"./Reports.vue?vue&type=script&lang=ts\"\nimport style0 from \"./Reports.vue?vue&type=style&index=0&id=21b5fd7b&prod&lang=scss\"\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","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--8-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../node_modules/sass-loader/lib/loader.js??ref--8-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Reports.vue?vue&type=style&index=0&id=21b5fd7b&prod&lang=scss\""],"sourceRoot":""}