pescaggio e clonazione flusso scelto

This commit is contained in:
zaccaria.majid
2022-10-11 13:03:56 +02:00
parent 1f10e8537d
commit 16278b6ae0
11 changed files with 129 additions and 31 deletions
+2
View File
@@ -14,5 +14,7 @@ namespace MP.Data.DTO
public class DossierFluxLogDTO
{
public List<FluxLog> ODL { get; set; } = new List<FluxLog>();
public List<FluxLog> OdlClone { get; set; } = new List<FluxLog>();
}
}
+9 -3
View File
@@ -53,10 +53,11 @@ else
@record.IdxODL
</td>
@*<td>
@record.DataType
</td>*@
@record.DataType
</td>*@
<td>
<button @onclick="() => deleteRecord(record)" class="btn btn-danger btn-sm"><i class="bi bi-trash-fill"></i></button></td>
<button @onclick="() => deleteRecord(record)" class="btn btn-danger btn-sm"><i class="bi bi-trash-fill"></i></button>
</td>
</tr>
}
</tbody>
@@ -74,6 +75,7 @@ else
<table class="table table-light table-sm table-striped small mb-0">
<thead>
<tr>
<th></th>
<th><i class="fa-solid fa-hard-drive"></i> Macchina</th>
<th><i class="fa-regular fa-calendar-days"></i> Data</th>
<th><i class="fa-solid fa-sliders"></i> Data Type</th>
@@ -84,6 +86,7 @@ else
@foreach (var record in listaFlux)
{
<tr>
<td><button @onclick="() => cloneRecord(record)" class="btn btn-info btn-sm" title="Duplica Record"><i class="bi bi-clipboard-check"></i></button></td>
<td>
@record.IdxMacchina
</td>
@@ -98,6 +101,7 @@ else
</td>
</tr>
}
</tbody>
</table>
</div>
@@ -110,3 +114,5 @@ else
+18
View File
@@ -1,6 +1,7 @@
using Microsoft.AspNetCore.Components;
using Microsoft.JSInterop;
using MP.Data.DatabaseModels;
using MP.Data.DTO;
using MP.SPEC.Data;
namespace MP.SPEC.Components
@@ -11,6 +12,8 @@ namespace MP.SPEC.Components
[Parameter]
public EventCallback<Dossiers> RecordSel { get; set; }
[Parameter]
public EventCallback<FluxLog> RecordSelFlux { get; set; }
[Parameter]
public SelectDossierParams SelFilter { get; set; } = null!;
@@ -69,6 +72,19 @@ namespace MP.SPEC.Components
await reloadData(true);
await Task.Delay(1);
}
protected async Task cloneRecord(FluxLog selRec)
{
// creo record duplicato...
FluxLog newRec = new FluxLog()
{
IdxMacchina = selRec.IdxMacchina,
dtEvento = selRec.dtEvento,
CodFlux = $"DUPLICATED - {selRec.CodFlux}",
Valore = selRec.Valore
};
currRecordFlux = selRec;
await RecordSelFlux.InvokeAsync(newRec);
}
protected override async Task OnInitializedAsync()
{
@@ -117,6 +133,8 @@ namespace MP.SPEC.Components
private List<Dossiers>? ListRecords;
private FluxLog? currRecordFlux;
private List<ListValues>? ListStati;
private List<Dossiers>? SearchRecords;
+1 -1
View File
@@ -5,7 +5,7 @@
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>MP.SPEC</RootNamespace>
<Version>6.16.2210.1017</Version>
<Version>6.16.2210.1112</Version>
</PropertyGroup>
<ItemGroup>
+64 -10
View File
@@ -14,25 +14,79 @@
}
else
{
<DossiersFilter FilterChanged="updateFilter"></DossiersFilter>
}
</div>
</div>
</div>
<div class="card-body">
@if (isLoading)
@if (currRecord != null)
{
<LoadingData></LoadingData>
}
else
{
<ListDossiers SelFilter="@currFilter" TotRecordChanged="updateTotal"></ListDossiers>
<div class="row">
<div class="col-12">
<div class="card mb-5">
<div class="card-header bg-primary text-light">Modifica Parametro</div>
<div class="card-body">
<div class="row">
<div class="col-3 pe-0">
<div class="input-group input-group-sm">
<span class="input-group-text" id="inputGroup-sizing-sm">MACCHINA</span>
<input type="text" class="form-control" disabled aria-label="Art search" aria-describedby="inputGroup-sizing-sm" value="@currRecord.IdxMacchina">
</div>
</div>
<div class="col-3 pe-0">
<div class="input-group input-group-sm">
<span class="input-group-text" id="inputGroup-sizing-sm">DATA</span>
<input type="text" class="form-control" disabled aria-label="Art search" aria-describedby="inputGroup-sizing-sm" value="@currRecord.dtEvento">
</div>
</div>
<div class="col-3 pe-0">
<div class="input-group input-group-sm">
<span class="input-group-text" id="inputGroup-sizing-sm">DATA TYPE</span>
<input type="text" class="form-control" disabled aria-label="Art search" aria-describedby="inputGroup-sizing-sm" value="@currRecord.CodFlux">
</div>
</div>
<div class="col-3 pe-0">
<div class="input-group input-group-sm">
<span class="input-group-text" id="inputGroup-sizing-sm">VALORE</span>
<input type="text" class="form-control" aria-label="Art search" aria-describedby="inputGroup-sizing-sm" value="@currRecord.Valore">
</div>
</div>
</div>
<div class="row pt-4">
<div class="col-3 pe-0">
</div>
<div class="col-3 pe-0">
</div>
<div class="col-3 pe-0">
<div class="d-grid gap-2">
<button @onclick="() => cancel()" class="btn btn-warning">Annulla <i class="bi bi-x-circle"></i></button>
</div>
</div>
<div class="col-3 pe-0">
<div class="d-grid gap-2">
<button class="btn btn-success">Save <i class="bi bi-save"></i></button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
}
</div>
<div class="card-footer py-1">
<DataPager @ref="pagerODL" PageSize="numRecord" currPage="currPage" numRecordChanged="ForceReload" numPageChanged="ForceReloadPage" totalCount="totalCount" showLoading="isLoading" />
</div>
@if (isLoading)
{
<LoadingData></LoadingData>
}
else
{
<ListDossiers SelFilter="@currFilter" RecordSelFlux="@selRecordFlux" TotRecordChanged="updateTotal"></ListDossiers>
}
</div>
<div class="card-footer py-1">
<DataPager @ref="pagerODL" PageSize="numRecord" currPage="currPage" numRecordChanged="ForceReload" numPageChanged="ForceReloadPage" totalCount="totalCount" showLoading="isLoading" />
</div>
+20 -2
View File
@@ -1,4 +1,5 @@
using Microsoft.AspNetCore.Components;
using MP.Data.DatabaseModels;
using MP.SPEC.Components;
using MP.SPEC.Data;
@@ -31,7 +32,20 @@ namespace MP.SPEC.Pages
currPage = newNum;
StateHasChanged();
}
private FluxLog? _currRecord = null;
private FluxLog? currRecord
{
get => _currRecord;
set
{
_currRecord = value;
}
}
protected async Task cancel()
{
currRecord = null;
await Task.Delay(1);
}
protected override async Task OnInitializedAsync()
{
isLoading = true;
@@ -47,7 +61,11 @@ namespace MP.SPEC.Pages
await Task.Delay(1);
isFiltering = false;
}
protected async Task selRecordFlux(FluxLog selRec)
{
currRecord = selRec;
await Task.Delay(1);
}
protected void updateTotal(int newTotCount)
{
totalCount = newTotCount;
+1 -1
View File
@@ -148,7 +148,7 @@
<div class="pe-3" title="Attivabile">
Attivabile
</div>
<div class="form-check form-check-sm form-switch py-1" title="Attivabile">
<div class="form-check form-check-sm form-switch py-1" title="Attivabile">
<input class="form-check-input" type="checkbox" id="mySwitch" name="setupAlarms" title="Attivabile" @bind="@currRecord.Attivabile">
</div>
</div>
+11 -11
View File
@@ -44,19 +44,19 @@
retryIntervalMilliseconds: 2000
}
}).then(() => {
Object.defineProperty(Blazor.defaultReconnectionHandler, '_reconnectionDisplay', {
get() {
return this.__reconnectionDisplay;
},
set(value) {
this.__reconnectionDisplay = {
show: () => value.show(),
update: (d) => value.update(d),
rejected: (d) => document.location.reload()
}
Object.defineProperty(Blazor.defaultReconnectionHandler, '_reconnectionDisplay', {
get() {
return this.__reconnectionDisplay;
},
set(value) {
this.__reconnectionDisplay = {
show: () => value.show(),
update: (d) => value.update(d),
rejected: (d) => document.location.reload()
}
});
}
});
});
</script>
</body>
</html>
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>Modulo MAPOSPEC </i>
<h4>Versione: 6.16.2210.1017</h4>
<h4>Versione: 6.16.2210.1112</h4>
<br /> Note di rilascio:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
6.16.2210.1017
6.16.2210.1112
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>6.16.2210.1017</version>
<version>6.16.2210.1112</version>
<url>https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/MP.SPEC.zip</url>
<changelog>https://nexus.steamware.net/repository/SWS/MP-SPEC/stable/LAST/ChangeLog.html</changelog>
<mandatory>false</mandatory>