|
|
|
@ -3,26 +3,14 @@ import "react-calendar-timeline/lib/Timeline.css";
|
|
|
|
|
import {USER_VERSION_GANTT_SEARCH} from "../../../const/ApiConst"; |
|
|
|
|
import axios from "../../../const/interceptorApi"; |
|
|
|
|
import "react-tiny-fab/dist/styles.css"; |
|
|
|
|
import { useHistory } from "react-router-dom"; |
|
|
|
|
import { useHistory, useLocation } from "react-router-dom"; |
|
|
|
|
import GanttFrame from "./GanttFrame"; |
|
|
|
|
|
|
|
|
|
let roCount = 0; |
|
|
|
|
|
|
|
|
|
const Gantt = (props) => { |
|
|
|
|
let role_id = 0, user_id = 0, isLogin = false, token = '', companyId = 0, all_project = null, role_name='', hierarchy=[], user_name='', companyName=''; |
|
|
|
|
if (props && props.role_id && props.user_id) { |
|
|
|
|
role_id = props.role_id; |
|
|
|
|
user_id = props.user_id; |
|
|
|
|
token = props.token; |
|
|
|
|
isLogin = props.isLogin; |
|
|
|
|
companyId = props.company_id; |
|
|
|
|
all_project = props.all_project; |
|
|
|
|
role_name = props.role_name; |
|
|
|
|
isLogin = props.isLogin; |
|
|
|
|
hierarchy = props.hierarchy; |
|
|
|
|
user_name = props.user_name; |
|
|
|
|
companyName = props.companyName; |
|
|
|
|
} |
|
|
|
|
const location = useLocation(); |
|
|
|
|
const { isLogin, token, role_id, user_id, company_id, dataViewStartDate, companyName, role_name } = location.state || {}; |
|
|
|
|
const HEADER = { |
|
|
|
|
headers: { |
|
|
|
|
"Content-Type": "application/json", |
|
|
|
@ -110,7 +98,7 @@ const Gantt = (props) => {
|
|
|
|
|
token={token} |
|
|
|
|
ro={ro} |
|
|
|
|
role_name={role_name} |
|
|
|
|
companyId={companyId} |
|
|
|
|
companyId={company_id} |
|
|
|
|
timestamp={timestamp} |
|
|
|
|
company_name={companyName} |
|
|
|
|
/> |
|
|
|
|