Add a new web-based frontend for cut list optimization using: - Blazor Server with .NET 8 - Entity Framework Core with MSSQL LocalDB - Full CRUD for Materials, Suppliers, Projects, and Cutting Tools - Supplier stock length management for quick project setup - Integration with CutList.Core for bin packing optimization - Print-friendly HTML reports with efficiency statistics Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
67 lines
1.7 KiB
Plaintext
67 lines
1.7 KiB
Plaintext
@if (IsVisible)
|
|
{
|
|
<div class="modal fade show d-block" tabindex="-1" style="background-color: rgba(0,0,0,0.5);">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h5 class="modal-title">@Title</h5>
|
|
<button type="button" class="btn-close" @onclick="Cancel"></button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<p>@Message</p>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-secondary" @onclick="Cancel">Cancel</button>
|
|
<button type="button" class="btn @ConfirmButtonClass" @onclick="Confirm">@ConfirmText</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
}
|
|
|
|
@code {
|
|
[Parameter]
|
|
public string Title { get; set; } = "Confirm";
|
|
|
|
[Parameter]
|
|
public string Message { get; set; } = "Are you sure?";
|
|
|
|
[Parameter]
|
|
public string ConfirmText { get; set; } = "Confirm";
|
|
|
|
[Parameter]
|
|
public string ConfirmButtonClass { get; set; } = "btn-danger";
|
|
|
|
[Parameter]
|
|
public EventCallback OnConfirm { get; set; }
|
|
|
|
[Parameter]
|
|
public EventCallback OnCancel { get; set; }
|
|
|
|
public bool IsVisible { get; private set; }
|
|
|
|
public void Show()
|
|
{
|
|
IsVisible = true;
|
|
StateHasChanged();
|
|
}
|
|
|
|
public void Hide()
|
|
{
|
|
IsVisible = false;
|
|
StateHasChanged();
|
|
}
|
|
|
|
private async Task Confirm()
|
|
{
|
|
Hide();
|
|
await OnConfirm.InvokeAsync();
|
|
}
|
|
|
|
private async Task Cancel()
|
|
{
|
|
Hide();
|
|
await OnCancel.InvokeAsync();
|
|
}
|
|
}
|