update
This commit is contained in:
@@ -537,6 +537,7 @@
|
||||
{ name: 'nmadendum', type: 'text'},
|
||||
{ name: 'filefoto', type: 'text'},
|
||||
{ name: 'status', type: 'text'},
|
||||
{ name: 'status_filter', type: 'text'},
|
||||
{ name: 'tandatangan', type: 'text'},
|
||||
{ name: 'jenisfont', type: 'text'},
|
||||
{ name: 'jumlah', type: 'text'},
|
||||
@@ -573,7 +574,41 @@
|
||||
}
|
||||
return null;
|
||||
}
|
||||
var dataAdapter = new $.jqx.dataAdapter(sourcepasiencari, { async: false, loadError: function (xhr, status, error) { console.log('Error loading "' + sourcepasiencari.url + '" : ' + error); } });
|
||||
var dataAdapter = new $.jqx.dataAdapter(sourcepasiencari, {
|
||||
async: false,
|
||||
beforeLoadComplete: function (records) {
|
||||
if (!Array.isArray(records)) {
|
||||
return records;
|
||||
}
|
||||
|
||||
records.forEach(function (row) {
|
||||
Object.keys(row).forEach(function (key) {
|
||||
if (row[key] === null || typeof row[key] === 'undefined') {
|
||||
row[key] = '';
|
||||
}
|
||||
});
|
||||
|
||||
var statusText = row.status ? String(row.status).trim() : '';
|
||||
if (statusText === '') {
|
||||
statusText = 'NEW';
|
||||
}
|
||||
|
||||
row.status = statusText;
|
||||
row.status_filter = statusText;
|
||||
|
||||
if (!row.tlsstatus) {
|
||||
row.tlsstatus = statusText === 'NEW'
|
||||
? '<span class="badge badge-danger">NEW</span>'
|
||||
: '<span class="badge badge-info">' + statusText + '</span>';
|
||||
}
|
||||
});
|
||||
|
||||
return records;
|
||||
},
|
||||
loadError: function (xhr, status, error) {
|
||||
console.log('Error loading "' + sourcepasiencari.url + '" : ' + error);
|
||||
}
|
||||
});
|
||||
$("#gridpemeriksaan").jqxGrid({
|
||||
width : '100%',
|
||||
filterable : true,
|
||||
@@ -742,7 +777,9 @@
|
||||
}
|
||||
},
|
||||
{ text: 'No', filterable: false, datafield: 'noloket', width: 70, cellsalign: 'center', align: 'center' },
|
||||
{ text: 'Status', filtertype: 'checkedlist', datafield: 'tlsstatus', width: 75, cellsalign: 'left', align: 'center' },
|
||||
{ text: 'Status', filtertype: 'checkedlist', datafield: 'status_filter', width: 110, cellsalign: 'left', align: 'center', cellsrenderer: function (row, columnfield, value, defaulthtml, columnproperties, rowdata) {
|
||||
return '<div style="margin: 6px;">' + (rowdata.tlsstatus || value || '') + '</div>';
|
||||
} },
|
||||
{ text: 'AccNumber', datafield: 'nofoto', width: 100, cellsalign: 'left', align: 'center' },
|
||||
{ text: 'No.RM', datafield: 'tlsnoregister', width: 100, cellsalign: 'left', align: 'center' },
|
||||
{ text: 'Name', datafield: 'tlsnama', width: 150, cellsalign: 'left', align: 'center' },
|
||||
|
||||
Reference in New Issue
Block a user