@shisyamo4131/air-guard-v2-schemas 2.4.2-dev.83 → 2.4.2-dev.84

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shisyamo4131/air-guard-v2-schemas",
3
- "version": "2.4.2-dev.83",
3
+ "version": "2.4.2-dev.84",
4
4
  "description": "Schemas for AirGuard V2",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -2,6 +2,14 @@
2
2
  * @file ./src/constants/arrangement-notification-status.js
3
3
  * @description 配置通知状態定義
4
4
  *
5
+ * @property {string} value - 状態の識別子
6
+ * @property {string} title - 状態の表示名
7
+ * @property {number} order - 状態の順序(数値が小さいほど優先度が高い)
8
+ * @property {string} color - 状態に対応するカラーコード(例: "#F57C00")
9
+ * @property {function} disabled - 現在の状態を引数に取り、次の状態への遷移が可能かどうかを判定する関数
10
+ * @property {string|null} next - 次の状態の識別子(遷移可能な場合)、遷移不可の場合はnull
11
+ * @property {string|null} return - 前の状態の識別子(遷移可能な場合)、遷移不可の場合はnull
12
+ *
5
13
  * ### 状態
6
14
  * - 配置済(ARRANGED): 管制により配置が行われた状態で、配置通知の初期状態。作業員はまだ確認していない。
7
15
  * - 確認済(CONFIRMED): 作業員が配置通知を確認し、了承した状態。
@@ -30,6 +38,8 @@ export const VALUES = Object.freeze({
30
38
  disabled: (currentStatus) => {
31
39
  return true;
32
40
  },
41
+ next: "CONFIRMED",
42
+ return: null,
33
43
  },
34
44
 
35
45
  CONFIRMED: {
@@ -47,6 +57,8 @@ export const VALUES = Object.freeze({
47
57
  disabled: (currentStatus) => {
48
58
  return !(currentStatus === "ARRANGED" || currentStatus === "ARRIVED");
49
59
  },
60
+ next: "ARRIVED",
61
+ return: "ARRANGED",
50
62
  },
51
63
 
52
64
  ARRIVED: {
@@ -63,6 +75,8 @@ export const VALUES = Object.freeze({
63
75
  disabled: (currentStatus) => {
64
76
  return !(currentStatus === "CONFIRMED" || currentStatus === "LEAVED");
65
77
  },
78
+ next: "LEAVED",
79
+ return: "ARRIVED",
66
80
  },
67
81
 
68
82
  LEAVED: {
@@ -80,6 +94,8 @@ export const VALUES = Object.freeze({
80
94
  disabled: (currentStatus) => {
81
95
  return !(currentStatus === "ARRIVED" || currentStatus === "LEAVED");
82
96
  },
97
+ next: null,
98
+ return: "ARRIVED",
83
99
  },
84
100
 
85
101
  /**