|
|
@ -290,6 +290,9 @@ const DashboardProject = () => { |
|
|
|
let now = new Date().toISOString().slice(0, 10); |
|
|
|
let now = new Date().toISOString().slice(0, 10); |
|
|
|
let dates = result.data.data[0].data?.date; |
|
|
|
let dates = result.data.data[0].data?.date; |
|
|
|
let n = dates.findIndex(element => new Date(now) < new Date(element[0])) - 1; |
|
|
|
let n = dates.findIndex(element => new Date(now) < new Date(element[0])) - 1; |
|
|
|
|
|
|
|
if (n < 0) { |
|
|
|
|
|
|
|
n = dates.length - 1; |
|
|
|
|
|
|
|
} |
|
|
|
if (result.data.data.length > 0 && result.data.data[0].data?.percentagePlan && result.data.data[0].data?.percentagePlan.length > 0) { |
|
|
|
if (result.data.data.length > 0 && result.data.data[0].data?.percentagePlan && result.data.data[0].data?.percentagePlan.length > 0) { |
|
|
|
if(SCURVE && SCURVE == "1"){ |
|
|
|
if(SCURVE && SCURVE == "1"){ |
|
|
|
planningProgress = result.data.data[0].data?.percentagePlan[result.data.data[0].data?.percentagePlan.length - 1]; |
|
|
|
planningProgress = result.data.data[0].data?.percentagePlan[result.data.data[0].data?.percentagePlan.length - 1]; |
|
|
|