109 lines
2.6 KiB
C#
109 lines
2.6 KiB
C#
using EgwCoreLib.Lux.Data.DbModel.Items;
|
|
using EgwCoreLib.Lux.Data.DbModel.Task;
|
|
using EgwCoreLib.Lux.Data.DbModel.Utils;
|
|
using EgwCoreLib.Lux.Data.Services;
|
|
using Lux.UI.Components.Compo;
|
|
using Microsoft.AspNetCore.Components;
|
|
|
|
namespace Lux.UI.Components.Pages
|
|
{
|
|
public partial class JobRoute
|
|
{
|
|
#region Protected Fields
|
|
|
|
protected List<GenClassModel> ListGenClass = new List<GenClassModel>();
|
|
|
|
#endregion Protected Fields
|
|
|
|
#region Protected Properties
|
|
|
|
protected GenValMan.FiltSelect CurrFilt { get; set; } = new GenValMan.FiltSelect();
|
|
|
|
[Inject]
|
|
protected DataLayerServices DLService { get; set; } = null!;
|
|
|
|
protected string SearchVal
|
|
{
|
|
get => CurrFilt.SearchVal;
|
|
set
|
|
{
|
|
isLoading = true;
|
|
CurrFilt.SearchVal = value;
|
|
isLoading = false;
|
|
}
|
|
}
|
|
|
|
protected string SelCodGroup
|
|
{
|
|
get => CurrFilt.SelCodGroup;
|
|
set
|
|
{
|
|
if (CurrFilt.SelCodGroup != value)
|
|
{
|
|
isLoading = true;
|
|
CurrFilt.SelCodGroup = value;
|
|
isLoading = false;
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion Protected Properties
|
|
|
|
#region Protected Methods
|
|
|
|
protected override async Task OnInitializedAsync()
|
|
{
|
|
isLoading = true;
|
|
await ReloadBaseData();
|
|
}
|
|
|
|
protected void ResetSearch()
|
|
{
|
|
SearchVal = "";
|
|
}
|
|
|
|
#endregion Protected Methods
|
|
|
|
#region Private Fields
|
|
|
|
private JobTaskModel? editRecord = null;
|
|
private JobTaskModel? selRecord = null;
|
|
private bool isLoading = false;
|
|
|
|
#endregion Private Fields
|
|
|
|
#region Private Methods
|
|
|
|
private async Task ForceReloadAsync()
|
|
{
|
|
await ReloadBaseData();
|
|
}
|
|
|
|
private async Task ReloadBaseData()
|
|
{
|
|
isLoading = true;
|
|
ListGenClass = await DLService.GenClassGetAllAsync();
|
|
isLoading = false;
|
|
}
|
|
|
|
private void SaveSel(string codGroup)
|
|
{
|
|
SelCodGroup = codGroup;
|
|
}
|
|
|
|
#endregion Private Methods
|
|
/// <summary>
|
|
/// Salva ID sel e mostra dettagli JobTask
|
|
/// </summary>
|
|
/// <param name="selRec"></param>
|
|
private void ShowDetail(JobTaskModel? selRec)
|
|
{
|
|
selRecord = selRec;
|
|
}
|
|
|
|
private string mainCss
|
|
{
|
|
get => selRecord == null ? "col-6" : "col-4";
|
|
}
|
|
}
|
|
} |