Skip to content

Commit

Permalink
Merge pull request #168 from moneymanagerex/insights-2
Browse files Browse the repository at this point in the history
refine InsightsView
  • Loading branch information
georgeef authored Oct 22, 2024
2 parents 04f7144 + f86aa34 commit eee1506
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 15 deletions.
8 changes: 4 additions & 4 deletions MMEX/View/Insights/InsightsAccountView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ struct InsightsAccountView: View {
static let statusChoices = [
("Account Balance", "Balance"),
("Account Balance", "Reconciled Balance"),
("Account Flow", "None"),
("Account Flow", "Duplicate"),
("Account Flow", "Follow up"),
("Account Flow", "Void")
("Account Flow", "Status: (none)"),
("Account Flow", "Status: Duplicate"),
("Account Flow", "Status: Follow up"),
("Account Flow", "Status: Void")
]

var body: some View {
Expand Down
20 changes: 9 additions & 11 deletions MMEX/View/Insights/InsightsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,15 @@ struct InsightsView: View {
InsightsSummaryView(stats: $viewModel.stats)
} }

// Date Range Filters Section
Section {
Section(header: HStack {
Button(action: { incomeExpenseIsExpanded.toggle() }) {
env.theme.group.view(
name: { Text("Income vs Expense Over Time") },
isExpanded: incomeExpenseIsExpanded
)
}
} ) { if incomeExpenseIsExpanded {
// Date Range Filters
HStack {
DatePicker("Start Date", selection: $viewModel.startDate, displayedComponents: .date)
.labelsHidden()
Expand All @@ -62,16 +69,7 @@ struct InsightsView: View {
.background(Color(.systemGray6))
.cornerRadius(10)
.shadow(radius: 2)
}

Section(header: HStack {
Button(action: { incomeExpenseIsExpanded.toggle() }) {
env.theme.group.view(
name: { Text("Income vs Expense Over Time") },
isExpanded: incomeExpenseIsExpanded
)
}
} ) { if incomeExpenseIsExpanded {
IncomeExpenseView(stats: $viewModel.recentStats)
} }

Expand Down

0 comments on commit eee1506

Please sign in to comment.