From e8c5a2c7d579e59230269551ab128b533976bd9e Mon Sep 17 00:00:00 2001 From: wahyuun Date: Mon, 25 Sep 2023 14:20:57 +0700 Subject: [PATCH] add filter request DIVISI_LIST where parent null --- src/views/SimproV2/CreatedProyek/index.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/views/SimproV2/CreatedProyek/index.js b/src/views/SimproV2/CreatedProyek/index.js index db69d94..13f0adf 100644 --- a/src/views/SimproV2/CreatedProyek/index.js +++ b/src/views/SimproV2/CreatedProyek/index.js @@ -245,7 +245,9 @@ const CreatedProyek = ({ params, ...props }) => { .then((res) => res) .catch((err) => err.response); if (result && result.data && result.data.code === 200) { - setDataDivisions(result.data.data); + const dataRes = result.data.data; + const filteredData = dataRes.filter(item => item.parent === null); + setDataDivisions(filteredData); } }; @@ -600,7 +602,7 @@ const CreatedProyek = ({ params, ...props }) => { if (result && result.data && result.data.code == 200) { const {kode_sortname,nama,mulai_proyek,rencana_biaya,keterangan,durasi_proyek,project_objectives,potential_risk,currency_symbol, nama_divisi, late_consequence, assumtion, considered_success_when} = result.data.data; - const dataToSend = { kode_sortname, nama, mulai_proyek, rencana_biaya, keterangan, durasi_proyek, project_objectives, potential_risk, currency_symbol, nama_divisi, late_consequence, assumtion, considered_success_when}; + const dataToSend = {kode_sortname, nama, mulai_proyek, rencana_biaya, keterangan, durasi_proyek, project_objectives, potential_risk, currency_symbol, nama_divisi, late_consequence, assumtion, considered_success_when}; setProjectCharter(dataToSend); } else { NotificationManager.error("Gagal Mengambil Data!!", "Failed"); @@ -1878,6 +1880,7 @@ const CreatedProyek = ({ params, ...props }) => { projectK3={projectK3Search} assignHR={projectAssignHR} projectImage={image} + idTask={idTask} /> ), [openDialogViewDetail]