/home/techb158/ileadtechnology.com/SSM/public/js/student/attendance
NameSizeModeActions
absentee.js171150644editdlrm
absentee.js.map1730644editdlrm
index.js173270644editdlrm
index.js.map1580644editdlrm
Edit: /home/techb158/ileadtechnology.com/SSM/public/js/student/attendance/absentee.js (17115B)
(window.webpackJsonp=window.webpackJsonp||[]).push([[328],{"1N1I":function(t,e,s){"use strict";s.r(e);var a={components:{},data:function(){return{student_records:{total:0,data:[]},selectAll:!1,smsForm:new Form({sms:"",ids:[],filter:{}}),filter:{sort_by:"created_at",order:"asc",date:helper.today(),batch_id:"",subject_id:"",attendance_method:"",session:"",first_name:"",last_name:"",father_name:"",mother_name:"",page_length:helper.getConfig("page_length")},orderByOptions:[{value:"created_at",translation:i18n.general.created_at}],batches:[],subjects:[],batch_with_subjects:[],attendance_methods:[],attendance_method_more_than_once_types:[],selected_batch:null,showFilterPanel:!0}},mounted:function(){helper.hasPermission("list-student-attendance")||(helper.notAccessibleMsg(),this.$router.push("/dashboard")),helper.showDemoNotification(["student"]),this.getStudentRecords()},methods:{hasPermission:function(t){return helper.hasPermission(t)},getConfig:function(t){return helper.getConfig(t)},getStudentRecords:function(t){var e=this,s=this.$loading.show();"number"!=typeof t&&(t=1),this.selectAll=!1,this.filter.date=helper.toDate(this.filter.date);var a=helper.getFilterURL(this.filter);axios.get("/api/student/attendance/absentee?page="+t+a).then((function(t){e.batches=t.filters.batches,e.attendance_method_more_than_once_types=t.filters.attendance_method_more_than_once_types,e.attendance_methods=t.filters.attendance_methods,e.batch_with_subjects=t.filters.batch_with_subjects,e.student_records=t.student_records;var a=[];e.student_records.data.forEach((function(t){a.push(t.id)})),e.selectAll=a.every((function(t){return e.smsForm.ids.indexOf(t)>-1}))?1:0,s.hide()})).catch((function(t){s.hide(),helper.showErrorMsg(t)}))},toggleSelectAll:function(){var t=this;this.selectAll?this.student_records.data.forEach((function(e){t.smsForm.ids.indexOf(e.id)<0&&t.smsForm.ids.push(e.id)})):this.student_records.data.forEach((function(e){var s=t.smsForm.ids.indexOf(e.id);s>=0&&t.smsForm.ids.splice(s,1)}))},getStudentName:function(t){return helper.getStudentName(t)},print:function(){var t=this.$loading.show();axios.post("/api/student/attendance/absentee/print",{filter:this.filter}).then((function(e){window.open("/print").document.write(e),t.hide()})).catch((function(e){t.hide(),helper.showErrorMsg(e)}))},pdf:function(){var t=this,e=this.$loading.show();axios.post("/api/student/attendance/absentee/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)}))},onBatchSelect:function(t){var e=this;this.filter.batch_id=t.id;var s=this.batch_with_subjects.find((function(t){return t.id==e.filter.batch_id}));void 0!==s&&(this.filter.subject_id="",this.subjects=[],s.subjects.forEach((function(t){e.subjects.push({id:t.id,name:t.name+" ("+t.code+")"})})))},onBatchRemove:function(t){this.filter.batch_id.splice(this.filter.batch_id.indexOf(t.id),1)},submit:function(){},confirmSMS:function(){var t=this;return function(e){return t.sendSMS()}},sendSMS:function(){var t=this,e=this.$loading.show();this.smsForm.filter=this.filter,this.smsForm.post("/api/student/attendance/absentee").then((function(s){toastr.success(s.message),t.getStudentRecords(),t.smsForm.ids=[],e.hide()})).catch((function(t){e.hide(),helper.showErrorMsg(t)}))},getAdmissionNumber:function(t){return helper.getAdmissionNumber(t)}},filters:{moment:function(t){return helper.formatDate(t)},momentDateTime:function(t){return helper.formatDateTime(t)}},watch:{"filter.sort_by":function(t){this.getStudentRecords()},"filter.order":function(t){this.getStudentRecords()},"filter.page_length":function(t){this.getStudentRecords()}},computed:{authToken:function(){return helper.getAuthToken()},sampleMessage:function(){var t=this.student_records.data[0];return this.smsForm.sms.replace("#NAME#",this.getStudentName(t.student)).replace("#BATCH#",t.batch.course.name+" "+t.batch.name).replace("#FATHER_NAME#",t.student.parent.father_name).replace("#DATE#",helper.formatDate(this.filter.date))},characterCount:function(){return this.smsForm.sms.length}}},n=s("KHd+"),r=Object(n.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("student.absentee"))+" \n "),t.student_records.total?s("span",{staticClass:"card-subtitle d-none d-sm-inline"},[t._v(t._s(t.trans("general.total_result_found",{count:t.student_records.total,from:t.student_records.from,to:t.student_records.to})))]):s("span",{staticClass:"card-subtitle d-none d-sm-inline"},[t._v(t._s(t.trans("general.no_result_found")))])])]),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("/student/attendance")}}},[s("i",{staticClass:"fas fa-list"}),t._v(" "),s("span",{staticClass:"d-none d-sm-inline"},[t._v(t._s(t.trans("student.attendance")))])]),t._v(" "),t.showFilterPanel?t._e():s("button",{staticClass:"btn btn-info btn-sm",on:{click:function(e){t.showFilterPanel=!t.showFilterPanel}}},[s("i",{staticClass:"fas fa-filter"}),t._v(" "),s("span",{staticClass:"d-none d-sm-inline"},[t._v(t._s(t.trans("general.filter")))])]),t._v(" "),s("sort-by",{attrs:{"order-by-options":t.orderByOptions,"sort-by":t.filter.sort_by,order:t.filter.order},on:{updateSortBy:function(e){t.filter.sort_by=e},updateOrder:function(e){t.filter.order=e}}}),t._v(" "),s("div",{staticClass:"btn-group"},[s("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.trans("general.more_option"),expression:"trans('general.more_option')"}],staticClass:"btn btn-info btn-sm dropdown-toggle no-caret ",attrs:{type:"button",role:"menu",id:"moreOption","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"}},[s("i",{staticClass:"fas fa-ellipsis-h"}),t._v(" "),s("span",{staticClass:"d-none d-sm-inline"})]),t._v(" "),s("div",{class:["dropdown-menu","ltr"==t.getConfig("direction")?"dropdown-menu-right":""],attrs:{"aria-labelledby":"moreOption"}},[s("button",{staticClass:"dropdown-item custom-dropdown",on:{click:t.print}},[s("i",{staticClass:"fas fa-print"}),t._v(" "+t._s(t.trans("general.print")))]),t._v(" "),s("button",{staticClass:"dropdown-item custom-dropdown",on:{click:t.pdf}},[s("i",{staticClass:"fas fa-file-pdf"}),t._v(" "+t._s(t.trans("general.generate_pdf")))])])]),t._v(" "),s("help-button",{on:{clicked:function(e){t.help_topic="student-absentee"}}})],1)])])]),t._v(" "),s("div",{staticClass:"container-fluid"},[s("transition",{attrs:{name:"fade"}},[t.showFilterPanel?s("div",{staticClass:"card card-form"},[s("div",{staticClass:"card-body"},[s("h4",{staticClass:"card-title"},[t._v(t._s(t.trans("general.filter"))+"\n ")]),t._v(" "),s("div",{staticClass:"row"},[s("div",{staticClass:"col-12 col-sm-2"},[s("div",{staticClass:"form-group"},[s("label",{attrs:{for:""}},[t._v(t._s(t.trans("student.first_name")))]),t._v(" "),s("input",{directives:[{name:"model",rawName:"v-model",value:t.filter.first_name,expression:"filter.first_name"}],staticClass:"form-control",attrs:{name:"first_name"},domProps:{value:t.filter.first_name},on:{input:function(e){e.target.composing||t.$set(t.filter,"first_name",e.target.value)}}})])]),t._v(" "),s("div",{staticClass:"col-12 col-sm-2"},[s("div",{staticClass:"form-group"},[s("label",{attrs:{for:""}},[t._v(t._s(t.trans("student.last_name")))]),t._v(" "),s("input",{directives:[{name:"model",rawName:"v-model",value:t.filter.last_name,expression:"filter.last_name"}],staticClass:"form-control",attrs:{name:"last_name"},domProps:{value:t.filter.last_name},on:{input:function(e){e.target.composing||t.$set(t.filter,"last_name",e.target.value)}}})])]),t._v(" "),s("div",{staticClass:"col-12 col-sm-2"},[s("div",{staticClass:"form-group"},[s("label",{attrs:{for:""}},[t._v(t._s(t.trans("student.father_name")))]),t._v(" "),s("input",{directives:[{name:"model",rawName:"v-model",value:t.filter.father_name,expression:"filter.father_name"}],staticClass:"form-control",attrs:{name:"father_name"},domProps:{value:t.filter.father_name},on:{input:function(e){e.target.composing||t.$set(t.filter,"father_name",e.target.value)}}})])]),t._v(" "),s("div",{staticClass:"col-12 col-sm-2"},[s("div",{staticClass:"form-group"},[s("label",{attrs:{for:""}},[t._v(t._s(t.trans("student.mother_name")))]),t._v(" "),s("input",{directives:[{name:"model",rawName:"v-model",value:t.filter.mother_name,expression:"filter.mother_name"}],staticClass:"form-control",attrs:{name:"mother_name"},domProps:{value:t.filter.mother_name},on:{input:function(e){e.target.composing||t.$set(t.filter,"mother_name",e.target.value)}}})])]),t._v(" "),s("div",{staticClass:"col-12 col-sm-4"},[s("div",{staticClass:"form-group"},[s("label",{attrs:{for:""}},[t._v(t._s(t.trans("student.date_of_attendance")))]),t._v(" "),s("datepicker",{attrs:{bootstrapStyling:!0,placeholder:t.trans("student.date_of_attendance")},model:{value:t.filter.date,callback:function(e){t.$set(t.filter,"date",e)},expression:"filter.date"}})],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","track-by":"id","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,remove:function(e){t.filter.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._s(t.trans("general.no_option_found"))+"\n ")])])],1)]),t._v(" "),t.filter.batch_id?s("div",{staticClass:"col-12 col-sm-3"},[s("div",{staticClass:"form-group"},[s("label",{attrs:{for:""}},[t._v(t._s(t.trans("academic.subject"))+" ")]),t._v(" "),s("select",{directives:[{name:"model",rawName:"v-model",value:t.filter.subject_id,expression:"filter.subject_id"}],staticClass:"custom-select col-12",attrs:{name:"subject_id"},on:{change:function(e){var s=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.$set(t.filter,"subject_id",e.target.multiple?s:s[0])}}},[s("option",{attrs:{value:"",selected:""}},[t._v(t._s(t.trans("general.select_one")))]),t._v(" "),t._l(t.subjects,(function(e){return s("option",{domProps:{value:e.id}},[t._v("\n "+t._s(e.name)+"\n ")])}))],2)])]):t._e(),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("student.attendance_session")))]),t._v(" "),s("select",{directives:[{name:"model",rawName:"v-model",value:t.filter.session,expression:"filter.session"}],staticClass:"custom-select col-12",attrs:{name:"session"},on:{change:function(e){var s=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.$set(t.filter,"session",e.target.multiple?s:s[0])}}},[s("option",{attrs:{value:"",selected:""}},[t._v(t._s(t.trans("general.select_one")))]),t._v(" "),t._l(t.attendance_method_more_than_once_types,(function(e){return s("option",{domProps:{value:e.value}},[t._v("\n "+t._s(e.text)+"\n ")])}))],2)])])]),t._v(" "),s("div",{staticClass:"card-footer text-right"},[s("button",{staticClass:"btn btn-danger",attrs:{type:"button"},on:{click:function(e){t.showFilterPanel=!1}}},[t._v(t._s(t.trans("general.cancel")))]),t._v(" "),s("button",{staticClass:"btn btn-info waves-effect waves-light",attrs:{type:"button"},on:{click:t.getStudentRecords}},[t._v(t._s(t.trans("general.filter")))])])])]):t._e()]),t._v(" "),s("div",{staticClass:"card"},[s("div",{staticClass:"card-body"},[t.student_records.total?s("div",{staticClass:"table-responsive"},[s("table",{staticClass:"table table-sm"},[s("thead",[s("tr",[s("th",{staticClass:"select-all"},[s("label",{staticClass:"custom-control custom-checkbox"},[s("input",{directives:[{name:"model",rawName:"v-model",value:t.selectAll,expression:"selectAll"}],staticClass:"custom-control-input",attrs:{type:"checkbox",value:"1"},domProps:{checked:Array.isArray(t.selectAll)?t._i(t.selectAll,"1")>-1:t.selectAll},on:{change:[function(e){var s=t.selectAll,a=e.target,n=!!a.checked;if(Array.isArray(s)){var r=t._i(s,"1");a.checked?r<0&&(t.selectAll=s.concat(["1"])):r>-1&&(t.selectAll=s.slice(0,r).concat(s.slice(r+1)))}else t.selectAll=n},t.toggleSelectAll]}}),t._v(" "),s("span",{staticClass:"custom-control-label"})])]),t._v(" "),s("th",[t._v(t._s(t.trans("student.admission_number_short")))]),t._v(" "),s("th",[t._v(t._s(t.trans("student.name")))]),t._v(" "),s("th",[t._v(t._s(t.trans("student.father_name")))]),t._v(" "),s("th",[t._v(t._s(t.trans("student.mother_name")))]),t._v(" "),s("th",[t._v(t._s(t.trans("student.date_of_admission")))]),t._v(" "),s("th",[t._v(t._s(t.trans("academic.batch")))])])]),t._v(" "),s("tbody",t._l(t.student_records.data,(function(e){return s("tr",[s("td",{staticClass:"select-all"},[s("label",{staticClass:"custom-control custom-checkbox"},[s("input",{directives:[{name:"model",rawName:"v-model",value:t.smsForm.ids,expression:"smsForm.ids"}],staticClass:"custom-control-input",attrs:{type:"checkbox"},domProps:{value:e.id,checked:Array.isArray(t.smsForm.ids)?t._i(t.smsForm.ids,e.id)>-1:t.smsForm.ids},on:{change:function(s){var a=t.smsForm.ids,n=s.target,r=!!n.checked;if(Array.isArray(a)){var o=e.id,i=t._i(a,o);n.checked?i<0&&t.$set(t.smsForm,"ids",a.concat([o])):i>-1&&t.$set(t.smsForm,"ids",a.slice(0,i).concat(a.slice(i+1)))}else t.$set(t.smsForm,"ids",r)}}}),t._v(" "),s("span",{staticClass:"custom-control-label"})])]),t._v(" "),s("td",{domProps:{textContent:t._s(t.getAdmissionNumber(e.admission))}}),t._v(" "),s("td",{domProps:{textContent:t._s(t.getStudentName(e.student))}}),t._v(" "),s("td",{domProps:{textContent:t._s(e.student.parent.father_name)}}),t._v(" "),s("td",{domProps:{textContent:t._s(e.student.parent.mother_name)}}),t._v(" "),s("td",[t._v(t._s(t._f("moment")(e.admission.date_of_admission)))]),t._v(" "),s("td",{domProps:{textContent:t._s(e.batch.course.name+" "+e.batch.name)}})])})),0)])]):t._e(),t._v(" "),t.student_records.total?t._e():s("module-info",{attrs:{module:"student",title:"absentee_module_title",description:"absentee_module_description",icon:"list"}}),t._v(" "),s("pagination-record",{attrs:{"page-length":t.filter.page_length,records:t.student_records},on:{"update:pageLength":function(e){return t.$set(t.filter,"page_length",e)},"update:page-length":function(e){return t.$set(t.filter,"page_length",e)},updateRecords:t.getStudentRecords}})],1),t._v(" "),t.smsForm.ids.length?s("div",{staticClass:"m-t-10 card-body border-top p-4"},[s("h4",[t._v(t._s(t.trans("student.send_sms_to_absentee"))+"\n "),s("span",{staticClass:"card-subtitle"},[t._v(t._s(t.trans("student.no_of_student_selected",{no:t.smsForm.ids.length})))])]),t._v(" "),s("form",{on:{submit:function(e){return e.preventDefault(),t.submit(e)},keydown:function(e){return t.smsForm.errors.clear(e.target.name)}}},[s("div",{staticClass:"row"},[s("div",{staticClass:"col-12 col-sm-6"},[s("div",{staticClass:"form-group"},[s("label",{attrs:{for:""}},[t._v(t._s(t.trans("communication.sms"))+" "+t._s(t.trans("communication.character_count",{count:t.characterCount}))+" ")]),t._v(" "),s("textarea",{directives:[{name:"model",rawName:"v-model",value:t.smsForm.sms,expression:"smsForm.sms"}],staticClass:"form-control",attrs:{rows:"2",name:"sms",placeholder:t.trans("communication.sms")},domProps:{value:t.smsForm.sms},on:{input:function(e){e.target.composing||t.$set(t.smsForm,"sms",e.target.value)}}}),t._v(" "),s("p",{staticClass:"help-block font-80pc"},[t._v(t._s(t.trans("communication.template_variable_tip")))]),t._v(" "),s("p",{staticClass:"help-block font-90pc"},[t._v(t._s(t.trans("communication.available_variables"))+": NAME, BATCH, FATHER_NAME, DATE")]),t._v(" "),s("show-error",{attrs:{"form-name":t.smsForm,"prop-name":"sms"}})],1)]),t._v(" "),s("div",{staticClass:"col-12 col-sm-6"},[s("div",{staticClass:"form-group"},[s("label",{attrs:{for:""}},[t._v(t._s(t.trans("communication.sample_sms")))]),t._v(" "),s("p",[t._v(t._s(t.sampleMessage))])])])]),t._v(" "),s("button",{directives:[{name:"confirm",rawName:"v-confirm",value:{ok:t.confirmSMS()},expression:"{ok: confirmSMS()}"}],key:"send-sms",staticClass:"btn btn-info waves-effect waves-light",attrs:{type:"button"}},[t._v(t._s(t.trans("general.send")))])])]):t._e()])],1)])}),[],!1,null,null,null);e.default=r.exports}}]); //# sourceMappingURL=absentee.js.map?id=2449fb37188b827b1043