inizio gestione selezione
This commit is contained in:
@@ -36,6 +36,7 @@
|
||||
<table class="table table-sm table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>Lemma</td>
|
||||
<td class="text-end w-75">Traduzione</td>
|
||||
</tr>
|
||||
@@ -44,9 +45,13 @@
|
||||
@foreach (var item in ListPaged)
|
||||
{
|
||||
<tr>
|
||||
<td><button class="btn btn-outline-primary btn-sm" @onclick="() => DoEdit(item)"><i class="fa-solid fa-pen me-2"></i> @item.Lemma</button></td>
|
||||
<td>
|
||||
<button class="btn btn-outline-info btn-sm" @onclick="() => DoSelect(item)"><i class="fa-solid fa-pen"></i></button>
|
||||
<button class="btn btn-outline-primary btn-sm" @onclick="() => DoEdit(item)"><i class="fa-solid fa-pen"></i></button>
|
||||
</td>
|
||||
<td>@item.Lemma</td>
|
||||
<td class="text-end">
|
||||
@if (currRec != null && item.Lemma == currRec.Lemma && item.Lingua == currRec.Lingua)
|
||||
@if (editRec != null && item.Lemma == editRec.Lemma && item.Lingua == editRec.Lingua)
|
||||
{
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" @bind="@item.Traduzione">
|
||||
|
||||
@@ -48,7 +48,7 @@ namespace Lux.UI.Components.Compo.Admin
|
||||
#region Private Fields
|
||||
|
||||
private int currPage = 1;
|
||||
private VocabolarioModel? currRec = null;
|
||||
private VocabolarioModel? editRec = null;
|
||||
private bool isLoading = false;
|
||||
private List<VocabolarioModel> ListPaged = new();
|
||||
private int numRecord = 10;
|
||||
@@ -61,18 +61,22 @@ namespace Lux.UI.Components.Compo.Admin
|
||||
|
||||
private void DoCancel()
|
||||
{
|
||||
currRec = null;
|
||||
editRec = null;
|
||||
}
|
||||
|
||||
private void DoEdit(VocabolarioModel selRec)
|
||||
{
|
||||
currRec = currRec == null || currRec.Lemma != selRec.Lemma ? selRec : null;
|
||||
editRec = editRec == null || editRec.Lemma != selRec.Lemma ? selRec : null;
|
||||
}
|
||||
private void DoSelect(VocabolarioModel selRec)
|
||||
{
|
||||
editRec = editRec == null || editRec.Lemma != selRec.Lemma ? selRec : null;
|
||||
}
|
||||
|
||||
private async Task DoSave()
|
||||
{
|
||||
await EC_Updated.InvokeAsync(currRec);
|
||||
currRec = null;
|
||||
await EC_Updated.InvokeAsync(editRec);
|
||||
editRec = null;
|
||||
}
|
||||
|
||||
private void FiltLingua()
|
||||
|
||||
@@ -1,2 +1 @@
|
||||
1.1.2606.0411
|
||||
1.1.2606.0411
|
||||
|
||||
@@ -5,10 +5,3 @@
|
||||
<changelog>http://nexus.steamware.net/repository/SWS/GPW/stable/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
</item>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>1.1.2606.0411</version>
|
||||
<url>http://nexus.steamware.net/repository/SWS/GPW/stable/GPW.UI.zip</url>
|
||||
<changelog>http://nexus.steamware.net/repository/SWS/GPW/stable/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
</item>
|
||||
|
||||
Reference in New Issue
Block a user