Commit Graph

2963 Commits

Author SHA1 Message Date
e1f24249a9 Add confirmation popup for clearing signature fields
Added a confirmation popup to `SenderEditorPage.razor` for clearing all signature fields, requiring user confirmation before proceeding. Updated resource files (`Resource.de-DE.resx`, `Resource.en-US.resx`, `Resource.fr-FR.resx`) with localized confirmation messages. Modified the "Remove all signature fields" button to trigger the popup instead of directly invoking the clear action.

Introduced a new `_clearFieldsConfirmVisible` variable to manage popup visibility. Updated the `ClearAllFieldsAsync` method to close the popup before clearing fields. Added new CSS styles in `envelope-viewer.css` to style the confirmation popup and its elements.
2026-11-10 21:00:36 +01:00
f6dc454193 Adjust popup width for better responsiveness
Updated the `DxPopup` component in `CreateEnvelopeWizardPopup.razor` to use `90vw` for both width and max-width, replacing the previous values of `860px` and `96vw`. Corresponding changes were made in `sender-page.css` for `.sender-create-wizard-popup .dxbl-popup` under the media query for screens with a max width of `760px`. These changes improve layout consistency and responsiveness.
2026-11-10 19:37:46 +01:00
b65098fafb Improve document upload UX and refactor wizard layout
Enhanced the `CreateEnvelopeWizardPopup` component:
- Added a new grid layout (`sender-create-wizard__body-layout`) to separate main content and side panel.
- Introduced a collapsible side panel for document upload and preview.
- Replaced old upload logic with `PdfFileDropZone` and added support for displaying document metadata (name, size) and replacement hints.
- Added asynchronous document preview rendering with `EnsureDocumentPreviewPreparedAsync`.

Localization updates:
- Added new localized strings for document upload hints in `de-DE`, `en-US`, and `fr-FR`.

CSS updates:
- Styled the new layout and side panel with transitions.
- Updated `PdfFileDropZone` styles for different states (e.g., document uploaded).

Refactored code for better maintainability and improved user feedback during document upload and preview preparation.
2026-11-10 19:29:33 +01:00
c6fe7722b4 refactor(AGENTS.md): add todo 2026-11-10 17:58:58 +01:00
2065102fb3 Update default zoom level in PDF editor to 180%
The `_zoomPercent` variable was updated from 112 to 180, increasing the default zoom level for the PDF image editor. This change ensures that users start with a higher magnification when interacting with the editor.
2026-11-10 17:19:51 +01:00
858b748e65 Refactor receiver list UI and improve accessibility
Reorganized the receiver list in `CreateEnvelopeWizardPopup.razor`:
- Separated "existing receivers" and "new receiver" input rows.
- Added editable fields for `FullName` and `EmailAddress` with real-time updates.
- Introduced "Remove" and "Add Receiver" buttons with updated icons and accessibility attributes.

Updated `sender-page.css`:
- Styled `.sender-create-wizard__receiver-existing-list` for better usability and responsiveness.
- Improved button designs with hover effects and consistent sizing.
- Simplified layout and removed redundant styles.

Enhanced responsiveness and accessibility:
- Made receiver list scrollable and visually distinct.
- Improved localization support with updated titles and `aria-labels`.

Removed redundant code to streamline implementation.
2026-11-10 09:41:38 +01:00
25c03b350b Refactor: Remove unused receiver filtering and list UI
Removed the title and input field for filtering recent receivers
from the suggestions section. Also removed the label, tooltip,
and help icon for the receiver list, along with the container
used to display added receivers. These elements were no longer
needed in the updated UI flow.
2026-11-09 16:34:43 +01:00
ed9ea0ac54 Refactor receiver row layout in CreateEnvelopeWizard
Refactor the structure and class names in `CreateEnvelopeWizardPopup.razor` to improve the layout and alignment of receiver rows:
- Replace `sender-create-wizard__receiver-item` with `sender-create-wizard__receiver-row`.
- Replace `sender-create-wizard__form-grid` with `sender-create-wizard__receiver-fields-stack`.

