Updated daily report to show correct information when two work weeks split quarters.

Also current changes to project with Blazor implementation is implemented here as well.
This commit is contained in:
Daniel Wathen
2023-04-03 09:58:28 -07:00
parent f77d723576
commit 72e7a55ab4
305 changed files with 148901 additions and 4 deletions

View File

@ -0,0 +1,18 @@
@page "/counter"
<PageTitle>Counter</PageTitle>
<h1>Counter</h1>
<p role="status">Current count: @currentCount</p>
<button class="btn btn-primary" @onclick="IncrementCount">Click me</button>
@code {
private int currentCount = 0;
private void IncrementCount()
{
currentCount++;
}
}

View File

@ -0,0 +1,57 @@
@page "/fetchdata"
@inject HttpClient Http
<PageTitle>Weather forecast</PageTitle>
<h1>Weather forecast</h1>
<p>This component demonstrates fetching data from the server.</p>
@if (forecasts == null)
{
<p><em>Loading...</em></p>
}
else
{
<table class="table">
<thead>
<tr>
<th>Date</th>
<th>Temp. (C)</th>
<th>Temp. (F)</th>
<th>Summary</th>
</tr>
</thead>
<tbody>
@foreach (var forecast in forecasts)
{
<tr>
<td>@forecast.Date.ToShortDateString()</td>
<td>@forecast.TemperatureC</td>
<td>@forecast.TemperatureF</td>
<td>@forecast.Summary</td>
</tr>
}
</tbody>
</table>
}
@code {
private WeatherForecast[]? forecasts;
protected override async Task OnInitializedAsync()
{
forecasts = await Http.GetFromJsonAsync<WeatherForecast[]>("sample-data/weather.json");
}
public class WeatherForecast
{
public DateTime Date { get; set; }
public int TemperatureC { get; set; }
public string? Summary { get; set; }
public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
}
}

View File

@ -0,0 +1,15 @@
@page "/"
<PageTitle>Index</PageTitle>
<div class="row">
<div class="col-3 d-grid">
<a class="btn btn-outline-secondary" href="/ProductionReports"><span class="float-start"><i class="fa-regular fa-folder-open fa-4x button-image align-middle"></i> Production Reports</span></a>
</div>
<div class="col-3 d-grid">
<a class="btn btn-outline-secondary" href="/PlanningReports"><span class="float-start"><i class="fa-regular fa-folder-open fa-4x button-image align-middle"></i> Planning Reports</span></a>
</div>
<div class="col-3 d-grid">
<a class="btn btn-outline-secondary" href="/Page"><span class="float-start"><i class="fa-regular fa-folder-open fa-4x button-image align-middle"></i> Testing</span></a>
</div>
</div>

View File

@ -0,0 +1,5 @@
namespace ReportingServices.Blazor.Pages;
public partial class Index
{
}

View File

@ -0,0 +1,3 @@
.button-image {
padding-right: 15px;
}

View File

@ -0,0 +1,7 @@
@page "/PlanningReports"
<div class="row">
<div class="col-3 d-grid">
<button class="btn btn-outline-secondary text-start" @onclick="((e) => OpenDialog())"><span class="float-start"><i class="fa-regular fa-file-alt fa-4x buttonImage align-middle"></i> Weekly Part Changes Report</span></button>
</div>
</div>

View File

@ -0,0 +1,16 @@
using Microsoft.AspNetCore.Components;
using MudBlazor;
using ReportingServices.Blazor.Components;
namespace ReportingServices.Blazor.Pages.PlanningReports;
public partial class PlanningReports
{
public DateTime StartDate { get; set; }
public DateTime EndDate { get; set; }
[Inject]
public IDialogService Dialog { get; set; }
private void OpenDialog() => Dialog.Show<DatePickerModal>("Date Picker", new DialogOptions());
}

View File

@ -0,0 +1,28 @@
@page "/PlanningReports/WeeklyPartChangesReport"
<ReportHeader Title="Weekly Part Changes Report" Date="@DateTime.Now"></ReportHeader>
<div class="row">
<div class="col-6">
<p>Number of Part Changes: @WeeklyPartChanges.TotalPartChanges</p>
</div>
<div class="col-6">
<p class="text-end">Date Range: @WeeklyPartChanges.StartDate - @WeeklyPartChanges.EndDate</p>
</div>
</div>
<MudTable Items="@WeeklyPartChanges.ReactorPSNWORuns" Hover="true" SortLabel="Sort By" RowsPerPage="15">
<HeaderContent>
<MudTh><MudTableSortLabel SortBy="new Func<ReactorPSNWORuns, object>(x => x.REACTOR)">Reactor</MudTableSortLabel></MudTh>
<MudTh><MudTableSortLabel SortBy="new Func<ReactorPSNWORuns, object>(x => x.PSN)">PSN</MudTableSortLabel></MudTh>
<MudTh><MudTableSortLabel SortBy="new Func<ReactorPSNWORuns, object>(x => x.WO_COUNT)">WO Count</MudTableSortLabel></MudTh>
</HeaderContent>
<RowTemplate>
<MudTd DataLabel="Reactor">@context.REACTOR</MudTd>
<MudTd DataLabel="PSN">@context.PSN</MudTd>
<MudTd DataLabel="WO Count">@context.WO_COUNT</MudTd>
</RowTemplate>
<PagerContent>
<MudTablePager PageSizeOptions="new int[]{ 15, 50, 100 }" />
</PagerContent>
</MudTable>

