Browse Source

Import update date

pull/2/head
Wahyu Ramadhan 1 year ago
parent
commit
5c6b85c144
  1. 1
      src/routes.js
  2. 4
      src/views/SimproV2/CreatedProyek/ImportActivity/index.js
  3. 1
      src/views/SimproV2/Gantt/index.js

1
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/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/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/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: '/human-resource', exact: true, name: 'Human Resource', component: ResourceWorker },
{ path: '/material-resource', exact: true, name: 'Material Resource', component: ResourceMaterial }, { path: '/material-resource', exact: true, name: 'Material Resource', component: ResourceMaterial },
{ path: '/tools-resource', exact: true, name: 'Tools Resource', component: ResourceTools }, { path: '/tools-resource', exact: true, name: 'Tools Resource', component: ResourceTools },

4
src/views/SimproV2/CreatedProyek/ImportActivity/index.js

@ -232,7 +232,9 @@ const ImportActivity = ({ params }) => {
console.log(result) console.log(result)
if (result.data.code == 200) { 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); setIsMovePage(true);

1
src/views/SimproV2/Gantt/index.js

@ -21,6 +21,7 @@ let roCount = 0;
const Gantt = (props) => { const Gantt = (props) => {
const versionGanttId = props.match.params ? props.match.params.id : 0; const versionGanttId = props.match.params ? props.match.params.id : 0;
const idProject = props.match.params.project ? props.match.params.project : 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 [ro, setRo] = useState(1)
const [listUserGant, setListUserGantt] = useState([]) const [listUserGant, setListUserGantt] = useState([])

Loading…
Cancel
Save