{"version":3,"sources":["webpack:///./src/views/student/Academics.vue?e03c","webpack:///./src/views/student/Academics.vue","webpack:///./src/views/student/Academics.vue?5b66","webpack:///./src/views/student/Academics.vue?9816","webpack:///./src/core/helpers/breadcrumb.ts"],"names":["class","style","classes","placeholder","selectedSemester","semesterListData","semester","label","name","code","moment","start_date","format","end_date","value","id","key","sessions","items","index","subject","session","level","program","pass_fail","src","attendance_rate","data","student_grades","prop","scope","row","achieved_point","assessment","max_point","toFixed","components","route","params","studentAcademics","getClasses","Promise","resolve","reject","ApiService","setHeader","get","then","forEach","classData","filter","x","length","push","sort","a","b","Date","parse","catch","error","Error","semester_id","sessionGroup","groupBy","session_id","render","setCurrentPageBreadcrumbs","pageTitle","breadcrumbs","dispatch","SET_BREADCRUMB_ACTION","title","pageBreadcrumbPath","setCurrentPageTitle"],"mappings":"kHAAA,W,kECCOA,MAAM,sB,SAMJA,MAAM,4B,SAGNA,MAAM,4B,GACJA,MAAM,yE,GAgBLA,MAAM,gCAAgCC,MAAA,mB,GAClCD,MAAM,sBAAsBC,MAAA,0B,SAC8EA,MAAA,iD,SACpEA,MAAA,mB,SAC7BA,MAAA,e,GAKXA,MAAA,uB,uPAnCZ,gCAkDM,MAlDN,EAkDM,C,YAjDJ,gCAIM,OAJDD,MAAM,uCAAqC,CAC9C,gCAEM,OAFDA,MAAM,kBAAgB,CACzB,gCAA+C,MAA3CA,MAAM,iBAAgB,wB,IAGe,EAAAE,S,yBAG7C,gCAwCM,MAxCN,EAwCM,CAvCJ,gCAcM,MAdN,EAcM,CAbJ,yBAYY,GAXRF,MAAM,0BACNG,YAAY,kB,WACH,EAAAC,iB,qCAAA,EAAgB,qB,8BAGzB,IAAoC,E,2BADtC,gCAMY,2CALS,EAAAC,iBAAZC,I,yBADT,yBAMY,GAJTC,MAAOD,EAASE,KAAK,IAAIF,EAASG,KAAK,IAAI,EAAAC,OAAOJ,EAASK,YAAYC,OAAO,cAAc,IAAI,EAAAF,OAAOJ,EAASO,UAAUD,O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AAe8C,KAAKC,MAAMF,EAAE7C,YAClC,EACP8C,KAAKC,MAAMH,EAAE5C,YAAe8C,KAAKC,MAAMF,EAAE7C,aACjC,EACL,KAGZN,EAAiBS,MAAMsC,OAAS,IACjChD,EAAiBU,MAAQT,EAAiBS,MAAM,GAAGC,IAGrDb,EAAQY,MAAQa,EAAKA,KACrBe,EAAQf,EAAKA,QAEdgC,MAAOC,IACJjB,EAAO,IAAIkB,MAAO,yBAAyBD,WAKrD3C,EAAW,sBAAS,KACtB,IAAIU,EAAOzB,EAAQY,MAAMoC,OAAOC,GAAGA,EAAE/B,QAAQC,QAAQC,MAAMC,QAAQuC,aAAe1D,EAAiBU,OAC/FiD,EAAe,IAAEC,QAAQrC,EAAMA,GAAQA,EAAKP,QAAQ6C,YAExD,OAAOF,IAWX,OARA,2BAAc,IAAU,qDAChBvB,QAGR,uBAAU,KACR,eAA0B,YAAa,CAAC,cAGnC,CACLD,mBACAlC,mBACAD,mBACAF,UACAQ,OAAA,IACAO,e,UCxEN,EAAOiD,OAASA,EAED,gB,yDCPf,gGAQO,MAAMC,EAA4B,CACvCC,EACAC,KAEA,OAAMC,SAAS,OAAQC,sBAAuB,CAC5CC,MAAOJ,EACPK,mBAAoBJ,KAQXK,EAAuBF,IAClC,OAAMF,SAAS,OAAQC,sBAAuB,CAC5CC,MAAOA","file":"js/chunk-3cc4c45d.1df1f2c6.js","sourcesContent":["export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../node_modules/@vue/cli-service/node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader-v16/dist/index.js??ref--0-1!./Academics.vue?vue&type=style&index=0&id=3b2935f3&lang=css\"","\r\n\r\n\r\n\r\n","\r\nimport { computed, defineComponent, onBeforeMount, onMounted, reactive, ref } from \"vue\";\r\nimport { setCurrentPageBreadcrumbs } from \"@/core/helpers/breadcrumb\";\r\nimport ApiService from \"@/core/services/ApiService\";\r\nimport { useRoute } from \"vue-router\";\r\nimport moment from \"moment\";\r\nimport _ from \"lodash\";\r\n\r\nexport default defineComponent({\r\n name: \"student-academics\",\r\n components: {\r\n },\r\n setup() {\r\n const route = useRoute();\r\n const id : number = +route.params.id; \r\n const classes = ref([]);\r\n const semesterListData = ref([]);\r\n const selectedSemester = ref(null as any);\r\n const studentAcademics = ref([]);\r\n\r\n const getClasses = async() => {\r\n await new Promise((resolve, reject) => {\r\n ApiService.setHeader(); \r\n ApiService.get(\"class-student/subjects/detail/\"+id)\r\n .then(({ data }) => {\r\n semesterListData.value = [];\r\n data.data.forEach(classData => {\r\n let semester = classData.subject.session.level.program.semester;\r\n if(semesterListData.value.filter(x=>x.id ===semester.id).length === 0){\r\n semesterListData.value.push(semester);\r\n }\r\n });\r\n\r\n semesterListData.value = semesterListData.value.sort(function(a,b) { \r\n if(a.id == b.id) return 0;\r\n\r\n if (Date.parse(a.start_date!) < Date.parse(b.start_date!))\r\n return 1;\r\n if (Date.parse(a.start_date!) > Date.parse(b.start_date!))\r\n return -1;\r\n return 0;\r\n });\r\n\r\n if(semesterListData.value.length > 0){\r\n selectedSemester.value = semesterListData.value[0].id;\r\n }\r\n\r\n classes.value = data.data;\r\n resolve(data.data);\r\n })\r\n .catch((error) => {\r\n reject(new Error ('getSemesters error => '+error));\r\n });\r\n });\r\n }\r\n\r\n const sessions = computed(() => {\r\n let data = classes.value.filter(x=>x.subject.session.level.program.semester_id == selectedSemester.value);\r\n let sessionGroup = _.groupBy(data, data => data.subject.session_id); \r\n \r\n return sessionGroup;\r\n });\r\n\r\n onBeforeMount(async() =>{\r\n await getClasses();\r\n }) \r\n\r\n onMounted(() => {\r\n setCurrentPageBreadcrumbs(\"Academics\", [\"Student\"]);\r\n });\r\n\r\n return {\r\n studentAcademics,\r\n semesterListData,\r\n selectedSemester,\r\n classes,\r\n moment,\r\n sessions\r\n };\r\n },\r\n});\r\n","import { render } from \"./Academics.vue?vue&type=template&id=3b2935f3\"\nimport script from \"./Academics.vue?vue&type=script&lang=ts\"\nexport * from \"./Academics.vue?vue&type=script&lang=ts\"\n\nimport \"./Academics.vue?vue&type=style&index=0&id=3b2935f3&lang=css\"\nscript.render = render\n\nexport default script","import store from \"@/store\";\r\nimport { Actions } from \"@/store/enums/StoreEnums\";\r\n\r\n/**\r\n * Sets current page breadcrumbs\r\n * @param {string} pageTitle Current page title\r\n * @param {Array} breadcrumbs Current page breadcrumbs\r\n */\r\nexport const setCurrentPageBreadcrumbs = (\r\n pageTitle: string,\r\n breadcrumbs: Array\r\n): void => {\r\n store.dispatch(Actions.SET_BREADCRUMB_ACTION, {\r\n title: pageTitle,\r\n pageBreadcrumbPath: breadcrumbs,\r\n });\r\n};\r\n\r\n/**\r\n * Sets current page breadcrumbs\r\n * @param {string} title Current page title name\r\n */\r\nexport const setCurrentPageTitle = (title: string): void => {\r\n store.dispatch(Actions.SET_BREADCRUMB_ACTION, {\r\n title: title,\r\n });\r\n};\r\n"],"sourceRoot":""}