angular.module("RdmApp").controller("datakelasCtrl",["$scope","$rootScope","common","DTOptionsBuilder","DTColumnBuilder","$http","$q","ApiServer",function(t,e,a,i,l,o,s,d){t.dtInstance={},t.datakelasedit={},t.saveeditkelas=function(){$(".edit-modal").modal("hide"),$.blockUI({}),d.post("guru/kelas/save",t.datakelasedit,(function(t){$.unblockUI({}),t.success?(e.getdatakelas(),Swal.fire({type:"success",title:"Berhasil",showConfirmButton:!1,html:"Data Berhasil Disimpan",timer:1e3})):Swal.fire({type:"error",title:"Gagal",showConfirmButton:!0,html:t.message}).then((t=>{t.value&&$(".edit-modal").modal("show")}))}))},t.editkelas=function(e,a,i,l,o,s){t.datakelasedit.kelas_id=e,t.datakelasedit.kelas_nama=a,t.datakelasedit.tingkat_id=i,t.datakelasedit.jurusan_id=l,t.datakelasedit.guru_id=o,t.datakelasedit.edit=s;try{t.$apply()}catch(t){}$(".edit-modal").modal("show"),$(".modal-dialog").draggable({handle:".modal-header"})},t.dtOptions=i.newOptions().withOption("searching",!0).withOption("stateSave",!0).withButtons([{extend:"copy",text:'<i class="fa fa-files-o"></i> Copy',titleAttr:"Copy"},{extend:"pdfHtml5",text:'<i class="fa fa-print" aria-hidden="true"></i> Print',download:"open",exportOptions:{columns:[0,1,2,3]},titleAttr:"Print",customize:function(t){e.customepdf(t,"Absen Siswa","Rapor Digital Madrasah")}},{extend:"excelHtml5",text:'<i class="fa fa-file-text-o"></i> Excel',exportOptions:{columns:[0,2,3]},titleAttr:"Excel"}]).withOption("paging",!0).withOption("processing",!0).withPaginationType("full_numbers")}]);