Ancora update filtering SellingItems
This commit is contained in:
@@ -40,4 +40,11 @@
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
<div class="px-1">
|
||||
<div class="input-group input-group-sm" title="ricerca">
|
||||
<span class="input-group-text"><i class="fas fa-search"></i></span>
|
||||
<input type="text" class="form-control" @bind="@SearchVal">
|
||||
<button class="btn btn-outline-secondary" @onclick="ResetSearch"><i class="fas fa-ban"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -109,6 +109,11 @@ namespace Lux.UI.Components.Compo.Item
|
||||
ListItemGroup = await DLService.ItemGroupGetAllAsync();
|
||||
}
|
||||
|
||||
private void ResetSearch()
|
||||
{
|
||||
SearchVal = "";
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
}
|
||||
@@ -20,50 +20,6 @@ namespace Lux.UI.Components.Compo.Item
|
||||
|
||||
#region Public Classes
|
||||
|
||||
#if false
|
||||
/// <summary>
|
||||
/// Filtro selezione items
|
||||
/// </summary>
|
||||
public class FiltSelect
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
public string SearchVal { get; set; } = "";
|
||||
public string SelCodGroup { get; set; } = "";
|
||||
public Enums.ItemClassType SelType { get; set; } = Enums.ItemClassType.ND;
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Public Methods
|
||||
|
||||
public override bool Equals(object? obj)
|
||||
{
|
||||
if (obj == null)
|
||||
return false;
|
||||
if (!(obj is FiltSelect item))
|
||||
return false;
|
||||
|
||||
if (SelCodGroup != item.SelCodGroup)
|
||||
return false;
|
||||
|
||||
if (SelType != item.SelType)
|
||||
return false;
|
||||
|
||||
if (SearchVal != item.SearchVal)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
}
|
||||
#endif
|
||||
|
||||
#endregion Public Classes
|
||||
|
||||
#region Protected Fields
|
||||
|
||||
@@ -18,13 +18,6 @@
|
||||
</div>
|
||||
<div class="px-0 d-flex justify-content-between">
|
||||
<DataFilter CurrFilt="@CurrFilt" ShowItemsBuy="showItemsBuy" ListItemGroup="ListItemGroup" EC_Updated="UpdateFilt" EC_AddRew="DoAdd"></DataFilter>
|
||||
<div class="px-1">
|
||||
<div class="input-group input-group-sm" title="ricerca">
|
||||
<span class="input-group-text"><i class="fas fa-search"></i></span>
|
||||
<input type="text" class="form-control" @bind="@SearchVal">
|
||||
<button class="btn btn-outline-secondary" @onclick="ResetSearch"><i class="fas fa-ban"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -7,87 +7,6 @@ namespace Lux.UI.Components.Pages
|
||||
{
|
||||
public partial class Items
|
||||
{
|
||||
#region Protected Fields
|
||||
|
||||
protected List<ItemGroupModel> ListItemGroup = new List<ItemGroupModel>();
|
||||
|
||||
#endregion Protected Fields
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
protected FiltSelect CurrFilt { get; set; } = new 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected EgwMultiEngineManager.Data.Constants.EXECENVIRONMENTS SelEnvir
|
||||
{
|
||||
get => CurrFilt.Envir;
|
||||
set
|
||||
{
|
||||
if (CurrFilt.Envir != value)
|
||||
{
|
||||
isLoading = true;
|
||||
CurrFilt.Envir = value;
|
||||
isLoading = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Modalità articoli vendita vs articoli acquisto
|
||||
/// </summary>
|
||||
private bool showItemsBuy = true;
|
||||
|
||||
/// <summary>
|
||||
/// Etichetta tipo items gestiti/mostrati
|
||||
/// </summary>
|
||||
private string txtCurrType
|
||||
{
|
||||
get => showItemsBuy ? "Acquisto" : "Vendita";
|
||||
}
|
||||
|
||||
protected EgwCoreLib.Lux.Core.Enums.ItemClassType SelType
|
||||
{
|
||||
get => CurrFilt.SelType;
|
||||
set
|
||||
{
|
||||
if (CurrFilt.SelType != value)
|
||||
{
|
||||
isLoading = true;
|
||||
CurrFilt.SelType = value;
|
||||
isLoading = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected void DoAdd()
|
||||
@@ -100,7 +19,7 @@ namespace Lux.UI.Components.Pages
|
||||
ItemCode = 0,
|
||||
ExtItemCode = "NEW-ITEM",
|
||||
SupplCode = "",
|
||||
Description = $"Nuova Offerta {DateTime.Today:ddd yyyy.MM.dd}",
|
||||
Description = $"Nuovo ITEM {DateTime.Today:ddd yyyy.MM.dd}",
|
||||
Cost = 0,
|
||||
Margin = 0,
|
||||
QtyMin = 0,
|
||||
@@ -109,6 +28,12 @@ namespace Lux.UI.Components.Pages
|
||||
};
|
||||
}
|
||||
|
||||
protected override Task OnInitializedAsync()
|
||||
{
|
||||
isLoading = true;
|
||||
return ReloadBaseData();
|
||||
}
|
||||
|
||||
protected void UpdateFilt(FiltSelect newFilt)
|
||||
{
|
||||
isLoading = true;
|
||||
@@ -116,26 +41,38 @@ namespace Lux.UI.Components.Pages
|
||||
isLoading = false;
|
||||
}
|
||||
|
||||
protected override Task OnInitializedAsync()
|
||||
{
|
||||
isLoading = true;
|
||||
return ReloadBaseData();
|
||||
}
|
||||
|
||||
protected void ResetSearch()
|
||||
{
|
||||
SearchVal = "";
|
||||
}
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private ItemModel? editRecord = null;
|
||||
private bool isLoading = false;
|
||||
private List<ItemGroupModel> ListItemGroup = new List<ItemGroupModel>();
|
||||
|
||||
/// <summary>
|
||||
/// Modalità articoli vendita vs articoli acquisto
|
||||
/// </summary>
|
||||
private bool showItemsBuy = true;
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Private Properties
|
||||
|
||||
private FiltSelect CurrFilt { get; set; } = new FiltSelect();
|
||||
|
||||
[Inject]
|
||||
private DataLayerServices DLService { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
/// Etichetta tipo items gestiti/mostrati
|
||||
/// </summary>
|
||||
private string txtCurrType
|
||||
{
|
||||
get => showItemsBuy ? "Acquisto" : "Vendita";
|
||||
}
|
||||
|
||||
#endregion Private Properties
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private async Task ReloadBaseData()
|
||||
|
||||
Reference in New Issue
Block a user