Update for the tunnel graph to have the stats my month and type of flights

This commit is contained in:
Sébastien ANDRE
2023-08-22 13:04:29 +02:00
parent e21ab458b1
commit 7abfa2b2b7
6 changed files with 26 additions and 10 deletions

View File

@@ -56,11 +56,12 @@ namespace skydiveLogs_api.DomainBusiness
if (allTunnelFlights.Any())
{
results = allTunnelFlights.GroupBy(j => j.FlightDate.ToString("yy-MM"),
results = allTunnelFlights.GroupBy(j => new { FlightDate = j.FlightDate.ToString("yy-MM"), j.JumpType },
j => j,
(groupby, tunnelFlights) => new Statistic
{
Label = groupby.ToString(),
Label = groupby.FlightDate,
Label2 = groupby.JumpType.Name,
Nb = tunnelFlights.Sum(t => t.NbMinutes)
})
.ToList();