@shisyamo4131/air-guard-v2-schemas 2.3.7-dev.30 → 2.3.7-dev.32
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/Employee.js +28 -28
- package/src/Site.js +10 -13
package/package.json
CHANGED
package/src/Employee.js
CHANGED
|
@@ -33,9 +33,9 @@ const classProps = {
|
|
|
33
33
|
default: null,
|
|
34
34
|
component: {
|
|
35
35
|
attrs: {
|
|
36
|
-
required: (item) =>
|
|
36
|
+
required: ({ item }) =>
|
|
37
37
|
item.employmentStatus === EMPLOYMENT_STATUS_VALUES.TERMINATED.value,
|
|
38
|
-
disabled: (item) =>
|
|
38
|
+
disabled: ({ item }) =>
|
|
39
39
|
item.employmentStatus !== EMPLOYMENT_STATUS_VALUES.TERMINATED.value,
|
|
40
40
|
},
|
|
41
41
|
},
|
|
@@ -43,9 +43,9 @@ const classProps = {
|
|
|
43
43
|
reasonOfTermination: defField("reasonOfTermination", {
|
|
44
44
|
component: {
|
|
45
45
|
attrs: {
|
|
46
|
-
required: (item) =>
|
|
46
|
+
required: ({ item }) =>
|
|
47
47
|
item.employmentStatus === EMPLOYMENT_STATUS_VALUES.TERMINATED.value,
|
|
48
|
-
disabled: (item) =>
|
|
48
|
+
disabled: ({ item }) =>
|
|
49
49
|
item.employmentStatus !== EMPLOYMENT_STATUS_VALUES.TERMINATED.value,
|
|
50
50
|
},
|
|
51
51
|
},
|
|
@@ -56,32 +56,32 @@ const classProps = {
|
|
|
56
56
|
foreignName: defField("foreignName", {
|
|
57
57
|
component: {
|
|
58
58
|
attrs: {
|
|
59
|
-
required: (item) => item.isForeigner,
|
|
60
|
-
disabled: (item) => !item.isForeigner,
|
|
59
|
+
required: ({ item }) => item.isForeigner,
|
|
60
|
+
disabled: ({ item }) => !item.isForeigner,
|
|
61
61
|
},
|
|
62
62
|
},
|
|
63
63
|
}),
|
|
64
64
|
nationality: defField("nationality", {
|
|
65
65
|
component: {
|
|
66
66
|
attrs: {
|
|
67
|
-
required: (item) => item.isForeigner,
|
|
68
|
-
disabled: (item) => !item.isForeigner,
|
|
67
|
+
required: ({ item }) => item.isForeigner,
|
|
68
|
+
disabled: ({ item }) => !item.isForeigner,
|
|
69
69
|
},
|
|
70
70
|
},
|
|
71
71
|
}),
|
|
72
72
|
residenceStatus: defField("residenceStatus", {
|
|
73
73
|
component: {
|
|
74
74
|
attrs: {
|
|
75
|
-
required: (item) => item.isForeigner,
|
|
76
|
-
disabled: (item) => !item.isForeigner,
|
|
75
|
+
required: ({ item }) => item.isForeigner,
|
|
76
|
+
disabled: ({ item }) => !item.isForeigner,
|
|
77
77
|
},
|
|
78
78
|
},
|
|
79
79
|
}),
|
|
80
80
|
periodOfStay: defField("periodOfStay", {
|
|
81
81
|
component: {
|
|
82
82
|
attrs: {
|
|
83
|
-
required: (item) => item.isForeigner,
|
|
84
|
-
disabled: (item) => !item.isForeigner,
|
|
83
|
+
required: ({ item }) => item.isForeigner,
|
|
84
|
+
disabled: ({ item }) => !item.isForeigner,
|
|
85
85
|
},
|
|
86
86
|
},
|
|
87
87
|
}),
|
|
@@ -93,64 +93,64 @@ const classProps = {
|
|
|
93
93
|
default: null,
|
|
94
94
|
component: {
|
|
95
95
|
attrs: {
|
|
96
|
-
required: (item) => item.hasSecurityGuardRegistration,
|
|
97
|
-
disabled: (item) => !item.hasSecurityGuardRegistration,
|
|
96
|
+
required: ({ item }) => item.hasSecurityGuardRegistration,
|
|
97
|
+
disabled: ({ item }) => !item.hasSecurityGuardRegistration,
|
|
98
98
|
},
|
|
99
99
|
},
|
|
100
100
|
}),
|
|
101
101
|
bloodType: defField("bloodType", {
|
|
102
102
|
component: {
|
|
103
103
|
attrs: {
|
|
104
|
-
required: (item) => item.hasSecurityGuardRegistration,
|
|
105
|
-
disabled: (item) => !item.hasSecurityGuardRegistration,
|
|
104
|
+
required: ({ item }) => item.hasSecurityGuardRegistration,
|
|
105
|
+
disabled: ({ item }) => !item.hasSecurityGuardRegistration,
|
|
106
106
|
},
|
|
107
107
|
},
|
|
108
108
|
}),
|
|
109
109
|
emergencyContactName: defField("emergencyContactName", {
|
|
110
110
|
component: {
|
|
111
111
|
attrs: {
|
|
112
|
-
required: (item) => item.hasSecurityGuardRegistration,
|
|
113
|
-
disabled: (item) => !item.hasSecurityGuardRegistration,
|
|
112
|
+
required: ({ item }) => item.hasSecurityGuardRegistration,
|
|
113
|
+
disabled: ({ item }) => !item.hasSecurityGuardRegistration,
|
|
114
114
|
},
|
|
115
115
|
},
|
|
116
116
|
}),
|
|
117
117
|
emergencyContactRelation: defField("emergencyContactRelation", {
|
|
118
118
|
component: {
|
|
119
119
|
attrs: {
|
|
120
|
-
required: (item) => item.hasSecurityGuardRegistration,
|
|
121
|
-
disabled: (item) => !item.hasSecurityGuardRegistration,
|
|
120
|
+
required: ({ item }) => item.hasSecurityGuardRegistration,
|
|
121
|
+
disabled: ({ item }) => !item.hasSecurityGuardRegistration,
|
|
122
122
|
},
|
|
123
123
|
},
|
|
124
124
|
}),
|
|
125
125
|
emergencyContactRelationDetail: defField("emergencyContactRelationDetail", {
|
|
126
126
|
component: {
|
|
127
127
|
attrs: {
|
|
128
|
-
required: (item) => item.hasSecurityGuardRegistration,
|
|
129
|
-
disabled: (item) => !item.hasSecurityGuardRegistration,
|
|
128
|
+
required: ({ item }) => item.hasSecurityGuardRegistration,
|
|
129
|
+
disabled: ({ item }) => !item.hasSecurityGuardRegistration,
|
|
130
130
|
},
|
|
131
131
|
},
|
|
132
132
|
}),
|
|
133
133
|
emergencyContactAddress: defField("emergencyContactAddress", {
|
|
134
134
|
component: {
|
|
135
135
|
attrs: {
|
|
136
|
-
required: (item) => item.hasSecurityGuardRegistration,
|
|
137
|
-
disabled: (item) => !item.hasSecurityGuardRegistration,
|
|
136
|
+
required: ({ item }) => item.hasSecurityGuardRegistration,
|
|
137
|
+
disabled: ({ item }) => !item.hasSecurityGuardRegistration,
|
|
138
138
|
},
|
|
139
139
|
},
|
|
140
140
|
}),
|
|
141
141
|
emergencyContactPhone: defField("emergencyContactPhone", {
|
|
142
142
|
component: {
|
|
143
143
|
attrs: {
|
|
144
|
-
required: (item) => item.hasSecurityGuardRegistration,
|
|
145
|
-
disabled: (item) => !item.hasSecurityGuardRegistration,
|
|
144
|
+
required: ({ item }) => item.hasSecurityGuardRegistration,
|
|
145
|
+
disabled: ({ item }) => !item.hasSecurityGuardRegistration,
|
|
146
146
|
},
|
|
147
147
|
},
|
|
148
148
|
}),
|
|
149
149
|
domicile: defField("domicile", {
|
|
150
150
|
component: {
|
|
151
151
|
attrs: {
|
|
152
|
-
required: (item) => item.hasSecurityGuardRegistration,
|
|
153
|
-
disabled: (item) => !item.hasSecurityGuardRegistration,
|
|
152
|
+
required: ({ item }) => item.hasSecurityGuardRegistration,
|
|
153
|
+
disabled: ({ item }) => !item.hasSecurityGuardRegistration,
|
|
154
154
|
},
|
|
155
155
|
},
|
|
156
156
|
}),
|
package/src/Site.js
CHANGED
|
@@ -16,24 +16,21 @@ import { default as FireModel } from "@shisyamo4131/air-firebase-v2";
|
|
|
16
16
|
import { defField } from "./parts/fieldDefinitions.js";
|
|
17
17
|
import { defAccessor } from "./parts/accessorDefinitions.js";
|
|
18
18
|
import Customer from "./Customer.js";
|
|
19
|
-
// import { CustomerMinimal } from "./Customer.js";
|
|
20
|
-
// import { fetchDocsApi } from "./apis/index.js";
|
|
21
19
|
import Agreement from "./Agreement.js";
|
|
22
20
|
import { VALUES } from "./constants/site-status.js";
|
|
23
21
|
|
|
24
22
|
const classProps = {
|
|
25
|
-
customerId: defField("customerId", {
|
|
23
|
+
customerId: defField("customerId", {
|
|
24
|
+
required: true,
|
|
25
|
+
component: {
|
|
26
|
+
attrs: {
|
|
27
|
+
disabled: ({ editMode }) => {
|
|
28
|
+
return editMode !== "CREATE";
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
}),
|
|
26
33
|
customer: defField("customer", { hidden: true, customClass: Customer }),
|
|
27
|
-
// customer: defField("customer", {
|
|
28
|
-
// required: true,
|
|
29
|
-
// customClass: CustomerMinimal,
|
|
30
|
-
// component: {
|
|
31
|
-
// attrs: {
|
|
32
|
-
// api: () => fetchDocsApi(CustomerMinimal),
|
|
33
|
-
// noFilter: true,
|
|
34
|
-
// },
|
|
35
|
-
// },
|
|
36
|
-
// }),
|
|
37
34
|
code: defField("code", { label: "現場コード" }),
|
|
38
35
|
name: defField("name", {
|
|
39
36
|
label: "現場名",
|