feat: show complete metrics on dashboard

This commit is contained in:
hackerESQ
2024-08-21 20:47:06 -05:00
parent 58533a454d
commit 406665217f
3 changed files with 23 additions and 14 deletions
@@ -37,7 +37,9 @@ new class extends Component {
if (isset($this->portfolio)) {
$dailyChangeQuery->portfolio($this->portfolio->id);
} else {
$dailyChangeQuery->selectRaw('date,
SUM(total_market_value) as total_market_value,
SUM(total_cost_basis) as total_cost_basis,
@@ -48,11 +50,12 @@ new class extends Component {
}
if ($filterMethod['method']) {
$dailyChangeQuery->whereDate('date', '>=', now()->{$filterMethod['method']}(...$filterMethod['args']));
}
$dailyChange = $dailyChangeQuery->get();
return [
'series' => [
[