Browse Source

Merge pull request 'staging upload 23-04-15' (#55) from staging into master

Reviewed-on: ordo/adw-frontend#55
pull/2/head
ibnu 2 years ago
parent
commit
a078e5cce2
  1. 1
      src/routes.js
  2. 4
      src/views/SimproV2/CreatedProyek/ImportActivity/index.js
  3. 3
      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/: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 },

4
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);

3
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([])
@ -84,7 +85,7 @@ const Gantt = (props) => {
const RenderGantt = () => (
<iframe
id="frame-gantt"
src={`https://adw-gantt.ospro.id/edit-mode/index.html?base_url=${BASE_SIMPRO_LUMEN}&gantt_id=${versionGanttId}&proyek_id=${idProject}&token=${token}&ro=${ro}`}
src={`https://adw-gantt.ospro.id/edit-mode/index.html?base_url=${BASE_SIMPRO_LUMEN}&gantt_id=${versionGanttId}&proyek_id=${idProject}&token=${token}&ro=${ro}&timestamp=${timestamp}`}
style={{
width: '100%',
height: '95vh',

Loading…
Cancel
Save