Updated UnloadTemps repo to get data for whole week instead of just the last day.

This commit is contained in:
Daniel Wathen
2023-01-04 15:33:52 -07:00
parent e3b4e68425
commit 83525d0149
8 changed files with 39 additions and 33 deletions

View File

@ -388,18 +388,16 @@
<td scope="row">ASMs &lt;700C (Unload Temps)</td>
@for (int i = 0; i < 7; i++)
{
int index = i == 6 ? 0 : i + 1;
if (@Model.CurrentEntries[index].ASMUnloadTempsLessThan700 != 0)
if (i < Model.UnloadTempsByDay.Count())
{
<td>@Model.CurrentEntries[index].ASMUnloadTempsLessThan700</td>
<td>@Model.UnloadTempsByDay[i].ASMUnloadsBelow700</td>
ASMUnloadTemps += @Model.UnloadTempsByDay[i].ASMUnloadsBelow700;
}
else
{
<td></td>
}
ASMUnloadTemps += @Model.CurrentEntries[index].ASMUnloadTempsLessThan700;
}
<td>@(ASMUnloadTemps / numberOfDaysInWeek)</td>
<td>0</td>
@ -408,18 +406,16 @@
<td scope="row">HTRs &lt;700C (Unload Temps)</td>
@for (int i = 0; i < 7; i++)
{
int index = i == 6 ? 0 : i + 1;
if (@Model.CurrentEntries[index].HTRUnloadTempsLessThan700 != 0)
if (i < Model.UnloadTempsByDay.Count())
{
<td>@Model.CurrentEntries[index].HTRUnloadTempsLessThan700</td>
<td>@Model.UnloadTempsByDay[i].HTRUnloadsBelow700</td>
HTRUnloadTemps += @Model.UnloadTempsByDay[i].HTRUnloadsBelow700;
}
else
{
<td></td>
}
HTRUnloadTemps += @Model.CurrentEntries[index].HTRUnloadTempsLessThan700;
}
<td>@(HTRUnloadTemps / numberOfDaysInWeek)</td>
<td>0</td>