moodle_local_treestudyplan/amd/build/page-result-overview.min.js.map
2024-02-24 23:43:57 +01:00

1 line
6.0 KiB
Plaintext

{"version":3,"file":"page-result-overview.min.js","sources":["../src/page-result-overview.js"],"sourcesContent":["/*eslint no-var: \"error\" */\n/*eslint no-unused-vars: \"off\" */\n/*eslint linebreak-style: \"off\" */\n/*eslint no-trailing-spaces: \"off\" */\n/*eslint-env es6*/\n\nimport {call} from 'core/ajax';\nimport notification from 'core/notification';\n\nimport Vue from './vue/vue';\n\nimport Debugger from './util/debugger';\nimport {load_strings} from './util/string-helper';\n\nimport SRComponents from './studyplan-report-components';\nVue.use(SRComponents);\nimport RVComponents from './report-viewer-components';\nVue.use(RVComponents);\n\nimport ModalComponents from './modedit-modal';\nVue.use(ModalComponents);\n\nimport PortalVue from './portal-vue/portal-vue.esm';\nVue.use(PortalVue);\nimport BootstrapVue from './bootstrap-vue/bootstrap-vue';\nVue.use(BootstrapVue);\n\n\nlet debug = new Debugger(\"treestudyplanviewer\");\n\nlet strings = load_strings({\n studyplan_report: {\n studyplan_select_placeholder: 'studyplan_select_placeholder',\n studyplan: 'studyplan',\n page: 'studyplanpage',\n periods: 'periods',\n period: 'period',\n loading: 'loading@core',\n all: 'all@core',\n from: 'from@core',\n to: 'to@core',\n },\n});\n\n/**\n * Initialize the Page\n * @param {Number} studyplanid The id of the studyplan we need to view \n * @param {Number} pageid The id of the studyplan page we need to view \n * @param {Number} firstperiod The number of the first period to view\n * @param {Number} lastperiod The number of the last period to view \n */\nexport function init(studyplanid, pageid, firstperiod, lastperiod) {\n if (undefined === pageid || !Number.isInteger(Number(pageid)) ||\n undefined === studyplanid || !Number.isInteger(Number(studyplanid))) {\n debug.error(\"Error: studyplan id and page id not provided as integer numbers to script.\",\n studyplanid, pageid, firstperiod, lastperiod);\n return; // Do not continue if plan and page are not proper integers\n }\n // Ensure a numeric value instead of string.\n studyplanid = Number(studyplanid);\n pageid = Number(pageid);\n\n // Startup app.\n const app = new Vue({\n el: '#root',\n data: {\n structure: null,\n studyplan: null,\n page: null,\n text: strings.studyplan_report,\n },\n async mounted() {\n \n }, \n created() {\n // On creation, load the page as specified\n this.loadStructure(pageid,firstperiod,lastperiod);\n },\n computed: {\n \n },\n methods: {\n loadStructure(pageid,firstperiod,lastperiod) {\n const self = this;\n this.structure = null; // Starts loading icon. Hides old data.\n call([{\n methodname: 'local_treestudyplan_get_report_structure',\n args: { pageid: pageid,\n firstperiod: firstperiod,\n lastperiod: lastperiod\n }\n }])[0].then(function(response){\n self.structure = response;\n self.studyplan = response.studyplan;\n self.page = response.page;\n }).catch(notification.exception);\n },\n selectedPage(e) {\n debug.info(\"SelectedPage\",e);\n const pageid = e.target.value;\n this.loadStructure(pageid);\n },\n selectedFirstPeriod(e) {\n debug.info(\"selectedFirstPeriod\",e);\n let f = e.target.value;\n let l = this.structure.lastperiod;\n if ( l < f) {\n l = f;\n }\n this.loadStructure(this.page.id,f,l);\n },\n selectedLastPeriod(e) {\n debug.info(\"selectedLastPeriod\",e);\n let f = this.structure.firstperiod;\n let l = e.target.value;\n if ( l < f) {\n l = f;\n }\n this.loadStructure(this.page.id,f,l);\n\n },\n },\n });\n}\n"],"names":["studyplanid","pageid","firstperiod","lastperiod","undefined","Number","isInteger","debug","error","Vue","el","data","structure","studyplan","page","text","strings","studyplan_report","created","loadStructure","computed","methods","self","this","methodname","args","then","response","catch","notification","exception","selectedPage","e","info","target","value","selectedFirstPeriod","f","l","id","selectedLastPeriod","use","SRComponents","RVComponents","ModalComponents","PortalVue","BootstrapVue","Debugger","studyplan_select_placeholder","periods","period","loading","all","from","to"],"mappings":"gmBAmDqBA,YAAaC,OAAQC,YAAaC,oBAC/CC,IAAcH,SAAWI,OAAOC,UAAUD,OAAOJ,eACjDG,IAAcJ,cAAgBK,OAAOC,UAAUD,OAAOL,0BACtDO,MAAMC,MAAM,6EACRR,YAAaC,OAAQC,YAAaC,YAI1CH,YAAcK,OAAOL,aACrBC,OAASI,OAAOJ,QAGJ,IAAIQ,aAAI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