@shisyamo4131/air-guard-v2-schemas 2.4.2-dev.9 → 2.4.2-dev.91
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 +12 -0
- package/package.json +45 -47
- package/src/Agreement.js +17 -24
- package/src/AgreementV2.js +185 -0
- package/src/ArrangementNotification.js +16 -8
- package/src/Billing.js +6 -35
- package/src/Company.js +162 -25
- package/src/Customer.js +41 -60
- package/src/Employee.js +590 -300
- package/src/FcmToken.js +73 -0
- package/src/Insurance.js +409 -0
- package/src/Notification.js +95 -0
- package/src/NotificationRecipient.js +68 -0
- package/src/Operation.js +273 -281
- package/src/OperationBilling.js +126 -192
- package/src/OperationDetail.js +115 -85
- package/src/OperationResult.js +257 -254
- package/src/OperationResultDetail.js +65 -56
- package/src/Outsourcer.js +1 -1
- package/src/Site.js +160 -137
- package/src/SiteOperationSchedule.js +187 -247
- package/src/SiteOperationScheduleDetail.js +75 -65
- package/src/SiteOrder.js +18 -29
- package/src/User.js +44 -47
- package/src/WorkTimeBase.js +205 -0
- package/src/WorkingResult.js +83 -255
- package/src/constants/arrangement-notification-status.js +91 -4
- package/src/constants/day-type.js +20 -12
- package/src/constants/employment-status.js +2 -2
- package/src/constants/index.js +8 -0
- package/src/constants/insurance-status.js +15 -0
- package/src/constants/security-type.js +16 -0
- package/src/constants/shift-type.js +5 -2
- package/src/errorDefinitions.js +173 -0
- package/src/parts/fieldDefinitions/array.js +50 -0
- package/src/parts/fieldDefinitions/check.js +53 -0
- package/src/parts/fieldDefinitions/code.js +8 -0
- package/src/parts/fieldDefinitions/constants.js +9 -0
- package/src/parts/fieldDefinitions/dateAt.js +63 -0
- package/src/parts/fieldDefinitions/dateTimeAt.js +8 -0
- package/src/parts/fieldDefinitions/defaultDefinition.js +118 -0
- package/src/parts/fieldDefinitions/multipleLine.js +16 -0
- package/src/parts/fieldDefinitions/number.js +69 -0
- package/src/parts/fieldDefinitions/object.js +38 -0
- package/src/parts/fieldDefinitions/oneLine.js +426 -0
- package/src/parts/fieldDefinitions/radio.js +8 -0
- package/src/parts/fieldDefinitions/select.js +282 -0
- package/src/parts/fieldDefinitions/time.js +8 -0
- package/src/parts/fieldDefinitions.js +46 -669
- package/src/utils/CutoffDate.js +11 -15
- package/src/utils/index.js +44 -8
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* バリデーションエラー定義
|
|
3
|
+
* - validator がオブジェクト形式でエラーを返す際に使用します。
|
|
4
|
+
* - 各エラーは関数として定義され、動的なパラメータを受け取ります。
|
|
5
|
+
*
|
|
6
|
+
* 返却値の形式:
|
|
7
|
+
* {
|
|
8
|
+
* code: 'ERROR_CODE', // エラーコード
|
|
9
|
+
* message: 'English message', // 英語メッセージ(デフォルト言語)
|
|
10
|
+
* messages: { // その他の言語のメッセージ
|
|
11
|
+
* ja: '日本語メッセージ'
|
|
12
|
+
* }
|
|
13
|
+
* }
|
|
14
|
+
*
|
|
15
|
+
* 使用例:
|
|
16
|
+
* ```javascript
|
|
17
|
+
* import { VALIDATION_ERRORS } from './errorDefinitions.js';
|
|
18
|
+
*
|
|
19
|
+
* validator: (v) => {
|
|
20
|
+
* const minValue = 0;
|
|
21
|
+
* if (v < minValue) {
|
|
22
|
+
* return VALIDATION_ERRORS.MIN_VALUE_ERROR(minValue);
|
|
23
|
+
* }
|
|
24
|
+
* return true;
|
|
25
|
+
* }
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
export const VALIDATION_ERRORS = {
|
|
30
|
+
/**
|
|
31
|
+
* 最小値エラー
|
|
32
|
+
* @param {number} minValue - 最小値
|
|
33
|
+
* @returns {Object} エラーオブジェクト
|
|
34
|
+
*/
|
|
35
|
+
MIN_VALUE_ERROR: (minValue) => ({
|
|
36
|
+
code: "MIN_VALUE_ERROR",
|
|
37
|
+
message: `Please enter a value of ${minValue} or more.`,
|
|
38
|
+
messages: {
|
|
39
|
+
ja: `${minValue}以上の値を入力してください。`,
|
|
40
|
+
},
|
|
41
|
+
}),
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* 最大値エラー
|
|
45
|
+
* @param {number} maxValue - 最大値
|
|
46
|
+
* @returns {Object} エラーオブジェクト
|
|
47
|
+
*/
|
|
48
|
+
MAX_VALUE_ERROR: (maxValue) => ({
|
|
49
|
+
code: "MAX_VALUE_ERROR",
|
|
50
|
+
message: `Please enter a value of ${maxValue} or less.`,
|
|
51
|
+
messages: {
|
|
52
|
+
ja: `${maxValue}以下の値を入力してください。`,
|
|
53
|
+
},
|
|
54
|
+
}),
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* 範囲エラー
|
|
58
|
+
* @param {number} minValue - 最小値
|
|
59
|
+
* @param {number} maxValue - 最大値
|
|
60
|
+
* @returns {Object} エラーオブジェクト
|
|
61
|
+
*/
|
|
62
|
+
RANGE_ERROR: (minValue, maxValue) => ({
|
|
63
|
+
code: "RANGE_ERROR",
|
|
64
|
+
message: `Please enter a value between ${minValue} and ${maxValue}.`,
|
|
65
|
+
messages: {
|
|
66
|
+
ja: `${minValue}以上${maxValue}以下の値を入力してください。`,
|
|
67
|
+
},
|
|
68
|
+
}),
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* 最小文字数エラー
|
|
72
|
+
* @param {number} minLength - 最小文字数
|
|
73
|
+
* @returns {Object} エラーオブジェクト
|
|
74
|
+
*/
|
|
75
|
+
MIN_LENGTH_ERROR: (minLength) => ({
|
|
76
|
+
code: "MIN_LENGTH_ERROR",
|
|
77
|
+
message: `Please enter at least ${minLength} characters.`,
|
|
78
|
+
messages: {
|
|
79
|
+
ja: `${minLength}文字以上で入力してください。`,
|
|
80
|
+
},
|
|
81
|
+
}),
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* 最大文字数エラー
|
|
85
|
+
* @param {number} maxLength - 最大文字数
|
|
86
|
+
* @returns {Object} エラーオブジェクト
|
|
87
|
+
*/
|
|
88
|
+
MAX_LENGTH_ERROR: (maxLength) => ({
|
|
89
|
+
code: "MAX_LENGTH_ERROR",
|
|
90
|
+
message: `Please enter ${maxLength} characters or less.`,
|
|
91
|
+
messages: {
|
|
92
|
+
ja: `${maxLength}文字以内で入力してください。`,
|
|
93
|
+
},
|
|
94
|
+
}),
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* パターン不一致エラー
|
|
98
|
+
* @param {string} pattern - パターン名(例: 'email', 'phone')
|
|
99
|
+
* @returns {Object} エラーオブジェクト
|
|
100
|
+
*/
|
|
101
|
+
PATTERN_ERROR: (pattern) => ({
|
|
102
|
+
code: "PATTERN_ERROR",
|
|
103
|
+
message: `Please enter a valid ${pattern} format.`,
|
|
104
|
+
messages: {
|
|
105
|
+
ja: `正しい${pattern}の形式で入力してください。`,
|
|
106
|
+
},
|
|
107
|
+
}),
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* 必須エラー(カスタムメッセージ用)
|
|
111
|
+
* @param {string} fieldName - フィールド名
|
|
112
|
+
* @returns {Object} エラーオブジェクト
|
|
113
|
+
*/
|
|
114
|
+
REQUIRED_FIELD_ERROR: (fieldName) => ({
|
|
115
|
+
code: "REQUIRED_FIELD_ERROR",
|
|
116
|
+
message: `${fieldName} is required.`,
|
|
117
|
+
messages: {
|
|
118
|
+
ja: `${fieldName}は必須です。`,
|
|
119
|
+
},
|
|
120
|
+
}),
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* 日付範囲エラー
|
|
124
|
+
* @param {string} startDate - 開始日
|
|
125
|
+
* @param {string} endDate - 終了日
|
|
126
|
+
* @returns {Object} エラーオブジェクト
|
|
127
|
+
*/
|
|
128
|
+
DATE_RANGE_ERROR: (startDate, endDate) => ({
|
|
129
|
+
code: "DATE_RANGE_ERROR",
|
|
130
|
+
message: `Please select a date between ${startDate} and ${endDate}.`,
|
|
131
|
+
messages: {
|
|
132
|
+
ja: `${startDate}から${endDate}の間の日付を選択してください。`,
|
|
133
|
+
},
|
|
134
|
+
}),
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* 日付順序エラー
|
|
138
|
+
* @returns {Object} エラーオブジェクト
|
|
139
|
+
*/
|
|
140
|
+
DATE_ORDER_ERROR: () => ({
|
|
141
|
+
code: "DATE_ORDER_ERROR",
|
|
142
|
+
message: "Start date must be before end date.",
|
|
143
|
+
messages: {
|
|
144
|
+
ja: "開始日は終了日より前である必要があります。",
|
|
145
|
+
},
|
|
146
|
+
}),
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* 重複エラー
|
|
150
|
+
* @param {string} fieldName - フィールド名
|
|
151
|
+
* @returns {Object} エラーオブジェクト
|
|
152
|
+
*/
|
|
153
|
+
DUPLICATE_ERROR: (fieldName) => ({
|
|
154
|
+
code: "DUPLICATE_ERROR",
|
|
155
|
+
message: `${fieldName} is already registered.`,
|
|
156
|
+
messages: {
|
|
157
|
+
ja: `${fieldName}は既に登録されています。`,
|
|
158
|
+
},
|
|
159
|
+
}),
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* カスタムエラー(汎用)
|
|
163
|
+
* @param {string} code - エラーコード
|
|
164
|
+
* @param {string} message - 英語メッセージ
|
|
165
|
+
* @param {Object} messages - 多言語メッセージオブジェクト(例: { ja: '日本語メッセージ' })
|
|
166
|
+
* @returns {Object} エラーオブジェクト
|
|
167
|
+
*/
|
|
168
|
+
CUSTOM_ERROR: (code, message, messages) => ({
|
|
169
|
+
code,
|
|
170
|
+
message,
|
|
171
|
+
messages,
|
|
172
|
+
}),
|
|
173
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { generalDefinitions } from "./defaultDefinition.js";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* ARRAY型のフィールド定義
|
|
5
|
+
* {
|
|
6
|
+
* type: Array,
|
|
7
|
+
* default: () => [],
|
|
8
|
+
* label: undefined,
|
|
9
|
+
* length: undefined,
|
|
10
|
+
* required: undefined,
|
|
11
|
+
* hidden: undefined,
|
|
12
|
+
* validator: undefined,
|
|
13
|
+
* component: { name: "air-select", attrs: { multiple: true } },
|
|
14
|
+
* }
|
|
15
|
+
*/
|
|
16
|
+
export const arrayFields = {
|
|
17
|
+
array: generalDefinitions.array,
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* FCM トークン
|
|
21
|
+
* Firebase Cloud Messaging (FCM) のトークンを格納するフィールド定義
|
|
22
|
+
*/
|
|
23
|
+
fcmTokens: {
|
|
24
|
+
...generalDefinitions.array,
|
|
25
|
+
label: "FCMトークン",
|
|
26
|
+
required: false,
|
|
27
|
+
hidden: true,
|
|
28
|
+
},
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* アプリケーション利用権限用配列フィールド定義
|
|
32
|
+
*/
|
|
33
|
+
roles: {
|
|
34
|
+
...generalDefinitions.array,
|
|
35
|
+
label: "権限",
|
|
36
|
+
required: false,
|
|
37
|
+
hidden: false,
|
|
38
|
+
},
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* 通知の送信先ユーザーID配列
|
|
42
|
+
* Notification ドキュメントで使用
|
|
43
|
+
*/
|
|
44
|
+
recipientUserIds: {
|
|
45
|
+
...generalDefinitions.array,
|
|
46
|
+
label: "送信先ユーザーID",
|
|
47
|
+
required: false,
|
|
48
|
+
hidden: true,
|
|
49
|
+
},
|
|
50
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { generalDefinitions } from "./defaultDefinition.js";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* CHECK型のフィールド定義
|
|
5
|
+
* {
|
|
6
|
+
* type: Boolean,
|
|
7
|
+
* default: false,
|
|
8
|
+
* label: undefined,
|
|
9
|
+
* length: undefined,
|
|
10
|
+
* required: undefined,
|
|
11
|
+
* hidden: undefined,
|
|
12
|
+
* validator: undefined,
|
|
13
|
+
* component: { name: "air-checkbox", attrs: {} },
|
|
14
|
+
* }
|
|
15
|
+
*/
|
|
16
|
+
export const checkFields = {
|
|
17
|
+
check: generalDefinitions.check,
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* 使用不可を表すフィールド定義
|
|
21
|
+
* - `label` や他の定義は利用先において定義変更すること。
|
|
22
|
+
*/
|
|
23
|
+
disabled: {
|
|
24
|
+
...generalDefinitions.check,
|
|
25
|
+
label: "使用不可",
|
|
26
|
+
},
|
|
27
|
+
|
|
28
|
+
hasPeriodOfStayLimit: {
|
|
29
|
+
...generalDefinitions.check,
|
|
30
|
+
label: "在留期間制限",
|
|
31
|
+
},
|
|
32
|
+
hasWorkRestrictions: {
|
|
33
|
+
...generalDefinitions.check,
|
|
34
|
+
label: "就労制限",
|
|
35
|
+
},
|
|
36
|
+
|
|
37
|
+
/** 管理者かどうか */
|
|
38
|
+
isAdmin: {
|
|
39
|
+
...generalDefinitions.check,
|
|
40
|
+
label: "管理者",
|
|
41
|
+
},
|
|
42
|
+
|
|
43
|
+
isForeigner: {
|
|
44
|
+
...generalDefinitions.check,
|
|
45
|
+
label: "外国籍",
|
|
46
|
+
},
|
|
47
|
+
|
|
48
|
+
/** 仮登録 */
|
|
49
|
+
isTemporary: {
|
|
50
|
+
...generalDefinitions.check,
|
|
51
|
+
label: "仮登録",
|
|
52
|
+
},
|
|
53
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* フィールド定義で使用する定数
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
export const DEFAULT_WORKING_MINUTES = 480;
|
|
6
|
+
export const DEFAULT_BREAK_MINUTES = 60;
|
|
7
|
+
export const MINUTES_PER_HOUR = 60;
|
|
8
|
+
export const MINUTES_PER_QUARTER_HOUR = 15;
|
|
9
|
+
export const MAX_SCHEDULED_WORKING_MINUTES = 480; // 8時間 * 60分
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { generalDefinitions } from "./defaultDefinition.js";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* DATE AT型のフィールド定義
|
|
5
|
+
*/
|
|
6
|
+
export const dateAtFields = {
|
|
7
|
+
dateAt: generalDefinitions.dateAt,
|
|
8
|
+
dateOfBirth: {
|
|
9
|
+
...generalDefinitions.dateAt,
|
|
10
|
+
label: "生年月日",
|
|
11
|
+
default: null, // 2025-12-26 Set default to null
|
|
12
|
+
component: {
|
|
13
|
+
...generalDefinitions.dateAt.component,
|
|
14
|
+
attrs: {
|
|
15
|
+
viewMode: "year", // 2025-12-26 Added
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
dateOfHire: {
|
|
20
|
+
...generalDefinitions.dateAt,
|
|
21
|
+
label: "入社日",
|
|
22
|
+
},
|
|
23
|
+
// 2025-12-26 Added
|
|
24
|
+
dateOfSecurityGuardRegistration: {
|
|
25
|
+
...generalDefinitions.dateAt,
|
|
26
|
+
label: "警備員登録日",
|
|
27
|
+
default: null,
|
|
28
|
+
},
|
|
29
|
+
dateOfTermination: {
|
|
30
|
+
...generalDefinitions.dateAt,
|
|
31
|
+
label: "退職日",
|
|
32
|
+
default: null, // 2025-12-26 Set default to null
|
|
33
|
+
},
|
|
34
|
+
enrollmentDateAt: {
|
|
35
|
+
...generalDefinitions.dateAt,
|
|
36
|
+
label: "資格取得日",
|
|
37
|
+
default: null,
|
|
38
|
+
},
|
|
39
|
+
// 2025-12-26 Added
|
|
40
|
+
expirationDateAt: {
|
|
41
|
+
...generalDefinitions.dateAt,
|
|
42
|
+
label: "有効期限",
|
|
43
|
+
default: null,
|
|
44
|
+
},
|
|
45
|
+
issueDateAt: {
|
|
46
|
+
...generalDefinitions.dateAt,
|
|
47
|
+
label: "取得日",
|
|
48
|
+
},
|
|
49
|
+
lossDateAt: {
|
|
50
|
+
...generalDefinitions.dateAt,
|
|
51
|
+
label: "資格喪失日",
|
|
52
|
+
default: null,
|
|
53
|
+
},
|
|
54
|
+
notificationSentAt: {
|
|
55
|
+
...generalDefinitions.dateAt,
|
|
56
|
+
label: "通知送信日時",
|
|
57
|
+
default: null,
|
|
58
|
+
},
|
|
59
|
+
periodOfStay: {
|
|
60
|
+
...generalDefinitions.dateAt,
|
|
61
|
+
label: "在留期間満了日",
|
|
62
|
+
},
|
|
63
|
+
};
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* フィールド定義のデフォルト値
|
|
3
|
+
* - `air-firebase` が提供する `FireModel (BaseClass)` において、クラスが保有するフィールドの定義および値の検証に使用されます。
|
|
4
|
+
* - `component` プロパティは `air-vuetify` の入力コンポーネント生成の為の属性として使用されます。
|
|
5
|
+
* 但し、required, label, hidden, length は入力コンポーネントの属性としても使用されます。
|
|
6
|
+
* - `validator` の返り値は原則オブジェクトです。文字列を返すこともでき、その文字列がエラーメッセージとして扱われますが多言語対応のためには
|
|
7
|
+
* オブジェクトを返すことを推奨します。
|
|
8
|
+
* 返り値が true/false の場合は、従来通りのバリデーション結果として扱われます。
|
|
9
|
+
* @key {String|Number|Boolean|Object|Array|Date} type - データの型
|
|
10
|
+
* @key {any} default - 既定値
|
|
11
|
+
* @key {String} label - フィールドのラベル
|
|
12
|
+
* @key {Number} length - 入力可能な最大文字数(文字列型の場合)
|
|
13
|
+
* @key {Boolean} required - 入力必須かどうか
|
|
14
|
+
* @key {Boolean} hidden - フィールドをUI上で非表示にするかどうか
|
|
15
|
+
* @key {Function} validator - フィールドの値を検証する関数。引数に値を取り、エラーメッセージを返すか、true/falseで検証結果を返す。
|
|
16
|
+
* @key {Object} component - フィールドに対応するUIコンポーネントの定義
|
|
17
|
+
* @key {String} component.name - 使用するコンポーネントの名前(AirVuetifyコンポーネントのみ指定可能)
|
|
18
|
+
* @key {Object} component.attrs - コンポーネントに渡す属性の定義
|
|
19
|
+
*/
|
|
20
|
+
export const defaultDefinition = {
|
|
21
|
+
type: String,
|
|
22
|
+
default: null,
|
|
23
|
+
label: undefined,
|
|
24
|
+
length: undefined,
|
|
25
|
+
required: undefined,
|
|
26
|
+
hidden: undefined,
|
|
27
|
+
validator: undefined,
|
|
28
|
+
component: {
|
|
29
|
+
name: undefined,
|
|
30
|
+
attrs: {},
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/** 汎用パーツ */
|
|
35
|
+
export const generalDefinitions = {
|
|
36
|
+
array: {
|
|
37
|
+
...defaultDefinition,
|
|
38
|
+
type: Array,
|
|
39
|
+
default: () => [],
|
|
40
|
+
component: { name: "air-select", attrs: { multiple: true } },
|
|
41
|
+
},
|
|
42
|
+
check: {
|
|
43
|
+
...defaultDefinition,
|
|
44
|
+
type: Boolean,
|
|
45
|
+
default: false,
|
|
46
|
+
component: { name: "air-checkbox", attrs: {} },
|
|
47
|
+
},
|
|
48
|
+
code: {
|
|
49
|
+
...defaultDefinition,
|
|
50
|
+
length: 10,
|
|
51
|
+
component: { name: "air-text-field", attrs: { inputType: "alphanumeric" } },
|
|
52
|
+
},
|
|
53
|
+
// 日付(00時固定としたDateオブジェクトとして使用する)
|
|
54
|
+
dateAt: {
|
|
55
|
+
...defaultDefinition,
|
|
56
|
+
type: Object,
|
|
57
|
+
label: "日付",
|
|
58
|
+
default: () => {
|
|
59
|
+
const date = new Date();
|
|
60
|
+
date.setHours(0, 0, 0, 0);
|
|
61
|
+
return date;
|
|
62
|
+
},
|
|
63
|
+
component: {
|
|
64
|
+
name: "air-date-input",
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
// 日時(時刻までを含んだDateオブジェクト)
|
|
68
|
+
dateTimeAt: {
|
|
69
|
+
...defaultDefinition,
|
|
70
|
+
type: Object,
|
|
71
|
+
label: "日時",
|
|
72
|
+
default: null,
|
|
73
|
+
component: { name: "air-date-time-picker-input", attrs: {} },
|
|
74
|
+
},
|
|
75
|
+
multipleLine: {
|
|
76
|
+
...defaultDefinition,
|
|
77
|
+
length: 200,
|
|
78
|
+
component: {
|
|
79
|
+
name: "air-textarea",
|
|
80
|
+
attrs: { counter: true, maxlength: 200 },
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
number: {
|
|
84
|
+
...defaultDefinition,
|
|
85
|
+
type: Number,
|
|
86
|
+
component: {
|
|
87
|
+
name: "air-number-input",
|
|
88
|
+
attrs: {
|
|
89
|
+
controlVariant: "split",
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
object: {
|
|
94
|
+
...defaultDefinition,
|
|
95
|
+
type: Object,
|
|
96
|
+
component: { name: "air-select" }, // `AirTextField` that is used as default ui component could not handle object type.
|
|
97
|
+
},
|
|
98
|
+
oneLine: {
|
|
99
|
+
...defaultDefinition,
|
|
100
|
+
component: { name: "air-text-field", attrs: {} },
|
|
101
|
+
},
|
|
102
|
+
radio: {
|
|
103
|
+
...defaultDefinition,
|
|
104
|
+
component: { name: "air-radio-group", attrs: {} },
|
|
105
|
+
},
|
|
106
|
+
select: {
|
|
107
|
+
...defaultDefinition,
|
|
108
|
+
component: { name: "air-select", attrs: {} },
|
|
109
|
+
},
|
|
110
|
+
// 時刻文字列
|
|
111
|
+
time: {
|
|
112
|
+
...defaultDefinition,
|
|
113
|
+
label: "時刻",
|
|
114
|
+
component: {
|
|
115
|
+
name: "air-time-picker-input",
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { generalDefinitions } from "./defaultDefinition.js";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* MULTIPLE LINE型のフィールド定義
|
|
5
|
+
*/
|
|
6
|
+
export const multipleLineFields = {
|
|
7
|
+
multipleLine: generalDefinitions.multipleLine,
|
|
8
|
+
notificationError: {
|
|
9
|
+
...generalDefinitions.multipleLine,
|
|
10
|
+
label: "通知送信エラー",
|
|
11
|
+
},
|
|
12
|
+
remarks: {
|
|
13
|
+
...generalDefinitions.multipleLine,
|
|
14
|
+
label: "備考",
|
|
15
|
+
},
|
|
16
|
+
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { generalDefinitions } from "./defaultDefinition.js";
|
|
2
|
+
import { DEFAULT_BREAK_MINUTES, DEFAULT_WORKING_MINUTES } from "./constants.js";
|
|
3
|
+
import { VALIDATION_ERRORS } from "../../errorDefinitions.js";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* NUMBER型のフィールド定義
|
|
7
|
+
*/
|
|
8
|
+
export const numberFields = {
|
|
9
|
+
number: generalDefinitions.number,
|
|
10
|
+
breakMinutes: {
|
|
11
|
+
...generalDefinitions.number,
|
|
12
|
+
label: "休憩時間(分)",
|
|
13
|
+
default: DEFAULT_BREAK_MINUTES,
|
|
14
|
+
validator: (v) => {
|
|
15
|
+
if (v < 0) {
|
|
16
|
+
return VALIDATION_ERRORS.MIN_VALUE_ERROR(0);
|
|
17
|
+
}
|
|
18
|
+
return true;
|
|
19
|
+
},
|
|
20
|
+
component: {
|
|
21
|
+
...generalDefinitions.number.component,
|
|
22
|
+
attrs: {
|
|
23
|
+
...generalDefinitions.number.component.attrs,
|
|
24
|
+
min: 0,
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
overtimeWorkMinutes: {
|
|
29
|
+
...generalDefinitions.number,
|
|
30
|
+
label: "残業時間(分)",
|
|
31
|
+
default: 0,
|
|
32
|
+
validator: (v) => {
|
|
33
|
+
if (v < 0) {
|
|
34
|
+
return VALIDATION_ERRORS.MIN_VALUE_ERROR(0);
|
|
35
|
+
}
|
|
36
|
+
return true;
|
|
37
|
+
},
|
|
38
|
+
component: {
|
|
39
|
+
...generalDefinitions.number.component,
|
|
40
|
+
attrs: {
|
|
41
|
+
...generalDefinitions.number.component.attrs,
|
|
42
|
+
min: 0,
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
regulationWorkMinutes: {
|
|
47
|
+
...generalDefinitions.number,
|
|
48
|
+
label: "規定実働時間(分)",
|
|
49
|
+
default: DEFAULT_WORKING_MINUTES,
|
|
50
|
+
validator: (v) => {
|
|
51
|
+
if (v < 0) {
|
|
52
|
+
return VALIDATION_ERRORS.MIN_VALUE_ERROR(0);
|
|
53
|
+
}
|
|
54
|
+
return true;
|
|
55
|
+
},
|
|
56
|
+
component: {
|
|
57
|
+
...generalDefinitions.number.component,
|
|
58
|
+
attrs: {
|
|
59
|
+
...generalDefinitions.number.component.attrs,
|
|
60
|
+
min: 0,
|
|
61
|
+
persistentHint: true,
|
|
62
|
+
hint: "この時間を超えると残業扱いになります。",
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
price: {
|
|
67
|
+
...generalDefinitions.number,
|
|
68
|
+
},
|
|
69
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { generalDefinitions } from "./defaultDefinition.js";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* OBJECT型のフィールド定義
|
|
5
|
+
*/
|
|
6
|
+
export const objectFields = {
|
|
7
|
+
object: generalDefinitions.object,
|
|
8
|
+
customer: {
|
|
9
|
+
...generalDefinitions.object,
|
|
10
|
+
label: "取引先",
|
|
11
|
+
component: {
|
|
12
|
+
name: "air-autocomplete-api",
|
|
13
|
+
attrs: {
|
|
14
|
+
cacheItems: true,
|
|
15
|
+
clearable: true,
|
|
16
|
+
itemTitle: "name",
|
|
17
|
+
itemValue: "docId",
|
|
18
|
+
returnObject: true,
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
employmentInsurance: {
|
|
23
|
+
...generalDefinitions.object,
|
|
24
|
+
label: "雇用保険",
|
|
25
|
+
},
|
|
26
|
+
healthInsurance: {
|
|
27
|
+
...generalDefinitions.object,
|
|
28
|
+
label: "健康保険",
|
|
29
|
+
},
|
|
30
|
+
pensionInsurance: {
|
|
31
|
+
...generalDefinitions.object,
|
|
32
|
+
label: "厚生年金保険",
|
|
33
|
+
},
|
|
34
|
+
location: {
|
|
35
|
+
...generalDefinitions.object,
|
|
36
|
+
hidden: true,
|
|
37
|
+
},
|
|
38
|
+
};
|