From 797bdac47cf24f6f487a3399c1073f95596b274c Mon Sep 17 00:00:00 2001 From: wahyun Date: Wed, 10 Jul 2024 16:33:47 +0700 Subject: [PATCH 1/3] fix: add gantt name url parameter && update format date --- edit-mode/function/ganttConfig.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/edit-mode/function/ganttConfig.js b/edit-mode/function/ganttConfig.js index 3cf1ef7..48ab3d1 100644 --- a/edit-mode/function/ganttConfig.js +++ b/edit-mode/function/ganttConfig.js @@ -7,6 +7,7 @@ const role_name = getUrlParameter("role_name"); const company_id = getUrlParameter("company_id"); const company_name = getUrlParameter("company_name"); const base_url_image = `https://project-api.ospro.id/assets/${company_name}/`; +const ganttName = getUrlParameter("gantt_name"); // const base_url_image = `http://localhost:8444/generic-ospro-backend/assets/${company_name}/`; const adwIntegrationUrl = "https://adw-api.ospro.id/api"; @@ -190,7 +191,7 @@ const editor = { cost: { type: "number", map_to: "rencana_biaya", min: 0 }, costActual: { type: "number", map_to: "biaya_actual", min: 0 }, status: { type: "text", map_to: "status" }, - job_count: { type: "number", map_to: "jumlah_pekerjaan", min: 0 }, + // job_count: { type: "number", map_to: "jumlah_pekerjaan", min: 0 }, job_unit: { type: "text", map_to: "satuan", min: 0 }, bobot_planning: { type: "number", map_to: "bobot_planning", min: 0 }, human_resource: (`
@@ -521,7 +522,7 @@ var allColumns = [ return roundToTwo(actual); }, resize: true }, - { name: "jumlah_pekerjaan", label: "Volume Plan", align: "center", min_width: 100, resize: true, editor: editor.job_count }, + // { name: "jumlah_pekerjaan", label: "Volume Plan", align: "center", min_width: 100, resize: true, editor: editor.job_count }, { name: "jobs_done", label: "Report", align: "center", min_width: 100, resize: true, template: function (text) { if (text.type == "project" || text.type == "milestone" || text.type == "header") { @@ -586,7 +587,7 @@ let columnShows = { baseline_progress: false, progress: true, progress_actual: true, - jumlah_pekerjaan: true, + // jumlah_pekerjaan: true, jobs_done: true, satuan: false, predecessor: false, @@ -614,7 +615,7 @@ gantt.config.columns = createColumnsConfig({ baseline_progress: true, progress: true, progress_actual: true, - jumlah_pekerjaan: true, + // jumlah_pekerjaan: true, jobs_done: true, satuan: true, predecessor: true, -- 2.25.1 From 313c7e5e72633f88926c2bbb71c646ba2faa4309 Mon Sep 17 00:00:00 2001 From: wahyun Date: Wed, 10 Jul 2024 16:34:28 +0700 Subject: [PATCH 2/3] fix:update format date --- edit-mode/function/function.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/edit-mode/function/function.js b/edit-mode/function/function.js index 0e4e164..1ab604f 100644 --- a/edit-mode/function/function.js +++ b/edit-mode/function/function.js @@ -314,16 +314,17 @@ function formatReplaceTitikRibuan(param) { } function formatDate(params) { - let today = new Date(params); - let yyyy = today.getFullYear(); - let mm = today.getMonth() + 1; // Months start at 0! - let dd = today.getDate(); + const months = [ + 'January', 'February', 'March', 'April', 'May', 'June', + 'July', 'August', 'September', 'October', 'November', 'December' + ]; - if (dd < 10) dd = '0' + dd; - if (mm < 10) mm = '0' + mm; + let today = new Date(params); + let yyyy = today.getFullYear(); + let mm = today.getMonth(); // Bulan dimulai dari 0! + let dd = today.getDate(); - today = dd + '/' + mm + '/' + yyyy; - return today; + return `${dd} ${months[mm]} ${yyyy}`; } function roundToTwo(num) { -- 2.25.1 From 6893092ec3be48698b62738f5a8efe2c5d0cbd49 Mon Sep 17 00:00:00 2001 From: wahyun Date: Wed, 10 Jul 2024 16:34:58 +0700 Subject: [PATCH 3/3] fix:adding inline gantt name --- edit-mode/index.html | 1 + 1 file changed, 1 insertion(+) diff --git a/edit-mode/index.html b/edit-mode/index.html index 873da78..50d5732 100644 --- a/edit-mode/index.html +++ b/edit-mode/index.html @@ -933,6 +933,7 @@