Merge branch 'feature/PaginaSupplier' into develop
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<div class="row py-5 my-5">
|
||||
<div class="row p-5 m-5">
|
||||
<div class="col-12 text-center mt-5 py-5 alert alert-primary">
|
||||
<h3>loading data</h3>
|
||||
<i class="fas fa-spinner fa-spin fa-5x"></i>
|
||||
|
||||
@@ -0,0 +1,161 @@
|
||||
@using GWMS.UI.Components
|
||||
@using GWMS.Data.DatabaseModels
|
||||
@using System.Security.Claims
|
||||
@using Microsoft.AspNetCore.Components.Authorization
|
||||
@using GWMS.UI.Data
|
||||
@using Microsoft.Extensions.Configuration
|
||||
|
||||
@inject MessageService AppMService
|
||||
@inject GWMSDataService DataService
|
||||
@inject IConfiguration Configuration
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header bg-info text-light">
|
||||
<b>Modifica</b>
|
||||
</div>
|
||||
<div class="card-body small p-1">
|
||||
<EditForm Model="@_currItem">
|
||||
<DataAnnotationsValidator />
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-2">
|
||||
<img src="@getImgUrl(_currItem.OrderCode)" class="img-fluid" width="85" />
|
||||
</div>
|
||||
<div class="col-12 col-lg-8 align-items-center">
|
||||
<div class="row">
|
||||
<div class="col-8">
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text" style="width: 3em;">
|
||||
<span class="fas fa-industry" aria-hidden="true"></span>
|
||||
</span>
|
||||
</div>
|
||||
<InputSelect @bind-Value="@_currItem.SupplierId" class="form-control" title="Fornitore">
|
||||
@foreach (var item in suppList)
|
||||
{
|
||||
<option value="@item.SupplierId">@item.SupplierCode | @item.SupplierDesc</option>
|
||||
}
|
||||
</InputSelect>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
@*<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">
|
||||
<span class="fas fa-calendar-alt" aria-hidden="true"></span>
|
||||
</span>
|
||||
</div>
|
||||
<InputDate id="DtEta" @bind-Value="_currItem.DtETA" class="form-control" title="ETA (previsione consegna)" />
|
||||
</div>*@
|
||||
</div>
|
||||
<div class="col-12 mt-2">
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text" style="width: 3em;">
|
||||
<span class="fas fa-comment-alt" aria-hidden="true"></span>
|
||||
</span>
|
||||
</div>
|
||||
<InputText id="OrderDesc" @bind-Value="_currItem.OrderDesc" class="form-control" title="Note Ordine (opzionali)" />
|
||||
<div class="input-group-append">
|
||||
<span class="input-group-text">
|
||||
Note
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-lg-2">
|
||||
<div class="mb-2">
|
||||
<button type="button" class="btn btn-outline-success btn-block" value="Save" @onclick="saveUpdate">Save <i class="far fa-save"></i></button>
|
||||
</div>
|
||||
<div>
|
||||
<button type="button" class="btn btn-outline-warning btn-block" value="Cancel" @onclick="cancelUpdate">Cancel <i class="fas fa-ban"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</EditForm>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@code {
|
||||
|
||||
private List<SupplierModel> suppList;
|
||||
|
||||
protected OrderModel _currItem = new OrderModel();
|
||||
protected int _supplierId { get; set; } = 0;
|
||||
|
||||
[Parameter]
|
||||
public OrderModel currItem
|
||||
{
|
||||
get
|
||||
{
|
||||
return _currItem = null;
|
||||
}
|
||||
set
|
||||
{
|
||||
_currItem = value;
|
||||
}
|
||||
}
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<int> DataReset { get; set; }
|
||||
[Parameter]
|
||||
public EventCallback<int> DataUpdated { get; set; }
|
||||
[Parameter]
|
||||
public int SupplierId
|
||||
{
|
||||
get
|
||||
{
|
||||
return _supplierId;
|
||||
}
|
||||
set
|
||||
{
|
||||
_supplierId = value;
|
||||
// condiziono visualizzazione...
|
||||
var pUpd = Task.Run(async () => await ReloadAllData());
|
||||
pUpd.Wait();
|
||||
}
|
||||
}
|
||||
|
||||
private async Task saveUpdate()
|
||||
{
|
||||
if (_currItem != null)
|
||||
{
|
||||
DataService.OrderUpdate(_currItem, AppMService.Order_Filter);
|
||||
await DataUpdated.InvokeAsync(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("Order null!");
|
||||
}
|
||||
}
|
||||
|
||||
private async Task cancelUpdate()
|
||||
{
|
||||
await DataReset.InvokeAsync(0);
|
||||
}
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
await ReloadAllData();
|
||||
}
|
||||
|
||||
protected async Task ReloadAllData()
|
||||
{
|
||||
suppList = await DataService.SuppliersGetAll();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Restituisce URL immagine QRCode
|
||||
/// </summary>
|
||||
/// <param name="QrValue">Parametro da renderizzare con QRCode</param>
|
||||
/// <returns></returns>
|
||||
protected string getImgUrl(object QrValue)
|
||||
{
|
||||
string baseUrl = $"{Configuration["matrixUrl"]}/HOME/QR_site/JSON?val=";
|
||||
string payload = "{'baseUrl':'{0}','parameters':['" + $"{QrValue}" + "']}";
|
||||
string answ = $"{baseUrl}{payload}";
|
||||
return answ;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,131 +0,0 @@
|
||||
@using GWMS.UI.Components
|
||||
@using GWMS.Data.DatabaseModels
|
||||
@using System.Security.Claims
|
||||
@using Microsoft.AspNetCore.Components.Authorization
|
||||
@using GWMS.UI.Data
|
||||
|
||||
@inject MessageService AppMessages
|
||||
@inject GWMSDataService DataService
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header bg-info text-light">
|
||||
<b>Modifica</b>
|
||||
</div>
|
||||
<div class="card-body small">
|
||||
<EditForm Model="@_currItem">
|
||||
<DataAnnotationsValidator />
|
||||
<Blazorise.ValidationSummary />
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-2">
|
||||
<img src="./img/QrDemo.png" class="img-fluid" />
|
||||
mettere QRCODE da https://qrcode.steamware.net/
|
||||
</div>
|
||||
<div class="col-12 col-lg-10">
|
||||
<div class="row">
|
||||
<div class="col-3">
|
||||
<label>Trasportatore:</label>
|
||||
<InputSelect @bind-Value="@_currItem.TransporterId" class="form-control form-control-sm">
|
||||
@foreach (var item in transpList)
|
||||
{
|
||||
<option value="@item.TransporterId">@item.TransporterCode | @item.TransporterDesc</option>
|
||||
}
|
||||
</InputSelect>
|
||||
</div>
|
||||
<div class="col-3">
|
||||
<label for="DtEta">ETA (previsione consegna)</label>
|
||||
<InputDate id="DtEta" @bind-Value="_currItem.DtETA" class="form-control form-control-sm" />
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<div class="form-group">
|
||||
<label for="OrderDesc">Note:</label>
|
||||
<InputText id="OrderDesc" @bind-Value="_currItem.OrderDesc" class="form-control form-control-sm" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-3"></div>
|
||||
<div class="col-9">
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
<input type="submit" class="btn btn-success btn-block" value="Save" @onclick="saveUpdate" />
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<button type="button" class="btn btn-warning btn-block" value="Cancel" @onclick="cancelUpdate">Cancel</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</EditForm>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@code {
|
||||
|
||||
private List<TransporterModel> transpList;
|
||||
|
||||
protected OrderModel _currItem = new OrderModel();
|
||||
protected int _supplierId { get; set; } = 0;
|
||||
|
||||
[Parameter]
|
||||
public OrderModel currItem
|
||||
{
|
||||
get
|
||||
{
|
||||
return _currItem = null;
|
||||
}
|
||||
set
|
||||
{
|
||||
_currItem = value;
|
||||
}
|
||||
}
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<int> DataReset { get; set; }
|
||||
[Parameter]
|
||||
public EventCallback<int> DataUpdated { get; set; }
|
||||
[Parameter]
|
||||
public int SupplierId
|
||||
{
|
||||
get
|
||||
{
|
||||
return _supplierId;
|
||||
}
|
||||
set
|
||||
{
|
||||
_supplierId = value;
|
||||
// condiziono visualizzazione...
|
||||
var pUpd = Task.Run(async () => await ReloadAllData());
|
||||
pUpd.Wait();
|
||||
}
|
||||
}
|
||||
|
||||
private async Task saveUpdate()
|
||||
{
|
||||
if (_currItem != null)
|
||||
{
|
||||
DataService.OrderUpdate(_currItem);
|
||||
await DataUpdated.InvokeAsync(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("Order null!");
|
||||
}
|
||||
}
|
||||
|
||||
private async Task cancelUpdate()
|
||||
{
|
||||
await DataReset.InvokeAsync(0);
|
||||
}
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
await ReloadAllData();
|
||||
}
|
||||
|
||||
protected async Task ReloadAllData()
|
||||
{
|
||||
transpList = await DataService.TransportersGetFilt(SupplierId);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,161 @@
|
||||
@using GWMS.UI.Components
|
||||
@using GWMS.Data.DatabaseModels
|
||||
@using System.Security.Claims
|
||||
@using Microsoft.AspNetCore.Components.Authorization
|
||||
@using GWMS.UI.Data
|
||||
@using Microsoft.Extensions.Configuration
|
||||
|
||||
@inject MessageService AppMService
|
||||
@inject GWMSDataService DataService
|
||||
@inject IConfiguration Configuration
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header bg-info text-light">
|
||||
<b>Modifica</b>
|
||||
</div>
|
||||
<div class="card-body small p-1">
|
||||
<EditForm Model="@_currItem">
|
||||
<DataAnnotationsValidator />
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-2">
|
||||
<img src="@getImgUrl(_currItem.OrderCode)" class="img-fluid" width="85" />
|
||||
</div>
|
||||
<div class="col-12 col-lg-8 align-items-center">
|
||||
<div class="row">
|
||||
<div class="col-8">
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text" style="width: 3em;">
|
||||
<span class="fas fa-truck-moving" aria-hidden="true"></span>
|
||||
</span>
|
||||
</div>
|
||||
<InputSelect @bind-Value="@_currItem.TransporterId" title="Trasportatore" class="form-control">
|
||||
@foreach (var item in transpList)
|
||||
{
|
||||
<option value="@item.TransporterId">@item.TransporterCode | @item.TransporterDesc</option>
|
||||
}
|
||||
</InputSelect>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">
|
||||
<span class="fas fa-calendar-alt" aria-hidden="true"></span>
|
||||
</span>
|
||||
</div>
|
||||
<InputDate id="DtEta" @bind-Value="_currItem.DtETA" class="form-control" title="ETA (previsione consegna)" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 mt-2">
|
||||
<div class="input-group">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text" style="width: 3em;">
|
||||
<span class="fas fa-comment-alt" aria-hidden="true"></span>
|
||||
</span>
|
||||
</div>
|
||||
<InputText id="OrderDesc" @bind-Value="_currItem.OrderDesc" class="form-control" title="Note Ordine (opzionali)" />
|
||||
<div class="input-group-append">
|
||||
<span class="input-group-text">
|
||||
Note
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-lg-2">
|
||||
<div class="mb-2">
|
||||
<button type="button" class="btn btn-outline-success btn-block" value="Save" @onclick="saveUpdate">Save <i class="far fa-save"></i></button>
|
||||
</div>
|
||||
<div>
|
||||
<button type="button" class="btn btn-outline-warning btn-block" value="Cancel" @onclick="cancelUpdate">Cancel <i class="fas fa-ban"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</EditForm>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@code {
|
||||
|
||||
private List<TransporterModel> transpList;
|
||||
|
||||
protected OrderModel _currItem = new OrderModel();
|
||||
protected int _supplierId { get; set; } = 0;
|
||||
|
||||
[Parameter]
|
||||
public OrderModel currItem
|
||||
{
|
||||
get
|
||||
{
|
||||
return _currItem = null;
|
||||
}
|
||||
set
|
||||
{
|
||||
_currItem = value;
|
||||
}
|
||||
}
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<int> DataReset { get; set; }
|
||||
[Parameter]
|
||||
public EventCallback<int> DataUpdated { get; set; }
|
||||
[Parameter]
|
||||
public int SupplierId
|
||||
{
|
||||
get
|
||||
{
|
||||
return _supplierId;
|
||||
}
|
||||
set
|
||||
{
|
||||
_supplierId = value;
|
||||
// condiziono visualizzazione...
|
||||
var pUpd = Task.Run(async () => await ReloadAllData());
|
||||
pUpd.Wait();
|
||||
}
|
||||
}
|
||||
|
||||
private async Task saveUpdate()
|
||||
{
|
||||
if (_currItem != null)
|
||||
{
|
||||
DataService.OrderUpdate(_currItem, AppMService.Order_Filter);
|
||||
await DataUpdated.InvokeAsync(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine("Order null!");
|
||||
}
|
||||
}
|
||||
|
||||
private async Task cancelUpdate()
|
||||
{
|
||||
await DataReset.InvokeAsync(0);
|
||||
}
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
await ReloadAllData();
|
||||
}
|
||||
|
||||
protected async Task ReloadAllData()
|
||||
{
|
||||
transpList = await DataService.TransportersGetFilt(SupplierId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Restituisce URL immagine QRCode
|
||||
/// </summary>
|
||||
/// <param name="QrValue">Parametro da renderizzare con QRCode</param>
|
||||
/// <returns></returns>
|
||||
protected string getImgUrl(object QrValue)
|
||||
{
|
||||
string baseUrl = $"{Configuration["matrixUrl"]}/HOME/QR_site/JSON?val=";
|
||||
string payload = "{'baseUrl':'{0}','parameters':['" + $"{QrValue}" + "']}";
|
||||
string answ = $"{baseUrl}{payload}";
|
||||
return answ;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -31,13 +31,13 @@ namespace GWMS.UI.Data
|
||||
/// <summary>
|
||||
/// Durata assoluta massima della cache IN SECONDI
|
||||
/// </summary>
|
||||
private int chAbsExp = 60;
|
||||
private int chAbsExp = 60 * 5;
|
||||
|
||||
/// <summary>
|
||||
/// Durata della cache IN SECONDI in modalità inattiva (non acceduta) prima di venire rimossa
|
||||
/// NON estende oltre il tempo massimo di validità della cache (chAbsExp)
|
||||
/// </summary>
|
||||
private int chSliExp = 5;
|
||||
private int chSliExp = 60 * 1;
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
@@ -159,30 +159,18 @@ namespace GWMS.UI.Data
|
||||
public async Task<List<OrderModel>> OrdersGetFilt(SelectOrderData CurrFilter)
|
||||
{
|
||||
List<OrderModel> dbResult = new List<OrderModel>();
|
||||
string cacheKey = getCacheKey("GWMS:DATA:ORDERS", CurrFilter);
|
||||
string rawData;
|
||||
var redisDataList = await distributedCache.GetAsync(cacheKey);
|
||||
if (redisDataList != null)
|
||||
{
|
||||
rawData = Encoding.UTF8.GetString(redisDataList);
|
||||
dbResult = JsonConvert.DeserializeObject<List<OrderModel>>(rawData);
|
||||
}
|
||||
else
|
||||
{
|
||||
Stopwatch stopWatch = new Stopwatch();
|
||||
stopWatch.Start();
|
||||
dbResult = dbController.GetOrdersFilt(CurrFilter.PlantId, CurrFilter.SupplierId, CurrFilter.DateStart, CurrFilter.DateEnd);
|
||||
rawData = JsonConvert.SerializeObject(dbResult);
|
||||
redisDataList = Encoding.UTF8.GetBytes(rawData);
|
||||
await distributedCache.SetAsync(cacheKey, redisDataList, cacheOpt(true));
|
||||
stopWatch.Stop();
|
||||
TimeSpan ts = stopWatch.Elapsed;
|
||||
Log.Info($"Effettuata lettura da DB + caching per OrdersGetFilt: {ts.TotalMilliseconds} ms");
|
||||
}
|
||||
|
||||
Stopwatch stopWatch = new Stopwatch();
|
||||
stopWatch.Start();
|
||||
dbResult = dbController.GetOrdersFilt(CurrFilter.PlantId, CurrFilter.SupplierId, CurrFilter.DateStart, CurrFilter.DateEnd);
|
||||
stopWatch.Stop();
|
||||
TimeSpan ts = stopWatch.Elapsed;
|
||||
Log.Info($"Effettuata lettura da DB per OrdersGetFilt: {ts.TotalMilliseconds} ms");
|
||||
|
||||
return await Task.FromResult(dbResult);
|
||||
}
|
||||
|
||||
public void OrderUpdate(OrderModel currItem)
|
||||
public void OrderUpdate(OrderModel currItem, SelectOrderData CurrFilter)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<div class="card-header table-primary h3">
|
||||
<div class="row">
|
||||
<div class="col-3 h3">
|
||||
Ordini
|
||||
Elenco Ordini
|
||||
</div>
|
||||
<div class="col-9 text-right">
|
||||
<div class="d-flex justify-content-between">
|
||||
@@ -69,7 +69,11 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="card-body p-1">
|
||||
@if (currRecord != null)
|
||||
{
|
||||
<OrderAdminEditor currItem="@currRecord" DataReset="ResetData" DataUpdated="UpdateData" SupplierId="@currRecord.SupplierId"></OrderAdminEditor>
|
||||
}
|
||||
@if (ListRecords == null)
|
||||
{
|
||||
<LoadingData></LoadingData>
|
||||
@@ -85,6 +89,7 @@
|
||||
<table class="table table-sm table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Impianto</th>
|
||||
<th>Data Ordine</th>
|
||||
<th>Ordine</th>
|
||||
@@ -96,6 +101,7 @@
|
||||
@foreach (var record in ListRecords)
|
||||
{
|
||||
<tr class="@checkSelect(@record.OrderId)">
|
||||
<td class="text-nowrap"><button class="btn btn-sm btn-info" @onclick="() => Edit(record)"><span class="oi oi-pencil"></span></button></td>
|
||||
<td>
|
||||
<div>@record.Plant.PlantCode</div>
|
||||
<div class="small">@record.Plant.PlantDesc</div>
|
||||
|
||||
@@ -64,17 +64,17 @@ namespace GWMS.UI.Pages
|
||||
get
|
||||
{
|
||||
int answ = 0;
|
||||
if (MessageService.Order_Filter != null)
|
||||
if (AppMService.Order_Filter != null)
|
||||
{
|
||||
answ = MessageService.Order_Filter.PlantId;
|
||||
answ = AppMService.Order_Filter.PlantId;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (!MessageService.Order_Filter.PlantId.Equals(value))
|
||||
if (!AppMService.Order_Filter.PlantId.Equals(value))
|
||||
{
|
||||
MessageService.Order_Filter.PlantId = value;
|
||||
AppMService.Order_Filter.PlantId = value;
|
||||
var pUpd = Task.Run(async () => await ReloadData());
|
||||
pUpd.Wait();
|
||||
}
|
||||
@@ -86,17 +86,17 @@ namespace GWMS.UI.Pages
|
||||
get
|
||||
{
|
||||
int answ = 0;
|
||||
if (MessageService.Order_Filter != null)
|
||||
if (AppMService.Order_Filter != null)
|
||||
{
|
||||
answ = MessageService.Order_Filter.SupplierId;
|
||||
answ = AppMService.Order_Filter.SupplierId;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (!MessageService.Order_Filter.SupplierId.Equals(value))
|
||||
if (!AppMService.Order_Filter.SupplierId.Equals(value))
|
||||
{
|
||||
MessageService.Order_Filter.SupplierId = value;
|
||||
AppMService.Order_Filter.SupplierId = value;
|
||||
var pUpd = Task.Run(async () => await ReloadData());
|
||||
pUpd.Wait();
|
||||
}
|
||||
@@ -109,6 +109,9 @@ namespace GWMS.UI.Pages
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
[Inject]
|
||||
protected MessageService AppMService { get; set; }
|
||||
|
||||
[Inject]
|
||||
protected GWMSDataService DataService { get; set; }
|
||||
|
||||
@@ -117,17 +120,17 @@ namespace GWMS.UI.Pages
|
||||
get
|
||||
{
|
||||
DateTime answ = DateTime.Today.AddDays(1);
|
||||
if (MessageService.Order_Filter != null)
|
||||
if (AppMService.Order_Filter != null)
|
||||
{
|
||||
answ = MessageService.Order_Filter.DateEnd;
|
||||
answ = AppMService.Order_Filter.DateEnd;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (!MessageService.Order_Filter.DateEnd.Equals(value))
|
||||
if (!AppMService.Order_Filter.DateEnd.Equals(value))
|
||||
{
|
||||
MessageService.Order_Filter.DateEnd = value;
|
||||
AppMService.Order_Filter.DateEnd = value;
|
||||
var pUpd = Task.Run(async () => await ReloadData());
|
||||
pUpd.Wait();
|
||||
}
|
||||
@@ -139,17 +142,17 @@ namespace GWMS.UI.Pages
|
||||
get
|
||||
{
|
||||
DateTime answ = DateTime.Today.AddDays(-1);
|
||||
if (MessageService.Order_Filter != null)
|
||||
if (AppMService.Order_Filter != null)
|
||||
{
|
||||
answ = MessageService.Order_Filter.DateStart;
|
||||
answ = AppMService.Order_Filter.DateStart;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (!MessageService.Order_Filter.DateStart.Equals(value))
|
||||
if (!AppMService.Order_Filter.DateStart.Equals(value))
|
||||
{
|
||||
MessageService.Order_Filter.DateStart = value;
|
||||
AppMService.Order_Filter.DateStart = value;
|
||||
var pUpd = Task.Run(async () => await ReloadData());
|
||||
pUpd.Wait();
|
||||
}
|
||||
@@ -159,9 +162,6 @@ namespace GWMS.UI.Pages
|
||||
[Inject]
|
||||
protected IJSRuntime JSRuntime { get; set; }
|
||||
|
||||
[Inject]
|
||||
protected MessageService MessageService { get; set; }
|
||||
|
||||
[Inject]
|
||||
protected NavigationManager NavManager { get; set; }
|
||||
|
||||
@@ -195,7 +195,7 @@ namespace GWMS.UI.Pages
|
||||
private async Task ReloadData()
|
||||
{
|
||||
isLoading = true;
|
||||
SearchRecords = await DataService.OrdersGetFilt(MessageService.Order_Filter);
|
||||
SearchRecords = await DataService.OrdersGetFilt(AppMService.Order_Filter);
|
||||
ListRecords = SearchRecords.Skip(numRecord * (currPage - 1)).Take(numRecord).ToList();
|
||||
isLoading = false;
|
||||
}
|
||||
@@ -204,6 +204,11 @@ namespace GWMS.UI.Pages
|
||||
|
||||
#region Protected Methods
|
||||
|
||||
protected void Edit(OrderModel selRecord)
|
||||
{
|
||||
currRecord = selRecord;
|
||||
}
|
||||
|
||||
protected void ForceReload(int newNum)
|
||||
{
|
||||
numRecord = newNum;
|
||||
@@ -216,10 +221,10 @@ namespace GWMS.UI.Pages
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
MessageService.ShowSearch = false;
|
||||
MessageService.PageName = "Ordini";
|
||||
MessageService.PageIcon = "fas fa-file-invoice pr-2";
|
||||
MessageService.EA_SearchUpdated += OnSeachUpdated;
|
||||
AppMService.ShowSearch = false;
|
||||
AppMService.PageName = "Ordini";
|
||||
AppMService.PageIcon = "fas fa-file-invoice pr-2";
|
||||
AppMService.EA_SearchUpdated += OnSeachUpdated;
|
||||
await ReloadAllData();
|
||||
}
|
||||
|
||||
@@ -230,12 +235,18 @@ namespace GWMS.UI.Pages
|
||||
await ReloadData();
|
||||
}
|
||||
|
||||
protected void ResetData()
|
||||
{
|
||||
DataService.rollBackEdit(currRecord);
|
||||
currRecord = null;
|
||||
}
|
||||
|
||||
protected async Task ResetFilter(SelectOrderData newFilter)
|
||||
{
|
||||
currRecord = null;
|
||||
SearchRecords = null;
|
||||
ListRecords = null;
|
||||
MessageService.Order_Filter = SelectOrderData.Init(5, 7);
|
||||
AppMService.Order_Filter = SelectOrderData.Init(5, 7);
|
||||
await ReloadAllData();
|
||||
}
|
||||
|
||||
@@ -272,7 +283,7 @@ namespace GWMS.UI.Pages
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
MessageService.EA_SearchUpdated -= OnSeachUpdated;
|
||||
AppMService.EA_SearchUpdated -= OnSeachUpdated;
|
||||
}
|
||||
|
||||
public async void OnSeachUpdated()
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<div class="card-header table-primary h3">
|
||||
<div class="row">
|
||||
<div class="col-3 h3">
|
||||
Elenco Ordini Fornitore
|
||||
Ordini Fornitore
|
||||
</div>
|
||||
<div class="col-9 text-right">
|
||||
<div class="d-flex justify-content-between">
|
||||
@@ -54,7 +54,6 @@
|
||||
</span>
|
||||
</div>
|
||||
<select @bind="@SelSupplierId" class="form-control form-control-sm">
|
||||
<option value="0">--- Tutti ---</option>
|
||||
@if (SuppliersList != null)
|
||||
{
|
||||
foreach (var item in SuppliersList)
|
||||
@@ -69,10 +68,10 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="card-body p-1">
|
||||
@if (currRecord != null)
|
||||
{
|
||||
<OrderEditor currItem="@currRecord" DataReset="ResetData" DataUpdated="UpdateData" SupplierId="@currRecord.SupplierId"></OrderEditor>
|
||||
<OrderSupplierEditor currItem="@currRecord" DataReset="ResetData" DataUpdated="UpdateData" SupplierId="@currRecord.SupplierId"></OrderSupplierEditor>
|
||||
}
|
||||
@if (ListRecords == null)
|
||||
{
|
||||
|
||||
+2
-1
@@ -97,7 +97,8 @@ namespace GWMS.UI
|
||||
|
||||
services.AddStackExchangeRedisCache(options =>
|
||||
{
|
||||
options.Configuration = "localhost:6379";
|
||||
//options.Configuration = "localhost:6379";
|
||||
options.ConfigurationOptions = new StackExchange.Redis.ConfigurationOptions() { KeepAlive = 180, DefaultDatabase = 12, EndPoints = { { "localhost", 6379 } } };
|
||||
});
|
||||
|
||||
services.AddLocalization();
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
{
|
||||
"DetailedErrors": true,
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft": "Warning",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
}
|
||||
}
|
||||
"DetailedErrors": true,
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft": "Warning",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
},
|
||||
"matrixUrl": "http://IIS01/zcode/"
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Trace",
|
||||
"Microsoft": "Warning",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
},
|
||||
"matrixUrl": "http://qrcode.steamware.net/"
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Trace",
|
||||
"Microsoft": "Warning",
|
||||
"Microsoft.Hosting.Lifetime": "Information"
|
||||
}
|
||||
},
|
||||
"matrixUrl": "http://qrcode.steamware.net/"
|
||||
}
|
||||
@@ -10,5 +10,6 @@
|
||||
"ConnectionStrings": {
|
||||
"DefaultConnection": "Server=SQL2016DEV;Database=GWMS;Trusted_Connection=True;MultipleActiveResultSets=true",
|
||||
"GWMS.Data": "Server=SQL2016DEV;Database=GWMS;User ID=sa;Password=keyhammer16;integrated security=False;MultipleActiveResultSets=True;App=GWMS.UI;"
|
||||
}
|
||||
},
|
||||
"matrixUrl": "http://qrcode.steamware.net/"
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>Modulo statistiche MAPO</i>
|
||||
<h4>Versione: 1.0.2106.1918</h4>
|
||||
<h4>Versione: 1.0.2106.2117</h4>
|
||||
<br />
|
||||
Note di rilascio:
|
||||
<ul>
|
||||
|
||||
@@ -1 +1 @@
|
||||
1.0.2106.1918
|
||||
1.0.2106.2117
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>1.0.2106.1918</version>
|
||||
<version>1.0.2106.2117</version>
|
||||
<url>http://nexus.steamware.net/repository/SWS/MP-STATS/stable/0/GWMS.UI.zip</url>
|
||||
<changelog>http://nexus.steamware.net/repository/SWS/MP-STATS/stable/0/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
|
||||
Reference in New Issue
Block a user