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>

View File

@ -1 +1 @@
{"OperatorHeadcountDays":0,"OperatorHeadcountNights":0,"OperatorCallOutsDays":0,"OperatorCallOutsNights":0,"EngineeringHeadcountDays":0,"EngineeringHeadcountNights":0,"EngineeringCallOutsDays":0,"EngineeringCallOutsNights":0,"MaintenanceHeadcountDays":0,"MaintenanceHeadcountNights":0,"MaintenanceCallOutsDays":0,"MaintenanceCallOutsNights":0,"BottleChanges":null,"DailyPartChanges":null,"WeeklyPartChanges":"R23,R25,R27,R29,R36,R37"}
{"OperatorHeadcountDays":0,"OperatorHeadcountNights":0,"OperatorCallOutsDays":0,"OperatorCallOutsNights":0,"EngineeringHeadcountDays":0,"EngineeringHeadcountNights":0,"EngineeringCallOutsDays":0,"EngineeringCallOutsNights":0,"MaintenanceHeadcountDays":0,"MaintenanceHeadcountNights":0,"MaintenanceCallOutsDays":0,"MaintenanceCallOutsNights":0,"BottleChanges":null}

View File

@ -1 +1 @@
[{"Date":"2023-01-09T00:00:00-07:00","ASM":8,"HTR":16},{"Date":"2023-01-10T00:00:00-07:00","ASM":8,"HTR":16},{"Date":"2023-01-11T00:00:00-07:00","ASM":8,"HTR":16},{"Date":"2023-01-12T00:00:00-07:00","ASM":7,"HTR":16},{"Date":"2023-01-13T00:00:00-07:00","ASM":7,"HTR":15},{"Date":"2023-01-14T00:00:00-07:00","ASM":8,"HTR":15},{"Date":"2023-01-15T00:00:00-07:00","ASM":9,"HTR":15},{"Date":"2023-01-17T00:00:00-07:00","ASM":9,"HTR":15},{"Date":"2023-01-18T00:00:00-07:00","ASM":9,"HTR":15},{"Date":"2023-01-19T00:00:00-07:00","ASM":9,"HTR":15},{"Date":"2023-01-20T00:00:00-07:00","ASM":8,"HTR":16}]
[{"Date":"2023-01-09T00:00:00-07:00","ASM":8,"HTR":16},{"Date":"2023-01-10T00:00:00-07:00","ASM":8,"HTR":16},{"Date":"2023-01-11T00:00:00-07:00","ASM":8,"HTR":16},{"Date":"2023-01-12T00:00:00-07:00","ASM":7,"HTR":16},{"Date":"2023-01-13T00:00:00-07:00","ASM":7,"HTR":15},{"Date":"2023-01-14T00:00:00-07:00","ASM":8,"HTR":15},{"Date":"2023-01-15T00:00:00-07:00","ASM":9,"HTR":15},{"Date":"2023-01-17T00:00:00-07:00","ASM":9,"HTR":15},{"Date":"2023-01-18T00:00:00-07:00","ASM":9,"HTR":15},{"Date":"2023-01-19T00:00:00-07:00","ASM":9,"HTR":15},{"Date":"2023-01-20T00:00:00-07:00","ASM":8,"HTR":16},{"Date":"2023-01-23T00:00:00-07:00","ASM":7,"HTR":16}]

View File

@ -207,9 +207,6 @@ function compareStrings(isDate, dir, string1, string2) {
var date1 = new Date(string1);
var date2 = new Date(string2);
console.log(date1);
console.log(date2);
if (dir == "asc" && date1 > date2)
return true;