Update `sender-page.css` to introduce new classes:
- Add `.sender-create-wizard__receiver-row` for flex layout with proper alignment and spacing.
- Add `.sender-create-wizard__receiver-fields-stack` for grid-based field organization.

Adjust styles for responsiveness, including column layouts for smaller contexts. These changes enhance the visual structure and responsiveness of the receiver rows.
2026-11-09 16:16:08 +01:00
18c1adb68a Refactor receiver management UI in wizard
Simplify and restructure the UI for managing receivers in the sender creation wizard. Replace separate fields for adding new receivers with an inline approach, allowing users to add receivers directly within the receiver list.

Introduce a new inline receiver item with fields for name and email, along with an "Add" button. Update the receiver list layout to accommodate the new design.

Add styles for the inline receiver item and "Add Receiver" button in `sender-page.css`, including hover effects, disabled states, and alignment adjustments. Ensure the new design integrates seamlessly with the existing layout.
2026-11-09 16:08:00 +01:00
ec8b9adb9c Refactor receiver management in wizard popup
Replaced `DxTagBox` with a table-like structure for managing receivers, enabling direct editing of `FullName` and `EmailAddress` fields. Added validation for required fields and duplicate email addresses. Updated `RemoveReceiver` functionality with a new button and improved accessibility.

Removed `_receiverTags` and related logic, simplifying state management. Introduced new methods for handling receiver updates. Updated CSS to style the new layout and components. Improved code clarity and user experience.
2026-11-09 15:51:07 +01:00
4a10db0865 Refactor recent suggestion handling to use async method
Replaced the synchronous `ApplyRecentSuggestion` method with the new asynchronous `ApplyRecentSuggestionAndAddAsync` method. Updated the `@onclick` event handler in the suggestion list to use the async method. Removed `_validationMessage = null;` from the logic, and added an `await AddReceiver()` call to handle receiver addition asynchronously. These changes improve responsiveness and support additional async operations.
2026-11-09 13:34:17 +01:00
ceb2860883 Add filter for recent receiver suggestions
Introduced a filter input box in `CreateEnvelopeWizardPopup.razor` to allow users to search recent receiver suggestions dynamically. Added `_receiverSuggestionFilterText` property and `OnReceiverSuggestionFilterChanged` method to handle filtering logic.

Refactored `ReceiverSuggestionFilterHandler` to simplify its API. Updated the `Filter` method to accept a single query string and removed redundant overloads. Improved filtering logic to match `FullName` or `EmailAddress` using case-sensitive comparison.

These changes enhance usability by enabling quick filtering of receiver suggestions.
2026-11-09 13:14:31 +01:00
11e72bac53 Update resource keys and labels for final emails
Updated "FinalEmailToCreator" and "FinalEmailToReceivers" text in `.resx` files to use "Completed Document" terminology in English, German, and French. Adjusted corresponding labels, tooltips, and aria-labels in `CreateEnvelopeWizardPopup.razor` to reflect these changes in German.
2026-11-09 11:33:44 +01:00
638b734648 Enhance UI with tooltips and MudBlazor integration
Added contextual tooltips (`MudTooltip` and `MudIconButton`) to form fields in `CreateEnvelopeWizardPopup.razor` for improved user guidance. Updated label layouts using the new `sender-create-wizard__label-row` class for better alignment with tooltips. Integrated MudBlazor components (`MudThemeProvider`, `MudPopoverProvider`, `MudDialogProvider`, `MudSnackbarProvider`) in `SenderPage.razor` to enable enhanced UI features.

Updated `_Imports.razor` to include `MudBlazor` for global availability. Enhanced accessibility by adding `aria-label` attributes to help icons. Improved user experience with detailed explanations for fields like "Title," "Envelope Type," and others. Updated checkbox labels and numeric input fields with tooltips for additional context.

