Enforced phone number validation for `AdvancedSignature` envelopes:
- Introduced `CreateEnvelopeCommandValidator` to ensure receivers have non-empty phone numbers for advanced signatures.
- Updated `CreateEnvelopeWizardPopup.razor` to dynamically adjust phone number placeholder text and validate input.
- Added `ValidatePhoneNumber` method and integrated validation into the wizard's state management.
- Introduced `IsAdvancedSignatureSelected` helper property for conditional logic.
- Enhanced UI to reflect phone number requirements for advanced signatures.
Added a test case in `CreateEnvelopeCommandTests.cs` to verify that creating an advanced signature envelope without a phone number throws a `BadRequestException`.
Enhanced the envelope creation workflow to handle phone numbers:
- Added `PhoneNumber` property to `RecentReceiverSuggestionDto`.
- Updated `MappingProfile` to map `PhoneNumber`.
- Modified LINQ queries to include `PhoneNumber` in selection/grouping.
- Enhanced `CreateEnvelopeWizardPopup.razor` to display and manage phone numbers.
- Updated `CreateEnvelopeWizardReceiver` to include `PhoneNumber`.
- Enhanced `ReceiverFilterCriteria` and `ReceiverSuggestionFilterHandler` to filter by `PhoneNumber`.
- Adjusted CSS layout to accommodate the new phone number field.
- Added a unit test to ensure `PhoneNumber` persistence.
These changes allow users to input, display, and manage phone numbers alongside existing receiver details like name and email.
Added `IAuthenticator` dependency to `CreateEnvelopeCommandHandler` to enable access code generation for envelope receivers. Updated the `AccessCode` property of `EnvelopeReceiver` to store a 5-character code generated by `Authenticator.GenerateCode`.
Introduced a new test class `CreateEnvelopeCommandTests` with a test method `CreateEnvelope_ShouldGenerateAccessCode_ForEnvelopeReceiver` to validate the functionality. The test ensures that the access code is generated, not null, not empty, and has the correct length.
Updated test setup to include necessary configurations and dependencies.
Removed the `ContractType` and `CertificationType` properties
from the `EnvelopeClientDto` class in `EnvelopeReceiverDto.cs`
as they are no longer needed. Updated the `Extensions` class
in `Fake.cs` to remove references to these properties,
including their initialization logic.
Added new record types `CreateEnvelopeDocumentDto`, `CreateEnvelopeFieldDto`, and `CreateEnvelopeReceiverDto` with XML documentation in `CreateEnvelopeCommand.cs`. Marked `ConfigService` as obsolete in `CreateEnvelopeCommandHandler.cs`. Modified `CertificationType` usage in `Fake.cs` to use the enum directly. Updated `EnvelopeGenerator.Tests.csproj` with a new project reference and compile directives. Introduced `MailTemplatePlaceholderDbTests` and `ReplacePlaceholderExtensionsTests` to verify placeholder replacement functionality. Added supporting model classes for testing. These changes improve code functionality and test coverage.
Updated namespaces for `CreateEnvelopeReceiverCommand` and related classes to `EnvelopeGenerator.Application.EnvelopeReceivers.Commands.CreateEnvelopeReceiver` for better organization and clarity.
- Updated namespaces in `CreateEnvelopeReceiverCommand`, `CreateEnvelopeReceiverCommandHandler`, and `CreateEnvelopeReceiverResponse`.
- Adjusted imports in `MappingProfile.cs`, `EnvelopeReceiverService.cs`, and `Fake.cs` to reflect the new namespace.
- Modified `EnvelopeReceiverController.cs` to use the updated namespace and simplified type reference in a `foreach` loop.
Added `using` directives for namespaces related to DTOs,
envelope receivers, and document signing notifications.
These changes enable the use of new functionality or
tests for document signing notifications.
Refactored `DocSignedNotification` to remove inheritance from
`EnvelopeReceiverDto` and introduced a required `EnvelopeReceiver`
property. Updated all usages across the codebase to align with the
new structure, including controllers, handlers, and tests.
- Improved encapsulation and reduced coupling by making
dependencies explicit.
- Updated `AnnotationController`, `DocStatusHandler`,
`HistoryHandler`, and `SendSignedMailHandler` to use the
`EnvelopeReceiver` property.
- Adjusted `DocSignedNotificationTests` to reflect the new
instantiation pattern.
- Updated XML documentation and ensured consistent access to
`EnvelopeReceiver` properties like `EnvelopeId`, `ReceiverId`,
and `EmailAddress`.
Refactored `AnnotationController` to simplify `DocSignedNotification` creation and improve error handling. Replaced the `ToDocSignedNotification` extension method with direct instantiation of `DocSignedNotification`. Introduced a `try-catch` block to handle exceptions during notification publishing, ensuring a `RemoveSignatureNotification` is sent on failure.
Removed `ToDocSignedNotification` and `PublishSafely` extension methods, as their functionality was inlined into the controller. Updated tests to reflect these changes. Simplified the `DocSignedNotification` class by removing redundant methods.
Improved maintainability and clarity by reducing dependencies on extension methods and handling exceptions explicitly.
Refactored the `CreateEnvelopeCommand` method in `Fake.cs` to delegate user authentication logic to the `WithAuth` method. Added a new `CreateEnvelopeCommands` method to generate multiple commands for a set of user IDs.
Removed `ConstantsTests.cs`, which contained tests for the `Normalize` method of the `EnvelopeSigningType` enumeration, as the method or its tests are no longer relevant.
Switched all audit and creation timestamps from UTC to local time
by replacing DateTime.UtcNow with DateTime.Now across the codebase.
This affects audit fields, object creation, and default values for
date/time properties.
All test files and utilities now use the EnvelopeGenerator.Tests.Application namespace for improved organization and clarity. No functional changes were made; updates are limited to namespaces and using directives. This makes it explicit that these are application-level tests and related helpers.