feat: #45 meta de poupança configurável + conquistas genéricas

- Nova tabela user_settings com savings_goal_pct (default 40%)
- API GET /api/settings, PUT /api/settings
- DashboardService inclui savings_goal_pct no payload
- DashboardHandler dispara savings_checked com goal configurado
- GameService.NotifyAction: checa pct >= goal (sem hardcode de 40%)
- SettingsView: painel META DE POUPANÇA com input configurável
- HomeView: widget mostra meta dinâmica (META: X%) e usa savingsGoal
- stores/settings.ts: store com fetch e update

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
This commit is contained in:
2026-05-28 22:32:08 -03:00
co-authored by Claude Sonnet 4.6
parent 9fada4997a
commit 1d59cb2a0e
15 changed files with 296 additions and 15 deletions
+1
View File
@@ -28,6 +28,7 @@ type DashboardData struct {
TotalIncome float64 `json:"total_income"`
TotalExpenses float64 `json:"total_expenses"`
SavingsPct float64 `json:"savings_pct"`
SavingsGoalPct float64 `json:"savings_goal_pct"`
TotalPatrimony float64 `json:"total_patrimony"`
ByCategory []CategoryTotal `json:"by_category"`
MonthlyEvolution []MonthEvolution `json:"monthly_evolution"`
+5
View File
@@ -0,0 +1,5 @@
package model
type UserSettings struct {
SavingsGoalPct float64 `json:"savings_goal_pct"`
}