Browse Source

Merge pull request 'dev-wahyu' (#52) from dev-wahyu into staging

Reviewed-on: ordo/adw-gantt#52
pull/1/head
farhantock 1 year ago
parent
commit
e73b52e19a
  1. 1
      edit-mode/function/materialResource.js
  2. 108
      view-mode/function/reportActivity.js

1
edit-mode/function/materialResource.js

@ -61,6 +61,7 @@ $(document).ready(function () {
});
function deleteMaterialAssign(id) {
searchReport(id);
$.ajax({
url: `${base_url}assign-material/delete/${id}`,
type: "DELETE",

108
view-mode/function/reportActivity.js

@ -79,60 +79,60 @@ $(document).ready(function () {
]
});
var tableRaMaterialActual = $("#table_activity_material_actual").DataTable({
"processing": true,
"serverSide": true,
"ajax": {
"url": `${base_url}report-activity-material/datatables`,
"data": function (d) {
d.idAmi = assignMaterialId;
d.idAct = activityId;
d.type = 'actual';
}
},
"columns": [
{ data: 'human_resource', name: 'human_resource' },
{
data: 'report_date', render: function (data, type) {
return data ? formatDate(data) : '-'
}
},
{
data: 'qty', render: function (data, type) {
return data ? formatRupiah(data) : '-'
}
},
{ data: 'description', name: 'description' },
],
"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 tableRaMaterialActual = $("#table_activity_material_actual").DataTable({
// "processing": true,
// "serverSide": true,
// "ajax": {
// "url": `${base_url}report-activity-material/datatables`,
// "data": function (d) {
// d.idAmi = assignMaterialId;
// d.idAct = activityId;
// d.type = 'actual';
// }
// },
// "columns": [
// { data: 'human_resource', name: 'human_resource' },
// {
// data: 'report_date', render: function (data, type) {
// return data ? formatDate(data) : '-'
// }
// },
// {
// data: 'qty', render: function (data, type) {
// return data ? formatRupiah(data) : '-'
// }
// },
// { data: 'description', name: 'description' },
// ],
// "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) : '-'
// }
// },
// ]
// });
$('#modal_report_activity').on('show.bs.modal', function (event) {
$("#report_activity_title").html(`Report Activity ${activityName}`)

Loading…
Cancel
Save