Commit Graph

2261 Commits

Author SHA1 Message Date
31db160fba Add signature panel and layout updates for ReportViewer
Enhanced `ReportViewer.razor` with a new layout structure:
- Added `receiver-page-layout` with `receiver-signature-panel` and `receiver-viewer-wrapper` for better organization.
- Introduced a button to export signed PDFs, conditionally enabled based on `SignatureApplied`.
- Added a `DxPopup` for capturing signatures with a "Close" button.

Updated `MainLayout.razor` to remove unnecessary padding from `<article>`.

Refined `app.css`:
- Defined styles for `receiver-page-layout`, `receiver-signature-panel`, and `receiver-viewer-wrapper` to improve layout flexibility.
- Adjusted `article` to use flexbox and ensure hidden overflow.
2026-05-29 14:06:59 +02:00
a7ed9be1de Update version and improve build process for packaging
Updated project version to 1.2.0.3 in `EnvelopeGenerator.DependencyInjection.csproj`.
Replaced line endings in `_DepDlls` for consistency. Added a new
`RebuildDependenciesBeforePack` target to ensure all dependencies
are rebuilt for `net7.0`, `net8.0`, and `net9.0` before packaging.
Improved formatting in `BundleReferencedDlls` for better readability.
2026-05-29 08:45:56 +02:00
32fbf782fa Update project version to 1.2.0
Bump the project version from 1.1.1 to 1.2.0 in the `EnvelopeGenerator.DependencyInjection.csproj` file. Updated the `<Version>`, `<AssemblyVersion>`, and `<FileVersion>` properties to reflect the new version.
2026-05-28 23:47:02 +02:00
bfae72529c Add query for sensitive envelope receiver data
Introduced `ReadEnvelopeReceiverSecretQuery` to fetch sensitive
fields (e.g., access code, phone number) for envelope receivers.
Added extension methods for dispatching the query via `IMediator`
and implemented `ReadEnvelopeReceiverSecretQueryHandler` to
process the query using repositories and AutoMapper.

Updated `EnvelopeController` with a new HTTP GET endpoint
`EnvelopeReceiverWithSecretByMediatr` to expose the query
functionality. This endpoint returns sensitive data as
`EnvelopeReceiverSecretDto` or a 404 response if no match is found.

These changes improve modularity, testability, and separation of
concerns by leveraging MediatR and CQRS patterns.
2026-05-28 23:46:31 +02:00
33c52bcef8 Add signature panel and layout updates for ReportViewer
Enhanced `ReportViewer.razor` with a new layout structure:
- Added `receiver-page-layout` with `receiver-signature-panel` and `receiver-viewer-wrapper` for better organization.
- Introduced a button to export signed PDFs, conditionally enabled based on `SignatureApplied`.
- Added a `DxPopup` for capturing signatures with a "Close" button.

Updated `MainLayout.razor` to remove unnecessary padding from `<article>`.

