1608 Commits

Author SHA1 Message Date
a433654f86 refactor(DocSignedNotification): Aktualisierung, um von EnvelopeReceiverDto zu erben.
- Erweiterungsmethoden für die Zuordnung hinzufügen.
2025-09-03 15:38:41 +02:00
b599ada864 add DocSignedNotification 2025-09-03 15:17:03 +02:00
6b00ab6a45 refactor(SaveDocStatusCommand): update to return DocumentStatusDto. 2025-09-03 13:03:09 +02:00
6ab85f25eb refactor(SignDocBehavior): add to handle the events after document status updateted 2025-09-03 12:49:16 +02:00
fa46dd1fa8 feat(Format): create to centrilize the formats.
- Add json serializer settings for diagnostics and implement to DocumentController
2025-09-03 11:06:47 +02:00
e623680c3f refactor(DocumentController): migrate from legacy service to MediatR pattern
- Replace obsolete DocumentController implementation using EnvelopeOldService and direct dependencies
- Migrate to MediatR-based query handling via ReadEnvelopeReceiverAsync
- Remove obsolete constructors and actions marked for deprecation
- Add proper error handling with NotFoundException for missing envelope or document data
- Improve logging with structured JSON output for diagnostics
- Update base class from BaseController to ControllerBase and add ApiController attribute
- Rename action to GetDocument and apply explicit HttpGet routing
- Use IMediator for clean separation of concerns and alignment with CQRS pattern
2025-09-03 10:51:34 +02:00
f6e34c6d91 refactor(HistoryTests): Verbesserung von HistoryTests mit realistischen Daten und konsistenter Struktur
- Verwendung tatsächlicher Umschlag- und Empfängerdaten anstelle von magischen Zahlen
- Ersetzen von fest codierten EnvelopeId und UserReference durch dynamisch erstellte Entitäten
- Aktualisierung von ReadHistoryQuery zur Verwendung der Objektinitialisierungssyntax
- Fügen Sie CancellationToken zu Mediator.Send-Aufrufen hinzu, um Konsistenz zu gewährleisten
- Verwenden Sie EnvelopeHistoryDto explizit in der Assertion
- Verbessern Sie die Lesbarkeit und den Realismus des Tests, indem Sie vollständige Voraussetzungdaten einrichten
- Korrigieren Sie die Schreibweise im Kommentar: „EnvelopeReceiver” -> „envelope receiver”
2025-09-03 10:08:42 +02:00
fc443fb87f refactor(ReadHistoryQuery): Aktualisierung zur Verwendung von getter-initter. 2025-09-03 09:34:12 +02:00
1c9d0a6c47 refactor(MappingProfile): update to ignore Envelope, Sender and Receiver 2025-09-02 23:58:35 +02:00
23ec4fe322 remove re-read process 2025-09-02 23:14:16 +02:00
8ca0519dbc feat(history): CreateHistoryCommand wurde verbessert, um DTO zurückzugeben und den Empfänger zu validieren.
- Der Rückgabetyp des Handlers wurde von „long?“ zu „EnvelopeHistoryDto?“ geändert.
 - AutoMapper-Integration für die Zuordnung von EnvelopeHistory zu DTO hinzugefügt.
 - IRepository<EnvelopeReceiver> zur Validierung der Benutzerreferenz eingeführt.
 - Validierung implementiert, um sicherzustellen, dass genau ein Empfänger gefunden wird.
 - BadRequestException-Behandlung für fehlende oder mehrere Empfänger hinzugefügt.
