Compare commits
31 Commits
bugfix/wro
...
d8200993af
| Author | SHA1 | Date | |
|---|---|---|---|
| d8200993af | |||
| ee98142405 | |||
| c27337a6f5 | |||
| a09ea990ab | |||
| 05888bc57d | |||
| 39af0fe4fd | |||
| f4c61e3bc7 | |||
| 3f5a584399 | |||
| 6aec854a64 | |||
| c360bde103 | |||
| 82d4b0e740 | |||
| 12519f06f7 | |||
| a2471a0c35 | |||
| 4251a24fe9 | |||
| 63a830c8e3 | |||
| acee28ffce | |||
| 50a541c5bf | |||
| d43877db62 | |||
| 242e66cd8d | |||
| e44fa0b7bd | |||
| 4201f7820a | |||
| e095074c22 | |||
| 412f19547f | |||
| b8c00884a9 | |||
| 51d49d68ba | |||
| 4d5ee2b461 | |||
| 8a79ee4126 | |||
| cde9896c01 | |||
| c7d26a87b0 | |||
| 17ceb1f72a | |||
| b2c396c3b2 |
@@ -1,12 +0,0 @@
|
||||
using DigitalData.Core.Abstraction.Application.Repository;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Contracts.Repositories;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[Obsolete("Use Read-method returning IReadQuery<TEntity> instead.")]
|
||||
public interface IEnvelopeCertificateRepository : ICRUDRepository<EnvelopeCertificate, int>
|
||||
{
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
using DigitalData.Core.Abstraction.Application;
|
||||
using EnvelopeGenerator.Application.DTOs;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Contracts.Services;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[Obsolete("Use MediatR")]
|
||||
public interface IEnvelopeCertificateService : IBasicCRUDService<EnvelopeCertificateDto, EnvelopeCertificate, int>
|
||||
{
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace EnvelopeGenerator.Application.DTOs;
|
||||
|
||||
/// <summary>
|
||||
/// Data Transfer Object representing certificate information for an envelope.
|
||||
/// </summary>
|
||||
[ApiExplorerSettings(IgnoreApi = true)]
|
||||
public class EnvelopeCertificateDto
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the unique identifier of the certificate.
|
||||
/// </summary>
|
||||
public int Id { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the envelope ID associated with the certificate.
|
||||
/// </summary>
|
||||
public int EnvelopeId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the UUID of the envelope.
|
||||
/// </summary>
|
||||
public string EnvelopeUuid { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the subject of the envelope.
|
||||
/// </summary>
|
||||
public string EnvelopeSubject { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the ID of the creator of the envelope.
|
||||
/// </summary>
|
||||
public int CreatorId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name of the creator.
|
||||
/// </summary>
|
||||
public string CreatorName { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the email address of the creator.
|
||||
/// </summary>
|
||||
public string CreatorEmail { get; init; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the current status of the envelope.
|
||||
/// </summary>
|
||||
public int EnvelopeStatus { get; init; }
|
||||
}
|
||||
@@ -27,7 +27,6 @@ public class MappingProfile : Profile
|
||||
CreateMap<DocumentStatus, DocumentStatusDto>();
|
||||
CreateMap<EmailTemplate, EmailTemplateDto>();
|
||||
CreateMap<Envelope, EnvelopeDto>();
|
||||
CreateMap<EnvelopeCertificate, EnvelopeCertificateDto>();
|
||||
CreateMap<EnvelopeDocument, EnvelopeDocumentDto>();
|
||||
CreateMap<Domain.Entities.EnvelopeHistory, EnvelopeHistoryDto>();
|
||||
CreateMap<Domain.Entities.EnvelopeHistory, EnvelopeHistoryCreateDto>();
|
||||
@@ -45,7 +44,6 @@ public class MappingProfile : Profile
|
||||
CreateMap<DocumentStatusDto, DocumentStatus>();
|
||||
CreateMap<EmailTemplateDto, EmailTemplate>();
|
||||
CreateMap<EnvelopeDto, Envelope>();
|
||||
CreateMap<EnvelopeCertificateDto, EnvelopeCertificate>();
|
||||
CreateMap<EnvelopeDocumentDto, EnvelopeDocument>();
|
||||
CreateMap<EnvelopeHistoryDto, Domain.Entities.EnvelopeHistory>();
|
||||
CreateMap<EnvelopeHistoryCreateDto, Domain.Entities.EnvelopeHistory>();
|
||||
@@ -54,7 +52,7 @@ public class MappingProfile : Profile
|
||||
CreateMap<ReceiverReadDto, Domain.Entities.Receiver>().ForMember(rcv => rcv.EnvelopeReceivers, rcvReadDto => rcvReadDto.Ignore());
|
||||
CreateMap<ReceiverCreateDto, Domain.Entities.Receiver>();
|
||||
CreateMap<ReceiverUpdateDto, Domain.Entities.Receiver>();
|
||||
CreateMap<EnvelopeReceiverBase, EnvelopeReceiverBasicDto>();
|
||||
CreateMap<Domain.Entities.EnvelopeReceiver, EnvelopeReceiverBasicDto>();
|
||||
CreateMap<EnvelopeReceiverReadOnlyCreateDto, Domain.Entities.EnvelopeReceiverReadOnly>();
|
||||
CreateMap<EnvelopeReceiverReadOnlyUpdateDto, Domain.Entities.EnvelopeReceiverReadOnly>();
|
||||
|
||||
|
||||
@@ -33,7 +33,6 @@ public static class DependencyInjection
|
||||
services.TryAddScoped<IDocumentStatusService, DocumentStatusService>();
|
||||
services.TryAddScoped<IEmailTemplateService, EmailTemplateService>();
|
||||
services.TryAddScoped<IEnvelopeService, EnvelopeService>();
|
||||
services.TryAddScoped<IEnvelopeCertificateService, EnvelopeCertificateService>();
|
||||
services.TryAddScoped<IEnvelopeDocumentService, EnvelopeDocumentService>();
|
||||
services.TryAddScoped<IEnvelopeReceiverService, EnvelopeReceiverService>();
|
||||
services.TryAddScoped<IEnvelopeTypeService, EnvelopeTypeService>();
|
||||
|
||||
@@ -20,11 +20,22 @@
|
||||
<PackageReference Include="DigitalData.EmailProfilerDispatcher" Version="3.1.1" />
|
||||
<PackageReference Include="MediatR" Version="12.5.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="7.0.18" />
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.5" />
|
||||
<PackageReference Include="Otp.NET" Version="1.4.0" />
|
||||
<PackageReference Include="QRCoder" Version="1.6.0" />
|
||||
<PackageReference Include="QRCoder-ImageSharp" Version="0.10.0" />
|
||||
<PackageReference Include="UserManager" Version="1.1.1" />
|
||||
<PackageReference Include="UserManager" Version="1.1.3" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'net7.0'">
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.5" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'net9.0'">
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.5" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
using AutoMapper;
|
||||
using DigitalData.Core.Application;
|
||||
using EnvelopeGenerator.Application.DTOs;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
using EnvelopeGenerator.Application.Contracts.Repositories;
|
||||
using EnvelopeGenerator.Application.Contracts.Services;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Services;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[Obsolete("Use MediatR")]
|
||||
public class EnvelopeCertificateService : BasicCRUDService<IEnvelopeCertificateRepository, EnvelopeCertificateDto, EnvelopeCertificate, int>, IEnvelopeCertificateService
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="repository"></param>
|
||||
/// <param name="mapper"></param>
|
||||
public EnvelopeCertificateService(IEnvelopeCertificateRepository repository, IMapper mapper)
|
||||
: base(repository, mapper)
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -47,7 +47,7 @@ private readonly IAuthenticator _authenticator;
|
||||
_envRcvService = envelopeReceiverService;
|
||||
_dConfig = dispatcherConfigOptions.Value;
|
||||
_configService = configService;
|
||||
_placeholders = mailConfig.Value.Placeholders;
|
||||
_placeholders = new Dictionary<string, string>(mailConfig.Value.Placeholders);
|
||||
_authenticator = authenticator;
|
||||
}
|
||||
|
||||
|
||||
@@ -84,8 +84,8 @@
|
||||
<Reference Include="DigitalData.Modules.Logging, Version=2.6.5.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\DigitalData.Modules.Logging.2.6.5\lib\net462\DigitalData.Modules.Logging.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DigitalData.UserManager.Domain, Version=3.2.1.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\UserManager.Domain.3.2.1\lib\net462\DigitalData.UserManager.Domain.dll</HintPath>
|
||||
<Reference Include="DigitalData.UserManager.Domain, Version=3.2.3.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\UserManager.Domain.3.2.3\lib\net462\DigitalData.UserManager.Domain.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DocumentFormat.OpenXml, Version=3.2.0.0, Culture=neutral, PublicKeyToken=8fb06cb64d019a17, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\DocumentFormat.OpenXml.3.2.0\lib\net46\DocumentFormat.OpenXml.dll</HintPath>
|
||||
|
||||
@@ -64,7 +64,7 @@ Public Class EnvelopeModel
|
||||
oEnvelope.Receivers = ReceiverModel.ListEnvelopeReceivers(oEnvelope.Id)
|
||||
oEnvelope.Documents = DocumentModel.List(oEnvelope.Id)
|
||||
oEnvelope.History = HistoryModel.List(oEnvelope.Id)
|
||||
oEnvelope.EnvelopeType = EnvelopeTypeModel.GetById(oEnvelope.EnvelopeTypeId)
|
||||
oEnvelope.Type = EnvelopeTypeModel.GetById(oEnvelope.EnvelopeTypeId)
|
||||
|
||||
Return oEnvelope
|
||||
End Function
|
||||
|
||||
@@ -43,5 +43,5 @@
|
||||
<package id="System.Text.Json" version="8.0.5" targetFramework="net462" />
|
||||
<package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net462" />
|
||||
<package id="System.ValueTuple" version="4.5.0" targetFramework="net462" />
|
||||
<package id="UserManager.Domain" version="3.2.1" targetFramework="net462" />
|
||||
<package id="UserManager.Domain" version="3.2.3" targetFramework="net462" />
|
||||
</packages>
|
||||
@@ -2,7 +2,12 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace EnvelopeGenerator.Domain.Entities
|
||||
#if NET
|
||||
;
|
||||
#elif NETFRAMEWORK
|
||||
{
|
||||
#endif
|
||||
|
||||
[Table("TBSIG_CONFIG", Schema = "dbo")]
|
||||
public class Config
|
||||
{
|
||||
@@ -20,4 +25,7 @@ namespace EnvelopeGenerator.Domain.Entities
|
||||
[Column("EXPORT_PATH", TypeName = "nvarchar(256)")]
|
||||
public string ExportPath { get; set; }
|
||||
}
|
||||
|
||||
#if NETFRAMEWORK
|
||||
}
|
||||
#endif
|
||||
@@ -6,15 +6,30 @@ using System;
|
||||
#endif
|
||||
|
||||
namespace EnvelopeGenerator.Domain.Entities
|
||||
#if NET
|
||||
;
|
||||
#elif NETFRAMEWORK
|
||||
{
|
||||
#endif
|
||||
|
||||
[Table("TBSIG_DOCUMENT_RECEIVER_ELEMENT", Schema = "dbo")]
|
||||
public class DocumentReceiverElement
|
||||
{
|
||||
public DocumentReceiverElement()
|
||||
{
|
||||
// TODO: * Check the Form App and remove the default value
|
||||
#if NETFRAMEWORK
|
||||
Id = -1;
|
||||
Required = false;
|
||||
ReadOnly = false;
|
||||
AnnotationIndex = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
[Column("GUID")]
|
||||
public int Id { get; set; } = -1;
|
||||
public int Id { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("DOCUMENT_ID")]
|
||||
@@ -54,26 +69,23 @@ namespace EnvelopeGenerator.Domain.Entities
|
||||
[DefaultValue(1)]
|
||||
public int Page { get; set; }
|
||||
|
||||
// TODO: * Check the Form App and remove the default value
|
||||
[Required]
|
||||
[Column("REQUIRED")]
|
||||
[DefaultValue(false)]
|
||||
public bool Required { get; set; } = false;
|
||||
public bool Required { get; set; }
|
||||
|
||||
[Column("TOOLTIP")]
|
||||
public string Tooltip { get; set; }
|
||||
|
||||
// TODO: * Check the Form App and remove the default value
|
||||
[Required]
|
||||
[Column("READ_ONLY")]
|
||||
[DefaultValue(false)]
|
||||
public bool ReadOnly { get; set; } = false;
|
||||
public bool ReadOnly { get; set; }
|
||||
|
||||
// TODO: * Check the Form App and remove the default value
|
||||
[Required]
|
||||
[Column("ANNOTATION_INDEX")]
|
||||
[DefaultValue(0)]
|
||||
public int AnnotationIndex { get; set; } = 0;
|
||||
public int AnnotationIndex { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("ADDED_WHEN", TypeName = "datetime")]
|
||||
@@ -89,10 +101,15 @@ namespace EnvelopeGenerator.Domain.Entities
|
||||
[ForeignKey("ReceiverId")]
|
||||
public virtual Receiver Receiver { get; set; }
|
||||
|
||||
#if NETFRAMEWORK
|
||||
[NotMapped]
|
||||
public double Top => Math.Round(Y, 5);
|
||||
|
||||
[NotMapped]
|
||||
public double Left => Math.Round(X, 5);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if NETFRAMEWORK
|
||||
}
|
||||
#endif
|
||||
@@ -5,10 +5,23 @@ using System;
|
||||
#endif
|
||||
|
||||
namespace EnvelopeGenerator.Domain.Entities
|
||||
#if NET
|
||||
;
|
||||
#elif NETFRAMEWORK
|
||||
{
|
||||
#endif
|
||||
|
||||
[Table("TBSIG_DOCUMENT_STATUS", Schema = "dbo")]
|
||||
public class DocumentStatus
|
||||
{
|
||||
public DocumentStatus()
|
||||
{
|
||||
// TODO: * check Form Application and remove default value
|
||||
#if NETFRAMEWORK
|
||||
Status = Constants.DocumentStatus.Created;
|
||||
#endif
|
||||
}
|
||||
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
[Column("GUID")]
|
||||
@@ -22,28 +35,14 @@ namespace EnvelopeGenerator.Domain.Entities
|
||||
[Column("RECEIVER_ID")]
|
||||
public int ReceiverId { get; set; }
|
||||
|
||||
// TODO: * check Form Application and remove default value
|
||||
[Required]
|
||||
[Column("STATUS")]
|
||||
public Constants.DocumentStatus Status { get; set; } = Constants.DocumentStatus.Created;
|
||||
|
||||
[Column("STATUS_CHANGED_WHEN", TypeName = "datetime")]
|
||||
public DateTime StatusChangedWhen { get; set; }
|
||||
public Constants.DocumentStatus Status { get; set; }
|
||||
|
||||
[Column("VALUE", TypeName = "nvarchar(max)")]
|
||||
public string Value { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("ADDED_WHEN", TypeName = "datetime")]
|
||||
public DateTime AddedWhen { get; set; }
|
||||
|
||||
[Column("CHANGED_WHEN", TypeName = "datetime")]
|
||||
public DateTime ChangedWhen { get; set; }
|
||||
|
||||
[ForeignKey("EnvelopeId")]
|
||||
public virtual Envelope Envelope { get; set; }
|
||||
|
||||
[ForeignKey("ReceiverId")]
|
||||
public virtual Receiver Receiver { get; set; }
|
||||
}
|
||||
|
||||
#if NETFRAMEWORK
|
||||
}
|
||||
#endif
|
||||
@@ -6,7 +6,12 @@ using System;
|
||||
#endif
|
||||
|
||||
namespace EnvelopeGenerator.Domain.Entities
|
||||
#if NET
|
||||
;
|
||||
#elif NETFRAMEWORK
|
||||
{
|
||||
#endif
|
||||
|
||||
[Table("TBSIG_EMAIL_TEMPLATE", Schema = "dbo")]
|
||||
public class EmailTemplate
|
||||
{
|
||||
@@ -32,4 +37,7 @@ namespace EnvelopeGenerator.Domain.Entities
|
||||
[Column("CHANGED_WHEN", TypeName = "datetime")]
|
||||
public DateTime ChangedWhen { get; set; }
|
||||
}
|
||||
|
||||
#if NETFRAMEWORK
|
||||
}
|
||||
#endif
|
||||
@@ -8,144 +8,153 @@ using System.Linq;
|
||||
#endif
|
||||
|
||||
namespace EnvelopeGenerator.Domain.Entities
|
||||
#if NET
|
||||
;
|
||||
#elif NETFRAMEWORK
|
||||
{
|
||||
#endif
|
||||
|
||||
[Table("TBSIG_ENVELOPE", Schema = "dbo")]
|
||||
public class Envelope
|
||||
{
|
||||
public Envelope()
|
||||
{
|
||||
// TODO: * Check the Form App and remove the default value
|
||||
#if NETFRAMEWORK
|
||||
Id = 0;
|
||||
Status = (int)Constants.EnvelopeStatus.EnvelopeCreated;
|
||||
Uuid = Guid.NewGuid().ToString();
|
||||
Message = My.Resources.Envelope.Please_read_and_sign_this_document;
|
||||
Title= string.Empty;
|
||||
Comment = string.Empty;
|
||||
Language = "de-DE";
|
||||
SendReminderEmails = false;
|
||||
FirstReminderDays = 0;
|
||||
ReminderIntervalDays = 0;
|
||||
CertificationType = (int)Constants.CertificationType.AdvancedElectronicSignature;
|
||||
UseAccessCode = false;
|
||||
Documents = Enumerable.Empty<EnvelopeDocument>().ToList();
|
||||
History = Enumerable.Empty<EnvelopeHistory>().ToList();
|
||||
#endif
|
||||
}
|
||||
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
[Column("GUID")]
|
||||
public int Id { get; set; } = 0;
|
||||
public int Id { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("USER_ID")]
|
||||
public int UserId { get; set; }
|
||||
|
||||
// TODO: * Check the Form App and remove the default value
|
||||
[Required]
|
||||
[Column("STATUS")]
|
||||
public int Status { get; set; } = (int)Constants.EnvelopeStatus.EnvelopeCreated;
|
||||
public int Status { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public string StatusName => ((Constants.EnvelopeStatus)Status).ToString();
|
||||
|
||||
// TODO: The default value is set to 0. Check the Form App to remove this
|
||||
[Required]
|
||||
[Column("ENVELOPE_UUID", TypeName = "nvarchar(36)")]
|
||||
public string Uuid { get; set; } = Guid.NewGuid().ToString();
|
||||
public string Uuid { get; set; }
|
||||
|
||||
// TODO: * Check the Form App and remove the default value
|
||||
[Column("MESSAGE", TypeName = "nvarchar(max)")]
|
||||
public string Message { get; set; } = My.Resources.Envelope.Please_read_and_sign_this_document;
|
||||
public string Message { get; set; }
|
||||
|
||||
[Column("EXPIRES_WHEN", TypeName = "datetime")]
|
||||
public DateTime ExpiresWhen { get; set; }
|
||||
public DateTime? ExpiresWhen { get; set; }
|
||||
|
||||
[Column("EXPIRES_WARNING_WHEN", TypeName = "datetime")]
|
||||
public DateTime ExpiresWarningWhen { get; set; }
|
||||
public DateTime? ExpiresWarningWhen { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("ADDED_WHEN", TypeName = "datetime")]
|
||||
public DateTime AddedWhen { get; set; }
|
||||
|
||||
[Column("CHANGED_WHEN", TypeName = "datetime")]
|
||||
public DateTime ChangedWhen { get; set; }
|
||||
public DateTime? ChangedWhen { get; set; }
|
||||
|
||||
// TODO: * Check the Form App and remove the default value
|
||||
[Column("TITLE", TypeName = "nvarchar(128)")]
|
||||
public string Title { get; set; } = string.Empty;
|
||||
public string
|
||||
#if NET
|
||||
?
|
||||
#endif
|
||||
Title { get; set; }
|
||||
|
||||
[Column("COMMENT", TypeName = "nvarchar(128)")]
|
||||
public string Comment { get; set; } = string.Empty;
|
||||
public string Comment { get; set; }
|
||||
|
||||
[Column("CONTRACT_TYPE")]
|
||||
public int ContractType { get; set; }
|
||||
public int? ContractType { get; set; }
|
||||
|
||||
// TODO: * Check the Form App and remove the default value
|
||||
#if NETFRAMEWORK
|
||||
[NotMapped]
|
||||
public string ContractTypeTranslated => My.Resources.Model.ResourceManager.GetString(ContractType.ToString());
|
||||
#endif
|
||||
|
||||
// TODO: * Check the Form App and remove the default value
|
||||
[Column("LANGUAGE", TypeName = "nvarchar(5)")]
|
||||
public string Language { get; set; } = "de-DE";
|
||||
public string Language { get; set; }
|
||||
|
||||
// TODO: * Check the Form App and remove the default value
|
||||
[Column("SEND_REMINDER_EMAILS")]
|
||||
public bool SendReminderEmails { get; set; } = false;
|
||||
public bool SendReminderEmails { get; set; }
|
||||
|
||||
// TODO: * Check the Form App and remove the default value
|
||||
[Column("FIRST_REMINDER_DAYS")]
|
||||
public int FirstReminderDays { get; set; } = 0;
|
||||
public int? FirstReminderDays { get; set; }
|
||||
|
||||
// TODO: * Check the Form App and remove the default value
|
||||
[Column("REMINDER_INTERVAL_DAYS")]
|
||||
public int ReminderIntervalDays { get; set; } = 0;
|
||||
public int? ReminderIntervalDays { get; set; }
|
||||
|
||||
[Column("ENVELOPE_TYPE")]
|
||||
public int EnvelopeTypeId { get; set; }
|
||||
public int? EnvelopeTypeId { get; set; }
|
||||
|
||||
// TODO: * Check the Form App and remove the default value
|
||||
[Column("CERTIFICATION_TYPE")]
|
||||
public int CertificationType { get; set; } = (int)Constants.CertificationType.AdvancedElectronicSignature;
|
||||
public int? CertificationType { get; set; }
|
||||
|
||||
// TODO: * Check the Form App and remove the default value
|
||||
[Column("USE_ACCESS_CODE")]
|
||||
public bool UseAccessCode { get; set; } = false;
|
||||
public bool UseAccessCode { get; set; }
|
||||
|
||||
[Column("FINAL_EMAIL_TO_CREATOR")]
|
||||
public int FinalEmailToCreator { get; set; }
|
||||
public int? FinalEmailToCreator { get; set; }
|
||||
|
||||
[Column("FINAL_EMAIL_TO_RECEIVERS")]
|
||||
public int FinalEmailToReceivers { get; set; }
|
||||
public int? FinalEmailToReceivers { get; set; }
|
||||
|
||||
[Column("EXPIRES_WHEN_DAYS")]
|
||||
public int ExpiresWhenDays { get; set; }
|
||||
public int? ExpiresWhenDays { get; set; }
|
||||
|
||||
[Column("EXPIRES_WARNING_WHEN_DAYS")]
|
||||
public int ExpiresWarningWhenDays { get; set; }
|
||||
public int? ExpiresWarningWhenDays { get; set; }
|
||||
|
||||
// TODO: * Check the Form App and remove the default value
|
||||
[Column("TFA_ENABLED", TypeName = "bit")]
|
||||
public bool TFAEnabled { get; set; } = false;
|
||||
|
||||
[Column("DOC_RESULT", TypeName = "varbinary(max)")]
|
||||
public byte[] DocResult { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public string CURRENT_WORK_APP { get; set; } = "signFLOW GUI";
|
||||
|
||||
// TODO: * Check the Form App and remove the default value
|
||||
[ForeignKey("UserId")]
|
||||
public User User { get; set; }
|
||||
|
||||
[ForeignKey("EnvelopeTypeId")]
|
||||
public EnvelopeType EnvelopeType { get; set; }
|
||||
public virtual EnvelopeType
|
||||
#if NET
|
||||
?
|
||||
#endif
|
||||
Type { get; set; }
|
||||
|
||||
#if NETFRAMEWORK
|
||||
[NotMapped]
|
||||
public string EnvelopeTypeTitle => EnvelopeType?.Title;
|
||||
public string CURRENT_WORK_APP { get; set; } = "signFLOW GUI";
|
||||
|
||||
[NotMapped]
|
||||
public bool IsAlreadySent => Status > (int)Constants.EnvelopeStatus.EnvelopeSaved;
|
||||
|
||||
[NotMapped]
|
||||
public string StatusTranslated => My.Resources.Model.ResourceManager.GetString(((Constants.EnvelopeStatus)Status).ToString());
|
||||
|
||||
[NotMapped]
|
||||
public bool TFA_Enabled { get; set; } = false;
|
||||
|
||||
[NotMapped]
|
||||
public byte[] DOC_RESULT { get; set; }
|
||||
#endif
|
||||
|
||||
public List<EnvelopeDocument> Documents { get; set; }
|
||||
|
||||
public List<EnvelopeHistory> History { get; set; }
|
||||
|
||||
// TODO: * Check the Form App and remove the default value
|
||||
public List<EnvelopeDocument> Documents { get; set; } = new List<EnvelopeDocument>();
|
||||
|
||||
// TODO: * Check the Form App and remove the default value
|
||||
public List<EnvelopeHistory> History { get; set; } = new List<EnvelopeHistory>();
|
||||
|
||||
// TODO: * Check the Form App and remove the default value
|
||||
public List<Receiver> Receivers { get; set; } = new List<Receiver>();
|
||||
[NotMapped]
|
||||
public List<Receiver> Receivers { get; set; } = Enumerable.Empty<Receiver>().ToList();
|
||||
|
||||
#if NETFRAMEWORK
|
||||
/// <summary>
|
||||
/// Validates whether the receiver and document data are complete.
|
||||
/// </summary>
|
||||
@@ -164,5 +173,9 @@ namespace EnvelopeGenerator.Domain.Entities
|
||||
|
||||
return errors;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if NETFRAMEWORK
|
||||
}
|
||||
#endif
|
||||
@@ -1,42 +0,0 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace EnvelopeGenerator.Domain.Entities
|
||||
{
|
||||
[Table("TBSIG_ENVELOPE_CERTIFICATE", Schema = "dbo")]
|
||||
public class EnvelopeCertificate
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
[Column("GUID")]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("ENVELOPE_ID")]
|
||||
public int EnvelopeId { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("ENVELOPE_UUID", TypeName = "nvarchar(36)")]
|
||||
public string EnvelopeUuid { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("ENVELOPE_SUBJECT", TypeName = "nvarchar(512)")]
|
||||
public string EnvelopeSubject { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("CREATOR_ID")]
|
||||
public int CreatorId { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("CREATOR_NAME", TypeName = "nvarchar(128)")]
|
||||
public string CreatorName { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("CREATOR_EMAIL", TypeName = "nvarchar(128)")]
|
||||
public string CreatorEmail { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("ENVELOPE_STATUS")]
|
||||
public int EnvelopeStatus { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,16 +1,28 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Drawing;
|
||||
#if NETFRAMEWORK
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
#endif
|
||||
|
||||
namespace EnvelopeGenerator.Domain.Entities
|
||||
#if NET
|
||||
;
|
||||
#elif NETFRAMEWORK
|
||||
{
|
||||
#endif
|
||||
|
||||
[Table("TBSIG_ENVELOPE_DOCUMENT", Schema = "dbo")]
|
||||
public class EnvelopeDocument
|
||||
{
|
||||
public EnvelopeDocument()
|
||||
{
|
||||
#if NETFRAMEWORK
|
||||
Elements = Enumerable.Empty<DocumentReceiverElement>().ToList();
|
||||
#endif
|
||||
}
|
||||
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
[Column("GUID")]
|
||||
@@ -20,16 +32,16 @@ namespace EnvelopeGenerator.Domain.Entities
|
||||
[Column("ENVELOPE_ID")]
|
||||
public int EnvelopeId { get; set; } = 0;
|
||||
|
||||
[Required]
|
||||
[Column("ADDED_WHEN", TypeName = "datetime")]
|
||||
public DateTime AddedWhen { get; set; }
|
||||
|
||||
[Column("BYTE_DATA", TypeName = "varbinary(max)")]
|
||||
public byte[] ByteData { get; set; }
|
||||
|
||||
// TODO: * Check the Form App and remove the default value
|
||||
public List<DocumentReceiverElement> Elements { get; set; } = new List<DocumentReceiverElement>();
|
||||
public List<DocumentReceiverElement> Elements { get; set; }
|
||||
|
||||
// TODO: * Check the Form App and remove the default value
|
||||
[NotMapped]
|
||||
public string Filepath { get; set; }
|
||||
|
||||
#if NETFRAMEWORK
|
||||
[NotMapped]
|
||||
public string FileNameOriginal { get; set; }
|
||||
|
||||
@@ -39,13 +51,14 @@ namespace EnvelopeGenerator.Domain.Entities
|
||||
[NotMapped]
|
||||
public string Filename { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public string Filepath { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public Bitmap Thumbnail { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public int PageCount { get; set; }
|
||||
#endif
|
||||
}
|
||||
|
||||
#if NETFRAMEWORK
|
||||
}
|
||||
#endif
|
||||
@@ -6,7 +6,12 @@ using System;
|
||||
#endif
|
||||
|
||||
namespace EnvelopeGenerator.Domain.Entities
|
||||
#if NET
|
||||
;
|
||||
#elif NETFRAMEWORK
|
||||
{
|
||||
#endif
|
||||
|
||||
[Table("TBSIG_ENVELOPE_HISTORY", Schema = "dbo")]
|
||||
public class EnvelopeHistory
|
||||
{
|
||||
@@ -42,7 +47,12 @@ namespace EnvelopeGenerator.Domain.Entities
|
||||
|
||||
public virtual Receiver Receiver { get; set; }
|
||||
|
||||
#if NETFRAMEWORK
|
||||
[NotMapped]
|
||||
public string StatusTranslated => My.Resources.Model.ResourceManager.GetString(Status.ToString());
|
||||
#endif
|
||||
}
|
||||
|
||||
#if NETFRAMEWORK
|
||||
}
|
||||
#endif
|
||||
@@ -1,14 +1,69 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
#if NETFRAMEWORK
|
||||
using System;
|
||||
#endif
|
||||
|
||||
namespace EnvelopeGenerator.Domain.Entities
|
||||
#if NET
|
||||
;
|
||||
#elif NETFRAMEWORK
|
||||
{
|
||||
#endif
|
||||
|
||||
[Table("TBSIG_ENVELOPE_RECEIVER", Schema = "dbo")]
|
||||
public class EnvelopeReceiver : EnvelopeReceiverBase
|
||||
public class EnvelopeReceiver
|
||||
{
|
||||
[Column("ENVELOPE_ID")]
|
||||
public int EnvelopeId { get; set; }
|
||||
|
||||
[Column("RECEIVER_ID")]
|
||||
public int ReceiverId { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("SEQUENCE")]
|
||||
public int Sequence { get; set; }
|
||||
|
||||
[Column("NAME", TypeName = "nvarchar(128)")]
|
||||
public string Name { get; set; }
|
||||
|
||||
[Column("JOB_TITLE", TypeName = "nvarchar(128)")]
|
||||
public string JobTitle { get; set; }
|
||||
|
||||
[Column("COMPANY_NAME", TypeName = "nvarchar(128)")]
|
||||
public string CompanyName { get; set; }
|
||||
|
||||
[Column("PRIVATE_MESSAGE", TypeName = "nvarchar(max)")]
|
||||
public string PrivateMessage { get; set; }
|
||||
|
||||
[Column("ACCESS_CODE", TypeName = "nvarchar(64)")]
|
||||
public string AccessCode { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("ADDED_WHEN", TypeName = "datetime")]
|
||||
public DateTime AddedWhen { get; set; }
|
||||
|
||||
[Column("CHANGED_WHEN", TypeName = "datetime")]
|
||||
public DateTime ChangedWhen { get; set; }
|
||||
|
||||
[Column("PHONE_NUMBER")]
|
||||
[StringLength(20)]
|
||||
[RegularExpression(@"^\+[0-9]+$", ErrorMessage = "Phone number must start with '+' followed by digits.")]
|
||||
public string PhoneNumber { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public Tuple<int, int> Id => Tuple.Create(EnvelopeId, ReceiverId);
|
||||
|
||||
[NotMapped]
|
||||
public bool HasPhoneNumber => !string.IsNullOrWhiteSpace(PhoneNumber);
|
||||
|
||||
[ForeignKey("EnvelopeId")]
|
||||
public Envelope Envelope { get; set; }
|
||||
|
||||
[ForeignKey("ReceiverId")]
|
||||
public Receiver Receiver { get; set; }
|
||||
}
|
||||
|
||||
#if NETFRAMEWORK
|
||||
}
|
||||
#endif
|
||||
@@ -1,57 +0,0 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
#if NETFRAMEWORK
|
||||
using System;
|
||||
#endif
|
||||
|
||||
namespace EnvelopeGenerator.Domain.Entities
|
||||
{
|
||||
[Table("TBSIG_ENVELOPE_RECEIVER", Schema = "dbo")]
|
||||
public class EnvelopeReceiverBase
|
||||
{
|
||||
[Key]
|
||||
[Column("ENVELOPE_ID")]
|
||||
public int EnvelopeId { get; set; }
|
||||
|
||||
[Key]
|
||||
[Column("RECEIVER_ID")]
|
||||
public int ReceiverId { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("SEQUENCE")]
|
||||
public int Sequence { get; set; }
|
||||
|
||||
[Column("NAME", TypeName = "nvarchar(128)")]
|
||||
public string Name { get; set; }
|
||||
|
||||
[Column("JOB_TITLE", TypeName = "nvarchar(128)")]
|
||||
public string JobTitle { get; set; }
|
||||
|
||||
[Column("COMPANY_NAME", TypeName = "nvarchar(128)")]
|
||||
public string CompanyName { get; set; }
|
||||
|
||||
[Column("PRIVATE_MESSAGE", TypeName = "nvarchar(max)")]
|
||||
public string PrivateMessage { get; set; }
|
||||
|
||||
[Column("ACCESS_CODE", TypeName = "nvarchar(64)")]
|
||||
public string AccessCode { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("ADDED_WHEN", TypeName = "datetime")]
|
||||
public DateTime AddedWhen { get; set; }
|
||||
|
||||
[Column("CHANGED_WHEN", TypeName = "datetime")]
|
||||
public DateTime ChangedWhen { get; set; }
|
||||
|
||||
[Column("PHONE_NUMBER")]
|
||||
[StringLength(20)]
|
||||
[RegularExpression(@"^\+[0-9]+$", ErrorMessage = "Phone number must start with '+' followed by digits.")]
|
||||
public string PhoneNumber { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public Tuple<int, int> Id => Tuple.Create(EnvelopeId, ReceiverId);
|
||||
|
||||
[NotMapped]
|
||||
public bool HasPhoneNumber => !string.IsNullOrWhiteSpace(PhoneNumber);
|
||||
}
|
||||
}
|
||||
@@ -7,7 +7,12 @@ using System.Collections.Generic;
|
||||
#endif
|
||||
|
||||
namespace EnvelopeGenerator.Domain.Entities
|
||||
#if NET
|
||||
;
|
||||
#elif NETFRAMEWORK
|
||||
{
|
||||
#endif
|
||||
|
||||
[Table("TBSIG_RECEIVER", Schema = "dbo")]
|
||||
public class Receiver
|
||||
{
|
||||
@@ -33,10 +38,11 @@ namespace EnvelopeGenerator.Domain.Entities
|
||||
public string TotpSecretkey { get; set; }
|
||||
|
||||
[Column("TFA_REG_DEADLINE", TypeName = "datetime")]
|
||||
public DateTime TfaRegDeadline { get; set; }
|
||||
public DateTime? TfaRegDeadline { get; set; }
|
||||
|
||||
public List<EnvelopeReceiver> EnvelopeReceivers { get; set; }
|
||||
|
||||
#if NETFRAMEWORK
|
||||
[NotMapped]
|
||||
public string Name { get; set; }
|
||||
|
||||
@@ -86,5 +92,9 @@ namespace EnvelopeGenerator.Domain.Entities
|
||||
{
|
||||
return EmailAddress.ToUpperInvariant().GetChecksum();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if NETFRAMEWORK
|
||||
}
|
||||
#endif
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="DigitalData.EmailProfilerDispatcher.Abstraction.Attributes" Version="1.0.0" />
|
||||
<PackageReference Include="UserManager.Domain" Version="3.2.1" />
|
||||
<PackageReference Include="UserManager.Domain" Version="3.2.3" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="HtmlSanitizer" Version="8.0.865" />
|
||||
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="9.0.4" />
|
||||
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="8.0.1" />
|
||||
<PackageReference Include="Microsoft.Extensions.Localization.Abstractions" Version="7.0.19" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" />
|
||||
<PackageReference Include="Otp.NET" Version="1.4.0" />
|
||||
|
||||
@@ -101,8 +101,8 @@
|
||||
<Reference Include="DigitalData.Modules.Messaging, Version=1.9.8.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\DigitalData.Modules.Messaging.1.9.8\lib\net462\DigitalData.Modules.Messaging.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DigitalData.UserManager.Domain, Version=3.2.2.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\UserManager.Domain.3.2.2\lib\net462\DigitalData.UserManager.Domain.dll</HintPath>
|
||||
<Reference Include="DigitalData.UserManager.Domain, Version=3.2.3.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\UserManager.Domain.3.2.3\lib\net462\DigitalData.UserManager.Domain.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DocumentFormat.OpenXml, Version=3.2.0.0, Culture=neutral, PublicKeyToken=8fb06cb64d019a17, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\DocumentFormat.OpenXml.3.2.0\lib\net46\DocumentFormat.OpenXml.dll</HintPath>
|
||||
|
||||
@@ -68,17 +68,17 @@ Public Class frmEnvelopeMainData
|
||||
chked_2Faktor.EditValue = DEF_TF_ENABLED
|
||||
|
||||
Else
|
||||
If IsNothing(Envelope.EnvelopeType) Then
|
||||
Envelope.EnvelopeType = EnvelopeType
|
||||
If IsNothing(Envelope.Type) Then
|
||||
Envelope.Type = EnvelopeType
|
||||
End If
|
||||
If Envelope.EnvelopeType.ContractType = 0 Then
|
||||
If Envelope.Type.ContractType = 0 Then
|
||||
cmbEnvelopeType.EditValue = EnvelopeType
|
||||
Else
|
||||
' This will trigger loading values from the type
|
||||
cmbEnvelopeType.EditValue = Envelope.EnvelopeType
|
||||
' cmbEnvelopeType.SelectedIndex = Convert.ToInt32(Envelope.EnvelopeType) - 1
|
||||
cmbEnvelopeType.EditValue = Envelope.Type
|
||||
' cmbEnvelopeType.SelectedIndex = Convert.ToInt32(Envelope.Type) - 1
|
||||
' cmbEnvelopeType.SelectedIndex = Envelope.Type.Id - 1
|
||||
' cmbEnvelopeType.SelectedItem = cmbEnvelopeType.Properties.Items.Cast(Of EnvelopeType).Where(Function(i) i.Id = Envelope.EnvelopeType.Id).SingleOrDefault()
|
||||
' cmbEnvelopeType.SelectedItem = cmbEnvelopeType.Properties.Items.Cast(Of Type).Where(Function(i) i.Id = Envelope.Type.Id).SingleOrDefault()
|
||||
End If
|
||||
|
||||
|
||||
@@ -126,7 +126,7 @@ Public Class frmEnvelopeMainData
|
||||
oEnvelopeType = EnvelopeType
|
||||
End If
|
||||
Envelope.Title = txtTitle.EditValue.ToString
|
||||
Envelope.EnvelopeType = oEnvelopeType
|
||||
Envelope.Type = oEnvelopeType
|
||||
Envelope.EnvelopeTypeId = IIf(IsNothing(oEnvelopeType), 0, oEnvelopeType.Id)
|
||||
Envelope.CertificationType = cmbCertificationType.SelectedIndex + 1
|
||||
Envelope.Language = cmbLanguage.EditValue
|
||||
|
||||
@@ -50,5 +50,5 @@
|
||||
<package id="System.Text.Json" version="9.0.0" targetFramework="net462" />
|
||||
<package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net462" />
|
||||
<package id="System.ValueTuple" version="4.5.0" targetFramework="net462" />
|
||||
<package id="UserManager.Domain" version="3.2.2" targetFramework="net462" />
|
||||
<package id="UserManager.Domain" version="3.2.3" targetFramework="net462" />
|
||||
</packages>
|
||||
@@ -48,7 +48,6 @@ public static class DIExtensions
|
||||
services.TryAddScoped<IDocumentStatusRepository, DocumentStatusRepository>();
|
||||
services.TryAddScoped<IEmailTemplateRepository, EmailTemplateRepository>();
|
||||
services.TryAddScoped<IEnvelopeRepository, EnvelopeRepository>();
|
||||
services.TryAddScoped<IEnvelopeCertificateRepository, EnvelopeCertificateRepository>();
|
||||
services.TryAddScoped<IEnvelopeHistoryRepository, EnvelopeHistoryRepository>();
|
||||
services.TryAddScoped<IEnvelopeReceiverRepository, EnvelopeReceiverRepository>();
|
||||
services.TryAddScoped<IEnvelopeTypeRepository, EnvelopeTypeRepository>();
|
||||
@@ -61,7 +60,6 @@ public static class DIExtensions
|
||||
services.AddDbRepository<EGDbContext, DocumentStatus>(context => context.DocumentStatus).UseAutoMapper();
|
||||
services.AddDbRepository<EGDbContext, EmailTemplate>(context => context.EmailTemplate).UseAutoMapper();
|
||||
services.AddDbRepository<EGDbContext, Envelope>(context => context.Envelopes).UseAutoMapper();
|
||||
services.AddDbRepository<EGDbContext, EnvelopeCertificate>(context => context.EnvelopeCertificates).UseAutoMapper();
|
||||
services.AddDbRepository<EGDbContext, EnvelopeHistory>(context => context.EnvelopeHistories).UseAutoMapper();
|
||||
services.AddDbRepository<EGDbContext, EnvelopeReceiver>(context => context.EnvelopeReceivers).UseAutoMapper();
|
||||
services.AddDbRepository<EGDbContext, EnvelopeType>(context => context.EnvelopeTypes).UseAutoMapper();
|
||||
|
||||
@@ -29,8 +29,6 @@ public class EGDbContext : DbContext, IUserManagerDbContext, IMailDbContext
|
||||
|
||||
public DbSet<EmailTemplate> EmailTemplate { get; set; }
|
||||
|
||||
public DbSet<EnvelopeCertificate> EnvelopeCertificates { get; set; }
|
||||
|
||||
public DbSet<EnvelopeDocument> EnvelopeDocument { get; set; }
|
||||
|
||||
public DbSet<EnvelopeHistory> EnvelopeHistories { get; set; }
|
||||
@@ -73,7 +71,6 @@ public class EGDbContext : DbContext, IUserManagerDbContext, IMailDbContext
|
||||
Envelopes = Set<Envelope>();
|
||||
DocumentReceiverElements = Set<DocumentReceiverElement>();
|
||||
DocumentStatus = Set<DocumentStatus>();
|
||||
EnvelopeCertificates = Set<EnvelopeCertificate>();
|
||||
EnvelopeDocument = Set<EnvelopeDocument>();
|
||||
EnvelopeHistories = Set<EnvelopeHistory>();
|
||||
EnvelopeTypes = Set<EnvelopeType>();
|
||||
@@ -101,7 +98,6 @@ public class EGDbContext : DbContext, IUserManagerDbContext, IMailDbContext
|
||||
modelBuilder.Entity<DocumentStatus>();
|
||||
modelBuilder.Entity<EmailTemplate>();
|
||||
modelBuilder.Entity<Envelope>();
|
||||
modelBuilder.Entity<EnvelopeCertificate>();
|
||||
modelBuilder.Entity<EnvelopeHistory>();
|
||||
modelBuilder.Entity<EnvelopeType>();
|
||||
modelBuilder.Entity<Receiver>();
|
||||
@@ -165,7 +161,6 @@ public class EGDbContext : DbContext, IUserManagerDbContext, IMailDbContext
|
||||
AddTrigger<DocumentStatus>();
|
||||
AddTrigger<EmailTemplate>();
|
||||
AddTrigger<Envelope>();
|
||||
AddTrigger<EnvelopeCertificate>();
|
||||
AddTrigger<EnvelopeDocument>();
|
||||
AddTrigger<EnvelopeHistory>();
|
||||
AddTrigger<EnvelopeReceiver>();
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<PackageReference Include="DigitalData.Core.Infrastructure" Version="2.1.1" />
|
||||
<PackageReference Include="DigitalData.Core.Infrastructure.AutoMapper" Version="1.0.3" />
|
||||
<PackageReference Include="DigitalData.EmailProfilerDispatcher" Version="3.1.1" />
|
||||
<PackageReference Include="UserManager" Version="1.1.1" />
|
||||
<PackageReference Include="UserManager" Version="1.1.3" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1053,7 +1053,7 @@ namespace EnvelopeGenerator.Infrastructure.Migrations
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("EnvelopeGenerator.Domain.Entities.EnvelopeType", b =>
|
||||
modelBuilder.Entity("EnvelopeGenerator.Domain.Entities.Type", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1271,7 +1271,7 @@ namespace EnvelopeGenerator.Infrastructure.Migrations
|
||||
|
||||
modelBuilder.Entity("EnvelopeGenerator.Domain.Entities.Envelope", b =>
|
||||
{
|
||||
b.HasOne("EnvelopeGenerator.Domain.Entities.EnvelopeType", "EnvelopeType")
|
||||
b.HasOne("EnvelopeGenerator.Domain.Entities.Type", "Type")
|
||||
.WithMany()
|
||||
.HasForeignKey("EnvelopeTypeId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1283,7 +1283,7 @@ namespace EnvelopeGenerator.Infrastructure.Migrations
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("EnvelopeType");
|
||||
b.Navigation("Type");
|
||||
|
||||
b.Navigation("User");
|
||||
});
|
||||
|
||||
@@ -1050,7 +1050,7 @@ namespace EnvelopeGenerator.Infrastructure.Migrations
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("EnvelopeGenerator.Domain.Entities.EnvelopeType", b =>
|
||||
modelBuilder.Entity("EnvelopeGenerator.Domain.Entities.Type", b =>
|
||||
{
|
||||
b.Property<int>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
@@ -1268,7 +1268,7 @@ namespace EnvelopeGenerator.Infrastructure.Migrations
|
||||
|
||||
modelBuilder.Entity("EnvelopeGenerator.Domain.Entities.Envelope", b =>
|
||||
{
|
||||
b.HasOne("EnvelopeGenerator.Domain.Entities.EnvelopeType", "EnvelopeType")
|
||||
b.HasOne("EnvelopeGenerator.Domain.Entities.Type", "Type")
|
||||
.WithMany()
|
||||
.HasForeignKey("EnvelopeTypeId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
@@ -1280,7 +1280,7 @@ namespace EnvelopeGenerator.Infrastructure.Migrations
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("EnvelopeType");
|
||||
b.Navigation("Type");
|
||||
|
||||
b.Navigation("User");
|
||||
});
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
using DigitalData.Core.Infrastructure;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
using EnvelopeGenerator.Application.Contracts.Repositories;
|
||||
|
||||
namespace EnvelopeGenerator.Infrastructure.Repositories;
|
||||
|
||||
[Obsolete("Use IRepository")]
|
||||
public class EnvelopeCertificateRepository : CRUDRepository<EnvelopeCertificate, int, EGDbContext>, IEnvelopeCertificateRepository
|
||||
{
|
||||
public EnvelopeCertificateRepository(EGDbContext dbContext) : base(dbContext, dbContext.EnvelopeCertificates)
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
using EnvelopeGenerator.Web.Services;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace EnvelopeGenerator.Web.Controllers
|
||||
{
|
||||
namespace EnvelopeGenerator.Web.Controllers;
|
||||
|
||||
public class BaseController : Controller
|
||||
{
|
||||
protected readonly DatabaseService database;
|
||||
@@ -15,4 +15,3 @@ namespace EnvelopeGenerator.Web.Controllers
|
||||
_logger = logger;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
using EnvelopeGenerator.Application.Contracts.Services;
|
||||
using EnvelopeGenerator.Application.DTOs;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
|
||||
namespace EnvelopeGenerator.Web.Controllers.Test;
|
||||
|
||||
[Obsolete("Use MediatR")]
|
||||
public class TestEnvelopeCertificateController : TestControllerBase<IEnvelopeCertificateService, EnvelopeCertificateDto, EnvelopeCertificate, int>
|
||||
{
|
||||
public TestEnvelopeCertificateController(ILogger<TestEnvelopeCertificateController> logger, IEnvelopeCertificateService service) : base(logger, service)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -7,8 +7,5 @@
|
||||
}
|
||||
},
|
||||
"AdminPassword": "dd",
|
||||
"UseCSPInDev": false,
|
||||
"ConnectionStrings": {
|
||||
"Default": "Server=sDD-VMP04-SQL19\\CURSORAG;Database=DD_ECM;User Id=sa;Password=dd;Encrypt=false;TrustServerCertificate=True;"
|
||||
}
|
||||
"UseCSPInDev": false
|
||||
}
|
||||
74
EnvelopeGenerator.Web/wwwroot/README.md
Normal file
74
EnvelopeGenerator.Web/wwwroot/README.md
Normal file
@@ -0,0 +1,74 @@
|
||||
# 📄 PSPDFKit-Integration – Vanilla JavaScript
|
||||
|
||||
Dieses Projekt zeigt, wie die PDF-Anzeige- und Signaturbibliothek [PSPDFKit](https://www.nutrient.io/sdk/web/getting-started/other-frameworks/javascript/) mithilfe von **Vanilla JavaScript** integriert werden kann.
|
||||
|
||||
## 🚀 Verwendungszweck
|
||||
|
||||
PSPDFKit wurde in der Webanwendung verwendet, um PDF-Dokumente:
|
||||
- anzuzeigen,
|
||||
- zu signieren,
|
||||
- mit Anmerkungen zu versehen,
|
||||
- Formularfelder auszufüllen.
|
||||
|
||||
Benutzer können Dokumente **direkt über den Browser signieren und versenden**.
|
||||
|
||||
---
|
||||
|
||||
## 🔧 Wo und wie wurde PSPDFKit verwendet?
|
||||
|
||||
### 1. PSPDFKit laden
|
||||
|
||||
PSPDFKit wurde mit der Funktion `loadPSPDFKit` in `UI.js` gestartet:
|
||||
|
||||
```js
|
||||
PSPDFKit.load({
|
||||
container: ‚#app‘,
|
||||
document: arrayBuffer,
|
||||
licenseKey: ‚YOUR_LICENSE_KEY‘,
|
||||
...
|
||||
})
|
||||
```
|
||||
|
||||
### 2. Anmerkungen und Formularfelder
|
||||
|
||||
In `annotation.js` werden die folgenden Felder dynamisch zu PDF-Dokumenten hinzugefügt:
|
||||
|
||||
- **Signaturfeld** (`SignatureFormField`)
|
||||
- **Position** (`TextFormField`)
|
||||
- **Stadt** (`TextFormField`)
|
||||
- **Datum** (`TextFormField`, wird automatisch mit dem heutigen Datum ausgefüllt)
|
||||
- **Bezeichnungen** (`Ort`, `Position`, `Date`) – dies sind nur lesbare Textfelder.
|
||||
- **Rahmen für Signaturbild** – wird dynamisch erstellt und platziert, wenn der Benutzer unterschreibt.
|
||||
|
||||
Die Felder werden entsprechend ihrer Position auf dem PDF berechnet und für jedes Feld wird eine eindeutige ID erstellt.
|
||||
|
||||
---
|
||||
|
||||
### 3. Anpassungen der Symbolleiste
|
||||
|
||||
In `UI.js` ist die Standard-Symbolleiste (`toolbarItems`) von PSPDFKit konfiguriert:
|
||||
|
||||
- Es werden nur zulässige Elemente (`sidebar`, `zoom`, `pager`, `search` usw.) angezeigt.
|
||||
- Je nach Benutzerberechtigung (z. B. schreibgeschützt oder beschreibbar) werden die folgenden speziellen Schaltflächen dynamisch hinzugefügt:
|
||||
|
||||
**Beschreibbarer Modus:**
|
||||
- `Teilen` (SHARE)
|
||||
- `Logout` (LOGOUT)
|
||||
- `Zurücksetzen` (RESET)
|
||||
- `Ablehnen` (REJECT)
|
||||
- `Finalisieren` (FINISH)
|
||||
|
||||
**Nur-Lesemodus:**
|
||||
- Die Schaltfläche `Teilen` kopiert nur den Link in die Zwischenablage (COPY_URL)
|
||||
|
||||
Für mobile Geräte werden zusätzlich vereinfachte Schaltflächen angezeigt.
|
||||
|
||||
---
|
||||
|
||||
### 📁 Wichtige Dateien
|
||||
|
||||
| Datei | Beschreibung |
|
||||
|-------------------|-----------------------------------------------|
|
||||
| `app.js` | Hauptanwendungsklasse, Dokumentladen und -steuerung |
|
||||
| `ui.js` | PSPDFKit-UI-Einrichtung und Symbolleistenverwaltung |
|
||||
| `annotation.js` | Erstellen und Löschen von Anmerkungsfeldern |
|
||||
Reference in New Issue
Block a user