{"version":3,"sources":["webpack:///./src/views/pages/Examination/Main/data/data-handlers.js","webpack:///./src/views/pages/Examination/Main/subcomponents/editor-edit-exam.vue?7217","webpack:///src/views/pages/Examination/Main/subcomponents/editor-edit-exam.vue","webpack:///./src/views/pages/Examination/Main/subcomponents/editor-edit-exam.vue?9bac","webpack:///./src/views/pages/Examination/Main/subcomponents/editor-edit-exam.vue?18ad","webpack:///./src/views/pages/Examination/Main/subcomponents/editor-edit-exam.vue?f14e"],"names":["submitForm","payload","store","dispatch","result","handleDeleteListItem","tr","sure","confirm","id","alert","loadData","render","_vm","this","_h","$createElement","_c","_self","attrs","_m","staticClass","on","save","_v","staticRenderFns","components","Block","data","local","selection","form","list","input","computed","subjectOptions","courseOutlineOptions","courseOutlineRemainOptions","used","includes","item","remain","methods","handleCourseOutlineUnitSelect","courseOutlineUnitId","multipleValues","vdoSetUnitInput","unitSeq","handleRemarkInput","remark","component"],"mappings":"8PA+BaA,EAAU,yDAAG,WAAOC,GAAP,uGACHC,OAAMC,SAAS,sBAAuBF,GADnC,cAClBG,EADkB,yBAEjBA,GAFiB,2CAAH,sDAsDVC,EAAoB,yDAAG,WAAOC,GAAP,4FAC5BC,EAAOC,QAAQ,aAEbC,EAAOH,EAAPG,IACJF,EAJ8B,gCAK1BL,OAAMC,SAAS,oEAAqE,CAAEM,OAL5D,OAMhCC,MAAM,kBACNC,iBAPgC,2CAAH,uD,oECrFjC,IAAIC,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACE,MAAM,CAAC,GAAK,wBAAwB,CAACN,EAAIO,GAAG,GAAGH,EAAG,MAAM,CAACI,YAAY,SAAS,CAACJ,EAAG,MAAM,CAACI,YAAY,iBAAiB,CAACJ,EAAG,YAAY,CAACK,GAAG,CAAC,MAAQT,EAAIU,OAAO,CAACV,EAAIW,GAAG,aAAa,QACzRC,EAAkB,CAAC,WAAa,IAAIZ,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACI,YAAY,WAAW,CAACJ,EAAG,MAAM,CAACI,YAAY,WAAW,CAACJ,EAAG,OAAO,CAACJ,EAAIW,GAAG,gBAAgBP,EAAG,OAAO,CAACI,YAAY,cAAc,CAACR,EAAIW,GAAG,qB,gHC0D7P,G,8BAAA,CACEE,WAAY,CACVC,MAAJ,QAEEC,KAJF,WAKI,MAAO,CACLC,MAAO,EAAb,WACM3B,MAAO,EAAb,WACM4B,UAAW,EAAjB,2BACMC,KAAM,EAAZ,gBACMC,KAAM,EAAZ,gBACMC,MAAO,KAGXC,SAAU,CACRC,eADJ,WAEM,OAAO,EAAb,oCAEIC,qBAJJ,WAKM,OAAO,EAAb,0CAEIC,2BAPJ,WASM,IAAN,0DAEA,iEAEQ,OAAQC,EAAKC,SAASC,EAAK/B,OAG7B,OAAOgC,IAGXC,QAAS,CACPC,8BADJ,SACA,GACM7B,KAAKiB,KAAKa,oBAAsBhB,EAAKiB,eAAeD,oBACpD9B,KAAKiB,KAAKe,gBAAgBC,QAAUnB,EAAKiB,eAAeE,SAE1DC,kBALJ,YAKA,aACMlC,KAAKiB,KAAKe,gBAAgBG,OAASrB,GAErC,KARJ,WAQA,uKACA,GACA,gCACA,4CACA,kCACA,mCALA,SAOA,kBAPA,OAOA,EAPA,OAQA,mBACA,qDACA,2BACA,kBAXA,iDCpGsZ,I,wBCQlZsB,EAAY,eACd,EACAtC,EACAa,GACA,EACA,KACA,WACA,MAIa,aAAAyB,E,2CCnBf","file":"js/chunk-9da99a30.c713cb7d.js","sourcesContent":["/* ********************************\n * Data Handlers\n * ********************************\n */\n\n/* eslint-disable no-unused-vars */\nimport state from \"./index\";\nimport store from \"@/store\";\nimport router from \"@/router\";\nimport { loadData } from \"./data-loader\";\n\n\n/** \n * Submit Form Data\n * \n * @param {Object} payload Contain requires inputs for adding data\n * @property {Object, required} courseOutlineRegistrationInput : {\n academicPeriodId: \"\", // {String} Get it from filter selection.\n periodCode: \"\", // {String} Get it from filter selection.\n degreeId: \"\", // {String} Get it from filter selection.\n subjectGroupId: \"\", // {String} Get it from filter selection.\n subjectId: \"\", // {String} Get it from Course Outline Selection.\n subjectCode: \"\", // {String} \"----------------------------------\"\n subjectName: \"\", // {String} \"----------------------------------\"\n courseOutlineId: \"\", // {String} \"----------------------------------\"\n teacherId: \"\", // {String} \"----------------------------------\"\n teacherCode: \"\", // {String} \"----------------------------------\"\n }\n * \n */\n\nexport const submitForm = async (payload) => {\n const result = await store.dispatch(\"Examination/addExam\", payload);\n return result;\n}\n\n// export const addData = async (payload) => {\n// const sample = {\n// courseOutlineRegistrationInput: {\n// academicPeriodId: \"\",\n// periodCode: \"\",\n// courseOutlineId: \"\",\n// degreeId: \"\",\n// subjectGroupId: \"\",\n// subjectId: \"\",\n// subjectCode: \"\",\n// subjectName: \"\",\n// teacherId: \"\",\n// teacherCode: \"\",\n// }\n// };\n// store.dispatch(\"Courses/CourseOutlineRegistration/addCourseOutlineRegistration\", sample);\n// };\n\n\n\n// export const handleSelectedListItem = (tr) => {\n// const id = tr.id || null;\n// if (id) {\n// router.push(\n// {\n// name: \"vdo-set-topic\",\n// params: {\n// vdoSetUnitId: id\n// }\n// }\n// )\n// }\n// }\n\n\n// export const handleEdit = (data) => {\n// if (data) {\n// state.local.form.id = data.id;\n// state.local.form.teacherId = data.teacher.id;\n// state.local.form.vdoSetUnitInput.unitSeq = data.unitSeq;\n// state.local.form.vdoSetUnitInput.code = state.local.vdoSet.code;\n// state.local.form.vdoSetUnitInput.totalVdoLength = data.vdoSet.totalVdoLength;\n// state.local.form.vdoSetUnitInput.status = \"\"\n// state.local.form.vdoSetUnitInput.remark = \"\"\n// state.local.editor = { name: \"EditVdoSetUnit\", mode: \"edit\", active: true };\n// }\n// }\n\n\nexport const handleDeleteListItem = async (tr) => {\n const sure = confirm(\"Yes or No\");\n // const sure = confirm(`ยืนยันการลบ Vdo Set Unit\\nวิชา ${tr.subject.nameLocal} (${tr.code})\\nสอนโดย ${tr.teacher.firstNameLocal} ${tr.teacher.lastNameLocal} ใช่หรือไม่?`);\n const { id } = tr;\n if (sure) {\n await store.dispatch(\"Courses/CourseOutlineRegistration/deleteCourseOutlineRegistration\", { id });\n alert('Delete Success');\n loadData();\n }\n}\n\n\n// export const submitForm = (formInput) => {\n// if (formInput) {\n// if (state.local.editor.mode === \"edit\") {\n// _store.dispatch('VdoSet/Units/updateVdoSetUnit', formInput);\n// } else {\n// _store.dispatch('VdoSet/Units/addVdoSetUnit', formInput);\n// }\n// } else {\n// alert(\"Requires to fill up the form\");\n// }\n// }\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{attrs:{\"id\":\"vdo-set-unit-editor\"}},[_vm._m(0),_c('div',{staticClass:\"-body\"},[_c('div',{staticClass:\"--controllers\"},[_c('vs-button',{on:{\"click\":_vm.save}},[_vm._v(\" Save \")])],1)])])}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"-header\"},[_c('div',{staticClass:\"--title\"},[_c('span',[_vm._v(\"Add Exam\")])]),_c('span',{staticClass:\"--subtitle\"},[_vm._v(\"เพิ่มข้อสอบ\")])])}]\n\nexport { render, staticRenderFns }","\n \n \n\n
\n \n \n
\n \n \n Save\n \n
\n
\n
\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!./editor-edit-exam.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!./editor-edit-exam.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./editor-edit-exam.vue?vue&type=template&id=2ebeb29d&scoped=true&\"\nimport script from \"./editor-edit-exam.vue?vue&type=script&lang=js&\"\nexport * from \"./editor-edit-exam.vue?vue&type=script&lang=js&\"\nimport style0 from \"./editor-edit-exam.vue?vue&type=style&index=0&id=2ebeb29d&lang=scss&scoped=true&\"\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 \"2ebeb29d\",\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/dist/cjs.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/dist/cjs.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!./editor-edit-exam.vue?vue&type=style&index=0&id=2ebeb29d&lang=scss&scoped=true&\""],"sourceRoot":""}