update parziale x scomrporare componente
This commit is contained in:
@@ -0,0 +1,147 @@
|
||||
@if (reqNew)
|
||||
{
|
||||
<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>
|
||||
Avvia una nuova sessione
|
||||
</div>
|
||||
<div>
|
||||
@*@if (isEditing)
|
||||
{
|
||||
<span class="text-light">PENDING CHANGES...</span>
|
||||
}*@
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-4 pe-0">
|
||||
<div class="input-group input-group-sm">
|
||||
<span class="input-group-text" id="inputGroup-sizing-sm">Magazzino</span>
|
||||
<select class="form-select" @bind="@magazzino">
|
||||
<option value="-1" selected>--Selezionare magazzino--</option>
|
||||
@if (elencoMagazzini != null)
|
||||
{
|
||||
@foreach (var item in elencoMagazzini)
|
||||
{
|
||||
<option value="@item.MagID">@item.CodMag @item.CodCS | @item.DescMag</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-8 pe-0">
|
||||
<div class="input-group input-group-sm">
|
||||
<span class="input-group-text" id="inputGroup-sizing-sm">Descrizione</span>
|
||||
<input type="text" class="form-control" aria-label="Art search" aria-describedby="inputGroup-sizing-sm" @bind="@desc">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row pt-4" style="visibility:">
|
||||
<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 class="btn btn-warning" @onclick="closeNew">Annulla <i class="bi bi-x-circle"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-3 pe-0">
|
||||
@if (magazzino != -1)
|
||||
{
|
||||
<div class="d-grid gap-2">
|
||||
<button class="btn btn-success" @onclick="insertNewSession">Save <i class="bi bi-save"></i></button>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
@if (inCorso)
|
||||
{
|
||||
<th scope="col">QR</th>
|
||||
}
|
||||
<th scope="col">ID sessione</th>
|
||||
<th scope="col">Magazzino</th>
|
||||
<th scope="col">Operatore</th>
|
||||
<th scope="col">Data inizio</th>
|
||||
<th scope="col">Data fine</th>
|
||||
<th scope="col">Description</th>
|
||||
<th scope="col">Trasferita</th>
|
||||
<th scope="col"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if (elencoSessioni != null)
|
||||
{
|
||||
@foreach (var item in elencoSessioni)
|
||||
{
|
||||
<tr>
|
||||
@if (inCorso)
|
||||
{
|
||||
<td>
|
||||
<!-- Button trigger modal -->
|
||||
<button type="button" class="btn btn-dark" data-bs-toggle="modal" data-bs-target="#exampleModal" @onclick="()=> getCurrSess(item.InveSessID)" title="Apri qr per connettersi alla sessione">
|
||||
<i class="fa-solid fa-qrcode"></i>
|
||||
</button>
|
||||
</td>
|
||||
}
|
||||
<td>
|
||||
@item.InveSessID
|
||||
</td>
|
||||
<td>
|
||||
@item.AnagMagNav.DescMag
|
||||
</td>
|
||||
|
||||
<td>
|
||||
@item.UserCrea
|
||||
</td>
|
||||
<td>
|
||||
@item.DtStart
|
||||
</td>
|
||||
@if (item.DtEnd != null)
|
||||
{
|
||||
<td>
|
||||
@item.DtEnd
|
||||
</td>
|
||||
}
|
||||
else
|
||||
{
|
||||
<td>
|
||||
In corso...
|
||||
</td>
|
||||
}
|
||||
<td>
|
||||
@item.Description
|
||||
</td>
|
||||
<td>
|
||||
@if (item.Transferred)
|
||||
{
|
||||
<i class="fa-regular fa-square-check text-success"></i>
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
<i class="fa-regular fa-square text-dark"></i>
|
||||
}
|
||||
</td>
|
||||
<td>
|
||||
<button class="btn btn-danger btn-sm" @onclick="()=>deleteSession(item)">
|
||||
<i class="fa-solid fa-trash-can"></i>
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
}
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -0,0 +1,88 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using System.Net.Http;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Components.Authorization;
|
||||
using Microsoft.AspNetCore.Components.Forms;
|
||||
using Microsoft.AspNetCore.Components.Routing;
|
||||
using Microsoft.AspNetCore.Components.Web;
|
||||
using Microsoft.AspNetCore.Components.Web.Virtualization;
|
||||
using Microsoft.JSInterop;
|
||||
using MP.INVE;
|
||||
using MP.INVE.Shared;
|
||||
using MP.INVE.Components;
|
||||
using MP.INVE.Data;
|
||||
using MP.Data.DatabaseModels;
|
||||
|
||||
namespace MP.INVE.Components
|
||||
{
|
||||
public partial class InveSessionList
|
||||
{
|
||||
|
||||
|
||||
private bool reqNew { get; set; } = false;
|
||||
private string matrOpr { get; set; } = "";
|
||||
private int magazzino { get; set; } = 0;
|
||||
private string desc { get; set; } = "";
|
||||
|
||||
private int totalCount
|
||||
{
|
||||
get => currParams.TotCount;
|
||||
set => currParams.TotCount = value;
|
||||
}
|
||||
private int numRecord
|
||||
{
|
||||
get => currParams.NumRec;
|
||||
set
|
||||
{
|
||||
currParams.NumRec = value;
|
||||
StateHasChanged();
|
||||
}
|
||||
}
|
||||
private int currPage
|
||||
{
|
||||
get => currParams.CurrPage;
|
||||
set
|
||||
{
|
||||
currParams.CurrPage = value;
|
||||
StateHasChanged();
|
||||
}
|
||||
}
|
||||
|
||||
private async Task reloadData()
|
||||
{
|
||||
elencoSessioni = null;
|
||||
isLoading = true;
|
||||
if (inCorso)
|
||||
{
|
||||
SearchRecords = MIDataservice.InventSessCurrList();
|
||||
}
|
||||
else
|
||||
{
|
||||
SearchRecords = MIDataservice.InventSessHistList(dtStart, dtEnd);
|
||||
}
|
||||
totalCount = SearchRecords.Count;
|
||||
elencoSessioni = SearchRecords.Skip(numRecord * (currPage - 1)).Take(numRecord).ToList();
|
||||
await Task.Delay(1);
|
||||
await InvokeAsync(() => StateHasChanged());
|
||||
await Task.Delay(1);
|
||||
isLoading = false;
|
||||
}
|
||||
|
||||
[Parameter]
|
||||
public DataPagerParams currParams { get; set; } = null!;
|
||||
|
||||
[Parameter]
|
||||
public bool isLoading { get; set; }
|
||||
[Parameter]
|
||||
public bool isCorso { get; set; }
|
||||
|
||||
private List<InventorySessionModel>? elencoSessioni;
|
||||
private List<InventorySessionModel>? SearchRecords;
|
||||
private List<AnagOperatoriModel>? elencoOperatori;
|
||||
private List<AnagMagModel>? elencoMagazzini;
|
||||
}
|
||||
}
|
||||
@@ -32,7 +32,8 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
@if (reqNew)
|
||||
<InveSessionList currParams="@currParams" isLoading="@isLoading" isCorso="@inCorso"></InveSessionList>
|
||||
@*@if (reqNew)
|
||||
{
|
||||
|
||||
<div class="row">
|
||||
@@ -43,10 +44,6 @@
|
||||
Avvia una nuova sessione
|
||||
</div>
|
||||
<div>
|
||||
@*@if (isEditing)
|
||||
{
|
||||
<span class="text-light">PENDING CHANGES...</span>
|
||||
}*@
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@@ -179,12 +176,13 @@
|
||||
}
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</table>*@
|
||||
}
|
||||
|
||||
</div>
|
||||
<div class="card-footer py-1">
|
||||
<DataPager @ref="pagerSession" PageSize="numRecord" currPage="currPage" numRecordChanged="ForceReload" numPageChanged="ForceReloadPage" totalCount="totalCount" showLoading="@isLoading" />
|
||||
@*<DataPager @ref="pagerSession" PageSize="numRecord" currPage="currPage" numRecordChanged="ForceReload" numPageChanged="ForceReloadPage" totalCount="totalCount" showLoading="@isLoading" />*@
|
||||
<DataPager PageSize="numRecord" currPage="currPage" numRecordChanged="ForceReload" numPageChanged="ForceReloadPage" totalCount="totalCount" showLoading="@isLoading" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -21,12 +21,12 @@ using Blazored.LocalStorage;
|
||||
|
||||
namespace MP.INVE.Pages
|
||||
{
|
||||
public partial class Session
|
||||
public partial class InveSession
|
||||
{
|
||||
[Inject]
|
||||
private MiDataService MIDataservice { get; set; } = null!;
|
||||
|
||||
DataPagerParams currParams = new DataPagerParams();
|
||||
private DataPagerParams currParams = new DataPagerParams();
|
||||
|
||||
private List<InventorySessionModel>? elencoSessioni;
|
||||
private List<InventorySessionModel>? SearchRecords;
|
||||
@@ -39,8 +39,8 @@ namespace MP.INVE.Pages
|
||||
{
|
||||
//await FilterChanged.InvokeAsync(actFilter);
|
||||
await getId();
|
||||
await Task.Delay(1);
|
||||
await reloadData();
|
||||
//await Task.Delay(1);
|
||||
//await reloadData();
|
||||
}
|
||||
|
||||
private bool inCorso { get; set; } = true;
|
||||
@@ -118,11 +118,14 @@ namespace MP.INVE.Pages
|
||||
}
|
||||
}
|
||||
|
||||
private bool reqNew { get; set; } = false;
|
||||
private bool isLoading { get; set; } = false;
|
||||
#if false
|
||||
private bool reqNew { get; set; } = false;
|
||||
private string matrOpr { get; set; } = "";
|
||||
private int magazzino { get; set; } = 0;
|
||||
private string desc { get; set; } = "";
|
||||
private string desc { get; set; } = "";
|
||||
#endif
|
||||
#if false
|
||||
private int totalCount
|
||||
{
|
||||
get => currParams.TotCount;
|
||||
@@ -145,10 +148,12 @@ namespace MP.INVE.Pages
|
||||
currParams.CurrPage = value;
|
||||
StateHasChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
private async Task reloadData()
|
||||
{
|
||||
#if false
|
||||
elencoSessioni = null;
|
||||
isLoading = true;
|
||||
if (inCorso)
|
||||
@@ -164,7 +169,8 @@ namespace MP.INVE.Pages
|
||||
await Task.Delay(1);
|
||||
await InvokeAsync(() => StateHasChanged());
|
||||
await Task.Delay(1);
|
||||
isLoading = false;
|
||||
isLoading = false;
|
||||
#endif
|
||||
}
|
||||
protected async Task getCurrSess(int idSess)
|
||||
{
|
||||
@@ -185,13 +191,11 @@ namespace MP.INVE.Pages
|
||||
protected void ForceReload(int newNum)
|
||||
{
|
||||
numRecord = newNum;
|
||||
StateHasChanged();
|
||||
}
|
||||
|
||||
protected void ForceReloadPage(int newNum)
|
||||
{
|
||||
currPage = newNum;
|
||||
StateHasChanged();
|
||||
}
|
||||
protected override async Task OnParametersSetAsync()
|
||||
{
|
||||
@@ -43,7 +43,7 @@
|
||||
</NavLink>
|
||||
</div>
|
||||
<div class="nav-item px-2 col-12">
|
||||
<NavLink class="nav-link px-2" href="Session">
|
||||
<NavLink class="nav-link px-2" href="InveSession">
|
||||
<div class="col-2">
|
||||
<span class="px-2" aria-hidden="true"><i class="fa-solid fa-spinner"></i></span>
|
||||
</div>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<RootNamespace>MP.SPEC</RootNamespace>
|
||||
<Version>6.16.2211.1812</Version>
|
||||
<Version>6.16.2211.1814</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>Modulo MAPOSPEC </i>
|
||||
<h4>Versione: 6.16.2211.1812</h4>
|
||||
<h4>Versione: 6.16.2211.1814</h4>
|
||||
<br /> Note di rilascio:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
6.16.2211.1812
|
||||
6.16.2211.1814
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>6.16.2211.1812</version>
|
||||
<version>6.16.2211.1814</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