plac-micro-common 1.3.41 → 1.3.42

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.
@@ -2,6 +2,7 @@ import { ApplicationEntity } from "./application.entity";
2
2
  import { _BaseEntity } from "../_base_entity";
3
3
  import { AppPersonRole, Gender, IdentifierType } from "../../types";
4
4
  import { CustomerEntity } from "../customer";
5
+ import { MaritalStatusEntity, NationalityEntity, OccupationEntity } from "../core";
5
6
  export declare class AppPersonEntity extends _BaseEntity {
6
7
  id: string;
7
8
  application_id: string;
@@ -17,6 +18,8 @@ export declare class AppPersonEntity extends _BaseEntity {
17
18
  gender?: Gender | null;
18
19
  date_of_birth?: string | null;
19
20
  nationality_id?: string | null;
21
+ marital_status_id?: string | null;
22
+ occupation_id?: string | null;
20
23
  identifier_type?: IdentifierType | null;
21
24
  identifier_no?: string | null;
22
25
  phone_number?: string | null;
@@ -27,4 +30,7 @@ export declare class AppPersonEntity extends _BaseEntity {
27
30
  is_active: boolean;
28
31
  application: ApplicationEntity;
29
32
  customer?: CustomerEntity | null;
33
+ occupation?: OccupationEntity | null;
34
+ marital_status?: MaritalStatusEntity | null;
35
+ nationality?: NationalityEntity | null;
30
36
  }
@@ -16,6 +16,7 @@ const _base_entity_1 = require("../_base_entity");
16
16
  const types_1 = require("../../types");
17
17
  const customer_1 = require("../customer");
18
18
  const utils_1 = require("../../utils");
19
+ const core_1 = require("../core");
19
20
  let AppPersonEntity = class AppPersonEntity extends _base_entity_1._BaseEntity {
20
21
  };
21
22
  exports.AppPersonEntity = AppPersonEntity;
@@ -83,6 +84,14 @@ __decorate([
83
84
  (0, typeorm_1.Column)({ type: "uuid", nullable: true }),
84
85
  __metadata("design:type", Object)
85
86
  ], AppPersonEntity.prototype, "nationality_id", void 0);
87
+ __decorate([
88
+ (0, typeorm_1.Column)({ type: "uuid", nullable: true }),
89
+ __metadata("design:type", Object)
90
+ ], AppPersonEntity.prototype, "marital_status_id", void 0);
91
+ __decorate([
92
+ (0, typeorm_1.Column)({ type: "uuid", nullable: true }),
93
+ __metadata("design:type", Object)
94
+ ], AppPersonEntity.prototype, "occupation_id", void 0);
86
95
  __decorate([
87
96
  (0, typeorm_1.Index)(),
88
97
  (0, typeorm_1.Column)({
@@ -136,6 +145,27 @@ __decorate([
136
145
  (0, typeorm_1.JoinColumn)({ name: "customer_id" }),
137
146
  __metadata("design:type", Object)
138
147
  ], AppPersonEntity.prototype, "customer", void 0);
148
+ __decorate([
149
+ (0, typeorm_1.ManyToOne)(() => core_1.OccupationEntity, { onDelete: "SET NULL", nullable: true }),
150
+ (0, typeorm_1.JoinColumn)({ name: "occupation_id" }),
151
+ __metadata("design:type", Object)
152
+ ], AppPersonEntity.prototype, "occupation", void 0);
153
+ __decorate([
154
+ (0, typeorm_1.ManyToOne)(() => core_1.MaritalStatusEntity, {
155
+ onDelete: "SET NULL",
156
+ nullable: true,
157
+ }),
158
+ (0, typeorm_1.JoinColumn)({ name: "marital_status_id" }),
159
+ __metadata("design:type", Object)
160
+ ], AppPersonEntity.prototype, "marital_status", void 0);
161
+ __decorate([
162
+ (0, typeorm_1.ManyToOne)(() => core_1.NationalityEntity, {
163
+ onDelete: "SET NULL",
164
+ nullable: true,
165
+ }),
166
+ (0, typeorm_1.JoinColumn)({ name: "nationality_id" }),
167
+ __metadata("design:type", Object)
168
+ ], AppPersonEntity.prototype, "nationality", void 0);
139
169
  exports.AppPersonEntity = AppPersonEntity = __decorate([
140
170
  (0, typeorm_1.Entity)({ schema: "application", name: "app_persons" }),
141
171
  (0, typeorm_1.Unique)("uq_app_person_role_seq", ["application_id", "role", "sequence_no"])
@@ -1,5 +1,8 @@
1
- import { AddressType, ContactType, Gender, IdentifierType } from "../../types";
1
+ import { AddressType, AppDocumentType, ApplicationActionType, AppPhLaRelation, ContactType, Gender, IdentifierType } from "../../types";
2
2
  export declare function getGenderDesc(val: Gender): "Male" | "Female";
3
+ export declare function getAppPhLaRelationDesc(val: AppPhLaRelation): "Same Person" | "Different Person";
3
4
  export declare function getIdentifierTypeDesc(val: IdentifierType): "National ID" | "Passport" | "Birth Certificate" | "Tax ID" | "Company Registration" | "Other";
4
5
  export declare function getContactTypeDesc(val: ContactType): "Other" | "Phone Number" | "Email" | "Website" | "Social Media";
5
6
  export declare function getAddressTypeDesc(val: AddressType): "Other" | "Home" | "Work" | "Billing";
7
+ export declare function getAppDocumentTypeDesc(val: AppDocumentType): "National ID" | "Passport" | "Other" | "Application Form" | "Quotation Form" | "Claim Form";
8
+ export declare function getAppActionTypeDesc(val: ApplicationActionType): ApplicationActionType.Created | ApplicationActionType.DraftSaved | ApplicationActionType.Completed | ApplicationActionType.TakenForReview | ApplicationActionType.Assigned | ApplicationActionType.Unassigned | ApplicationActionType.DocumentRemoved | ApplicationActionType.DataUpdated | "Submit" | "Re-Submit" | "Approve" | "Reject" | "Request Edit" | "Request More Documents" | "Cancel" | "Transfer" | "Add Note" | "Upload Document";
@@ -1,9 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getGenderDesc = getGenderDesc;
4
+ exports.getAppPhLaRelationDesc = getAppPhLaRelationDesc;
4
5
  exports.getIdentifierTypeDesc = getIdentifierTypeDesc;
5
6
  exports.getContactTypeDesc = getContactTypeDesc;
6
7
  exports.getAddressTypeDesc = getAddressTypeDesc;
8
+ exports.getAppDocumentTypeDesc = getAppDocumentTypeDesc;
9
+ exports.getAppActionTypeDesc = getAppActionTypeDesc;
7
10
  const types_1 = require("../../types");
8
11
  function getGenderDesc(val) {
9
12
  switch (val) {
@@ -15,6 +18,16 @@ function getGenderDesc(val) {
15
18
  return val;
16
19
  }
17
20
  }
21
+ function getAppPhLaRelationDesc(val) {
22
+ switch (val) {
23
+ case types_1.AppPhLaRelation.SamePerson:
24
+ return "Same Person";
25
+ case types_1.AppPhLaRelation.DifferentPerson:
26
+ return "Different Person";
27
+ default:
28
+ return val;
29
+ }
30
+ }
18
31
  function getIdentifierTypeDesc(val) {
19
32
  switch (val) {
20
33
  case types_1.IdentifierType.NationalId:
@@ -63,3 +76,47 @@ function getAddressTypeDesc(val) {
63
76
  return val;
64
77
  }
65
78
  }
79
+ function getAppDocumentTypeDesc(val) {
80
+ switch (val) {
81
+ case types_1.AppDocumentType.NationalId:
82
+ return "National ID";
83
+ case types_1.AppDocumentType.Passport:
84
+ return "Passport";
85
+ case types_1.AppDocumentType.ApplicationForm:
86
+ return "Application Form";
87
+ case types_1.AppDocumentType.QuotationForm:
88
+ return "Quotation Form";
89
+ case types_1.AppDocumentType.ClaimForm:
90
+ return "Claim Form";
91
+ case types_1.AppDocumentType.Other:
92
+ return "Other";
93
+ default:
94
+ return val;
95
+ }
96
+ }
97
+ function getAppActionTypeDesc(val) {
98
+ switch (val) {
99
+ case types_1.ApplicationActionType.Submitted:
100
+ return "Submit";
101
+ case types_1.ApplicationActionType.Resubmitted:
102
+ return "Re-Submit";
103
+ case types_1.ApplicationActionType.Approved:
104
+ return "Approve";
105
+ case types_1.ApplicationActionType.Rejected:
106
+ return "Reject";
107
+ case types_1.ApplicationActionType.EditRequested:
108
+ return "Request Edit";
109
+ case types_1.ApplicationActionType.MoreDocumentsRequested:
110
+ return "Request More Documents";
111
+ case types_1.ApplicationActionType.Cancelled:
112
+ return "Cancel";
113
+ case types_1.ApplicationActionType.Transferred:
114
+ return "Transfer";
115
+ case types_1.ApplicationActionType.NoteAdded:
116
+ return "Add Note";
117
+ case types_1.ApplicationActionType.DocumentUploaded:
118
+ return "Upload Document";
119
+ default:
120
+ return val;
121
+ }
122
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "plac-micro-common",
3
- "version": "1.3.41",
3
+ "version": "1.3.42",
4
4
  "types": "dist/index.d.ts",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {