diff --git a/MP.Prog/Pages/Archive.razor.cs b/MP.Prog/Pages/Archive.razor.cs
index 20e47c48..af50582a 100644
--- a/MP.Prog/Pages/Archive.razor.cs
+++ b/MP.Prog/Pages/Archive.razor.cs
@@ -230,6 +230,19 @@ namespace MP.Prog.Pages
await Task.Delay(1);
}
+ ///
+ /// effettua approvazione di ttute le modifiche visualizzate
+ ///
+ ///
+ protected async Task MassAppr()
+ {
+ ResetData();
+ await ResetFilter();
+ await Task.Delay(1);
+ await ReloadData();
+ isLoading = false;
+ }
+
protected void ResetData()
{
FDService.rollBackEdit(currRecord);
diff --git a/MP.Prog/Resources/ChangeLog.html b/MP.Prog/Resources/ChangeLog.html
index a3ed871e..c017c782 100644
--- a/MP.Prog/Resources/ChangeLog.html
+++ b/MP.Prog/Resources/ChangeLog.html
@@ -1,6 +1,6 @@
Modulo gestione Programmi MAPO
-
Versione: 6.16.2410.2219
+
Versione: 6.16.2410.2311
Note di rilascio:
diff --git a/MP.Prog/Resources/VersNum.txt b/MP.Prog/Resources/VersNum.txt
index 3cfca690..d39e7196 100644
--- a/MP.Prog/Resources/VersNum.txt
+++ b/MP.Prog/Resources/VersNum.txt
@@ -1 +1 @@
-6.16.2410.2219
+6.16.2410.2311
diff --git a/MP.Prog/Resources/manifest.xml b/MP.Prog/Resources/manifest.xml
index af79ea5d..d2730839 100644
--- a/MP.Prog/Resources/manifest.xml
+++ b/MP.Prog/Resources/manifest.xml
@@ -1,6 +1,6 @@
-
- 6.16.2410.2219
+ 6.16.2410.2311
https://nexus.steamware.net/repository/SWS/MP-PROG/stable/LAST/MP.Prog.zip
https://nexus.steamware.net/repository/SWS/MP-PROG/stable/LAST/ChangeLog.html
false
diff --git a/MP.Prog/Startup.cs b/MP.Prog/Startup.cs
index fc459f4f..3f68ea0d 100644
--- a/MP.Prog/Startup.cs
+++ b/MP.Prog/Startup.cs
@@ -8,13 +8,17 @@ using Microsoft.AspNetCore.Localization;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
+using Microsoft.OpenApi.Models;
using MP.Prog.Data;
using NLog;
using StackExchange.Redis;
using System;
using System.Collections.Generic;
using System.Globalization;
+using System.IO;
using System.Linq;
+using System.Reflection;
+using System.Text.Json.Serialization;
using System.Threading.Tasks;
namespace MP.Prog
@@ -41,10 +45,24 @@ namespace MP.Prog
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
-
// aggiunt base URL x routing corretto
app.UsePathBase(Configuration.GetValue("ServerConf:BaseUrl"));
+ if (env.IsDevelopment() || env.IsStaging())
+ {
+ app.UseDeveloperExceptionPage();
+
+ // valido solo in sviluppo
+ app.UseSwagger(c =>
+ {
+ c.RouteTemplate = "/swagger/{documentName}/swagger.json";
+ });
+ app.UseSwaggerUI(c =>
+ {
+ c.SwaggerEndpoint("v1/swagger.json", "MP-PROG.Api");
+ });
+ }
+
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
@@ -91,7 +109,7 @@ namespace MP.Prog
app.UseEndpoints(endpoints =>
{
- //endpoints.MapControllers();
+ endpoints.MapControllers();
endpoints.MapBlazorHub();
//endpoints.MapHealthChecksUI();
//endpoints.MapHealthChecks("/health", new HealthCheckOptions
@@ -107,6 +125,14 @@ namespace MP.Prog
// For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940
public void ConfigureServices(IServiceCollection services)
{
+ services.AddControllers();
+ services.AddSwaggerGen(c =>
+ {
+ c.SwaggerDoc("v1", new OpenApiInfo { Title = "MP-PROG.Api", Version = "v1" });
+ // Set the comments path for the Swagger JSON and UI.
+ var xmlPath = Path.Combine(AppContext.BaseDirectory, $"{Assembly.GetExecutingAssembly().GetName().Name}.xml");
+ c.IncludeXmlComments(xmlPath);
+ });
// Aggiunta auth windows
services.AddAuthentication(NegotiateDefaults.AuthenticationScheme)
.AddNegotiate();
@@ -147,6 +173,8 @@ namespace MP.Prog
// avvio oggetto shared x redis...
var redisMultiplexer = ConnectionMultiplexer.Connect(connStringRedis);
+ services.AddControllers()
+ .AddJsonOptions(c => c.JsonSerializerOptions.ReferenceHandler = ReferenceHandler.Preserve);
services.AddLocalization();