chore(api): Core-Bibliotheken und UserManager.Infrastructure auf 2.0.0.0 aktualisiert
- Core-Bibliotheken und UserManager.Infrastructure in den API-Schichten auf Version 2.0.0.0 erhöht.
This commit is contained in:
parent
017d03713b
commit
2fb8af9a4f
@ -1,4 +1,7 @@
|
|||||||
namespace EnvelopeGenerator.Application.DTOs
|
using DigitalData.Core.Abstractions;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Application.DTOs
|
||||||
{
|
{
|
||||||
public record ConfigDto(
|
public record ConfigDto(
|
||||||
string DocumentPath,
|
string DocumentPath,
|
||||||
@ -8,5 +11,10 @@
|
|||||||
string ExportPath,
|
string ExportPath,
|
||||||
string DocumentPathDmz,
|
string DocumentPathDmz,
|
||||||
string ExportPathDmz,
|
string ExportPathDmz,
|
||||||
string DocumentPathMoveAftsend);
|
string DocumentPathMoveAftsend) : IUnique<int>
|
||||||
|
{
|
||||||
|
[JsonIgnore]
|
||||||
|
[Obsolete("Configuration does not have an ID; it represents a single table in the database.")]
|
||||||
|
public int Id => throw new InvalidOperationException("This configuration does not support an ID as it represents a single row in the database.");
|
||||||
|
};
|
||||||
}
|
}
|
||||||
@ -1,4 +1,4 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
@ -7,8 +7,8 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="DigitalData.Core.Abstractions" Version="1.0.1.1" />
|
<PackageReference Include="DigitalData.Core.Abstractions" Version="2.0.0" />
|
||||||
<PackageReference Include="DigitalData.Core.API" Version="1.0.2.1" />
|
<PackageReference Include="DigitalData.Core.API" Version="2.0.0" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="7.0.15" />
|
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="7.0.15" />
|
||||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
|
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
|
||||||
<PackageReference Include="System.DirectoryServices" Version="7.0.1" />
|
<PackageReference Include="System.DirectoryServices" Version="7.0.1" />
|
||||||
|
|||||||
@ -6,10 +6,12 @@ using EnvelopeGenerator.Domain.Entities;
|
|||||||
using Microsoft.EntityFrameworkCore;
|
using Microsoft.EntityFrameworkCore;
|
||||||
using Group = DigitalData.UserManager.Domain.Entities.Group;
|
using Group = DigitalData.UserManager.Domain.Entities.Group;
|
||||||
using Module = DigitalData.UserManager.Domain.Entities.Module;
|
using Module = DigitalData.UserManager.Domain.Entities.Module;
|
||||||
|
using DigitalData.EmailProfilerDispatcher;
|
||||||
|
|
||||||
namespace EnvelopeGenerator.Infrastructure
|
namespace EnvelopeGenerator.Infrastructure
|
||||||
{
|
{
|
||||||
public class EGDbContext : DbContext, IUserManagerDbContext
|
//TODO: Adding EmailOut instead of EmailOut.Abst is not correct for the arch. Re-design EmailPut consedering this. IMailDbContext shoud move to Abstraction layer (hint: in this case using DBSet in abst. will be problem because entity framework will have to be added.
|
||||||
|
public class EGDbContext : DbContext, IUserManagerDbContext, IMailDbContext
|
||||||
{
|
{
|
||||||
public DbSet<UserReceiver> UserReceivers { get; set; }
|
public DbSet<UserReceiver> UserReceivers { get; set; }
|
||||||
|
|
||||||
@ -47,6 +49,8 @@ namespace EnvelopeGenerator.Infrastructure
|
|||||||
|
|
||||||
public DbSet<UserRep> UserReps { get; set; }
|
public DbSet<UserRep> UserReps { get; set; }
|
||||||
|
|
||||||
|
public DbSet<EmailOut> EMailOuts { get; set; }
|
||||||
|
|
||||||
public EGDbContext(DbContextOptions<EGDbContext> options) : base(options)
|
public EGDbContext(DbContextOptions<EGDbContext> options) : base(options)
|
||||||
{
|
{
|
||||||
UserReceivers = Set<UserReceiver>();
|
UserReceivers = Set<UserReceiver>();
|
||||||
@ -67,6 +71,7 @@ namespace EnvelopeGenerator.Infrastructure
|
|||||||
Modules = Set<Module>();
|
Modules = Set<Module>();
|
||||||
Users = Set<User>();
|
Users = Set<User>();
|
||||||
UserReps = Set<UserRep>();
|
UserReps = Set<UserRep>();
|
||||||
|
EMailOuts = Set<EmailOut>();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||||
|
|||||||
@ -9,6 +9,7 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="DigitalData.Core.Abstractions" Version="2.0.0" />
|
<PackageReference Include="DigitalData.Core.Abstractions" Version="2.0.0" />
|
||||||
<PackageReference Include="DigitalData.Core.Infrastructure" Version="2.0.0" />
|
<PackageReference Include="DigitalData.Core.Infrastructure" Version="2.0.0" />
|
||||||
|
<PackageReference Include="DigitalData.EmailProfilerDispatcher" Version="2.0.0" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.16" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.16" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.15">
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.15">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
|
|||||||
@ -1,10 +1,11 @@
|
|||||||
using EnvelopeGenerator.Application.Contracts;
|
using EnvelopeGenerator.Application.Contracts;
|
||||||
using EnvelopeGenerator.Application.DTOs;
|
using EnvelopeGenerator.Application.DTOs;
|
||||||
using EnvelopeGenerator.Domain.Entities;
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
|
using DigitalData.Core.API;
|
||||||
|
|
||||||
namespace EnvelopeGenerator.Web.Controllers.Test
|
namespace EnvelopeGenerator.Web.Controllers.Test
|
||||||
{
|
{
|
||||||
public class TestConfigController : TestControllerBase<IConfigService, ConfigDto, Config, int>
|
public class TestConfigController : ReadControllerBase<IConfigService, ConfigDto, Config, int>
|
||||||
{
|
{
|
||||||
public TestConfigController(ILogger<TestConfigController> logger, IConfigService service) : base(logger, service)
|
public TestConfigController(ILogger<TestConfigController> logger, IConfigService service) : base(logger, service)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
using DigitalData.Core.API;
|
using DigitalData.Core.API;
|
||||||
using DigitalData.Core.Abstractions.Application;
|
using DigitalData.Core.Abstractions.Application;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using DigitalData.Core.Abstractions;
|
||||||
|
|
||||||
namespace EnvelopeGenerator.Web.Controllers.Test
|
namespace EnvelopeGenerator.Web.Controllers.Test
|
||||||
{
|
{
|
||||||
@ -8,7 +9,7 @@ namespace EnvelopeGenerator.Web.Controllers.Test
|
|||||||
[Route("api/test/[controller]")]
|
[Route("api/test/[controller]")]
|
||||||
public class TestControllerBase<TCRUDService, TDto, TEntity, TId> : BasicCRUDControllerBase<TCRUDService, TDto, TEntity, TId>
|
public class TestControllerBase<TCRUDService, TDto, TEntity, TId> : BasicCRUDControllerBase<TCRUDService, TDto, TEntity, TId>
|
||||||
where TCRUDService : ICRUDService<TDto, TDto, TDto, TEntity, TId>
|
where TCRUDService : ICRUDService<TDto, TDto, TDto, TEntity, TId>
|
||||||
where TDto : class where TEntity : class
|
where TDto : class, IUnique<TId> where TEntity : class, IUnique<TId>
|
||||||
{
|
{
|
||||||
public TestControllerBase(ILogger logger, TCRUDService service) : base(logger, service)
|
public TestControllerBase(ILogger logger, TCRUDService service) : base(logger, service)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -8,7 +8,7 @@ using EnvelopeGenerator.Application.DTOs.EnvelopeReceiver;
|
|||||||
|
|
||||||
namespace EnvelopeGenerator.Web.Controllers.Test
|
namespace EnvelopeGenerator.Web.Controllers.Test
|
||||||
{
|
{
|
||||||
public class TestEnvelopeReceiverController : TestControllerBase<IEnvelopeReceiverService, EnvelopeReceiverDto, EnvelopeReceiver, object>
|
public class TestEnvelopeReceiverController : ReadControllerBase<IEnvelopeReceiverService, EnvelopeReceiverDto, EnvelopeReceiver, (int Envelope, int Receiver)>
|
||||||
{
|
{
|
||||||
public TestEnvelopeReceiverController(ILogger<TestEnvelopeReceiverController> logger, IEnvelopeReceiverService service) : base(logger, service)
|
public TestEnvelopeReceiverController(ILogger<TestEnvelopeReceiverController> logger, IEnvelopeReceiverService service) : base(logger, service)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -4,10 +4,10 @@
|
|||||||
@{
|
@{
|
||||||
var nonce = _accessor.HttpContext?.Items["csp-nonce"] as string;
|
var nonce = _accessor.HttpContext?.Items["csp-nonce"] as string;
|
||||||
}
|
}
|
||||||
@ using DigitalData.Core.DTO;
|
@using DigitalData.Core.DTO;
|
||||||
@ using EnvelopeGenerator.Application.DTOs;
|
@using EnvelopeGenerator.Application.DTOs.EnvelopeReceiver
|
||||||
@ using Newtonsoft.Json
|
@using Newtonsoft.Json
|
||||||
@ using Newtonsoft.Json.Serialization
|
@using Newtonsoft.Json.Serialization
|
||||||
@model EnvelopeReceiverDto;
|
@model EnvelopeReceiverDto;
|
||||||
<partial name="_CookieConsentPartial" />
|
<partial name="_CookieConsentPartial" />
|
||||||
@{
|
@{
|
||||||
|
|||||||
@ -1,11 +1,10 @@
|
|||||||
@{
|
@{
|
||||||
var nonce = _accessor.HttpContext?.Items["csp-nonce"] as string;
|
var nonce = _accessor.HttpContext?.Items["csp-nonce"] as string;
|
||||||
}
|
}
|
||||||
@ using DigitalData.Core.DTO;
|
@using EnvelopeGenerator.Application.DTOs.EnvelopeReceiver
|
||||||
@ using EnvelopeGenerator.Application.DTOs;
|
@using Newtonsoft.Json
|
||||||
@ using Newtonsoft.Json
|
@using Newtonsoft.Json.Serialization
|
||||||
@ using Newtonsoft.Json.Serialization
|
@model EnvelopeReceiverDto
|
||||||
@model EnvelopeReceiverDto;
|
|
||||||
@{
|
@{
|
||||||
ViewData["Title"] = _localizer[WebKey.SignDoc];
|
ViewData["Title"] = _localizer[WebKey.SignDoc];
|
||||||
}
|
}
|
||||||
@ -21,19 +20,23 @@
|
|||||||
}
|
}
|
||||||
<div class="d-flex flex-column min-vh-100">
|
<div class="d-flex flex-column min-vh-100">
|
||||||
<nav class="navbar navbar-light bg-light">
|
<nav class="navbar navbar-light bg-light">
|
||||||
<div class="container-fluid">
|
<div class="container">
|
||||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarToggleExternalContent" aria-controls="navbarToggleExternalContent" aria-expanded="false" aria-label="Toggle navigation">
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarToggleExternalContent" aria-controls="navbarToggleExternalContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
<span class="navbar-toggler-icon"></span>
|
<span class="material-symbols-outlined">
|
||||||
|
more_vert
|
||||||
|
</span>
|
||||||
</button>
|
</button>
|
||||||
<div class="navbar-brand me-auto ms-5 envelope-message">@($"{_localizer[WebKey.Hello]} {Model.Name}, {@envelope?.Message}".TrySanitize(_sanitizer))</div>
|
<div class="envelope-message">
|
||||||
<div class="col-1 p-0 m-0 me-3 d-flex">
|
<span class="icon material-symbols-outlined">history_edu</span>
|
||||||
<img src="~/img/digital_data.svg" alt="...">
|
<span class="message navbar-brand">@($"{_localizer[WebKey.Hello]} {Model.Name}, {@envelope?.Message}".TrySanitize(_sanitizer))</span>
|
||||||
|
</div>
|
||||||
|
<div class="logo">
|
||||||
|
<img class="cursor-img" src="~/img/cursor_logo.png" alt="...">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
<div class="collapse show" id="navbarToggleExternalContent" data-bs-theme="light">
|
<div class="collapse show bg-light " id="navbarToggleExternalContent" data-bs-theme="light">
|
||||||
<div class="bg-light p-1">
|
<div class="card sender-card p-1 mb-3">
|
||||||
<div class="card sender-card mb-3">
|
|
||||||
<div class="row g-0">
|
<div class="row g-0">
|
||||||
<div class="col p-0 m-0">
|
<div class="col p-0 m-0">
|
||||||
<div class="card-body p-0 m-0 ms-4">
|
<div class="card-body p-0 m-0 ms-4">
|
||||||
@ -59,7 +62,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div id="flex-action-panel" class="btn-group btn_group position-fixed bottom-0 end-0 d-flex align-items-center" role="group" aria-label="Basic mixed styles example">
|
<div id="flex-action-panel" class="btn-group btn_group position-fixed bottom-0 end-0 d-flex align-items-center" role="group" aria-label="Basic mixed styles example">
|
||||||
<button class="btn_complete btn btn-primary" type="button">
|
<button class="btn_complete btn btn-primary" type="button">
|
||||||
<svg class="icon" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 16">
|
<svg class="icon" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 20 16">
|
||||||
@ -70,7 +72,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<button class="btn_reject btn btn-danger" type="button">
|
<button class="btn_reject btn btn-danger" type="button">
|
||||||
<svg width="25px" height="25px" viewBox="43.5 43.5 512 512" version="1.1" fill="currentColor" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
<svg width="25px" height="25px" viewBox="43.5 43.5 512 512" version="1.1" fill="currentColor" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
<path class="st0" d="M263.24,43.5c-117.36,0-212.5,95.14-212.5,212.5s95.14,212.5,212.5,212.5s212.5-95.14,212.5-212.5 S380.6,43.5,263.24,43.5z M367.83,298.36c17.18,17.18,17.18,45.04,0,62.23v0c-17.18,17.18-45.04,17.18-62.23,0l-42.36-42.36 l-42.36,42.36c-17.18,17.18-45.04,17.18-62.23,0v0c-17.18-17.18-17.18-45.04,0-62.23L201.01,256l-42.36-42.36 c-17.18-17.18-17.18-45.04,0-62.23v0c17.18-17.18,45.04-17.18,62.23,0l42.36,42.36l42.36-42.36c17.18-17.18,45.04-17.18,62.23,0v0 c17.18,17.18,17.18,45.04,0,62.23L325.46,256L367.83,298.36z"/>
|
<path class="st0" d="M263.24,43.5c-117.36,0-212.5,95.14-212.5,212.5s95.14,212.5,212.5,212.5s212.5-95.14,212.5-212.5 S380.6,43.5,263.24,43.5z M367.83,298.36c17.18,17.18,17.18,45.04,0,62.23v0c-17.18,17.18-45.04,17.18-62.23,0l-42.36-42.36 l-42.36,42.36c-17.18,17.18-45.04,17.18-62.23,0v0c-17.18-17.18-17.18-45.04,0-62.23L201.01,256l-42.36-42.36 c-17.18-17.18-17.18-45.04,0-62.23v0c17.18-17.18,45.04-17.18,62.23,0l42.36,42.36l42.36-42.36c17.18-17.18,45.04-17.18,62.23,0v0 c17.18,17.18,17.18,45.04,0,62.23L325.46,256L367.83,298.36z" />
|
||||||
</svg>
|
</svg>
|
||||||
<span>@_localizer[WebKey.Reject]</span>
|
<span>@_localizer[WebKey.Reject]</span>
|
||||||
</button>
|
</button>
|
||||||
@ -95,8 +97,8 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@if (ViewData["DocumentBytes"] is byte[] documentBytes)
|
@if (ViewData["DocumentBytes"] is byte[] documentBytes)
|
||||||
{
|
{
|
||||||
var settings = new JsonSerializerSettings
|
var settings = new JsonSerializerSettings
|
||||||
{
|
{
|
||||||
ContractResolver = new CamelCasePropertyNamesContractResolver()
|
ContractResolver = new CamelCasePropertyNamesContractResolver()
|
||||||
@ -106,5 +108,5 @@
|
|||||||
var envelopeKey = ViewData["EnvelopeKey"] as string;
|
var envelopeKey = ViewData["EnvelopeKey"] as string;
|
||||||
|
|
||||||
@:document.addEventListener("DOMContentLoaded", async () => await new App("@envelopeKey.TrySanitize(_sanitizer)", @Html.Raw(envelopeReceiverJson.TrySanitize(_sanitizer)), B64ToBuff("@Html.Raw(documentBase64String.TrySanitize(_sanitizer))"), "@ViewData["PSPDFKitLicenseKey"]", "@userCulture?.Info?.TwoLetterISOLanguageName").init())
|
@:document.addEventListener("DOMContentLoaded", async () => await new App("@envelopeKey.TrySanitize(_sanitizer)", @Html.Raw(envelopeReceiverJson.TrySanitize(_sanitizer)), B64ToBuff("@Html.Raw(documentBase64String.TrySanitize(_sanitizer))"), "@ViewData["PSPDFKitLicenseKey"]", "@userCulture?.Info?.TwoLetterISOLanguageName").init())
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
Loading…
x
Reference in New Issue
Block a user