diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 35dea986..69308651 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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 + diff --git a/MP.Data/Controllers/MpInveController.cs b/MP.Data/Controllers/MpInveController.cs index e6c65cb3..cae8eef3 100644 --- a/MP.Data/Controllers/MpInveController.cs +++ b/MP.Data/Controllers/MpInveController.cs @@ -125,6 +125,42 @@ namespace MP.Data.Controllers return fatto; } + /// + /// modifica di un record magazzino + /// + /// + public async Task 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; + } + /// /// delete magazzino /// diff --git a/MP.INVE/Components/InveSessionList.razor b/MP.INVE/Components/InveSessionList.razor index d162040c..9901e34b 100644 --- a/MP.INVE/Components/InveSessionList.razor +++ b/MP.INVE/Components/InveSessionList.razor @@ -1,75 +1,78 @@ - -@if (reqNew) +@if (reqNew) { -
-
-
-
-
- Avvia una nuova sessione -
-
+
+
+
+
+
+ Avvia una nuova sessione +
+
@*@if (isEditing) { PENDING CHANGES... }*@ -
-
-
-
-
- Magazzino - + @if (elencoMagazzini != null) { @foreach (var item in elencoMagazzini) { - + @if (!item.DescMag.Contains("NON USARE")) + { + + + } } } - -
+
-
-
- Descrizione - -
-
-
-
-
+
+
+ Descrizione +
-
+
+ +
+
+
+
+
+
+
+
+
-
-
- -
-
-
+
+
@if (magazzino != -1) { -
- -
+
+ +
} -
+
} @if (inCorso) { - + } @@ -86,68 +89,68 @@ { @foreach (var item in elencoSessioni) { - + @if (inCorso) { - + } - - + + - - + + @if (item.DtEnd != null) { - + } else { - + } - - + - - + + + } }
QRQRID sessione Magazzino
- - - + + + + @item.InveSessID - + @item.AnagMagNav.DescMag - + @item.UserCrea - + @item.DtStart - + @item.DtEnd - - In corso... - + In corso... + + @item.Description - + @if (item.Transferred) { - + } else { - + } - - -
+ +
- + + @idOPeratore @authKey + +
diff --git a/MP.INVE/Pages/Acquisizione.razor.cs b/MP.INVE/Pages/Acquisizione.razor.cs index 1809d0a7..6e8c3620 100644 --- a/MP.INVE/Pages/Acquisizione.razor.cs +++ b/MP.INVE/Pages/Acquisizione.razor.cs @@ -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("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; } diff --git a/MP.INVE/Pages/Jumper.razor b/MP.INVE/Pages/Jumper.razor new file mode 100644 index 00000000..433b7484 --- /dev/null +++ b/MP.INVE/Pages/Jumper.razor @@ -0,0 +1,5 @@ +@page "/Jumper" + +

Jumper

+ + diff --git a/MP.INVE/Pages/Jumper.razor.cs b/MP.INVE/Pages/Jumper.razor.cs new file mode 100644 index 00000000..91ed4305 --- /dev/null +++ b/MP.INVE/Pages/Jumper.razor.cs @@ -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 + { + } +} \ No newline at end of file diff --git a/MP.INVE/Pages/Starter.razor b/MP.INVE/Pages/Starter.razor index a23b7545..f4cf3b72 100644 --- a/MP.INVE/Pages/Starter.razor +++ b/MP.INVE/Pages/Starter.razor @@ -25,102 +25,12 @@ } else { - @if (reqNew) - { -
-
-
-
-
- Avvia una nuova sessione -
-
-
-
-
-
-
-
- Codice magazzino - -
-
-
-
- Descrizione - -
-
-
-
-
-
-
-
-
-
- -
-
-
- @if (codMag != "") - { -
- -
- } -
-
-
-
-
-
- } - - - - - - - - - - - - @if (elencoMagazzini != null) - { - @foreach (var item in elencoMagazzini) - { - - - - - - - - - - } - } - -
ID magazzinoCodice magazzinoCodice aziendaDescrizione
- @item.MagID - - @item.CodMag - - @item.CodCS - - @item.DescMag - - -
+ }
- diff --git a/MP.INVE/Pages/Starter.razor.cs b/MP.INVE/Pages/Starter.razor.cs index 25b42cc3..76cd6bf4 100644 --- a/MP.INVE/Pages/Starter.razor.cs +++ b/MP.INVE/Pages/Starter.razor.cs @@ -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? 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("MatrOpr"); - local = await localStorage.GetItemAsync("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 } } \ No newline at end of file diff --git a/MP.INVE/Pages/_Layout.cshtml b/MP.INVE/Pages/_Layout.cshtml index f7a5c3fa..967701ec 100644 --- a/MP.INVE/Pages/_Layout.cshtml +++ b/MP.INVE/Pages/_Layout.cshtml @@ -62,5 +62,6 @@ + diff --git a/MP.INVE/Properties/PublishProfiles/FolderProfile.pubxml b/MP.INVE/Properties/PublishProfiles/FolderProfile.pubxml new file mode 100644 index 00000000..c3009ce2 --- /dev/null +++ b/MP.INVE/Properties/PublishProfiles/FolderProfile.pubxml @@ -0,0 +1,19 @@ + + + +.. +....False +....False +....True +....Release +....Any CPU +....FileSystem +....bin\publish\net6.0\ +....FileSystem +.... +....net6.0 +....false +.. + \ No newline at end of file diff --git a/MP.INVE/Properties/PublishProfiles/IIS02.pubxml b/MP.INVE/Properties/PublishProfiles/IIS02.pubxml new file mode 100644 index 00000000..53afca28 --- /dev/null +++ b/MP.INVE/Properties/PublishProfiles/IIS02.pubxml @@ -0,0 +1,26 @@ + + + + + MSDeploy + true + Release + Any CPU + https://iis02.egalware.com:8172/MsDeploy.axd + false + fd5b477e-96a4-42f6-b2e8-7fc221c9971c + false + iis02.egalware.com + Default Web Site/MP/INVE + + true + WMSVC + true + true + jenkins + <_SavePWD>true + <_TargetId>IISWebDeploy + + \ No newline at end of file diff --git a/MP.INVE/Properties/PublishProfiles/IIS03.pubxml b/MP.INVE/Properties/PublishProfiles/IIS03.pubxml new file mode 100644 index 00000000..30bcdef2 --- /dev/null +++ b/MP.INVE/Properties/PublishProfiles/IIS03.pubxml @@ -0,0 +1,26 @@ + + + + + MSDeploy + true + Release + Any CPU + https://iis03.egalware.com:8172/MsDeploy.axd + false + fd5b477e-96a4-42f6-b2e8-7fc221c9971c + false + iis03.egalware.com + Default Web Site/MP/INVE + + true + WMSVC + true + true + jenkins + <_SavePWD>true + <_TargetId>IISWebDeploy + + \ No newline at end of file diff --git a/MP.INVE/Properties/PublishProfiles/IISProfile.pubxml b/MP.INVE/Properties/PublishProfiles/IISProfile.pubxml new file mode 100644 index 00000000..fe992ec6 --- /dev/null +++ b/MP.INVE/Properties/PublishProfiles/IISProfile.pubxml @@ -0,0 +1,21 @@ + + + + + Package + Release + Any CPU + + True + False + fd5b477e-96a4-42f6-b2e8-7fc221c9971c + bin\publish\MP.INVE.zip + true + Default Web Site/MP/INVE + net6.0 + false + + \ No newline at end of file diff --git a/MP.INVE/Resources/ChangeLog.html b/MP.INVE/Resources/ChangeLog.html index 8b7359cb..5f4169d7 100644 --- a/MP.INVE/Resources/ChangeLog.html +++ b/MP.INVE/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOINVE -

Versione: 6.16.2211.2108

+

Versione: 6.16.2211.2113


Note di rilascio:
  • diff --git a/MP.INVE/Resources/VersNum.txt b/MP.INVE/Resources/VersNum.txt index b6004b2b..bcd453d6 100644 --- a/MP.INVE/Resources/VersNum.txt +++ b/MP.INVE/Resources/VersNum.txt @@ -1 +1 @@ -6.16.2211.2108 +6.16.2211.2113 diff --git a/MP.INVE/Resources/manifest.xml b/MP.INVE/Resources/manifest.xml index bfe84696..66a5e8cd 100644 --- a/MP.INVE/Resources/manifest.xml +++ b/MP.INVE/Resources/manifest.xml @@ -1,6 +1,6 @@ - 6.16.2211.2108 + 6.16.2211.2113 https://nexus.steamware.net/repository/SWS/MP-INVE/stable/LAST/MP.INVE.zip https://nexus.steamware.net/repository/SWS/MP-INVE/stable/LAST/ChangeLog.html false diff --git a/MP.INVE/Shared/MainLayout.razor b/MP.INVE/Shared/MainLayout.razor index 75da5b44..d7ff713a 100644 --- a/MP.INVE/Shared/MainLayout.razor +++ b/MP.INVE/Shared/MainLayout.razor @@ -6,12 +6,18 @@
    - + @if ((Height != 480) && (Width != 320)) + { + + }
    - + @if ((Height != 480) && (Width != 320)) + { + + }
    @if (userName != "0" || NavManager.Uri.Contains("OperatoreLogin")) diff --git a/MP.INVE/Shared/MainLayout.razor.cs b/MP.INVE/Shared/MainLayout.razor.cs index 089b4dfa..f72febb2 100644 --- a/MP.INVE/Shared/MainLayout.razor.cs +++ b/MP.INVE/Shared/MainLayout.razor.cs @@ -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("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 } } \ No newline at end of file diff --git a/MP.INVE/Shared/NavMenu.razor b/MP.INVE/Shared/NavMenu.razor index 0dec7c4b..cd920e0e 100644 --- a/MP.INVE/Shared/NavMenu.razor +++ b/MP.INVE/Shared/NavMenu.razor @@ -45,14 +45,14 @@ - *@