From cf05a5548756bba6ecba894a2270a4a208ce407b Mon Sep 17 00:00:00 2001 From: wahyu Date: Wed, 25 Oct 2023 11:27:26 +0700 Subject: [PATCH 1/2] update report analysis --- .../CreatedProyek/DialogFormAnalysis.js | 1 + .../SimproV2/CreatedProyek/ReportAnalysis.js | 34 ++++++++++++++++++- 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/src/views/SimproV2/CreatedProyek/DialogFormAnalysis.js b/src/views/SimproV2/CreatedProyek/DialogFormAnalysis.js index 890a61d..471b8c0 100644 --- a/src/views/SimproV2/CreatedProyek/DialogFormAnalysis.js +++ b/src/views/SimproV2/CreatedProyek/DialogFormAnalysis.js @@ -39,6 +39,7 @@ const DialogFormAnalysis = ({ ] const getReportActivityMaterial = async () => { + setDatatable([]); const payload = { columns: [ { diff --git a/src/views/SimproV2/CreatedProyek/ReportAnalysis.js b/src/views/SimproV2/CreatedProyek/ReportAnalysis.js index b74c6c8..7661047 100644 --- a/src/views/SimproV2/CreatedProyek/ReportAnalysis.js +++ b/src/views/SimproV2/CreatedProyek/ReportAnalysis.js @@ -58,19 +58,40 @@ const ReportAnalysis = ({ openDialog, closeDialog, toggleDialog, projectId }) => {title: "Activity", dataIndex: "name", key: "name"}, {title: "Gantt", dataIndex: "name_version", key: "name_version"}, {title: "Assign HR", dataIndex: "user_name", key: "user_name"}, + {title: "Volume Plan", dataIndex: "qty_planning", key: "qty_planning", + render: (text, record) => + <> + {text ? text : 0} + + }, + {title: "Volume Actual", dataIndex: "qty", key: "qty"}, {title: "Progress (%)", dataIndex: "persentase_progress", key: "persentase_progress"}, + { + title: 'Action', + dataIndex: '', + key: 'id', + className: "nowrap", + render: (text, record) => + <> + + + {" "} + + , + }, ] const columnActivityToHr = [ {title: "Activity", dataIndex: "join_second_name", key: "join_second_name"}, {title: "Gantt", dataIndex: "join_fourth_name_version", key: "join_fourth_name_version"}, {title: "Assign HR", dataIndex: "join_first_name", key: "join_first_name"}, - {title: "Material Plan", dataIndex: "join_third_qty_planning", key: "join_third_qty_planning", + {title: "Volume Plan", dataIndex: "join_third_qty_planning", key: "join_third_qty_planning", render: (text, record) => <> {text ? text : 0} }, + {title: "Volume Actual", dataIndex: "volume_actual", key: "volume_actual"}, {title: "Progress (%)", dataIndex: "join_second_persentase_progress", key: "persentase_progress"}, { title: 'Action', @@ -182,6 +203,7 @@ const ReportAnalysis = ({ openDialog, closeDialog, toggleDialog, projectId }) => } const getDataActivityToHr = async () => { setAvgActivityHr(0); + setDataTableActivityToHr([]); let sum = 0; const payload = { columns: [ @@ -199,6 +221,9 @@ const ReportAnalysis = ({ openDialog, closeDialog, toggleDialog, projectId }) => operator: "AND", } ], + select: [ + 'id' + ], joins: [ { name: "m_users", @@ -224,6 +249,12 @@ const ReportAnalysis = ({ openDialog, closeDialog, toggleDialog, projectId }) => column_self:"id", column_results: ["name_version"] }, + { + name1: "m_activity", + name: "report_activity_material", + column_join: "id", + column_self:"activity_id", + }, ], orders: { columns: ["id"], ascending: false }, paging: { start: 0, length: -1 }, @@ -275,6 +306,7 @@ const ReportAnalysis = ({ openDialog, closeDialog, toggleDialog, projectId }) => const getDataActivity = async () => { setAvgActivity(0); + setDatatable([]); let sum = 0; const payload = { columns: [ From de8bf1e88fbd62f86780711df299b34acd6e769e Mon Sep 17 00:00:00 2001 From: wahyu Date: Wed, 25 Oct 2023 13:07:33 +0700 Subject: [PATCH 2/2] update progress bar --- src/views/Dashboard/DashboardProject.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/Dashboard/DashboardProject.js b/src/views/Dashboard/DashboardProject.js index f8e59a3..8cc40ee 100644 --- a/src/views/Dashboard/DashboardProject.js +++ b/src/views/Dashboard/DashboardProject.js @@ -1464,10 +1464,10 @@ const DashboardProject = () => { {isReadySCurve ? ( 100 + planningProgress > 100 || actualProgress > 100 ? parseFloat( (actualProgress / planningProgress) * 100 - ).toFixed(2) + ).toFixed(0) : actualProgress } />