Merge branch 'release/AddDebugMode'
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>WebDoorCreator - Egalware</i>
|
||||
<h4>Version: 0.9.2405.0919</h4>
|
||||
<h4>Version: 0.9.2406.1909</h4>
|
||||
<br /> Release note:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
0.9.2405.0919
|
||||
0.9.2406.1909
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>0.9.2405.0919</version>
|
||||
<version>0.9.2406.1909</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>
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
{
|
||||
<select @bind="@TypeSel" class="form-select">
|
||||
<option value="*">-- All Types --</option>
|
||||
@foreach (var item in ListType)
|
||||
@foreach (var item in ListType.OrderBy(x => x))
|
||||
{
|
||||
<option value="@item">@item</option>
|
||||
}
|
||||
@@ -137,7 +137,8 @@ else if (files2Chk != null && files2Chk.Count() > 0)
|
||||
<td class="col-5" colspan="4" data-bs-toggle="modal" data-bs-target="#fileDiffModal" @onclick="()=>showDiff(item, item.Value.status)"></td>
|
||||
}
|
||||
<td class="col-2 text-center">
|
||||
<button class="btn @btnCssClass(item.Value.status, item.Value.action)" @onclick="()=>changeDoAct(item)" disabled="@(item.Value.status== Core.Enum.fileStatus.rem)">@btnTxt(item.Value.status) <i class="@btnIcon(item.Value.status)"></i></button>
|
||||
<button class="btn @btnCssClass(item.Value.status, item.Value.action)" @onclick="()=>changeDoAct(item)">@btnTxt(item.Value.status) <i class="@btnIcon(item.Value.status)"></i></button>
|
||||
@* <button class="btn @btnCssClass(item.Value.status, item.Value.action)" @onclick="()=>changeDoAct(item)" disabled="@(item.Value.status== Core.Enum.fileStatus.rem)">@btnTxt(item.Value.status) <i class="@btnIcon(item.Value.status)"></i></button> *@
|
||||
</td>
|
||||
@if (item.Value.status == Core.Enum.fileStatus.rem || item.Value.status == Core.Enum.fileStatus.mod)
|
||||
{
|
||||
|
||||
@@ -256,11 +256,14 @@ namespace WebDoorCreator.UI.Components.FilesMan
|
||||
{
|
||||
item.Value.status = Core.Enum.fileStatus.rem;
|
||||
searchRecords.Add(item.Key, item.Value);
|
||||
checkItemType(item);
|
||||
}
|
||||
|
||||
searchRecords = searchRecords.Where(x => x.Value.status > 0).ToDictionary(x => x.Key, x => x.Value);
|
||||
searchRecords = searchRecords.Where(x => x.Value.status != Core.Enum.fileStatus.none).ToDictionary(x => x.Key, x => x.Value);
|
||||
stats2show.Clear();
|
||||
stats2show.Add(Core.Enum.fileStatus.add);
|
||||
stats2show.Add(Core.Enum.fileStatus.mod);
|
||||
//stats2show.Add(Core.Enum.fileStatus.rem);
|
||||
await ReloadData();
|
||||
sendDataVal = 100;
|
||||
isLoading = false;
|
||||
@@ -399,6 +402,11 @@ namespace WebDoorCreator.UI.Components.FilesMan
|
||||
{
|
||||
_typeSel = value;
|
||||
ReloadData().ConfigureAwait(false);
|
||||
//var pUpd = Task.Run(async () =>
|
||||
//{
|
||||
// await InvokeAsync(ReloadData);
|
||||
//});
|
||||
//pUpd.Wait();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,6 +101,11 @@ namespace WebDoorCreator.UI.Components.Hardware
|
||||
[Inject]
|
||||
protected WDCVocabularyService WDVService { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected NavigationManager NavMan { get; set; } = null!;
|
||||
[Inject]
|
||||
protected WDCUserService WDCUService { get; set; } = null!;
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
@@ -225,6 +230,14 @@ namespace WebDoorCreator.UI.Components.Hardware
|
||||
JsoncConfigVal = jsonDef,
|
||||
JsoncActVal = jsonAct
|
||||
};
|
||||
|
||||
// se debug + superadmin --> auto confirm
|
||||
if (autoApprove)
|
||||
{
|
||||
doorOpToAdd.userConfirm = UserId;
|
||||
doorOpToAdd.DtConfirm = DateTime.Now;
|
||||
}
|
||||
|
||||
listOp.Add(doorOpToAdd);
|
||||
// salvo Door OP associate
|
||||
bool fatto = await WDCService.DoorOpInsert(DoorId, listOp);
|
||||
@@ -239,6 +252,7 @@ namespace WebDoorCreator.UI.Components.Hardware
|
||||
}
|
||||
}
|
||||
}
|
||||
private bool autoApprove = false;
|
||||
|
||||
/// <summary>
|
||||
/// Gestione update da oggetto sottostante
|
||||
@@ -261,10 +275,25 @@ namespace WebDoorCreator.UI.Components.Hardware
|
||||
DoorOp2ModList.Add(currItem);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Blazor: get query parm from the URL
|
||||
/// </summary>
|
||||
/// <param name="parmName"></param>
|
||||
/// <returns></returns>
|
||||
protected string GetQueryParm(string parmName)
|
||||
{
|
||||
var uriBuilder = new UriBuilder(NavMan.Uri);
|
||||
var q = System.Web.HttpUtility.ParseQueryString(uriBuilder.Query);
|
||||
return q[parmName] ?? "";
|
||||
}
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
await Task.Delay(1);
|
||||
var currMode = GetQueryParm("currMode");
|
||||
if (!string.IsNullOrEmpty(currMode) && WDCUService.userRole == "SuperAdmin")
|
||||
{
|
||||
autoApprove = currMode.Equals("debug");
|
||||
}
|
||||
WDCRefresh.EA_ConfDoorOp += WDCRefresh_EA_ConfDoorOp;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.JSInterop;
|
||||
using Newtonsoft.Json;
|
||||
using NLog;
|
||||
using System;
|
||||
using WebDoorCreator.Data.DbModels;
|
||||
using WebDoorCreator.Data.Services;
|
||||
using WebDoorCreator.UI.Data;
|
||||
@@ -90,6 +91,10 @@ namespace WebDoorCreator.UI.Components.Hardware
|
||||
protected List<ListValuesModel>? listValuesFiles { get; set; } = null!;
|
||||
protected List<ListValuesModel>? listValuesFname { get; set; } = null!;
|
||||
protected List<ListValuesModel>? listValuesHW { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected NavigationManager NavMan { get; set; } = null!;
|
||||
|
||||
protected List<string> ordListVal { get; set; } = new List<string>();
|
||||
|
||||
[Inject]
|
||||
@@ -142,6 +147,9 @@ namespace WebDoorCreator.UI.Components.Hardware
|
||||
[Inject]
|
||||
protected WebDoorCreatorService WDCService { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected WDCUserService WDCUService { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected WDCVocabularyService WDVService { get; set; } = null!;
|
||||
|
||||
@@ -199,6 +207,12 @@ namespace WebDoorCreator.UI.Components.Hardware
|
||||
// salvo i NUOVI valori...
|
||||
DoorOpInst.CurrVals = dictValCurr;
|
||||
DoorOpInst.GraphicParams = graphicParams;
|
||||
// se debug + superadmin --> auto confirm
|
||||
if (autoApprove && string.IsNullOrEmpty(DoorOpInst.userConfirm))
|
||||
{
|
||||
DoorOpInst.userConfirm = WDCUService.userId;
|
||||
DoorOpInst.DtConfirm = DateTime.Now;
|
||||
}
|
||||
// salvo!
|
||||
List<DoorOpModel> doorOpUpd = new List<DoorOpModel>() { DoorOpInst };
|
||||
await WDCService.DoorOpUpdate(doorOpUpd);
|
||||
@@ -211,6 +225,18 @@ namespace WebDoorCreator.UI.Components.Hardware
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Blazor: get query parm from the URL
|
||||
/// </summary>
|
||||
/// <param name="parmName"></param>
|
||||
/// <returns></returns>
|
||||
protected string GetQueryParm(string parmName)
|
||||
{
|
||||
var uriBuilder = new UriBuilder(NavMan.Uri);
|
||||
var q = System.Web.HttpUtility.ParseQueryString(uriBuilder.Query);
|
||||
return q[parmName] ?? "";
|
||||
}
|
||||
|
||||
protected string getTrad(string objId)
|
||||
{
|
||||
string answ = "";
|
||||
@@ -235,6 +261,12 @@ namespace WebDoorCreator.UI.Components.Hardware
|
||||
hasChanged = currSer != origSer;
|
||||
if (hasChanged)
|
||||
{
|
||||
// se debug + superadmin --> auto confirm
|
||||
if (autoApprove && string.IsNullOrEmpty(DoorOpInst.userConfirm))
|
||||
{
|
||||
DoorOpInst.userConfirm = WDCUService.userId;
|
||||
DoorOpInst.DtConfirm = DateTime.Now;
|
||||
}
|
||||
DoorOpInst.JsoncActVal = JsonConvert.SerializeObject(dictValCurr);
|
||||
Task.Run(async () =>
|
||||
{
|
||||
@@ -256,6 +288,11 @@ namespace WebDoorCreator.UI.Components.Hardware
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
base.OnInitialized();
|
||||
var currMode = GetQueryParm("currMode");
|
||||
if (!string.IsNullOrEmpty(currMode) && WDCUService.userRole == "SuperAdmin")
|
||||
{
|
||||
autoApprove = currMode.Equals("debug");
|
||||
}
|
||||
string vers = config.GetValue<string>("ConfDDF:VersNumber");
|
||||
bool remDoorOp = config.GetValue<bool>("ConfDDF:RemoveDoorOps");
|
||||
var headRows = config.GetSection("ConfDDF:Header").Get<List<string>>();
|
||||
@@ -328,6 +365,7 @@ namespace WebDoorCreator.UI.Components.Hardware
|
||||
#region Private Fields
|
||||
|
||||
private static Logger Log = LogManager.GetCurrentClassLogger();
|
||||
private bool autoApprove = false;
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<Version>0.9.2405.0919</Version>
|
||||
<Version>0.9.2406.1909</Version>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<UserSecretsId>aspnet-WebDoorCreator.UI-dfe95fed-1398-4144-bd43-8b3a765d6608</UserSecretsId>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -16,10 +16,13 @@
|
||||
"BaseUrl": "/UI"
|
||||
},
|
||||
"ServerConf": {
|
||||
"BasePathPdf": "U:\\WebDoorSync\\WdcPdf"
|
||||
//"BasePathPdf": "U:\\WebDoorSync\\WdcPdf",
|
||||
"BasePathPdf": "U:\\nextcloud.egalware\\ABH\\WdcPdf"
|
||||
},
|
||||
"CompoBaseDirs": {
|
||||
"CurrCompoDir": "U:\\WebDoorSync\\CurrentComp\\Compo",
|
||||
"NewCompoDir": "U:\\WebDoorSync\\NewComp\\Compo"
|
||||
//"CurrCompoDir": "U:\\WebDoorSync\\CurrentComp\\Compo",
|
||||
//"NewCompoDir": "U:\\WebDoorSync\\NewComp\\Compo",
|
||||
"CurrCompoDir": "U:\\nextcloud.egalware\\CalcData\\CurrentComp\\Compo",
|
||||
"NewCompoDir": "U:\\nextcloud.egalware\\CalcData\\NewComp\\Compo"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user