ChartWindow/Billing: Misc improvements
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using Elwig.Models.Entities;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text.Json.Nodes;
|
||||
@ -17,7 +18,7 @@ namespace Elwig.Helpers.Billing {
|
||||
return new(ParseJson(json), attributeVariants);
|
||||
}
|
||||
|
||||
public IEnumerable<GraphEntry> GetPaymentGraphEntries(AppDbContext context) {
|
||||
public IEnumerable<GraphEntry> GetPaymentGraphEntries(AppDbContext context, Season season) {
|
||||
Dictionary<int, List<string>> dict1 = [];
|
||||
Dictionary<decimal, List<string>> dict2 = [];
|
||||
var p = GetPaymentEntry();
|
||||
@ -66,13 +67,13 @@ namespace Elwig.Helpers.Billing {
|
||||
var attrs = context.WineAttributes.ToDictionary(a => a.AttrId, a => a);
|
||||
|
||||
return dict3
|
||||
.Select(e => new GraphEntry(e.Key, curves[e.Key], e.Value
|
||||
.Select(e => new GraphEntry(e.Key, season, curves[e.Key], e.Value
|
||||
.Select(s => new ContractSelection(vars[s[..2]], s.Length > 2 ? attrs[s[2..]] : null))
|
||||
.ToList(), 50, 140))
|
||||
.ToList(), 50, 73, 140))
|
||||
.ToList();
|
||||
}
|
||||
|
||||
public IEnumerable<GraphEntry> GetQualityGraphEntries(AppDbContext context) {
|
||||
public IEnumerable<GraphEntry> GetQualityGraphEntries(AppDbContext context, Season season) {
|
||||
Dictionary<int, List<string>> dict1 = [];
|
||||
Dictionary<decimal, List<string>> dict2 = [];
|
||||
foreach (var (qualid, q) in GetQualityEntry() ?? []) {
|
||||
|
Reference in New Issue
Block a user