Added new CSS styles in `sender-page.css` to ensure proper alignment and sizing of tooltips and icons. These changes improve the overall usability, accessibility, and design consistency of the application.
2026-11-09 11:22:53 +01:00
eec1b4926b Update localization for wizard step titles
Added a new localization key `SenderWizard_Step_Start` to resource files for German, English, and French locales. Updated `CreateEnvelopeWizardPopup.razor` to replace `SenderWizard_Step_Basics` with `SenderWizard_Step_Start` for step 0, ensuring consistent naming of the first wizard step across the application.
2026-11-09 09:35:10 +01:00
d7611a6b59 Enhance stepper functionality and visual design
Added new properties to `<MudStepper>` for customization and
visual feedback. Introduced `_completedSteps` to track step
completion dynamically. Updated logic to manage completed
steps and reset state. Improved CSS for stepper appearance,
including step labels, icons, and content differentiation.
These changes improve usability and flexibility of the
stepper component.
2026-11-09 09:13:58 +01:00
0cf603fc79 Swap steps 1 and 3 in CreateEnvelopeWizardPopup
Reorganize the wizard steps to prioritize "Receivers" (step 1)
before "Message and Options" (step 3). Update `_currentStep`
logic, conditional checks, and validation to reflect the new
step order. Adjust `GetStepTitle` and `GetStepDescription`
methods to align with the updated step titles and descriptions.
Ensure user input handling and step-skipping behavior are
consistent with the new flow.
2026-11-05 16:18:17 +01:00
e3d2225a44 Refactor and enhance envelope wizard with MudBlazor
Replaced custom wizard UI with MudBlazor's MudStepper for a modern and consistent design. Added dynamic step titles, descriptions, and forms for envelope creation, including advanced settings like certification, reminders, and email notifications. Integrated PDF upload with preview functionality.

Refactored `CreateEnvelopeWizardPopup.razor` for better maintainability and modularity. Removed redundant code and centralized step-related logic. Improved localization, accessibility, and user experience.

Updated `EnvelopeGenerator.Server.Client.csproj` and `EnvelopeGenerator.Server.csproj` to include MudBlazor. Registered MudBlazor services in `Program.cs` and added required CSS/JS in `App.razor`. Updated styles in `sender-page.css` to align with the new stepper design.
2026-11-05 15:22:21 +01:00
595bbf3f25 chore(db): back up email templates before redesign
Store the original template subjects and bodies as restore scripts so the redesigned notifications can be reverted against DD_ECM if needed.
2026-11-05 12:03:44 +01:00
ee7d01ed7f test(notification): add email notification preview endpoints
Expose signed and received notification endpoints, with reset random payload variants, to exercise rendering and delivery without running a full envelope workflow.

Fall back to a fixed recipient when no email is supplied.
2026-11-05 12:03:40 +01:00
85104511fd feat(notification): distinguish read confirmation from signature
Add IsReadAndConfirm to DocumentSignedNotification and derive the action, status, and final action labels from it so read-only envelopes do not report a signature.

Pass the envelope read-and-confirm mode when finalizing so the signed email matches the receiver workflow.
2026-11-05 12:03:35 +01:00
1b87528cca refactor(notification): publish emails through messaging client
Send notifications via IMessagingServiceClient and PublishEmailViaSmtpCommand instead of the static EmailSender. The sender address now comes from NotificationOptions and attachments are added through the command builder.

Rename the Notify parameter to receiverEmail so the call site contract is explicit.
2026-11-05 12:03:31 +01:00
2913514da8 feat(notification): make messaging consumer configurable
Replace the hard-coded RabbitMQ setup with NotificationOptions bound from a configurable section. The new ConsumerType switch wires either the HTTP API client or the RabbitMQ client, and startup now fails with a clear error when required settings are missing.

Bump DigitalData.MessagingService.Client to 3.0.1 for the abstraction used by both transports.
2026-11-05 12:03:26 +01:00
ce7e70162b Remove ReplacePlaceHolders method
The private static method `ReplacePlaceHolders` was removed from `CreateEnvelopeCommandHandler.cs`. This method was used to replace placeholders in a string with values from a dictionary. Its removal indicates that this functionality is either no longer needed or has been refactored elsewhere in the codebase.
2026-10-29 15:57:29 +01:00
5e00b6e9ec Refactor notification and email handling
Refactored `DocumentReceivedNotification` to use new properties `Origin`, `EnvelopeUuid`, and `ReceiverSignature` for constructing `EnvelopeURL`. Updated `LinkToDocument` and `LinkToDocumentText` to derive from `EnvelopeURL`.

