49 lines
1.4 KiB
C#
49 lines
1.4 KiB
C#
using Microsoft.AspNetCore.Components;
|
|
using WebDoorCreator.Data.DbModels;
|
|
using WebDoorCreator.Data.Services;
|
|
|
|
namespace WebDoorCreator.UI.Components.Order
|
|
{
|
|
public partial class OrderStatusStep
|
|
{
|
|
[Parameter]
|
|
public int CurrOrderStatus { get; set; } = 10;
|
|
|
|
[Parameter]
|
|
public EventCallback<string> E_CurrStepColor { get; set; }
|
|
|
|
protected string currColor { get; set; } = "";
|
|
|
|
protected List<ListValuesModel>? currListOrderStatus { get; set; } = null;
|
|
|
|
[Inject]
|
|
protected WebDoorCreatorService WDService { get; set; } = null!;
|
|
protected async Task doChangeStep(string actDoorDefStep)
|
|
{
|
|
await Task.Delay(1);
|
|
|
|
}
|
|
|
|
protected override async Task OnInitializedAsync()
|
|
{
|
|
await Task.Delay(1);
|
|
currListOrderStatus = await WDService.ListValuesGetAll("All", "OrderStep");
|
|
|
|
if (currListOrderStatus != null)
|
|
{
|
|
var stat2Display = currListOrderStatus.Where(x => x.Value == CurrOrderStatus.ToString()).FirstOrDefault();
|
|
if (stat2Display != null)
|
|
{
|
|
currColor = stat2Display.DefaultVal;
|
|
|
|
await E_CurrStepColor.InvokeAsync(currColor);
|
|
}
|
|
}
|
|
}
|
|
|
|
protected override async Task OnParametersSetAsync()
|
|
{
|
|
await Task.Delay(1);
|
|
}
|
|
}
|
|
} |