@platform-modules/foreign-ministry 1.0.76 → 1.0.77

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.
@@ -10,11 +10,8 @@ export declare class FinancialApprovals extends BaseModel {
10
10
  level: number;
11
11
  approver_user_id: number;
12
12
  approver_role_id: number;
13
- approver_name: string;
14
13
  comment: string;
15
14
  approval_status: FinancialApprovalStatus;
16
15
  action_date: Date;
17
- sla_days: number;
18
- is_overdue: boolean;
19
16
  constructor(financial_request_id: number, level: number, approver_role_id: number, approval_status: FinancialApprovalStatus);
20
17
  }
@@ -26,7 +26,6 @@ let FinancialApprovals = class FinancialApprovals extends BaseModel_1.BaseModel
26
26
  this.level = level;
27
27
  this.approver_role_id = approver_role_id;
28
28
  this.approval_status = approval_status;
29
- this.is_overdue = false;
30
29
  }
31
30
  };
32
31
  exports.FinancialApprovals = FinancialApprovals;
@@ -46,10 +45,6 @@ __decorate([
46
45
  (0, typeorm_1.Column)({ type: 'int' }),
47
46
  __metadata("design:type", Number)
48
47
  ], FinancialApprovals.prototype, "approver_role_id", void 0);
49
- __decorate([
50
- (0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
51
- __metadata("design:type", String)
52
- ], FinancialApprovals.prototype, "approver_name", void 0);
53
48
  __decorate([
54
49
  (0, typeorm_1.Column)({ type: 'text', nullable: true }),
55
50
  __metadata("design:type", String)
@@ -59,17 +54,9 @@ __decorate([
59
54
  __metadata("design:type", String)
60
55
  ], FinancialApprovals.prototype, "approval_status", void 0);
61
56
  __decorate([
62
- (0, typeorm_1.Column)({ type: 'datetime', nullable: true }),
57
+ (0, typeorm_1.Column)({ type: 'timestamp', nullable: true }),
63
58
  __metadata("design:type", Date)
64
59
  ], FinancialApprovals.prototype, "action_date", void 0);
65
- __decorate([
66
- (0, typeorm_1.Column)({ type: 'int', nullable: true }),
67
- __metadata("design:type", Number)
68
- ], FinancialApprovals.prototype, "sla_days", void 0);
69
- __decorate([
70
- (0, typeorm_1.Column)({ type: 'boolean', default: false }),
71
- __metadata("design:type", Boolean)
72
- ], FinancialApprovals.prototype, "is_overdue", void 0);
73
60
  exports.FinancialApprovals = FinancialApprovals = __decorate([
74
61
  (0, typeorm_1.Entity)({ name: 'financial_approvals' }),
75
62
  __metadata("design:paramtypes", [Number, Number, Number, String])
@@ -18,6 +18,7 @@ let FinancialAttachments = class FinancialAttachments extends BaseModel_1.BaseMo
18
18
  this.financial_request_id = financial_request_id;
19
19
  this.file_url = file_url;
20
20
  this.file_name = file_name;
21
+ this.file_type = 'PDF';
21
22
  }
22
23
  };
23
24
  exports.FinancialAttachments = FinancialAttachments;
@@ -74,7 +74,7 @@ __decorate([
74
74
  __metadata("design:type", Number)
75
75
  ], FinancialRequests.prototype, "request_type_id", void 0);
76
76
  __decorate([
77
- (0, typeorm_1.Column)({ type: 'datetime', default: () => 'CURRENT_TIMESTAMP' }),
77
+ (0, typeorm_1.Column)({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' }),
78
78
  __metadata("design:type", Date)
79
79
  ], FinancialRequests.prototype, "request_date", void 0);
80
80
  __decorate([
@@ -82,7 +82,7 @@ __decorate([
82
82
  __metadata("design:type", String)
83
83
  ], FinancialRequests.prototype, "request_status", void 0);
84
84
  __decorate([
85
- (0, typeorm_1.Column)({ type: 'datetime', nullable: true }),
85
+ (0, typeorm_1.Column)({ type: 'timestamp', nullable: true }),
86
86
  __metadata("design:type", Date)
87
87
  ], FinancialRequests.prototype, "request_close_date", void 0);
88
88
  __decorate([
@@ -24,10 +24,10 @@ let FinancialWorkFlow = class FinancialWorkFlow extends BaseModel_1.BaseModel {
24
24
  super();
25
25
  this.financial_request_id = financial_request_id;
26
26
  this.status = status;
27
- this.financial_approval_id = 0;
28
- this.activity_date = new Date();
29
27
  this.approved_by_user_id = approved_by_user_id;
30
28
  this.content = content;
29
+ this.financial_approval_id = 0;
30
+ this.activity_date = new Date();
31
31
  }
32
32
  };
33
33
  exports.FinancialWorkFlow = FinancialWorkFlow;
@@ -48,11 +48,11 @@ __decorate([
48
48
  __metadata("design:type", Number)
49
49
  ], FinancialWorkFlow.prototype, "approved_by_user_id", void 0);
50
50
  __decorate([
51
- (0, typeorm_1.Column)({ type: 'int', nullable: true }),
51
+ (0, typeorm_1.Column)({ type: 'varchar', length: 500 }),
52
52
  __metadata("design:type", String)
53
53
  ], FinancialWorkFlow.prototype, "content", void 0);
54
54
  __decorate([
55
- (0, typeorm_1.Column)({ type: 'datetime', default: () => 'CURRENT_TIMESTAMP' }),
55
+ (0, typeorm_1.Column)({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' }),
56
56
  __metadata("design:type", Date)
57
57
  ], FinancialWorkFlow.prototype, "activity_date", void 0);
58
58
  exports.FinancialWorkFlow = FinancialWorkFlow = __decorate([
@@ -3,5 +3,10 @@ export declare class SalaryCertificateRequests extends BaseModel {
3
3
  financial_request_id: number;
4
4
  certificate_purpose: string;
5
5
  certificate_url: string;
6
+ addressee_name: string;
7
+ addressee_details: string;
8
+ include_salary_details: boolean;
9
+ include_allowances: boolean;
10
+ certificate_language: string;
6
11
  constructor(financial_request_id: number, certificate_purpose: string, certificate_url: string);
7
12
  }
@@ -18,6 +18,9 @@ let SalaryCertificateRequests = class SalaryCertificateRequests extends BaseMode
18
18
  this.financial_request_id = financial_request_id;
19
19
  this.certificate_purpose = certificate_purpose;
20
20
  this.certificate_url = certificate_url;
21
+ this.include_salary_details = false;
22
+ this.include_allowances = false;
23
+ this.certificate_language = 'English';
21
24
  }
22
25
  };
23
26
  exports.SalaryCertificateRequests = SalaryCertificateRequests;
@@ -33,6 +36,26 @@ __decorate([
33
36
  (0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: true }),
34
37
  __metadata("design:type", String)
35
38
  ], SalaryCertificateRequests.prototype, "certificate_url", void 0);
39
+ __decorate([
40
+ (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
41
+ __metadata("design:type", String)
42
+ ], SalaryCertificateRequests.prototype, "addressee_name", void 0);
43
+ __decorate([
44
+ (0, typeorm_1.Column)({ type: 'text', nullable: true }),
45
+ __metadata("design:type", String)
46
+ ], SalaryCertificateRequests.prototype, "addressee_details", void 0);
47
+ __decorate([
48
+ (0, typeorm_1.Column)({ type: 'boolean', default: false }),
49
+ __metadata("design:type", Boolean)
50
+ ], SalaryCertificateRequests.prototype, "include_salary_details", void 0);
51
+ __decorate([
52
+ (0, typeorm_1.Column)({ type: 'boolean', default: false }),
53
+ __metadata("design:type", Boolean)
54
+ ], SalaryCertificateRequests.prototype, "include_allowances", void 0);
55
+ __decorate([
56
+ (0, typeorm_1.Column)({ type: 'varchar', length: 50, nullable: true }),
57
+ __metadata("design:type", String)
58
+ ], SalaryCertificateRequests.prototype, "certificate_language", void 0);
36
59
  exports.SalaryCertificateRequests = SalaryCertificateRequests = __decorate([
37
60
  (0, typeorm_1.Entity)({ name: 'salary_certificate_requests' }),
38
61
  __metadata("design:paramtypes", [Number, String, String])
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platform-modules/foreign-ministry",
3
- "version": "1.0.76",
3
+ "version": "1.0.77",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {
@@ -22,24 +22,15 @@ export class FinancialApprovals extends BaseModel {
22
22
  @Column({ type: 'int' })
23
23
  approver_role_id: number;
24
24
 
25
- @Column({ type: 'varchar', length: 100, nullable: true })
26
- approver_name: string;
27
-
28
25
  @Column({ type: 'text', nullable: true })
29
26
  comment: string;
30
27
 
31
28
  @Column({ type: 'enum', enum: FinancialApprovalStatus, default: FinancialApprovalStatus.PENDING })
32
29
  approval_status: FinancialApprovalStatus;
33
30
 
34
- @Column({ type: 'datetime', nullable: true })
31
+ @Column({ type: 'timestamp', nullable: true })
35
32
  action_date: Date;
36
33
 
37
- @Column({ type: 'int', nullable: true })
38
- sla_days: number;
39
-
40
- @Column({ type: 'boolean', default: false })
41
- is_overdue: boolean;
42
-
43
34
  constructor(
44
35
  financial_request_id: number,
45
36
  level: number,
@@ -51,7 +42,6 @@ export class FinancialApprovals extends BaseModel {
51
42
  this.level = level;
52
43
  this.approver_role_id = approver_role_id;
53
44
  this.approval_status = approval_status;
54
- this.is_overdue = false;
55
45
  }
56
46
  }
57
47
 
@@ -15,16 +15,16 @@ export class FinancialAttachments extends BaseModel {
15
15
  @Column({ type: 'varchar', length: 50, nullable: true })
16
16
  file_type: string; // PDF, JPG, PNG, etc.
17
17
 
18
-
19
18
  constructor(
20
19
  financial_request_id: number,
21
20
  file_url: string,
22
- file_name: string,
21
+ file_name: string
23
22
  ) {
24
23
  super();
25
24
  this.financial_request_id = financial_request_id;
26
25
  this.file_url = file_url;
27
26
  this.file_name = file_name;
27
+ this.file_type = 'PDF';
28
28
  }
29
29
  }
30
30
 
@@ -12,7 +12,6 @@ export class FinancialChats extends BaseModel {
12
12
  @Column({ type: 'int' })
13
13
  sender_user_id: number;
14
14
 
15
-
16
15
  constructor(financial_request_id: number, content: string, sender_user_id: number) {
17
16
  super();
18
17
  this.financial_request_id = financial_request_id;
@@ -41,13 +41,13 @@ export class FinancialRequests extends BaseModel {
41
41
  @Column({ type: 'int' })
42
42
  request_type_id: number;
43
43
 
44
- @Column({ type: 'datetime', default: () => 'CURRENT_TIMESTAMP' })
44
+ @Column({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' })
45
45
  request_date: Date;
46
46
 
47
47
  @Column({ type: 'enum', enum: FinancialRequestStatus, default: FinancialRequestStatus.PENDING })
48
48
  request_status: FinancialRequestStatus;
49
49
 
50
- @Column({ type: 'datetime', nullable: true })
50
+ @Column({ type: 'timestamp', nullable: true })
51
51
  request_close_date: Date;
52
52
 
53
53
  @Column({ type: 'text', nullable: true })
@@ -16,32 +16,31 @@ export class FinancialWorkFlow extends BaseModel {
16
16
  @Column({ type: 'int', nullable: true, default: 0 })
17
17
  financial_approval_id: number;
18
18
 
19
-
20
19
  @Column({ type: 'enum', enum: FinancialWorkFlowStatus, default: FinancialWorkFlowStatus.NOT_YET_STARTED })
21
20
  status: FinancialWorkFlowStatus;
22
21
 
23
22
  @Column({ type: 'int', nullable: true })
24
23
  approved_by_user_id: number;
25
24
 
26
- @Column({ type: 'int', nullable: true })
25
+ @Column({ type: 'varchar', length: 500 })
27
26
  content: string;
28
27
 
29
- @Column({ type: 'datetime', default: () => 'CURRENT_TIMESTAMP' })
28
+ @Column({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' })
30
29
  activity_date: Date;
31
30
 
32
31
  constructor(
33
32
  financial_request_id: number,
34
33
  status: FinancialWorkFlowStatus,
35
34
  approved_by_user_id: number,
36
- content: string
35
+ content: string
37
36
  ) {
38
37
  super();
39
38
  this.financial_request_id = financial_request_id;
40
39
  this.status = status;
41
- this.financial_approval_id = 0;
42
- this.activity_date = new Date();
43
40
  this.approved_by_user_id = approved_by_user_id;
44
41
  this.content = content;
42
+ this.financial_approval_id = 0;
43
+ this.activity_date = new Date();
45
44
  }
46
45
  }
47
46
 
@@ -12,12 +12,9 @@ export class PayslipRequests extends BaseModel {
12
12
  @Column({ type: 'int', nullable: true })
13
13
  payslip_year: number;
14
14
 
15
-
16
-
17
15
  @Column({ type: 'varchar', length: 500, nullable: true })
18
16
  payslip_url: string;
19
17
 
20
-
21
18
  constructor(financial_request_id: number, payslip_month: string, payslip_year: number, payslip_url: string) {
22
19
  super();
23
20
  this.financial_request_id = financial_request_id;
@@ -12,13 +12,29 @@ export class SalaryCertificateRequests extends BaseModel {
12
12
  @Column({ type: 'varchar', length: 500, nullable: true })
13
13
  certificate_url: string;
14
14
 
15
+ @Column({ type: 'varchar', length: 255, nullable: true })
16
+ addressee_name: string;
15
17
 
18
+ @Column({ type: 'text', nullable: true })
19
+ addressee_details: string;
20
+
21
+ @Column({ type: 'boolean', default: false })
22
+ include_salary_details: boolean;
23
+
24
+ @Column({ type: 'boolean', default: false })
25
+ include_allowances: boolean;
26
+
27
+ @Column({ type: 'varchar', length: 50, nullable: true })
28
+ certificate_language: string; // English, Arabic
16
29
 
17
30
  constructor(financial_request_id: number, certificate_purpose: string, certificate_url: string) {
18
31
  super();
19
32
  this.financial_request_id = financial_request_id;
20
33
  this.certificate_purpose = certificate_purpose;
21
34
  this.certificate_url = certificate_url;
35
+ this.include_salary_details = false;
36
+ this.include_allowances = false;
37
+ this.certificate_language = 'English';
22
38
  }
23
39
  }
24
40