Refactor EnvelopeStatus to shared domain library
Moved the `EnvelopeStatus` enum and its extension methods from `ReceiverUI.Models` to `Domain.Constants` to improve code reuse and maintainability. Updated `EnvelopeSenderPage.razor` to reference the new namespace.
This commit is contained in:
@@ -1,33 +0,0 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user