Simplified `CreateEnvelopeCommandHandler` with record-like syntax, removing private fields and directly injecting dependencies.

Renamed and refactored `QueueInvitationEmailsAsync` to `SendInvitationEmailsAsync`, using `EnvNtfService.Notify` for email notifications, centralizing logic and improving clarity.

Improved error handling in email sending with logging. Updated variable names for clarity and cleaned up `using` directives.
2026-10-29 15:54:07 +01:00
f0b4c8d00c Refactor ContractType property to use enum
Updated the `ContractType` property in the `EnvelopeTypeDto` class from a nullable integer (`int?`) to a nullable `ContractType` enum (`ContractType?`). This change enhances type safety and clarifies the expected values for the property.
2026-10-29 15:52:38 +01:00
abf616c115 Add IRequestContext interface and RequestContext class
Introduce the IRequestContext interface with an Origin property
in the EnvelopeGenerator.Application.Common.Interfaces namespace.
Implement this interface in the new RequestContext class within
EnvelopeGenerator.Server.Services, using IHttpContextAccessor to
access the Origin header. Register IRequestContext with the DI
container in Program.cs using AddScoped. Update using directives
to include necessary namespaces and reorganize for clarity.
2026-10-29 15:51:58 +01:00
42585e1f2c Make User property conditionally nullable
Modified the User property in Envelope.cs to be conditionally nullable using the nullable preprocessor directive. This change allows the property to be nullable when the nullable directive is defined, enhancing flexibility and compatibility with different C# versions and project configurations.
2026-10-29 15:51:19 +01:00
ff10fc6b0a Refactor ContractType property in EnvelopeType.cs
Added a using directive for `EnvelopeGenerator.Domain.Constants` to utilize constants from that namespace. Changed the `ContractType` property from a nullable integer (`int?`) to a nullable `ContractType` enum or class, enhancing type safety and clarity.
2026-10-29 13:35:48 +01:00
7222f7e9a7 Refactor ContractType to use enum
Changed the `ContractType` property in `EnvelopeDto`, `CreateEnvelopeCommandHandler`, and `Envelope` classes from a nullable `int` to a nullable `ContractType` enum. This improves type safety and consistency across the codebase by using a specific enum type instead of a generic integer. Updated logic in `CreateEnvelopeCommandHandler` to remove unnecessary casting.
2026-10-29 13:11:44 +01:00
d913b949e0 Add DTOs and tests for placeholder replacement
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.
2026-10-29 09:53:52 +01:00
a35e05d016 Refactor Attachments property and syntax
Changed the `Attachments` property type in `EnvelopeNotificationBase.cs` from `List` to `IReadOnlyList` to enhance immutability and thread safety. Updated the `FinalizeEnvelopeCommandHandler` in `FinalizeEnvelopeCommand.cs` to use a single-line syntax for `Attachments` initialization, improving code readability.
2026-10-28 16:28:17 +01:00
8aabc3e233 Refactor notification system
Introduced `EnvelopeNotificationBase` as a new base class for notifications, providing a unified structure with an abstract `GetTemplateType` method and optional attachments. Added `DocumentReceivedNotification` and updated `DocumentSignedNotification` to inherit from this base class, streamlining attachment handling and template type determination.

Refactored `IEnvelopeNotificationService` to use a generic `Notify` method, allowing for flexibility with different notification types. Updated `FinalizeEnvelopeCommandHandler` to align with the new attachment handling.

