Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
Samuele Locatelli
2022-11-21 15:30:04 +01:00
28 changed files with 819 additions and 242 deletions
+113
View File
@@ -135,6 +135,19 @@ SPEC:build:
script:
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
INVE:build:
stage: build
tags:
- win
variables:
APP_NAME: MP.INVE
SOL_NAME: MP-INVE
before_script:
- *nuget-fix
- dotnet restore "$env:SOL_NAME.sln"
script:
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
# WAMON:build:
# stage: build
# tags:
@@ -246,6 +259,23 @@ SPEC:test:
script:
- dotnet test $env:APP_NAME/$env:APP_NAME.csproj
INVE:test:
stage: test
tags:
- win
variables:
APP_NAME: MP.INVE
SOL_NAME: MP-INVE
before_script:
- *nuget-fix
- dotnet restore "$env:SOL_NAME.sln"
only:
- develop
needs: ["INVE:build"]
script:
- dotnet test $env:APP_NAME/$env:APP_NAME.csproj
LAND:IIS01:deploy:
stage: deploy
tags:
@@ -331,6 +361,24 @@ SPEC:IIS01:deploy:
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
INVE:IIS01:deploy:
stage: deploy
tags:
- win
variables:
APP_NAME: MP.INVE
SOL_NAME: MP-INVE
before_script:
- *nuget-fix
- dotnet restore "$env:SOL_NAME.sln"
only:
- develop
needs: ["INVE:test"]
script:
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
LAND:IIS02:deploy:
stage: deploy
tags:
@@ -421,6 +469,25 @@ SPEC:IIS02:deploy:
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS03.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
INVE:IIS02:deploy:
stage: deploy
tags:
- win
variables:
APP_NAME: MP.INVE
SOL_NAME: MP-INVE
before_script:
- *nuget-fix
- dotnet restore "$env:SOL_NAME.sln"
only:
- master
needs: ["INVE:build"]
script:
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IIS03.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=viadante16 -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
LAND:installer:
stage: installer
tags:
@@ -531,6 +598,28 @@ SPEC:installer:
- *hashBuild
- *nexusUpload
INVE:installer:
stage: installer
tags:
- win
variables:
APP_NAME: MP.INVE
SOL_NAME: MP-INVE
NEXUS_PATH: MP-INVE
before_script:
- *nuget-fix
- dotnet restore "$env:SOL_NAME.sln"
only:
- develop
- master
needs: ["INVE:build"]
script:
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -p:PublishProfile=IISProfile.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release $env:APP_NAME/$env:APP_NAME.csproj -o:publish -p:verbosity=quiet
# qui il deploy su nexus...
- *hashBuild
- *nexusUpload
LAND:release:
stage: release
tags:
@@ -652,3 +741,27 @@ SPEC:release:
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -c Release -o ./publish $env:APP_NAME/$env:APP_NAME.csproj -p:verbosity=quiet
INVE:release:
stage: release
tags:
- win
variables:
APP_NAME: MP.INVE
SOL_NAME: MP-INVE
NEXUS_PATH: MP-INVE
before_script:
- *nuget-fix
- dotnet restore "$env:SOL_NAME.sln"
only:
- tags
except:
- branches
needs: ["INVE:build"]
artifacts:
paths:
- publish/
script:
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
- dotnet publish -c Release -o ./publish $env:APP_NAME/$env:APP_NAME.csproj -p:verbosity=quiet
+36
View File
@@ -125,6 +125,42 @@ namespace MP.Data.Controllers
return fatto;
}
/// <summary>
/// modifica di un record magazzino
/// </summary>
/// <returns></returns>
public async Task<bool> UpdateMag(AnagMagModel magRec)
{
bool fatto = false;
using (var dbCtx = new MoonPro_InveContext(_configuration))
{
try
{
var dbResult =
dbCtx
.DbAnagMag
.AsNoTracking()
.Where(x => x.MagID == magRec.MagID)
.FirstOrDefault();
if (dbResult != null)
{
if (dbResult.DescMag != magRec.DescMag)
{
dbResult.DescMag = magRec.DescMag.ToUpper();
dbCtx.Entry(dbResult).State = EntityState.Modified;
}
}
await dbCtx.SaveChangesAsync();
fatto = true;
}
catch (Exception exc)
{
Log.Error($"Eccezione durante UpdateMag{Environment.NewLine}{exc}");
}
}
return fatto;
}
/// <summary>
/// delete magazzino
/// </summary>
+78 -75
View File
@@ -1,75 +1,78 @@
@if (reqNew)
@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>
<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>
</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>
@if (!item.DescMag.Contains("NON USARE"))
{
<option value="@item.MagID">@item.CodMag @item.CodCS | @item.DescMag</option>
}
}
}
</select>
</div>
</select>
</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 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 class="col-3 pe-0">
</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 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">
</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 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>
</div>
}
<table class="table">
<thead>
<tr>
@if (inCorso)
{
<th scope="col">QR</th>
<th scope="col">QR</th>
}
<th scope="col">ID sessione</th>
<th scope="col">Magazzino</th>
@@ -86,68 +89,68 @@
{
@foreach (var item in elencoSessioni)
{
<tr>
<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>
<!-- 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>
<td>
@item.InveSessID
</td>
<td>
</td>
<td>
@item.AnagMagNav.DescMag
</td>
</td>
<td>
<td>
@item.UserCrea
</td>
<td>
</td>
<td>
@item.DtStart
</td>
</td>
@if (item.DtEnd != null)
{
<td>
<td>
@item.DtEnd
</td>
</td>
}
else
{
<td>
In corso...
</td>
<td>
In corso...
</td>
}
<td>
<td>
@item.Description
</td>
<td>
</td>
<td>
@if (item.Transferred)
{
<i class="fa-regular fa-square-check text-success"></i>
<i class="fa-regular fa-square-check text-success"></i>
}
else
{
<i class="fa-regular fa-square text-dark"></i>
<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>
</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>
<!-- Modal -->
<div class="modal fade" id="exampleModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog">
+9 -4
View File
@@ -67,6 +67,11 @@ namespace MP.INVE.Components
get => currParams.idOperatore;
set => currParams.idOperatore = value;
}
private string authKey
{
get => currParams.authKey;
set => currParams.authKey = value;
}
private bool inCorso
{
get => currParams.inCorso;
@@ -81,11 +86,10 @@ namespace MP.INVE.Components
elencoMagazzini = new List<AnagMagModel>();
}
private string authKey { get; set; } = "";
private DateTime dtStart { get; set; } = DateTime.Now.AddMonths(-1);
private DateTime dtEnd { get; set; } = DateTime.Now;
protected string BaseUrlTab { get => $"{Configuration["ServerConf:BaseUrlJumper"]}"; }
protected string BaseUrlTab { get => $"{Configuration["ServerConf:BaseUrl"]}"; }
protected string rawCode
@@ -131,7 +135,7 @@ namespace MP.INVE.Components
};
await MIDataservice.InsertNewSessione(newSess);
NavManager.NavigateTo(NavManager.Uri, true);
NavManager.NavigateTo("Session", true);
await reloadData();
}
else
@@ -142,6 +146,7 @@ namespace MP.INVE.Components
protected override async Task OnParametersSetAsync()
{
await reloadData();
await popola();
}
private async Task deleteSession(InventorySessionModel session)
@@ -150,7 +155,7 @@ namespace MP.INVE.Components
if (alert)
{
await MIDataservice.deleteSessione(session);
NavManager.NavigateTo(NavManager.Uri, true);
NavManager.NavigateTo("Session", true);
await reloadData();
}
}
+117
View File
@@ -0,0 +1,117 @@
@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>
</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">Codice magazzino</span>
@if (mod)
{
<input type="text" class="form-control" aria-label="Art search" aria-describedby="inputGroup-sizing-sm" @bind-value="@currMag.CodMag">
}
else
{
<input type="text" class="form-control" aria-label="Art search" aria-describedby="inputGroup-sizing-sm" @bind="@codMag">
}
</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>
@if (mod)
{
<input type="text" class="form-control" aria-label="Art search" aria-describedby="inputGroup-sizing-sm" @bind-value="@currMag.DescMag">
}
else
{
<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 (codMag != "")
{
<div class="d-grid gap-2">
<button class="btn btn-success" @onclick="insertNewMag">Save <i class="bi bi-save"></i></button>
</div>
}
@if (mod)
{
@if (!currMag.DescMag.Contains("NON USARE"))
{
<div class="d-grid gap-2">
<button class="btn btn-success" @onclick="()=>modMag(currMag)">Save <i class="bi bi-save"></i></button>
</div>
}
}
</div>
</div>
</div>
</div>
</div>
</div>
}
<table class="table">
<thead>
<tr>
<th scope="col">ID magazzino</th>
<th scope="col">Codice magazzino</th>
<th scope="col">Codice azienda</th>
<th scope="col">Descrizione</th>
<th scope="col"></th>
</tr>
</thead>
<tbody>
@if (elencoMagazzini != null)
{
@foreach (var item in elencoMagazzini)
{
<tr>
<td>
@item.MagID
</td>
<td>
@item.CodMag
</td>
<td>
@item.CodCS
</td>
<td>
@item.DescMag
</td>
<td>
<button class="btn btn-primary btn-sm" @onclick="()=>reqModMag(item)">
<i class="fa-solid fa-pen-to-square"></i>
</button>
</td>
</tr>
}
}
</tbody>
</table>
+160
View File
@@ -0,0 +1,160 @@
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 Blazored.LocalStorage;
using Blazored.SessionStorage;
using MP.Data.DatabaseModels;
using MP.INVE.Data;
namespace MP.INVE.Components
{
public partial class MagList
{
[Inject]
private IConfiguration Configuration { get; set; } = null!;
[Inject]
private ISessionStorageService sessionStorage { get; set; } = null!;
[Inject]
private ILocalStorageService localStorage { get; set; } = null!;
[Inject]
private MiDataService MIDataservice { get; set; } = null!;
[Inject]
private NavigationManager NavManager { get; set; } = null!;
[Inject]
private IJSRuntime JSRuntime { get; set; } = null!;
[Parameter]
public SelectMagListParams currParams { get; set; } = null!;
[Parameter]
public bool isLoading { get; set; }
protected override async Task OnParametersSetAsync()
{
await reloadData();
}
private void closeNew()
{
reqNew = false;
codMag = "";
mod = false;
desc = "";
}
private List<AnagMagModel>? elencoMagazzini;
private List<AnagMagModel>? SearchRecords;
private AnagMagModel currMag { get; set; } = null!;
private bool mod { get; set; } = false;
private async Task insertNewMag()
{
var alert = await JSRuntime.InvokeAsync<bool>("confirm", "Confermi di voler creare un nuovo magazzino?");
if (alert)
{
AnagMagModel newMag = new AnagMagModel()
{
CodMag = codMag,
CodCS = "EC",
DescMag = desc,
Nascosto = false
};
await MIDataservice.InsertNewMag(newMag);
NavManager.NavigateTo("Elencomagazzini", true);
//await MIDataservice.FlushRedisCache();
await reloadData();
}
else
{
closeNew();
}
}
private async Task reloadData()
{
isLoading = true;
elencoMagazzini = null;
SearchRecords = null;
SearchRecords = MIDataservice.ElencoMagazzini();
totalCount = SearchRecords.Count;
elencoMagazzini = SearchRecords.Skip(numRecord * (currPage - 1)).Take(numRecord).ToList();
await Task.Delay(1);
await InvokeAsync(() => StateHasChanged());
await Task.Delay(1);
isLoading = false;
}
private async Task modMag(AnagMagModel mag)
{
var alert = await JSRuntime.InvokeAsync<bool>("confirm", "Confermi di voler modificare il magazzino selezionato?");
if (alert)
{
await MIDataservice.UpdateMag(currMag);
NavManager.NavigateTo(NavManager.Uri, true);
await reloadData();
}
else
{
closeNew();
}
}
private async Task reqModMag(AnagMagModel mag)
{
await Task.Delay(1);
mod = true;
reqNew = true;
currMag = mag;
}
private bool reqNew
{
get => currParams.reqNew;
set => currParams.reqNew = value;
}
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 bool inCorso
{
get => currParams.inCorso;
set => currParams.inCorso = value;
}
private string codMag { get; set; } = "";
private string desc { get; set; } = "";
}
}
+15
View File
@@ -113,6 +113,21 @@ namespace MP.INVE.Data
return result;
// aggiungo record al DB
}
public async Task<bool> UpdateMag(AnagMagModel Mag)
{
bool result = false;
Stopwatch stopWatch = new Stopwatch();
stopWatch.Start();
result = await dbController.UpdateMag(Mag);
// elimino cache redis...
RedisValue pattern = new RedisValue($"{redisMagList}");
bool answ = await ExecFlushRedisPattern(pattern);
stopWatch.Stop();
TimeSpan ts = stopWatch.Elapsed;
Log.Debug($"UpdateMag | Codice magazzino: {Mag.CodMag} | Descrizione magazzino: {Mag.DescMag} | {ts.TotalMilliseconds}ms");
return result;
// aggiungo record al DB
}
public async Task<bool> DeleteMag(AnagMagModel Mag)
{
bool result = false;
+60
View File
@@ -0,0 +1,60 @@
using MP.Data;
namespace MP.INVE.Data
{
public class SelectMagListParams
{
#region Public Constructors
public SelectMagListParams()
{ }
#endregion Public Constructors
#region Public Properties
public int CurrPage { get; set; } = 1;
public int NumRec { get; set; } = 10;
public int TotCount { get; set; } = 0;
public int MaxRecord { get; set; } = 100;
public bool inCorso { get; set; } = true;
public bool reqNew { get; set; } = false;
#endregion Public Properties
#region Public Methods
public override bool Equals(object obj)
{
if (!(obj is SelectInveSessionParams item))
return false;
if (MaxRecord != item.MaxRecord)
return false;
if (TotCount != item.TotCount)
return false;
if (NumRec != item.NumRec)
if (CurrPage != item.CurrPage)
return false;
if (inCorso != item.inCorso)
return false;
if (reqNew != item.reqNew)
return false;
return true;
}
public override int GetHashCode()
{
return base.GetHashCode();
}
#endregion Public Methods
}
}
+1 -1
View File
@@ -5,7 +5,7 @@
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<RootNamespace>MP.INVE</RootNamespace>
<Version>6.16.2211.2108</Version>
<Version>6.16.2211.2113</Version>
</PropertyGroup>
<ItemGroup>
+3
View File
@@ -28,5 +28,8 @@
</div>
}
</div>
<span> @idOPeratore @authKey </span>
</div>
</div>
+11 -12
View File
@@ -16,29 +16,28 @@ using MP.INVE.Shared;
using MP.INVE.Components;
using Blazored.LocalStorage;
using MP.Data.DTO;
using Microsoft.AspNetCore.WebUtilities;
namespace MP.INVE.Pages
{
public partial class Acquisizione
{
#if false
[Inject]
protected ILocalStorageService localStorage { get; set; } = null!;
[Inject]
protected NavigationManager NavManager { get; set; } = null!;
protected async Task getId()
{
OperatoreDTO local = new OperatoreDTO();
local = await localStorage.GetItemAsync<OperatoreDTO>("MatrOpr");
if ((local == null))
{
NavManager.NavigateTo("OperatoreLogin");
}
}
#endif
protected string idOPeratore { get; set; } = null!;
protected string authKey { get; set; } = null!;
protected override async Task OnInitializedAsync()
{
//await getId();
await Task.Delay(1);
var uri = NavManager.ToAbsoluteUri(NavManager.Uri);
if (QueryHelpers.ParseQuery(uri.Query).TryGetValue("MatrOpr", out var _matrOpr) && QueryHelpers.ParseQuery(uri.Query).TryGetValue("UserAuthKey", out var _authKey))
{
idOPeratore = _matrOpr;
authKey = _authKey;
}
}
protected DateTime? lastScan { get; set; } = null;
}
+5
View File
@@ -0,0 +1,5 @@
@page "/Jumper"
<h3>Jumper</h3>
+23
View File
@@ -0,0 +1,23 @@
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;
namespace MP.INVE.Pages
{
public partial class Jumper
{
}
}
+3 -93
View File
@@ -25,102 +25,12 @@
}
else
{
@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>
</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">Codice magazzino</span>
<input type="text" class="form-control" aria-label="Art search" aria-describedby="inputGroup-sizing-sm" @bind="@codMag">
</div>
</div>
<div class="col-4 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 (codMag != "")
{
<div class="d-grid gap-2">
<button class="btn btn-success" @onclick="insertNewMag">Save <i class="bi bi-save"></i></button>
</div>
}
</div>
</div>
</div>
</div>
</div>
</div>
}
<table class="table">
<thead>
<tr>
<th scope="col">ID magazzino</th>
<th scope="col">Codice magazzino</th>
<th scope="col">Codice azienda</th>
<th scope="col">Descrizione</th>
<th scope="col"></th>
</tr>
</thead>
<tbody>
@if (elencoMagazzini != null)
{
@foreach (var item in elencoMagazzini)
{
<tr>
<td>
@item.MagID
</td>
<td>
@item.CodMag
</td>
<td>
@item.CodCS
</td>
<td>
@item.DescMag
</td>
<td>
<button class="btn btn-danger btn-sm"@onclick="()=>deleteMag(item)">
<i class="fa-solid fa-trash-can"></i>
</button>
</td>
</tr>
}
}
</tbody>
</table>
<MagList currParams="currParams" ></MagList>
}
</div>
<div class="card-footer py-1">
<DataPager />
<div class="card-footer py-1 mb-3">
<DataPager PageSize="numRecord" currPage="currPage" numRecordChanged="ForceReload" numPageChanged="ForceReloadPage" totalCount="totalCount" showLoading="@isLoading" />
</div>
</div>
+54 -47
View File
@@ -38,7 +38,52 @@ namespace MP.INVE.Pages
[Inject]
private NavigationManager NavManager { get; set; } = null!;
public SelectMagListParams currParams = new SelectMagListParams();
private int totalCount
{
get => currParams.TotCount;
set => currParams.TotCount = value;
}
private int numRecord
{
get => currParams.NumRec;
set
{
if (currParams.NumRec != value)
{
currParams.NumRec = value;
}
}
}
private int currPage
{
get => currParams.CurrPage;
set
{
if (currParams.CurrPage != value)
{
currParams.CurrPage = value;
}
}
}
private bool reqNew
{
get => currParams.reqNew;
set => currParams.reqNew = value;
}
private bool inCorso
{
get => currParams.inCorso;
set
{
if (currParams.inCorso != value)
{
currParams.inCorso = value;
}
}
}
private List<AnagMagModel>? elencoMagazzini;
protected override async Task OnInitializedAsync()
@@ -101,57 +146,19 @@ namespace MP.INVE.Pages
await reloadData();
}
}
protected void ForceReload(int newNum)
{
numRecord = newNum;
}
protected void ForceReloadPage(int newNum)
{
currPage = newNum;
}
private int idOperatore { get; set; } = 0;
private string authKey { get; set; } = "";
private bool reqNew { get; set; } = false;
private bool isLoading { get; set; } = false;
private string codMag { get; set; } = "";
private string desc { get; set; } = "";
#if false
protected override async Task OnAfterRenderAsync(bool firstRender)
{
if (firstRender)
{
await JSRuntime.InvokeVoidAsync("clearContent", $"qrCodeImg_{101}");
await JSRuntime.InvokeVoidAsync("displayQr", $"qrCodeImg_{101}", rawCode);
}
}
#endif
protected string BaseUrlTab { get => $"{Configuration["ServerConf:BaseUrl"]}"; }
#if false
protected async Task getId()
{
OperatoreDTO sess = new OperatoreDTO();
OperatoreDTO local = new OperatoreDTO();
sess = await sessionStorage.GetItemAsync<OperatoreDTO>("MatrOpr");
local = await localStorage.GetItemAsync<OperatoreDTO>("MatrOpr");
if ((local != null))
{
string auth = local.hashAuthKey;
idOperatore = local.MatrOpr;
authKey = auth;
}
else
{
NavManager.NavigateTo("OperatoreLogin");
}
}
#endif
#if false
protected string rawCode
{
get
{
string answ = "";
answ = $"{BaseUrlTab}MatrOpr={idOperatore}&UserAuthKey={authKey}";
return answ;
}
}
#endif
}
}
+1
View File
@@ -62,5 +62,6 @@
<script type="text/javascript" src="~/lib/qrcode.js"></script>
<script type="text/javascript" src="~/lib/qrHelper.js"></script>
<script type="text/javascript" src="~/lib/WindowSize.js"></script>
</body>
</html>
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
..<PropertyGroup>
....<DeleteExistingFiles>False</DeleteExistingFiles>
....<ExcludeApp_Data>False</ExcludeApp_Data>
....<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
....<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
....<LastUsedPlatform>Any CPU</LastUsedPlatform>
....<PublishProvider>FileSystem</PublishProvider>
....<PublishUrl>bin\publish\net6.0\</PublishUrl>
....<WebPublishMethod>FileSystem</WebPublishMethod>
....<SiteUrlToLaunchAfterPublish />
....<TargetFramework>net6.0</TargetFramework>
....<SelfContained>false</SelfContained>
..</PropertyGroup>
</Project>
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
<PropertyGroup>
<WebPublishMethod>MSDeploy</WebPublishMethod>
<LaunchSiteAfterPublish>true</LaunchSiteAfterPublish>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish>https://iis02.egalware.com:8172/MsDeploy.axd</SiteUrlToLaunchAfterPublish>
<ExcludeApp_Data>false</ExcludeApp_Data>
<ProjectGuid>fd5b477e-96a4-42f6-b2e8-7fc221c9971c</ProjectGuid>
<SelfContained>false</SelfContained>
<MSDeployServiceURL>iis02.egalware.com</MSDeployServiceURL>
<DeployIisAppPath>Default Web Site/MP/INVE</DeployIisAppPath>
<RemoteSitePhysicalPath />
<SkipExtraFilesOnServer>true</SkipExtraFilesOnServer>
<MSDeployPublishMethod>WMSVC</MSDeployPublishMethod>
<EnableMSDeployBackup>true</EnableMSDeployBackup>
<EnableMsDeployAppOffline>true</EnableMsDeployAppOffline>
<UserName>jenkins</UserName>
<_SavePWD>true</_SavePWD>
<_TargetId>IISWebDeploy</_TargetId>
</PropertyGroup>
</Project>
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
<PropertyGroup>
<WebPublishMethod>MSDeploy</WebPublishMethod>
<LaunchSiteAfterPublish>true</LaunchSiteAfterPublish>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish>https://iis03.egalware.com:8172/MsDeploy.axd</SiteUrlToLaunchAfterPublish>
<ExcludeApp_Data>false</ExcludeApp_Data>
<ProjectGuid>fd5b477e-96a4-42f6-b2e8-7fc221c9971c</ProjectGuid>
<SelfContained>false</SelfContained>
<MSDeployServiceURL>iis03.egalware.com</MSDeployServiceURL>
<DeployIisAppPath>Default Web Site/MP/INVE</DeployIisAppPath>
<RemoteSitePhysicalPath />
<SkipExtraFilesOnServer>true</SkipExtraFilesOnServer>
<MSDeployPublishMethod>WMSVC</MSDeployPublishMethod>
<EnableMSDeployBackup>true</EnableMSDeployBackup>
<EnableMsDeployAppOffline>true</EnableMsDeployAppOffline>
<UserName>jenkins</UserName>
<_SavePWD>true</_SavePWD>
<_TargetId>IISWebDeploy</_TargetId>
</PropertyGroup>
</Project>
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is used by the publish/package process of your Web project. You can customize the behavior of this process
by editing this MSBuild file. In order to learn more about this please visit https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<WebPublishMethod>Package</WebPublishMethod>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish />
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<ExcludeApp_Data>False</ExcludeApp_Data>
<ProjectGuid>fd5b477e-96a4-42f6-b2e8-7fc221c9971c</ProjectGuid>
<DesktopBuildPackageLocation>bin\publish\MP.INVE.zip</DesktopBuildPackageLocation>
<PackageAsSingleFile>true</PackageAsSingleFile>
<DeployIisAppPath>Default Web Site/MP/INVE</DeployIisAppPath>
<TargetFramework>net6.0</TargetFramework>
<SelfContained>false</SelfContained>
</PropertyGroup>
</Project>
+1 -1
View File
@@ -1,6 +1,6 @@
<body>
<i>Modulo MAPOINVE </i>
<h4>Versione: 6.16.2211.2108</h4>
<h4>Versione: 6.16.2211.2113</h4>
<br /> Note di rilascio:
<ul>
<li>
+1 -1
View File
@@ -1 +1 @@
6.16.2211.2108
6.16.2211.2113
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>6.16.2211.2108</version>
<version>6.16.2211.2113</version>
<url>https://nexus.steamware.net/repository/SWS/MP-INVE/stable/LAST/MP.INVE.zip</url>
<changelog>https://nexus.steamware.net/repository/SWS/MP-INVE/stable/LAST/ChangeLog.html</changelog>
<mandatory>false</mandatory>
+8 -2
View File
@@ -6,12 +6,18 @@
<div class="page">
<div class="@sideClass">
<NavMenu EC_compressUpdated="@UpdateNavDisplay" />
@if ((Height != 480) && (Width != 320))
{
<NavMenu EC_compressUpdated="@UpdateNavDisplay" />
}
</div>
<main>
<div class="top-row px-4 justify-content-between">
<CmpTop></CmpTop>
@if ((Height != 480) && (Width != 320))
{
<CmpTop></CmpTop>
}
</div>
<article class="content pt-0 m-2">
@if (userName != "0" || NavManager.Uri.Contains("OperatoreLogin"))
+16
View File
@@ -1,5 +1,6 @@
using Blazored.LocalStorage;
using Microsoft.AspNetCore.Components;
using Microsoft.JSInterop;
using MP.Data.DTO;
namespace MP.INVE.Shared
@@ -44,9 +45,21 @@ namespace MP.INVE.Shared
}
}
public int Height { get; set; }
public int Width { get; set; }
public class WindowDimension
{
public int Width { get; set; }
public int Height { get; set; }
}
protected override async Task OnInitializedAsync()
{
await getId();
var dimension = await JSRuntime.InvokeAsync<WindowDimension>("getWindowDimensions");
Height = dimension.Height;
Width = dimension.Width;
}
protected void UpdateNavDisplay()
@@ -65,6 +78,9 @@ namespace MP.INVE.Shared
[Inject]
private NavigationManager NavManager { get; set; } = null!;
[Inject]
private IJSRuntime JSRuntime { get; set; } = null!;
#endregion Private Properties
}
}
+4 -4
View File
@@ -45,14 +45,14 @@
<div class="nav-item px-2 col-12">
<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>
<span class="px-2" aria-hidden="true"><i class="fa-solid fa-boxes-stacked"></i></span>
</div>
<div>
<span class="@hideText">Session</span>
<span class="@hideText">Sessioni di inventario</span>
</div>
</NavLink>
</div>
<div class="nav-item px-2 col-12">
@* <div class="nav-item px-2 col-12">
<NavLink class="nav-link px-2" href="Acquisizione">
<div class="col-2">
<span class="px-2" aria-hidden="true"><i class="fa-solid fa-barcode"></i></span>
@@ -61,7 +61,7 @@
<span class="@hideText">Acquisizione</span>
</div>
</NavLink>
</div>
</div>*@
<div class="nav-item px-2 col-12">
<NavLink class="nav-link px-2" href="Invio">
<div class="col-2">
+1 -1
View File
@@ -18,7 +18,7 @@
"cacheCheckArtUsato": "2",
"redisLongTimeCache": "15",
"MpIoBaseUrl": "http://localhost:20967/",
"BaseUrl": "https://iis02.egalware.com/MP/MAG/SMART/PLScanner?",
"BaseUrl": "https://localhost:7212/Acquisizione?",
"BaseUrlJumper": "https://iis02.egalware.com/MP/jumper?"
}
}
+6
View File
@@ -0,0 +1,6 @@
window.getWindowDimensions = function () {
return {
width: window.innerWidth,
height: window.innerHeight
};
};