Removed console logging for hold date and added display of daily and weekly part changes (completed and projected).

This commit is contained in:
Daniel Wathen
2023-01-23 13:47:17 -07:00
parent 649805bde6
commit a67cc55abe
13 changed files with 232 additions and 95 deletions

View File

@ -67,12 +67,9 @@
<ul>
@{
int bottleChanges = 0;
int dailyPartChanges = 0;
int weeklyPartChanges = 0;
string bottle = "";
string daily = "";
string weekly = "";
if (!string.IsNullOrEmpty(rpt.BottleChanges))
{
@ -80,22 +77,24 @@
bottleChanges = @rpt.BottleChanges.Split(',').Length;
}
if (!string.IsNullOrEmpty(rpt.DailyPartChanges))
{
daily = string.Join(", ", rpt.DailyPartChanges.Split(','));
dailyPartChanges = @rpt.DailyPartChanges.Split(',').Length;
}
if (!string.IsNullOrEmpty(rpt.WeeklyPartChanges))
{
weekly = string.Join(", ", rpt.WeeklyPartChanges.Split(','));
weeklyPartChanges = @rpt.WeeklyPartChanges.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();
}
<li>Bottle Change (@bottleChanges): @bottle</li>
<li>Daily Part Changes (@dailyPartChanges): @daily</li>
<li>Weekly Part Changes (@weeklyPartChanges): @weekly</li>
<li>Daily Part Changes
<ul>
<li>Done(@dailyCompletedPartChanges.Count()): @string.Join(", ", dailyCompletedPartChanges)</li>
<li>Projected(@dailyProjectedPartChanges.Count()): @string.Join(", ", dailyProjectedPartChanges)</li>
</ul>
</li>
<li>Weekly Part Changes
<ul>
<li>Done(@weeklyCompletedPartChanges.Count()): @string.Join(", ", weeklyCompletedPartChanges)</li>
<li>Projected(@weeklyProjectedPartChanges.Count()): @string.Join(", ", weeklyProjectedPartChanges)</li>
</ul>
</li>
<li class="text-danger">Hot Work Orders (@Model.CurrentHotWORunning.Count()): @string.Join(", ", Model.CurrentHotWORunning)</li>
</ul>
<br />
@ -123,7 +122,6 @@
@foreach (ToolEventView tool in asmTools)
{
string owner = "";
string hot = "";
if (Model.ToolStatesByOwner["Maintenance"].Contains(tool.MostRecentEvent.REACT_MODE))
owner = "Maint";

View File

@ -176,69 +176,6 @@
<button class="btn btn-info" type="button" onclick="clearList()">Clear List</button>
</div>
</div>
<div id="dailyPartChanges" class="row myMultiselect" style="padding-top: 5px; padding-bottom: 5px;">
<div class="col-lg-3 col-md-4">
<h6>Daily Part Changes:</h6>
</div>
<div class="form-group col-lg-4 col-md-5">
<div class="mySelectLabel selectBox" onclick="toggleCheckboxArea()">
<select class="form-select" name="DailyPartChanges">
<option>somevalue</option>
</select>
<div class="overSelect"></div>
</div>
<div class="mySelectOptions">
@for (int i = 20; i < 80; i++)
{
string isMatching = "";
string[] dailyPartChanges = !string.IsNullOrEmpty(Model.DailyPartChanges) ? Model.DailyPartChanges.Split(',') : new string[0];
for (int j = 0; j < dailyPartChanges.Length; j++)
{
if (dailyPartChanges[j] == "R" + i)
isMatching = "checked";
}
<label><input type="checkbox" onchange="checkboxStatusChange()" value="@("R" + i)" @isMatching />@(" R" + i)</label>
}
</div>
</div>
<div class="col-lg-2 col-md-3">
<button class="btn btn-info" type="button" onclick="clearList()">Clear List</button>
</div>
</div>
<div id="weeklyPartChanges" class="row myMultiselect" style="padding-top: 5px; padding-bottom: 5px;">
<div class="col-lg-3 col-md-4">
<h6>Weekly Part Changes:</h6>
</div>
<div class="form-group col-lg-4 col-md-5">
<div class="mySelectLabel selectBox" onclick="toggleCheckboxArea()">
<select class="form-select" name="WeeklyPartChanges">
<option>somevalue</option>
</select>
<div class="overSelect"></div>
</div>
<div class="mySelectOptions">
@for (int i = 20; i < 80; i++)
{
string isMatching = "";
string[] weeklyPartChanges = !string.IsNullOrEmpty(Model.WeeklyPartChanges) ? Model.WeeklyPartChanges.Split(',') : new string[0];
for (int j = 0; j < weeklyPartChanges.Length; j++)
{
if (weeklyPartChanges[j] == "R" + i)
isMatching = "checked";
}
<label><input type="checkbox" onchange="checkboxStatusChange()" value="@("R" + i)" @isMatching />@(" R" + i)</label>
}
</div>
</div>
<div class="col-lg-2 col-md-3">
<button class="btn btn-info" type="button" onclick="clearList()">Clear List</button>
</div>
</div>
<button type="submit" value="Submit" class="btn btn-light" style="margin-top: 5px;">Submit</button>
</form>
</div>