Inizio aggiunta gruppo
This commit is contained in:
@@ -4,10 +4,44 @@
|
||||
<div class="px-0">
|
||||
<h4>Elenco Reparti</h4>
|
||||
</div>
|
||||
@* <div class="px-0">
|
||||
Attenzione: non associare OPR a più KIT!
|
||||
</div> *@
|
||||
<div class="px-0">
|
||||
<button @onclick="() => ToggleAddNew()" class="btn @addNewCss btn-sm"><i class="fa-solid @addNewIcon"></i> @addNewTxt</button>
|
||||
</div>
|
||||
</div>
|
||||
@if (EditRec != null)
|
||||
{
|
||||
<div class="row mt-2">
|
||||
<div class="col-12">
|
||||
<div class="card">
|
||||
<div class="card-header bg-primary text-light">Modifica</div>
|
||||
<div class="card-body p-1">
|
||||
<div class="row">
|
||||
<div class="col-2">
|
||||
<div class="form-floating">
|
||||
<input type="text" class="form-control" placeholder="Cod Gruppo" @bind="@EditRec.CodGruppo">
|
||||
<label class="text-secondary">Cod Gruppo</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<div class="form-floating">
|
||||
<input type="text" class="form-control" placeholder="Descrizione Gruppo" @bind="@EditRec.DescrGruppo">
|
||||
<label class="text-secondary">Descrizione Gruppo</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-2 align-content-center">
|
||||
<button class="btn btn-lg btn-warning w-100" @onclick="() => DoCancel()">Annulla <i class="bi bi-x-circle"></i></button>
|
||||
</div>
|
||||
<div class="col-2 align-content-center">
|
||||
<button class="btn btn-lg btn-success w-100" @onclick="() => DoUpdate(EditRec)">Salva <i class="bi bi-save"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
}
|
||||
</div>
|
||||
<div class="card-body p-1">
|
||||
@if (ListRecords == null || isLoading)
|
||||
|
||||
@@ -20,6 +20,8 @@ namespace MP.SPEC.Components.Reparti
|
||||
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
SelRecord = null;
|
||||
EditRec = null;
|
||||
numRecord = 5;
|
||||
}
|
||||
|
||||
@@ -48,7 +50,8 @@ namespace MP.SPEC.Components.Reparti
|
||||
#region Private Fields
|
||||
|
||||
private int currPage = 1;
|
||||
private RepartiDTO? SelRecord = null;
|
||||
|
||||
private AnagGruppiModel? EditRec = null;
|
||||
|
||||
private bool isLoading = false;
|
||||
|
||||
@@ -56,10 +59,30 @@ namespace MP.SPEC.Components.Reparti
|
||||
|
||||
private int numRecord = 5;
|
||||
|
||||
private RepartiDTO? SelRecord = null;
|
||||
|
||||
private int totalCount = 0;
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Private Properties
|
||||
|
||||
private string addNewCss
|
||||
{
|
||||
get => EditRec == null ? "btn-success" : "btn-secondary";
|
||||
}
|
||||
|
||||
private string addNewTxt
|
||||
{
|
||||
get => EditRec == null ? "Add New" : "Close Add New";
|
||||
}
|
||||
private string addNewIcon
|
||||
{
|
||||
get => EditRec == null ? "fa-plus-square" : "fa-minus-square";
|
||||
}
|
||||
|
||||
#endregion Private Properties
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private string CheckSelect(RepartiDTO currRec)
|
||||
@@ -76,6 +99,17 @@ namespace MP.SPEC.Components.Reparti
|
||||
return answ;
|
||||
}
|
||||
|
||||
private void DoUpdate(AnagGruppiModel UpdRec)
|
||||
{
|
||||
// salvo
|
||||
|
||||
EditRec = null;
|
||||
}
|
||||
private void DoCancel()
|
||||
{
|
||||
EditRec = null;
|
||||
}
|
||||
|
||||
private void DoDelete(RepartiDTO currRec)
|
||||
{
|
||||
// eliminazione
|
||||
@@ -91,9 +125,29 @@ namespace MP.SPEC.Components.Reparti
|
||||
private async Task ResetSel()
|
||||
{
|
||||
SelRecord = null;
|
||||
EditRec = null;
|
||||
await EC_RecordSel.InvokeAsync("");
|
||||
}
|
||||
|
||||
private void ToggleAddNew()
|
||||
{
|
||||
if (EditRec == null)
|
||||
{
|
||||
DateTime adesso = DateTime.Now;
|
||||
EditRec = new AnagGruppiModel()
|
||||
{
|
||||
CodGruppo = $"NEW-GROUP-{adesso:yyyyMMdd}-{adesso:HHmmss}",
|
||||
DescrGruppo = "Descrizione",
|
||||
SelEnabled = false,
|
||||
TipoGruppo = "REPARTO"
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
EditRec = null;
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateTable()
|
||||
{
|
||||
totalCount = 0;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<RootNamespace>MP.SPEC</RootNamespace>
|
||||
<Version>6.16.2504.1517</Version>
|
||||
<Version>6.16.2504.1519</Version>
|
||||
<UserSecretsId>1800a78a-6ff1-40f9-b490-87fb8bfc1394</UserSecretsId>
|
||||
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -33,9 +33,8 @@
|
||||
<div class="col-5">
|
||||
<MP.SPEC.Components.Reparti.ListMacchine AllRecords="ListMacchine"></MP.SPEC.Components.Reparti.ListMacchine>
|
||||
</div>
|
||||
<div class="col-4">Operatori per @CodGruppo
|
||||
|
||||
<MP.SPEC.Components.Reparti.ListOperatori AllRecords="ListOperatori"></MP.SPEC.Components.Reparti.ListOperatori>
|
||||
<div class="col-4">
|
||||
<MP.SPEC.Components.Reparti.ListOperatori AllRecords="ListOperatori"></MP.SPEC.Components.Reparti.ListOperatori>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace MP.SPEC.Pages
|
||||
|
||||
private string CssMain
|
||||
{
|
||||
get => ShowDetail ? "col-3" : "col-8";
|
||||
get => ShowDetail ? "col-3" : "col-12";
|
||||
}
|
||||
|
||||
private bool ShowDetail
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>Modulo MAPOSPEC </i>
|
||||
<h4>Versione: 6.16.2504.1517</h4>
|
||||
<h4>Versione: 6.16.2504.1519</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
6.16.2504.1517
|
||||
6.16.2504.1519
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>6.16.2504.1517</version>
|
||||
<version>6.16.2504.1519</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