Browse Source

Merge pull request 'staging' (#67) from staging into master

Reviewed-on: ordo/adw-frontend#67
pull/2/head
ibnu 1 year ago
parent
commit
f213dbe05b
  1. 3
      src/views/Dashboard/DashboardProject.js

3
src/views/Dashboard/DashboardProject.js

@ -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];

Loading…
Cancel
Save