View File

@ -0,0 +1,32 @@
using Microsoft.AspNetCore.Components;
using ReportingServices.Blazor.Services;
using ReportingServices.Shared.Blazor.HelperClasses;
using ReportingServices.Shared.Blazor.Models.PlanningReport;
namespace ReportingServices.Blazor.Pages.PlanningReports;
public partial class WeeklyPartChangesReport
{
public WeeklyPartChanges WeeklyPartChanges { get; set; } = new WeeklyPartChanges();
public DateTime StartDate { get; set; }
public DateTime EndDate { get; set; }
[Inject]
public AppData? AppData { get; set; }
[Inject]
public ScrapeDBService? Db { get; set; }
protected override async Task OnInitializedAsync()
{
await base.OnInitializedAsync();
int numberOfPartChanges = await Db!.GetPartChangesAsync(AppData!.StartDate, AppData!.EndDate);
List<ReactorPSNWORuns> reactorPSNWORuns = await Db.GetReactorRunsAsync(AppData!.StartDate, AppData!.EndDate);
WeeklyPartChanges.TotalPartChanges = numberOfPartChanges;
WeeklyPartChanges.StartDate = AppData.StartDate.ToShortDateString();
WeeklyPartChanges.EndDate = AppData.EndDate.ToShortDateString();
WeeklyPartChanges.ReactorPSNWORuns = reactorPSNWORuns;
}
}

View File

@ -0,0 +1,8 @@
@page "/ProductionReports/DailyReport"
<ReportHeader Title="Daily Report" Date="@DateTime.Now" />
@if (Targets != null && QTDOutsAndScrap != null)
{
<TargetsSummary StartDate="@StartDate" EndDate="@EndDate" QuarterStartDate="@QuarterStartDate" Targets="@Targets" QTDOutsAndScrap="@QTDOutsAndScrap" />
}

View File

@ -0,0 +1,30 @@
using Microsoft.AspNetCore.Components;
using ReportingServices.Blazor.Services;
using ReportingServices.Shared.Blazor.HelperClasses;
using ReportingServices.Shared.Blazor.Models.ProductionReport;
namespace ReportingServices.Blazor.Pages.ProductionReports;
public partial class DailyReport
{
[Inject]
public ScrapeDBService Db { get; set; }
public DateTime StartDate { get; set; }
public DateTime EndDate { get; set; }
public DateTime QuarterStartDate { get; set; }
public QuarterlyTargets Targets { get; set; }
public OutsAndScrapTotal QTDOutsAndScrap { get; set; }
protected override async Task OnInitializedAsync()
{
QuarterStartDate = await Db.GetQuarterStartDate();
Targets = await Db.GetTargetsAsync();
QTDOutsAndScrap = await Db.GetOutsAndScrapAsync(QuarterStartDate, DateTime.Now);
StartDate = DateTime.Parse(APIHelperFunctions.GetBeginningOfWeekAsAPIString());
EndDate = DateTime.Now;
base.OnInitializedAsync();
}
}

View File

@ -0,0 +1,27 @@
@page "/ProductionReports/HoldLotReport"
@using ReportingServices.Shared.Blazor.Models.ProductionReport;
<ReportHeader Title="Hold Lot Report" Date="@DateTime.Now"></ReportHeader>
<MudTable Items="@HoldLots" Hover="true" SortLabel="Sort By" RowsPerPage="15">
<HeaderContent>
<MudTh><MudTableSortLabel SortBy="new Func<HoldLot, object>(x => x.WO_NO)">WO</MudTableSortLabel></MudTh>
<MudTh><MudTableSortLabel SortBy="new Func<HoldLot, object>(x => x.RDS_NO)">RDS</MudTableSortLabel></MudTh>
<MudTh><MudTableSortLabel SortBy="new Func<HoldLot, object>(x => x.REACTOR)">Reactor</MudTableSortLabel></MudTh>
<MudTh><MudTableSortLabel SortBy="new Func<HoldLot, object>(x => x.HOLD_DATE)">Hold Time</MudTableSortLabel></MudTh>
<MudTh><MudTableSortLabel SortBy="new Func<HoldLot, object>(x => x.HOLD_USER)">Hold User</MudTableSortLabel></MudTh>
<MudTh><MudTableSortLabel SortBy="new Func<HoldLot, object>(x => x.HOLD_REASON)">Hold Reason</MudTableSortLabel></MudTh>
</HeaderContent>
<RowTemplate>
<MudTd DataLabel="WO">@context.WO_NO</MudTd>
<MudTd DataLabel="RDS">@context.RDS_NO</MudTd>
<MudTd DataLabel="Reactor">@context.REACTOR</MudTd>
<MudTd DataLabel="Hold Time">@context.HOLD_DATE</MudTd>
<MudTd DataLabel="Hold User">@context.HOLD_USER</MudTd>
<MudTd DataLabel="Hold Reason">@context.HOLD_REASON</MudTd>
</RowTemplate>
<PagerContent>
<MudTablePager PageSizeOptions="new int[]{ 15, 50, 100 }" />
</PagerContent>
</MudTable>

