@if (DoorsList == null || DoorsList.Count == 0)
{
-
+
}
else
{
diff --git a/WebDoorCreator.UI/Components/Order/OrderDets.razor.cs b/WebDoorCreator.UI/Components/Order/OrderDets.razor.cs
index bf9bcda..0d5754b 100644
--- a/WebDoorCreator.UI/Components/Order/OrderDets.razor.cs
+++ b/WebDoorCreator.UI/Components/Order/OrderDets.razor.cs
@@ -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();
///
- /// Unit� di misura selezionata
+ /// Unita' di misura selezionata
///
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
("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("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
}
}
\ No newline at end of file
diff --git a/WebDoorCreator.UI/Components/Order/OrdersDoorsDoorDef.razor.cs b/WebDoorCreator.UI/Components/Order/OrdersDoorsDoorDef.razor.cs
index b856a8f..32f2b92 100644
--- a/WebDoorCreator.UI/Components/Order/OrdersDoorsDoorDef.razor.cs
+++ b/WebDoorCreator.UI/Components/Order/OrdersDoorsDoorDef.razor.cs
@@ -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 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? 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? 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? ListValuesAll = null;
#region Protected Methods
- protected string translate(string lemma)
- {
- return VocService.Traduci(WDCUService.currLanguage ?? "EN", lemma);
- }
-
- ///
- /// Traduzione condizionale
- ///
- /// valore condizione
- /// lemma caso FALSE
- /// lemma caso TRUE
- ///
- 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("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);
+ }
+
+ ///
+ /// Traduzione condizionale
+ ///
+ /// valore condizione
+ /// lemma caso FALSE
+ /// lemma caso TRUE
+ ///
+ 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? 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("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("ordSelFilt", newParams);
isLoading = false;
}
diff --git a/WebDoorCreator.UI/WebDoorCreator.UI.csproj b/WebDoorCreator.UI/WebDoorCreator.UI.csproj
index e883ad9..09712b4 100644
--- a/WebDoorCreator.UI/WebDoorCreator.UI.csproj
+++ b/WebDoorCreator.UI/WebDoorCreator.UI.csproj
@@ -3,7 +3,7 @@
net6.0
enable
- 0.9.2403.1112
+ 0.9.2403.1113
enable
aspnet-WebDoorCreator.UI-dfe95fed-1398-4144-bd43-8b3a765d6608