@shisyamo4131/air-guard-v2-schemas 2.3.7-dev.5 → 2.3.7-dev.51
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/index.js +2 -0
- package/package.json +1 -1
- package/src/Agreement.js +6 -16
- package/src/Certification.js +49 -0
- package/src/Company.js +27 -1
- package/src/Customer.js +53 -41
- package/src/Employee.js +417 -58
- package/src/OperationBilling.js +28 -14
- package/src/OperationResult.js +29 -10
- package/src/Site.js +46 -9
- package/src/SiteOperationSchedule.js +23 -10
- package/src/System.js +43 -0
- package/src/apis/index.js +4 -0
- package/src/constants/blood-type.js +14 -0
- package/src/constants/certification-type.js +34 -0
- package/src/constants/emergency-contact-relation.js +16 -0
- package/src/constants/index.js +16 -0
- package/src/constants/payment-month.js +21 -0
- package/src/parts/accessorDefinitions.js +13 -27
- package/src/parts/fieldDefinitions.js +147 -3
- package/src/utils/CutoffDate.js +14 -14
|
@@ -2,6 +2,14 @@ import {
|
|
|
2
2
|
VALUES as ARRANGEMENT_NOTIFICATION_STATUS_VALUES,
|
|
3
3
|
OPTIONS as ARRANGEMENT_NOTIFICATION_STATUS_OPTIONS,
|
|
4
4
|
} from "../constants/arrangement-notification-status.js";
|
|
5
|
+
import {
|
|
6
|
+
VALUES as BLOOD_TYPE_VALUES,
|
|
7
|
+
OPTIONS as BLOOD_TYPE_OPTIONS,
|
|
8
|
+
} from "../constants/blood-type.js";
|
|
9
|
+
import {
|
|
10
|
+
VALUES as CERTIFICATION_TYPE_VALUES,
|
|
11
|
+
OPTIONS as CERTIFICATION_TYPE_OPTIONS,
|
|
12
|
+
} from "../constants/certification-type.js";
|
|
5
13
|
import {
|
|
6
14
|
VALUES as CONTRACT_STATUS_VALUES,
|
|
7
15
|
OPTIONS as CONTRACT_STATUS_OPTIONS,
|
|
@@ -10,6 +18,10 @@ import {
|
|
|
10
18
|
OPTIONS as DAY_TYPE_OPTIONS,
|
|
11
19
|
VALUES as DAY_TYPE_VALUES,
|
|
12
20
|
} from "../constants/day-type.js";
|
|
21
|
+
import {
|
|
22
|
+
VALUES as EMERGENCY_CONTACT_RELATION_VALUES,
|
|
23
|
+
OPTIONS as EMERGENCY_CONTACT_RELATION_OPTIONS,
|
|
24
|
+
} from "../constants/emergency-contact-relation.js";
|
|
13
25
|
import {
|
|
14
26
|
VALUES as EMPLOYMENT_STATUS_VALUES,
|
|
15
27
|
OPTIONS as EMPLOYMENT_STATUS_OPTIONS,
|
|
@@ -27,6 +39,7 @@ import {
|
|
|
27
39
|
VALUES as SITE_STATUS_VALUES,
|
|
28
40
|
OPTIONS as SITE_STATUS_OPTIONS,
|
|
29
41
|
} from "../constants/site-status.js";
|
|
42
|
+
import CutoffDate from "../utils/CutoffDate.js";
|
|
30
43
|
|
|
31
44
|
export const DEFAULT_WORKING_MINUTES = 480;
|
|
32
45
|
export const DEFAULT_BREAK_MINUTES = 60;
|
|
@@ -147,11 +160,30 @@ export const fieldDefinitions = {
|
|
|
147
160
|
code: generalDefinitions.code,
|
|
148
161
|
/** dateAt */
|
|
149
162
|
dateAt: generalDefinitions.dateAt,
|
|
163
|
+
dateOfBirth: {
|
|
164
|
+
...generalDefinitions.dateAt,
|
|
165
|
+
label: "生年月日",
|
|
166
|
+
},
|
|
167
|
+
dateOfHire: {
|
|
168
|
+
...generalDefinitions.dateAt,
|
|
169
|
+
label: "入社日",
|
|
170
|
+
},
|
|
171
|
+
dateOfTermination: {
|
|
172
|
+
...generalDefinitions.dateAt,
|
|
173
|
+
label: "退職日",
|
|
174
|
+
},
|
|
175
|
+
periodOfStay: {
|
|
176
|
+
...generalDefinitions.dateAt,
|
|
177
|
+
label: "在留期間満了日",
|
|
178
|
+
},
|
|
150
179
|
/** dateTimeAt */
|
|
151
180
|
dateTimeAt: generalDefinitions.dateTimeAt,
|
|
152
181
|
/** multiple-line */
|
|
153
182
|
multipleLine: generalDefinitions.multipleLine,
|
|
154
|
-
|
|
183
|
+
remarks: {
|
|
184
|
+
...generalDefinitions.multipleLine,
|
|
185
|
+
label: "備考",
|
|
186
|
+
},
|
|
155
187
|
/** number */
|
|
156
188
|
number: generalDefinitions.number,
|
|
157
189
|
breakMinutes: {
|
|
@@ -219,6 +251,8 @@ export const fieldDefinitions = {
|
|
|
219
251
|
customerId: {
|
|
220
252
|
...generalDefinitions.oneLine,
|
|
221
253
|
label: "取引先",
|
|
254
|
+
// アプリ側で `useFetchXxxx` コンポーザブルを使用するため
|
|
255
|
+
// 使用するクラス側で api 関連の設定は不要。
|
|
222
256
|
component: {
|
|
223
257
|
name: "air-autocomplete-api",
|
|
224
258
|
attrs: {
|
|
@@ -233,6 +267,11 @@ export const fieldDefinitions = {
|
|
|
233
267
|
label: "表示名",
|
|
234
268
|
length: 6,
|
|
235
269
|
},
|
|
270
|
+
domicile: {
|
|
271
|
+
...generalDefinitions.oneLine,
|
|
272
|
+
label: "本籍地",
|
|
273
|
+
length: 30,
|
|
274
|
+
},
|
|
236
275
|
email: {
|
|
237
276
|
...generalDefinitions.oneLine,
|
|
238
277
|
label: "email",
|
|
@@ -244,6 +283,33 @@ export const fieldDefinitions = {
|
|
|
244
283
|
},
|
|
245
284
|
},
|
|
246
285
|
},
|
|
286
|
+
emergencyContactAddress: {
|
|
287
|
+
...generalDefinitions.oneLine,
|
|
288
|
+
label: "緊急連絡先住所",
|
|
289
|
+
length: 20,
|
|
290
|
+
},
|
|
291
|
+
emergencyContactName: {
|
|
292
|
+
...generalDefinitions.oneLine,
|
|
293
|
+
label: "緊急連絡先氏名",
|
|
294
|
+
length: 20,
|
|
295
|
+
},
|
|
296
|
+
emergencyContactRelationDetail: {
|
|
297
|
+
...generalDefinitions.oneLine,
|
|
298
|
+
label: "緊急連絡先続柄詳細",
|
|
299
|
+
length: 20,
|
|
300
|
+
},
|
|
301
|
+
emergencyContactPhone: {
|
|
302
|
+
...generalDefinitions.oneLine,
|
|
303
|
+
label: "緊急連絡先電話番号",
|
|
304
|
+
length: 13,
|
|
305
|
+
component: {
|
|
306
|
+
name: generalDefinitions.oneLine.component.name,
|
|
307
|
+
attrs: {
|
|
308
|
+
counter: true,
|
|
309
|
+
inputType: "tel",
|
|
310
|
+
},
|
|
311
|
+
},
|
|
312
|
+
},
|
|
247
313
|
fax: {
|
|
248
314
|
...generalDefinitions.oneLine,
|
|
249
315
|
label: "FAX番号",
|
|
@@ -276,6 +342,13 @@ export const fieldDefinitions = {
|
|
|
276
342
|
...generalDefinitions.oneLine,
|
|
277
343
|
label: "本名",
|
|
278
344
|
length: 50,
|
|
345
|
+
component: {
|
|
346
|
+
name: generalDefinitions.oneLine.component.name,
|
|
347
|
+
attrs: {
|
|
348
|
+
hint: "パスポート等の表記をご入力ください。",
|
|
349
|
+
persistentHint: true,
|
|
350
|
+
},
|
|
351
|
+
},
|
|
279
352
|
},
|
|
280
353
|
lastName: {
|
|
281
354
|
...generalDefinitions.oneLine,
|
|
@@ -293,6 +366,18 @@ export const fieldDefinitions = {
|
|
|
293
366
|
},
|
|
294
367
|
},
|
|
295
368
|
},
|
|
369
|
+
mobile: {
|
|
370
|
+
...generalDefinitions.oneLine,
|
|
371
|
+
label: "携帯電話",
|
|
372
|
+
length: 13,
|
|
373
|
+
component: {
|
|
374
|
+
name: generalDefinitions.oneLine.component.name,
|
|
375
|
+
attrs: {
|
|
376
|
+
counter: true,
|
|
377
|
+
inputType: "tel",
|
|
378
|
+
},
|
|
379
|
+
},
|
|
380
|
+
},
|
|
296
381
|
name: {
|
|
297
382
|
...generalDefinitions.oneLine,
|
|
298
383
|
label: "名前",
|
|
@@ -314,6 +399,16 @@ export const fieldDefinitions = {
|
|
|
314
399
|
label: "国籍",
|
|
315
400
|
length: 50,
|
|
316
401
|
},
|
|
402
|
+
residenceStatus: {
|
|
403
|
+
...generalDefinitions.oneLine,
|
|
404
|
+
label: "在留資格",
|
|
405
|
+
length: 10,
|
|
406
|
+
},
|
|
407
|
+
reasonOfTermination: {
|
|
408
|
+
...generalDefinitions.oneLine,
|
|
409
|
+
label: "退職理由",
|
|
410
|
+
length: 20,
|
|
411
|
+
},
|
|
317
412
|
siteId: {
|
|
318
413
|
...generalDefinitions.oneLine,
|
|
319
414
|
label: "現場",
|
|
@@ -338,6 +433,11 @@ export const fieldDefinitions = {
|
|
|
338
433
|
},
|
|
339
434
|
},
|
|
340
435
|
},
|
|
436
|
+
title: {
|
|
437
|
+
...generalDefinitions.oneLine,
|
|
438
|
+
label: "肩書",
|
|
439
|
+
length: 20,
|
|
440
|
+
},
|
|
341
441
|
workDescription: {
|
|
342
442
|
...generalDefinitions.oneLine,
|
|
343
443
|
label: "作業内容",
|
|
@@ -352,9 +452,9 @@ export const fieldDefinitions = {
|
|
|
352
452
|
attrs: {
|
|
353
453
|
counter: true,
|
|
354
454
|
inputType: "zipcode",
|
|
355
|
-
"onUpdate:address": (item,
|
|
455
|
+
"onUpdate:address": ({ item, updateProperties }) => {
|
|
356
456
|
return (result) => {
|
|
357
|
-
|
|
457
|
+
updateProperties({
|
|
358
458
|
prefCode: result.prefcode,
|
|
359
459
|
prefecture: result.address1,
|
|
360
460
|
city: result.address2,
|
|
@@ -404,6 +504,28 @@ export const fieldDefinitions = {
|
|
|
404
504
|
},
|
|
405
505
|
},
|
|
406
506
|
},
|
|
507
|
+
bloodType: {
|
|
508
|
+
...generalDefinitions.select,
|
|
509
|
+
label: "血液型",
|
|
510
|
+
default: BLOOD_TYPE_VALUES.A.value,
|
|
511
|
+
component: {
|
|
512
|
+
name: generalDefinitions.select.component.name,
|
|
513
|
+
attrs: {
|
|
514
|
+
items: BLOOD_TYPE_OPTIONS,
|
|
515
|
+
},
|
|
516
|
+
},
|
|
517
|
+
},
|
|
518
|
+
certificationType: {
|
|
519
|
+
...generalDefinitions.select,
|
|
520
|
+
label: "資格種別",
|
|
521
|
+
default: null,
|
|
522
|
+
component: {
|
|
523
|
+
name: generalDefinitions.select.component.name,
|
|
524
|
+
attrs: {
|
|
525
|
+
items: CERTIFICATION_TYPE_OPTIONS,
|
|
526
|
+
},
|
|
527
|
+
},
|
|
528
|
+
},
|
|
407
529
|
// contractStatus -> Used in Customer.js and Outsourcer.js
|
|
408
530
|
contractStatus: {
|
|
409
531
|
...generalDefinitions.select,
|
|
@@ -416,6 +538,17 @@ export const fieldDefinitions = {
|
|
|
416
538
|
},
|
|
417
539
|
},
|
|
418
540
|
},
|
|
541
|
+
cutoffDate: {
|
|
542
|
+
...generalDefinitions.select,
|
|
543
|
+
default: CutoffDate.VALUES[0].value,
|
|
544
|
+
label: "締日",
|
|
545
|
+
component: {
|
|
546
|
+
name: generalDefinitions.select.component.name,
|
|
547
|
+
attrs: {
|
|
548
|
+
items: CutoffDate.OPTIONS,
|
|
549
|
+
},
|
|
550
|
+
},
|
|
551
|
+
},
|
|
419
552
|
dayType: {
|
|
420
553
|
...generalDefinitions.select,
|
|
421
554
|
default: DAY_TYPE_VALUES.WEEKDAY.value,
|
|
@@ -427,6 +560,17 @@ export const fieldDefinitions = {
|
|
|
427
560
|
},
|
|
428
561
|
},
|
|
429
562
|
},
|
|
563
|
+
emergencyContactRelation: {
|
|
564
|
+
...generalDefinitions.select,
|
|
565
|
+
default: EMERGENCY_CONTACT_RELATION_VALUES.PARENT.value,
|
|
566
|
+
label: "緊急連絡先続柄",
|
|
567
|
+
component: {
|
|
568
|
+
name: generalDefinitions.select.component.name,
|
|
569
|
+
attrs: {
|
|
570
|
+
items: EMERGENCY_CONTACT_RELATION_OPTIONS,
|
|
571
|
+
},
|
|
572
|
+
},
|
|
573
|
+
},
|
|
430
574
|
employmentStatus: {
|
|
431
575
|
...generalDefinitions.select,
|
|
432
576
|
default: EMPLOYMENT_STATUS_VALUES.ACTIVE.value,
|
package/src/utils/CutoffDate.js
CHANGED
|
@@ -22,24 +22,24 @@ export default class CutoffDate {
|
|
|
22
22
|
* Cutoff date constant values
|
|
23
23
|
*/
|
|
24
24
|
static VALUES = Object.freeze({
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
25
|
+
5: { value: 5, title: "5日" },
|
|
26
|
+
10: { value: 10, title: "10日" },
|
|
27
|
+
15: { value: 15, title: "15日" },
|
|
28
|
+
20: { value: 20, title: "20日" },
|
|
29
|
+
25: { value: 25, title: "25日" },
|
|
30
|
+
0: { value: 0, title: "月末" },
|
|
31
31
|
});
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
34
|
* Options for selection components
|
|
35
35
|
*/
|
|
36
36
|
static OPTIONS = [
|
|
37
|
-
{ title: "5日", value: CutoffDate.VALUES.
|
|
38
|
-
{ title: "10日", value: CutoffDate.VALUES.
|
|
39
|
-
{ title: "15日", value: CutoffDate.VALUES.
|
|
40
|
-
{ title: "20日", value: CutoffDate.VALUES.
|
|
41
|
-
{ title: "25日", value: CutoffDate.VALUES.
|
|
42
|
-
{ title: "月末", value: CutoffDate.VALUES.
|
|
37
|
+
{ title: "5日", value: CutoffDate.VALUES[5].value },
|
|
38
|
+
{ title: "10日", value: CutoffDate.VALUES[10].value },
|
|
39
|
+
{ title: "15日", value: CutoffDate.VALUES[15].value },
|
|
40
|
+
{ title: "20日", value: CutoffDate.VALUES[20].value },
|
|
41
|
+
{ title: "25日", value: CutoffDate.VALUES[25].value },
|
|
42
|
+
{ title: "月末", value: CutoffDate.VALUES[0].value },
|
|
43
43
|
];
|
|
44
44
|
|
|
45
45
|
/**
|
|
@@ -50,11 +50,11 @@ export default class CutoffDate {
|
|
|
50
50
|
* @returns {number} Actual cutoff day
|
|
51
51
|
* @example
|
|
52
52
|
* // Get cutoff day for February 2024 with month-end setting
|
|
53
|
-
* const cutoffDay = CutoffDate.calculateActualCutoffDay(2024, 1, CutoffDate.VALUES.
|
|
53
|
+
* const cutoffDay = CutoffDate.calculateActualCutoffDay(2024, 1, CutoffDate.VALUES[0].value);
|
|
54
54
|
* // Returns 29 (leap year)
|
|
55
55
|
*/
|
|
56
56
|
static calculateActualCutoffDay(year, month, cutoffDateValue) {
|
|
57
|
-
if (cutoffDateValue === CutoffDate.VALUES.
|
|
57
|
+
if (cutoffDateValue === CutoffDate.VALUES[0].value) {
|
|
58
58
|
// Get last day of the month using UTC
|
|
59
59
|
return new Date(Date.UTC(year, month + 1, 0)).getUTCDate();
|
|
60
60
|
}
|