Refined `app.css`:
- Defined styles for `receiver-page-layout`, `receiver-signature-panel`, and `receiver-viewer-wrapper` to improve layout flexibility.
- Adjusted `article` to use flexbox and ensure hidden overflow.
2026-05-28 23:37:20 +02:00
40c5e1d044 Update navigation and remove sidebar in MainLayout
Updated the `OnAfterRenderAsync` method in `Index.razor` to navigate to `/receiver` instead of `/reportviewer`. Removed the sidebar containing the `<NavMenu />` component in `MainLayout.razor` and adjusted the `<main>` tag to directly contain the content.
2026-05-28 23:36:22 +02:00
67e6f288eb Bump version to 1.1.1
Updated project version from 1.1.0 to 1.1.1 in `EnvelopeGenerator.DependencyInjection.csproj`. This includes changes to `<Version>`, `<AssemblyVersion>`, and `<FileVersion>` properties. The update reflects minor improvements or bug fixes while maintaining backward compatibility.
2026-05-28 22:52:40 +02:00
823bafeeb9 Refactor project dependencies and add TFM-specific packages
Restructured `EnvelopeGenerator.DependencyInjection.csproj` to:
- Add multiple `PackageReference` entries for application services, ORM/Database, security/identity, utilities, and DI abstractions.
- Introduce conditional `ItemGroup` sections for `net7.0`, `net8.0`, and `net9.0` with framework-specific package versions.
- Move `UserManager` package reference to align with the updated dependency structure.
- Update comments for clarity, including replacing a Turkish comment with an English one.
- Add a comment explaining the rationale for centralizing `PackageReference` declarations to ensure correct `.nuspec` generation and simplify consumption.
2026-05-28 22:50:45 +02:00
750b9f1b57 Bump project version to 1.1.0
Updated the project version from 1.0.1 to 1.1.0 in the `EnvelopeGenerator.DependencyInjection.csproj` file. This includes changes to the `<Version>`, `<AssemblyVersion>`, and `<FileVersion>` properties, reflecting the addition of new features or improvements.
2026-05-28 21:57:19 +02:00
0a4daccc0f Refactor service registration for modularity
Introduced `EnvelopeGeneratorOptions` and `SqlCacheOptions` to enable fine-grained control over optional service registrations in `AddEnvelopeGenerator`. Updated `AddEnvelopeGenerator` to conditionally register services like `HttpContextAccessor`, `DistributedSqlServerCache`, `Dispatcher`, `MemoryCache`, and `UserManager` based on these options.

Updated `DependencyInjection.csproj` to include necessary framework references and package dependencies. Simplified `Program.cs` by consolidating service registrations into `AddEnvelopeGenerator`, reducing boilerplate and improving maintainability.

Improved extensibility by centralizing service registration logic, allowing consuming projects to customize configurations without modifying the core library. Updated documentation and removed unused directives.
2026-05-28 21:57:03 +02:00
bc4905d2f4 Refactor DI setup and simplify service registration
Centralized dependency injection setup by adding a reference to
`EnvelopeGenerator.DependencyInjection` in the project file and
replacing multiple `using` directives with a single one.

Replaced obsolete `AddEnvelopeGeneratorInfrastructureServices`
and `AddEnvelopeGeneratorServices` methods with the new
`AddEnvelopeGenerator` method, consolidating service and
infrastructure setup.

Encapsulated `EGDbContext` configuration within
`AddEnvelopeGenerator` and removed obsolete `#pragma` directives.

Simplified mail service registration by replacing manual
`IEnvelopeMailService` setup with `AddEnvelopeMailService`.

These changes improve maintainability, reduce redundancy, and
modernize the codebase.
2026-05-28 20:23:14 +02:00
533d646211 Update routes and navigation links for sender/receiver UI
Updated the `@page` directives in `ReportDesigner.razor` and
`ReportViewer.razor` to change routes from `/reportdesigner`
to `/sender` and `/reportviewer` to `/receiver`, respectively.

Modified `NavMenu.razor` to update navigation links to reflect
the new routes. Updated the displayed text for the links to
"Empfänger-UI" (Receiver UI) and "Umschlag-UI" (Envelope UI).
2026-05-28 20:17:42 +02:00
7c737ee6ad Update project versioning and dependency handling
Updated project version to 1.0.1, including `<Version>`, `<AssemblyVersion>`, and `<FileVersion>`. Added `<PrivateAssets>all</PrivateAssets>` to `<ProjectReference>` elements to prevent exposing referenced projects' assets. Introduced `IncludeDependencyDlls` and `BundleReferencedDlls` targets to include and bundle dependent project DLLs for multiple target frameworks (`net7.0`, `net8.0`, `net9.0`). Removed redundant `<ProjectReference>` entries and improved packaging to ensure proper handling of dependencies.
2026-05-28 20:13:51 +02:00
7aa08cf8e9 Enable Wasm native build and refactor signature layout
Updated EnvelopeGenerator.ReceiverUI.csproj to enable native WebAssembly builds and load all globalization data for improved localization support.

