|
@item.InveSessID
+
+
|
@item.Description
@@ -53,4 +57,26 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/MP.INVE/Pages/Session.razor.cs b/MP.INVE/Pages/Session.razor.cs
index 92a8377d..a35569bb 100644
--- a/MP.INVE/Pages/Session.razor.cs
+++ b/MP.INVE/Pages/Session.razor.cs
@@ -31,25 +31,59 @@ namespace MP.INVE.Pages
protected override async Task OnInitializedAsync()
{
//await FilterChanged.InvokeAsync(actFilter);
- //await getId();
+ await getId();
await Task.Delay(1);
elencoSessioni = MIDataservice.InventSessCurrList();
}
-#if false
+ protected override async Task OnAfterRenderAsync(bool firstRender)
+ {
+ if (firstRender)
+ {
+ await JSRuntime.InvokeVoidAsync("clearContent", $"qrCodeImg_{101}");
+ await JSRuntime.InvokeVoidAsync("displayQr", $"qrCodeImg_{101}", rawCode);
+ }
+ }
+ protected string BaseUrlTab { get => $"{Configuration["ServerConf:BaseUrlJumper"]}"; }
+ private int idOperatore { get; set; } = 0;
+ private int currIdSess { get; set; } = 0;
+ private string authKey { get; set; } = "";
+
+ protected string rawCode
+ {
+ get
+ {
+ string answ = "";
+ answ = $"{BaseUrlTab}IdSessione={currIdSess}&MatrOpr={idOperatore}&UserAuthKey={authKey}";
+ return answ;
+ }
+ }
+
+
+ protected void getCurrSess(int idSess)
+ {
+ currIdSess = idSess;
+ }
+
+ [Inject]
+ private IConfiguration Configuration { get; set; } = null!;
[Inject]
protected ILocalStorageService localStorage { get; set; } = null!;
[Inject]
protected NavigationManager NavManager { get; set; } = null!;
+ [Inject]
+ protected IJSRuntime JSRuntime { get; set; } = null!;
+
+
protected async Task getId()
{
OperatoreDTO local = new OperatoreDTO();
local = await localStorage.GetItemAsync("MatrOpr");
- if ((local == null))
+ if(local != null)
{
- NavManager.NavigateTo("OperatoreLogin");
+ idOperatore = local.MatrOpr;
+ authKey = local.hashAuthKey;
}
}
-#endif
}
}
\ No newline at end of file
diff --git a/MP.INVE/Resources/ChangeLog.html b/MP.INVE/Resources/ChangeLog.html
index 0742b597..c57285e7 100644
--- a/MP.INVE/Resources/ChangeLog.html
+++ b/MP.INVE/Resources/ChangeLog.html
@@ -1,6 +1,6 @@
Modulo MAPOINVE
- Versione: 6.16.2211.1617
+ Versione: 6.16.2211.1618
Note di rilascio:
-
diff --git a/MP.INVE/Resources/VersNum.txt b/MP.INVE/Resources/VersNum.txt
index 0e34ded0..6469485d 100644
--- a/MP.INVE/Resources/VersNum.txt
+++ b/MP.INVE/Resources/VersNum.txt
@@ -1 +1 @@
-6.16.2211.1617
+6.16.2211.1618
diff --git a/MP.INVE/Resources/manifest.xml b/MP.INVE/Resources/manifest.xml
index d95385a5..dacc17ff 100644
--- a/MP.INVE/Resources/manifest.xml
+++ b/MP.INVE/Resources/manifest.xml
@@ -1,6 +1,6 @@
-
- 6.16.2211.1617
+ 6.16.2211.1618
https://nexus.steamware.net/repository/SWS/MP-INVE/stable/LAST/MP.INVE.zip
https://nexus.steamware.net/repository/SWS/MP-INVE/stable/LAST/ChangeLog.html
false
diff --git a/MP.INVE/Shared/MainLayout.razor b/MP.INVE/Shared/MainLayout.razor
index 14aea320..75da5b44 100644
--- a/MP.INVE/Shared/MainLayout.razor
+++ b/MP.INVE/Shared/MainLayout.razor
@@ -6,10 +6,7 @@
- @if (userName != "0")
- {
-
- }
+
diff --git a/MP.INVE/Shared/NavMenu.razor b/MP.INVE/Shared/NavMenu.razor
index cf60bfa1..ab84a4ef 100644
--- a/MP.INVE/Shared/NavMenu.razor
+++ b/MP.INVE/Shared/NavMenu.razor
@@ -18,48 +18,62 @@
diff --git a/MP.INVE/Shared/NavMenu.razor.cs b/MP.INVE/Shared/NavMenu.razor.cs
index fd219e3e..31d9c0ae 100644
--- a/MP.INVE/Shared/NavMenu.razor.cs
+++ b/MP.INVE/Shared/NavMenu.razor.cs
@@ -15,6 +15,8 @@ using MP.INVE;
using MP.INVE.Shared;
using MP.INVE.Components;
using MP.INVE.Data;
+using MP.Data.DTO;
+using Blazored.LocalStorage;
namespace MP.INVE.Shared
{
@@ -27,12 +29,33 @@ namespace MP.INVE.Shared
{
collapseNavMenu = !collapseNavMenu;
}
-
+ protected string userName { get; set; } = "0";
+ protected async Task getId()
+ {
+ OperatoreDTO answ = new OperatoreDTO();
+ answ = await localStorage.GetItemAsync("MatrOpr");
+ if (answ != null)
+ {
+ userName = $"{answ.Cognome} {answ.Nome} ({answ.MatrOpr})";
+ if (NavigationManager.Uri.Contains("OperatoreLogin"))
+ {
+ NavigationManager.NavigateTo("Starter", true);
+ }
+ }
+ else
+ {
+ userName = "0";
+ if (!NavigationManager.Uri.Contains("OperatoreLogin"))
+ {
+ NavigationManager.NavigateTo("OperatoreLogin", true);
+ }
+ }
+ }
protected override async Task OnInitializedAsync()
{
// recupero elenco JQM
//ElencoLink = await MDService.ElencoLink();
- await Task.Delay(1);
+ await getId();
}
protected bool showText { get; set; } = true;
@@ -46,8 +69,8 @@ namespace MP.INVE.Shared
[Parameter]
public EventCallback EC_compressUpdated { get; set; }
-
-
+ [Inject]
+ protected ILocalStorageService localStorage { get; set; } = null!;
[Inject]
protected NavigationManager NavigationManager { get; set; } = null!;
diff --git a/MP.INVE/appsettings.json b/MP.INVE/appsettings.json
index 7527e83b..a25eaf4a 100644
--- a/MP.INVE/appsettings.json
+++ b/MP.INVE/appsettings.json
@@ -19,5 +19,6 @@
"redisLongTimeCache": "15",
"MpIoBaseUrl": "http://localhost:20967/",
"BaseUrl": "https://iis02.egalware.com/MP/MAG/SMART/PLScanner?"
+ "BaseUrlJumper": "https://iis02.egalware.com/MP/jumper?"
}
}
|