Prima bozza aggiunta nuovo dossier
This commit is contained in:
@@ -14,6 +14,7 @@ else if (totalCount == 0)
|
||||
}
|
||||
else
|
||||
{
|
||||
<!-- INIZIO: MODIFICA FLUSSO -->
|
||||
@if (currFluxLogDto != null)
|
||||
{
|
||||
<div class="row">
|
||||
@@ -78,6 +79,97 @@ else
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
<!-- FINE: MODIFICA FLUSSO -->
|
||||
<!-- INIZIO: NUOVO DOSSIER -->
|
||||
@if (currRecordClone != null)
|
||||
{
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="card mb-5">
|
||||
<div class="card-header bg-primary text-light d-flex justify-content-between">
|
||||
<div>
|
||||
Modifica Parametro
|
||||
</div>
|
||||
<div>
|
||||
@if (isEditing)
|
||||
{
|
||||
<span class="text-light">PENDING CHANGES...</span>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<!--INIZIO PRIMA RIGA-->
|
||||
<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">ARTICOLO</span>
|
||||
<input type="text" class="form-control" aria-label="Art search" aria-describedby="inputGroup-sizing-sm" @bind-value="currRecordClone.CodArticolo " @onclick="()=> enableEditing()">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-3 pe-0">
|
||||
<div class="input-group input-group-sm">
|
||||
<span class="input-group-text" id="inputGroup-sizing-sm">FASE</span>
|
||||
<select class="form-select">
|
||||
@*<option value="@tradFase(currRecordClone.OdlNav.KeyRichiesta)"></option>*@
|
||||
@if (ListGruppiFase != null)
|
||||
{
|
||||
foreach (var item in ListGruppiFase)
|
||||
{
|
||||
<option value="@item.CodGruppo">@item.CodGruppo | @item.DescrGruppo</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<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" aria-label="Art search" aria-describedby="inputGroup-sizing-sm" @bind-value="currRecordClone.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" aria-label="Art search" aria-describedby="inputGroup-sizing-sm" @bind-value="currRecordClone.DtRif">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--FINE PRIMA RIGA-->
|
||||
|
||||
|
||||
<div class="row pt-4" style="visibility: @css()">
|
||||
<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 @onclick="() => newDossier(currRecordClone)" class="btn btn-success">Save <i class="bi bi-save"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
<!-- FINE: NUOVO DOSSIER -->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="d-flex justify justify-content-between">
|
||||
<table class="table table-sm table-striped small">
|
||||
@@ -101,8 +193,10 @@ else
|
||||
<td>
|
||||
@if (isEditing == false)
|
||||
{
|
||||
|
||||
<!--SEL RECORD PER VISUALIZZAZIONE FLUSSI-->
|
||||
<button class="btn btn-primary btn-sm" @onclick="() => selRecord(record)"><i class="fa-solid fa-magnifying-glass"></i></button>
|
||||
<!--SEL RECORD PER CLONA DOSSIER-->
|
||||
<button @onclick="()=> cloneRecord(record)" class="btn btn-info btn-sm" title="Duplica Record"><i class="bi bi-clipboard-check"></i></button>
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -171,8 +171,47 @@ namespace MP.SPEC.Components
|
||||
|
||||
}
|
||||
|
||||
protected async Task newDossier(Dossiers selRec)
|
||||
{
|
||||
var alert = await JSRuntime.InvokeAsync<bool>("confirm", "Confermi di voler salvare TUTTE le modifiche? queste saranno parte del dossier inviato all'impianto");
|
||||
|
||||
if (alert)
|
||||
{
|
||||
|
||||
await Task.Delay(1);
|
||||
if (currRecordClone != null)
|
||||
{
|
||||
// serializzo valore x flux log...
|
||||
DossierFluxLogDTO updatedResult = new DossierFluxLogDTO() { ODL = listaFlux };
|
||||
string newVal = JsonConvert.SerializeObject(updatedResult);
|
||||
currRecordClone.DataType = selRec.DataType;
|
||||
currRecordClone.DtRif = DateTime.Now;
|
||||
currRecordClone.IdxMacchina = selRec.DataType;
|
||||
currRecordClone.CodArticolo = selRec.CodArticolo;
|
||||
currRecordClone.IdxODL = selRec.IdxODL;
|
||||
currRecordClone.Valore = newVal;
|
||||
// METODO PER UPDATE FLUX
|
||||
await MDService.DossiersInsert(currRecordClone);
|
||||
currRecordClone = null;
|
||||
isEditing = false;
|
||||
await Task.Delay(1);
|
||||
StateHasChanged();
|
||||
}
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
currFluxLogDto = null;
|
||||
await Task.Delay(1);
|
||||
await JSRuntime.InvokeAsync<bool>("location.reload");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
ListGruppiFase = await MDService.ElencoGruppiFase();
|
||||
ListStati = await MDService.AnagStatiComm();
|
||||
await reloadData(true);
|
||||
}
|
||||
@@ -193,6 +232,23 @@ namespace MP.SPEC.Components
|
||||
listaFlux = MDService.getFluxLog(selRec.Valore);
|
||||
await toggleTableFlux();
|
||||
}
|
||||
protected async Task cloneRecord(Dossiers selRec)
|
||||
{
|
||||
// creo record duplicato...
|
||||
Dossiers newRec = new Dossiers()
|
||||
{
|
||||
IdxDossier = selRec.IdxDossier,
|
||||
DataType = selRec.DataType,
|
||||
DtRif = selRec.DtRif,
|
||||
IdxMacchina = selRec.IdxMacchina,
|
||||
CodArticolo = selRec.CodArticolo,
|
||||
IdxODL = selRec.IdxODL,
|
||||
Valore = selRec.Valore,
|
||||
};
|
||||
currRecordClone = selRec;
|
||||
await Task.Delay(1);
|
||||
}
|
||||
private List<AnagGruppi>? ListGruppiFase;
|
||||
|
||||
protected async Task UpdateData()
|
||||
{
|
||||
@@ -220,6 +276,7 @@ namespace MP.SPEC.Components
|
||||
private int _totalCount = 0;
|
||||
|
||||
private Dossiers? currRecord = null;
|
||||
private Dossiers? currRecordClone = null;
|
||||
|
||||
private FluxLogDTO? currRecordFlux;
|
||||
private List<Dossiers>? ListRecords;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<RootNamespace>MP.SPEC</RootNamespace>
|
||||
<Version>6.16.2211.311</Version>
|
||||
<Version>6.16.2211.317</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>Modulo MAPOSPEC </i>
|
||||
<h4>Versione: 6.16.2211.311</h4>
|
||||
<h4>Versione: 6.16.2211.317</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
6.16.2211.311
|
||||
6.16.2211.317
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>6.16.2211.311</version>
|
||||
<version>6.16.2211.317</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>
|
||||
|
||||
Reference in New Issue
Block a user