From 5c6b85c1441da760aa77beede67e7413f6826d62 Mon Sep 17 00:00:00 2001 From: Wahyu Ramadhan Date: Wed, 14 Jun 2023 17:08:33 +0700 Subject: [PATCH 1/2] Import update date --- src/routes.js | 1 + src/views/SimproV2/CreatedProyek/ImportActivity/index.js | 4 +++- src/views/SimproV2/Gantt/index.js | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/routes.js b/src/routes.js index 6b9cef4..6c49271 100644 --- a/src/routes.js +++ b/src/routes.js @@ -59,6 +59,7 @@ const routes = [ { path: '/projects/:id/import/activity', exact: true, name: 'Gantt Import Activity', component: GanttImportActivity }, { path: '/projects/:id/:project/import/activity', exact: true, name: 'Gantt Import Activity', component: GanttImportActivity }, { path: '/projects/:id/:project/gantt', exact: true, name: 'Gantt', component: Gantt }, + { path: '/projects/:id/:project/:timestamp/gantt/', exact: true, name: 'Gantt', component: Gantt }, { path: '/human-resource', exact: true, name: 'Human Resource', component: ResourceWorker }, { path: '/material-resource', exact: true, name: 'Material Resource', component: ResourceMaterial }, { path: '/tools-resource', exact: true, name: 'Tools Resource', component: ResourceTools }, diff --git a/src/views/SimproV2/CreatedProyek/ImportActivity/index.js b/src/views/SimproV2/CreatedProyek/ImportActivity/index.js index 2a8b5e6..794ce06 100644 --- a/src/views/SimproV2/CreatedProyek/ImportActivity/index.js +++ b/src/views/SimproV2/CreatedProyek/ImportActivity/index.js @@ -232,7 +232,9 @@ const ImportActivity = ({ params }) => { console.log(result) if (result.data.code == 200) { - window.location = urlSplitted[0] + '//' + urlSplitted[2] + `/#/projects/` + ganttId + '/' + result.data.projectId + '/gantt' + const timestamp = Date.now(); + const newTimestamp = timestamp + 60000; + window.location = urlSplitted[0] + '//' + urlSplitted[2] + `/#/projects/` + ganttId + '/' + result.data.projectId + '/' + newTimestamp + '/gantt' } setIsMovePage(true); diff --git a/src/views/SimproV2/Gantt/index.js b/src/views/SimproV2/Gantt/index.js index 2dbf026..16cf882 100644 --- a/src/views/SimproV2/Gantt/index.js +++ b/src/views/SimproV2/Gantt/index.js @@ -21,6 +21,7 @@ let roCount = 0; const Gantt = (props) => { const versionGanttId = props.match.params ? props.match.params.id : 0; const idProject = props.match.params.project ? props.match.params.project : 0; + const timestamp = props.match.params.timestamp ? props.match.params.timestamp : 0; const [ro, setRo] = useState(1) const [listUserGant, setListUserGantt] = useState([]) From 095ef3762233a2cef4e603e70aa21ad4f1c07613 Mon Sep 17 00:00:00 2001 From: Wahyu Ramadhan Date: Thu, 15 Jun 2023 08:43:13 +0700 Subject: [PATCH 2/2] fix iframe --- src/views/SimproV2/Gantt/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/SimproV2/Gantt/index.js b/src/views/SimproV2/Gantt/index.js index 16cf882..466bb6d 100644 --- a/src/views/SimproV2/Gantt/index.js +++ b/src/views/SimproV2/Gantt/index.js @@ -85,7 +85,7 @@ const Gantt = (props) => { const RenderGantt = () => (