2025-09-02 23:11:41 +02:00
c67bac3e16 test(history): Aktualisieren Sie HistoryTests, um die Erstellung von Umschlägen auf Repository-Basis zu verwenden. 2025-09-02 18:48:18 +02:00
6cdd1db7a9 feat(Fake): add extension method to Fake to create Envelope 2025-09-02 15:25:59 +02:00
a87a524271 feat(MappingProfile): UUID-Generierung beim Zuordnen von CreateEnvelopeCommand zu Envelope hinzufügen 2025-09-02 12:19:06 +02:00
ddb2439b29 add mapping profile to convert CreateEnvelopeCommand to Envelope 2025-09-01 17:30:38 +02:00
d48514bbad refactor(Extensions): update CreateEnvelopeCommand to make UseSQLExecutor false 2025-09-01 17:27:14 +02:00
00077a647a feat(envelopes): add support for SQLExecutor or repository when creating envelopes
- Refactored `CreateEnvelopeCommandHandler` to resolve dependencies via `IServiceProvider`
- Added `IRepository<Envelope>` to allow repository-based envelope creation
- Updated handler logic to choose between `IEnvelopeExecutor` and repository based on `UseSQLExecutor` flag
2025-09-01 17:23:40 +02:00
ee7eb08e75 refactor(CreateEnvelopeCommand): add UseSQLExecutor-property 2025-09-01 17:07:16 +02:00
6a34b65825 rename as ToEnvelopeKey 2025-09-01 15:43:13 +02:00
20d312a84e update to create key by EncodeEnvelopeReceiverId 2025-09-01 15:42:33 +02:00
87c5e7e4de feat(HistoryTests): add create receiver logic 2025-09-01 15:27:32 +02:00
bb93b980b4 refactor(HistoryTests): create and implement TestBase 2025-09-01 15:19:52 +02:00
950ae5a418 Update HistoryTests with new commands and setup changes
- Added new using directives for additional namespaces.
- Replaced `_host.AddSampleReceivers()` with `_host.AddSamples()` in the Setup method.
- Introduced `createEnvelopeCmd` in the test method to create an envelope before executing the history command.
2025-09-01 15:06:10 +02:00
582cc1eb13 Refactor CreateHistoryCommand and update tests
- Simplified `CreateHistoryCommand` method by removing generic type parameters.
- Updated `using` directives in `HistoryTests` to include necessary constants.
- Revised test method to utilize `Fake.Provider.CreateHistoryCommand` for improved maintainability.
2025-09-01 14:52:49 +02:00
9434f83b3e Refactor EnvelopeReceiver and History controllers
- Added using directive for EnvelopeGenerator.Domain.Constants.
- Updated ignore_statuses type in EnvelopeReceiverController.
- Improved resource management with using statements for SqlConnection and SqlCommand.
- Changed from Array.Empty<Signature>() to Enumerable.Empty<Signature>() for better performance.
- Simplified GetEnvelopeStatus method in HistoryController by using Status directly.
2025-09-01 14:21:53 +02:00
bbe93dad45 Refactor Receiver handling to use ReceiverVM
Updated ReceiverModel and EnvelopeEditorController to utilize ReceiverVM instead of Receiver in multiple function signatures. This change enhances the structure and flexibility of receiver data handling. Adjusted related methods in frmEnvelopeEditor to align with the new view model approach.
2025-09-01 13:53:09 +02:00
0a876fe486 Refactor EnvelopeEditorController for type consistency
- Updated constructor to cast receivers to EnvelopeReceiver.
- Changed ResendReceiverInvitation parameter from Receiver to ReceiverVM.
- Modified ValidateEnvelopeForSending to use EnvelopeReceiver and correct ID for validation.
2025-09-01 13:47:32 +02:00
a584a548d6 Refactor InsertReceiver method in EnvelopeEditorController
Removed conditional check for receiver ID in InsertReceiver.
The method now always attempts to insert the receiver,
simplifying the logic and ensuring consistent behavior.
2025-09-01 13:27:38 +02:00
3e3c9d4c54 Refactor Receiver to ReceiverVM in EnvelopeEditor and Main
Updated the `oReceiver` variable type from `Receiver` to `ReceiverVM` in the `frmEnvelopeEditor` and `frmMain` classes to align with a view model pattern. Modified the `Controller.DeleteReceiver` method to use `oReceiver.Receiver`, reflecting the new structure. Additionally, created `BindingList` of `ReceiverVM` to support a more MVVM architecture.
2025-09-01 13:00:03 +02:00
33fa4b76f5 Refactor receiver handling and update solution structure
- Updated `BaseController.vb` to use `Receiver.Id` for deletion.
- Changed `Receivers` property in `frmEnvelopeEditor.vb` to `BindingList(Of ReceiverVM)` and adjusted initialization and usage throughout the file.
- Modified `frmFieldEditor.vb` to use `List(Of ReceiverVM)` for receivers and updated related methods.
- Adjusted color assignment logic in `frmMain.vb` to utilize a new `Value` class.
- Added new project for `EnvelopeGenerator.Form` in the solution file.
- Introduced new enums `ContractType` and `PageOrientation` in their respective files.
2025-09-01 12:55:15 +02:00
7a84726a3b Refactor constant imports and enhance safety checks
Updated constant imports from static to regular usage across multiple controllers.
Improved null safety in `DebugEnvelopes.cshtml` by ensuring the `Receivers` property is not null before access.
Modified authorization attribute in `DocumentController.cs` to directly reference `Domain.Constants.ReceiverRole.FullyAuth`.
2025-09-01 11:31:39 +02:00
27d97ed12a Add constants import and refactor PDF burner params
- Added import for `EnvelopeGenerator.Domain.Constants` in
  `Scheduler_Envelopetask_API.vb` and `Scheduler_FinishEnvelope.vb`
  to access necessary constants.

