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.
This commit is contained in:
2026-11-05 12:03:35 +01:00
parent 1b87528cca
commit 85104511fd
2 changed files with 23 additions and 2 deletions

View File

@@ -21,7 +21,27 @@ public record DocumentSignedNotification : EnvelopeNotificationBase
///
/// </summary>
public string NamePortal { get; init; } = "signFLOW Portal";
/// <summary>
///
/// </summary>
public required bool IsReadAndConfirm { private get; init; }
/// <summary>
///
/// </summary>
public string ReceiverAction => IsReadAndConfirm ? "bestätigt" : "unterschrieben";
/// <summary>
///
/// </summary>
public string FinalStatus => IsReadAndConfirm ? "Lesebestätigung" : "Signatur";
/// <summary>
///
/// </summary>
public string FinalAction => IsReadAndConfirm ? "Empfänger bestätigt" : "Vertragspartner unterzeichnet";
/// <summary>
///
/// </summary>

View File

@@ -98,7 +98,8 @@ public class FinalizeEnvelopeCommandHandler(IRepository<Envelope> Repo, ISender
{
DocumentTitle = envelope.Title,
NameReceiver = er.Name,
Attachments = [($"unterzeichnetes-dokument.pdf", doc)]
Attachments = [($"unterzeichnetes-dokument.pdf", doc)],
IsReadAndConfirm = envelope.IsReadAndConfirm(),
}, cancel);
}