diff --git a/src/views/SimproV2/CreatedProyek/DialogFormProyek.js b/src/views/SimproV2/CreatedProyek/DialogFormProyek.js index 011b2d1..43320f7 100644 --- a/src/views/SimproV2/CreatedProyek/DialogFormProyek.js +++ b/src/views/SimproV2/CreatedProyek/DialogFormProyek.js @@ -1,7 +1,7 @@ import React, { useEffect, useState, useMemo } from "react"; import { Modal, ModalHeader, ModalBody, ModalFooter } from "reactstrap"; import { Button, Form, FormGroup, Label, Input, Col, Row } from "reactstrap"; -import { DatePicker, Tooltip, Select } from "antd"; +import { DatePicker, Tooltip, Select, Divider } from "antd"; // import { Language } from 'src/const/LanguageConst'; import axios from "../../../const/interceptorApi"; import moment from "moment"; @@ -45,6 +45,7 @@ const DialogFormProyek = ({ const [biaya, setBiaya] = useState(""); const [typeProject, setTypeproject] = useState(null); const [phaseProject, setPhaseProject] = useState(null); + const [budgetHealth, setHealthBudget] = useState(null); const [sdm, setSdm] = useState(0); const [pic, setPic] = useState(null); const [startDate, setStartDate] = useState(moment()); @@ -61,8 +62,7 @@ const DialogFormProyek = ({ const [currencyName, setCurrencyName] = useState(""); // project charter const [objectives, setObjectives] = useState(""); - const [projectIsConsideredSuccessful, setProjectIsConsideredSuccessful] = - useState(""); + const [projectIsConsideredSuccessful, setProjectIsConsideredSuccessful] = useState(""); const [participants, setParticipants] = useState([]); const [availableResources, setAvailableResources] = useState(""); const [milestones, setMilestones] = useState([]); @@ -89,6 +89,7 @@ const DialogFormProyek = ({ setBiaya(val.rencana_biaya ? formatNumber(val.rencana_biaya) : ""); setTypeproject(val.type_proyek_id); setPhaseProject(val.phase_id); + setHealthBudget(val.budget_health); setPic(val.pm_id); setStartDate(moment(val.mulai_proyek)); setEndDate(moment(val.akhir_proyek)); @@ -219,6 +220,7 @@ const DialogFormProyek = ({ setBiaya(""); setTypeproject(null); setPhaseProject(null); + setHealthBudget(null); setPic(null); setStartDate(moment()); setEndDate(moment()); @@ -275,6 +277,8 @@ const DialogFormProyek = ({ mulai_proyek: startDate, akhir_proyek: endDate, type_proyek_id: parseInt(typeProject), + phase_id: parseInt(phaseProject), + budget_health: budgetHealth, pm_id: pic, investor, finance, @@ -300,6 +304,8 @@ const DialogFormProyek = ({ mulai_proyek: startDate, akhir_proyek: endDate, type_proyek_id: parseInt(typeProject), + phase_id: parseInt(phaseProject), + budget_health: budgetHealth, pm_id: pic, investor, finance, @@ -335,6 +341,9 @@ const DialogFormProyek = ({ setPhaseProject(val); }; + const onChangeBudgetHealth = (val) => { + setHealthBudget(val); + }; const onChangePm = (val) => { let data = [...dataPM]; @@ -519,6 +528,11 @@ const DialogFormProyek = ({ const renderForm = () => { return (
); }; @@ -1113,15 +1124,15 @@ const DialogFormProyek = ({ > ) : ( - <> -