|
|
|
@ -43,6 +43,8 @@ const DashboardProject = () => {
|
|
|
|
|
const [customerName, setCustomerName] = useState(""); |
|
|
|
|
const [plannedStart, setPlannedStart] = useState(null) |
|
|
|
|
const [plannedFinish, setPlannedFinish] = useState(null) |
|
|
|
|
const [plannedCost, setPlannedCost] = useState(null) |
|
|
|
|
const [totalCost, setTotalCost] = useState(null) |
|
|
|
|
const [actualStart, setActualStart] = useState(null) |
|
|
|
|
const [actualFinish, setActualFinish] = useState(null) |
|
|
|
|
const [estimatedFinish, setEstimatedFinish] = useState(null) |
|
|
|
@ -119,6 +121,7 @@ const DashboardProject = () => {
|
|
|
|
|
setPlannedFinish(result.data.data?.akhir_proyek ? result.data.data.akhir_proyek : null) |
|
|
|
|
setActualStart(result.data.data.header?.start_date ? result.data.data.header.start_date : null) |
|
|
|
|
setEstimatedFinish(result.data.data.header?.end_date ? result.data.data.header.end_date : null) |
|
|
|
|
setPlannedCost(result.data.data.rencana_biaya ? result.data.data.rencana_biaya : null) |
|
|
|
|
setIsReadyProjectDetail(true); |
|
|
|
|
|
|
|
|
|
if (result.data.data.kode_sortname && result.data.data.kode_sortname !== '') { |
|
|
|
@ -238,9 +241,12 @@ const DashboardProject = () => {
|
|
|
|
|
if (result.data.data.data) { |
|
|
|
|
let total_invoice = result.data.data.data.total_invoice_amount; |
|
|
|
|
let cash_in = result.data.data.data.total_invoice_paid_amount; |
|
|
|
|
let total_cost = result.data.data.data.total_cost; |
|
|
|
|
let outstanding_balance = total_invoice - cash_in; |
|
|
|
|
setTotalInvoice(total_invoice ? total_invoice.toString() : null); |
|
|
|
|
setCashIn(cash_in ? cash_in.toString() : null) |
|
|
|
|
total_cost = total_cost.toString().split('.')[0] |
|
|
|
|
setTotalCost(total_cost? total_cost.toString() : null) |
|
|
|
|
setOutstandingBalance(outstanding_balance ? outstanding_balance.toString() : null); |
|
|
|
|
} |
|
|
|
|
setIsReadyIntegrationInvoice(true); |
|
|
|
@ -543,8 +549,8 @@ const DashboardProject = () => {
|
|
|
|
|
<Row> |
|
|
|
|
<Col span={7} style={{fontSize: 11, fontWeight: 'bold'}}><i className="fa fa-calendar" style={{marginRight:8}}></i>Current Budget</Col> |
|
|
|
|
<Col span={5} style={{fontSize: 11}}> |
|
|
|
|
{isReadySCurve ? |
|
|
|
|
currentBudget ? renderFormatRupiah(currentBudget, 'Rp.') : '-' |
|
|
|
|
{isReadyProjectDetail ? |
|
|
|
|
plannedCost ? renderFormatRupiah(plannedCost , 'Rp.') : '-' |
|
|
|
|
: <SingleTextLoader width={100} height={10} /> |
|
|
|
|
} |
|
|
|
|
</Col> |
|
|
|
@ -559,15 +565,15 @@ const DashboardProject = () => {
|
|
|
|
|
<Row> |
|
|
|
|
<Col span={7} style={{fontSize: 11, fontWeight: 'bold'}}><i className="fa fa-calendar" style={{marginRight:8}}></i>Actual to Date</Col> |
|
|
|
|
<Col span={5} style={{fontSize: 11}}> |
|
|
|
|
{isReadySCurve ? |
|
|
|
|
actualToDate ? renderFormatRupiah(actualToDate, 'Rp.') : '-' |
|
|
|
|
{isReadyIntegrationInvoice ? |
|
|
|
|
totalCost ? renderFormatRupiah(totalCost, 'Rp.') : '-' |
|
|
|
|
: <SingleTextLoader width={100} height={10} /> |
|
|
|
|
} |
|
|
|
|
</Col> |
|
|
|
|
<Col span={7} style={{fontSize: 11, fontWeight: 'bold'}}><i className="fa fa-calendar" style={{marginRight:8}}></i>Est. at Completion</Col> |
|
|
|
|
<Col span={5} style={{fontSize: 11}}> |
|
|
|
|
{isReadySCurve ? |
|
|
|
|
estAtCompletion ? renderFormatRupiah(estAtCompletion, 'Rp.') : '-' |
|
|
|
|
estAtCompletion ? renderFormatRupiah("168.000.000.000", 'Rp.') : '-' |
|
|
|
|
: <SingleTextLoader width={100} height={10} /> |
|
|
|
|
} |
|
|
|
|
</Col> |
|
|
|
@ -583,7 +589,7 @@ const DashboardProject = () => {
|
|
|
|
|
<Col span={7} style={{fontSize: 11, fontWeight: 'bold'}}><i className="fa fa-calendar" style={{marginRight:8}}></i>Cost Deviation</Col> |
|
|
|
|
<Col span={5} style={{fontSize: 11}}> |
|
|
|
|
{isReadySCurve ? |
|
|
|
|
costDeviation ? renderFormatRupiah(costDeviation, 'Rp.') : '-' |
|
|
|
|
costDeviation ? renderFormatRupiah("0", 'Rp.') : '-' |
|
|
|
|
: <SingleTextLoader width={100} height={10} /> |
|
|
|
|
} |
|
|
|
|
</Col> |
|
|
|
@ -592,7 +598,7 @@ const DashboardProject = () => {
|
|
|
|
|
<Col span={7} style={{fontSize: 11, fontWeight: 'bold'}}><i className="fa fa-calendar" style={{marginRight:8}}></i>Rem. to Complete</Col> |
|
|
|
|
<Col span={5} style={{fontSize: 11}}> |
|
|
|
|
{isReadySCurve ? |
|
|
|
|
remToComplete ? renderFormatRupiah(remToComplete, 'Rp.') : '-' |
|
|
|
|
remToComplete ? renderFormatRupiah("19050674292", 'Rp.') : '-' |
|
|
|
|
: <SingleTextLoader width={100} height={10} /> |
|
|
|
|
} |
|
|
|
|
</Col> |
|
|
|
|