$(document).ready(function() {
tampil_data_item();
$('#table_validasi').DataTable();
function tampil_data_item() {
$.ajax({
type: 'ajax',
url: window.location.origin + '/kaprodi/get_dhmd_byProdi',
async: false,
dataType: 'json',
success: function(data) {
var html = '';
var i;
var base_url = window.location.origin;
for (i = 0; i < data.length; i++) {
if (data[i].status == '1') {
stat = 'Tervalidasi';
jenis = 'badge-primary'
}
else if (data[i].status == '0'){
stat = ' Belum Tervalidasi';
jenis = 'badge-danger'
}
html += '
';
}
$('#show_data').html(html);
}
});
}
function tampil_data_valid() {
$.ajax({
type: 'ajax',
url: window.location.origin + '/kaprodi/get_dhmd_byProdi_valid',
async: false,
dataType: 'json',
success: function(data) {
var html = '';
var i;
var base_url = window.location.origin;
for (i = 0; i < data.length; i++) {
if (data[i].status == '1') {
stat = 'Tervalidasi';
jenis = 'badge-primary'
}
else if (data[i].status == '0'){
stat = ' Belum Tervalidasi';
jenis = 'badge-danger'
}
html += '
';
}
$('#show_data').html(html);
}
});
}
function tampil_data_nonvalid() {
$.ajax({
type: 'ajax',
url: window.location.origin + '/kaprodi/get_dhmd_byProdi_nonvalid',
async: false,
dataType: 'json',
success: function(data) {
var html = '';
var i;
var base_url = window.location.origin;
for (i = 0; i < data.length; i++) {
if (data[i].status == '1') {
stat = 'Tervalidasi';
jenis = 'badge-primary'
}
else if (data[i].status == '0'){
stat = ' Belum Tervalidasi';
jenis = 'badge-danger'
}
html += '