Added `EnvelopeNotificationExtensions` for converting attachments to `EmailAttachmentDto` objects and introduced `ReplacePlaceholderExtensions` for dynamic placeholder replacement in email templates using reflection. Removed outdated placeholder logic from `EnvelopeNotificationService`.
2026-10-28 16:25:19 +01:00
8b7f99eb76 Prevent email on deleted envelopes; bump version
Added a check in SendMailHandler to prevent sending emails for deleted envelopes with a status of EnvelopeSaved or lower. Updated project version in EnvelopeGenerator.Server.csproj from 1.7.0 to 1.8.0 to reflect these changes.
2026-10-28 13:15:20 +01:00
91e90b322b Add caching to PdfRenderController
Implemented caching in the PdfRenderController using IMemoryCache to improve performance by avoiding redundant PDF rendering. Added a new constructor parameter for IMemoryCache and a static TimeSpan field for cache duration. Introduced a private method, BuildCacheKey, to generate unique cache keys based on the SHA256 hash of PDF bytes. Updated the RenderPages method to check for cached pages before rendering and store results in the cache.
2026-10-27 21:57:35 +01:00
74e55e9206 Refactor and optimize envelope handling
Refactored `ReadDocumentDetailsQueryHandler` to remove AutoMapper, improving performance by manually selecting necessary data. Simplified `SenderEditorPage.razor` by removing bootstrap logic and updating the UI for a more compact design. Streamlined envelope creation in `SenderPage.razor` by eliminating the bootstrap token. Updated styles in `envelope-viewer.css` for better alignment and readability.
2026-10-27 21:56:39 +01:00
fc5ad7ea3c Add receiver removal functionality to SenderEditor
Enhanced the `SenderEditorPage.razor` by injecting the `EnvelopeReceiverService` to manage envelope receivers. Updated the UI to include a remove button for each receiver, invoking the new `RemoveReceiverAsync` method. This method handles the deletion of receivers from both the UI and the server.

Modified `ReceiverDraft` and `SignatureFieldDraft` models to include `ReceiverId` and `ReceiverDraftId` for better tracking. Updated logic for identifying receivers without signature fields and creating receiver commands to use these new identifiers.

Added `DeleteAsync` method in `EnvelopeReceiverService.cs` to send DELETE requests for removing receivers. Updated `envelope-viewer.css` to style the new remove button with distinct appearance and hover effects.
2026-10-27 19:02:22 +01:00
ff5582c9b5 Add RemoveEnvelopeReceiverCommand and refactor controller
Introduced `RemoveEnvelopeReceiverCommand` and its handler to
facilitate the removal of envelope receivers. Updated the
`EnvelopeReceiverController` to use C# 9's record-like syntax
for dependency injection, eliminating explicit private fields.
Added a `RemoveAsync` method to handle DELETE requests for
removing envelope receivers. Enhanced code documentation with
additional XML comments.
2026-10-27 18:32:47 +01:00
6523cca945 Refactor certification type option values
Updated the `value` attributes of `<option>` elements in `CreateEnvelopeWizardPopup.razor` and `SenderEditorPage.razor` to use `@CertificationType.AdvancedElectronicSignature` and `@CertificationType.ElectronicSignature` instead of hardcoded values "1" and "2". This enhances code maintainability and readability by leveraging descriptive and potentially type-safe values.
2026-10-27 16:11:55 +01:00
28d0b6f81c Add feature to open receiver envelope URLs
Introduce a new feature allowing users to open URLs for receiver envelopes directly from the sender page. This includes:

