Commit Graph

2257 Commits

Author SHA1 Message Date
ead33ab2e7 Refactor Envelope properties; add DefaultDocument property
Refactored property declarations in the Envelope class for improved readability by removing unnecessary line breaks and nullable preprocessor directives. Added a [NotMapped] DefaultDocument property to return the first document in the Documents list, or null if none exist.
2026-03-09 15:09:51 +01:00
d1e2840617 Clean up debug logging in FinalizeDocumentJob
Removed numerous debug-level log statements to reduce log verbosity and focus on warnings and information logs. Updated some log messages to use interpolated strings for clarity. Refactored GetAnnotationData to use C# collection expressions for improved code conciseness.
2026-03-09 11:35:49 +01:00
a39ef6a0e2 Improve error handling in FinalizeDocumentJob
Added RethrowOnError property to control exception rethrowing during envelope finalization. Exceptions are now logged as errors and, if RethrowOnError is true, rethrown to enable stricter error handling and halt execution on failure.
2026-03-09 11:30:43 +01:00
7d620988d8 Refactor envelope finalization into a private method
Extracted envelope finalization logic from the foreach loop into a new private Finalize(Envelope envelope) method. This improves code readability and maintainability by encapsulating all steps of the finalization process without changing functionality.
2026-03-09 11:25:36 +01:00
cc4a7d8c20 Refactor ActionService: DI, CancellationToken support
Refactored ActionService to use constructor injection for IRepository<History>. Updated all public methods to accept optional CancellationToken parameters for improved cancellation support. Added necessary using directives. Class remains a placeholder with [Obsolete] attributes and NotImplementedException.
2026-03-09 10:18:53 +01:00
0b8068f926 Add summary comment to ActionService for migration context
Added an XML summary comment to the ActionService class to indicate it is being migrated from EnvelopeGenerator.CommonServices.Services.ActionService. This provides clarity on the class's origin and intended purpose; no functional changes were made.
2026-03-09 10:12:32 +01:00
9fd7a68798 Refactor envelope processing for per-item error handling
Move per-envelope logic in FinalizeDocumentJob into its own try-catch block within the foreach loop. This ensures that exceptions in processing one envelope do not halt the processing of others, improving robustness and fault tolerance. Removed the outer try-catch-finally block and updated logging to reflect per-envelope and overall job status.
2026-03-09 09:42:55 +01:00
d6e2690bb8 Refactor envelope fetch to use EF LINQ instead of SQL
Replaced raw SQL and DataTable usage with Entity Framework LINQ queries for retrieving completed envelopes. The process now works directly with envelope entities, improving code readability, maintainability, and leveraging EF's querying capabilities. Logging and error handling have been updated to use envelope properties directly.
2026-03-09 09:38:08 +01:00
f04385a03c Remove EnvelopeModel class and its GetById method
Deleted the EnvelopeModel class, which included the GetById method for retrieving Envelope entities from the database. Also removed related using directives and namespace declarations. This cleanup eliminates unused or redundant code.
2026-03-06 14:53:14 +01:00
c88e7b2b9e Refactor FinalizeDocumentJob to use async repository access
Replaced EnvelopeModel with IRepository<Envelope> in FinalizeDocumentJob, switching to dependency-injected, repository-based, and asynchronous data access using Entity Framework. Updated envelope retrieval to use SingleOrDefaultAsync, improving maintainability and scalability. Added necessary using directives to support these changes.
2026-03-06 14:53:00 +01:00
0ee7ec82d6 Mark TempFiles class and members as obsolete
The TempFiles class, including its TempPath property, constructor,
and methods (Create, CleanUpFiles, CleanUp), is now marked with
the [Obsolete("Use memory cache instead of temp files.")] attribute.
This deprecates the use of temp files in favor of a memory cache
approach for future development.
2026-03-06 14:48:19 +01:00
a6d6dc8c4d Add expiration, reminder, and comment fields to EnvelopeDto
Expanded EnvelopeDto with new properties for expiration dates, reminder scheduling, notification options, and an optional comment field. These changes provide finer control over envelope lifecycle and metadata.
2026-03-06 14:43:59 +01:00
ab038df8b9 Update nullability for Title and Comment properties
Removed nullable annotation from Title, making it non-nullable.
Changed Comment to be nullable with conditional compilation
support for nullable reference types.
2026-03-06 14:43:27 +01:00
302249451b Remove ConstantsTests and add Domain folder to test project
Removed the ConstantsTests.cs file, which tested the Normalize
method for EnvelopeSigningType. Updated EnvelopeGenerator.Tests.csproj
to include a Domain folder for future test organization.
2026-03-06 14:16:22 +01:00
a4082fca45 Remove ConfigModel and DbConfig classes
Deleted ConfigModel.cs and DbConfig.cs, removing both the configuration loading logic and the DbConfig data structure from the codebase. This eliminates database-driven configuration management functionality.
2026-03-06 13:58:29 +01:00
f3ae8a9c49 Refactor config loading to async MediatR query in job
Switched FinalizeDocumentJob to use MediatR for async config retrieval, replacing direct model access. Updated _config type to ConfigDto?, injected IMediator, and removed obsolete DbConfig references. Cleaned up ExecuteAsync method for improved clarity and decoupling.
2026-03-06 13:58:16 +01:00
d6058c41d0 Remove DocumentPathOrigin from DbConfig and usages
DocumentPathOrigin property and all related code references have
been removed from DbConfig, ConfigModel, and FinalizeDocumentJob.
DocumentPath is now used exclusively for document path handling,
simplifying configuration and reducing redundancy.
2026-03-06 13:51:20 +01:00
79d093c492 Add new properties to ConfigDto for TFA and metadata
Expanded ConfigDto with properties for document path, timestamps, legacy GUID, and default TFA settings. Added XML documentation for each new property.
2026-03-06 13:22:44 +01:00
56c65b6fbb Add new properties to Config entity with mappings
Added DocumentPath, AddedWhen, ChangedWhen, Guid, DefTfaEnabled, and DefTfaWithPhone properties to the Config entity, each mapped to corresponding database columns with appropriate data types and attributes. Also included a conditional using directive for System under NETFRAMEWORK.
2026-03-06 13:22:22 +01:00
2af18842c4 Merge branch 'master' into feat/service-host 2026-03-06 13:06:38 +01:00
7c7674c822 Show "Confirmed by" or "Signed by" label conditionally
The signature label now displays "Confirmed by" if READ_AND_CONFIRM is true, otherwise "Signed by". This uses the appropriate localized string when available, defaulting to "Signed by" if not. Previously, only "Signed by" was shown.
2026-03-06 12:55:30 +01:00
65f606f573 Update finalize dialog text based on READ_AND_CONFIRM flag
The confirmation dialog when finalizing a document now displays
context-appropriate text depending on the READ_AND_CONFIRM flag.
If true, it shows localized.confirmAgree; otherwise, it shows
localized.sigAgree, improving clarity for different workflows.
2026-03-06 12:55:19 +01:00
41e0d4691b Add in-memory caching to ReadDefaultConfigQueryHandler
Injected IMemoryCache into ReadDefaultConfigQueryHandler and updated the Handle method to cache the default configuration for 30 minutes. This reduces database queries and improves performance for frequently accessed configuration data.
2026-03-06 11:54:50 +01:00
64e0a4f749 Centralize cache key definitions in CacheKey class
Refactored cache key usage by introducing a new static CacheKey class in the Application.Common namespace. Replaced the private DefaultConfigCacheId in ConfigService with CacheKey.DefaultConfig. Updated using statements accordingly. This change improves maintainability by centralizing cache key management and sets the stage for future cache key consolidation.
2026-03-06 11:41:47 +01:00
4cf54d36b9 Add EnforceSingleResult to config query and improve errors
Added EnforceSingleResult to ReadDefaultConfigQuery to allow strict single-result enforcement. Updated handler logic to use SingleOrDefaultAsync when requested. Replaced InvalidOperationException with NotFoundException and improved error messaging when no configuration is found.
2026-03-06 11:35:49 +01:00
020cecabf3 Add query/handler to fetch default config via MediatR
Introduced ReadDefaultConfigQuery and its handler to retrieve the application's default configuration using MediatR. The handler fetches the first Config entity from the repository, maps it to ConfigDto, and throws an exception if no configuration is found.
2026-03-06 11:08:03 +01:00
40c899e47e Merge branch 'master' into feat/service-host 2026-03-06 10:29:27 +01:00
0341505f8d Merge branch 'origin/bugfix/history-inconsistency' 2026-03-06 10:15:22 +01:00
d4eee1718e Bump version to 3.12.0 in project file
Updated <Version>, <AssemblyVersion>, and <FileVersion> fields in EnvelopeGenerator.Web.csproj from 3.11.0 to 3.12.0. No other changes were made.
2026-03-06 10:13:45 +01:00
9b042d8f45 Merge branch 'master' of http://git.dd:3000/AppStd/EnvelopeGenerator 2026-03-06 09:54:26 +01:00
OlgunR
ad0c847172 Add SigningProcessTitle resource; rename rejection key
Added localized SigningProcessTitle entry to de-DE, en-US, and fr-FR resource files. Renamed RejectionInfoConfirmation to RejectionInfo1Confirmation. Removed duplicate SigningProcessTitle entries. No changes to localized values.
2026-03-06 09:53:18 +01:00
f6d57b1e38 Update progress bar to show Confirmations or Signatures
Progress bar label now displays "Confirmations" if isReadAndConfirm is true, otherwise it shows "Signatures". This improves clarity for users based on the envelope's required action.
2026-03-06 09:52:12 +01:00
b64d2b7478 Refactor: cache IsReadAndConfirm() result in variable
Store envelope.IsReadAndConfirm() in isReadAndConfirm variable to avoid redundant calls and improve code readability when setting ViewData["Title"]. No change to logic or behavior.
2026-03-06 09:50:33 +01:00
OlgunR
f8c7f60cf9 Add resource strings for document confirmation workflows
Added new localized strings for document confirmation processes in de-DE, en-US, and fr-FR resource files, including confirmation messages, UI labels, and process titles. Fixed a typo in the German resource and ensured consistency for the "SigningProcessTitle" key across languages.
2026-03-06 09:50:21 +01:00
44edef8ba1 Update envelope view title logic for confirm state
Refined the logic for setting ViewData["Title"] in ShowEnvelope.cshtml. Now, if the envelope requires read and confirm, the title displays "Confirm Document" instead of just "Sign Document" or "View Document", providing clearer context for users.
2026-03-06 09:43:16 +01:00
647c5d2353 Add localization extensions for confirmation resources
Added three new extension methods to the Extensions class in Resource.cs: ConfirmDoc, ConfirmAgree, and ConfirmationProcessTitle. Each method retrieves the localized value for its respective resource key and includes XML documentation, consistent with existing localization methods.
2026-03-06 09:31:19 +01:00
4ce1d2a370 Add RejectionInfo1ForConfirmation extension method
Introduced a new extension method, RejectionInfo1ForConfirmation, to the Extensions class in Resource.cs. This method retrieves the localized string for "RejectionInfo1ForConfirmation" from an IStringLocalizer instance, providing functionality similar to the existing RejectionInfo1 method.
2026-03-06 09:28:12 +01:00
bcc53bf9f1 Update rejection header for read and confirm envelopes
Add logic to display a specific rejection message when an envelope is rejected as part of a "read and confirm" process. The header now distinguishes between external, confirmation-related, and default rejection scenarios for improved user feedback.
2026-03-06 09:27:41 +01:00
f1e38e3bd3 Reverse IsReadAndConfirm logic for envelope status texts
Swapped the display logic for localized titles and messages based on the IsReadAndConfirm flag. Now, "confirmed" texts are shown when IsReadAndConfirm is true, and "signed" texts when false. This update ensures correct status messaging throughout the envelope confirmation flow.
2026-03-06 09:17:17 +01:00
e095860b17 Update EnvelopeSigned page to handle confirm vs sign
Add conditional logic to EnvelopeSigned.cshtml to display different headings and confirmation messages based on whether the document was signed or confirmed, using the IsReadAndConfirm flag. This improves user feedback by distinguishing between signing and confirming actions.
2026-03-06 01:25:07 +01:00
9cfc74aa88 Refactor title logic and fix localizer syntax in view
Refactored EnvelopeSigned.cshtml to use a local variable for IsReadAndConfirm when setting the page title, improving readability. Also updated Razor syntax for localizer calls in <h1> and <p> elements to ensure correct evaluation and formatting.
2026-03-06 01:23:06 +01:00
7cd6ca3a5f Update EnvelopeSigned view model and title logic
Set model to EnvelopeReceiverDto and import required types. Update ViewData["Title"] to use DocSigned or DocConfirmed based on Envelope.IsReadAndConfirm() result.
2026-03-06 01:20:47 +01:00
9b660cb25a Pass model to EnvelopeSigned view on already signed check
Previously, the "EnvelopeSigned" view was returned without a model when an envelope was already signed. Now, the er model object is passed to the view to provide additional context or data.
2026-03-06 01:20:25 +01:00
3d43d1896d Add DocConfirmed extension method to Resource.cs
Added a new DocConfirmed extension method to the Extensions class in Resource.cs. This method enables retrieval of the "DocConfirmed" localized string via IStringLocalizer, similar to the existing DocSigned method.
2026-03-06 01:20:12 +01:00
bae62c7c08 Merge branch 'master' into feat/service-host 2026-03-04 17:22:28 +01:00
bcc17f6def Bump version to 3.11.0 in EnvelopeGenerator.Web.csproj
Updated <Version>, <AssemblyVersion>, and <FileVersion> properties from 3.10.0 to 3.11.0 to reflect the new release. No other changes were made.
2026-03-04 16:49:07 +01:00
8e3c334fa3 Update final status to 'Lesebestätigung' for read confirm
Changed the [FINAL_STATUS] placeholder value from "Bestätigung" to the more specific "Lesebestätigung" when an envelope is read and confirmed, improving clarity in status messaging.
2026-03-04 16:19:45 +01:00
08299451bb Customize email placeholders by envelope action type
Added logic to set email template placeholders based on whether the envelope requires "Read and Confirm" or "Sign" actions. Placeholders such as [SIGNATURE_TYPE], [DOCUMENT_PROCESS], [FINAL_STATUS], [FINAL_ACTION], [REJECTED_BY_OTHERS], and [RECEIVER_ACTION] are now dynamically set to reflect the correct process and status, improving the accuracy and clarity of notification emails.
2026-03-04 16:19:33 +01:00
59d6d25bdd Add ChangedWhen property to History entity
Added a [NotMapped] ChangedWhen property to the History entity as a wrapper for ActionDate, providing alternative get/set access without affecting the database schema.
2026-03-04 16:09:50 +01:00
9a516ab3c9 Update and align NuGet dependencies; drop net7.0 from Web
- Downgrade Microsoft.Data.SqlClient to 5.2.2 in Application and Infrastructure projects
- Downgrade Microsoft.Extensions.DependencyInjection to 8.0.1 for net8.0 in Application
- Remove net7.0 target and related packages from Web project
- Upgrade OpenApi and Caching.SqlServer to 8.0.17 (net8.0) and 9.0.6 (net9.0) in Web
- Ensures consistent, compatible package versions across solution
2026-03-04 16:09:40 +01:00