Reorganized project structure to separate backend process from frontend process.
This commit is contained in:
		
							
								
								
									
										25
									
								
								ReportingServices.UI/Views/Shared/Error.cshtml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								ReportingServices.UI/Views/Shared/Error.cshtml
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,25 @@
 | 
			
		||||
@model ErrorViewModel
 | 
			
		||||
@{
 | 
			
		||||
    ViewData["Title"] = "Error";
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
<h1 class="text-danger">Error.</h1>
 | 
			
		||||
<h2 class="text-danger">An error occurred while processing your request.</h2>
 | 
			
		||||
 | 
			
		||||
@if (Model.ShowRequestId)
 | 
			
		||||
{
 | 
			
		||||
    <p>
 | 
			
		||||
        <strong>Request ID:</strong> <code>@Model.RequestId</code>
 | 
			
		||||
    </p>
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
<h3>Development Mode</h3>
 | 
			
		||||
<p>
 | 
			
		||||
    Swapping to <strong>Development</strong> environment will display more detailed information about the error that occurred.
 | 
			
		||||
</p>
 | 
			
		||||
<p>
 | 
			
		||||
    <strong>The Development environment shouldn't be enabled for deployed applications.</strong>
 | 
			
		||||
    It can result in displaying sensitive information from exceptions to end users.
 | 
			
		||||
    For local debugging, enable the <strong>Development</strong> environment by setting the <strong>ASPNETCORE_ENVIRONMENT</strong> environment variable to <strong>Development</strong>
 | 
			
		||||
    and restarting the app.
 | 
			
		||||
</p>
 | 
			
		||||
							
								
								
									
										254
									
								
								ReportingServices.UI/Views/Shared/_DailyReportPartial.cshtml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										254
									
								
								ReportingServices.UI/Views/Shared/_DailyReportPartial.cshtml
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,254 @@
 | 
			
		||||
@model YieldStatistics
 | 
			
		||||
 | 
			
		||||
@{
 | 
			
		||||
    int totalWafersOut = 0;
 | 
			
		||||
    int totalCustomerScrap = 0;
 | 
			
		||||
    int totalManufacturingScrap = 0;
 | 
			
		||||
    int totalProdScrap = 0;
 | 
			
		||||
    int totalYieldedWafersOut = 0;
 | 
			
		||||
    int deltaToCommit = 0;
 | 
			
		||||
    int deltaToPlan = 0;
 | 
			
		||||
    float totalYield = 0f;
 | 
			
		||||
 | 
			
		||||
    string myClass;
 | 
			
		||||
 | 
			
		||||
    int numberOfDaysInWeek = Model.OutsByDay.Count;
 | 
			
		||||
    int yieldOutDays = Model.IsCurrentWeek ? Model.OutsByDay.Count - 1 : Model.OutsByDay.Count;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
<table class="table table-bordered">
 | 
			
		||||
    <thead>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <th scope="col" rowspan="2" class="text-center align-middle">SI Operations</th>
 | 
			
		||||
            @for (int i = 0; i < 7; i++)
 | 
			
		||||
            {
 | 
			
		||||
                <th scope="col" class="text-center">@Model.StartDate.AddDays(i).ToString("MM/dd/yyyy")</th>
 | 
			
		||||
            }
 | 
			
		||||
            <th scope="col" rowspan="2" class="text-center align-middle">Weekly Total</th>
 | 
			
		||||
            <th scope="col" rowspan="2" class="text-center align-middle">Comment</th>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <th scope="col" class="text-center">Monday</th>
 | 
			
		||||
            <th scope="col" class="text-center">Tuesday</th>
 | 
			
		||||
            <th scope="col" class="text-center">Wednesday</th>
 | 
			
		||||
            <th scope="col" class="text-center">Thursday</th>
 | 
			
		||||
            <th scope="col" class="text-center">Friday</th>
 | 
			
		||||
            <th scope="col" class="text-center">Saturday</th>
 | 
			
		||||
            <th scope="col" class="text-center">Sunday</th>
 | 
			
		||||
        </tr>
 | 
			
		||||
    </thead>
 | 
			
		||||
    <tbody>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td scope="row">Commited Target to meet Shipment Requirements</td>
 | 
			
		||||
            <td class="text-center">4,500</td>
 | 
			
		||||
            <td class="text-center">4,500</td>
 | 
			
		||||
            <td class="text-center">4,500</td>
 | 
			
		||||
            <td class="text-center">4,500</td>
 | 
			
		||||
            <td class="text-center">4,500</td>
 | 
			
		||||
            <td class="text-center">4,500</td>
 | 
			
		||||
            <td class="text-center">4,500</td>
 | 
			
		||||
            <td class="text-center">31,500</td>
 | 
			
		||||
            <td>Number updated quarterly</td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td scope="row">Actual Reactor Out</td>
 | 
			
		||||
            @for (int i = 0; i < 7; i++)
 | 
			
		||||
            {
 | 
			
		||||
 | 
			
		||||
                if (i < numberOfDaysInWeek)
 | 
			
		||||
                {
 | 
			
		||||
                    int reactorMoves = Model.OutsByDay[i].TotalWafers;
 | 
			
		||||
 | 
			
		||||
                    <td class="text-center">@reactorMoves</td>
 | 
			
		||||
 | 
			
		||||
                    totalWafersOut += reactorMoves;
 | 
			
		||||
                }
 | 
			
		||||
                else
 | 
			
		||||
                {
 | 
			
		||||
                    <td></td>
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            <td class="text-center">@totalWafersOut</td>
 | 
			
		||||
            <td>Before Scrap</td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td scope="row" id="expandYield">
 | 
			
		||||
                Actual Yielded Wafers Out    
 | 
			
		||||
                <button class="btn btn-default" onclick="expandYield()">
 | 
			
		||||
                    <img src="~/Images/plusIcon.png" width="20" style="padding-bottom: 3px" id="yieldImage" />
 | 
			
		||||
                </button>
 | 
			
		||||
            </td>
 | 
			
		||||
            @for (int i = 0; i < 7; i++)
 | 
			
		||||
            {
 | 
			
		||||
                if (i < numberOfDaysInWeek)
 | 
			
		||||
                {
 | 
			
		||||
                    int yieldedOuts = Model.OutsByDay[i].TotalWafers - Model.ScrapByDay[i].TOT_REJ_WFRS - Model.ScrapByDay[i].TW_PROD;
 | 
			
		||||
 | 
			
		||||
                    <td class="text-center">@yieldedOuts</td>
 | 
			
		||||
 | 
			
		||||
                    totalYieldedWafersOut += yieldedOuts;
 | 
			
		||||
                }
 | 
			
		||||
                else
 | 
			
		||||
                {
 | 
			
		||||
                    <td></td>
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            <td class="text-center">@totalYieldedWafersOut</td>
 | 
			
		||||
            <td>After Scrap</td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr class="yield hidden">
 | 
			
		||||
            @{
 | 
			
		||||
                int index = numberOfDaysInWeek - 1;
 | 
			
		||||
                int modifiedYieldedOuts = 0;
 | 
			
		||||
                if (Model.IsCurrentWeek)
 | 
			
		||||
                    modifiedYieldedOuts = totalYieldedWafersOut - (Model.OutsByDay[index].TotalWafers - Model.ScrapByDay[index].TOT_REJ_WFRS - Model.ScrapByDay[index].TW_PROD);
 | 
			
		||||
                else
 | 
			
		||||
                    modifiedYieldedOuts = totalYieldedWafersOut;
 | 
			
		||||
            }
 | 
			
		||||
            <td scope="row" colspan="10" id="expandYield" class="text-center">Yielded Wafers Out Daily Average: @(modifiedYieldedOuts / yieldOutDays)</td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr class="yield hidden">
 | 
			
		||||
            <td scope="row">Customer Scrap</td>
 | 
			
		||||
            @for (int i = 0; i < 7; i++)
 | 
			
		||||
            {
 | 
			
		||||
                if (i < numberOfDaysInWeek)
 | 
			
		||||
                {
 | 
			
		||||
                    int custScrap = Model.ScrapByDay[i].TOT_REJ_CUST;
 | 
			
		||||
 | 
			
		||||
                    <td class="text-center">@custScrap</td>
 | 
			
		||||
 | 
			
		||||
                    totalCustomerScrap += custScrap;
 | 
			
		||||
                }
 | 
			
		||||
                else
 | 
			
		||||
                {
 | 
			
		||||
                    <td></td>
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            <td class="text-center">@totalCustomerScrap</td>
 | 
			
		||||
            <td></td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr class="yield hidden">
 | 
			
		||||
            <td scope="row">Manufacturing Scrap</td>
 | 
			
		||||
            @for (int i = 0; i < 7; i++)
 | 
			
		||||
            {
 | 
			
		||||
                if (i < numberOfDaysInWeek)
 | 
			
		||||
                {
 | 
			
		||||
                    int manuScrap = Model.ScrapByDay[i].TOT_REJ_MANU;
 | 
			
		||||
 | 
			
		||||
                    <td class="text-center">@manuScrap</td>
 | 
			
		||||
 | 
			
		||||
                    totalManufacturingScrap += manuScrap;
 | 
			
		||||
                }
 | 
			
		||||
                else
 | 
			
		||||
                {
 | 
			
		||||
                    <td></td>
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            <td class="text-center">@totalManufacturingScrap</td>
 | 
			
		||||
            <td></td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr class="yield hidden">
 | 
			
		||||
            <td scope="row">Production Scrap</td>
 | 
			
		||||
            @for (int i = 0; i < 7; i++)
 | 
			
		||||
            {
 | 
			
		||||
                if (i < numberOfDaysInWeek)
 | 
			
		||||
                {
 | 
			
		||||
                    int prodScrap = Model.ScrapByDay[i].TW_PROD;
 | 
			
		||||
 | 
			
		||||
                    <td class="text-center">@prodScrap</td>
 | 
			
		||||
 | 
			
		||||
                    totalProdScrap += prodScrap;
 | 
			
		||||
                }
 | 
			
		||||
                else
 | 
			
		||||
                {
 | 
			
		||||
                    <td></td>
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            <td class="text-center">@totalProdScrap</td>
 | 
			
		||||
            <td></td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr class="yield hidden">
 | 
			
		||||
            <td scope="row">Yield</td>
 | 
			
		||||
            @for (int i = 0; i < 7; i++)
 | 
			
		||||
            {
 | 
			
		||||
                if (i < numberOfDaysInWeek)
 | 
			
		||||
                {
 | 
			
		||||
                    float yield = ((float)Model.OutsByDay[i].TotalWafers - (float)Model.ScrapByDay[i].TOT_REJ_WFRS) / (float)Model.OutsByDay[i].TotalWafers;
 | 
			
		||||
 | 
			
		||||
                    <td class="text-center">@(string.Format("{0:P2}", yield))</td>
 | 
			
		||||
 | 
			
		||||
                    totalYield += yield;
 | 
			
		||||
                }
 | 
			
		||||
                else
 | 
			
		||||
                {
 | 
			
		||||
                    <td></td>
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            <td class="text-center">@(string.Format("{0:P2}", totalYield / numberOfDaysInWeek))</td>
 | 
			
		||||
            <td>After Scrap</td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td scope="row">Delta to commit</td>
 | 
			
		||||
            @for (int i = 0; i < 7; i++)
 | 
			
		||||
            {
 | 
			
		||||
                if (i < numberOfDaysInWeek)
 | 
			
		||||
                {
 | 
			
		||||
                    int dayDelta = Model.OutsByDay[i].TotalWafers - Model.ScrapByDay[i].TOT_REJ_WFRS - 4500;
 | 
			
		||||
 | 
			
		||||
                    if (dayDelta < 0)
 | 
			
		||||
                        myClass = "table-danger text-danger";
 | 
			
		||||
                    else
 | 
			
		||||
                        myClass = "";
 | 
			
		||||
 | 
			
		||||
                    <td class="text-center @myClass">@dayDelta</td>
 | 
			
		||||
 | 
			
		||||
                    deltaToCommit += dayDelta;
 | 
			
		||||
                }
 | 
			
		||||
                else
 | 
			
		||||
                {
 | 
			
		||||
                    <td></td>
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            <td class="text-center">@deltaToCommit</td>
 | 
			
		||||
            <td>Difference to commitment</td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td scope="row">Delta to the Plan</td>
 | 
			
		||||
            @for (int i = 0; i < 7; i++)
 | 
			
		||||
            {
 | 
			
		||||
                if (i < numberOfDaysInWeek)
 | 
			
		||||
                {
 | 
			
		||||
                    int dayDelta = Model.OutsByDay[i].TotalWafers - Model.ScrapByDay[i].TOT_REJ_WFRS - 4500;
 | 
			
		||||
 | 
			
		||||
                    if (dayDelta < 0)
 | 
			
		||||
                        myClass = "table-danger text-danger";
 | 
			
		||||
                    else
 | 
			
		||||
                        myClass = "";
 | 
			
		||||
 | 
			
		||||
                    <td class="text-center @myClass">@dayDelta</td>
 | 
			
		||||
 | 
			
		||||
                    deltaToPlan += dayDelta;
 | 
			
		||||
                }
 | 
			
		||||
                else
 | 
			
		||||
                {
 | 
			
		||||
                    <td></td>
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
            <td class="text-center">@deltaToPlan</td>
 | 
			
		||||
            <td>Difference to target</td>
 | 
			
		||||
        </tr>
 | 
			
		||||
        <tr>
 | 
			
		||||
            <td scope="row">Wafers Needed to make QTR</td>
 | 
			
		||||
            <td class="text-center">3,640</td>
 | 
			
		||||
            <td class="text-center">3,640</td>
 | 
			
		||||
            <td class="text-center">3,640</td>
 | 
			
		||||
            <td class="text-center">3,640</td>
 | 
			
		||||
            <td class="text-center">3,640</td>
 | 
			
		||||
            <td class="text-center">3,640</td>
 | 
			
		||||
            <td class="text-center">3,640</td>
 | 
			
		||||
            <td class="text-center">25,480</td>
 | 
			
		||||
            <td>Number updated weekly</td>
 | 
			
		||||
        </tr>
 | 
			
		||||
    </tbody>
 | 
			
		||||
</table>
 | 
			
		||||
							
								
								
									
										61
									
								
								ReportingServices.UI/Views/Shared/_Layout.cshtml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										61
									
								
								ReportingServices.UI/Views/Shared/_Layout.cshtml
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,61 @@
 | 
			
		||||
<!DOCTYPE html>
 | 
			
		||||
<html lang="en">
 | 
			
		||||
<head>
 | 
			
		||||
    <meta charset="utf-8" />
 | 
			
		||||
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
 | 
			
		||||
    <title>@ViewData["Title"] - ReportingServices</title>
 | 
			
		||||
    <link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css" />
 | 
			
		||||
    <link rel="stylesheet" href="~/css/site.css" asp-append-version="true" />
 | 
			
		||||
    <link rel="stylesheet" href="~/ReportingServices.styles.css" asp-append-version="true" />
 | 
			
		||||
    <link href="https://code.jquery.com/ui/1.13.2/themes/ui-lightness/jquery-ui.css"
 | 
			
		||||
          rel="stylesheet">
 | 
			
		||||
    <script src="https://code.jquery.com/jquery-3.6.1.js"></script>
 | 
			
		||||
    <script src="https://code.jquery.com/ui/1.13.2/jquery-ui.js"></script>
 | 
			
		||||
    <script>
 | 
			
		||||
        $(function () {
 | 
			
		||||
            $("#StartDate").datepicker();
 | 
			
		||||
        })
 | 
			
		||||
        $(function () {
 | 
			
		||||
            $("#EndDate").datepicker();
 | 
			
		||||
        })
 | 
			
		||||
    </script>
 | 
			
		||||
</head>
 | 
			
		||||
<body>
 | 
			
		||||
    <header>
 | 
			
		||||
        <nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-dark bg-dark border-bottom box-shadow mb-3" style="padding: 22px;">
 | 
			
		||||
            <div class="container-fluid">
 | 
			
		||||
                <a class="navbar-brand" asp-area="" asp-controller="Home" asp-action="Index">Mesa Reporting Services</a>
 | 
			
		||||
                <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target=".navbar-collapse" aria-controls="navbarSupportedContent"
 | 
			
		||||
                        aria-expanded="false" aria-label="Toggle navigation">
 | 
			
		||||
                    <span class="navbar-toggler-icon"></span>
 | 
			
		||||
                </button>
 | 
			
		||||
                <div class="navbar-collapse collapse d-sm-inline-flex justify-content-between">
 | 
			
		||||
                    <ul class="navbar-nav flex-grow-1">
 | 
			
		||||
                        <li class="nav-item">
 | 
			
		||||
                            <a class="nav-link text-light" asp-area="" asp-controller="Home" asp-action="Index">Home</a>
 | 
			
		||||
                        </li>
 | 
			
		||||
                    </ul>
 | 
			
		||||
                    <form class="d-flex" role="search">
 | 
			
		||||
                        <input class="form-control me-2" type="search" placeholder="Search" aria-label="Search" />
 | 
			
		||||
                        <button class="btn btn-outline-success my-2 my-sm-0" type="submit">Search</button>
 | 
			
		||||
                    </form>
 | 
			
		||||
                </div>
 | 
			
		||||
            </div>
 | 
			
		||||
        </nav>
 | 
			
		||||
    </header>
 | 
			
		||||
    <div class="container">
 | 
			
		||||
        <main role="main" class="pb-3">
 | 
			
		||||
            @RenderBody()
 | 
			
		||||
        </main>
 | 
			
		||||
    </div>
 | 
			
		||||
 | 
			
		||||
    <footer class="border-top footer text-muted">
 | 
			
		||||
        <div class="container">
 | 
			
		||||
            © 2022 - Mesa Reporting Services
 | 
			
		||||
        </div>
 | 
			
		||||
    </footer>
 | 
			
		||||
    <script src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
 | 
			
		||||
    <script src="~/js/site.js" asp-append-version="true"></script>
 | 
			
		||||
    @await RenderSectionAsync("Scripts", required: false)
 | 
			
		||||
</body>
 | 
			
		||||
</html>
 | 
			
		||||
							
								
								
									
										48
									
								
								ReportingServices.UI/Views/Shared/_Layout.cshtml.css
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										48
									
								
								ReportingServices.UI/Views/Shared/_Layout.cshtml.css
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,48 @@
 | 
			
		||||
/* Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification
 | 
			
		||||
for details on configuring this project to bundle and minify static web assets. */
 | 
			
		||||
 | 
			
		||||
a.navbar-brand {
 | 
			
		||||
  white-space: normal;
 | 
			
		||||
  text-align: center;
 | 
			
		||||
  word-break: break-all;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
a {
 | 
			
		||||
  color: #0077cc;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.btn-primary {
 | 
			
		||||
  color: #fff;
 | 
			
		||||
  background-color: #1b6ec2;
 | 
			
		||||
  border-color: #1861ac;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.nav-pills .nav-link.active, .nav-pills .show > .nav-link {
 | 
			
		||||
  color: #fff;
 | 
			
		||||
  background-color: #1b6ec2;
 | 
			
		||||
  border-color: #1861ac;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.border-top {
 | 
			
		||||
  border-top: 1px solid #e5e5e5;
 | 
			
		||||
}
 | 
			
		||||
.border-bottom {
 | 
			
		||||
  border-bottom: 1px solid #e5e5e5;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.box-shadow {
 | 
			
		||||
  box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
button.accept-policy {
 | 
			
		||||
  font-size: 1rem;
 | 
			
		||||
  line-height: inherit;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
.footer {
 | 
			
		||||
  position: absolute;
 | 
			
		||||
  bottom: 0;
 | 
			
		||||
  width: 100%;
 | 
			
		||||
  white-space: nowrap;
 | 
			
		||||
  line-height: 60px;
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										12
									
								
								ReportingServices.UI/Views/Shared/_LoadingPartial.cshtml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								ReportingServices.UI/Views/Shared/_LoadingPartial.cshtml
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,12 @@
 | 
			
		||||
<div id="LoadingDisplay" style="display: none;">
 | 
			
		||||
    <div id="LoadingDisplayContent">
 | 
			
		||||
        <div class="d-flex justify-content-center">
 | 
			
		||||
            <div class="spinner-border" style="width: 3rem; height: 3rem;" role="status">
 | 
			
		||||
                <span class="visually-hidden">Loading...</span>
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="d-flex justify-content-center">
 | 
			
		||||
            <strong>Loading</strong>
 | 
			
		||||
        </div>
 | 
			
		||||
    </div>
 | 
			
		||||
</div>
 | 
			
		||||
@ -0,0 +1,2 @@
 | 
			
		||||
<script src="~/lib/jquery-validation/dist/jquery.validate.min.js"></script>
 | 
			
		||||
<script src="~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js"></script>
 | 
			
		||||
		Reference in New Issue
	
	Block a user