From 339caea9029f8602317f8a9b1ae12a657fa8bebe Mon Sep 17 00:00:00 2001 From: Muhammad Sulaiman Yusuf Date: Thu, 1 Dec 2022 15:43:11 +0700 Subject: [PATCH] type gantt --- .../SimproV2/CreatedProyek/DialogFormGantt.js | 40 +++++++++++++++---- .../SimproV2/CreatedProyek/DialogGantt.js | 5 ++- 2 files changed, 35 insertions(+), 10 deletions(-) diff --git a/src/views/SimproV2/CreatedProyek/DialogFormGantt.js b/src/views/SimproV2/CreatedProyek/DialogFormGantt.js index b429bf1..06159b7 100644 --- a/src/views/SimproV2/CreatedProyek/DialogFormGantt.js +++ b/src/views/SimproV2/CreatedProyek/DialogFormGantt.js @@ -3,6 +3,7 @@ import { Modal, ModalHeader, ModalBody, ModalFooter } from 'reactstrap'; import { Button, Form, FormGroup, Label, Input, Col, Row } from 'reactstrap'; import axios from "../../../const/interceptorApi"; import { VERSION_GANTT_ADD } from '../../../const/ApiConst'; +import { Select } from 'antd'; import 'antd/dist/antd.css'; const DialogFormGantt = ({ openDialog, closeDialog, toggleDialog, idTask }) => { @@ -16,11 +17,13 @@ const DialogFormGantt = ({ openDialog, closeDialog, toggleDialog, idTask }) => { const [id, setId] = useState(0) const [name, setName] = useState("") const [description, setDesctription] = useState("") + const [calculationType, setCalculationType] = useState("") const handleCLearData = () => { setId(0) setName("") setDesctription("") + setCalculationType("") } useEffect(() => { @@ -37,6 +40,7 @@ const DialogFormGantt = ({ openDialog, closeDialog, toggleDialog, idTask }) => { const formData = { name_version:name, description, + calculation_type: calculationType, proyek_id:idTask } @@ -45,7 +49,6 @@ const DialogFormGantt = ({ openDialog, closeDialog, toggleDialog, idTask }) => { .then(res => res) .catch((error) => error.response); - if(result && result.status==200){ closeDialog('success') }else{ @@ -62,24 +65,45 @@ const DialogFormGantt = ({ openDialog, closeDialog, toggleDialog, idTask }) => { return (
- - setName(e.target.value)} placeholder='Gantt Version 1' /> + + setName(e.target.value)} placeholder='' /> - - setDesctription(e.target.value)} placeholder='Ini adalah versi pertama gantt dari project ..' /> + + setDesctription(e.target.value)} placeholder='' /> + + +
+