@shisyamo4131/air-guard-v2-schemas 2.3.7-dev.32 → 2.3.7-dev.34

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 CHANGED
@@ -1,6 +1,7 @@
1
1
  export { default as Agreement } from "./src/Agreement.js";
2
2
  export { default as ArrangementNotification } from "./src/ArrangementNotification.js";
3
3
  export { default as Billing } from "./src/Billing.js";
4
+ export { default as Certification } from "./src/Certification.js";
4
5
  export { default as Company } from "./src/Company.js";
5
6
  export { default as Customer, CustomerMinimal } from "./src/Customer.js";
6
7
  export { default as CutoffDate } from "./src/utils/CutoffDate.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shisyamo4131/air-guard-v2-schemas",
3
- "version": "2.3.7-dev.32",
3
+ "version": "2.3.7-dev.34",
4
4
  "description": "Schemas for AirGuard V2",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Certification Model
3
+ * @version 1.0.0
4
+ * @author shisyamo4131
5
+ * @description 警備業務資格モデル
6
+ */
7
+ import { BaseClass } from "@shisyamo4131/air-firebase-v2";
8
+ import { defField } from "./parts/fieldDefinitions.js";
9
+
10
+ const classProps = {
11
+ name: defField("name", { label: "資格名", required: true }),
12
+ type: defField("certificationType", { required: true }),
13
+ issuedBy: defField("name", { label: "発行元" }),
14
+ issueDateAt: defField("dateAt", { label: "取得日" }),
15
+ expirationDateAt: defField("dateAt", { label: "有効期限" }),
16
+ serialNumber: defField("oneLine", { label: "証明書番号" }),
17
+ };
18
+
19
+ /**
20
+ * @prop {string} name - 資格名
21
+ * @prop {string} type - 資格種別 (CERTIFICATION_TYPE_VALUES)
22
+ * @prop {string} issuedBy - 発行元
23
+ * @prop {Date} issueDateAt - 取得日
24
+ * @prop {Date} expirationDateAt - 有効期限
25
+ * @prop {string} serialNumber - 証明書番号
26
+ */
27
+ export default class Certification extends BaseClass {
28
+ static className = "資格";
29
+ static classProps = classProps;
30
+ }
package/src/Employee.js CHANGED
@@ -8,6 +8,7 @@ import { defField } from "./parts/fieldDefinitions.js";
8
8
  import { defAccessor } from "./parts/accessorDefinitions.js";
9
9
  import { VALUES as EMPLOYMENT_STATUS_VALUES } from "./constants/employment-status.js";
10
10
  import { VALUES as BLOOD_TYPE_VALUES } from "./constants/blood-type.js";
11
+ import Certification from "./Certification.js";
11
12
 
12
13
  const classProps = {
13
14
  code: defField("code", { label: "従業員コード" }),
@@ -154,7 +155,7 @@ const classProps = {
154
155
  },
155
156
  },
156
157
  }),
157
-
158
+ securityCertificatoions: defField("array", { customClass: Certification }),
158
159
  remarks: defField("remarks"),
159
160
  };
160
161
 
@@ -194,6 +195,7 @@ const classProps = {
194
195
  * @prop {string} emergencyContactAddress - Emergency contact address.
195
196
  * @prop {string} emergencyContactPhone - Emergency contact phone number.
196
197
  * @prop {string} domicile - Domicile.
198
+ * @prop {Array<Certification>} securityCertifications - Array of security certifications.
197
199
  * @prop {string} remarks - Additional remarks.
198
200
  *
199
201
  * @prop {string} fullName - Full name combining last and first names (read-only)
@@ -0,0 +1,34 @@
1
+ /**
2
+ * @file src/constants/certification-type.js
3
+ * @description 警備業務資格の種別定義
4
+ *
5
+ * 警備業法に基づく4号区分:
6
+ * - 1号警備業務:施設警備業務
7
+ * - 2号警備業務:交通誘導警備業務、雑踏警備業務
8
+ * - 3号警備業務:貴重品運搬警備業務、核燃料物質等危険物運搬警備業務
9
+ * - 4号警備業務:身辺警備業務
10
+ *
11
+ * 実務上の考慮事項:
12
+ * - 現場ごとに必要な資格タイプが異なる
13
+ * - 1級保有者は2級の業務も対応可能(包括関係)
14
+ * - ユーザビリティを考慮し、タイプ単位で管理
15
+ */
16
+
17
+ // prettier-ignore
18
+ export const VALUES = Object.freeze({
19
+ FACILITY: { title: "施設警備", value: "FACILITY" }, // 1号
20
+ TRAFFIC: { title: "交通誘導警備", value: "TRAFFIC" }, // 2号
21
+ CROWD: { title: "雑踏警備", value: "CROWD" }, // 2号
22
+ VALUABLES: { title: "貴重品運搬警備", value: "VALUABLES" }, // 3号
23
+ BODYGUARD: { title: "身辺警備", value: "BODYGUARD" }, // 4号
24
+ OTHER: { title: "その他", value: "OTHER" },
25
+ });
26
+
27
+ export const OPTIONS = [
28
+ { title: VALUES.FACILITY.title, value: VALUES.FACILITY.value },
29
+ { title: VALUES.TRAFFIC.title, value: VALUES.TRAFFIC.value },
30
+ { title: VALUES.CROWD.title, value: VALUES.CROWD.value },
31
+ { title: VALUES.VALUABLES.title, value: VALUES.VALUABLES.value },
32
+ { title: VALUES.BODYGUARD.title, value: VALUES.BODYGUARD.value },
33
+ { title: VALUES.OTHER.title, value: VALUES.OTHER.value },
34
+ ];
@@ -6,6 +6,10 @@ import {
6
6
  VALUES as BLOOD_TYPE_VALUES,
7
7
  OPTIONS as BLOOD_TYPE_OPTIONS,
8
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";
9
13
  import {
10
14
  VALUES as CONTRACT_STATUS_VALUES,
11
15
  OPTIONS as CONTRACT_STATUS_OPTIONS,
@@ -510,6 +514,17 @@ export const fieldDefinitions = {
510
514
  },
511
515
  },
512
516
  },
517
+ certificationType: {
518
+ ...generalDefinitions.select,
519
+ label: "資格種別",
520
+ default: null,
521
+ component: {
522
+ name: generalDefinitions.select.component.name,
523
+ attrs: {
524
+ items: CERTIFICATION_TYPE_OPTIONS,
525
+ },
526
+ },
527
+ },
513
528
  // contractStatus -> Used in Customer.js and Outsourcer.js
514
529
  contractStatus: {
515
530
  ...generalDefinitions.select,