mirror of
https://github.com/ajisaacs/OpenNest.git
synced 2026-11-04 18:11:35 -05:00
Nests released from drawing sets need a state before Quote: created but not yet nested or checked. Draft is appended to NestStatus (value 3) because the server still accepts integer statuses from existing callers, so existing numbers must not shift; NestStatuses.WorkflowOrder puts it first wherever the operator picks a status. Older desktops read Draft as Quote (the documented unknown-status fallback), and an older server refuses "draft", so the server must be upgraded before desktops that can set it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
37 lines
1.1 KiB
C#
37 lines
1.1 KiB
C#
namespace OpenNest
|
|
{
|
|
/// <summary>
|
|
/// Shop-floor workflow state of a saved nest, persisted as a string in
|
|
/// <c>nest.json</c> so unknown future values can fall back safely.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// New values go at the end: the nest server still accepts integer statuses from
|
|
/// existing callers, so existing values must keep their numbers. Lists shown to the
|
|
/// operator use <see cref="NestStatuses.WorkflowOrder"/>, not declaration order.
|
|
/// </remarks>
|
|
public enum NestStatus
|
|
{
|
|
Quote,
|
|
ToBeCut,
|
|
HasBeenCut,
|
|
|
|
/// <summary>
|
|
/// Created but not yet ready to quote or cut, such as a nest released from a
|
|
/// drawing set before it has been nested and checked. Comes before Quote.
|
|
/// </summary>
|
|
Draft,
|
|
}
|
|
|
|
public static class NestStatuses
|
|
{
|
|
/// <summary>Every status in the order a nest moves through them.</summary>
|
|
public static readonly NestStatus[] WorkflowOrder =
|
|
{
|
|
NestStatus.Draft,
|
|
NestStatus.Quote,
|
|
NestStatus.ToBeCut,
|
|
NestStatus.HasBeenCut,
|
|
};
|
|
}
|
|
}
|