Fixed display of completed and projected part changes
This commit is contained in:
parent
35dfd6a23c
commit
a085c84b2b
@ -38,7 +38,7 @@
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<p class="text-end">Date Pulled: @DateTime.Now</p>
|
||||
<p class="text-end fw-bold">Date Pulled: @DateTime.Now</p>
|
||||
</div>
|
||||
|
||||
<button class="btn btn-outline-dark float-start dailyReportTable" onclick="toggleWeek()">View Previous Week</button>
|
||||
@ -77,10 +77,65 @@
|
||||
bottleChanges = @rpt.BottleChanges.Split(',').Length;
|
||||
}
|
||||
|
||||
List<string> dailyCompletedPartChanges = Model.CompletedDailyPartChanges.Select(x => x.REACTOR).ToList();
|
||||
List<string> dailyProjectedPartChanges = Model.ProjectedDailyPartChanges.Select(x => x.REACTOR).ToList();
|
||||
List<string> weeklyCompletedPartChanges = Model.CompletedWeeklyPartChanges.Select(x => x.REACTOR).ToList();
|
||||
List<string> weeklyProjectedPartChanges = Model.ProjectedWeeklyPartChanges.Select(x => x.REACTOR).ToList();
|
||||
List<string> dailyCompletedPartChanges = new();
|
||||
List<string> dailyProjectedPartChanges = new();
|
||||
List<string> weeklyCompletedPartChanges = new();
|
||||
List<string> weeklyProjectedPartChanges = new();
|
||||
var grouped = Model.CompletedDailyPartChanges.GroupBy(x => new { x.REACTOR, x.PSN });
|
||||
|
||||
string reactNo = "";
|
||||
|
||||
foreach (var group in grouped)
|
||||
{
|
||||
if (string.IsNullOrEmpty(reactNo))
|
||||
reactNo = group.Key.REACTOR;
|
||||
else if (reactNo == group.Key.REACTOR)
|
||||
dailyCompletedPartChanges.Add(reactNo);
|
||||
else
|
||||
reactNo = group.Key.REACTOR;
|
||||
}
|
||||
|
||||
grouped = Model.ProjectedDailyPartChanges.GroupBy(x => new { x.REACTOR, x.PSN });
|
||||
|
||||
reactNo = "";
|
||||
|
||||
foreach (var group in grouped)
|
||||
{
|
||||
if (string.IsNullOrEmpty(reactNo))
|
||||
reactNo = group.Key.REACTOR;
|
||||
else if (reactNo == group.Key.REACTOR)
|
||||
dailyProjectedPartChanges.Add(reactNo);
|
||||
else
|
||||
reactNo = group.Key.REACTOR;
|
||||
}
|
||||
|
||||
grouped = Model.CompletedWeeklyPartChanges.GroupBy(x => new { x.REACTOR, x.PSN });
|
||||
|
||||
reactNo = "";
|
||||
|
||||
foreach (var group in grouped)
|
||||
{
|
||||
if (string.IsNullOrEmpty(reactNo))
|
||||
reactNo = group.Key.REACTOR;
|
||||
else if (reactNo == group.Key.REACTOR)
|
||||
weeklyCompletedPartChanges.Add(reactNo);
|
||||
else
|
||||
reactNo = group.Key.REACTOR;
|
||||
}
|
||||
|
||||
grouped = Model.ProjectedWeeklyPartChanges.GroupBy(x => new { x.REACTOR, x.PSN });
|
||||
|
||||
reactNo = "";
|
||||
|
||||
foreach (var group in grouped)
|
||||
{
|
||||
if (string.IsNullOrEmpty(reactNo))
|
||||
reactNo = group.Key.REACTOR;
|
||||
else if (reactNo == group.Key.REACTOR)
|
||||
weeklyProjectedPartChanges.Add(reactNo);
|
||||
else
|
||||
reactNo = group.Key.REACTOR;
|
||||
}
|
||||
}
|
||||
<li>Bottle Change (@bottleChanges): @bottle</li>
|
||||
<li>Daily Part Changes
|
||||
|
Loading…
x
Reference in New Issue
Block a user