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:
2026-06-17 15:10:17 +02:00
parent 06c8af2ed8
commit 31548728cd
2 changed files with 1 additions and 33 deletions

View File

@@ -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;
}
}

View File

@@ -2,6 +2,7 @@
@attribute [Microsoft.AspNetCore.Authorization.Authorize(Policy = "Sender")] @attribute [Microsoft.AspNetCore.Authorization.Authorize(Policy = "Sender")]
@using System.Text.Json @using System.Text.Json
@using EnvelopeGenerator.Domain.Constants
@using EnvelopeGenerator.ReceiverUI.Models @using EnvelopeGenerator.ReceiverUI.Models
@using DevExpress.Blazor @using DevExpress.Blazor
@using EnvelopeGenerator.ReceiverUI.Services @using EnvelopeGenerator.ReceiverUI.Services