Skip to content

Commit

Permalink
Merge branch 'pre-release' into 'master'
Browse files Browse the repository at this point in the history
Merge changes for version 1.1.1

See merge request Axelander/openbudgeteer!4
  • Loading branch information
TheAxelander committed Sep 7, 2020
2 parents b40ca86 + 09be965 commit c7bed97
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 5 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
### 1.1.1 (2020-09-07)

* [Fixed] Wrong creation of data for new Rules if the initial selection was used #13
* [Fixed] Missing months for Monthly Bucket Expenses Reports in case of no data #14
* [Fixed] Crashes on Report Page due to display split of Monthly Bucket Expenses Reports #15

### 1.1 (2020-09-05)

* [Add] Added Rule set for automatic Bucket assignments #5
Expand Down
2 changes: 1 addition & 1 deletion OpenBudgeteer.Blazor/Pages/Report.razor
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,6 @@

int halfIndex = _dataContext.MonthBucketExpensesConfigs.Count / 2;
_monthBucketExpensesConfigsLeft.AddRange(_dataContext.MonthBucketExpensesConfigs.ToList().GetRange(0,halfIndex));
_monthBucketExpensesConfigsRight.AddRange(_dataContext.MonthBucketExpensesConfigs.ToList().GetRange(halfIndex,halfIndex+1));
_monthBucketExpensesConfigsRight.AddRange(_dataContext.MonthBucketExpensesConfigs.ToList().GetRange(halfIndex,_dataContext.MonthBucketExpensesConfigs.Count - halfIndex));
}
}
2 changes: 1 addition & 1 deletion OpenBudgeteer.Blazor/Shared/NavMenu.razor
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
</div>
<div class="navbar-text">
<span>
Version: 1.1 (<a href="https://gitlab.com/Axelander/openbudgeteer/-/blob/master/CHANGELOG.md" target="_blank">Change Log</a>)
Version: 1.1.1 (<a href="https://gitlab.com/Axelander/openbudgeteer/-/blob/master/CHANGELOG.md" target="_blank">Change Log</a>)
</span>
</div>
</div>
Expand Down
15 changes: 13 additions & 2 deletions OpenBudgeteer.Core/ViewModels/ReportViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -221,12 +221,23 @@ public async Task<List<MonthlyBucketExpensesReportViewModelItem>> LoadMonthExpen
.ToList();

// Collect results
if (queryResults.Count == 0) continue; // No data available. Nothing to add
newReportRecord.BucketName = bucket.Name;
var reportInsertMonth = queryResults.First().YearMonth;
foreach (var queryResult in queryResults)
{
// Create empty MonthlyResults in case no data for specific months are available
while (queryResult.YearMonth != reportInsertMonth)
{
newReportRecord.MonthlyResults.Add(new Tuple<DateTime, decimal>(
reportInsertMonth,
0));
reportInsertMonth = reportInsertMonth.AddMonths(1);
}
newReportRecord.MonthlyResults.Add(new Tuple<DateTime, decimal>(
queryResult.YearMonth,
queryResult.Balance));
queryResult.YearMonth,
queryResult.Balance));
reportInsertMonth = reportInsertMonth.AddMonths(1);
}
}
result.Add(newReportRecord);
Expand Down
8 changes: 7 additions & 1 deletion OpenBudgeteer.Core/ViewModels/RulesViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,13 @@ public Tuple<bool, string> CreateNewRuleSet()
public void ResetNewRuleSet()
{
NewRuleSet = new RuleSetViewModelItem(_dbOptions);
NewRuleSet.MappingRules.Add(new MappingRuleViewModelItem(_dbOptions, new MappingRule()));
// Defaults required because if initial selection in UI will not be updated by User
// then binding will not update these properties
NewRuleSet.MappingRules.Add(new MappingRuleViewModelItem(_dbOptions, new MappingRule()
{
ComparisionField = 1,
ComparisionType = 1
}));
}

public Tuple<bool, string> SaveRuleSetItem(RuleSetViewModelItem ruleSet)
Expand Down

0 comments on commit c7bed97

Please sign in to comment.