- Updated the key for `_pdfBurnerParams` in
  `Scheduler_FinishEnvelope.vb` from
  `Domain.Constants.PDF_BURNER_PARAMS` to
  `Value.PDF_BURNER_PARAMS` for better organization.
2025-09-01 11:24:23 +02:00
f699e5a9aa Refactor constant references across multiple files
Updated import statements and changed references from
`Domain.Constants` to `Value` in `APIEnvelopeJob.vb`,
`FinalizeDocumentJob.vb`, `HistoryModel.vb`, `EmailService.vb`,
and job scheduling files. This standardizes constant access
and improves code maintainability and readability.
2025-09-01 11:20:57 +02:00
dc723d9f02 Refactor envelope status handling and imports
Updated `EnvelopeStatus` type in place of `EnvelopeStatusQuery` across multiple files, enhancing the domain model. Added `using` directives for `EnvelopeGenerator.Domain.Constants` in several files, improving clarity and maintainability. Modified import statements in Visual Basic files and repository classes to standardize imports. Overall, these changes aim to refine the structure and clarity of the codebase.
2025-09-01 11:17:27 +02:00
48ce0d5f32 Refactor EnvelopeStatus usage and streamline code
- Added `EnvelopeGenerator.Domain.Constants` in multiple files, replacing `Domain.Constants.EnvelopeStatus` with `EnvelopeStatus` for improved readability.
- Modified `CreateEnvelopeCommandHandler.cs` to directly use `request.UserId`, eliminating unnecessary local variable assignment.
- Identified potential duplication in query logic within `ReceiverAlreadySignedQuery.cs`.
- Updated `IEnvelopeService`, `EnvelopeReceiverService`, and `EnvelopeService` to ensure consistent usage of the simplified `EnvelopeStatus`.
- Overall, these changes enhance code maintainability and clarity.
2025-09-01 11:11:30 +02:00
ef7e694c9f refactor(Application.Envelopes.Queries.EnvelopeStatus): rename as EnvelopeStatusQuery 2025-09-01 11:06:41 +02:00
c5c040fb15 Refactor enum usage in codebase
Updated references from `Constants` to direct usage of `EnvelopeStatus` and `EmailTemplateType` enums. This change enhances code readability and reduces dependency on the `Constants` class.

Modified properties and parameters across command classes, DTOs, repositories, and services to use the enums directly. Updated `ModifyDocStatusCommandBase`, `EnvelopeHistoryDto`, and `ResetEmailTemplateCommand` for improved clarity.

