diff --git a/src/views/Report/k3/index.js b/src/views/Report/k3/index.js index 66f9ad2..383ac6b 100644 --- a/src/views/Report/k3/index.js +++ b/src/views/Report/k3/index.js @@ -103,6 +103,7 @@ class index extends Component { getAllProyek = async () => { const payload = { + "select": ["id", "nama"], "paging": { "start": 0, "length": -1 }, "columns": [ { "name": "nama", "logic_operator": "ilike", "value": "", "operator": "AND" } diff --git a/src/views/SimproV2/CreatedProyek/DialogGantt.js b/src/views/SimproV2/CreatedProyek/DialogGantt.js index 0f72d16..9d2f776 100644 --- a/src/views/SimproV2/CreatedProyek/DialogGantt.js +++ b/src/views/SimproV2/CreatedProyek/DialogGantt.js @@ -31,18 +31,13 @@ const DialogGantt = ({ openDialog, closeDialog, toggleDialog, idTask, proyekName const [humanResource, setHumanResource] = useState([]) useEffect(() => { - if (hierarchyId > 0 || idTask > 0 && !openDialogHierarchy) { + if (openDialog && hierarchyId > 0 || idTask > 0 && !openDialogHierarchy) { getdataGantt(); } - }, [hierarchyId, idTask, openDialog]) - - useEffect(() => { if (!openDialog) { setDataGantt([]); - } else { - } - }, [openDialog]) + }, [hierarchyId, idTask, openDialog]) const getDataHumanResource = async () => { const result = await axios diff --git a/src/views/SimproV2/CreatedProyek/FormAsignHr.js b/src/views/SimproV2/CreatedProyek/FormAsignHr.js index 933f17d..b02909d 100644 --- a/src/views/SimproV2/CreatedProyek/FormAsignHr.js +++ b/src/views/SimproV2/CreatedProyek/FormAsignHr.js @@ -22,6 +22,7 @@ const FormAsignHr = ({ openDialog, closeDialog, toggleDialog, idTask, dataEdit, const [accrue, setAccrue] = useState("") const [baseCalender, setBaseCalender] = useState("") const [listHr, setListHr] = useState([]) + const [isCustomer, setIsCustomer] = useState(false) const handleClearData = () => { setUser(null) @@ -29,6 +30,7 @@ const FormAsignHr = ({ openDialog, closeDialog, toggleDialog, idTask, dataEdit, setProjectRole(null) setGroupR("") setMaxUsed("") + setIsCustomer(false) setStandartRate("") setUomStandartRate(null) setOverTimeRate("") @@ -67,6 +69,7 @@ const FormAsignHr = ({ openDialog, closeDialog, toggleDialog, idTask, dataEdit, setProjectRole(dataEdit.project_role) setGroupR(dataEdit.group_r) setMaxUsed(dataEdit.max_used ? formatNumber(dataEdit.max_used.toString()) : '') + setIsCustomer(dataEdit.is_customer) setStandartRate(dataEdit.standart_rate ? formatNumber(dataEdit.standart_rate.toString()) : '') setUomStandartRate(dataEdit.uom_standart_rate) setOverTimeRate(dataEdit.overtime_rate ? formatNumber(dataEdit.overtime_rate.toString()) : '') @@ -91,6 +94,7 @@ const FormAsignHr = ({ openDialog, closeDialog, toggleDialog, idTask, dataEdit, proyek_id: idTask, user_id:user, project_role:projectRole, + is_customer: isCustomer, max_used:maxUsed.replaceAll(".", ""), standart_rate:standartRate.replaceAll(".", ""), uom_standart_rate:uomStandartRate, @@ -104,6 +108,7 @@ const FormAsignHr = ({ openDialog, closeDialog, toggleDialog, idTask, dataEdit, proyek_id: idTask, user_id:user, project_role:projectRole, + is_customer: isCustomer, max_used:maxUsed.replaceAll(".", ""), standart_rate:standartRate.replaceAll(".", ""), uom_standart_rate:uomStandartRate, @@ -157,6 +162,33 @@ const FormAsignHr = ({ openDialog, closeDialog, toggleDialog, idTask, dataEdit, + + + + +
+