Browse Source

report analysis init

pull/1/head
wahyu 1 year ago
parent
commit
d7fe5cd02b
  1. 26
      src/views/SimproV2/CreatedProyek/ReportAnalysis.js
  2. 27
      src/views/SimproV2/CreatedProyek/index.js

26
src/views/SimproV2/CreatedProyek/ReportAnalysis.js

@ -0,0 +1,26 @@
import React from 'react'
import { Modal, ModalHeader, ModalBody, ModalFooter } from 'reactstrap';
import { Button } from 'reactstrap';
import 'antd/dist/antd.css';
import './style.css'
const ReportAnalysis = ({ openDialog, closeDialog, toggleDialog }) => {
return (
<>
<Modal size="xl" isOpen={openDialog} toggle={toggleDialog}>
<ModalHeader className="capitalize" toggle={closeDialog}>Project</ModalHeader>
<ModalBody>
<div>Report Analysis</div>
</ModalBody>
<ModalFooter>
<Button color="primary" onClick={closeDialog}>Close</Button>
</ModalFooter>
</Modal>
</>
)
}
export default ReportAnalysis;

27
src/views/SimproV2/CreatedProyek/index.js

@ -87,6 +87,7 @@ import AssignHrProject from "./AsignHrProject";
import AssignCustProject from "./AsignCustProject"; import AssignCustProject from "./AsignCustProject";
import AssignK3Project from "./AssignK3Project"; import AssignK3Project from "./AssignK3Project";
import ViewProject from "./ViewProject"; import ViewProject from "./ViewProject";
import ReportAnalysis from "./ReportAnalysis";
import { Icon } from "@iconify/react"; import { Icon } from "@iconify/react";
// import { Link } from 'react-router-dom'; // import { Link } from 'react-router-dom';
// import SubProyekComp from './SubProyekComp'; // import SubProyekComp from './SubProyekComp';
@ -122,6 +123,7 @@ const CreatedProyek = ({ params, ...props }) => {
const [totalPage, setTotalPage] = useState(0); const [totalPage, setTotalPage] = useState(0);
const [openDialog, setOpenDialog] = useState(false); const [openDialog, setOpenDialog] = useState(false);
const [openDialogViewDetail, setOpenDialogViewDetail] = useState(false); const [openDialogViewDetail, setOpenDialogViewDetail] = useState(false);
const [openDialogRA, setOpenDialogRA] = useState(false);
const [openDialogMaterial, setOpenDialogMaterial] = useState(false); const [openDialogMaterial, setOpenDialogMaterial] = useState(false);
const [openDialogTools, setOpenDialogTools] = useState(false); const [openDialogTools, setOpenDialogTools] = useState(false);
const [openDialogGantt, setOpenDialogGantt] = useState(false); const [openDialogGantt, setOpenDialogGantt] = useState(false);
@ -591,6 +593,12 @@ const CreatedProyek = ({ params, ...props }) => {
getProjectDetail(data.id); getProjectDetail(data.id);
}; };
const handleOpenReport = async (data) => {
setOpenDialogRA(true);
}
const handleCloseReport = async (data) => {
setOpenDialogRA(false);
}
const getDataProject = async (proyek_id) => { const getDataProject = async (proyek_id) => {
const url = PROYEK_GET_ID(proyek_id); const url = PROYEK_GET_ID(proyek_id);
const result = await axios const result = await axios
@ -849,6 +857,7 @@ const CreatedProyek = ({ params, ...props }) => {
const toggleAddDialog = () => setOpenDialog(!openDialog); const toggleAddDialog = () => setOpenDialog(!openDialog);
const toggleAddDialogProyek = () => setOpenDialogProyek(!openDialogProyek); const toggleAddDialogProyek = () => setOpenDialogProyek(!openDialogProyek);
const toggleAddDialogRA = () => setOpenDialogRA(!openDialogRA);
const toggleAddDialogView = () => { const toggleAddDialogView = () => {
if (openDialogViewDetail) { if (openDialogViewDetail) {
setProjectApproval(null); setProjectApproval(null);
@ -1504,6 +1513,12 @@ const CreatedProyek = ({ params, ...props }) => {
</span> </span>
<span className="menu-text">S Curve</span> <span className="menu-text">S Curve</span>
</div> </div>
<div className="menu-list" onClick={() => handleOpenReport(text)}>
<span className="menu-icon">
<i className="fa fa-pie-chart"></i>
</span>
<span className="menu-text">Report Analysis</span>
</div>
{/* </Link> */} {/* </Link> */}
<div <div
className="menu-list" className="menu-list"
@ -1886,7 +1901,16 @@ const CreatedProyek = ({ params, ...props }) => {
), ),
[openDialogViewDetail] [openDialogViewDetail]
); );
const renderReportAnalysis = useMemo(
() => (
<ReportAnalysis
openDialog={openDialogRA}
closeDialog={handleCloseReport}
toggleDialog={toggleAddDialogRA}
/>
),
[openDialogRA]
);
const renderDialogGantt = useMemo( const renderDialogGantt = useMemo(
() => ( () => (
<DialogGantt <DialogGantt
@ -1930,6 +1954,7 @@ const CreatedProyek = ({ params, ...props }) => {
Delete this data Delete this data
</SweetAlert> </SweetAlert>
{ViewProyek} {ViewProyek}
{renderReportAnalysis}
{RenderDialogForm} {RenderDialogForm}
{RenderDialogFormProyek} {RenderDialogFormProyek}
{RenderDialogFormMaterial} {RenderDialogFormMaterial}

Loading…
Cancel
Save