angular.module("RdmApp").controller("catatanCtrl",["$scope","$rootScope","common","DTOptionsBuilder","DTColumnBuilder","$http","$q","ApiServer","FileUploader",function(i,a,t,n,o,s,e,l,p){a.knilai={},i.tambahpas=function(){a.knilai.edit=!1,$(".edit-modal").modal("show")},i.simpanCatatan=function(){a.knilai={},a.knilai.absen=[],angular.forEach(a.walassiswa,(function(i){var t={};t.siswa_id=i.siswa_id,t.catatan=i.absen.catatan,a.knilai.absen.push(t)})),$(".edit-modal").modal("hide"),$.blockUI({}),l.post("guru/walas/savecatatan/"+a.walas,a.knilai,(function(i){$.unblockUI({}),i.success?(a.getwalassiswa(),Swal.fire({type:"success",title:"Berhasil",showConfirmButton:!1,html:"Data Berhasil Disimpan",timer:1e3})):Swal.fire({type:"error",title:"Gagal",showConfirmButton:!0,html:i.message}).then((i=>{i.value&&$(".edit-modal").modal("show")}))}))},i.dtOptions=n.newOptions().withOption("searching",!0).withOption("stateSave",!0).withOption("paging",!1).withOption("responsive",!0).withOption("ordering",!1).withOption("processing",!1),i.dtOptions2=n.newOptions().withOption("searching",!0).withOption("paging",!1).withOption("ordering",!1).withOption("processing",!1)}]);