Updated the `EnvelopeDto` class to use a simplified receiver model (`EnvelopeReceiverSimpleDto`) for streamlined data handling. Added the `EnvelopeReceiverSimpleDto` class to represent basic receiver information (`Name`, `Email`, `Signed`). Introduced the `EnvelopeStatus` enumeration in `EnvelopeStatus.cs` to define envelope lifecycle statuses, repurposed for the `ReceiverUI` context. Added `EnvelopeStatusExtensions` with `IsActive` and `IsCompleted` methods to evaluate envelope status states.
34 lines
935 B
C#
34 lines
935 B
C#
namespace EnvelopeGenerator.ReceiverUI.Models;
|
|
|
|
/// <summary>
|
|
/// Envelope status enumeration (copied from Domain for ReceiverUI)
|
|
/// </summary>
|
|
public enum EnvelopeStatus
|
|
{
|
|
Invalid = 0,
|
|
EnvelopeCreated = 1001,
|
|
EnvelopeSaved = 1002,
|
|
EnvelopeQueued = 1003,
|
|
EnvelopeSent = 1004,
|
|
EnvelopePartlySigned = 1005,
|
|
EnvelopeCompletelySigned = 1006,
|
|
EnvelopeReportCreated = 1007,
|
|
EnvelopeArchived = 1008,
|
|
EnvelopeDeleted = 1009,
|
|
EnvelopeRejected = 10007,
|
|
EnvelopeWithdrawn = 10009
|
|
}
|
|
|
|
public static class EnvelopeStatusExtensions
|
|
{
|
|
public static bool IsActive(this EnvelopeStatus status)
|
|
{
|
|
return status >= EnvelopeStatus.EnvelopeCreated && status < EnvelopeStatus.EnvelopePartlySigned;
|
|
}
|
|
|
|
public static bool IsCompleted(this EnvelopeStatus status)
|
|
{
|
|
return status >= EnvelopeStatus.EnvelopeCompletelySigned && status <= EnvelopeStatus.EnvelopeWithdrawn;
|
|
}
|
|
}
|