From a956cca218c0db06bcf278d1a2aabb10bb288b75 Mon Sep 17 00:00:00 2001 From: farhantock Date: Thu, 7 Dec 2023 16:14:08 +0700 Subject: [PATCH] update handle get project with user have access all --- src/views/SimproV2/CreatedProyek/index.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/views/SimproV2/CreatedProyek/index.js b/src/views/SimproV2/CreatedProyek/index.js index feac913..84a990c 100644 --- a/src/views/SimproV2/CreatedProyek/index.js +++ b/src/views/SimproV2/CreatedProyek/index.js @@ -376,7 +376,11 @@ const CreatedProyek = ({ params, ...props }) => { paging: { start: start, length: rowsPerPage }, }; - if (parseInt(role_id) !== 70) { + if (all_project) { + payload["columns"] = [ + { name: "company_id", logic_operator: "like", value: company_id, operator: "AND" } + ]; + } else { payload["columns"] = [ { name: "created_by_id", logic_operator: "IN", value: hierarchy, operator: "AND" } ]; @@ -508,6 +512,7 @@ const CreatedProyek = ({ params, ...props }) => { }; const handleOpenDialogGantt = (data) => { + setDataViewStartDate(data.mulai_proyek) setidTask(data.id); setProyekName(data.nama); setOpenDialogGantt(true); @@ -1977,6 +1982,7 @@ const CreatedProyek = ({ params, ...props }) => { token={token} isLogin={isLogin} proyekName={proyekName} + dataViewStartDate={dataViewStartDate} /> ), [openDialogGantt]