ok pulizia generale
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>WebDoorCreator - Egalware</i>
|
||||
<h4>Version: 0.9.2305.2319</h4>
|
||||
<h4>Version: 0.9.2305.2408</h4>
|
||||
<br /> Release note:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
0.9.2305.2319
|
||||
0.9.2305.2408
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>0.9.2305.2319</version>
|
||||
<version>0.9.2305.2408</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>
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
@if (isAdd)
|
||||
{
|
||||
<button class="btn btn-sm btn-success" @onclick="()=>addOrRemoveOneDoorNumber()"><i class="fa-solid fa-plus"></i> <i class="fa-solid fa-1"></i></button>
|
||||
}
|
||||
else
|
||||
{
|
||||
<button class="btn btn-sm btn-danger" @onclick="()=>addOrRemoveOneDoorNumber()"><i class="fa-solid fa-minus"></i> <i class="fa-solid fa-1"></i></button>
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
using Microsoft.JSInterop;
|
||||
using WebDoorCreator.Data.Services;
|
||||
using WebDoorCreator.UI.Data;
|
||||
|
||||
namespace WebDoorCreator.UI.Components.Buttons
|
||||
{
|
||||
public partial class ButtonAddRemDoor
|
||||
{
|
||||
[Inject]
|
||||
protected WebDoorCreatorService WDService { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected IJSRuntime JSRuntime { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected NavigationManager NavManager { get; set; } = null!;
|
||||
|
||||
[Parameter]
|
||||
public int DoorId { get; set; } = 0;
|
||||
[Parameter]
|
||||
public int OrderId { get; set; } = 0;
|
||||
|
||||
[Parameter]
|
||||
public bool isAdd { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<bool> E_isChange { get; set; }
|
||||
|
||||
protected bool doorChange { get; set; } = false;
|
||||
|
||||
protected async Task addOrRemoveOneDoorNumber()
|
||||
{
|
||||
#if false
|
||||
//var door = new DoorModel();
|
||||
doorChange = false;
|
||||
var done = await WDService.DoorModQty(OrderId, DoorId, isAdd);
|
||||
if (done)
|
||||
{
|
||||
doorChange = true;
|
||||
await E_isChange.InvokeAsync(doorChange);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,6 @@
|
||||
<button class="btn btn-secondary"><i class="fa-solid fa-rotate-right"></i></button>
|
||||
<button class="btn btn-secondary"><i class="fa-solid fa-cube"></i></button>
|
||||
}
|
||||
@*<button class="btn btn-success" @onclick="() => toOrderPage()">Return to Order <b>@idOrd</b></button>*@
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@@ -28,9 +28,7 @@ namespace WebDoorCreator.UI.Components.Buttons
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Public Methods
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
@@ -145,17 +143,6 @@ namespace WebDoorCreator.UI.Components.Buttons
|
||||
//change = paramsChanged;
|
||||
}
|
||||
|
||||
#if false
|
||||
protected async Task toOrderPage()
|
||||
{
|
||||
if (!await JSRuntime.InvokeAsync<bool>("confirm", $"Do you really want to return to the order page without saving current work?"))
|
||||
return;
|
||||
|
||||
await Task.Delay(1);
|
||||
NavManager.NavigateTo($"OrdersHomePage?idOrd={idOrd}");
|
||||
}
|
||||
#endif
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Private Methods
|
||||
|
||||
@@ -8,7 +8,6 @@ else
|
||||
<thead>
|
||||
<tr class="bg-dark text-light">
|
||||
<th>
|
||||
@*<button class="btn btn-success btn-sm" @onclick="() => toggleAddNew()"><i class="fas fa-plus"></i></button>*@
|
||||
</th>
|
||||
<th>Company</th>
|
||||
<th>VAT</th>
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using WebDoorCreator.Data.DbModels;
|
||||
using WebDoorCreator.Data.Services;
|
||||
using WebDoorCreator.UI.Data;
|
||||
|
||||
namespace WebDoorCreator.UI.Components.CompMan
|
||||
{
|
||||
@@ -9,12 +8,12 @@ namespace WebDoorCreator.UI.Components.CompMan
|
||||
{
|
||||
#region Protected Properties
|
||||
|
||||
[Inject]
|
||||
protected WebDoorCreatorService WDService { get; set; } = null!;
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<CompanyModel> E_currCompany { get; set; }
|
||||
|
||||
[Inject]
|
||||
protected WebDoorCreatorService WDService { get; set; } = null!;
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
@@ -34,6 +33,11 @@ namespace WebDoorCreator.UI.Components.CompMan
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private async Task editRec(CompanyModel currComp)
|
||||
{
|
||||
await E_currCompany.InvokeAsync(currComp);
|
||||
}
|
||||
|
||||
private async Task ReloadData()
|
||||
{
|
||||
ListRecords = null;
|
||||
@@ -43,11 +47,6 @@ namespace WebDoorCreator.UI.Components.CompMan
|
||||
await InvokeAsync(StateHasChanged);
|
||||
}
|
||||
|
||||
private async Task editRec(CompanyModel currComp)
|
||||
{
|
||||
await E_currCompany.InvokeAsync(currComp);
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using WebDoorCreator.Data.DbModels;
|
||||
using WebDoorCreator.Data.Services;
|
||||
using WebDoorCreator.UI.Data;
|
||||
|
||||
namespace WebDoorCreator.UI.Components.DoorDef
|
||||
{
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
}
|
||||
}
|
||||
</div>
|
||||
@*<hr />*@
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
@@ -51,6 +51,9 @@ namespace WebDoorCreator.UI.Components.DoorDef
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
[Parameter]
|
||||
public bool paramsChanged { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Lista delle conf assocaite alle BlockDoorOp
|
||||
/// </summary>
|
||||
@@ -60,19 +63,17 @@ namespace WebDoorCreator.UI.Components.DoorDef
|
||||
/// Lista delle BlockDoorOp da passare
|
||||
/// </summary>
|
||||
protected Dictionary<string, Dictionary<string, string>> bdoList { get; set; } = new Dictionary<string, Dictionary<string, string>>();
|
||||
|
||||
[Parameter]
|
||||
public bool paramsChanged { get; set; } = false;
|
||||
protected string userLang { get; set; } = "EN";
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected bool showCirc { get; set; } = false;
|
||||
|
||||
[Inject]
|
||||
protected WDCRefreshService WDCRService { get; set; } = null!;
|
||||
|
||||
|
||||
protected async Task doSaveBlock(Dictionary<string, Dictionary<string, string>> updSet)
|
||||
{
|
||||
await Task.Delay(1);
|
||||
@@ -101,9 +102,6 @@ namespace WebDoorCreator.UI.Components.DoorDef
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected bool showCirc { get; set; } = false;
|
||||
|
||||
protected Dictionary<string, List<string>> getParamsConfig(string paramName)
|
||||
{
|
||||
Dictionary<string, List<string>> answ = new Dictionary<string, List<string>>();
|
||||
|
||||
@@ -9,19 +9,15 @@
|
||||
<button class="btn btn-danger" @onclick="() => deleteRecord()">Delete Door <i class="fa-solid fa-trash"></i></button>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between">
|
||||
@*<div class="badge rounded-pilll bg-dark text-light">Insert Date</div>*@
|
||||
<div>Insert Date: <b>@currOrderStatus.DateIns</b></div>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between">
|
||||
@*<div class="badge rounded-pilll bg-dark text-light">Order External Code</div>*@
|
||||
<div>Order External Code: <b>@currOrderStatus.OrderExtCode</b></div>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between">
|
||||
@*<div class="badge rounded-pilll bg-dark text-light">Models Number</div>*@
|
||||
<div class="text-center">Models Number: <b>@currOrderStatus.NumType</b></div>
|
||||
</div>
|
||||
<div class="d-flex justify-content-between">
|
||||
@*<div class="badge rounded-pilll bg-dark text-light">Doors Number</div>*@
|
||||
<div class="text-center">Doors Number: <b>@currOrderStatus.NumDoors</b></div>
|
||||
</div>
|
||||
<div style="background: #AFCFD1; text-align: end">
|
||||
|
||||
@@ -2,7 +2,6 @@ using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.JSInterop;
|
||||
using WebDoorCreator.Data.DbModels;
|
||||
using WebDoorCreator.Data.Services;
|
||||
using WebDoorCreator.UI.Data;
|
||||
|
||||
namespace WebDoorCreator.UI.Components.DoorDef
|
||||
{
|
||||
@@ -13,12 +12,11 @@ namespace WebDoorCreator.UI.Components.DoorDef
|
||||
[Parameter]
|
||||
public string bgColor { get; set; } = "";
|
||||
|
||||
[CascadingParameter]
|
||||
public int idDoor { get; set; } = 0;
|
||||
|
||||
[Parameter]
|
||||
public OrderStatusViewModel? currOrderStatus { get; set; } = null;
|
||||
|
||||
[CascadingParameter]
|
||||
public int idDoor { get; set; } = 0;
|
||||
#endregion Public Properties
|
||||
|
||||
#region Protected Properties
|
||||
@@ -26,11 +24,11 @@ namespace WebDoorCreator.UI.Components.DoorDef
|
||||
[Inject]
|
||||
protected IJSRuntime JSRuntime { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected WebDoorCreatorService WDCService { get; set; } = null!;
|
||||
[Inject]
|
||||
protected NavigationManager NavManager { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected WebDoorCreatorService WDCService { get; set; } = null!;
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace WebDoorCreator.UI.Components.DoorDef
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
Dictionary<string, string> _currVal = new Dictionary<string, string>();
|
||||
private Dictionary<string, string> _currVal = new Dictionary<string, string>();
|
||||
|
||||
/// <summary>
|
||||
/// Array dati effettivo x gestione modifiche
|
||||
@@ -109,8 +109,6 @@ namespace WebDoorCreator.UI.Components.DoorDef
|
||||
return answ;
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected async Task doSave()
|
||||
{
|
||||
await Task.Delay(1);
|
||||
|
||||
@@ -1,26 +1,29 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.AspNetCore.Components.Server.ProtectedBrowserStorage;
|
||||
using WebDoorCreator.Data.DbModels;
|
||||
using WebDoorCreator.Data.Services;
|
||||
using WebDoorCreator.UI.Data;
|
||||
|
||||
namespace WebDoorCreator.UI.Components.DoorDef
|
||||
{
|
||||
public partial class DoorDefStepList
|
||||
{
|
||||
|
||||
[Inject]
|
||||
protected WebDoorCreatorService WDService { get; set; } = null!;
|
||||
|
||||
[Parameter]
|
||||
public int CurrDoorDefStatus { get; set; } = 10;
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<int> E_CurrStep { get; set; }
|
||||
|
||||
protected override async Task OnParametersSetAsync()
|
||||
protected string currColor { get; set; } = "";
|
||||
|
||||
protected List<ListValuesModel>? currListDoorDefStatus { get; set; } = null;
|
||||
|
||||
protected List<string> listBord01 { get; set; } = new();
|
||||
|
||||
[Inject]
|
||||
protected WebDoorCreatorService WDService { get; set; } = null!;
|
||||
protected async Task changeStep(int step)
|
||||
{
|
||||
await Task.Delay(1);
|
||||
await E_CurrStep.InvokeAsync(step);
|
||||
StateHasChanged();
|
||||
}
|
||||
|
||||
protected async Task doChangeStep(string actDoorDefStep)
|
||||
@@ -30,9 +33,6 @@ namespace WebDoorCreator.UI.Components.DoorDef
|
||||
//await E_StepChanged.InvokeAsync(actDoorDefStep);
|
||||
}
|
||||
|
||||
protected List<ListValuesModel>? currListDoorDefStatus { get; set; } = null;
|
||||
protected string currColor { get; set; } = "";
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
await Task.Delay(1);
|
||||
@@ -44,7 +44,6 @@ namespace WebDoorCreator.UI.Components.DoorDef
|
||||
if (stat2Display != null)
|
||||
{
|
||||
currColor = stat2Display.DefaultVal;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,13 +54,9 @@ namespace WebDoorCreator.UI.Components.DoorDef
|
||||
listBord01.Add("White");
|
||||
}
|
||||
|
||||
protected List<string> listBord01 { get; set; } = new();
|
||||
|
||||
protected async Task changeStep(int step)
|
||||
protected override async Task OnParametersSetAsync()
|
||||
{
|
||||
await E_CurrStep.InvokeAsync(step);
|
||||
StateHasChanged();
|
||||
await Task.Delay(1);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -7,7 +7,7 @@ using WebDoorCreator.Data.DbModels;
|
||||
using WebDoorCreator.Data.Services;
|
||||
using WebDoorCreator.UI.Data;
|
||||
|
||||
namespace WebDoorCreator.UI.Pages
|
||||
namespace WebDoorCreator.UI.Components.DoorDef
|
||||
{
|
||||
public partial class DoorDefinition : IDisposable
|
||||
{
|
||||
@@ -1,10 +1,7 @@
|
||||
@*<div class="" style="height:100%; width:100%; position:sticky; background: linear-gradient(#AFCFD1, #92B2C4);min-height: 55rem;max-height: 55rem;">*@
|
||||
|
||||
<div class="" style="height:100%; width:100%; background: linear-gradient(#AFCFD1, #92B2C4);min-height: 50rem;">
|
||||
<div class="" style="height:100%; width:100%; background: linear-gradient(#AFCFD1, #92B2C4);min-height: 50rem;">
|
||||
<ButtonsDoorDef></ButtonsDoorDef>
|
||||
@if (!string.IsNullOrEmpty(@SvgContent))
|
||||
{
|
||||
@*<div style="height: 0;width: 15rem;align-items: center;display: flex;flex-wrap: wrap;justify-content: center;">*@
|
||||
<div style="align-items: center;display: flex;flex-wrap: wrap;justify-content: center;">
|
||||
<div style="width: @doorW; max-height: 30rem;">
|
||||
@svgPreview
|
||||
|
||||
@@ -7,6 +7,11 @@ namespace WebDoorCreator.UI.Components.DoorDef
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
private static Logger Log = LogManager.GetCurrentClassLogger();
|
||||
|
||||
[Parameter]
|
||||
public string doorW { get; set; } = "";
|
||||
|
||||
[Parameter]
|
||||
public string SvgContent
|
||||
{
|
||||
@@ -16,13 +21,8 @@ namespace WebDoorCreator.UI.Components.DoorDef
|
||||
_svgContent = value;
|
||||
}
|
||||
}
|
||||
|
||||
[Parameter]
|
||||
public string doorW { get; set; } = "";
|
||||
|
||||
private static Logger Log = LogManager.GetCurrentClassLogger();
|
||||
|
||||
protected string _svgContent { get; set; } = "";
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
<HwSvgObj LineColor="#CFD8DC" LineWidth="8" ObjH="200" ObjW="700" EC_ExeFunct="@(()=> createDoor(""))" ObjId="-1" ItemName="Add new door" ItemCount="0" ShowPlus="true" ImagePath="images/icons/PlusWhite.svg"></HwSvgObj>
|
||||
</div>
|
||||
<div class=" py-1">
|
||||
@*<HwSvgObj LineColor="#CFD8DC" LineWidth="8" ObjH="200" ObjW="700" ObjId="-2" ItemName="Add from template" ItemCount="0" ShowPlus="true" ImagePath="images/icons/clipboard-regular.svg"></HwSvgObj>*@
|
||||
<HwSvgObj LineColor="#CFD8DC" LineWidth="8" ObjH="200" ObjW="700" ObjId="-2" ItemName="Calculate total cost" ItemCount="0" ShowPlus="true" ImagePath="images/icons/calculator-solid.svg"></HwSvgObj>
|
||||
</div>
|
||||
<div class=" py-1">
|
||||
@@ -33,9 +32,4 @@
|
||||
}
|
||||
}
|
||||
</div>
|
||||
|
||||
@*@if (currDoor != null)
|
||||
{
|
||||
<DoorModal CurrDoor="@currDoor"></DoorModal>
|
||||
}*@
|
||||
}
|
||||
@@ -17,16 +17,17 @@ namespace WebDoorCreator.UI.Components.DoorMan
|
||||
[Parameter]
|
||||
public int currOrderId { get; set; } = 0;
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<DoorModel> E_CurrDoor { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<DoorModel> E_CurrDoorModal { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<bool> E_DoorChanged { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<int> updateRecordCount { get; set; }
|
||||
[Parameter]
|
||||
public EventCallback<DoorModel> E_CurrDoor { get; set; }
|
||||
[Parameter]
|
||||
public EventCallback<DoorModel> E_CurrDoorModal { get; set; }
|
||||
|
||||
public string userId
|
||||
{
|
||||
get
|
||||
@@ -73,6 +74,7 @@ namespace WebDoorCreator.UI.Components.DoorMan
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected DoorModel? currDoor { get; set; } = null;
|
||||
|
||||
protected async Task catchDoorChange(bool isChanged)
|
||||
{
|
||||
@@ -94,9 +96,6 @@ namespace WebDoorCreator.UI.Components.DoorMan
|
||||
await InvokeAsync(StateHasChanged);
|
||||
await E_CurrDoor.InvokeAsync(door);
|
||||
}
|
||||
|
||||
// rimando alla pagina... dettaglio...
|
||||
//NavManager.NavigateTo($"DoorDefinition?idOrd={currOrderId}&idDoor={doorId}");
|
||||
}
|
||||
|
||||
protected async Task deleteRecord(DoorModel currRec)
|
||||
@@ -170,7 +169,6 @@ namespace WebDoorCreator.UI.Components.DoorMan
|
||||
await E_CurrDoor.InvokeAsync(door);
|
||||
}
|
||||
}
|
||||
//NavManager.NavigateTo($"DoorDefinition?idOrd={currOrderId}&idDoor={doorId}");
|
||||
}
|
||||
|
||||
protected async Task ExecDoorReq(DoorSvgObj.DoorAct currAct)
|
||||
@@ -182,40 +180,26 @@ namespace WebDoorCreator.UI.Components.DoorMan
|
||||
// TODO
|
||||
//await removeOneDoorNumber("", "");
|
||||
break;
|
||||
|
||||
case DoorSvgObj.ActionReq.Plus:
|
||||
// TODO
|
||||
//await addOneDoorNumber("", "");
|
||||
break;
|
||||
|
||||
case DoorSvgObj.ActionReq.ReqOptions:
|
||||
// TODO
|
||||
// aprire la modale di editing...
|
||||
await setModalShow(currAct.DoorId);
|
||||
break;
|
||||
|
||||
case DoorSvgObj.ActionReq.Select:
|
||||
await editRec(currAct.DoorId);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
protected DoorModel? currDoor { get; set; } = null;
|
||||
|
||||
protected async Task setModalShow(int doorId)
|
||||
{
|
||||
await Task.Delay(1);
|
||||
|
||||
if (DoorsList != null)
|
||||
{
|
||||
var door = DoorsList.Where(x => x.DoorId == doorId).FirstOrDefault();
|
||||
if (door != null)
|
||||
{
|
||||
//currDoor = door;
|
||||
await E_CurrDoorModal.InvokeAsync(door);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected async Task getBackStatus()
|
||||
{
|
||||
await Task.Delay(1);
|
||||
@@ -279,12 +263,10 @@ namespace WebDoorCreator.UI.Components.DoorMan
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected async void sendToCompany(int ordId, int orderStat)
|
||||
{
|
||||
if (orderStat == 10)
|
||||
{
|
||||
//int doorId = await WDService.createDoor(currOrderId, userId, "mm");
|
||||
bool done = await WDService.OrderUpdate(ordId, 20);
|
||||
if (done)
|
||||
{
|
||||
@@ -295,8 +277,20 @@ namespace WebDoorCreator.UI.Components.DoorMan
|
||||
await ReloadData();
|
||||
}
|
||||
|
||||
protected async Task setModalShow(int doorId)
|
||||
{
|
||||
await Task.Delay(1);
|
||||
|
||||
|
||||
if (DoorsList != null)
|
||||
{
|
||||
var door = DoorsList.Where(x => x.DoorId == doorId).FirstOrDefault();
|
||||
if (door != null)
|
||||
{
|
||||
//currDoor = door;
|
||||
await E_CurrDoorModal.InvokeAsync(door);
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Prepara il dictionary dei testi da riportare nell'oggetto ordine
|
||||
/// </summary>
|
||||
|
||||
@@ -37,11 +37,6 @@
|
||||
<button class="btn btn-primary w-100" type="button" @onclick="()=>doClone()">Clone door</button>
|
||||
</div>
|
||||
</div>
|
||||
@*<div class="pb-1">
|
||||
<div class="input-group mb-3">
|
||||
<button class="btn btn-info w-100" type="button">Save as template</button>
|
||||
</div>
|
||||
</div>*@
|
||||
<div class="pb-1">
|
||||
<div class="input-group mb-3">
|
||||
<button class="btn btn-danger w-100" type="button" @onclick="()=>deleteRecord()">Delete door</button>
|
||||
@@ -51,7 +46,6 @@
|
||||
|
||||
</div>
|
||||
<div class="w-75">
|
||||
@*<DoorPreview doorW="45%" SvgContent="@DoorSvgContent"></DoorPreview>*@
|
||||
<div class="doorSvgCont" style="height:100%; width:100%; background: linear-gradient(#AFCFD1, #92B2C4);min-height: 50rem;">
|
||||
<div style="align-items: center;display: flex;flex-wrap: wrap;justify-content: center;">
|
||||
<div style="width: 45%; max-height: 30rem;">
|
||||
|
||||
@@ -1,84 +1,64 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.CodeAnalysis.Text;
|
||||
using Microsoft.JSInterop;
|
||||
using WebDoorCreator.Data;
|
||||
using WebDoorCreator.Data.DbModels;
|
||||
using WebDoorCreator.Data.DTO;
|
||||
using WebDoorCreator.Data.Services;
|
||||
using WebDoorCreator.UI.Data;
|
||||
using static Org.BouncyCastle.Math.EC.ECCurve;
|
||||
using static System.Runtime.CompilerServices.RuntimeHelpers;
|
||||
|
||||
namespace WebDoorCreator.UI.Components.DoorMan
|
||||
{
|
||||
public partial class DoorModal
|
||||
{
|
||||
protected List<DoorOpModel> doorOps2Add = new List<DoorOpModel>();
|
||||
|
||||
public DoorModel CurrDoor { get; set; } = new DoorModel();
|
||||
|
||||
public DoorModel CurrDoorClone { get; set; } = new DoorModel();
|
||||
|
||||
[Parameter]
|
||||
public int CurrDoorId { get; set; } = 0;
|
||||
[Parameter]
|
||||
public int OrderId { get; set; } = 0;
|
||||
[Parameter]
|
||||
public string userId { get; set; } = "";
|
||||
public DoorModel CurrDoorClone { get; set; } = new DoorModel();
|
||||
public DoorModel CurrDoor { get; set; } = new DoorModel();
|
||||
|
||||
public List<DoorModel> DoorsList { get; set; } = new List<DoorModel>();
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<DoorModel> E_DoorClose { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<bool> E_isChange { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public int OrderId { get; set; } = 0;
|
||||
|
||||
[Parameter]
|
||||
public string userId { get; set; } = "";
|
||||
[Inject]
|
||||
protected WebDoorCreatorService WDService { get; set; } = null!;
|
||||
protected IConfiguration config { get; set; } = null!;
|
||||
|
||||
protected WebDoorCreator.Data.DDF.Converter currDdfConv { get; set; } = null!;
|
||||
|
||||
protected DDFDto CurrentConf { get; set; } = new DDFDto();
|
||||
|
||||
protected int doorQty
|
||||
{
|
||||
get => CurrDoor.Quantity;
|
||||
set => CurrDoor.Quantity = value;
|
||||
}
|
||||
|
||||
protected string DoorSvgContent { get; set; } = "";
|
||||
|
||||
protected async override Task OnInitializedAsync()
|
||||
{
|
||||
await Task.Delay(1);
|
||||
string vers = config.GetValue<string>("ConfDDF:VersNumber");
|
||||
bool remDoorOp = config.GetValue<bool>("ConfDDF:RemoveDoorOps");
|
||||
var headRows = config.GetSection("ConfDDF:Header").Get<List<string>>();
|
||||
var footRows = config.GetSection("ConfDDF:Footer").Get<List<string>>();
|
||||
currDdfConv = new WebDoorCreator.Data.DDF.Converter(vers, remDoorOp, headRows, footRows);
|
||||
}
|
||||
protected WebDoorCreator.Data.DDF.Converter currDdfConv { get; set; } = null!;
|
||||
protected bool IsErr { get; set; } = false;
|
||||
|
||||
[Inject]
|
||||
protected IConfiguration config { get; set; } = null!;
|
||||
protected DDFDto CurrentConf { get; set; } = new DDFDto();
|
||||
protected async Task closeModal()
|
||||
{
|
||||
await Task.Delay(1);
|
||||
var fakeDoor = new DoorModel();
|
||||
protected IJSRuntime JSRuntime { get; set; } = null!;
|
||||
|
||||
await E_DoorClose.InvokeAsync(fakeDoor);
|
||||
}
|
||||
protected int newDoorId { get; set; } = 0;
|
||||
|
||||
protected override async Task OnParametersSetAsync()
|
||||
{
|
||||
await Task.Delay(1);
|
||||
await ReloadData();
|
||||
}
|
||||
protected List<string> ordListVal { get; set; } = new List<string>();
|
||||
|
||||
protected async Task ReloadData()
|
||||
{
|
||||
var SearchRecords = await WDService.DoorGetByOrderId(OrderId);
|
||||
if (SearchRecords != null)
|
||||
{
|
||||
DoorsList = SearchRecords;
|
||||
|
||||
if (DoorsList != null)
|
||||
{
|
||||
var door = DoorsList.Where(x => x.DoorId == CurrDoorId).FirstOrDefault();
|
||||
if (door != null)
|
||||
{
|
||||
CurrDoor = door;
|
||||
}
|
||||
}
|
||||
}
|
||||
CurrDoorClone = CurrDoor.ObjClone("");
|
||||
}
|
||||
[Inject]
|
||||
protected QueueDataService QDataServ { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected WebDoorCreatorService WDService { get; set; } = null!;
|
||||
protected async Task addOrRemoveOneDoorNumber(bool isAdd)
|
||||
{
|
||||
//var door = new DoorModel();
|
||||
@@ -89,18 +69,42 @@ namespace WebDoorCreator.UI.Components.DoorMan
|
||||
await ReloadData();
|
||||
}
|
||||
}
|
||||
|
||||
protected async Task ChangeDoorNumber(bool isAdd)
|
||||
{
|
||||
//var door = new DoorModel();
|
||||
var done = await WDService.DoorModQty(doorQty, CurrDoor.OrderId, CurrDoor.DoorId, isAdd);
|
||||
if (done)
|
||||
{
|
||||
//await E_isChange.InvokeAsync(true);
|
||||
await ReloadData();
|
||||
}
|
||||
}
|
||||
|
||||
protected int newDoorId { get; set; } = 0;
|
||||
protected async Task closeModal()
|
||||
{
|
||||
await Task.Delay(1);
|
||||
var fakeDoor = new DoorModel();
|
||||
|
||||
await E_DoorClose.InvokeAsync(fakeDoor);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Elimina porta se richiesto
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
protected async Task deleteRecord()
|
||||
{
|
||||
if (!await JSRuntime.InvokeAsync<bool>("confirm", $"Do you really want to delete this door?"))
|
||||
return;
|
||||
await Task.Delay(1);
|
||||
if (CurrDoor != null)
|
||||
{
|
||||
var done = await WDService.DoorDelete(CurrDoor);
|
||||
if (done)
|
||||
{
|
||||
await closeModal();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clona la porta selezionata con annesse door operations
|
||||
@@ -140,8 +144,6 @@ namespace WebDoorCreator.UI.Components.DoorMan
|
||||
}
|
||||
}
|
||||
|
||||
protected List<string> ordListVal { get; set; } = new List<string>();
|
||||
|
||||
/// <summary>
|
||||
/// Effettua salvataggio record e generazione DDF
|
||||
/// </summary>
|
||||
@@ -169,7 +171,6 @@ namespace WebDoorCreator.UI.Components.DoorMan
|
||||
|
||||
string currDdf = currDdfConv.GetSerialized(listOp);
|
||||
// FIXME TODO: si potrebbe eliminare in futuro che va su REDIS
|
||||
//await SaveYaml(currDdf);
|
||||
// versione corrente del DDF generato
|
||||
int currVers = await QDataServ.SendCalcReq(newDoorId, currDdf);
|
||||
|
||||
@@ -181,50 +182,38 @@ namespace WebDoorCreator.UI.Components.DoorMan
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Path del servizio di recupero SVG delle porte
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
#if false
|
||||
protected string DoorSvgUrl()
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
return $"api/DoorImage/GetImage.svg?DoorId={CurrDoorId}";
|
||||
}
|
||||
#endif
|
||||
|
||||
[Inject]
|
||||
protected QueueDataService QDataServ { get; set; } = null!;
|
||||
|
||||
protected bool IsErr { get; set; } = false;
|
||||
|
||||
protected List<DoorOpModel> doorOps2Add = new List<DoorOpModel>();
|
||||
protected int doorQty
|
||||
await Task.Delay(1);
|
||||
string vers = config.GetValue<string>("ConfDDF:VersNumber");
|
||||
bool remDoorOp = config.GetValue<bool>("ConfDDF:RemoveDoorOps");
|
||||
var headRows = config.GetSection("ConfDDF:Header").Get<List<string>>();
|
||||
var footRows = config.GetSection("ConfDDF:Footer").Get<List<string>>();
|
||||
currDdfConv = new WebDoorCreator.Data.DDF.Converter(vers, remDoorOp, headRows, footRows);
|
||||
}
|
||||
protected override async Task OnParametersSetAsync()
|
||||
{
|
||||
get => CurrDoor.Quantity;
|
||||
set => CurrDoor.Quantity = value;
|
||||
await Task.Delay(1);
|
||||
await ReloadData();
|
||||
}
|
||||
|
||||
[Inject]
|
||||
protected IJSRuntime JSRuntime { get; set; } = null!;
|
||||
/// <summary>
|
||||
/// Elimina porta se richiesto
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
protected async Task deleteRecord()
|
||||
protected async Task ReloadData()
|
||||
{
|
||||
if (!await JSRuntime.InvokeAsync<bool>("confirm", $"Do you really want to delete this door?"))
|
||||
return;
|
||||
await Task.Delay(1);
|
||||
if (CurrDoor != null)
|
||||
var SearchRecords = await WDService.DoorGetByOrderId(OrderId);
|
||||
if (SearchRecords != null)
|
||||
{
|
||||
var done = await WDService.DoorDelete(CurrDoor);
|
||||
if (done)
|
||||
DoorsList = SearchRecords;
|
||||
|
||||
if (DoorsList != null)
|
||||
{
|
||||
await closeModal();
|
||||
var door = DoorsList.Where(x => x.DoorId == CurrDoorId).FirstOrDefault();
|
||||
if (door != null)
|
||||
{
|
||||
CurrDoor = door;
|
||||
}
|
||||
}
|
||||
}
|
||||
CurrDoorClone = CurrDoor.ObjClone("");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -28,7 +28,6 @@
|
||||
}
|
||||
}
|
||||
</select>
|
||||
@*<input id="orderStatus" @bind="@orderStatus" class="form-control" />*@
|
||||
<label for="orderStatus">Order Status</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -7,40 +7,16 @@ namespace WebDoorCreator.UI.Components.Filters
|
||||
{
|
||||
public partial class OrderFilter
|
||||
{
|
||||
[Parameter]
|
||||
public EventCallback<OrderSelectFilter> FilterUpdated { get; set; }
|
||||
private List<ListValuesModel>? ListValuesAll = null;
|
||||
|
||||
[Parameter]
|
||||
public OrderSelectFilter actFilter { get; set; } = new OrderSelectFilter();
|
||||
private List<ListValuesModel>? ListValuesAll = null;
|
||||
protected override async Task OnParametersSetAsync()
|
||||
{
|
||||
ListValuesAll = await WDService.ListValuesGetAll("All", "OrderStep");
|
||||
}
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<OrderSelectFilter> FilterUpdated { get; set; }
|
||||
[Inject]
|
||||
protected WebDoorCreatorService WDService { get; set; } = null!;
|
||||
private string searchVal
|
||||
{
|
||||
get => actFilter.searchValue;
|
||||
set
|
||||
{
|
||||
actFilter.CurrPage = 1;
|
||||
actFilter.searchValue = value;
|
||||
StateHasChanged();
|
||||
ReportChange();
|
||||
}
|
||||
}
|
||||
private int orderStatus
|
||||
{
|
||||
get => actFilter.OrderStatus;
|
||||
set
|
||||
{
|
||||
actFilter.CurrPage = 1;
|
||||
actFilter.OrderStatus = value;
|
||||
StateHasChanged();
|
||||
ReportChange();
|
||||
}
|
||||
}
|
||||
|
||||
private DateTime dateFrom
|
||||
{
|
||||
get => actFilter.DateFrom;
|
||||
@@ -52,6 +28,7 @@ namespace WebDoorCreator.UI.Components.Filters
|
||||
ReportChange();
|
||||
}
|
||||
}
|
||||
|
||||
private DateTime dateTo
|
||||
{
|
||||
get => actFilter.DateTo;
|
||||
@@ -64,7 +41,34 @@ namespace WebDoorCreator.UI.Components.Filters
|
||||
}
|
||||
}
|
||||
|
||||
private int orderStatus
|
||||
{
|
||||
get => actFilter.OrderStatus;
|
||||
set
|
||||
{
|
||||
actFilter.CurrPage = 1;
|
||||
actFilter.OrderStatus = value;
|
||||
StateHasChanged();
|
||||
ReportChange();
|
||||
}
|
||||
}
|
||||
|
||||
private string searchVal
|
||||
{
|
||||
get => actFilter.searchValue;
|
||||
set
|
||||
{
|
||||
actFilter.CurrPage = 1;
|
||||
actFilter.searchValue = value;
|
||||
StateHasChanged();
|
||||
ReportChange();
|
||||
}
|
||||
}
|
||||
|
||||
protected override async Task OnParametersSetAsync()
|
||||
{
|
||||
ListValuesAll = await WDService.ListValuesGetAll("All", "OrderStep");
|
||||
}
|
||||
private void ReportChange()
|
||||
{
|
||||
FilterUpdated.InvokeAsync(actFilter);
|
||||
|
||||
@@ -32,12 +32,6 @@
|
||||
</Authorized>
|
||||
</AuthorizeView>
|
||||
</div>
|
||||
|
||||
@*<div class="nav-item px-3 d-flex flex-warp align-items-center">
|
||||
<NavLink class="nav-link" href="DoorDefinition">
|
||||
<span class="bi bi-door-open-fill pe-3" aria-hidden="true"></span> Door definition page
|
||||
</NavLink>
|
||||
</div>*@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -100,41 +94,6 @@
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@*<div class="d-flex justify-content-between small">
|
||||
<div class="d-flex justify-content-between">
|
||||
<a href="Identity/Account/Manage" class="text-decoration-none text-dark" style="">@context.User.Identity?.Name</a>
|
||||
<div class="text-decoration-none text-secondary small" style="">
|
||||
@if (listCompanies != null)
|
||||
{
|
||||
@if (listCompanies.Count > 1)
|
||||
{
|
||||
<select @bind="userCurrCompany" class="form-select form-select-sm">
|
||||
@foreach (var item in listCompanies)
|
||||
{
|
||||
<option value="@item.CompanyId">@item.CompanyName</option>
|
||||
}
|
||||
</select>
|
||||
}
|
||||
else
|
||||
{
|
||||
@if (compToShow != null)
|
||||
{
|
||||
<div>@compToShow.CompanyName</div>
|
||||
}
|
||||
}
|
||||
}
|
||||
</div>
|
||||
<div>
|
||||
<select @bind="userLang" class="form-select form-select-sm">
|
||||
<option>EN</option>
|
||||
<option>IT</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<form method="post" action="Identity/Account/LogOut">
|
||||
<button type="submit" class="btnLogout">Log out</button>
|
||||
</form>
|
||||
</div>*@
|
||||
</div>
|
||||
</nav>
|
||||
</Authorized>
|
||||
|
||||
@@ -8,7 +8,6 @@ else
|
||||
<div style="width: 90%" class="me-2">
|
||||
<div class="btnHead d-flex justify-content-between">
|
||||
<div class="testata">
|
||||
@*<div class="borderTop"></div>*@
|
||||
<div class="row borderTop">
|
||||
<div class="fs-3 text-end col-8">
|
||||
@($"{translate(DoorOpInst.ObjectId)} #{instanceN}")
|
||||
@@ -155,11 +154,6 @@ else
|
||||
</div>
|
||||
</div>
|
||||
<div class="row borderBottom">
|
||||
@*<div class="col-10">
|
||||
<button class="btn btn-outline-dark" style="cursor: pointer;" @onclick="()=>doConfirm()">
|
||||
CONFIRM
|
||||
</button>
|
||||
</div>*@
|
||||
<div class="text-end col-2">
|
||||
<NavLink href="@pathFinder(DoorOpInst.DoorOpId)" target="_blank">
|
||||
<button class="btnPDFPending">
|
||||
|
||||
@@ -1,12 +1,9 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.CodeAnalysis.CSharp.Syntax;
|
||||
using Microsoft.JSInterop;
|
||||
using Newtonsoft.Json;
|
||||
using System.Security.Policy;
|
||||
using WebDoorCreator.Data.DbModels;
|
||||
using WebDoorCreator.Data.Services;
|
||||
using WebDoorCreator.UI.Data;
|
||||
using static WebDoorCreator.UI.Data.WDCRefreshService;
|
||||
|
||||
namespace WebDoorCreator.UI.Components.Hardware
|
||||
{
|
||||
@@ -17,11 +14,11 @@ namespace WebDoorCreator.UI.Components.Hardware
|
||||
[Parameter]
|
||||
public DoorOpModel DoorOpInst { get; set; } = null!;
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<DoorOpModel> E_recordUpdate { get; set; }
|
||||
[Parameter]
|
||||
public EventCallback<bool> E_act2Rel { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<DoorOpModel> E_recordUpdate { get; set; }
|
||||
[Parameter]
|
||||
public string HwCode { get; set; } = "";
|
||||
|
||||
@@ -36,11 +33,8 @@ namespace WebDoorCreator.UI.Components.Hardware
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Public Methods
|
||||
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
protected Dictionary<string, string> _currVal { get; set; } = new Dictionary<string, string>();
|
||||
@@ -60,6 +54,7 @@ namespace WebDoorCreator.UI.Components.Hardware
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected string folderName
|
||||
{
|
||||
get => currVal != null ? tryGetCurrVal("Folder") : "";
|
||||
@@ -93,7 +88,6 @@ namespace WebDoorCreator.UI.Components.Hardware
|
||||
|
||||
protected string templateName
|
||||
{
|
||||
/*currVal != null ? tryGetCurrVal("template") : tryGetCurrVal("shape");*/
|
||||
get
|
||||
{
|
||||
string answ = "";
|
||||
@@ -208,6 +202,7 @@ namespace WebDoorCreator.UI.Components.Hardware
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
protected bool isCombo(string pKey)
|
||||
{
|
||||
bool answ = false;
|
||||
@@ -223,7 +218,6 @@ namespace WebDoorCreator.UI.Components.Hardware
|
||||
await FullReloadData();
|
||||
}
|
||||
|
||||
|
||||
protected string translate(string lemma)
|
||||
{
|
||||
string answ = "";
|
||||
@@ -253,15 +247,14 @@ namespace WebDoorCreator.UI.Components.Hardware
|
||||
|
||||
#region Private Methods
|
||||
|
||||
protected string currTempOrSh { get; set; } = "";
|
||||
|
||||
private async Task FullReloadData()
|
||||
{
|
||||
currVal = DoorOpInst.CurrVals;
|
||||
graphicParams = DoorOpInst.GraphicParams;
|
||||
await SetSelectedData();
|
||||
}
|
||||
|
||||
protected string currTempOrSh { get; set; } = "";
|
||||
|
||||
private async Task SetSelectedData()
|
||||
{
|
||||
isLoading = true;
|
||||
@@ -296,7 +289,6 @@ namespace WebDoorCreator.UI.Components.Hardware
|
||||
}
|
||||
try
|
||||
{
|
||||
|
||||
if (listValuesFiles != null && listValuesFiles.Count > 0)
|
||||
{
|
||||
currTempOrSh = listValuesFiles.FirstOrDefault()?.FieldName!;
|
||||
|
||||
@@ -4,94 +4,43 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
@*<div>
|
||||
COORDS:
|
||||
X=@screenX
|
||||
Y=@screenY
|
||||
<br />
|
||||
SIZE:
|
||||
HEIGHT: @Height
|
||||
WIDTH: @Width
|
||||
</div>*@
|
||||
|
||||
|
||||
@if (Ord2Show == null)
|
||||
{
|
||||
<table>
|
||||
<thead>
|
||||
<tr class="">
|
||||
<td></td>
|
||||
<th>Order Date <Sorter ParamName="OrderDate" IsAsc="@sortAsc" CurrParam="@sortField" sortReq="SortRequested"></Sorter></th>
|
||||
<th>Order Number <Sorter ParamName="OrderNumber" IsAsc="@sortAsc" CurrParam="@sortField" sortReq="SortRequested"></Sorter></th>
|
||||
<th>Order Description</th>
|
||||
<th class="text-end">Quantity</th>
|
||||
<th class="text-end">Model Number</th>
|
||||
<th class="text-end">Order Status</th>
|
||||
<th class="text-end">TOTAL COST</th>
|
||||
@*<th>PROGRESS</th>*@
|
||||
<th class="text-end"></th>
|
||||
<table>
|
||||
<thead>
|
||||
<tr class="">
|
||||
<td></td>
|
||||
<th>Order Date <Sorter ParamName="OrderDate" IsAsc="@sortAsc" CurrParam="@sortField" sortReq="SortRequested"></Sorter></th>
|
||||
<th>Order Number <Sorter ParamName="OrderNumber" IsAsc="@sortAsc" CurrParam="@sortField" sortReq="SortRequested"></Sorter></th>
|
||||
<th>Order Description</th>
|
||||
<th class="text-end">Quantity</th>
|
||||
<th class="text-end">Model Number</th>
|
||||
<th class="text-end">Order Status</th>
|
||||
<th class="text-end">TOTAL COST</th>
|
||||
<th class="text-end"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var item in ListOrdersStatus)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
<button class="btn btn-sm btn-primary" @onclick="()=>setOrd2Show(item.OrderId)" title="Order detail"><i class="fa-solid fa-magnifying-glass"></i></button>
|
||||
<a class="btn btn-sm btn-info" target="_blank" href="@reportUrl(item.OrderId)" title="Download pdf report"><i class="fa-regular fa-file-pdf"></i></a>
|
||||
</td>
|
||||
<td>@item.DateIns</td>
|
||||
<td>@item.OrderExtCode</td>
|
||||
<td>@item.OrderDescript</td>
|
||||
<td class="text-end">@item.NumDoors</td>
|
||||
<td class="text-end">@item.NumType</td>
|
||||
<td class="text-end">@getOrderStatusLabel(item.OrderStatus)</td>
|
||||
<td class="text-end">@($"{item.TotCost:C2}")</td>
|
||||
<td class="text-end">
|
||||
@if (item.OrderStatus <= 10)
|
||||
{
|
||||
<button class="btn btn-sm btn-danger" @onclick="() => deleteRecord(item)"><i class="fa-solid fa-trash-can"></i></button>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var item in ListOrdersStatus)
|
||||
{
|
||||
@*<tr id="@item.OrderId" @onclick="getElementCoords">*@
|
||||
<tr>
|
||||
@*<a class="btn btn-sm btn-warning" href="OrderDetails?idOrd=@item.OrderId&orderStat=@item.OrderStatus" target="_blank"><i class="fa-solid fa-pen-to-square"></i></a>*@
|
||||
<td>
|
||||
<button class="btn btn-sm btn-primary" @onclick="()=>setOrd2Show(item.OrderId)" title="Order detail"><i class="fa-solid fa-magnifying-glass"></i></button>
|
||||
<a class="btn btn-sm btn-info" target="_blank" href="@reportUrl(item.OrderId)" title="Download pdf report"><i class="fa-regular fa-file-pdf"></i></a>
|
||||
</td>
|
||||
<td>@item.DateIns</td>
|
||||
<td>@item.OrderExtCode</td>
|
||||
<td>@item.OrderDescript</td>
|
||||
<td class="text-end">@item.NumDoors</td>
|
||||
<td class="text-end">@item.NumType</td>
|
||||
<td class="text-end">@getOrderStatusLabel(item.OrderStatus)</td>
|
||||
<td class="text-end">@($"{item.TotCost:C2}")</td>
|
||||
@*<td>
|
||||
<div class="progress">
|
||||
<div class="progress-bar" role="progressbar" aria-label="Basic example" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: calc(20%item.OrderStatus); background-color: @setPgColor(item.OrderStatus)"></div>
|
||||
</div>
|
||||
</td>*@
|
||||
<td class="text-end">
|
||||
@if (item.OrderStatus <= 10)
|
||||
{
|
||||
<button class="btn btn-sm btn-danger" @onclick="() => deleteRecord(item)"><i class="fa-solid fa-trash-can"></i></button>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
}
|
||||
else
|
||||
{
|
||||
@*<tr class="slideUp" style="--elFirstY: @($"{(Height) + screenY}px")">*@
|
||||
@*<a class="btn btn-sm btn-warning" href="OrderDetails?idOrd=@item.OrderId&orderStat=@item.OrderStatus" target="_blank"><i class="fa-solid fa-pen-to-square"></i></a>*@
|
||||
@*<tr>
|
||||
<td><a class="btn btn-sm btn-warning"><i class="fa-solid fa-pen-to-square"></i></a></td>
|
||||
<td>@Ord2Show.DateIns</td>
|
||||
<td>@Ord2Show.OrderExtCode</td>
|
||||
<td>@Ord2Show.OrderDescript</td>
|
||||
<td class="text-end">@Ord2Show.NumDoors</td>
|
||||
<td class="text-end">@Ord2Show.NumType</td>
|
||||
<td class="text-end">@getOrderStatusLabel(Ord2Show.OrderStatus)</td>
|
||||
<td class="text-end">@($"{Ord2Show.TotCost:C2}")</td>
|
||||
<td>
|
||||
<div class="progress">
|
||||
<div class="progress-bar" role="progressbar" aria-label="Basic example" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: calc(20%item.OrderStatus); background-color: @setPgColor(item.OrderStatus)"></div>
|
||||
</div>
|
||||
</td>
|
||||
<td class="text-end">
|
||||
@if (Ord2Show.OrderStatus <= 10)
|
||||
{
|
||||
<button class="btn btn-sm btn-danger" @onclick="() => deleteRecord(Ord2Show)"><i class="fa-solid fa-trash-can"></i></button>
|
||||
}
|
||||
</td>
|
||||
</tr>*@
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
}
|
||||
|
||||
@@ -1,18 +1,11 @@
|
||||
using EgwCoreLib.Razor;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.AspNetCore.Components.Authorization;
|
||||
using Microsoft.AspNetCore.Components.Web;
|
||||
using Microsoft.AspNetCore.DataProtection;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
using Microsoft.AspNetCore.WebUtilities;
|
||||
using Microsoft.Build.Framework;
|
||||
using Microsoft.JSInterop;
|
||||
using NLog.LayoutRenderers;
|
||||
using System.Linq;
|
||||
using WebDoorCreator.Data.DbModels;
|
||||
using WebDoorCreator.Data.Services;
|
||||
using WebDoorCreator.UI.Data;
|
||||
using static Microsoft.AspNetCore.Razor.Language.TagHelperMetadata;
|
||||
using static WebDoorCreator.Core.Enum;
|
||||
|
||||
namespace WebDoorCreator.UI.Components.Order
|
||||
@@ -21,11 +14,17 @@ namespace WebDoorCreator.UI.Components.Order
|
||||
{
|
||||
[Parameter]
|
||||
public bool B_doorChaged { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<int> E_currOrderStatus { get; set; }
|
||||
|
||||
public int Height { get; set; }
|
||||
|
||||
public string reportBaseUrl { get; set; } = "http://w2019-sql-steam/reportserver?/Test/WebDoor/";
|
||||
|
||||
[Parameter]
|
||||
public int UserCurrCompany { get; set; }
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
private bool sortAsc = true;
|
||||
@@ -35,13 +34,13 @@ namespace WebDoorCreator.UI.Components.Order
|
||||
[Parameter]
|
||||
public OrderSelectFilter actFilter { get; set; } = new OrderSelectFilter();
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<int> updateRecordCount { get; set; }
|
||||
[Parameter]
|
||||
public EventCallback<OrderStatusViewModel> E_SetOrd2Show { get; set; }
|
||||
|
||||
public OrderStatusViewModel? Ord2Show { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<int> updateRecordCount { get; set; }
|
||||
protected string currUser { get; set; } = "";
|
||||
|
||||
[Inject]
|
||||
@@ -49,6 +48,7 @@ namespace WebDoorCreator.UI.Components.Order
|
||||
|
||||
[Inject]
|
||||
protected WebDoorCreatorService WDService { get; set; } = null!;
|
||||
|
||||
private int _totalCount { get; set; } = 0;
|
||||
|
||||
private int currPage
|
||||
@@ -106,6 +106,7 @@ namespace WebDoorCreator.UI.Components.Order
|
||||
sortAsc = e.IsAscending;
|
||||
await ReloadData();
|
||||
}
|
||||
|
||||
#endregion Protected Properties
|
||||
|
||||
#region Protected Methods
|
||||
@@ -131,6 +132,9 @@ namespace WebDoorCreator.UI.Components.Order
|
||||
|
||||
protected bool isModRole { get; set; } = false;
|
||||
|
||||
[Inject]
|
||||
protected NavigationManager NavManager { get; set; } = null!;
|
||||
|
||||
protected bool ordByCode { get; set; } = false;
|
||||
|
||||
protected bool ordByDate { get; set; } = false;
|
||||
@@ -155,7 +159,6 @@ namespace WebDoorCreator.UI.Components.Order
|
||||
|
||||
protected async Task deleteRecord(OrderStatusViewModel currRec)
|
||||
{
|
||||
|
||||
if (!await JSRuntime.InvokeAsync<bool>("confirm", $"Order Deletion requested: are you sure to remove {currRec.OrderExtCode}?"))
|
||||
return;
|
||||
|
||||
@@ -219,6 +222,7 @@ namespace WebDoorCreator.UI.Components.Order
|
||||
|
||||
return answ;
|
||||
}
|
||||
|
||||
private async Task ReloadData()
|
||||
{
|
||||
ListOrdersStatus = null;
|
||||
@@ -265,6 +269,7 @@ namespace WebDoorCreator.UI.Components.Order
|
||||
ListOrdersStatus = ListOrdersStatus.OrderByDescending(x => x.DateIns).ToList();
|
||||
}
|
||||
break;
|
||||
|
||||
case "OrderNumber":
|
||||
if (sortAsc)
|
||||
{
|
||||
@@ -275,12 +280,12 @@ namespace WebDoorCreator.UI.Components.Order
|
||||
ListOrdersStatus = ListOrdersStatus.OrderByDescending(x => x.OrderExtCode).ToList();
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
ListOrdersStatus = ListOrdersStatus.OrderByDescending(x => x.DateIns).ToList();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -293,11 +298,16 @@ namespace WebDoorCreator.UI.Components.Order
|
||||
await Task.Delay(1);
|
||||
await InvokeAsync(StateHasChanged);
|
||||
}
|
||||
#endregion Private Methods
|
||||
|
||||
public int Width { get; set; }
|
||||
|
||||
[Inject]
|
||||
protected NavigationManager NavManager { get; set; } = null!;
|
||||
protected IJSRuntime JsRuntime { get; set; } = null!;
|
||||
|
||||
#endregion Private Methods
|
||||
protected int screenX { get; set; } = 0;
|
||||
|
||||
protected int screenY { get; set; } = 0;
|
||||
|
||||
protected string getOrderStatusLabel(int orderStat)
|
||||
{
|
||||
@@ -314,9 +324,6 @@ namespace WebDoorCreator.UI.Components.Order
|
||||
|
||||
return answ;
|
||||
}
|
||||
|
||||
public string reportBaseUrl { get; set; } = "http://w2019-sql-steam/reportserver?/Test/WebDoor/";
|
||||
|
||||
protected string reportUrl(int orderId)
|
||||
{
|
||||
return $"{reportBaseUrl}ReportOrder&OrderID={orderId}&rs:Command=Render&rs:format=PDF";
|
||||
@@ -335,22 +342,6 @@ namespace WebDoorCreator.UI.Components.Order
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected int screenX { get; set; } = 0;
|
||||
protected int screenY { get; set; } = 0;
|
||||
|
||||
private void getElementCoords(MouseEventArgs e)
|
||||
{
|
||||
screenX = (int)(e.ClientX);
|
||||
screenY = (int)(e.ClientY);
|
||||
}
|
||||
|
||||
public int Height { get; set; }
|
||||
public int Width { get; set; }
|
||||
|
||||
[Inject]
|
||||
protected IJSRuntime JsRuntime { get; set; } = null!;
|
||||
|
||||
private async Task getDim()
|
||||
{
|
||||
var dimension = await JsRuntime.InvokeAsync<WindowDimension>("getWindowDimensions");
|
||||
@@ -358,11 +349,15 @@ namespace WebDoorCreator.UI.Components.Order
|
||||
Width = dimension.Width;
|
||||
}
|
||||
|
||||
private void getElementCoords(MouseEventArgs e)
|
||||
{
|
||||
screenX = (int)(e.ClientX);
|
||||
screenY = (int)(e.ClientY);
|
||||
}
|
||||
public class WindowDimension
|
||||
{
|
||||
public int Width { get; set; }
|
||||
public int Height { get; set; }
|
||||
public int Width { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,38 +1,29 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.AspNetCore.Components.Server.ProtectedBrowserStorage;
|
||||
using WebDoorCreator.Data.DbModels;
|
||||
using WebDoorCreator.Data.Services;
|
||||
using WebDoorCreator.UI.Data;
|
||||
|
||||
namespace WebDoorCreator.UI.Components.Order
|
||||
{
|
||||
public partial class OrderStatusStep
|
||||
{
|
||||
|
||||
[Inject]
|
||||
protected WebDoorCreatorService WDService { get; set; } = null!;
|
||||
|
||||
[Parameter]
|
||||
public int CurrOrderStatus { get; set; } = 10;
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<string> E_CurrStepColor { get; set; }
|
||||
|
||||
protected override async Task OnParametersSetAsync()
|
||||
{
|
||||
await Task.Delay(1);
|
||||
}
|
||||
protected string currColor { get; set; } = "";
|
||||
|
||||
protected List<ListValuesModel>? currListOrderStatus { get; set; } = null;
|
||||
|
||||
[Inject]
|
||||
protected WebDoorCreatorService WDService { get; set; } = null!;
|
||||
protected async Task doChangeStep(string actDoorDefStep)
|
||||
{
|
||||
await Task.Delay(1);
|
||||
|
||||
//await E_StepChanged.InvokeAsync(actDoorDefStep);
|
||||
}
|
||||
|
||||
protected List<ListValuesModel>? currListOrderStatus { get; set; } = null;
|
||||
protected string currColor { get; set; } = "";
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
await Task.Delay(1);
|
||||
@@ -50,5 +41,9 @@ namespace WebDoorCreator.UI.Components.Order
|
||||
}
|
||||
}
|
||||
|
||||
protected override async Task OnParametersSetAsync()
|
||||
{
|
||||
await Task.Delay(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,4 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Microsoft.AspNetCore.Razor.Language.Extensions;
|
||||
using Microsoft.Build.Framework;
|
||||
using Microsoft.CodeAnalysis.CSharp.Syntax;
|
||||
using WebDoorCreator.Data.DbModels;
|
||||
using WebDoorCreator.Data.Services;
|
||||
using WebDoorCreator.UI.Data;
|
||||
@@ -20,6 +17,7 @@ namespace WebDoorCreator.UI.Components.Report
|
||||
|
||||
[Inject]
|
||||
protected WebDoorCreatorService WDService { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected WDCVocabularyService WDVService { get; set; } = null!;
|
||||
|
||||
@@ -37,7 +35,6 @@ namespace WebDoorCreator.UI.Components.Report
|
||||
}
|
||||
|
||||
return answ;
|
||||
|
||||
}
|
||||
|
||||
protected string getTranslatedLabel(string HwId)
|
||||
@@ -49,14 +46,13 @@ namespace WebDoorCreator.UI.Components.Report
|
||||
var hw2Translate = listHw.FirstOrDefault();
|
||||
if (hw2Translate != null)
|
||||
{
|
||||
|
||||
answ = translate(hw2Translate.Label);
|
||||
}
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
protected async override Task OnParametersSetAsync()
|
||||
protected override async Task OnParametersSetAsync()
|
||||
{
|
||||
var result = await WDService.DoorOpGetByDoorId(doorId);
|
||||
if (result != null)
|
||||
@@ -64,6 +60,7 @@ namespace WebDoorCreator.UI.Components.Report
|
||||
DoorOps = result.Where(x => x.ObjectId != "Size" && x.ObjectId != "Profiles" && x.ObjectId != "Swing" && x.ObjectId != "Properties" && x.ObjectId != "Finishing").ToList();
|
||||
}
|
||||
}
|
||||
|
||||
protected string translate(string lemma)
|
||||
{
|
||||
string answ = "";
|
||||
|
||||
@@ -9,20 +9,75 @@ namespace WebDoorCreator.UI.Pages
|
||||
{
|
||||
public partial class HwPdfConfirm
|
||||
{
|
||||
protected int doorId = 0;
|
||||
|
||||
protected string objectId = "";
|
||||
|
||||
protected List<DoorOpModel> allDoorOps { get; set; } = new List<DoorOpModel>();
|
||||
|
||||
protected DoorOpModel currDoorOp { get; set; } = new DoorOpModel();
|
||||
|
||||
protected int doorOpId { get; set; } = 0;
|
||||
|
||||
[Inject]
|
||||
protected NavigationManager NavManager { get; set; } = null!;
|
||||
[Inject]
|
||||
protected WDCUserService WDCUService { get; set; } = null!;
|
||||
|
||||
protected string userLang
|
||||
{
|
||||
get => WDCUService.currLanguage ?? "EN";
|
||||
set => WDCUService.currLanguage = value;
|
||||
}
|
||||
|
||||
[Inject]
|
||||
protected WDCRefreshService WDCRService { get; set; } = null!;
|
||||
|
||||
protected int doorOpId { get; set; } = 0;
|
||||
protected int doorId = 0;
|
||||
protected string objectId = "";
|
||||
protected DoorOpModel currDoorOp { get; set; } = new DoorOpModel();
|
||||
protected List<DoorOpModel> allDoorOps { get; set; } = new List<DoorOpModel>();
|
||||
[Inject]
|
||||
protected WDCUserService WDCUService { get; set; } = null!;
|
||||
[Inject]
|
||||
protected WDCRefreshService WDRService { get; set; } = null!;
|
||||
|
||||
protected async override Task OnInitializedAsync()
|
||||
[Inject]
|
||||
protected WebDoorCreatorService WDService { get; set; } = null!;
|
||||
|
||||
protected bool checkIfConf()
|
||||
{
|
||||
bool answ = false;
|
||||
if (allDoorOps != null)
|
||||
{
|
||||
var rawObj = JsonConvert.DeserializeObject<Dictionary<string, Dictionary<string, string>>>(currDoorOp.JsoncActVal!);
|
||||
if (rawObj != null)
|
||||
{
|
||||
foreach (var op in allDoorOps)
|
||||
{
|
||||
var opObj = JsonConvert.DeserializeObject<Dictionary<string, Dictionary<string, string>>>(op.JsoncActVal!);
|
||||
if (opObj != null)
|
||||
{
|
||||
if (rawObj["template"] == opObj["template"] && op.DtConfirm != null && op.userConfirm != "")
|
||||
{
|
||||
answ = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
protected async Task doConfirm()
|
||||
{
|
||||
currDoorOp.userConfirm = WDCUService.userId;
|
||||
currDoorOp.DtConfirm = DateTime.Now;
|
||||
|
||||
var doorOps2Save = new List<DoorOpModel>() { currDoorOp };
|
||||
|
||||
var done = await WDService.DoorOpUpdate(doorOps2Save);
|
||||
if (done)
|
||||
{
|
||||
WDRService.ReportDoorOpConf(doorId, doorOpId, objectId);
|
||||
}
|
||||
}
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
await Task.Delay(1);
|
||||
var uri = NavManager.ToAbsoluteUri(NavManager.Uri);
|
||||
@@ -41,7 +96,6 @@ namespace WebDoorCreator.UI.Pages
|
||||
doorOpId = int.Parse(sDoorOpId);
|
||||
await ReloadData();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
protected async Task ReloadData()
|
||||
@@ -50,59 +104,8 @@ namespace WebDoorCreator.UI.Pages
|
||||
if (currDoorOp != null)
|
||||
{
|
||||
allDoorOps = await WDService.DoorOpGetByDoorId(currDoorOp.DoorId);
|
||||
|
||||
}
|
||||
await Task.Delay(1);
|
||||
}
|
||||
[Inject]
|
||||
protected WebDoorCreatorService WDService { get; set; } = null!;
|
||||
[Inject]
|
||||
protected WDCRefreshService WDRService { get; set; } = null!;
|
||||
|
||||
protected async Task doConfirm()
|
||||
{
|
||||
currDoorOp.userConfirm = WDCUService.userId;
|
||||
currDoorOp.DtConfirm = DateTime.Now;
|
||||
|
||||
var doorOps2Save = new List<DoorOpModel>() { currDoorOp };
|
||||
|
||||
var done = await WDService.DoorOpUpdate(doorOps2Save);
|
||||
if (done)
|
||||
{
|
||||
WDRService.ReportDoorOpConf(doorId, doorOpId, objectId);
|
||||
}
|
||||
}
|
||||
|
||||
protected string userLang
|
||||
{
|
||||
get => WDCUService.currLanguage ?? "EN";
|
||||
set => WDCUService.currLanguage = value;
|
||||
}
|
||||
|
||||
protected bool checkIfConf()
|
||||
{
|
||||
bool answ = false;
|
||||
if (allDoorOps != null)
|
||||
{
|
||||
var rawObj = JsonConvert.DeserializeObject<Dictionary<string, Dictionary<string, string>>>(currDoorOp.JsoncActVal!);
|
||||
if (rawObj != null)
|
||||
{
|
||||
foreach (var op in allDoorOps)
|
||||
{
|
||||
var opObj = JsonConvert.DeserializeObject<Dictionary<string, Dictionary<string, string>>>(op.JsoncActVal!);
|
||||
if (opObj != null)
|
||||
{
|
||||
|
||||
if (rawObj["template"] == opObj["template"] && op.DtConfirm != null && op.userConfirm != "")
|
||||
{
|
||||
answ = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,31 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using System.Net.Http;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Components.Authorization;
|
||||
using Microsoft.AspNetCore.Components.Forms;
|
||||
using Microsoft.AspNetCore.Components.Routing;
|
||||
using Microsoft.AspNetCore.Components.Web;
|
||||
using Microsoft.AspNetCore.Components.Web.Virtualization;
|
||||
using Microsoft.JSInterop;
|
||||
using WebDoorCreator.UI;
|
||||
using WebDoorCreator.UI.Components;
|
||||
using WebDoorCreator.UI.Components.Buttons;
|
||||
using WebDoorCreator.UI.Components.CompMan;
|
||||
using WebDoorCreator.UI.Components.DoorMan;
|
||||
using WebDoorCreator.UI.Components.DoorDef;
|
||||
using WebDoorCreator.UI.Components.Gen;
|
||||
using WebDoorCreator.UI.Components.Order;
|
||||
using WebDoorCreator.UI.Components.Users;
|
||||
using WebDoorCreator.UI.Components.Hardware;
|
||||
using WebDoorCreator.UI.Components.SvgComp;
|
||||
using WebDoorCreator.UI.Components.Filters;
|
||||
using WebDoorCreator.UI.Shared;
|
||||
using WebDoorCreator.Data.DbModels;
|
||||
using EgwCoreLib.Razor;
|
||||
|
||||
namespace WebDoorCreator.UI.Pages
|
||||
{
|
||||
@@ -33,6 +6,7 @@ namespace WebDoorCreator.UI.Pages
|
||||
{
|
||||
[Inject]
|
||||
protected NavigationManager NavManager { get; set; } = null!;
|
||||
|
||||
protected async Task changePage(bool newPage)
|
||||
{
|
||||
await Task.Delay(1);
|
||||
|
||||
@@ -1,27 +1,62 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using WebDoorCreator.Data.DbModels;
|
||||
using WebDoorCreator.Data.Services;
|
||||
using WebDoorCreator.UI.Data;
|
||||
|
||||
namespace WebDoorCreator.UI.Pages
|
||||
{
|
||||
public partial class Utils
|
||||
{
|
||||
protected string _keyWord { get; set; } = "";
|
||||
[Inject]
|
||||
protected IConfiguration config { get; set; } = null!;
|
||||
|
||||
protected WebDoorCreator.Data.DDF.Converter currDdfConv { get; set; } = null!;
|
||||
protected bool done { get; set; } = false;
|
||||
protected List<DoorOpModel>? DoorOpsList { get; set; }
|
||||
|
||||
protected List<DoorModel> DoorsList { get; set; } = new List<DoorModel>();
|
||||
|
||||
protected string keyWord
|
||||
{
|
||||
get => _keyWord;
|
||||
set => _keyWord = value;
|
||||
}
|
||||
|
||||
protected List<DoorOpModel> listOp { get; set; } = new List<DoorOpModel>();
|
||||
protected List<DoorOpModel> listOpAll { get; set; } = new List<DoorOpModel>();
|
||||
[Inject]
|
||||
protected NavigationManager NavManager { get; set; } = null!;
|
||||
|
||||
protected List<OrderStatusViewModel>? OrdersList { get; set; }
|
||||
|
||||
protected List<string> ordListVal { get; set; } = new List<string>();
|
||||
protected List<DoorOpModel> listOp { get; set; } = new List<DoorOpModel>();
|
||||
protected List<DoorOpModel> listOpAll { get; set; } = new List<DoorOpModel>();
|
||||
|
||||
[Inject]
|
||||
protected QueueDataService QDataServ { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected WebDoorCreatorService WDCService { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected WebDoorCreatorService WDService { get; set; } = null!;
|
||||
|
||||
public async Task flushCache()
|
||||
{
|
||||
await Task.Delay(1);
|
||||
await WDService.FlushRedisCache();
|
||||
await Task.Delay(1);
|
||||
// rimando a pagina corrente
|
||||
NavManager.NavigateTo("/", true);
|
||||
}
|
||||
|
||||
public async Task FlushCustomPattern()
|
||||
{
|
||||
await Task.Delay(1);
|
||||
await WDService.FlushCustomPattern(keyWord);
|
||||
await Task.Delay(1);
|
||||
// rimando a pagina corrente
|
||||
NavManager.NavigateTo("/", true);
|
||||
}
|
||||
|
||||
protected async Task doorsGetAll()
|
||||
{
|
||||
await ordersGetAll();
|
||||
@@ -39,24 +74,7 @@ namespace WebDoorCreator.UI.Pages
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
protected bool done { get; set; } = false;
|
||||
|
||||
[Inject]
|
||||
protected IConfiguration config { get; set; } = null!;
|
||||
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
base.OnInitialized();
|
||||
string vers = config.GetValue<string>("ConfDDF:VersNumber");
|
||||
bool remDoorOp = config.GetValue<bool>("ConfDDF:RemoveDoorOps");
|
||||
var headRows = config.GetSection("ConfDDF:Header").Get<List<string>>();
|
||||
var footRows = config.GetSection("ConfDDF:Footer").Get<List<string>>();
|
||||
currDdfConv = new WebDoorCreator.Data.DDF.Converter(vers, remDoorOp, headRows, footRows);
|
||||
}
|
||||
|
||||
protected WebDoorCreator.Data.DDF.Converter currDdfConv { get; set; } = null!;
|
||||
/// <summary>
|
||||
/// Effettua salvataggio record e generazione DDF
|
||||
/// </summary>
|
||||
@@ -97,7 +115,6 @@ namespace WebDoorCreator.UI.Pages
|
||||
// versione corrente del DDF generato
|
||||
int currVers = await QDataServ.SendCalcReq(door.DoorId, currDdf);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -106,44 +123,20 @@ namespace WebDoorCreator.UI.Pages
|
||||
done = true;
|
||||
}
|
||||
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
base.OnInitialized();
|
||||
string vers = config.GetValue<string>("ConfDDF:VersNumber");
|
||||
bool remDoorOp = config.GetValue<bool>("ConfDDF:RemoveDoorOps");
|
||||
var headRows = config.GetSection("ConfDDF:Header").Get<List<string>>();
|
||||
var footRows = config.GetSection("ConfDDF:Footer").Get<List<string>>();
|
||||
currDdfConv = new WebDoorCreator.Data.DDF.Converter(vers, remDoorOp, headRows, footRows);
|
||||
}
|
||||
protected async Task ordersGetAll()
|
||||
{
|
||||
DateTime adesso = DateTime.Today;
|
||||
|
||||
OrdersList = await WDCService.OrderStatusGetFilt(0, 0, adesso.AddYears(-200), adesso.AddYears(200));
|
||||
}
|
||||
|
||||
public async Task flushCache()
|
||||
{
|
||||
await Task.Delay(1);
|
||||
await WDService.FlushRedisCache();
|
||||
await Task.Delay(1);
|
||||
// rimando a pagina corrente
|
||||
NavManager.NavigateTo("/", true);
|
||||
}
|
||||
|
||||
protected string _keyWord { get; set; } = "";
|
||||
protected string keyWord
|
||||
{
|
||||
get => _keyWord;
|
||||
set => _keyWord = value;
|
||||
}
|
||||
|
||||
|
||||
public async Task FlushCustomPattern()
|
||||
{
|
||||
await Task.Delay(1);
|
||||
await WDService.FlushCustomPattern(keyWord);
|
||||
await Task.Delay(1);
|
||||
// rimando a pagina corrente
|
||||
NavManager.NavigateTo("/", true);
|
||||
}
|
||||
|
||||
|
||||
[Inject]
|
||||
protected NavigationManager NavManager { get; set; } = null!;
|
||||
|
||||
[Inject]
|
||||
protected WebDoorCreatorService WDService { get; set; } = null!;
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<Version>0.9.2305.2319</Version>
|
||||
<Version>0.9.2305.2408</Version>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<UserSecretsId>aspnet-WebDoorCreator.UI-dfe95fed-1398-4144-bd43-8b3a765d6608</UserSecretsId>
|
||||
</PropertyGroup>
|
||||
|
||||
Reference in New Issue
Block a user