[#26] AreaComService: Add GenerateToolTip()

This commit is contained in:
2024-07-05 21:27:32 +02:00
parent abeb4ebc8a
commit ae46cacb5e
2 changed files with 104 additions and 2 deletions

View File

@ -156,8 +156,8 @@ namespace Elwig.Models.Entities {
[InverseProperty(nameof(AreaCom.Member))]
public virtual ICollection<AreaCom> AreaCommitments { get; private set; } = null!;
public IQueryable<AreaCom> ActiveAreaCommitments(AppDbContext ctx) {
return ctx.AreaCommitments.Where(c => c.MgNr == MgNr).Where(Utils.ActiveAreaCommitments());
public IQueryable<AreaCom> ActiveAreaCommitments(AppDbContext ctx, int? year = null) {
return ctx.AreaCommitments.Where(c => c.MgNr == MgNr).Where(Utils.ActiveAreaCommitments(year ?? Utils.CurrentYear));
}
[InverseProperty(nameof(BillingAddr.Member))]