Commit Graph

2265 Commits

Author SHA1 Message Date
f53bc65acf Add EnvelopeReport entity mapped to VWSIG_ENVELOPE_REPORT
Introduced the EnvelopeReport class in the Domain.Entities namespace, mapped to the "VWSIG_ENVELOPE_REPORT" table using EF Core data annotations. The entity includes properties for envelope ID, head UUID, title, message, status, timestamp, and user, with appropriate column mappings and validation attributes.
2026-03-09 21:25:15 +01:00
070d9be00c Remove obsolete State class and DI registration
Removed the deprecated State class and its properties from the codebase. Also removed State from the dependency injection configuration, as it is no longer used.
2026-03-09 16:52:52 +01:00
6f7b04a26e Refactor: remove strict checks and logging in finalization
Removed exception throwing and logging for failed report creation, email sending, and envelope finalization in FinalizeDocumentJob. Now, these methods are called without checking their return values. Also improved exception message for file export to include envelope Id and added null-forgiving operator to _config.ExportPath.
2026-03-09 16:31:31 +01:00
473358e2b9 Make ExportPath non-nullable in ConfigDto
Changed ExportPath from a nullable string to a non-nullable string in ConfigDto and initialized it with the null-forgiving operator. This ensures ExportPath always has a value and cannot be null.
2026-03-09 16:30:39 +01:00
8f3aa69cbf Refactor document save to use async repository update
Replaced manual SQL and file read with async repository update for saving final document bytes. Removed obsolete helper methods and cleaned up unused imports for improved maintainability and testability.
2026-03-09 16:18:20 +01:00
eededeb1f1 Remove SendFinalEmailWithAttachment and related logic
Removed the SendFinalEmailWithAttachment method and all references to it from SendFinalEmailToCreator and SendFinalEmailToReceivers. The logic for determining email attachments based on FinalEmailType is no longer used. Other functionality in these methods remains unchanged.
2026-03-09 15:41:56 +01:00
737774f077 Remove PDF annotation and envelope data methods
Removed BurnAnnotationsToPdf, GetEnvelopeData, and GetAnnotationData from FinalizeDocumentJob. These methods handled document reading, annotation retrieval, and PDF annotation burning. This change reflects a refactor or shift in document processing responsibilities.
2026-03-09 15:34:58 +01:00
69499273cc Refactor FinalizeDocumentJob to async and use docStatusRepo
Refactored FinalizeDocumentJob to make the Finalize method asynchronous and fetch document annotations from docStatusRepo instead of using GetEnvelopeData. Updated constructor to inject IRepository<Domain.Entities.DocumentStatus>. Improved logging and removed obsolete envelopeData checks.
2026-03-09 15:32:32 +01:00
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