Refactored ReportViewer.razor to enhance layout calculations for the signature section:
- Introduced constants for better readability and maintainability.
- Dynamically adjusted band height and padding to fit content without overlap.
- Updated control positioning and sizing using calculated values.
- Changed font style of the signature label to regular and reordered control additions for clarity.
2026-05-28 19:43:03 +02:00
4144d2abde Disable native Wasm build in ReceiverUI project
The `<WasmBuildNative>` property in the `EnvelopeGenerator.ReceiverUI.csproj` file was changed from `true` to `false`. This disables the native WebAssembly (Wasm) build, potentially simplifying the build process, reducing build time, or addressing compatibility issues.
2026-05-28 19:42:47 +02:00
2a8fed166b Adjust signature layout and bottom margin height
Increased the `bottomMargin` height from 140F to 175F to provide additional space. Updated the `signatureInformation` format to simplify text structure, remove redundant labels, and use a short date format.

Modified the `XRLabel` to enable multiline text, adjusted its height to 70F, and changed text alignment to `TopLeft`. Updated the `XRPictureBox` position by shifting its Y-coordinate to 80F for better alignment with the new layout.
2026-05-28 17:08:18 +02:00
60f01565da Add user input fields and enhance signature details
Added input fields for "Full Name," "Position," and "Place" in `ReportViewer.razor` to collect additional user details. Introduced validation for required fields ("Full Name" and "Place") in `ApplySignatureAsync`. Updated `CreateSignedReportInstance` and `AddSignature` to include these details in the signature label, which now dynamically displays full name, position (if provided), place, and date. Adjusted layout and bounds for proper alignment and spacing in the report.
2026-05-28 16:57:27 +02:00
8a796a2eec Support multi-targeting and add NuGet metadata
Updated `EnvelopeGenerator.DependencyInjection.csproj` to support multiple target frameworks (`net7.0`, `net8.0`, `net9.0`) for broader compatibility. Added NuGet package metadata to enable publishing, including details like `PackageId`, `Authors`, and `RepositoryUrl`.

Upgraded `Microsoft.Extensions.Configuration.Abstractions` and `Microsoft.Extensions.DependencyInjection.Abstractions` to version `9.0.6`. Added a project reference to `EnvelopeGenerator.Domain`.

Modified `EnvelopeGenerator.sln` to adjust the build configuration for the project with GUID `{90FE0312-8C38-4347-9EA2-0A719E255D5C}`, setting `Debug` to use the `Release` configuration.
2026-05-28 16:54:59 +02:00
83957d28e9 Add DependencyInjection class for service registration in EnvelopeGenerator 2026-05-28 16:27:30 +02:00
fe3f1347d5 Add EnvelopeGenerator.DependencyInjection project and update solution file 2026-05-28 16:27:21 +02:00
0a22e4e5cc Enhance signature popup with multiple input modes
Refactored `@using` directives in `ReportViewer.razor` to use specific aliases for improved readability. Updated the signature popup to support three input modes: "Draw", "Text", and "Image", with a tabbed interface for switching between modes. Added font selection for typed signatures and improved state management for signature modes.

Refactored JavaScript interop methods to handle initialization, clearing, and data retrieval for each signature mode. Enhanced `receiver-signature.js` to support typed and image-based signatures, including rendering text-based signatures and handling image uploads with scaling and centering.

Improved maintainability by modularizing code and extracting reusable functions. Enhanced user experience with dynamic UI updates and better handling of signature state changes.
2026-05-28 14:39:38 +02:00
1e35e0447f Merge branch 'master' of http://git.dd:3000/AppStd/EnvelopeGenerator 2026-05-28 14:15:19 +02:00
0ca487d5bd Enhance globalization and error handling support
Added support for culture-specific globalization in the Blazor WebAssembly project by disabling invariant globalization and enabling the loading of all globalization data.

