From 8ef182ff865e615acb35bf27ab3ae8fcd303a453 Mon Sep 17 00:00:00 2001 From: wahyu Date: Mon, 16 Oct 2023 10:23:51 +0700 Subject: [PATCH 1/2] update delete material --- edit-mode/function/materialResource.js | 1 + 1 file changed, 1 insertion(+) diff --git a/edit-mode/function/materialResource.js b/edit-mode/function/materialResource.js index 9635d96..c865919 100644 --- a/edit-mode/function/materialResource.js +++ b/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", From c229d9ec4757281822b8e323ab5f7f699f55ea23 Mon Sep 17 00:00:00 2001 From: wahyu Date: Tue, 17 Oct 2023 09:12:51 +0700 Subject: [PATCH 2/2] disabling datatables --- view-mode/function/reportActivity.js | 108 +++++++++++++-------------- 1 file changed, 54 insertions(+), 54 deletions(-) diff --git a/view-mode/function/reportActivity.js b/view-mode/function/reportActivity.js index 3c9088d..91ed799 100644 --- a/view-mode/function/reportActivity.js +++ b/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}`)