Browse Source

Merge branch 'staging' of https://git.oslog.id/ordo/adw-frontend into Dev-Farhan

pull/2/head
farhan048 1 year ago
parent
commit
52741c6a7d
  1. 177
      src/views/Dashboard/DashboardProject.js

177
src/views/Dashboard/DashboardProject.js

@ -126,6 +126,7 @@ const DashboardProject = () => {
const [isReadyGanttParents, setIsReadyGanttParents] = useState(false); const [isReadyGanttParents, setIsReadyGanttParents] = useState(false);
const [calculationStatus, setCalculationStatus] = useState(false); const [calculationStatus, setCalculationStatus] = useState(false);
const [isHierarchy, setIsHierarchy] = useState(false); const [isHierarchy, setIsHierarchy] = useState(false);
const [isScurve, setIsScurve] = useState(false);
let history = useHistory(); let history = useHistory();
useEffect(() => { useEffect(() => {
@ -136,6 +137,12 @@ const DashboardProject = () => {
getComments(); getComments();
getGantt(); getGantt();
getGanttParents(); getGanttParents();
const currentURL = window.location.href;
if (currentURL.includes("dashboard-project")) {
setIsScurve(true);
} else {
setIsScurve(false);
}
return () => { return () => {
console.log("unmount RenderMap"); console.log("unmount RenderMap");
}; };
@ -1018,7 +1025,7 @@ const DashboardProject = () => {
</Col> </Col>
</Row> </Row>
<Row> <Row>
<Col span={24}> <Col span={isScurve === true ? 8 : 10}>
<div <div
style={{ style={{
border: "solid", border: "solid",
@ -1143,16 +1150,17 @@ const DashboardProject = () => {
</div> </div>
</div> </div>
</Col> </Col>
{/* <Col span={16}> {isScurve === true ? (
<div <Col span={16}>
style={{ <div
border: "solid", style={{
borderWidth: 1, border: "solid",
borderColor: "#DDDDDD", borderWidth: 1,
padding: 10, borderColor: "#DDDDDD",
margin: 2, padding: 10,
}} margin: 2,
> }}
>
<div <div
style={{ style={{
display: "flex", display: "flex",
@ -1366,7 +1374,8 @@ const DashboardProject = () => {
</div> </div>
</div> </div>
</div> </div>
</Col> */} </Col>
) : ''}
</Row> </Row>
<div <div
style={{ style={{
@ -1553,80 +1562,82 @@ const DashboardProject = () => {
</Row> </Row>
</Col> </Col>
</Row> </Row>
{/* <Row> <Row>
<Col span={24}> {isScurve === true ? (
<div <Col span={24}>
style={{ <div
backgroundColor: "#FFFFFF", style={{
padding: 10, backgroundColor: "#FFFFFF",
border: "solid", padding: 10,
borderWidth: 1, border: "solid",
borderColor: "#DDDDDD", borderWidth: 1,
marginBottom: 5, borderColor: "#DDDDDD",
marginRight: 2, marginBottom: 5,
}} marginRight: 2,
> */} }}
{/* <div style={{color: '#000000', textAlign: 'center', marginBottom: 10, fontWeight: 'bold', fontSize: 12}}>Health By Schedule</div> >
<div style={{backgroundColor: '#52AC0B', color: '#FFFFFF', padding: 5, borderRadius: 10, marginBottom: 10}}> {/* <div style={{color: '#000000', textAlign: 'center', marginBottom: 10, fontWeight: 'bold', fontSize: 12}}>Health By Schedule</div>
<div style={{textAlign: 'center', fontWeight: 500, fontSize: 12}}>On Budget</div> <div style={{backgroundColor: '#52AC0B', color: '#FFFFFF', padding: 5, borderRadius: 10, marginBottom: 10}}>
</div> */} <div style={{textAlign: 'center', fontWeight: 500, fontSize: 12}}>On Budget</div>
{/* <Row> </div> */}
<Col span={12}>Total Invoice</Col> <Row>
<Col span={12} style={{ textAlign: "right" }}> <Col span={12}>Total Invoice</Col>
{isReadyIntegrationInvoice ? ( <Col span={12} style={{ textAlign: "right" }}>
totalInvoice ? ( {isReadyIntegrationInvoice ? (
renderFormatRupiah(totalInvoice, "Rp.") totalInvoice ? (
renderFormatRupiah(totalInvoice, "Rp.")
) : (
"-"
)
) : ( ) : (
"-" <SingleTextLoader width={100} height={10} />
) )}
) : ( </Col>
<SingleTextLoader width={100} height={10} /> </Row>
)} <Row>
</Col> <Col span={12}>Cash In</Col>
</Row> <Col span={12} style={{ textAlign: "right" }}>
<Row> {isReadyIntegrationInvoice ? (
<Col span={12}>Cash In</Col> cashIn ? (
<Col span={12} style={{ textAlign: "right" }}> renderFormatRupiah(cashIn, "Rp.")
{isReadyIntegrationInvoice ? ( ) : (
cashIn ? ( "-"
renderFormatRupiah(cashIn, "Rp.") )
) : ( ) : (
"-" <SingleTextLoader width={100} height={10} />
) )}
) : ( </Col>
<SingleTextLoader width={100} height={10} /> </Row>
)} <Row>
</Col> <Col span={24}>
</Row> <hr style={{ margin: 2 }} />
<Row> </Col>
<Col span={24}> </Row>
<hr style={{ margin: 2 }} /> <Row>
</Col> <Col span={12}>Outstanding Balance</Col>
</Row> <Col
<Row> span={12}
<Col span={12}>Outstanding Balance</Col> style={{
<Col textAlign: "right",
span={12} color: "#E80053",
style={{ fontWeight: 500,
textAlign: "right", }}
color: "#E80053", >
fontWeight: 500, {isReadyIntegrationInvoice ? (
}} outstandingBalance ? (
> renderFormatRupiah(outstandingBalance, "Rp.")
{isReadyIntegrationInvoice ? ( ) : (
outstandingBalance ? ( "-"
renderFormatRupiah(outstandingBalance, "Rp.") )
) : ( ) : (
"-" <SingleTextLoader width={100} height={10} />
) )}
) : ( </Col>
<SingleTextLoader width={100} height={10} /> </Row>
)} </div>
</Col> </Col>
</Row> ):''}
</div> </Row>
</Col>
</Row> */}
<Row> <Row>
<Col span={24}> <Col span={24}>
<div <div

Loading…
Cancel
Save