Improved error handling in `ReportViewer.razor` by wrapping the `ExportToAsync` method in a `try-catch` block to handle export failures gracefully. Updated user-facing messages to provide clearer feedback in case of errors.
2026-05-28 13:57:42 +02:00
7828ed237d Refactor utility functions for clarity and consistency
Updated `findNearest` for improved readability by renaming
parameters, introducing a helper function for distance
calculation, and using `Infinity` for clarity. Refactored
`getCurrentCulture` to use modern `typeof` syntax. Updated
`B64ToBuff` and `getLocaleDateString` for consistency with
naming conventions and concise syntax. Re-added
`detailedCurrentDate` to ensure consistency.
2026-05-27 16:16:50 +02:00
b3eafcbd0b Enable nullable types and add NuGet package metadata
Added `<Nullable>enable</Nullable>` to improve code safety.
Included metadata properties for NuGet packaging, such as
`<PackageId>`, `<Authors>`, `<Company>`, `<Product>`, and
more, to support package creation and distribution. Updated
the `<Description>` to detail the project's purpose and
technologies. Specified versioning details to ensure proper
version control and compatibility.
2026-05-27 15:16:52 +02:00
affdc44f91 Refactor startup and add report storage services
- Added `EnvelopeGen` as a trusted class for deserialization.
- Registered `InMemoryReportStorageWebExtension` as a singleton.
- Registered `ReportStorageWebExtension` as a singleton using a factory.
- Added `IReportProviderAsync` as a scoped service with `CustomReportProvider`.
- Registered `InMemoryReportStorageWebExtension` globally.
- Refactored app startup to load fonts asynchronously before running:
  - Introduced `FontLoader.LoadFonts` to load "opensans.ttf".
  - Replaced `await builder.Build().RunAsync()` with a `host` variable.
