|
|
@ -289,7 +289,7 @@ 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])); |
|
|
|
if (n < 0) { |
|
|
|
if (n < 0) { |
|
|
|
n = dates.length - 1; |
|
|
|
n = dates.length - 1; |
|
|
|
} |
|
|
|
} |
|
|
|