From 27c54d99c24af7804805ea00065b2236079ffac7 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 10 Nov 2023 17:50:23 +0700 Subject: [PATCH 1/8] Update ganttFrame --- src/views/SimproV2/Gantt/GanttFrame.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/SimproV2/Gantt/GanttFrame.js b/src/views/SimproV2/Gantt/GanttFrame.js index 90d8655..5fb6987 100644 --- a/src/views/SimproV2/Gantt/GanttFrame.js +++ b/src/views/SimproV2/Gantt/GanttFrame.js @@ -19,7 +19,7 @@ const GanttFrame = React.memo((props) => { console.error('Undefined in props.location.state'); } const history = useHistory(); - const { versionGanttId, idProject, token, ro, timestamp } = props; + const { versionGanttId, idProject, ro, timestamp } = props; const iframeSrc = `https://konstruksi-gantt.ospro.id/edit-mode/index.html?base_url=${BASE_SIMPRO_LUMEN}&gantt_id=${versionGanttId}&proyek_id=${idProject}&token=${token}&ro=${ro}×tamp=${timestamp}`; const [batchEntityData, setBatchEntityData] = useState(null); From c1c4579b3a6ec12c9b428018bbecae5ae9d9fa49 Mon Sep 17 00:00:00 2001 From: wahyuun Date: Mon, 13 Nov 2023 17:26:52 +0700 Subject: [PATCH 2/8] update payload Approval --- src/views/SimproV2/CreatedProyek/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/SimproV2/CreatedProyek/index.js b/src/views/SimproV2/CreatedProyek/index.js index 9b85ac1..e7b59d5 100644 --- a/src/views/SimproV2/CreatedProyek/index.js +++ b/src/views/SimproV2/CreatedProyek/index.js @@ -1088,7 +1088,7 @@ const CreatedProyek = ({ params, ...props }) => { const request = data.map((res) => { const payload = { proyek_id: parseInt(id), - tittle: res.title, + tittle: res.tittle, name: res.name, date_approval: res.date, }; @@ -1273,7 +1273,7 @@ const CreatedProyek = ({ params, ...props }) => { const request = data.map((res) => { const payload = { proyek_id: parseInt(id), - tittle: res.tittle ? res.tittle : res.title, + tittle: res.tittle ? res.tittle : res.tittle, name: res.name, date_approval: res.date ? res.date : res.date_approval, }; From cc88fd74991fd214fc54cf3da4f8233f61ab3512 Mon Sep 17 00:00:00 2001 From: wahyuun Date: Mon, 13 Nov 2023 17:30:23 +0700 Subject: [PATCH 3/8] update name & value input approval --- src/views/SimproV2/CreatedProyek/DialogFormProyek.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/SimproV2/CreatedProyek/DialogFormProyek.js b/src/views/SimproV2/CreatedProyek/DialogFormProyek.js index e09fd47..3f4d89b 100644 --- a/src/views/SimproV2/CreatedProyek/DialogFormProyek.js +++ b/src/views/SimproV2/CreatedProyek/DialogFormProyek.js @@ -1455,8 +1455,8 @@ const DialogFormProyek = ({ handleInputChangeApproval(e, index)} /> From c6880d8236e76a8c948538f7dccc1087591267f2 Mon Sep 17 00:00:00 2001 From: farhan048 Date: Mon, 13 Nov 2023 18:12:37 +0700 Subject: [PATCH 4/8] update condition --- src/views/SimproV2/CreatedProyek/index.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/views/SimproV2/CreatedProyek/index.js b/src/views/SimproV2/CreatedProyek/index.js index f331f84..4a2ddb2 100644 --- a/src/views/SimproV2/CreatedProyek/index.js +++ b/src/views/SimproV2/CreatedProyek/index.js @@ -96,20 +96,19 @@ const url = ""; const format = "DD-MM-YYYY"; const CreatedProyek = ({ params, ...props }) => { - let role_id = '', user_id='',proyek_id='',isLogin='',token=''; + let role_id = '', user_id = '', proyek_id = '', isLogin = '', token = ''; if (props.location.state && props.location.state.role_id && props.location.state.user_id) { role_id = props.location.state.role_id; user_id = props.location.state.user_id; token = props.location.state.token; isLogin = props.location.state.isLogin; - console.log('props.location.state success'); + } else { role_id = localStorage.getItem("role_id"); proyek_id = localStorage.getItem("proyek_id"); user_id = localStorage.getItem("user_id"); token = localStorage.getItem("token"); isLogin = localStorage.getItem("isLogin"); - console.error('Undefined in props.location.state'); } const history = useHistory(); const HEADER = { @@ -210,7 +209,10 @@ const CreatedProyek = ({ params, ...props }) => { }, [openDialogProyek]); useEffect(() => { - parseInt(role_id) !== 44 ? getDataProyek() : getDataProyekByCustomer(); + if (parseInt(role_id) === 44) { + getDataProyekByCustomer() + } + getDataProyek(); }, [search, rowsPerPage, currentPage]); useEffect(() => { @@ -714,7 +716,7 @@ const CreatedProyek = ({ params, ...props }) => { if (result && result.data && result.data.code === 200) { setLoading(false) setProjectImage(result.data.data); - }else{ + } else { setLoading(false) } } @@ -1631,7 +1633,7 @@ const CreatedProyek = ({ params, ...props }) => { dataIndex: "", key: "x", render: (text, record) => - parseInt(role_id) == 44 ? ( + parseInt(role_id) == 44 ? ( <>