/home/techb158/ileadtechnology.com/SSM/public/js/exam/record
NameSizeModeActions
index.js131100644editdlrm
index.js.map1440644editdlrm
observation.js95090644editdlrm
observation.js.map1650644editdlrm
Edit: /home/techb158/ileadtechnology.com/SSM/public/js/exam/record/observation.js (9509B)
(window.webpackJsonp=window.webpackJsonp||[]).push([[205],{vHRp:function(t,e,s){"use strict";s.r(e);var a={components:{},data:function(){return{recordForm:new Form({batch_id:"",exam_id:"",observation_marks:[]},!1),all_batches:[],batches:[],selected_batch:null,exams:[],selected_exam:null,student_records:[],exam_observation:{},disable_filter:!1,disable_input:!0,show_comment:!1}},mounted:function(){helper.hasPermission("store-exam-mark")||(helper.notAccessibleMsg(),this.$router.push("/dashboard")),this.getPreRequisite()},methods:{hasPermission:function(t){return helper.hasPermission(t)},getMarkName:function(t,e){return t+"_"+e+"_mark"},getCommentName:function(t){return t+"_comment"},getPreRequisite:function(){var t=this,e=this.$loading.show();axios.get("/api/exam/record/observation/pre-requisite").then((function(s){t.all_batches=s.batches,t.exams=s.exams,t.id&&t.get(),e.hide()})).catch((function(t){e.hide(),helper.showErrorMsg(t)}))},resetFilter:function(){this.recordForm.observation_marks=[],this.student_records=[],this.exam_observation={},this.disable_filter=!1},getStudents:function(){var t=this,e=this.$loading.show();this.disable_filter=!0,axios.post("/api/exam/record/observation/student",{exam_id:this.recordForm.exam_id,batch_id:this.recordForm.batch_id}).then((function(s){t.student_records=s.student_records,t.exam_observation=s.exam_observation,t.disable_input=s.exam_schedule.disable_input,t.recordForm.observation_marks=[],t.student_records.forEach((function(e){var a="";if(s.exam_schedule&&s.exam_schedule.observation_marks){var o=s.exam_schedule.observation_marks.find((function(t){return t.id==e.id}));void 0!==o&&o.hasOwnProperty("comment")&&(a=o.comment)}var r=[];t.exam_observation.details.forEach((function(t){var a=0,o="";if(s.exam_schedule&&s.exam_schedule.observation_marks){var i=s.exam_schedule.observation_marks.find((function(t){return t.id==e.id}));if(void 0!==i&&i.hasOwnProperty("observation_details")){var n=i.observation_details.find((function(e){return e.id==t.id}));void 0!==n&&(a=n.ob,o=n.comment)}}r.push({id:t.id,ob:a,comment:o})})),t.recordForm.observation_marks.push({id:e.id,name:helper.getStudentName(e.student),roll_number:helper.getRollNumber(e),ob_marks:r,comment:a})})),t.recordForm.observation_marks.sort((function(t,e){var s=t.name.toUpperCase(),a=e.name.toUpperCase();return sa?1:0})),e.hide()})).catch((function(s){t.disable_filter=!1,e.hide(),helper.showErrorMsg(s)}))},submit:function(){var t=this.$loading.show();this.recordForm.post("/api/exam/record/observation").then((function(e){t.hide(),toastr.success(e.message)})).catch((function(e){t.hide(),helper.showErrorMsg(e)}))},confirmDelete:function(){var t=this;return function(e){return t.deleteRecord()}},deleteRecord:function(){var t=this,e=this.$loading.show();axios.post("/api/exam/record/observation/delete",{batch_id:this.recordForm.batch_id,exam_id:this.recordForm.exam_id}).then((function(s){toastr.success(s.message),t.getStudents(),e.hide()})).catch((function(t){e.hide(),helper.showErrorMsg(t)}))},onBatchSelect:function(t){this.recordForm.batch_id=t.id},onExamSelect:function(t){this.recordForm.batch_id="",this.selected_batch=null,t.course_group_id?this.batches=this.all_batches.filter((function(e){return e.course_group===t.course_group_name})):this.batches=this.all_batches,this.recordForm.exam_id=t.id}},watch:{}},o=s("KHd+"),r=Object(o.a)(a,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",[s("div",{staticClass:"page-titles"},[s("div",{staticClass:"row"},[s("div",{staticClass:"col-12 col-sm-6"},[s("h3",{staticClass:"text-themecolor"},[t._v(t._s(t.trans("exam.record_observation")))])]),t._v(" "),s("div",{staticClass:"col-12 col-sm-6"},[s("div",{staticClass:"action-buttons pull-right"},[s("button",{staticClass:"btn btn-info btn-sm",on:{click:function(e){return t.$router.push("/exam/record")}}},[s("i",{staticClass:"fas fa-list"}),t._v(" "),s("span",{staticClass:"d-none d-sm-inline"},[t._v(t._s(t.trans("exam.record")))])]),t._v(" "),s("button",{staticClass:"btn btn-info btn-sm",on:{click:function(e){return t.$router.push("/exam/schedule")}}},[s("i",{staticClass:"fas fa-list"}),t._v(" "),s("span",{staticClass:"d-none d-sm-inline"},[t._v(t._s(t.trans("exam.schedule")))])])])])])]),t._v(" "),s("div",{staticClass:"container-fluid"},[s("div",{staticClass:"card card-form"},[s("div",{staticClass:"card-body p-t-20"},[s("form",{on:{submit:function(e){return e.preventDefault(),t.submit(e)},keydown:function(e){return t.recordForm.errors.clear(e.target.name)}}},[s("div",{staticClass:"row"},[s("div",{staticClass:"col-12 col-sm-3"},[s("div",{staticClass:"form-group"},[s("label",{attrs:{for:""}},[t._v(t._s(t.trans("exam.exam"))+" ")]),t._v(" "),s("v-select",{attrs:{label:"name",disabled:t.disable_filter,name:"exam_id",id:"exam_id",options:t.exams,placeholder:t.trans("exam.select_exam")},on:{select:t.onExamSelect,close:function(e){return t.recordForm.errors.clear("exam_id")},remove:function(e){t.recordForm.exam_id=""}},model:{value:t.selected_exam,callback:function(e){t.selected_exam=e},expression:"selected_exam"}},[t.exams.length?t._e():s("div",{staticClass:"multiselect__option",attrs:{slot:"afterList"},slot:"afterList"},[t._v("\n\t\t\t "+t._s(t.trans("general.no_option_found"))+"\n\t\t\t ")])]),t._v(" "),s("show-error",{attrs:{"form-name":t.recordForm,"prop-name":"exam_id"}})],1)]),t._v(" "),s("div",{staticClass:"col-12 col-sm-3"},[s("div",{staticClass:"form-group"},[s("label",{attrs:{for:""}},[t._v(t._s(t.trans("academic.batch"))+" ")]),t._v(" "),s("v-select",{attrs:{label:"name",disabled:t.disable_filter,"group-values":"batches","group-label":"course_group","group-select":!1,name:"batch_id",id:"batch_id",options:t.batches,placeholder:t.trans("academic.select_batch")},on:{select:t.onBatchSelect,close:function(e){return t.recordForm.errors.clear("batch_id")},remove:function(e){t.recordForm.batch_id=""}},model:{value:t.selected_batch,callback:function(e){t.selected_batch=e},expression:"selected_batch"}},[t.batches.length?t._e():s("div",{staticClass:"multiselect__option",attrs:{slot:"afterList"},slot:"afterList"},[t._v("\n\t\t\t "+t._s(t.trans("general.no_option_found"))+"\n\t\t\t ")])]),t._v(" "),s("show-error",{attrs:{"form-name":t.recordForm,"prop-name":"batch_id"}})],1)])]),t._v(" "),s("div",{staticClass:"card-footer text-right"},[t.disable_filter?s("button",{staticClass:"btn btn-danger m-r-10",attrs:{type:"button"},on:{click:t.resetFilter}},[t._v(t._s(t.trans("general.reset")))]):s("button",{staticClass:"btn btn-info waves-effect waves-light",attrs:{type:"button"},on:{click:t.getStudents}},[t._v(t._s(t.trans("general.proceed")))])]),t._v(" "),t.recordForm.observation_marks.length?s("div",{staticClass:"row"},[s("div",{staticClass:"col-12 col-sm-3"},[t.show_comment?s("button",{staticClass:"btn btn-sm btn-info",attrs:{type:"button"},on:{click:function(e){t.show_comment=!t.show_comment}}},[t._v(t._s(t.trans("exam.hide_comment")))]):s("button",{staticClass:"btn btn-sm btn-info",attrs:{type:"button"},on:{click:function(e){t.show_comment=!t.show_comment}}},[t._v(t._s(t.trans("exam.show_comment")))])]),t._v(" "),t._l(t.exam_observation.details,(function(e){return s("div",{staticClass:"col-12 col-sm-3"},[s("div",{staticClass:"form-group"},[s("label",[t._v(t._s(e.name))]),t._v(" "),s("br"),t._v(" "),s("span",{staticClass:"help-block font-80pc"},[t._v(t._s(t.trans("exam.observation_detail",{max_mark:e.max_mark})))])])])}))],2):t._e(),t._v(" "),t._l(t.recordForm.observation_marks,(function(e,a){return s("div",{staticClass:"row"},[s("div",{staticClass:"col-12 col-sm-3"},[s("div",{staticClass:"form-group"},[t._v("\n "+t._s(e.name)+" "+t._s(e.roll_number)+"\n ")])]),t._v(" "),t._l(e.ob_marks,(function(e,o){return s("div",{staticClass:"col-12 col-sm-3"},[s("div",{staticClass:"form-group"},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.ob,expression:"ob_mark.ob"}],staticClass:"form-control",attrs:{disabled:t.disable_input,type:"text",name:t.getMarkName(a,o),placeholder:t.trans("exam.obtained_mark")},domProps:{value:e.ob},on:{input:function(s){s.target.composing||t.$set(e,"ob",s.target.value)}}}),t._v(" "),s("show-error",{attrs:{"form-name":t.recordForm,"prop-name":t.getMarkName(a,o)}})],1)])})),t._v(" "),t.show_comment?s("div",{staticClass:"col-12"},[s("div",{staticClass:"row"},[s("div",{staticClass:"col-12 col-sm-3"}),t._v(" "),s("div",{staticClass:"col-12 col-sm-9"},[s("div",{staticClass:"form-group"},[s("autosize-textarea",{attrs:{disabled:t.disable_input,rows:"1",name:t.getCommentName(a),placeholder:t.trans("exam.mark_comment")},model:{value:e.comment,callback:function(s){t.$set(e,"comment",s)},expression:"mark.comment"}})],1)])])]):t._e()],2)})),t._v(" "),t.recordForm.observation_marks.length&&!t.disable_input?s("div",{staticClass:"card-footer text-right"},[s("button",{directives:[{name:"confirm",rawName:"v-confirm",value:{ok:t.confirmDelete()},expression:"{ok: confirmDelete()}"}],key:"delete-record",staticClass:"btn btn-danger",attrs:{type:"button"}},[t._v(t._s(t.trans("general.delete")))]),t._v(" "),s("button",{staticClass:"btn btn-info waves-effect waves-light",attrs:{type:"submit"}},[t._v(t._s(t.trans("general.save")))])]):t._e()],2)])])])])}),[],!1,null,null,null);e.default=r.exports}}]); //# sourceMappingURL=observation.js.map?id=f736401f9ef1402040a9