2026-05-27 15:07:27 +02:00
8adc8683b8 Add publish profile and update project for deployment
Added a new `<ItemGroup>` in `EnvelopeGenerator.ReceiverUI.csproj` to include the `Properties\PublishProfiles\` folder, enabling publishing configurations. Introduced `IISProfile.pubxml` to define publishing settings, including the use of the `Package` method, `Release` build configuration, single-file packaging, and IIS deployment path configuration.
2026-05-26 11:43:25 +02:00
4d91b0a4fb Refactor Index.razor layout and add redirection logic
Simplified the `@page` directive by removing redundant entries.
Replaced the introductory section with a centered card layout
featuring a document icon, heading, description, and a
`DxLoadingPanel` with a spinner for redirection feedback.

Removed the "Helpful Resources" section with external links.
Added a new `@code` block to handle redirection logic using
`OnAfterRenderAsync`, which redirects to `/reportviewer` after
a 1200ms delay.
2026-05-26 10:44:56 +02:00
e62cdc9d9d Update NavMenu links and add commented-out navigation
- Added a commented-out block for "Home" and "Document Viewer (JS-Based)" navigation links.
- Updated the "reportviewer" link text to "Empfänger-UI."
- Updated the "reportdesigner" link text to "Umschlag-UI."
2026-05-26 10:27:37 +02:00
12a0974efe Refactor signature input into popup modal
The signature input process has been refactored to use a `<DxPopup>` modal for better user experience. The `<canvas>` element for capturing the signature has been moved into the popup, which is dynamically displayed when the user interacts with the "Unterschrift hinzufügen" or "Unterschrift erneuern" button.

Dynamic messages now provide clearer feedback based on whether a signature has been applied. Signature-related actions (renew, apply, close) have been consolidated into the popup's footer, decluttering the main interface.

New properties (`SignaturePopupVisible`, `PopupValidationMessage`) and methods (`OpenSignaturePopupAsync`, `RenewSignatureAsync`, `CloseSignaturePopup`) have been added to manage the popup and its behavior. The `ApplySignatureAsync` method has been updated to handle popup-specific validation and close the popup after applying the signature.

The `OnAfterRenderAsync` method has been removed, and signature pad initialization has been moved to `OpenSignaturePopupAsync`. The `ApplySignatureToReport` method has been removed, with its functionality integrated into `ApplySignatureAsync`.

Minor layout adjustments and validation logic improvements have been made. The "Export Signed PDF" button is now disabled unless a signature has been applied.
2026-05-26 09:55:40 +02:00
367850fee5 Refactor ReportViewer for reusability and dynamic updates
Refactored `ReportViewer.razor` to improve maintainability and
ensure dynamic updates to the `DxReportViewer` component.

- Added `@key` attribute bound to `ViewerKey` to trigger re-renders.
- Introduced `CreateReportInstance` and `CreateSignedReportInstance`
  helper methods to encapsulate report creation logic.
- Updated `OnInitializedAsync`, `ClearSignatureAsync`, and
  `ApplySignatureAsync` to use the new helper methods.
- Incremented `ViewerKey` in relevant methods to ensure proper
  re-rendering of the `DxReportViewer` component.
- Replaced `ApplySignatureToReport` with `CreateSignedReportInstance`.

These changes improve code modularity, readability, and ensure
the UI reflects the latest state of the report.
2026-05-26 02:39:25 +02:00
09cc639466 Add signature input and PDF export functionality
Introduced a signature input feature in `ReportViewer.razor` to allow users to draw a signature on a canvas and embed it into reports before exporting as a signed PDF.

- Added a canvas (`receiver-signature-pad`) and buttons for clearing, applying, and exporting signatures.
- Injected `IJSRuntime` for JavaScript interop and added methods for signature handling (`ClearSignatureAsync`, `ApplySignatureAsync`, `ExportSignedPdfAsync`).
- Embedded the signature as an image and label in the report's bottom margin.
- Added `receiver-signature.js` to manage the signature pad, including drawing, clearing, and exporting the signature as a Base64 image.
- Updated `index.html` to include the new JavaScript file.
- Displayed validation messages for missing or invalid signatures.
2026-05-26 01:02:07 +02:00
c3730d109b Add in-memory report storage and async report handling
Introduced `InMemoryReportStorageWebExtension` to manage
reports in memory, enabling dynamic report storage and
retrieval. Updated `ReportViewer.razor` to conditionally
render the `DxReportViewer` component and initialize
reports asynchronously.

Configured dependency injection in `Program.cs` to register
`InMemoryReportStorageWebExtension` as a singleton and
integrated it with `CustomReportProvider`. Registered
`EnvelopeGenerator.ReceiverUI.PredefinedReports.Report` as
a trusted class for deserialization.

Enhanced `CustomReportProvider` to fetch reports from
memory or generate them dynamically using `ReportsFactory`.
Added necessary `using` directives and ensured proper
report lifecycle management.
2026-05-25 14:04:25 +02:00
f510cfb5ad INIT 2026-05-22 10:50:25 +02:00
OlgunR
45377ea61c Merge branch 'master' of https://vcs.digitaldata.works/AppStd/EnvelopeGenerator 2026-03-13 10:44:39 +01:00
OlgunR
b5748550d1 Fix typo in document confirmation message
Corrected "red" to "read" in the DocumentSuccessfullyConfirmed resource string to ensure proper messaging.
2026-03-13 10:44:00 +01:00
64c018b92e Add DbSets for ElementAnnotation and DocumentStatus
Added DocumentReceiverElementAnnotations (ElementAnnotation) and DocumentStatus DbSet properties to EGDbContextBase to support database operations for these entities.
2026-03-12 16:11:50 +01:00
176672d7eb Add interface import and update email sending condition
Added import for EnvelopeGenerator.Domain.Interfaces. Updated logic to send final emails to receivers only if the envelope requires "Read and Sign," adding an extra check to the email dispatch condition.
2026-03-11 17:45:27 +01:00
05d54e87c3 Bump version to 3.12.3 in project file
Updated EnvelopeGenerator.Web.csproj to increment <Version>, <AssemblyVersion>, and <FileVersion> from 3.12.2 to 3.12.3, preparing for a new release. No other changes included.
2026-03-11 14:19:15 +01:00
06c2a07fbc Replace DateTime.UtcNow with DateTime.Now for timestamps
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.
2026-03-11 14:11:23 +01:00
7cb1546934 Add Reject endpoint to AnnotationController
Introduced a new Reject endpoint for users with the ReceiverFull role to reject annotations, with optional reason support. Marked the endpoint as obsolete for future exception handling updates. Also standardized the Unauthorized response to remove the custom error message.
2026-03-11 12:09:23 +01:00
60db762bcc Bump project version to 3.12.2
Updated EnvelopeGenerator.Web.csproj to increment <Version>, <AssemblyVersion>, and <FileVersion> from 3.12.1 to 3.12.2, reflecting the new release. No other changes were made.
2026-03-11 12:08:48 +01:00
5e840db04c Refactor envelope rejection logic in EnvelopeController
Clarified and streamlined the handling of rejected envelopes:
- Moved retrieval of rejecting receivers for clarity.
- Signed out users when any rejecting receivers are present.
- Improved determination of "external" users.
- Updated condition for showing the EnvelopeRejected view.
- Temporarily hardcoded ViewBag.IsExt with a TODO for future fix.
- Removed redundant code for better maintainability.
2026-03-11 12:05:20 +01:00
e724a74f9c Bump version to 3.12.1 in project file
Updated <Version>, <AssemblyVersion>, and <FileVersion> in EnvelopeGenerator.Web.csproj from 3.12.0 to 3.12.1 to reflect a new patch release. No other changes were made.
2026-03-11 11:19:17 +01:00
48b7afcdc1 Restrict rejection check to ReadAndSign envelopes
Previously, rejection logic was applied to all envelopes. Now, the check for rejected receivers and the "EnvelopeRejected" view are only executed if the envelope is of the "ReadAndSign" type, preventing unnecessary rejection handling for other envelope types.
2026-03-11 11:16:08 +01:00
717da90c01 Add .NET 7.0 support and update project dependencies
Added net7.0 to TargetFrameworks in EnvelopeGenerator.Web.csproj and introduced a conditional ItemGroup with required package references for .NET 7.0 compatibility. Also removed clipboard2.svg from the list of included static files.
2026-03-11 11:07:33 +01:00
8054bb377d Refine rejection check for read-and-sign envelopes
Only return 423 Locked if envelope is read-and-sign and has a rejection history. Also add missing using for Domain.Interfaces in AnnotationController.
2026-03-11 09:43:35 +01:00
200258ff73 Update EnvelopeDto.ReadOnly to use IsReadAndConfirm()
Refactored the ReadOnly property in EnvelopeDto to use the IsReadAndConfirm() extension method instead of directly checking EnvelopeTypeId. Marked the property as [Obsolete] and advised using EnvelopeExtensions.IsReadAndConfirm.
2026-03-11 09:43:22 +01:00
fa73d939b5 Only check rejection for read-and-sign envelopes
Previously, rejection checks were performed for all envelopes. Now, the code checks for rejecting receivers only if the envelope is of the "read-and-sign" type, avoiding unnecessary queries and logic for other envelope types.
2026-03-11 09:29:24 +01:00
ca9e25abcb Add IsReadAndSign extension method to IEnvelope
Introduced the IsReadAndSign method to IEnvelope extensions, which returns true when EnvelopeTypeId is not 2. This allows clear differentiation between "Read and Sign" and "Read and Confirm" envelope types.
2026-03-11 09:28:40 +01:00