@shisyamo4131/air-guard-v2-schemas 2.4.2-dev.63 → 2.4.2-dev.64
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 +1 -1
- package/src/Insurance.js +16 -3
package/package.json
CHANGED
package/src/Insurance.js
CHANGED
|
@@ -57,7 +57,7 @@ export default class Insurance extends BaseClass {
|
|
|
57
57
|
number: defField("insuranceNumber"),
|
|
58
58
|
lossDateAt: defField("lossDateAt"),
|
|
59
59
|
lossReason: defField("lossReason"),
|
|
60
|
-
isProcessing: defField("check", { default: false }),
|
|
60
|
+
isProcessing: defField("check", { label: "加入手続き中", default: false }),
|
|
61
61
|
history: defField("array"), // 状態遷移の履歴を記録するための配列
|
|
62
62
|
};
|
|
63
63
|
|
|
@@ -215,7 +215,7 @@ export default class Insurance extends BaseClass {
|
|
|
215
215
|
* - `NOT_ENROLLED (未加入)` または `EXEMPT (適用除外)` の状態でなければ加入手続きは行えません。
|
|
216
216
|
* - `isProcessing` が true の場合、被保険者番号(整理記号)の指定が必要です。
|
|
217
217
|
* @param {Object} options
|
|
218
|
-
* @param {Date} options.enrollmentDateAt
|
|
218
|
+
* @param {Date} options.enrollmentDateAt 資格取得日
|
|
219
219
|
* @param {String} options.number 被保険者番号(整理記号)
|
|
220
220
|
* @param {Boolean} options.isProcessing 加入手続き中フラグ(true の場合、加入手続き中の状態で更新します)
|
|
221
221
|
* @returns {void}
|
|
@@ -224,6 +224,14 @@ export default class Insurance extends BaseClass {
|
|
|
224
224
|
* @throws {Error} `isProcessing` が true で `number` が指定されていない場合にエラーをスローします。
|
|
225
225
|
*/
|
|
226
226
|
enroll({ enrollmentDateAt, number, isProcessing = false } = {}) {
|
|
227
|
+
console.log("=== Insurance.enroll() DEBUG ===");
|
|
228
|
+
console.log("Received arguments:");
|
|
229
|
+
console.log(" enrollmentDateAt:", enrollmentDateAt);
|
|
230
|
+
console.log(" number:", number);
|
|
231
|
+
console.log(" isProcessing:", isProcessing);
|
|
232
|
+
console.log(" typeof isProcessing:", typeof isProcessing);
|
|
233
|
+
console.log(" !!isProcessing:", !!isProcessing);
|
|
234
|
+
|
|
227
235
|
// validation
|
|
228
236
|
const transitionCheck = this._canTransitionTo(
|
|
229
237
|
INSURANCE_STATUS.ENROLLED.value,
|
|
@@ -235,7 +243,7 @@ export default class Insurance extends BaseClass {
|
|
|
235
243
|
}
|
|
236
244
|
|
|
237
245
|
if (!enrollmentDateAt || !(enrollmentDateAt instanceof Date)) {
|
|
238
|
-
throw new Error(ERROR_MESSAGES.REQUIRED_DATE("
|
|
246
|
+
throw new Error(ERROR_MESSAGES.REQUIRED_DATE("資格取得日"));
|
|
239
247
|
}
|
|
240
248
|
|
|
241
249
|
if (!isProcessing && !number) {
|
|
@@ -252,6 +260,11 @@ export default class Insurance extends BaseClass {
|
|
|
252
260
|
this.isProcessing = !!isProcessing;
|
|
253
261
|
this.lossDateAt = null; // 念のため null に更新しておく
|
|
254
262
|
this.lossReason = null; // 念のため null に更新しておく
|
|
263
|
+
|
|
264
|
+
console.log("After setting:");
|
|
265
|
+
console.log(" this.isProcessing:", this.isProcessing);
|
|
266
|
+
console.log(" this.number:", this.number);
|
|
267
|
+
console.log("=== END Insurance.enroll() DEBUG ===");
|
|
255
268
|
}
|
|
256
269
|
|
|
257
270
|
/**
|