- Injecting `EnvelopeReceiverService` in `SenderPage.razor`.
- Adding a UI button to open receiver envelope URLs.
- Implementing `OpenReceiverEnvelopeUrlAsync` for URL handling.
- Extending `EnvelopeReceiverService` with methods for URL retrieval and feature check.
- Updating `EnvelopeReceiverController` with new endpoints for URL access.
- Introducing `SenderFeatureAccessOptions` for managing feature access.
- Configuring feature access in `Program.cs` and `appsettings.json`.
- Restricting feature usage to specified email addresses.
2026-10-27 11:37:25 +01:00
5df38754cb Add configurable SignatureFieldParams class
Introduce `SignatureFieldParams` class to manage signature field dimensions with configurable `Width` and `Height`. Integrate this configuration into the service collection and replace hardcoded dimensions in `CreateEnvelopeCommandHandler.cs` and `SenderEditorPage.razor`. Update `appsettings.json` to include the new configuration section, allowing runtime adjustments.
2026-10-27 09:18:11 +01:00
c2b7579717 Refactor CertificationType to use enum
Changed CertificationType from int? to CertificationType? enum across multiple files, including EnvelopeDto, EnvelopeTypeDto, and CreateEnvelopeCommand, to improve type safety. Removed the NormalizeCertificationType method as it is no longer necessary. Updated components and records to use the enum directly, enhancing code clarity and reducing potential errors. Added necessary using directives for the enum.
2026-10-26 16:59:49 +01:00
ae1ecbc15f Normalize certification type handling
Introduce `NormalizeCertificationType` method to ensure consistent handling of certification types across the application. Update `CreateEnvelopeCommandHandler`, `CreateEnvelopeWizardPopup.razor`, and `SenderEditorPage.razor` to use this method. Modify `CertificationType` enum to include `ElectronicSignature` and remove `QualifiedSignature`. Update UI components to reflect these changes by removing the `QualifiedSignature` option.
2026-10-26 16:58:06 +01:00
4dcfe67038 Increase grid columns in sender wizard progress
Updated the CSS grid layout for the `.sender-create-wizard__progress` class from 4 to 5 columns. This change allows for an additional column in the progress indicator, potentially accommodating more items or steps in the sender creation wizard.
2026-10-26 15:55:57 +01:00
c812d4dc1f Refactor EnvelopeController for DI and clarity
Refactored the `EnvelopeController` to use C# 9's record syntax for dependency injection, directly injecting `ILogger<EnvelopeController>` and `IMediator` into the constructor. Removed private fields `_logger` and `_mediator`, replacing them with constructor-injected properties. Updated methods to use these properties for consistency. Moved `DeleteEnvelopeRequest` to a top-level class for better organization. Enhanced XML documentation for improved clarity.
2026-10-26 15:49:33 +01:00
8d27718062 Add IncludeDocAndDocRes option to envelope queries
Introduced a new boolean property `IncludeDocAndDocRes` in the `ReadEnvelopeQuery` class to control the inclusion of document and document result details in query results. Updated `ReadEnvelopeQueryHandler` to handle this property, returning a simplified `EnvelopeDto` when set to `false`.

Modified `SenderPage.razor` to exclude document details by passing `includeDocAndDocRes: false` to `EnvelopeService.GetAsync()`. Enhanced `EnvelopeService` to accept and process the `includeDocAndDocRes` parameter, ensuring API requests respect this preference.
2026-10-26 15:24:18 +01:00
c746612d80 Merge branch 'feat/server-hsm-integr' 2026-10-26 14:45:59 +01:00
06551d502b Update branding to "signFLOW" for consistency
The footer text in `MainLayout.razor` and the header title in `IndexPage.razor` have been updated to change the branding from "SignFlow" to "signFLOW". This change ensures consistent presentation of the brand across the application by adjusting the capitalization.
2026-10-26 09:47:36 +01:00
0f28b80e16 Update notification logic and version numbers
Revised FinalizeEnvelopeCommand to notify each receiver
individually instead of converting documents to Base64.
Adjusted IsActive method in EnvelopeStatusExtensions to
include EnvelopePartlySigned as active. Updated project
version to 1.7.0-beta to reflect these changes.
2026-10-25 18:52:21 +01:00
f7af3776c2 Switch to DocumentService API, remove PKCS#11 support
Replaced PKCS#11-based cryptographic operations with a new DocumentService API integration. Removed all PKCS#11-related code, configurations, and dependencies, including options, self-test status, and signing logic. Updated `FinalizeEnvelopeCommand` to include a notification service and added base64 conversion for documents. Updated `ServiceCollectionExtensions` to register the new DocumentService client. Removed outdated documentation and diagrams related to PKCS#11. Updated project files and configurations to reflect these changes and incremented the version number. Added a comment in `EnvelopeFinalizationWorker` for future RabbitMQ integration.
2026-10-25 18:52:12 +01:00