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.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