@platform-modules/foreign-ministry 1.3.10 → 1.3.12

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.
@@ -15,6 +15,7 @@ export declare class DiplomaticWorkFlow extends BaseModel {
15
15
  step_order: number | null;
16
16
  diplomatic_approval_id: number | null;
17
17
  approved_by_role_id: number | null;
18
+ diplomatic_title_id: number | null;
18
19
  diplomaticRequest?: DiplomaticRequests;
19
20
  constructor(diplomatic_request_id: number, content: string, status: DiplomaticWorkFlowStatus, user_id: number | null, step_order: number | null);
20
21
  }
@@ -66,6 +66,10 @@ __decorate([
66
66
  (0, typeorm_1.Column)({ type: 'int', nullable: true }),
67
67
  __metadata("design:type", Object)
68
68
  ], DiplomaticWorkFlow.prototype, "approved_by_role_id", void 0);
69
+ __decorate([
70
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
71
+ __metadata("design:type", Object)
72
+ ], DiplomaticWorkFlow.prototype, "diplomatic_title_id", void 0);
69
73
  __decorate([
70
74
  (0, typeorm_1.ManyToOne)(() => DiplomaticRequestsModel_1.DiplomaticRequests, dr => dr.workflows),
71
75
  (0, typeorm_1.JoinColumn)({ name: 'diplomatic_request_id' }),
@@ -86,7 +86,7 @@ __decorate([
86
86
  __metadata("design:type", Object)
87
87
  ], GatePassVisitors.prototype, "visitor_photo_file_name", void 0);
88
88
  __decorate([
89
- (0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: true }),
89
+ (0, typeorm_1.Column)({ type: 'text', nullable: true }),
90
90
  __metadata("design:type", Object)
91
91
  ], GatePassVisitors.prototype, "qr_code_url", void 0);
92
92
  __decorate([
@@ -35,5 +35,6 @@ export declare class RetiredCardRequests extends BaseModel {
35
35
  access_type: RetiredCardAccessType;
36
36
  photo_url: string | null;
37
37
  photo_file_name: string | null;
38
- constructor(user_id: number, req_user_department_id: number | null, req_user_section_id: number | null, service_id: number | null, sub_service_id: number | null, status: RetiredCardRequestStatus, workflow_execution_id: string | null, ex_job_title: string | null, date_of_retirement: Date | null, date_of_issue: Date | null, reason_for_request: string | null, access_type: RetiredCardAccessType, photo_url: string | null, photo_file_name: string | null);
38
+ request_type: string;
39
+ constructor(user_id: number, req_user_department_id: number | null, req_user_section_id: number | null, service_id: number | null, sub_service_id: number | null, status: RetiredCardRequestStatus, workflow_execution_id: string | null, ex_job_title: string | null, date_of_retirement: Date | null, date_of_issue: Date | null, reason_for_request: string | null, access_type: RetiredCardAccessType, photo_url: string | null, photo_file_name: string | null, request_type?: string);
39
40
  }
@@ -36,7 +36,7 @@ var RetiredCardAccessType;
36
36
  * Only for people with "Ambassador" diplomatic title
37
37
  */
38
38
  let RetiredCardRequests = class RetiredCardRequests extends BaseModel_1.BaseModel {
39
- constructor(user_id, req_user_department_id, req_user_section_id, service_id, sub_service_id, status, workflow_execution_id, ex_job_title, date_of_retirement, date_of_issue, reason_for_request, access_type, photo_url, photo_file_name) {
39
+ constructor(user_id, req_user_department_id, req_user_section_id, service_id, sub_service_id, status, workflow_execution_id, ex_job_title, date_of_retirement, date_of_issue, reason_for_request, access_type, photo_url, photo_file_name, request_type = 'self') {
40
40
  super();
41
41
  this.user_id = user_id;
42
42
  this.req_user_department_id = req_user_department_id;
@@ -52,6 +52,7 @@ let RetiredCardRequests = class RetiredCardRequests extends BaseModel_1.BaseMode
52
52
  this.access_type = access_type;
53
53
  this.photo_url = photo_url;
54
54
  this.photo_file_name = photo_file_name;
55
+ this.request_type = request_type;
55
56
  }
56
57
  };
57
58
  exports.RetiredCardRequests = RetiredCardRequests;
@@ -111,7 +112,11 @@ __decorate([
111
112
  (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
112
113
  __metadata("design:type", Object)
113
114
  ], RetiredCardRequests.prototype, "photo_file_name", void 0);
115
+ __decorate([
116
+ (0, typeorm_1.Column)({ type: 'varchar', length: 20, default: 'self', nullable: false }),
117
+ __metadata("design:type", String)
118
+ ], RetiredCardRequests.prototype, "request_type", void 0);
114
119
  exports.RetiredCardRequests = RetiredCardRequests = __decorate([
115
120
  (0, typeorm_1.Entity)({ name: 'retired_card_requests' }),
116
- __metadata("design:paramtypes", [Number, Object, Object, Object, Object, String, Object, Object, Object, Object, Object, String, Object, Object])
121
+ __metadata("design:paramtypes", [Number, Object, Object, Object, Object, String, Object, Object, Object, Object, Object, String, Object, Object, String])
117
122
  ], RetiredCardRequests);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platform-modules/foreign-ministry",
3
- "version": "1.3.10",
3
+ "version": "1.3.12",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {
@@ -37,6 +37,9 @@ export class DiplomaticWorkFlow extends BaseModel {
37
37
  @Column({ type: 'int', nullable: true })
38
38
  approved_by_role_id: number | null;
39
39
 
40
+ @Column({ type: 'int', nullable: true })
41
+ diplomatic_title_id: number | null;
42
+
40
43
  @ManyToOne(() => DiplomaticRequests, dr => dr.workflows)
41
44
  @JoinColumn({ name: 'diplomatic_request_id' })
42
45
  diplomaticRequest?: DiplomaticRequests;
@@ -47,8 +47,8 @@ export class GatePassVisitors extends BaseModel {
47
47
  visitor_photo_file_name: string | null;
48
48
 
49
49
  // QR Code for Gate Pass
50
- @Column({ type: 'varchar', length: 500, nullable: true })
51
- qr_code_url: string | null; // QR code URL for this visitor
50
+ @Column({ type: 'text', nullable: true })
51
+ qr_code_url: string | null; // QR code URL for this visitor (data URL can be 6000+ characters)
52
52
 
53
53
  @Column({ type: 'text', nullable: true })
54
54
  qr_code_data: string | null; // QR code data (JSON string)
@@ -73,6 +73,10 @@ export class RetiredCardRequests extends BaseModel {
73
73
  @Column({ type: 'varchar', length: 255, nullable: true })
74
74
  photo_file_name: string | null;
75
75
 
76
+ // Request Type - 'self' for Ambassador self-request, 'on_behalf' for HR request
77
+ @Column({ type: 'varchar', length: 20, default: 'self', nullable: false })
78
+ request_type: string;
79
+
76
80
  constructor(
77
81
  user_id: number,
78
82
  req_user_department_id: number | null,
@@ -87,7 +91,8 @@ export class RetiredCardRequests extends BaseModel {
87
91
  reason_for_request: string | null,
88
92
  access_type: RetiredCardAccessType,
89
93
  photo_url: string | null,
90
- photo_file_name: string | null
94
+ photo_file_name: string | null,
95
+ request_type: string = 'self'
91
96
  ) {
92
97
  super();
93
98
  this.user_id = user_id;
@@ -104,6 +109,7 @@ export class RetiredCardRequests extends BaseModel {
104
109
  this.access_type = access_type;
105
110
  this.photo_url = photo_url;
106
111
  this.photo_file_name = photo_file_name;
112
+ this.request_type = request_type;
107
113
  }
108
114
  }
109
115