View File

@ -0,0 +1,20 @@
using Microsoft.AspNetCore.Components;
using ReportingServices.Blazor.Services;
using ReportingServices.Shared.Blazor.Models.ProductionReport;
namespace ReportingServices.Blazor.Pages.ProductionReports;
public partial class HoldLotReport
{
public List<HoldLot> HoldLots { get; set; }
[Inject]
private ScrapeDBService Db { get; set; }
protected override async Task OnInitializedAsync()
{
await base.OnInitializedAsync();
HoldLots = await Db.GetHoldLotsAsync();
}
}

View File

@ -0,0 +1,26 @@
@page "/ProductionReports/NCRReport"
@using ReportingServices.Shared.Blazor.Models.ProductionReport;
<ReportHeader Title="NCR Report" Date="@DateTime.Now"></ReportHeader>
<MudTable Items="@NCRs" Hover="true" SortLabel="Sort By" RowsPerPage="15">
<HeaderContent>
<MudTh><MudTableSortLabel SortBy="new Func<NCR, object>(x => x.ENTRY_DATE.ToShortDateString())">Entry Date</MudTableSortLabel></MudTh>
<MudTh><MudTableSortLabel SortBy="new Func<NCR, object>(x => x.SHIFT)">Shift</MudTableSortLabel></MudTh>
<MudTh><MudTableSortLabel SortBy="new Func<NCR, object>(x => x.REACTOR)">Reactor</MudTableSortLabel></MudTh>
<MudTh><MudTableSortLabel SortBy="new Func<NCR, object>(x => x.RDS_NO)">RDS</MudTableSortLabel></MudTh>
<MudTh><MudTableSortLabel SortBy="new Func<NCR, object>(x => x.TOT_REJ)">Total Reject</MudTableSortLabel></MudTh>
<MudTh><MudTableSortLabel SortBy="new Func<NCR, object>(x => x.LOSS_COMMENTS)">Loss Comments</MudTableSortLabel></MudTh>
</HeaderContent>
<RowTemplate>
<MudTd DataLabel="Entry Date">@context.ENTRY_DATE.ToShortDateString()</MudTd>
<MudTd DataLabel="Shift">@context.SHIFT</MudTd>
<MudTd DataLabel="Reactor">@context.REACTOR</MudTd>
<MudTd DataLabel="RDS">@context.RDS_NO</MudTd>
<MudTd DataLabel="Total Reject">@context.TOT_REJ</MudTd>
<MudTd DataLabel="Loss Comments">@context.LOSS_COMMENTS</MudTd>
</RowTemplate>
<PagerContent>
<MudTablePager PageSizeOptions="new int[]{ 15, 50, 100 }" />
</PagerContent>
</MudTable>

View File

@ -0,0 +1,20 @@
using Microsoft.AspNetCore.Components;
using ReportingServices.Blazor.Services;
using ReportingServices.Shared.Blazor.Models.ProductionReport;
namespace ReportingServices.Blazor.Pages.ProductionReports;
public partial class NCRReport
{
public List<NCR> NCRs { get; set; }
[Inject]
private ScrapeDBService Db { get; set; }
protected override async Task OnInitializedAsync()
{
await base.OnInitializedAsync();
NCRs = await Db.GetNCRsAsync();
}
}

View File

@ -0,0 +1,16 @@
@page "/ProductionReports"
<div class="row">
<div class="col-3 d-grid">
<a class="btn btn-outline-secondary text-start" href="/ProductionReports/DailyReport" onclick="displayBusyIndicator()"><span class="float-start"><i class="fa-regular fa-file-alt fa-4x buttonImage align-middle"></i> Production Passdown Report</span></a>
</div>
<div class="col-3 d-grid">
<a class="btn btn-outline-secondary text-start" href="/ProductionReports/HoldLotReport" onclick="displayBusyIndicator()"><span class="float-start"><i class="fa-regular fa-file-alt fa-4x buttonImage align-middle"></i> Hold Lot Report</span></a>
</div>
<div class="col-3 d-grid">
<a class="btn btn-outline-secondary text-start" href="/ProductionReports/NCRReport" onclick="displayBusyIndicator()"><span class="float-start"><i class="fa-regular fa-file-alt fa-4x buttonImage align-middle"></i> Open NCR Report</span></a>
</div>
<div class="col-3 d-grid">
<a class="btn btn-outline-secondary text-start" href="http://goto.infineon.com/mesassrreport" onclick="displayBusyIndicator()"><span class="float-start"><i class="fa-regular fa-file-alt fa-4x buttonImage align-middle"></i> Mesa SSR Report</span></a>
</div>
</div>