Merge branch 'release/FixPagination01'
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>WebDoorCreator - Egalware</i>
|
||||
<h4>Version: 0.9.2403.1112</h4>
|
||||
<h4>Version: 0.9.2403.1113</h4>
|
||||
<br /> Release note:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
0.9.2403.1112
|
||||
0.9.2403.1113
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>0.9.2403.1112</version>
|
||||
<version>0.9.2403.1113</version>
|
||||
<url>http://nexus.steamware.net/repository/SWS/WDC/stable/WDC.UI.zip</url>
|
||||
<changelog>http://nexus.steamware.net/repository/SWS/WDC/stable/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
@@ -124,7 +124,7 @@
|
||||
<div class="row">
|
||||
@if (DoorsList == null || DoorsList.Count == 0)
|
||||
{
|
||||
<LoadingDataSmall></LoadingDataSmall>
|
||||
<LoadingData DisplaySize="LoadingData.CtrlSize.Small"></LoadingData>
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using EgwCoreLib.Razor;
|
||||
using Blazored.SessionStorage;
|
||||
using EgwCoreLib.Razor;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using WebDoorCreator.Data.DbModels;
|
||||
using WebDoorCreator.Data.DTO;
|
||||
@@ -47,7 +48,7 @@ namespace WebDoorCreator.UI.Components.Order
|
||||
protected DoorsSelectFilter currFilter { get; set; } = new DoorsSelectFilter();
|
||||
|
||||
/// <summary>
|
||||
/// Unit� di misura selezionata
|
||||
/// Unita' di misura selezionata
|
||||
/// </summary>
|
||||
protected string currMeaUnit { get; set; } = "mm";
|
||||
|
||||
@@ -103,9 +104,17 @@ namespace WebDoorCreator.UI.Components.Order
|
||||
currPage = newNum;
|
||||
}
|
||||
|
||||
protected override void OnInitialized()
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
numRecord = 16;
|
||||
string rawVal = await sessStorage.GetItemAsStringAsync("doorsSelFilt");
|
||||
if (!string.IsNullOrEmpty(rawVal))
|
||||
{
|
||||
currFilter = await sessStorage.GetItemAsync<DoorsSelectFilter>("doorsSelFilt");
|
||||
}
|
||||
else
|
||||
{
|
||||
numRecord = 16;
|
||||
}
|
||||
}
|
||||
|
||||
protected async Task SetCurrDoor(DoorModel door)
|
||||
@@ -144,7 +153,10 @@ namespace WebDoorCreator.UI.Components.Order
|
||||
private int currPage
|
||||
{
|
||||
get => currFilter.CurrPage;
|
||||
set => currFilter.CurrPage = value;
|
||||
set
|
||||
{
|
||||
currFilter.CurrPage = value;
|
||||
}
|
||||
}
|
||||
|
||||
private bool isLoading { get; set; } = false;
|
||||
@@ -152,7 +164,15 @@ namespace WebDoorCreator.UI.Components.Order
|
||||
private int numRecord
|
||||
{
|
||||
get => currFilter.NumRec;
|
||||
set => currFilter.NumRec = value;
|
||||
set
|
||||
{
|
||||
if (currFilter.NumRec != value)
|
||||
{
|
||||
currFilter.NumRec = value;
|
||||
currPage = 1;
|
||||
InvokeAsync(() => sessStorage.SetItemAsync<DoorsSelectFilter>("doorsSelFilt", currFilter));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private string searchValue
|
||||
@@ -161,6 +181,9 @@ namespace WebDoorCreator.UI.Components.Order
|
||||
set => currFilter.searchValue = value;
|
||||
}
|
||||
|
||||
[Inject]
|
||||
private ISessionStorageService sessStorage { get; set; } = null!;
|
||||
|
||||
#endregion Private Properties
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using Blazored.LocalStorage;
|
||||
using Blazored.SessionStorage;
|
||||
using EgwCoreLib.Razor;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.JSInterop;
|
||||
@@ -12,12 +13,12 @@ namespace WebDoorCreator.UI.Components.Order
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
[CascadingParameter]
|
||||
public bool isTplPage { get; set; } = false;
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<AspNetUsers> E_currUser { get; set; }
|
||||
|
||||
[CascadingParameter]
|
||||
public bool isTplPage { get; set; } = false;
|
||||
|
||||
public string userId
|
||||
{
|
||||
get
|
||||
@@ -26,9 +27,6 @@ namespace WebDoorCreator.UI.Components.Order
|
||||
}
|
||||
}
|
||||
|
||||
[Inject]
|
||||
protected WDCVocabularyService WDCVService { get; set; } = null!;
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Public Methods
|
||||
@@ -52,12 +50,21 @@ namespace WebDoorCreator.UI.Components.Order
|
||||
#region Protected Fields
|
||||
|
||||
protected string _doorExtCode = "";
|
||||
|
||||
protected int _doorQuantity = 0;
|
||||
|
||||
protected string _orderCodExt = "";
|
||||
|
||||
protected string _orderDescr = "";
|
||||
|
||||
protected bool cloneReq = false;
|
||||
|
||||
protected string Lingua = "EN";
|
||||
|
||||
protected bool newOrdReq = false;
|
||||
|
||||
protected int ordIdOrig = 0;
|
||||
|
||||
protected DataPager? pagerOrderHP = null!;
|
||||
|
||||
#endregion Protected Fields
|
||||
@@ -65,12 +72,19 @@ namespace WebDoorCreator.UI.Components.Order
|
||||
#region Protected Properties
|
||||
|
||||
protected DoorModel? currDoor { get; set; } = null;
|
||||
|
||||
protected DoorModel? currDoorModal { get; set; } = null;
|
||||
protected int currParentId { get; set; } = 0;
|
||||
|
||||
protected OrderSelectFilter currFilter { get; set; } = new OrderSelectFilter();
|
||||
|
||||
protected int CurrLevel { get; set; } = 1;
|
||||
|
||||
protected int currOrderId { get; set; } = 0;
|
||||
|
||||
protected int currParentId { get; set; } = 0;
|
||||
|
||||
protected AspNetUsers? currUser { get; set; } = null;
|
||||
|
||||
protected bool doorChange { get; set; } = false;
|
||||
|
||||
protected string doorExtCode
|
||||
@@ -86,7 +100,9 @@ namespace WebDoorCreator.UI.Components.Order
|
||||
}
|
||||
|
||||
protected List<DoorModel>? DoorsList { get; set; } = null;
|
||||
|
||||
protected string goToDefPage { get; set; } = "";
|
||||
|
||||
protected bool isModRole { get; set; } = false;
|
||||
|
||||
[Inject]
|
||||
@@ -125,47 +141,21 @@ namespace WebDoorCreator.UI.Components.Order
|
||||
|
||||
protected List<UsersViewModel>? UsersList { get; set; } = null;
|
||||
|
||||
[Inject]
|
||||
protected WDCVocabularyService VocService { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected WDCUserService WDCUService { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected WebDoorCreatorService WDService { get; set; } = null!;
|
||||
protected WDCVocabularyService WDCVService { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected WDCVocabularyService VocService { get; set; } = null!;
|
||||
protected WebDoorCreatorService WDService { get; set; } = null!;
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
private List<ListValuesModel>? ListValuesAll = null;
|
||||
#region Protected Methods
|
||||
protected string translate(string lemma)
|
||||
{
|
||||
return VocService.Traduci(WDCUService.currLanguage ?? "EN", lemma);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Traduzione condizionale
|
||||
/// </summary>
|
||||
/// <param name="condition">valore condizione</param>
|
||||
/// <param name="lemmaCF">lemma caso FALSE</param>
|
||||
/// <param name="lemmaCT">lemma caso TRUE</param>
|
||||
/// <returns></returns>
|
||||
protected string translOpt(bool condition, string lemmaCF, string lemmaCT)
|
||||
{
|
||||
string answ = "";
|
||||
if (condition)
|
||||
{
|
||||
answ = VocService.Traduci(WDCUService.currLanguage ?? "EN", lemmaCT);
|
||||
}
|
||||
else
|
||||
{
|
||||
answ = VocService.Traduci(WDCUService.currLanguage ?? "EN", lemmaCF);
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected string Lingua = "EN";
|
||||
|
||||
protected async Task addNewOrder(string userName, bool saveAsTemplate)
|
||||
{
|
||||
@@ -292,6 +282,50 @@ namespace WebDoorCreator.UI.Components.Order
|
||||
currPage = newNum;
|
||||
}
|
||||
|
||||
protected string getOrderStatusColor(int orderStat)
|
||||
{
|
||||
string answ = "";
|
||||
|
||||
if (ListValuesAll != null)
|
||||
{
|
||||
var currOrdStat = ListValuesAll.Where(x => int.Parse(x.Value) == orderStat).FirstOrDefault();
|
||||
if (currOrdStat != null)
|
||||
{
|
||||
answ = currOrdStat.DefaultVal;
|
||||
}
|
||||
}
|
||||
|
||||
return answ;
|
||||
}
|
||||
|
||||
protected string getOrderStatusLabel(int orderStat)
|
||||
{
|
||||
string answ = "";
|
||||
|
||||
if (ListValuesAll != null)
|
||||
{
|
||||
var currOrdStat = ListValuesAll.Where(x => int.Parse(x.Value) == orderStat).FirstOrDefault();
|
||||
if (currOrdStat != null)
|
||||
{
|
||||
answ = currOrdStat.Label;
|
||||
}
|
||||
}
|
||||
|
||||
return answ.ToUpper();
|
||||
}
|
||||
|
||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
||||
{
|
||||
if (firstRender)
|
||||
{
|
||||
string rawVal = await sessStorage.GetItemAsStringAsync("ordSelFilt");
|
||||
if (!string.IsNullOrEmpty(rawVal))
|
||||
{
|
||||
currFilter = await sessStorage.GetItemAsync<OrderSelectFilter>("ordSelFilt");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
await Task.Delay(1);
|
||||
@@ -388,6 +422,32 @@ namespace WebDoorCreator.UI.Components.Order
|
||||
StateHasChanged();
|
||||
}
|
||||
|
||||
protected string translate(string lemma)
|
||||
{
|
||||
return VocService.Traduci(WDCUService.currLanguage ?? "EN", lemma);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Traduzione condizionale
|
||||
/// </summary>
|
||||
/// <param name="condition">valore condizione</param>
|
||||
/// <param name="lemmaCF">lemma caso FALSE</param>
|
||||
/// <param name="lemmaCT">lemma caso TRUE</param>
|
||||
/// <returns></returns>
|
||||
protected string translOpt(bool condition, string lemmaCF, string lemmaCT)
|
||||
{
|
||||
string answ = "";
|
||||
if (condition)
|
||||
{
|
||||
answ = VocService.Traduci(WDCUService.currLanguage ?? "EN", lemmaCT);
|
||||
}
|
||||
else
|
||||
{
|
||||
answ = VocService.Traduci(WDCUService.currLanguage ?? "EN", lemmaCF);
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
protected void UpdateTotCount(int newTotCount)
|
||||
{
|
||||
totalCount = newTotCount;
|
||||
@@ -395,6 +455,12 @@ namespace WebDoorCreator.UI.Components.Order
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private List<ListValuesModel>? ListValuesAll = null;
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Private Properties
|
||||
|
||||
private int currPage
|
||||
@@ -423,7 +489,14 @@ namespace WebDoorCreator.UI.Components.Order
|
||||
private int numRecord
|
||||
{
|
||||
get => currFilter.NumRec;
|
||||
set => currFilter.NumRec = value;
|
||||
set
|
||||
{
|
||||
if (currFilter.NumRec != value)
|
||||
{
|
||||
currFilter.NumRec = value;
|
||||
InvokeAsync(() => sessStorage.SetItemAsync<OrderSelectFilter>("ordSelFilt", currFilter));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private int orderStatus
|
||||
@@ -438,39 +511,11 @@ namespace WebDoorCreator.UI.Components.Order
|
||||
set => currFilter.searchValue = value;
|
||||
}
|
||||
|
||||
[Inject]
|
||||
private ISessionStorageService sessStorage { get; set; } = null!;
|
||||
|
||||
#endregion Private Properties
|
||||
|
||||
protected string getOrderStatusLabel(int orderStat)
|
||||
{
|
||||
string answ = "";
|
||||
|
||||
if (ListValuesAll != null)
|
||||
{
|
||||
var currOrdStat = ListValuesAll.Where(x => int.Parse(x.Value) == orderStat).FirstOrDefault();
|
||||
if (currOrdStat != null)
|
||||
{
|
||||
answ = currOrdStat.Label;
|
||||
}
|
||||
}
|
||||
|
||||
return answ.ToUpper();
|
||||
}
|
||||
protected string getOrderStatusColor(int orderStat)
|
||||
{
|
||||
string answ = "";
|
||||
|
||||
if (ListValuesAll != null)
|
||||
{
|
||||
var currOrdStat = ListValuesAll.Where(x => int.Parse(x.Value) == orderStat).FirstOrDefault();
|
||||
if (currOrdStat != null)
|
||||
{
|
||||
answ = currOrdStat.DefaultVal;
|
||||
}
|
||||
}
|
||||
|
||||
return answ;
|
||||
}
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private async Task doCalcSVG(int orderId)
|
||||
@@ -515,6 +560,7 @@ namespace WebDoorCreator.UI.Components.Order
|
||||
await Task.Delay(1);
|
||||
await InvokeAsync(() => StateHasChanged());
|
||||
currFilter = newParams;
|
||||
await sessStorage.SetItemAsync<OrderSelectFilter>("ordSelFilt", newParams);
|
||||
isLoading = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<Version>0.9.2403.1112</Version>
|
||||
<Version>0.9.2403.1113</Version>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<UserSecretsId>aspnet-WebDoorCreator.UI-dfe95fed-1398-4144-bd43-8b3a765d6608</UserSecretsId>
|
||||
</PropertyGroup>
|
||||
|
||||
Reference in New Issue
Block a user