Consistent updates across multiple files indicate a systematic refactoring aimed at streamlining the codebase and improving maintainability. Comments and documentation have also been revised to reflect these changes.
2025-09-01 11:04:40 +02:00
fc4187bb9e Refactor constants and update CreateHistoryCommand
Updated `CreateHistoryCommand.cs` to use the `EnvelopeStatus` enum directly from the `EnvelopeGenerator.Domain.Constants` namespace. Refactored `Constants.cs` to consolidate multiple enums related to statuses, types, and roles. Modified `Fake.cs` to align with the new enum structure and introduced `Value.cs` for better organization of constant string values. Overall, these changes enhance code clarity and maintainability.
2025-09-01 10:41:36 +02:00
ae4f5560fe Remove unused enums from Constants.cs
This commit removes the `ContractType` and `PageOrientation` enums from the `EnvelopeGenerator.Domain.Constants.cs` file. The `ContractType` enum included values for `Contract` and `ReadAndSign`, while the `PageOrientation` enum included values for `Portrait` and `Landscape`. The `ElementType` and `ColorType` enums remain unchanged.
2025-09-01 10:19:36 +02:00
09eb91b6be Add history command support and enum selection method
- Introduced new using directives for histories and models.
- Added `PickEnum<T>` method to randomly select enum values.
- Renamed region from `#region Envelope Command` to `#region Envelope`.
- Implemented `CreateHistoryCommand<TEnvelopeQuery, TReceiverQuery>` for creating history commands.
- Organized new method under a new region `#region History`.
2025-09-01 10:16:50 +02:00
838d7e3ab8 refactor(ReceiverGetOrCreateCommand): update to use getter inittier 2025-08-29 16:33:01 +02:00
542d80c439 fix(CreateEnvelopeReceiverCommandHandler): remove request.UserId null-check 2025-08-29 16:23:44 +02:00
145a2ebe8f feat(Extensions): add PDF generation support for EnvelopeGenerator tests
- Introduced QuestPDF dependency to generate PDF documents in tests.
- Added `CreatePdfAsBase64` extension method for generating random PDF content.
- Added `CreateDocumentCommand` and `CreateDocumentCommands` helpers for creating document test data.
- Refactored using statements and added `EnvelopeGenerator.Application.EnvelopeReceivers.Commands`.
- Maintains existing sample user and receiver setup for integration testing.
2025-08-29 16:11:14 +02:00
9cf776fa98 fix(CreateEnvelopeReceiverCommand): update to use getter-setter 2025-08-29 15:33:03 +02:00
68878c0fc8 feat(Fake): Erweiterung von Fake.Host um Repository-Zugriff und Unterstützung für Beispielbenutzer
- IRepository<TEntity>-Verknüpfung zum Auflösen von Repositorys hinzugefügt
 - AddSamples()-Hilfsprogramm zum gemeinsamen Initialisieren von Empfängern und Benutzern eingeführt
 - SampleReceivers mit Validierungsüberwachung verbessert
 - Beispiel für Benutzerinitialisierung über Repository mit AddSampleUser() hinzugefügt
 - using-Anweisungen aktualisiert, um DigitalData.Core.Abstraction.Application.Repository und DigitalData.UserManager.Domain.Entities einzubeziehen
2025-08-29 14:57:51 +02:00
d3e5d3d791 refactor(Extensions): add CreateUserCommand and CreateUserCommands 2025-08-29 14:37:24 +02:00
a7f6b94d20 create CreateUserCommand with handler and mapping profile 2025-08-29 14:31:36 +02:00
777f20eddb create faker-extension method for Envelope Commands 2025-08-29 14:00:00 +02:00
c14ffceee4 refactor(CreateEnvelopeCommand): update to generate with getter-setter 2025-08-29 13:41:10 +02:00
e9202ad23e refactor(Fake): Ersetzen der Roh-E-Mail-Generierung durch CreateReceiverCommand-Helfer
- Direkte Verwendung von `Internet.EMailList()` für Beispielempfänger entfernt.
- Erweiterungsmethoden `CreateReceiverCommand` und `CreateReceiverCommands` in `Faker` eingeführt.
- `AddSampleReceivers` aktualisiert, um `CreateReceiverCommands` für eine sauberere, konsistentere Testdatenerstellung zu verwenden.
2025-08-29 13:25:36 +02:00