Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
a8c2c3f
Parts no Longer Auditable Entity
EyeBrawler Jun 27, 2025
ba62909
Products no Longer Auditable Entities
EyeBrawler Jun 27, 2025
18b94ac
Production Log Model Now Stores Product Serial Number
EyeBrawler Jun 27, 2025
72ad6ae
SerialNumberLog Model Changed To ProductionLogPart and Simplified
EyeBrawler Jun 27, 2025
0450572
Adding Version Control and Other Flags to WorkInstruction Model
EyeBrawler Jun 27, 2025
df685c8
Refactoring for ProductionLogParts and Simplifying ApplicationContext
EyeBrawler Jun 27, 2025
a38a99b
Updating WorkInstructionStepList to Fix Missing Component Build Error
EyeBrawler Jun 27, 2025
5baa536
Adding Work Instruction and Part Model Enhancements
EyeBrawler Jun 27, 2025
f515d7a
Removing ProductSerialNumber Parameter From PartNodeListItem Componen…
EyeBrawler Jun 27, 2025
fa0817d
Product Serial Number Shows in Production Log Upon Work Instruction F…
EyeBrawler Jun 27, 2025
5683c7b
Changing Production Log Page Title to "Production Log"
EyeBrawler Jun 30, 2025
09de038
Implementation of Production Log Editing
EyeBrawler Jun 30, 2025
bd36f4d
Removing Unused Imports from ProductionLogStep Model
EyeBrawler Jun 30, 2025
8e320cf
Fixing Attempts not Deleting in Production Log Editor
EyeBrawler Jun 30, 2025
0095eec
Changing using to await using in DeleteAttemptAsync
EyeBrawler Jul 1, 2025
1ec1327
moved work instruction template to dedicated folder
adamj537 Jul 1, 2025
8c78a06
Modified template and renamed.
adamj537 Jul 1, 2025
4484790
Merge remote-tracking branch 'origin/AJ' into import-overhaul
EyeBrawler Jul 1, 2025
540b5c4
Updated several Microsoft NuGet packages.
adamj537 Jul 1, 2025
ae240cc
Merge remote-tracking branch 'origin/AJ' into import-overhaul
EyeBrawler Jul 1, 2025
1440661
ShouldGenerateQRCodeField now Applies in Production Log
EyeBrawler Jul 1, 2025
bdf12c9
Added Loading Bar to Work Instruction Import
EyeBrawler Jul 1, 2025
d73c361
Import Follows New Spreadsheet Design with Part Node Sequencing
EyeBrawler Jul 1, 2025
8a1987b
Adding ImageSharp Package for Work Instruction Export
EyeBrawler Jul 2, 2025
b7fd96a
Work Instruction Versioning for Import and Improved Export
EyeBrawler Jul 2, 2025
56b0b2b
Updated Login Drop Down Dark Mode CSS Styling Functionality.
av1452 Jul 2, 2025
49384dc
Updated functionality for CSS dark mode styling for failure mode text…
av1452 Jul 2, 2025
b4531dd
Updated CSS styling for product and work instruction drop down menus …
av1452 Jul 2, 2025
ff66060
Changing Work Instruction Service to Have Work Instruction Name and P…
EyeBrawler Jul 2, 2025
03a4571
Allowing Primary Media to Display as Secondary Media if no Secondary …
EyeBrawler Jul 2, 2025
77ff47f
Adding Production View
EyeBrawler Jul 2, 2025
901db23
Adding Traceability View
EyeBrawler Jul 2, 2025
866de3e
Merge branch 'import-overhaul' into import-overhaul+CSS
EyeBrawler Jul 2, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions MESS/MESS.Blazor/Components/Pages/Auth/Login.razor
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
<div @ref="_dropdownContainer"
@onmouseenter="OnDropdownMouseEnter"
@onmouseleave="OnDropdownMouseLeave"
class="position-absolute w-100 mt-1 shadow bg-white border rounded"
style="max-height: 200px; overflow-y: auto; z-index: 1000;">
class="login-dropdown position-absolute w-100 mt-1 shadow border rounded"
style="max-height: 200px; overflow-y: auto; z-index: 1000;">
@if (ApplicationUsers != null)
{
@foreach (var lineOperator in ApplicationUsers.Where(u =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,24 @@
</button>
<InputFile OnChange="LoadFile" accept=".xlsx" class="form-control mb-3"/>
</div>

@if (IsImporting)
{
<div class="mt-3">
<div class="progress">
<div class="progress-bar progress-bar-striped progress-bar-animated" style="width: 100%">
Importing...
</div>
</div>
</div>
}

@if (!string.IsNullOrEmpty(StatusMessage))
{
<div class="alert alert-info mt-3">
@StatusMessage
</div>
}
</FluentCard>


Expand Down
24 changes: 14 additions & 10 deletions MESS/MESS.Blazor/Components/Pages/ProductionLog/Create.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ internal enum Status
/// </summary>
public partial class Create : ComponentBase, IAsyncDisposable
{
private string Title = "Add";
private const string Title = "Production Log";
private bool IsLoading { get; set; } = true;
private ConfirmationModal? popupRef;
private bool IsWorkflowActive { get; set; }
Expand All @@ -42,7 +42,7 @@ public partial class Create : ComponentBase, IAsyncDisposable
private string? ProductSerialNumber { get; set; }
private string? QRCodeDataUrl;
private IJSObjectReference? module;
private List<SerialNumberLog> _serialNumberLogs { get; set; } = [];
private List<ProductionLogPart> ProductionLogParts { get; set; } = [];

private Func<ProductionLog, Task>? _autoSaveHandler;
/// <inheritdoc />
Expand Down Expand Up @@ -82,9 +82,9 @@ await InvokeAsync((() =>
ProductionLogEventService.AutoSaveTriggered += _autoSaveHandler;
ProductSerialNumber = SerializationService.CurrentProductNumber;

SerializationService.CurrentSerialNumberLogChanged += HandleSerialNumberLogsChanged;
SerializationService.CurrentProductionLogPartChanged += HandleProductionLogPartsChanged;
SerializationService.CurrentProductNumberChanged += HandleProductNumberChanged;
_serialNumberLogs = SerializationService.CurrentSerialNumberLogs;
ProductionLogParts = SerializationService.CurrentProductionLogParts;

IsLoading = false;
}
Expand Down Expand Up @@ -310,7 +310,7 @@ protected async Task HandleSubmit()
}


bool allStepsHavePartsNeeded = _serialNumberLogs.Count >= totalPartsNeeded;
bool allStepsHavePartsNeeded = ProductionLogParts.Count >= totalPartsNeeded;

if (!allStepsHavePartsNeeded)
{
Expand Down Expand Up @@ -353,12 +353,16 @@ private async Task CompleteSubmit()
{
await ProductionLogService.UpdateAsync(ProductionLog);
}

if (ActiveWorkInstruction is { ShouldGenerateQrCode: true })
{
await PrintQRCode();
}

await PrintQRCode();
ToastService.ShowSuccess("Successfully Created Production Log", 3000);

// Create any associated SerialNumberLogs
await SerializationService.SaveCurrentSerialNumberLogsAsync(ProductionLog.Id);
await SerializationService.SaveCurrentProductionLogPartsAsync(ProductionLog.Id);

// Reset the local storage values
await LocalCacheManager.SetNewProductionLogFormAsync(null);
Expand All @@ -369,9 +373,9 @@ private async Task CompleteSubmit()
await ResetFormState();
}

private void HandleSerialNumberLogsChanged()
private void HandleProductionLogPartsChanged()
{
_serialNumberLogs = SerializationService.CurrentSerialNumberLogs;
ProductionLogParts = SerializationService.CurrentProductionLogParts;

InvokeAsync(StateHasChanged);
}
Expand Down Expand Up @@ -492,7 +496,7 @@ await Task.Run(() =>
/// <inheritdoc />
public async ValueTask DisposeAsync()
{
SerializationService.CurrentSerialNumberLogChanged -= HandleSerialNumberLogsChanged;
SerializationService.CurrentProductionLogPartChanged -= HandleProductionLogPartsChanged;
SerializationService.CurrentProductNumberChanged -= HandleProductNumberChanged;
ProductionLogEventService.AutoSaveTriggered -= _autoSaveHandler;
try
Expand Down
12 changes: 10 additions & 2 deletions MESS/MESS.Blazor/Components/Pages/ProductionLog/CreateHeader.razor
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
@using MESS.Data.Models
@using MESS.Services.ProductionLog
@using Microsoft.AspNetCore.Components.Authorization
@inject IProductionLogEventService ProductionLogEventService
@inject NavigationManager NavigationManager

<div class="d-flex justify-content-between gap-4 flex-sm-wrap header-container">

Expand All @@ -13,6 +12,10 @@
@if (!string.IsNullOrWhiteSpace(ActiveLineOperator))
{
<div class="d-flex align-items-center justify-content-end">
<button class="btn btn-primary btn-sm me-4" @onclick="NavigateToLogs">
<i class="bi bi-card-list me-1"></i>My Production Logs
</button>

<span class="me-3">@ActiveLineOperator</span>
<form method="post" action="/api/auth/logout">
<button type="submit" class="btn btn-danger btn-sm">
Expand Down Expand Up @@ -68,4 +71,9 @@ else
/// </summary>
[Parameter]
public string? ActiveLineOperator { get; set; }

private void NavigateToLogs()
{
NavigationManager.NavigateTo("/production-logs");
}
}

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
@using MESS.Data.Models
@using MESS.Services.Serialization
@inject ISerializationService SerializationService

@if (_initialized)
{
<RequiredPartsList ProductionLogParts="ProductionLogParts" AfterSerialNumberInput="@AfterSerialNumberInput" />
}

@code {

/// <summary>
/// The part node that contains the parts to be displayed.
/// This parameter is required.
/// </summary>
[Parameter]
public required PartNode PartNode { get; set; }

private List<ProductionLogPart> ProductionLogParts { get; set; } = [];
private bool _initialized = false;

/// <inheritdoc />
protected override void OnAfterRender(bool firstRender)
{
base.OnAfterRender(firstRender);

if (firstRender)
{
_initialized = true;
StateHasChanged();
}
}

/// <inheritdoc />
protected override void OnParametersSet()
{
base.OnParametersSet();
InitializeProductionLogParts();
}


/// Each part gets its own production log part
private void InitializeProductionLogParts()
{
// No need to initialize production log parts if they are present in the UI
if (ProductionLogParts.Count > 0)
{
return;
}

foreach (var part in PartNode.Parts)
{
ProductionLogParts.Add(new ProductionLogPart
{
Part = part
});
}
}

private void AfterSerialNumberInput(ProductionLogPart productionLogPart)
{
productionLogPart.SubmitTimeQc = DateTimeOffset.UtcNow;

var updatedList = new List<ProductionLogPart>(SerializationService.CurrentProductionLogParts);
updatedList.Add(productionLogPart);

SerializationService.CurrentProductionLogParts = updatedList;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
@using MESS.Data.Models

<div class="form-floating flex-grow-1 m-0">
<InputText id="productionLogPart" class="form-control col custom-input" @bind-Value="@ActiveProductionLogPart.PartSerialNumber"
@bind-Value:after="@(() => AfterSerialNumberInput.InvokeAsync(ActiveProductionLogPart))"></InputText>
<label class="form-label col custom-label" for="productionLogPart" style="color: gray; background-color: transparent;">@ActiveProductionLogPart.Part?.PartName</label>
</div>

@code {
/// <summary>
/// The active production log part.
/// This parameter is required.
/// </summary>
[Parameter]
public required ProductionLogPart ActiveProductionLogPart { get; set; }

/// <summary>
/// The callback to be invoked after the serial number input is updated.
/// This parameter is required.
/// </summary>
[Parameter]
public required EventCallback<ProductionLogPart> AfterSerialNumberInput { get; set; }
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
@using MESS.Data.Models
<div class="d-flex flex-wrap gap-2 mt-2 justify-content-around align-content-center">
@foreach (var log in ProductionLogParts)
{
<RequiredPartInput ActiveProductionLogPart="log" AfterSerialNumberInput="AfterSerialNumberInput" />
}
</div>

@code {
/// <summary>
/// A list of production log parts to be displayed in the component.
/// </summary>
[Parameter] public required List<ProductionLogPart> ProductionLogParts { get; set; }

/// <summary>
/// An event callback triggered after a serial number input is processed.
/// </summary>
[Parameter]
public required EventCallback<ProductionLogPart> AfterSerialNumberInput { get; set; }
}

This file was deleted.

Loading