|
|
@ -35,6 +35,7 @@ import { |
|
|
|
TYPE_PROYEK, |
|
|
|
TYPE_PROYEK, |
|
|
|
PROYEK_ADD, |
|
|
|
PROYEK_ADD, |
|
|
|
PROYEK_SEARCH, |
|
|
|
PROYEK_SEARCH, |
|
|
|
|
|
|
|
PROYEK_SEARCH_BY_USER, |
|
|
|
PROYEK_EDIT, |
|
|
|
PROYEK_EDIT, |
|
|
|
PROYEK_DELETE, |
|
|
|
PROYEK_DELETE, |
|
|
|
TOOLS_RESOURCE_SEARCH, |
|
|
|
TOOLS_RESOURCE_SEARCH, |
|
|
@ -52,7 +53,7 @@ import { |
|
|
|
VERSION_GANTT_SEARCH, |
|
|
|
VERSION_GANTT_SEARCH, |
|
|
|
PHASE_PROYEK, |
|
|
|
PHASE_PROYEK, |
|
|
|
DIVISI_LIST, |
|
|
|
DIVISI_LIST, |
|
|
|
BASE_OSPRO |
|
|
|
BASE_OSPRO, |
|
|
|
} from "../../../const/ApiConst"; |
|
|
|
} from "../../../const/ApiConst"; |
|
|
|
import { |
|
|
|
import { |
|
|
|
formatNumber, |
|
|
|
formatNumber, |
|
|
@ -70,6 +71,7 @@ import DialogGantt from "./DialogGantt"; |
|
|
|
import DialogHierarchy from "./DialogHierarchy"; |
|
|
|
import DialogHierarchy from "./DialogHierarchy"; |
|
|
|
// import DialogAsignHr from './AsignHrProject';
|
|
|
|
// import DialogAsignHr from './AsignHrProject';
|
|
|
|
import AssignHrProject from "./AsignHrProject"; |
|
|
|
import AssignHrProject from "./AsignHrProject"; |
|
|
|
|
|
|
|
import AssignCustProject from "./AsignCustProject"; |
|
|
|
import AssignK3Project from "./AssignK3Project"; |
|
|
|
import AssignK3Project from "./AssignK3Project"; |
|
|
|
import ViewProject from "./ViewProject"; |
|
|
|
import ViewProject from "./ViewProject"; |
|
|
|
import { Icon } from "@iconify/react"; |
|
|
|
import { Icon } from "@iconify/react"; |
|
|
@ -80,6 +82,7 @@ import { Link, useHistory } from "react-router-dom"; |
|
|
|
const url = ""; |
|
|
|
const url = ""; |
|
|
|
const proyek_id = localStorage.getItem("proyek_id"); |
|
|
|
const proyek_id = localStorage.getItem("proyek_id"); |
|
|
|
const role_id = localStorage.getItem("role_id"); |
|
|
|
const role_id = localStorage.getItem("role_id"); |
|
|
|
|
|
|
|
const user_id = localStorage.getItem("user_id"); |
|
|
|
const format = "DD-MM-YYYY"; |
|
|
|
const format = "DD-MM-YYYY"; |
|
|
|
|
|
|
|
|
|
|
|
const CreatedProyek = ({ params, ...props }) => { |
|
|
|
const CreatedProyek = ({ params, ...props }) => { |
|
|
@ -104,6 +107,7 @@ const CreatedProyek = ({ params, ...props }) => { |
|
|
|
const [openDialogGantt, setOpenDialogGantt] = useState(false); |
|
|
|
const [openDialogGantt, setOpenDialogGantt] = useState(false); |
|
|
|
const [openDialogHierarchy, setOpenDialogHierarchy] = useState(false); |
|
|
|
const [openDialogHierarchy, setOpenDialogHierarchy] = useState(false); |
|
|
|
const [openDialogAsignHR, setOpenDialogAsignHR] = useState(false); |
|
|
|
const [openDialogAsignHR, setOpenDialogAsignHR] = useState(false); |
|
|
|
|
|
|
|
const [openDialogAsignCust, setOpenDialogAsignCust] = useState(false); |
|
|
|
const [openDialogAssignK3, setOpenDialogAssignK3] = useState(false); |
|
|
|
const [openDialogAssignK3, setOpenDialogAssignK3] = useState(false); |
|
|
|
const [dataK3, setDataK3] = useState([]); // transfer list
|
|
|
|
const [dataK3, setDataK3] = useState([]); // transfer list
|
|
|
|
const [idDelete, setIdDelete] = useState(0); |
|
|
|
const [idDelete, setIdDelete] = useState(0); |
|
|
@ -163,10 +167,10 @@ const CreatedProyek = ({ params, ...props }) => { |
|
|
|
handleGetDivisions(); |
|
|
|
handleGetDivisions(); |
|
|
|
handleGetDataPm(); |
|
|
|
handleGetDataPm(); |
|
|
|
} |
|
|
|
} |
|
|
|
}, [openDialogProyek]) |
|
|
|
}, [openDialogProyek]); |
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
useEffect(() => { |
|
|
|
getDataProyek(); |
|
|
|
role_id !== "44" ? getDataProyek() : getDataProyekByCustomer(); |
|
|
|
}, [search, rowsPerPage, currentPage]); |
|
|
|
}, [search, rowsPerPage, currentPage]); |
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
useEffect(() => { |
|
|
@ -231,20 +235,27 @@ const CreatedProyek = ({ params, ...props }) => { |
|
|
|
|
|
|
|
|
|
|
|
const handleDashboard = async (text) => { |
|
|
|
const handleDashboard = async (text) => { |
|
|
|
const URL = `${BASE_OSPRO}/api/project/detail/${text.id}`; |
|
|
|
const URL = `${BASE_OSPRO}/api/project/detail/${text.id}`; |
|
|
|
const result = await axios.get(URL, HEADER).then(res => res).catch(err => err.response) |
|
|
|
const result = await axios |
|
|
|
|
|
|
|
.get(URL, HEADER) |
|
|
|
|
|
|
|
.then((res) => res) |
|
|
|
|
|
|
|
.catch((err) => err.response); |
|
|
|
if (!result) { |
|
|
|
if (!result) { |
|
|
|
NotificationManager.error(`Could not connect to internet.`, "Failed"); |
|
|
|
NotificationManager.error(`Could not connect to internet.`, "Failed"); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (result.status !== 200) { |
|
|
|
if (result.status !== 200) { |
|
|
|
NotificationManager.error(`Get project detail failed, ${result.data.message}`, "Failed"); |
|
|
|
NotificationManager.error( |
|
|
|
|
|
|
|
`Get project detail failed, ${result.data.message}`, |
|
|
|
|
|
|
|
"Failed" |
|
|
|
|
|
|
|
); |
|
|
|
return; |
|
|
|
return; |
|
|
|
|
|
|
|
} else if (result.status == 200 && result.data.data) { |
|
|
|
|
|
|
|
history.push( |
|
|
|
|
|
|
|
`dashboard-customer/${text.id}/${result.data.gantt.last_gantt_id}/1` |
|
|
|
|
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
else if (result.status == 200 && result.data.data) { |
|
|
|
}; |
|
|
|
history.push(`dashboard-customer/${text.id}/${result.data.gantt.last_gantt_id}/1`); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const getDataProyek = async () => { |
|
|
|
const getDataProyek = async () => { |
|
|
|
let start = 0; |
|
|
|
let start = 0; |
|
|
@ -262,7 +273,15 @@ const CreatedProyek = ({ params, ...props }) => { |
|
|
|
operator: "AND", |
|
|
|
operator: "AND", |
|
|
|
}, |
|
|
|
}, |
|
|
|
], |
|
|
|
], |
|
|
|
select: ["id", "nama", "rencana_biaya", "type_proyek_id", "currency_symbol", "mulai_proyek", "akhir_proyek"], |
|
|
|
select: [ |
|
|
|
|
|
|
|
"id", |
|
|
|
|
|
|
|
"nama", |
|
|
|
|
|
|
|
"rencana_biaya", |
|
|
|
|
|
|
|
"type_proyek_id", |
|
|
|
|
|
|
|
"currency_symbol", |
|
|
|
|
|
|
|
"mulai_proyek", |
|
|
|
|
|
|
|
"akhir_proyek", |
|
|
|
|
|
|
|
], |
|
|
|
joins: [ |
|
|
|
joins: [ |
|
|
|
{ |
|
|
|
{ |
|
|
|
name: "m_users", |
|
|
|
name: "m_users", |
|
|
@ -286,7 +305,6 @@ const CreatedProyek = ({ params, ...props }) => { |
|
|
|
]; |
|
|
|
]; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const result = await axios |
|
|
|
const result = await axios |
|
|
|
.post(PROYEK_SEARCH, payload, HEADER) |
|
|
|
.post(PROYEK_SEARCH, payload, HEADER) |
|
|
|
.then((res) => res) |
|
|
|
.then((res) => res) |
|
|
@ -304,6 +322,24 @@ const CreatedProyek = ({ params, ...props }) => { |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const getDataProyekByCustomer = async () => { |
|
|
|
|
|
|
|
const url = `${BASE_OSPRO}/api/project-by-customer/${user_id}`; |
|
|
|
|
|
|
|
const result = await axios |
|
|
|
|
|
|
|
.get(url, HEADER) |
|
|
|
|
|
|
|
.then((res) => res) |
|
|
|
|
|
|
|
.catch((error) => error.response); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (result && result.data && result.data.code == 200) { |
|
|
|
|
|
|
|
let dataRes = result.data.data || []; |
|
|
|
|
|
|
|
setDatatable(dataRes); |
|
|
|
|
|
|
|
setTotalPage(result.data.totalRecord); |
|
|
|
|
|
|
|
setLoading(false); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
setLoading(false); |
|
|
|
|
|
|
|
NotificationManager.error("Gagal Mengambil Data!!", "Failed"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
const getDataMaterialResource = async () => { |
|
|
|
const getDataMaterialResource = async () => { |
|
|
|
const result = await axios |
|
|
|
const result = await axios |
|
|
|
.get(MATERIAL_RESOURCE_LIST, HEADER) |
|
|
|
.get(MATERIAL_RESOURCE_LIST, HEADER) |
|
|
@ -435,6 +471,12 @@ const CreatedProyek = ({ params, ...props }) => { |
|
|
|
setOpenDialogAsignHR(true); |
|
|
|
setOpenDialogAsignHR(true); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const handleOpenAsignCust = (data) => { |
|
|
|
|
|
|
|
setidTask(data.id); |
|
|
|
|
|
|
|
setProyekName(data.nama); |
|
|
|
|
|
|
|
setOpenDialogAsignCust(true); |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
const handleOpenAssignK3 = (data) => { |
|
|
|
const handleOpenAssignK3 = (data) => { |
|
|
|
setidTask(data.id); |
|
|
|
setidTask(data.id); |
|
|
|
setProyekName(data.nama); |
|
|
|
setProyekName(data.nama); |
|
|
@ -461,23 +503,30 @@ const CreatedProyek = ({ params, ...props }) => { |
|
|
|
|
|
|
|
|
|
|
|
const getProjectDetail = async (id) => { |
|
|
|
const getProjectDetail = async (id) => { |
|
|
|
const URL = `${BASE_OSPRO}/api/project/detail/${id}`; |
|
|
|
const URL = `${BASE_OSPRO}/api/project/detail/${id}`; |
|
|
|
const result = await axios.get(URL, HEADER).then(res => res).catch(err => err.response) |
|
|
|
const result = await axios |
|
|
|
|
|
|
|
.get(URL, HEADER) |
|
|
|
|
|
|
|
.then((res) => res) |
|
|
|
|
|
|
|
.catch((err) => err.response); |
|
|
|
if (!result) { |
|
|
|
if (!result) { |
|
|
|
NotificationManager.error(`Could not connect to internet.`, "Failed"); |
|
|
|
NotificationManager.error(`Could not connect to internet.`, "Failed"); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (result.status !== 200) { |
|
|
|
if (result.status !== 200) { |
|
|
|
NotificationManager.error(`Get project detail failed, ${result.data.message}`, "Failed"); |
|
|
|
NotificationManager.error( |
|
|
|
|
|
|
|
`Get project detail failed, ${result.data.message}`, |
|
|
|
|
|
|
|
"Failed" |
|
|
|
|
|
|
|
); |
|
|
|
return; |
|
|
|
return; |
|
|
|
|
|
|
|
} else if (result.status == 200 && result.data.data) { |
|
|
|
|
|
|
|
history.push( |
|
|
|
|
|
|
|
`/dashboard-project/${id}/${result.data.gantt.last_gantt_id}/1` |
|
|
|
|
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
else if (result.status == 200 && result.data.data) { |
|
|
|
}; |
|
|
|
history.push(`/dashboard-project/${id}/${result.data.gantt.last_gantt_id}/1`); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const handleSCurve = async (data) => { |
|
|
|
const handleSCurve = async (data) => { |
|
|
|
getProjectDetail(data.id) |
|
|
|
getProjectDetail(data.id); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
const getDataProject = async (proyek_id) => { |
|
|
|
const getDataProject = async (proyek_id) => { |
|
|
@ -532,7 +581,6 @@ const CreatedProyek = ({ params, ...props }) => { |
|
|
|
if (result && result.data && result.data.code == 200) { |
|
|
|
if (result && result.data && result.data.code == 200) { |
|
|
|
let dataRes = result.data.data; |
|
|
|
let dataRes = result.data.data; |
|
|
|
setProjectParticipant(dataRes); |
|
|
|
setProjectParticipant(dataRes); |
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
} else { |
|
|
|
NotificationManager.error("Gagal Mengambil Data!!", "Failed"); |
|
|
|
NotificationManager.error("Gagal Mengambil Data!!", "Failed"); |
|
|
|
} |
|
|
|
} |
|
|
@ -603,7 +651,8 @@ const CreatedProyek = ({ params, ...props }) => { |
|
|
|
.catch((error) => error.response); |
|
|
|
.catch((error) => error.response); |
|
|
|
|
|
|
|
|
|
|
|
if (result && result.data && result.data.code === 200) { |
|
|
|
if (result && result.data && result.data.code === 200) { |
|
|
|
getDataProyek(); |
|
|
|
role_id !== "44" ? getDataProyek() : getDataProyekByCustomer(); |
|
|
|
|
|
|
|
|
|
|
|
setIdDelete(0); |
|
|
|
setIdDelete(0); |
|
|
|
setAlertDelete(false); |
|
|
|
setAlertDelete(false); |
|
|
|
NotificationManager.success(`Data proyek berhasil dihapus`, "Success!!"); |
|
|
|
NotificationManager.success(`Data proyek berhasil dihapus`, "Success!!"); |
|
|
@ -649,7 +698,7 @@ const CreatedProyek = ({ params, ...props }) => { |
|
|
|
NotificationManager.success(`${result.data.message}`, "Success!!"); |
|
|
|
NotificationManager.success(`${result.data.message}`, "Success!!"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
getDataProyek(); |
|
|
|
role_id !== "44" ? getDataProyek() : getDataProyekByCustomer(); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
NotificationManager.error(`${result.data.message}`, "Failed!!"); |
|
|
|
NotificationManager.error(`${result.data.message}`, "Failed!!"); |
|
|
|
} |
|
|
|
} |
|
|
@ -730,7 +779,7 @@ const CreatedProyek = ({ params, ...props }) => { |
|
|
|
const resultMilestone = await editMilestone(data.id, milestones); |
|
|
|
const resultMilestone = await editMilestone(data.id, milestones); |
|
|
|
const resultApproval = await editApproval(data.id, approval); |
|
|
|
const resultApproval = await editApproval(data.id, approval); |
|
|
|
if (result && result.status === 200) { |
|
|
|
if (result && result.status === 200) { |
|
|
|
getDataProyek(); |
|
|
|
role_id !== "44" ? getDataProyek() : getDataProyekByCustomer(); |
|
|
|
NotificationManager.success(`Data proyek berhasil Ubah`, "Success!!"); |
|
|
|
NotificationManager.success(`Data proyek berhasil Ubah`, "Success!!"); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
NotificationManager.error(`${result.data.message}`, "Failed!!"); |
|
|
|
NotificationManager.error(`${result.data.message}`, "Failed!!"); |
|
|
@ -834,7 +883,6 @@ const CreatedProyek = ({ params, ...props }) => { |
|
|
|
.then((res) => res) |
|
|
|
.then((res) => res) |
|
|
|
.catch((error) => error.response); |
|
|
|
.catch((error) => error.response); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (result && result.data && result.data.code == 200) { |
|
|
|
if (result && result.data && result.data.code == 200) { |
|
|
|
let resData = result.data.data; |
|
|
|
let resData = result.data.data; |
|
|
|
const excelData = []; |
|
|
|
const excelData = []; |
|
|
@ -1005,6 +1053,12 @@ const CreatedProyek = ({ params, ...props }) => { |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
<span className="menu-text">Assign Human Resource</span> |
|
|
|
<span className="menu-text">Assign Human Resource</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div className="menu-list" onClick={() => handleOpenAsignCust(text)}> |
|
|
|
|
|
|
|
<span className="menu-icon"> |
|
|
|
|
|
|
|
<i className="fa fa-user-circle-o"></i> |
|
|
|
|
|
|
|
</span> |
|
|
|
|
|
|
|
<span className="menu-text">Assign Customer</span> |
|
|
|
|
|
|
|
</div> |
|
|
|
<div className="menu-list" onClick={() => handleOpenAssignK3(text)}> |
|
|
|
<div className="menu-list" onClick={() => handleOpenAssignK3(text)}> |
|
|
|
<span className="menu-icon"> |
|
|
|
<span className="menu-icon"> |
|
|
|
<i className="fa fa-plus-circle"></i> |
|
|
|
<i className="fa fa-plus-circle"></i> |
|
|
@ -1068,7 +1122,7 @@ const CreatedProyek = ({ params, ...props }) => { |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
)} |
|
|
|
)} |
|
|
|
|
|
|
|
|
|
|
|
{(!loadVersionGantt && text.type_proyek_id !== 9) && ( |
|
|
|
{!loadVersionGantt && text.type_proyek_id !== 9 && ( |
|
|
|
<> |
|
|
|
<> |
|
|
|
{dataVersionGantt.slice(0, 8).map((res) => ( |
|
|
|
{dataVersionGantt.slice(0, 8).map((res) => ( |
|
|
|
<Link to={`/projects/${res.id}/${text.id}/gantt`}> |
|
|
|
<Link to={`/projects/${res.id}/${text.id}/gantt`}> |
|
|
@ -1094,7 +1148,7 @@ const CreatedProyek = ({ params, ...props }) => { |
|
|
|
)} |
|
|
|
)} |
|
|
|
</> |
|
|
|
</> |
|
|
|
)} |
|
|
|
)} |
|
|
|
{text.type_proyek_id == 9 ? |
|
|
|
{text.type_proyek_id == 9 ? ( |
|
|
|
<div |
|
|
|
<div |
|
|
|
className="menu-list" |
|
|
|
className="menu-list" |
|
|
|
onClick={() => handleOpenDialogHierarchy(text)} |
|
|
|
onClick={() => handleOpenDialogHierarchy(text)} |
|
|
@ -1103,7 +1157,8 @@ const CreatedProyek = ({ params, ...props }) => { |
|
|
|
<i className="fa fa-bars"></i> |
|
|
|
<i className="fa fa-bars"></i> |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
<span className="menu-text">More Hierarchy Menu ...</span> |
|
|
|
<span className="menu-text">More Hierarchy Menu ...</span> |
|
|
|
</div> : |
|
|
|
</div> |
|
|
|
|
|
|
|
) : ( |
|
|
|
<div |
|
|
|
<div |
|
|
|
className="menu-list" |
|
|
|
className="menu-list" |
|
|
|
onClick={() => handleOpenDialogGantt(text)} |
|
|
|
onClick={() => handleOpenDialogGantt(text)} |
|
|
@ -1112,7 +1167,8 @@ const CreatedProyek = ({ params, ...props }) => { |
|
|
|
<i className="fa fa-bars"></i> |
|
|
|
<i className="fa fa-bars"></i> |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
<span className="menu-text">More Gantt Menu ...</span> |
|
|
|
<span className="menu-text">More Gantt Menu ...</span> |
|
|
|
</div>} |
|
|
|
</div> |
|
|
|
|
|
|
|
)} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
); |
|
|
|
); |
|
|
|
}; |
|
|
|
}; |
|
|
@ -1123,17 +1179,21 @@ const CreatedProyek = ({ params, ...props }) => { |
|
|
|
title: "Action", |
|
|
|
title: "Action", |
|
|
|
dataIndex: "", |
|
|
|
dataIndex: "", |
|
|
|
key: "x", |
|
|
|
key: "x", |
|
|
|
render: (text, record) => ( |
|
|
|
render: (text, record) => |
|
|
|
role_id == "44"
|
|
|
|
role_id == "44" ? ( |
|
|
|
? |
|
|
|
|
|
|
|
<> |
|
|
|
<> |
|
|
|
<Tooltip title="Dashboard Project"> |
|
|
|
<Tooltip title="Dashboard Project"> |
|
|
|
<Button size="small" onClick={() => handleDashboard(text)} type="link" style={{ color: "green" }}> |
|
|
|
<Button |
|
|
|
|
|
|
|
size="small" |
|
|
|
|
|
|
|
onClick={() => handleDashboard(text)} |
|
|
|
|
|
|
|
type="link" |
|
|
|
|
|
|
|
style={{ color: "green" }} |
|
|
|
|
|
|
|
> |
|
|
|
<i className="fa fa-line-chart"></i> |
|
|
|
<i className="fa fa-line-chart"></i> |
|
|
|
</Button> |
|
|
|
</Button> |
|
|
|
</Tooltip> |
|
|
|
</Tooltip> |
|
|
|
</> |
|
|
|
</> |
|
|
|
: |
|
|
|
) : ( |
|
|
|
<> |
|
|
|
<> |
|
|
|
<Popover |
|
|
|
<Popover |
|
|
|
placement="rightTop" |
|
|
|
placement="rightTop" |
|
|
@ -1151,15 +1211,11 @@ const CreatedProyek = ({ params, ...props }) => { |
|
|
|
content={popupMenuGantt(text, record)} |
|
|
|
content={popupMenuGantt(text, record)} |
|
|
|
trigger="click" |
|
|
|
trigger="click" |
|
|
|
> |
|
|
|
> |
|
|
|
{ |
|
|
|
{text.type_proyek_id == 9 ? ( |
|
|
|
text.type_proyek_id == 9 ? |
|
|
|
<Button size="small" type="link" style={{ color: "green" }}> |
|
|
|
<Button |
|
|
|
|
|
|
|
size="small" |
|
|
|
|
|
|
|
type="link" |
|
|
|
|
|
|
|
style={{ color: "green" }} |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<i className="fa fa-bars"></i> |
|
|
|
<i className="fa fa-bars"></i> |
|
|
|
</Button> : |
|
|
|
</Button> |
|
|
|
|
|
|
|
) : ( |
|
|
|
<Button |
|
|
|
<Button |
|
|
|
onClick={() => getdataGantt(text.id)} |
|
|
|
onClick={() => getdataGantt(text.id)} |
|
|
|
size="small" |
|
|
|
size="small" |
|
|
@ -1168,7 +1224,7 @@ const CreatedProyek = ({ params, ...props }) => { |
|
|
|
> |
|
|
|
> |
|
|
|
<i className="fa fa-bars"></i> |
|
|
|
<i className="fa fa-bars"></i> |
|
|
|
</Button> |
|
|
|
</Button> |
|
|
|
} |
|
|
|
)} |
|
|
|
</Popover> |
|
|
|
</Popover> |
|
|
|
</> |
|
|
|
</> |
|
|
|
), |
|
|
|
), |
|
|
@ -1235,6 +1291,11 @@ const CreatedProyek = ({ params, ...props }) => { |
|
|
|
setOpenDialogAsignHR(false); |
|
|
|
setOpenDialogAsignHR(false); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const handleCloseDialogAsignCust = () => { |
|
|
|
|
|
|
|
setidTask(0); |
|
|
|
|
|
|
|
setOpenDialogAsignCust(false); |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
const handleCloseDialogAssignK3 = (status) => { |
|
|
|
const handleCloseDialogAssignK3 = (status) => { |
|
|
|
if (status == "success") { |
|
|
|
if (status == "success") { |
|
|
|
NotificationManager.success( |
|
|
|
NotificationManager.success( |
|
|
@ -1279,7 +1340,14 @@ const CreatedProyek = ({ params, ...props }) => { |
|
|
|
dataPM={dataPm} |
|
|
|
dataPM={dataPm} |
|
|
|
/> |
|
|
|
/> |
|
|
|
), |
|
|
|
), |
|
|
|
[openDialogProyek, dataPm, dataDivisions, dataPhaseProject, dataTypeProyek, idTask] |
|
|
|
[ |
|
|
|
|
|
|
|
openDialogProyek, |
|
|
|
|
|
|
|
dataPm, |
|
|
|
|
|
|
|
dataDivisions, |
|
|
|
|
|
|
|
dataPhaseProject, |
|
|
|
|
|
|
|
dataTypeProyek, |
|
|
|
|
|
|
|
idTask, |
|
|
|
|
|
|
|
] |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
const RenderDialogFormMaterial = useMemo( |
|
|
|
const RenderDialogFormMaterial = useMemo( |
|
|
@ -1295,7 +1363,14 @@ const CreatedProyek = ({ params, ...props }) => { |
|
|
|
proyekName={proyekName} |
|
|
|
proyekName={proyekName} |
|
|
|
/> |
|
|
|
/> |
|
|
|
), |
|
|
|
), |
|
|
|
[openDialogMaterial, proyekName, materialResource, materialProyek, userProyek, idTask] |
|
|
|
[ |
|
|
|
|
|
|
|
openDialogMaterial, |
|
|
|
|
|
|
|
proyekName, |
|
|
|
|
|
|
|
materialResource, |
|
|
|
|
|
|
|
materialProyek, |
|
|
|
|
|
|
|
userProyek, |
|
|
|
|
|
|
|
idTask, |
|
|
|
|
|
|
|
] |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
const RenderDialogTableTools = useMemo( |
|
|
|
const RenderDialogTableTools = useMemo( |
|
|
@ -1328,6 +1403,21 @@ const CreatedProyek = ({ params, ...props }) => { |
|
|
|
[openDialogAsignHR] |
|
|
|
[openDialogAsignHR] |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// DialogAsignCust
|
|
|
|
|
|
|
|
const RenderDialogAsignCust = useMemo( |
|
|
|
|
|
|
|
() => ( |
|
|
|
|
|
|
|
<AssignCustProject |
|
|
|
|
|
|
|
openDialog={openDialogAsignCust} |
|
|
|
|
|
|
|
closeDialog={() => setOpenDialogAsignCust(false)} |
|
|
|
|
|
|
|
toggleDialog={() => setOpenDialogAsignCust(!openDialogAsignCust)} |
|
|
|
|
|
|
|
handleClose={handleCloseDialogAsignCust} |
|
|
|
|
|
|
|
idTask={idTask} |
|
|
|
|
|
|
|
proyekName={proyekName} |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
[openDialogAsignCust] |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
// DialogAssignK3
|
|
|
|
// DialogAssignK3
|
|
|
|
const RenderDialogAssignK3 = useMemo( |
|
|
|
const RenderDialogAssignK3 = useMemo( |
|
|
|
() => ( |
|
|
|
() => ( |
|
|
@ -1428,6 +1518,7 @@ const CreatedProyek = ({ params, ...props }) => { |
|
|
|
{renderDialogGantt} |
|
|
|
{renderDialogGantt} |
|
|
|
{renderDialogHierarchy} |
|
|
|
{renderDialogHierarchy} |
|
|
|
{RenderDialogAsignHr} |
|
|
|
{RenderDialogAsignHr} |
|
|
|
|
|
|
|
{RenderDialogAsignCust} |
|
|
|
{RenderDialogAssignK3} |
|
|
|
{RenderDialogAssignK3} |
|
|
|
<Card> |
|
|
|
<Card> |
|
|
|
<CardHeader |
|
|
|
<CardHeader |
|
|
@ -1447,11 +1538,7 @@ const CreatedProyek = ({ params, ...props }) => { |
|
|
|
/> |
|
|
|
/> |
|
|
|
</Col> |
|
|
|
</Col> |
|
|
|
<Col> |
|
|
|
<Col> |
|
|
|
{ |
|
|
|
{role_id == "44" ? null : ( // role kustomer
|
|
|
|
role_id == "44" // role kustomer
|
|
|
|
|
|
|
|
? |
|
|
|
|
|
|
|
null |
|
|
|
|
|
|
|
: |
|
|
|
|
|
|
|
<Tooltip title="Add Project"> |
|
|
|
<Tooltip title="Add Project"> |
|
|
|
<Button |
|
|
|
<Button |
|
|
|
style={{ background: "#4caf50", color: "#fff" }} |
|
|
|
style={{ background: "#4caf50", color: "#fff" }} |
|
|
@ -1460,7 +1547,7 @@ const CreatedProyek = ({ params, ...props }) => { |
|
|
|
<i className="fa fa-plus"></i> |
|
|
|
<i className="fa fa-plus"></i> |
|
|
|
</Button> |
|
|
|
</Button> |
|
|
|
</Tooltip> |
|
|
|
</Tooltip> |
|
|
|
} |
|
|
|
)} |
|
|
|
<Tooltip title="Export Excel"> |
|
|
|
<Tooltip title="Export Excel"> |
|
|
|
<Popover |
|
|
|
<Popover |
|
|
|
// content={<a onClick={hide}>Close</a>}
|
|
|
|
// content={<a onClick={hide}>Close</a>}
|
|
|
|