/home/techb158/ileadtechnology.com/SSM/public/js/academic/timetable
Edit: /home/techb158/ileadtechnology.com/SSM/public/js/academic/timetable/index.js (15651B)
(window.webpackJsonp=window.webpackJsonp||[]).push([[28],{ov14:function(t,e,s){"use strict";s.r(e);var a={components:{},data:function(){return{timetables:{total:0,data:[]},filter:{sort_by:"date_effective",order:"desc",batch_id:[],date_effective:"",show_session_name:!0,show_session_timing:!0,show_session_subject_name:!0,show_session_teacher_name:!0,page_length:helper.getConfig("page_length")},orderByOptions:[{value:"date_effective",translation:i18n.academic.date_effective}],batches:[],selected_batches:null,showFilterPanel:!1,help_topic:""}},mounted:function(){helper.hasPermission("list-timetable")||(helper.notAccessibleMsg(),this.$router.push("/dashboard")),this.getTimetables(),helper.showDemoNotification(["academic_timetable"])},methods:{getConfig:function(t){return helper.getConfig(t)},hasPermission:function(t){return helper.hasPermission(t)},getTimetables:function(t){var e=this,s=this.$loading.show();this.filter.date_effective=helper.toDate(this.filter.date_effective),"number"!=typeof t&&(t=1);var a=helper.getFilterURL(this.filter);axios.get("/api/timetable?page="+t+a).then((function(t){e.timetables=t.timetables,e.batches=t.filters.batches,s.hide()})).catch((function(t){s.hide(),helper.showErrorMsg(t)}))},editTimetable:function(t){this.$router.push("/academic/timetable/"+t.uuid+"/edit")},confirmDelete:function(t){var e=this;return function(s){return e.deleteTimetable(t)}},deleteTimetable:function(t){var e=this,s=this.$loading.show();axios.delete("/api/timetable/"+t.uuid).then((function(t){toastr.success(t.message),e.getTimetables(),s.hide()})).catch((function(t){s.hide(),helper.showErrorMsg(t)}))},print:function(){var t=this.$loading.show();axios.post("/api/timetable/print",{filter:this.filter}).then((function(e){var s=window.open("/print");t.hide(),s.document.write(e)})).catch((function(e){t.hide(),helper.showErrorMsg(e)}))},pdf:function(){var t=this,e=this.$loading.show();axios.post("/api/timetable/pdf",{filter:this.filter}).then((function(s){e.hide(),window.open("/download/report/"+s+"?token="+t.authToken)})).catch((function(t){e.hide(),helper.showErrorMsg(t)}))},getStartTime:function(t){return moment(t.timetable_sessions[0].start,"HH:mm:ss").format("h:mm a")},getEndTime:function(t){var e=t.timetable_sessions.length;return moment(t.timetable_sessions[e-1].end,"HH:mm:ss").format("h:mm a")},getStatus:function(t){var e=0,s=0;return t.timetable_allocations.forEach((function(t){t.timetable_allocation_details.forEach((function(t){t.class_timing_session.is_a_break||(e++,t.subject_id&&s++)}))})),e?s