Browse Source

Merge pull request 'error handling' (#48) from dev-wahyu into staging

Reviewed-on: ordo/adw-gantt#48
pull/1/head
farhantock 1 year ago
parent
commit
8291b94227
  1. 56
      edit-mode/function/reportActivity.js

56
edit-mode/function/reportActivity.js

@ -174,6 +174,9 @@ $(document).ready(function () {
d.idAct = activityId; d.idAct = activityId;
d.materialName = materialName; d.materialName = materialName;
d.type = 'actual'; d.type = 'actual';
},
"error": function (xhr, error, code) {
console.log(xhr, error, code);
} }
}, },
"columns": [ "columns": [
@ -203,33 +206,32 @@ $(document).ready(function () {
], ],
"order": [[1, 'asc']], "order": [[1, 'asc']],
}); });
// var tableRaMaterialPlan = $("#table_activity_material_plan").DataTable({
var tableRaMaterialPlan = $("#table_activity_material_plan").DataTable({ // "processing": true,
"processing": true, // "serverSide": true,
"serverSide": true, // "ajax": {
"ajax": { // "url": `${base_url}report-activity-material/datatables`,
"url": `${base_url}report-activity-material/datatables`, // "data": function (d) {
"data": function (d) { // d.idAmi = assignMaterialId;
d.idAmi = assignMaterialId; // d.idAct = activityId;
d.idAct = activityId; // d.type = 'plan';
d.type = 'plan'; // }
} // },
}, // "columns": [
"columns": [ // { data: 'material_name', name: 'material_name' },
{ data: 'material_name', name: 'material_name' }, // {
{ // data: 'qty_planning', render: function (data, type) {
data: 'qty_planning', render: function (data, type) { // return data ? formatRupiah(parseInt(data)) : '-'
return data ? formatRupiah(parseInt(data)) : '-' // }
} // },
}, // { data: 'uom', name: 'uom' },
{ data: 'uom', name: 'uom' }, // {
{ // data: 'plan_date', render: function (data, type) {
data: 'plan_date', render: function (data, type) { // return data ? formatDate(data) : '-'
return data ? formatDate(data) : '-' // }
} // },
}, // ]
] // });
});
$('#select_ra_hr').select2({ $('#select_ra_hr').select2({

Loading…
Cancel
Save