update
parent
c1a3c26159
commit
5199f160b8
|
|
@ -72,10 +72,12 @@ class KuesionerController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
if((session('group_alias') == 'dinas') || (session('group_alias') == 'suku_dinas') || (session('group_alias') == 'administrator') ){
|
if((session('group_alias') == 'dinas') || (session('group_alias') == 'suku_dinas') || (session('group_alias') == 'administrator') ){
|
||||||
|
if($row->status == 1){
|
||||||
$action .= '<a href="#" data-href="'.url('kuesioner/kembalikan/'.encode_id($row->KuesionerId)).'" data-toggle="tooltip" title="Kembalikan Kuesioner Leveling" class="btn btn-xs btn-block btn-danger dikembalikan"><i class="fal fa-undo text-white"></i></a>';
|
$action .= '<a href="#" data-href="'.url('kuesioner/kembalikan/'.encode_id($row->KuesionerId)).'" data-toggle="tooltip" title="Kembalikan Kuesioner Leveling" class="btn btn-xs btn-block btn-danger dikembalikan"><i class="fal fa-undo text-white"></i></a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if($row->level == 0){
|
if($row->level == 0){
|
||||||
$penghargaan = '<i class="fal fa-trophy"></i> Belum Pernah';
|
$penghargaan = '<i class="fal fa-trophy"></i> Belum Pernah';
|
||||||
|
|
|
||||||
|
|
@ -184,6 +184,53 @@
|
||||||
|
|
||||||
return params
|
return params
|
||||||
}
|
}
|
||||||
|
$("#grid-data").on("click", ".dikembalikan", function() {
|
||||||
|
var base_url = $(this).attr('data-href');
|
||||||
|
var id = $(this).attr('data-id');
|
||||||
|
swal({
|
||||||
|
title: "Kembalikan Kuesioner!",
|
||||||
|
text: "Apa anda yakin ingin mengembalikan kuesioner ini ke pihak sekolah ?",
|
||||||
|
type: "warning",
|
||||||
|
showCancelButton: true,
|
||||||
|
confirmButtonColor: "#BF3131",
|
||||||
|
confirmButtonText: "Kembalikan Sekarang",
|
||||||
|
cancelButtonText: "Batal",
|
||||||
|
closeOnConfirm: true,
|
||||||
|
closeOnCancel: true
|
||||||
|
},
|
||||||
|
function(isConfirm) {
|
||||||
|
if(isConfirm){
|
||||||
|
|
||||||
|
request = $.ajax({
|
||||||
|
url: base_url,
|
||||||
|
xhrFields: {
|
||||||
|
withCredentials: true
|
||||||
|
},
|
||||||
|
type: "GET",
|
||||||
|
});
|
||||||
|
|
||||||
|
// Callback handler that will be called on success
|
||||||
|
request.done(function(response, textStatus, jqXHR){
|
||||||
|
console.log(response);
|
||||||
|
toastr.success("Berhasil", 'Berhasil!', {positionClass: 'toast-bottom-right', containerId: 'toast-bottom-right'});
|
||||||
|
window.location.href = '{{url("/kuesioner")}}';
|
||||||
|
history.pushState(null, null, location.href);
|
||||||
|
window.onpopstate = function () {
|
||||||
|
history.go(1);
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
// Callback handler that will be called on failure
|
||||||
|
request.fail(function (jqXHR, textStatus, errorThrown){
|
||||||
|
toastr.error(
|
||||||
|
"Gagal "+textStatus, errorThrown
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
$("#grid-data").on("click", ".tolak", function() {
|
$("#grid-data").on("click", ".tolak", function() {
|
||||||
var base_url = $(this).attr('data-href');
|
var base_url = $(this).attr('data-href');
|
||||||
var id = $(this).attr('data-id');
|
var id = $(this).attr('data-id');
|
||||||
|
|
@ -258,7 +305,7 @@
|
||||||
// Callback handler that will be called on success
|
// Callback handler that will be called on success
|
||||||
request.done(function(response, textStatus, jqXHR){
|
request.done(function(response, textStatus, jqXHR){
|
||||||
console.log(response);
|
console.log(response);
|
||||||
toastr.success("Berhasil Login", 'Berhasil!', {positionClass: 'toast-bottom-right', containerId: 'toast-bottom-right'});
|
toastr.success("Berhasil", 'Berhasil!', {positionClass: 'toast-bottom-right', containerId: 'toast-bottom-right'});
|
||||||
window.location.href = '{{url("/kuesioner")}}';
|
window.location.href = '{{url("/kuesioner")}}';
|
||||||
history.pushState(null, null, location.href);
|
history.pushState(null, null, location.href);
|
||||||
window.onpopstate = function () {
|
window.onpopstate = function () {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue