diff --git a/app/Http/Controllers/System/DashboardController.php b/app/Http/Controllers/System/DashboardController.php index 511c9a9b..11f10ae5 100644 --- a/app/Http/Controllers/System/DashboardController.php +++ b/app/Http/Controllers/System/DashboardController.php @@ -29,6 +29,7 @@ public function __invoke() $teamId = $request->user()->current_team_id; $budget = BudgetMonth::getMonthAssignmentTotal($teamId, $startDate); $transactionsTotal = TransactionService::getExpensesTotal($teamId, $startDate, $endDate); + $netWorth = collect(TransactionService::getNetWorth($teamId, $startDate, $endDate))->reverse()->values(); $plannedMeals = $this->mealService->getMealSchedule($teamId); $nextPayments = $this->plannedService->getPlanned($teamId); @@ -37,6 +38,7 @@ public function __invoke() 'meals' => PlannedMealResource::collection($plannedMeals), 'budgetTotal' => $budget, 'transactionTotal' => $transactionsTotal, + 'netWorth' => $netWorth, 'expenses' => ReportService::generateCurrentPreviousReport($teamId, 'month', 1), 'spendingSummary' => ReportService::generateExpensesByPeriod($teamId, $startDate), 'onboarding' => function () use ($team) { diff --git a/resources/js/Components/WidgetContainer.vue b/resources/js/Components/WidgetContainer.vue index efc5f5bf..e9174a81 100644 --- a/resources/js/Components/WidgetContainer.vue +++ b/resources/js/Components/WidgetContainer.vue @@ -71,7 +71,7 @@ const { isTab: isCurrentTab, selectedTab, tabs: widgetTabs } = useTabs(