Browse Source

Fix date range

pull/2/head
Wahyu Ramadhan 1 year ago
parent
commit
16667bc87a
  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 dates = result.data.data[0].data?.date;
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(SCURVE && SCURVE == "1"){
planningProgress = result.data.data[0].data?.percentagePlan[result.data.data[0].data?.percentagePlan.length - 1];

Loading…
Cancel
Save