Browse Source

error handling

pull/1/head
wahyu 1 year ago
parent
commit
75a85e981f
  1. 56
      edit-mode/function/reportActivity.js

56
edit-mode/function/reportActivity.js

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

Loading…
Cancel
Save