@platform-modules/foreign-ministry 1.0.8 → 1.0.10

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.
Files changed (33) hide show
  1. package/dist/data-source.js +5 -1
  2. package/dist/index.d.ts +3 -0
  3. package/dist/index.js +3 -0
  4. package/dist/models/FinancialGradeModel.js +2 -1
  5. package/dist/models/HajjLeaveDatesModel.d.ts +6 -0
  6. package/dist/models/HajjLeaveDatesModel.js +35 -0
  7. package/dist/models/LeaveApprovalDetailsModel.d.ts +8 -0
  8. package/dist/models/LeaveApprovalDetailsModel.js +45 -0
  9. package/dist/models/LeaveApprovalMatrixModel.d.ts +7 -0
  10. package/dist/models/LeaveApprovalMatrixModel.js +40 -0
  11. package/dist/models/LeaveRequestModel.d.ts +29 -22
  12. package/dist/models/LeaveRequestModel.js +66 -24
  13. package/dist/models/LeaveTypesModel.d.ts +5 -5
  14. package/dist/models/LeaveTypesModel.js +10 -10
  15. package/dist/models/MounringLeaveRelationModel.d.ts +5 -0
  16. package/dist/models/MounringLeaveRelationModel.js +29 -0
  17. package/dist/models/StudyLeaveDegreesModel.d.ts +5 -0
  18. package/dist/models/StudyLeaveDegreesModel.js +30 -0
  19. package/dist/models/UnpaidLeaveCatgoriesModel.d.ts +5 -0
  20. package/dist/models/UnpaidLeaveCatgoriesModel.js +30 -0
  21. package/package.json +1 -1
  22. package/src/data-source.ts +6 -1
  23. package/src/index.ts +4 -1
  24. package/src/models/FinancialGradeModel.ts +2 -2
  25. package/src/models/HajjLeaveDatesModel.ts +17 -0
  26. package/src/models/LeaveApprovalDetailsModel.ts +25 -0
  27. package/src/models/LeaveApprovalMatrixModel.ts +21 -0
  28. package/src/models/LeaveRequestModel.ts +63 -23
  29. package/src/models/LeaveTypesModel.ts +7 -7
  30. package/src/models/MounringLeaveRelationModel.ts +14 -0
  31. package/src/models/StudyLeaveDegreesModel.ts +13 -0
  32. package/src/models/UnpaidLeaveCatgoriesModel.ts +13 -0
  33. package/tsconfig.json +3 -2
@@ -11,6 +11,10 @@ const role_1 = require("./models/role");
11
11
  const LeaveRequestModel_1 = require("./models/LeaveRequestModel");
12
12
  const LeaveTypesModel_1 = require("./models/LeaveTypesModel");
13
13
  const FinancialGradeModel_1 = require("./models/FinancialGradeModel");
14
+ const HajjLeaveDatesModel_1 = require("./models/HajjLeaveDatesModel");
15
+ const StudyLeaveDegreesModel_1 = require("./models/StudyLeaveDegreesModel");
16
+ const UnpaidLeaveCatgoriesModel_1 = require("./models/UnpaidLeaveCatgoriesModel");
17
+ const MounringLeaveRelationModel_1 = require("./models/MounringLeaveRelationModel");
14
18
  exports.AppDataSource = new typeorm_1.DataSource({
15
19
  type: 'postgres',
16
20
  host: process.env.DB_HOST || 'localhost',
@@ -20,5 +24,5 @@ exports.AppDataSource = new typeorm_1.DataSource({
20
24
  database: process.env.DB_NAME || 'common_models',
21
25
  synchronize: true, // auto-create tables (disable in prod)
22
26
  logging: false,
23
- entities: [user_1.User, user_sessions_1.userSessions, role_1.Role, LeaveRequestModel_1.LeaveRequests, LeaveTypesModel_1.LeaveTypes, FinancialGradeModel_1.FinancialGrade],
27
+ entities: [user_1.User, user_sessions_1.userSessions, role_1.Role, LeaveRequestModel_1.LeaveRequests, LeaveTypesModel_1.LeaveTypes, FinancialGradeModel_1.FinancialGrade, HajjLeaveDatesModel_1.HajjLeaveDates, StudyLeaveDegreesModel_1.StudyLeaveDegrees, UnpaidLeaveCatgoriesModel_1.UnpaidLeaveCategories, MounringLeaveRelationModel_1.MounringLeaveRelations],
24
28
  });
package/dist/index.d.ts CHANGED
@@ -4,3 +4,6 @@ export * from './models/user-sessions';
4
4
  export * from './models/LeaveRequestModel';
5
5
  export * from './models/LeaveTypesModel';
6
6
  export * from './models/FinancialGradeModel';
7
+ export * from './models/HajjLeaveDatesModel';
8
+ export * from './models/StudyLeaveDegreesModel';
9
+ export * from './models/UnpaidLeaveCatgoriesModel';
package/dist/index.js CHANGED
@@ -20,3 +20,6 @@ __exportStar(require("./models/user-sessions"), exports);
20
20
  __exportStar(require("./models/LeaveRequestModel"), exports);
21
21
  __exportStar(require("./models/LeaveTypesModel"), exports);
22
22
  __exportStar(require("./models/FinancialGradeModel"), exports);
23
+ __exportStar(require("./models/HajjLeaveDatesModel"), exports);
24
+ __exportStar(require("./models/StudyLeaveDegreesModel"), exports);
25
+ __exportStar(require("./models/UnpaidLeaveCatgoriesModel"), exports);
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.FinancialGrade = void 0;
13
13
  const typeorm_1 = require("typeorm");
14
14
  const BaseModel_1 = require("./BaseModel");
15
+ //This model is used to store the Financial Grade declaration on the Admin Side
15
16
  let FinancialGrade = class FinancialGrade extends BaseModel_1.BaseModel {
16
17
  constructor(diplomatic_title, financial_grade, annual_leave) {
17
18
  super();
@@ -34,6 +35,6 @@ __decorate([
34
35
  __metadata("design:type", Number)
35
36
  ], FinancialGrade.prototype, "annual_leave", void 0);
36
37
  exports.FinancialGrade = FinancialGrade = __decorate([
37
- (0, typeorm_1.Entity)({ name: 'Financial_Grade' }),
38
+ (0, typeorm_1.Entity)({ name: 'financial_grade' }),
38
39
  __metadata("design:paramtypes", [String, String, Number])
39
40
  ], FinancialGrade);
@@ -0,0 +1,6 @@
1
+ import { BaseModel } from './BaseModel';
2
+ export declare class HajjLeaveDates extends BaseModel {
3
+ hajj_leave_start_date: Date;
4
+ hajj_leave_end_date: Date;
5
+ constructor(hajj_leave_start_date: Date, hajj_leave_end_date: Date);
6
+ }
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.HajjLeaveDates = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ //This model is used to store the Hajj Leave Dates declaration on the Admin Side
16
+ let HajjLeaveDates = class HajjLeaveDates extends BaseModel_1.BaseModel {
17
+ constructor(hajj_leave_start_date, hajj_leave_end_date) {
18
+ super();
19
+ this.hajj_leave_start_date = hajj_leave_start_date;
20
+ this.hajj_leave_end_date = hajj_leave_end_date;
21
+ }
22
+ };
23
+ exports.HajjLeaveDates = HajjLeaveDates;
24
+ __decorate([
25
+ (0, typeorm_1.Column)({ type: 'date', nullable: false }),
26
+ __metadata("design:type", Date)
27
+ ], HajjLeaveDates.prototype, "hajj_leave_start_date", void 0);
28
+ __decorate([
29
+ (0, typeorm_1.Column)({ type: 'date', nullable: false }),
30
+ __metadata("design:type", Date)
31
+ ], HajjLeaveDates.prototype, "hajj_leave_end_date", void 0);
32
+ exports.HajjLeaveDates = HajjLeaveDates = __decorate([
33
+ (0, typeorm_1.Entity)({ name: 'hajj_leave_dates' }),
34
+ __metadata("design:paramtypes", [Date, Date])
35
+ ], HajjLeaveDates);
@@ -0,0 +1,8 @@
1
+ import { BaseModel } from './BaseModel';
2
+ export declare class LeaveApprovalDetails extends BaseModel {
3
+ leave_request_id: number;
4
+ level: number;
5
+ approver_id: number;
6
+ approval_status: number;
7
+ constructor(leave_request_id: number, approver_id: number, approval_status: number, level: number);
8
+ }
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.LeaveApprovalDetails = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ //This model is used to store the store the leave apporval details of the user for the leave request
16
+ let LeaveApprovalDetails = class LeaveApprovalDetails extends BaseModel_1.BaseModel {
17
+ constructor(leave_request_id, approver_id, approval_status, level) {
18
+ super();
19
+ this.leave_request_id = leave_request_id;
20
+ this.approver_id = approver_id;
21
+ this.approval_status = approval_status;
22
+ this.level = level;
23
+ }
24
+ };
25
+ exports.LeaveApprovalDetails = LeaveApprovalDetails;
26
+ __decorate([
27
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
28
+ __metadata("design:type", Number)
29
+ ], LeaveApprovalDetails.prototype, "leave_request_id", void 0);
30
+ __decorate([
31
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
32
+ __metadata("design:type", Number)
33
+ ], LeaveApprovalDetails.prototype, "level", void 0);
34
+ __decorate([
35
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
36
+ __metadata("design:type", Number)
37
+ ], LeaveApprovalDetails.prototype, "approver_id", void 0);
38
+ __decorate([
39
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
40
+ __metadata("design:type", Number)
41
+ ], LeaveApprovalDetails.prototype, "approval_status", void 0);
42
+ exports.LeaveApprovalDetails = LeaveApprovalDetails = __decorate([
43
+ (0, typeorm_1.Entity)({ name: 'leave_approval_details' }),
44
+ __metadata("design:paramtypes", [Number, Number, Number, Number])
45
+ ], LeaveApprovalDetails);
@@ -0,0 +1,7 @@
1
+ import { BaseModel } from './BaseModel';
2
+ export declare class LeaveApprovalMatrix extends BaseModel {
3
+ leave_type: number;
4
+ level: number;
5
+ approval_matrix: number;
6
+ constructor(leave_type: number, level: number, approval_matrix: number);
7
+ }
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.LeaveApprovalMatrix = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ //This model is used to store the store the leave apporval matrix based on leave type along with the levels
16
+ let LeaveApprovalMatrix = class LeaveApprovalMatrix extends BaseModel_1.BaseModel {
17
+ constructor(leave_type, level, approval_matrix) {
18
+ super();
19
+ this.leave_type = leave_type;
20
+ this.level = level;
21
+ this.approval_matrix = approval_matrix;
22
+ }
23
+ };
24
+ exports.LeaveApprovalMatrix = LeaveApprovalMatrix;
25
+ __decorate([
26
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
27
+ __metadata("design:type", Number)
28
+ ], LeaveApprovalMatrix.prototype, "leave_type", void 0);
29
+ __decorate([
30
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
31
+ __metadata("design:type", Number)
32
+ ], LeaveApprovalMatrix.prototype, "level", void 0);
33
+ __decorate([
34
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
35
+ __metadata("design:type", Number)
36
+ ], LeaveApprovalMatrix.prototype, "approval_matrix", void 0);
37
+ exports.LeaveApprovalMatrix = LeaveApprovalMatrix = __decorate([
38
+ (0, typeorm_1.Entity)({ name: 'leave_approval_matrix' }),
39
+ __metadata("design:paramtypes", [Number, Number, Number])
40
+ ], LeaveApprovalMatrix);
@@ -1,30 +1,37 @@
1
1
  import { BaseModel } from './BaseModel';
2
+ export declare enum Leave_For {
3
+ SELF = "Self",
4
+ BEHALFOF = "Behalf of"
5
+ }
2
6
  export declare enum status {
3
7
  PENDING = "Pending",
4
8
  APPROVED = "Approved",
5
9
  REJECTED = "Rejected"
6
10
  }
7
11
  export declare class LeaveRequests extends BaseModel {
8
- User_Id: string;
9
- Leave_Type: number;
10
- Department: string;
11
- Status: status;
12
- Leave_Start_Date: Date;
13
- Leave_End_Date: Date;
14
- Leave_Duration: number;
15
- Remaining_Leave_Balance: number;
16
- Contact_Number_During_Leave: string;
17
- Address_During_Leave: string;
18
- Notes: string;
19
- Delegated_To: string;
20
- Number_Of_Escort_Instances_Per_Year: number;
21
- Accompanying_The_Patient: boolean;
22
- Treatment_Place: string;
23
- Emergency_Leaves_Available: number;
24
- Unpaid_Leave_Type: string;
25
- Country_Or_State_Being_Visited: string;
26
- Leave_Balance_Summary: string;
27
- Representation: string;
28
- Activity_Title: string;
29
- Relationship: string;
12
+ user_id: string;
13
+ leave_for: Leave_For;
14
+ leave_type: number;
15
+ department: string;
16
+ status: status;
17
+ leave_start_date: Date;
18
+ leave_end_date: Date;
19
+ leave_duration: number;
20
+ remaining_leave_balance: number;
21
+ contact_number_during_leave: string;
22
+ address_during_leave: string;
23
+ notes: string;
24
+ delegated_to: string;
25
+ number_of_escort_instances_per_year: number;
26
+ accompanying_the_patient: boolean;
27
+ treatment_place: string;
28
+ emergency_leaves_available: number;
29
+ unpaid_leave_type: string;
30
+ country_or_state_being_visited: string;
31
+ leave_balance_summary: string;
32
+ representation: string;
33
+ activity_title: string;
34
+ relationship: string;
35
+ mounring_leave_relation: number;
36
+ constructor(user_id: string, leave_for: Leave_For, leave_type: number, department: string, status: status, leave_start_date: Date, leave_end_date: Date, leave_duration: number, remaining_leave_balance: number, contact_number_during_leave: string, address_during_leave: string, notes: string, delegated_to: string, number_of_escort_instances_per_year: number, accompanying_the_patient: boolean, treatment_place: string, emergency_leaves_available: number, unpaid_leave_type: string, country_or_state_being_visited: string, leave_balance_summary: string, representation: string, activity_title: string, relationship: string, mounring_leave_relation: number);
30
37
  }
@@ -9,9 +9,15 @@ var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.LeaveRequests = exports.status = void 0;
12
+ exports.LeaveRequests = exports.status = exports.Leave_For = void 0;
13
13
  const typeorm_1 = require("typeorm");
14
14
  const BaseModel_1 = require("./BaseModel");
15
+ //This model is used to store the Leave Request
16
+ var Leave_For;
17
+ (function (Leave_For) {
18
+ Leave_For["SELF"] = "Self";
19
+ Leave_For["BEHALFOF"] = "Behalf of";
20
+ })(Leave_For || (exports.Leave_For = Leave_For = {}));
15
21
  var status;
16
22
  (function (status) {
17
23
  status["PENDING"] = "Pending";
@@ -19,96 +25,132 @@ var status;
19
25
  status["REJECTED"] = "Rejected";
20
26
  })(status || (exports.status = status = {}));
21
27
  let LeaveRequests = class LeaveRequests extends BaseModel_1.BaseModel {
28
+ constructor(user_id, leave_for, leave_type, department, status, leave_start_date, leave_end_date, leave_duration, remaining_leave_balance, contact_number_during_leave, address_during_leave, notes, delegated_to, number_of_escort_instances_per_year, accompanying_the_patient, treatment_place, emergency_leaves_available, unpaid_leave_type, country_or_state_being_visited, leave_balance_summary, representation, activity_title, relationship, mounring_leave_relation) {
29
+ super();
30
+ this.user_id = user_id;
31
+ this.leave_for = leave_for;
32
+ this.leave_type = leave_type;
33
+ this.department = department;
34
+ this.status = status;
35
+ this.leave_start_date = leave_start_date;
36
+ this.leave_end_date = leave_end_date;
37
+ this.leave_duration = leave_duration;
38
+ this.remaining_leave_balance = remaining_leave_balance;
39
+ this.contact_number_during_leave = contact_number_during_leave;
40
+ this.address_during_leave = address_during_leave;
41
+ this.notes = notes;
42
+ this.delegated_to = delegated_to;
43
+ this.number_of_escort_instances_per_year = number_of_escort_instances_per_year;
44
+ this.accompanying_the_patient = accompanying_the_patient;
45
+ this.treatment_place = treatment_place;
46
+ this.emergency_leaves_available = emergency_leaves_available;
47
+ this.unpaid_leave_type = unpaid_leave_type;
48
+ this.country_or_state_being_visited = country_or_state_being_visited;
49
+ this.leave_balance_summary = leave_balance_summary;
50
+ this.representation = representation;
51
+ this.activity_title = activity_title;
52
+ this.relationship = relationship;
53
+ this.mounring_leave_relation = mounring_leave_relation;
54
+ }
22
55
  };
23
56
  exports.LeaveRequests = LeaveRequests;
24
57
  __decorate([
25
58
  (0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
26
59
  __metadata("design:type", String)
27
- ], LeaveRequests.prototype, "User_Id", void 0);
60
+ ], LeaveRequests.prototype, "user_id", void 0);
61
+ __decorate([
62
+ (0, typeorm_1.Column)({ type: "enum", enum: Leave_For, default: Leave_For.SELF, nullable: true }),
63
+ __metadata("design:type", String)
64
+ ], LeaveRequests.prototype, "leave_for", void 0);
28
65
  __decorate([
29
66
  (0, typeorm_1.Column)({ type: 'int', nullable: true }),
30
67
  __metadata("design:type", Number)
31
- ], LeaveRequests.prototype, "Leave_Type", void 0);
68
+ ], LeaveRequests.prototype, "leave_type", void 0);
32
69
  __decorate([
33
70
  (0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
34
71
  __metadata("design:type", String)
35
- ], LeaveRequests.prototype, "Department", void 0);
72
+ ], LeaveRequests.prototype, "department", void 0);
36
73
  __decorate([
37
74
  (0, typeorm_1.Column)({ type: "enum", enum: status, default: status.PENDING, nullable: true }),
38
75
  __metadata("design:type", String)
39
- ], LeaveRequests.prototype, "Status", void 0);
76
+ ], LeaveRequests.prototype, "status", void 0);
40
77
  __decorate([
41
78
  (0, typeorm_1.Column)({ type: 'date', nullable: true }),
42
79
  __metadata("design:type", Date)
43
- ], LeaveRequests.prototype, "Leave_Start_Date", void 0);
80
+ ], LeaveRequests.prototype, "leave_start_date", void 0);
44
81
  __decorate([
45
82
  (0, typeorm_1.Column)({ type: 'date', nullable: true }),
46
83
  __metadata("design:type", Date)
47
- ], LeaveRequests.prototype, "Leave_End_Date", void 0);
84
+ ], LeaveRequests.prototype, "leave_end_date", void 0);
48
85
  __decorate([
49
86
  (0, typeorm_1.Column)({ type: 'float', nullable: true }),
50
87
  __metadata("design:type", Number)
51
- ], LeaveRequests.prototype, "Leave_Duration", void 0);
88
+ ], LeaveRequests.prototype, "leave_duration", void 0);
52
89
  __decorate([
53
90
  (0, typeorm_1.Column)({ type: 'float', nullable: true }),
54
91
  __metadata("design:type", Number)
55
- ], LeaveRequests.prototype, "Remaining_Leave_Balance", void 0);
92
+ ], LeaveRequests.prototype, "remaining_leave_balance", void 0);
56
93
  __decorate([
57
94
  (0, typeorm_1.Column)({ type: 'varchar', length: 20, nullable: true }),
58
95
  __metadata("design:type", String)
59
- ], LeaveRequests.prototype, "Contact_Number_During_Leave", void 0);
96
+ ], LeaveRequests.prototype, "contact_number_during_leave", void 0);
60
97
  __decorate([
61
98
  (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
62
99
  __metadata("design:type", String)
63
- ], LeaveRequests.prototype, "Address_During_Leave", void 0);
100
+ ], LeaveRequests.prototype, "address_during_leave", void 0);
64
101
  __decorate([
65
102
  (0, typeorm_1.Column)({ type: 'text', nullable: true }),
66
103
  __metadata("design:type", String)
67
- ], LeaveRequests.prototype, "Notes", void 0);
104
+ ], LeaveRequests.prototype, "notes", void 0);
68
105
  __decorate([
69
106
  (0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
70
107
  __metadata("design:type", String)
71
- ], LeaveRequests.prototype, "Delegated_To", void 0);
108
+ ], LeaveRequests.prototype, "delegated_to", void 0);
72
109
  __decorate([
73
110
  (0, typeorm_1.Column)({ type: 'int', nullable: true }),
74
111
  __metadata("design:type", Number)
75
- ], LeaveRequests.prototype, "Number_Of_Escort_Instances_Per_Year", void 0);
112
+ ], LeaveRequests.prototype, "number_of_escort_instances_per_year", void 0);
76
113
  __decorate([
77
114
  (0, typeorm_1.Column)({ type: 'boolean', nullable: true }),
78
115
  __metadata("design:type", Boolean)
79
- ], LeaveRequests.prototype, "Accompanying_The_Patient", void 0);
116
+ ], LeaveRequests.prototype, "accompanying_the_patient", void 0);
80
117
  __decorate([
81
118
  (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
82
119
  __metadata("design:type", String)
83
- ], LeaveRequests.prototype, "Treatment_Place", void 0);
120
+ ], LeaveRequests.prototype, "treatment_place", void 0);
84
121
  __decorate([
85
122
  (0, typeorm_1.Column)({ type: 'int', nullable: true }),
86
123
  __metadata("design:type", Number)
87
- ], LeaveRequests.prototype, "Emergency_Leaves_Available", void 0);
124
+ ], LeaveRequests.prototype, "emergency_leaves_available", void 0);
88
125
  __decorate([
89
126
  (0, typeorm_1.Column)({ type: 'varchar', length: 50, nullable: true }),
90
127
  __metadata("design:type", String)
91
- ], LeaveRequests.prototype, "Unpaid_Leave_Type", void 0);
128
+ ], LeaveRequests.prototype, "unpaid_leave_type", void 0);
92
129
  __decorate([
93
130
  (0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
94
131
  __metadata("design:type", String)
95
- ], LeaveRequests.prototype, "Country_Or_State_Being_Visited", void 0);
132
+ ], LeaveRequests.prototype, "country_or_state_being_visited", void 0);
96
133
  __decorate([
97
134
  (0, typeorm_1.Column)({ type: 'text', nullable: true }),
98
135
  __metadata("design:type", String)
99
- ], LeaveRequests.prototype, "Leave_Balance_Summary", void 0);
136
+ ], LeaveRequests.prototype, "leave_balance_summary", void 0);
100
137
  __decorate([
101
138
  (0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
102
139
  __metadata("design:type", String)
103
- ], LeaveRequests.prototype, "Representation", void 0);
140
+ ], LeaveRequests.prototype, "representation", void 0);
104
141
  __decorate([
105
142
  (0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
106
143
  __metadata("design:type", String)
107
- ], LeaveRequests.prototype, "Activity_Title", void 0);
144
+ ], LeaveRequests.prototype, "activity_title", void 0);
108
145
  __decorate([
109
146
  (0, typeorm_1.Column)({ type: 'varchar', length: 50, nullable: true }),
110
147
  __metadata("design:type", String)
111
- ], LeaveRequests.prototype, "Relationship", void 0);
148
+ ], LeaveRequests.prototype, "relationship", void 0);
149
+ __decorate([
150
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
151
+ __metadata("design:type", Number)
152
+ ], LeaveRequests.prototype, "mounring_leave_relation", void 0);
112
153
  exports.LeaveRequests = LeaveRequests = __decorate([
113
- (0, typeorm_1.Entity)({ name: 'LeaveRequests' })
154
+ (0, typeorm_1.Entity)({ name: 'leave_requests' }),
155
+ __metadata("design:paramtypes", [String, String, Number, String, String, Date, Date, Number, Number, String, String, String, String, Number, Boolean, String, Number, String, String, String, String, String, String, Number])
114
156
  ], LeaveRequests);
@@ -1,9 +1,9 @@
1
1
  import { BaseModel } from './BaseModel';
2
2
  export declare class LeaveTypes extends BaseModel {
3
3
  name: string;
4
- name_in_Arabic: string;
5
- Omani_Only?: boolean;
6
- Non_Omani_Muslim?: boolean;
7
- Non_Omani_Non_Muslim?: boolean;
8
- constructor(name: string, name_in_Arabic: string);
4
+ name_in_arabic: string;
5
+ omani_only?: boolean;
6
+ non_omani_muslim?: boolean;
7
+ non_omani_non_muslim?: boolean;
8
+ constructor(name: string, name_in_arabic: string);
9
9
  }
@@ -13,13 +13,13 @@ exports.LeaveTypes = void 0;
13
13
  const typeorm_1 = require("typeorm");
14
14
  const BaseModel_1 = require("./BaseModel");
15
15
  let LeaveTypes = class LeaveTypes extends BaseModel_1.BaseModel {
16
- constructor(name, name_in_Arabic) {
16
+ constructor(name, name_in_arabic) {
17
17
  super();
18
- this.Omani_Only = false;
19
- this.Non_Omani_Muslim = false;
20
- this.Non_Omani_Non_Muslim = false;
18
+ this.omani_only = false;
19
+ this.non_omani_muslim = false;
20
+ this.non_omani_non_muslim = false;
21
21
  this.name = name;
22
- this.name_in_Arabic = name_in_Arabic;
22
+ this.name_in_arabic = name_in_arabic;
23
23
  }
24
24
  };
25
25
  exports.LeaveTypes = LeaveTypes;
@@ -30,20 +30,20 @@ __decorate([
30
30
  __decorate([
31
31
  (0, typeorm_1.Column)({ nullable: true }),
32
32
  __metadata("design:type", String)
33
- ], LeaveTypes.prototype, "name_in_Arabic", void 0);
33
+ ], LeaveTypes.prototype, "name_in_arabic", void 0);
34
34
  __decorate([
35
35
  (0, typeorm_1.Column)({ nullable: true, default: false }),
36
36
  __metadata("design:type", Boolean)
37
- ], LeaveTypes.prototype, "Omani_Only", void 0);
37
+ ], LeaveTypes.prototype, "omani_only", void 0);
38
38
  __decorate([
39
39
  (0, typeorm_1.Column)({ nullable: true, default: false }),
40
40
  __metadata("design:type", Boolean)
41
- ], LeaveTypes.prototype, "Non_Omani_Muslim", void 0);
41
+ ], LeaveTypes.prototype, "non_omani_muslim", void 0);
42
42
  __decorate([
43
43
  (0, typeorm_1.Column)({ nullable: true, default: false }),
44
44
  __metadata("design:type", Boolean)
45
- ], LeaveTypes.prototype, "Non_Omani_Non_Muslim", void 0);
45
+ ], LeaveTypes.prototype, "non_omani_non_muslim", void 0);
46
46
  exports.LeaveTypes = LeaveTypes = __decorate([
47
- (0, typeorm_1.Entity)({ name: 'Leave_Types' }),
47
+ (0, typeorm_1.Entity)({ name: 'leave_types' }),
48
48
  __metadata("design:paramtypes", [String, String])
49
49
  ], LeaveTypes);
@@ -0,0 +1,5 @@
1
+ import { BaseModel } from './BaseModel';
2
+ export declare class MounringLeaveRelations extends BaseModel {
3
+ mounring_leave_relation: string;
4
+ constructor(mounring_leave_relation: string);
5
+ }
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.MounringLeaveRelations = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ let MounringLeaveRelations = class MounringLeaveRelations extends BaseModel_1.BaseModel {
16
+ constructor(mounring_leave_relation) {
17
+ super();
18
+ this.mounring_leave_relation = mounring_leave_relation;
19
+ }
20
+ };
21
+ exports.MounringLeaveRelations = MounringLeaveRelations;
22
+ __decorate([
23
+ (0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: false }),
24
+ __metadata("design:type", String)
25
+ ], MounringLeaveRelations.prototype, "mounring_leave_relation", void 0);
26
+ exports.MounringLeaveRelations = MounringLeaveRelations = __decorate([
27
+ (0, typeorm_1.Entity)({ name: 'mounring_leave_relations' }),
28
+ __metadata("design:paramtypes", [String])
29
+ ], MounringLeaveRelations);
@@ -0,0 +1,5 @@
1
+ import { BaseModel } from './BaseModel';
2
+ export declare class StudyLeaveDegrees extends BaseModel {
3
+ study_leave_degree: string;
4
+ constructor(study_leave_degree: string);
5
+ }
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.StudyLeaveDegrees = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ //This model is used to store the Study Leave Degrees Master Data
16
+ let StudyLeaveDegrees = class StudyLeaveDegrees extends BaseModel_1.BaseModel {
17
+ constructor(study_leave_degree) {
18
+ super();
19
+ this.study_leave_degree = study_leave_degree;
20
+ }
21
+ };
22
+ exports.StudyLeaveDegrees = StudyLeaveDegrees;
23
+ __decorate([
24
+ (0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: false }),
25
+ __metadata("design:type", String)
26
+ ], StudyLeaveDegrees.prototype, "study_leave_degree", void 0);
27
+ exports.StudyLeaveDegrees = StudyLeaveDegrees = __decorate([
28
+ (0, typeorm_1.Entity)({ name: 'study_leave_degrees' }),
29
+ __metadata("design:paramtypes", [String])
30
+ ], StudyLeaveDegrees);
@@ -0,0 +1,5 @@
1
+ import { BaseModel } from './BaseModel';
2
+ export declare class UnpaidLeaveCategories extends BaseModel {
3
+ unpaid_leave_category: string;
4
+ constructor(unpaid_leave_category: string);
5
+ }
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.UnpaidLeaveCategories = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ //This model is used to store the Unpaid Leave Categories Master Data
16
+ let UnpaidLeaveCategories = class UnpaidLeaveCategories extends BaseModel_1.BaseModel {
17
+ constructor(unpaid_leave_category) {
18
+ super();
19
+ this.unpaid_leave_category = unpaid_leave_category;
20
+ }
21
+ };
22
+ exports.UnpaidLeaveCategories = UnpaidLeaveCategories;
23
+ __decorate([
24
+ (0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: false }),
25
+ __metadata("design:type", String)
26
+ ], UnpaidLeaveCategories.prototype, "unpaid_leave_category", void 0);
27
+ exports.UnpaidLeaveCategories = UnpaidLeaveCategories = __decorate([
28
+ (0, typeorm_1.Entity)({ name: 'unpaid_leave_categories' }),
29
+ __metadata("design:paramtypes", [String])
30
+ ], UnpaidLeaveCategories);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platform-modules/foreign-ministry",
3
- "version": "1.0.8",
3
+ "version": "1.0.10",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {
@@ -8,6 +8,11 @@ import { Role } from './models/role';
8
8
  import { LeaveRequests } from './models/LeaveRequestModel';
9
9
  import { LeaveTypes } from './models/LeaveTypesModel';
10
10
  import { FinancialGrade } from './models/FinancialGradeModel';
11
+ import { HajjLeaveDates } from './models/HajjLeaveDatesModel';
12
+ import { StudyLeaveDegrees } from './models/StudyLeaveDegreesModel';
13
+ import { UnpaidLeaveCategories } from './models/UnpaidLeaveCatgoriesModel';
14
+ import { MounringLeaveRelations } from './models/MounringLeaveRelationModel';
15
+
11
16
 
12
17
  export const AppDataSource = new DataSource({
13
18
  type: 'postgres',
@@ -18,5 +23,5 @@ export const AppDataSource = new DataSource({
18
23
  database: process.env.DB_NAME || 'common_models',
19
24
  synchronize: true, // auto-create tables (disable in prod)
20
25
  logging: false,
21
- entities: [User,userSessions,Role,LeaveRequests,LeaveTypes,FinancialGrade],
26
+ entities: [User,userSessions,Role,LeaveRequests,LeaveTypes,FinancialGrade,HajjLeaveDates,StudyLeaveDegrees,UnpaidLeaveCategories,MounringLeaveRelations],
22
27
  });
package/src/index.ts CHANGED
@@ -3,4 +3,7 @@ export * from './models/role';
3
3
  export * from './models/user-sessions';
4
4
  export * from './models/LeaveRequestModel';
5
5
  export * from './models/LeaveTypesModel';
6
- export * from './models/FinancialGradeModel';
6
+ export * from './models/FinancialGradeModel';
7
+ export * from './models/HajjLeaveDatesModel';
8
+ export * from './models/StudyLeaveDegreesModel';
9
+ export * from './models/UnpaidLeaveCatgoriesModel';
@@ -1,7 +1,7 @@
1
1
  import { Column, Entity } from "typeorm";
2
2
  import { BaseModel } from './BaseModel';
3
-
4
- @Entity({ name: 'Financial_Grade' })
3
+ //This model is used to store the Financial Grade declaration on the Admin Side
4
+ @Entity({ name: 'financial_grade' })
5
5
  export class FinancialGrade extends BaseModel {
6
6
 
7
7
  @Column({ nullable: false })
@@ -0,0 +1,17 @@
1
+ import { Column, Entity } from "typeorm";
2
+ import { BaseModel } from './BaseModel';
3
+ //This model is used to store the Hajj Leave Dates declaration on the Admin Side
4
+ @Entity({ name: 'hajj_leave_dates' })
5
+ export class HajjLeaveDates extends BaseModel {
6
+ @Column({ type: 'date', nullable: false })
7
+ hajj_leave_start_date: Date;
8
+
9
+ @Column({ type: 'date', nullable: false })
10
+ hajj_leave_end_date: Date;
11
+
12
+ constructor(hajj_leave_start_date: Date, hajj_leave_end_date: Date) {
13
+ super();
14
+ this.hajj_leave_start_date = hajj_leave_start_date;
15
+ this.hajj_leave_end_date = hajj_leave_end_date;
16
+ }
17
+ }
@@ -0,0 +1,25 @@
1
+ import { Column, Entity } from "typeorm";
2
+ import { BaseModel } from './BaseModel';
3
+ //This model is used to store the store the leave apporval details of the user for the leave request
4
+ @Entity({ name: 'leave_approval_details' })
5
+ export class LeaveApprovalDetails extends BaseModel {
6
+ @Column({ type: 'int', nullable: false })
7
+ leave_request_id: number;
8
+
9
+ @Column({ type: 'int', nullable: false })
10
+ level: number;
11
+
12
+ @Column({ type: 'int', nullable: false })
13
+ approver_id: number;
14
+
15
+ @Column({ type: 'int', nullable: false })
16
+ approval_status: number;
17
+
18
+ constructor(leave_request_id: number, approver_id: number, approval_status: number, level: number) {
19
+ super();
20
+ this.leave_request_id = leave_request_id;
21
+ this.approver_id = approver_id;
22
+ this.approval_status = approval_status;
23
+ this.level = level;
24
+ }
25
+ }
@@ -0,0 +1,21 @@
1
+ import { Column, Entity } from "typeorm";
2
+ import { BaseModel } from './BaseModel';
3
+ //This model is used to store the store the leave apporval matrix based on leave type along with the levels
4
+ @Entity({ name: 'leave_approval_matrix' })
5
+ export class LeaveApprovalMatrix extends BaseModel {
6
+ @Column({ type: 'int', nullable: false })
7
+ leave_type: number;
8
+
9
+ @Column({ type: 'int', nullable: false })
10
+ level: number;
11
+
12
+ @Column({ type: 'int', nullable: false })
13
+ approval_matrix: number;
14
+
15
+ constructor(leave_type: number, level: number, approval_matrix: number) {
16
+ super();
17
+ this.leave_type = leave_type;
18
+ this.level = level;
19
+ this.approval_matrix = approval_matrix;
20
+ }
21
+ }
@@ -1,76 +1,116 @@
1
1
  import { Column, Entity } from "typeorm";
2
2
  import { BaseModel } from './BaseModel';
3
+ //This model is used to store the Leave Request
4
+ export enum Leave_For {
5
+ SELF = "Self",
6
+ BEHALFOF = "Behalf of"
7
+ }
3
8
 
4
9
  export enum status {
5
10
  PENDING = "Pending",
6
11
  APPROVED = "Approved",
7
12
  REJECTED = "Rejected"
8
13
  }
9
- @Entity({ name: 'LeaveRequests' })
14
+ @Entity({ name: 'leave_requests' })
10
15
  export class LeaveRequests extends BaseModel {
11
16
  @Column({ type: 'varchar', length: 100, nullable: true })
12
- User_Id: string;
17
+ user_id: string;
18
+
19
+ @Column({ type: "enum", enum: Leave_For, default: Leave_For.SELF, nullable: true })
20
+ leave_for: Leave_For;
13
21
 
14
22
  @Column({ type: 'int', nullable: true })
15
- Leave_Type: number;
23
+ leave_type: number;
16
24
 
17
25
  @Column({ type: 'varchar', length: 100, nullable: true })
18
- Department: string;
26
+ department: string;
19
27
 
20
28
  @Column({ type: "enum", enum: status, default: status.PENDING, nullable: true })
21
- Status: status;
29
+ status: status;
22
30
 
23
31
  @Column({ type: 'date', nullable: true })
24
- Leave_Start_Date: Date;
32
+ leave_start_date: Date;
25
33
 
26
34
  @Column({ type: 'date', nullable: true })
27
- Leave_End_Date: Date;
35
+ leave_end_date: Date;
28
36
 
29
37
  @Column({ type: 'float', nullable: true })
30
- Leave_Duration: number;
38
+ leave_duration: number;
31
39
 
32
40
  @Column({ type: 'float', nullable: true })
33
- Remaining_Leave_Balance: number;
41
+ remaining_leave_balance: number;
34
42
 
35
43
  @Column({ type: 'varchar', length: 20, nullable: true })
36
- Contact_Number_During_Leave: string;
44
+ contact_number_during_leave: string;
37
45
 
38
46
  @Column({ type: 'varchar', length: 255, nullable: true })
39
- Address_During_Leave: string;
47
+ address_during_leave: string;
40
48
 
41
49
  @Column({ type: 'text', nullable: true })
42
- Notes: string;
50
+ notes: string;
43
51
 
44
52
  @Column({ type: 'varchar', length: 100, nullable: true })
45
- Delegated_To: string;
53
+ delegated_to: string;
46
54
 
47
55
  @Column({ type: 'int', nullable: true })
48
- Number_Of_Escort_Instances_Per_Year: number;
56
+ number_of_escort_instances_per_year: number;
49
57
 
50
58
  @Column({ type: 'boolean', nullable: true })
51
- Accompanying_The_Patient: boolean;
59
+ accompanying_the_patient: boolean;
52
60
 
53
61
  @Column({ type: 'varchar', length: 255, nullable: true })
54
- Treatment_Place: string;
62
+ treatment_place: string;
55
63
 
56
64
  @Column({ type: 'int', nullable: true })
57
- Emergency_Leaves_Available: number;
65
+ emergency_leaves_available: number;
58
66
 
59
67
  @Column({ type: 'varchar', length: 50, nullable: true })
60
- Unpaid_Leave_Type: string;
68
+ unpaid_leave_type: string;
61
69
 
62
70
  @Column({ type: 'varchar', length: 100, nullable: true })
63
- Country_Or_State_Being_Visited: string;
71
+ country_or_state_being_visited: string;
64
72
 
65
73
  @Column({ type: 'text', nullable: true })
66
- Leave_Balance_Summary: string;
74
+ leave_balance_summary: string;
67
75
 
68
76
  @Column({ type: 'varchar', length: 100, nullable: true })
69
- Representation: string;
77
+ representation: string;
70
78
 
71
79
  @Column({ type: 'varchar', length: 100, nullable: true })
72
- Activity_Title: string;
80
+ activity_title: string;
73
81
 
74
82
  @Column({ type: 'varchar', length: 50, nullable: true })
75
- Relationship: string;
83
+ relationship: string;
84
+
85
+ @Column({ type: 'int', nullable: true })
86
+ mounring_leave_relation: number;
87
+
88
+
89
+ constructor(user_id: string, leave_for: Leave_For, leave_type: number, department: string, status: status, leave_start_date: Date, leave_end_date: Date, leave_duration: number, remaining_leave_balance: number, contact_number_during_leave: string, address_during_leave: string, notes: string, delegated_to: string, number_of_escort_instances_per_year: number, accompanying_the_patient: boolean, treatment_place: string, emergency_leaves_available: number, unpaid_leave_type: string, country_or_state_being_visited: string, leave_balance_summary: string, representation: string, activity_title: string, relationship: string, mounring_leave_relation: number) {
90
+ super();
91
+ this.user_id = user_id;
92
+ this.leave_for = leave_for;
93
+ this.leave_type = leave_type;
94
+ this.department = department;
95
+ this.status = status;
96
+ this.leave_start_date = leave_start_date;
97
+ this.leave_end_date = leave_end_date;
98
+ this.leave_duration = leave_duration;
99
+ this.remaining_leave_balance = remaining_leave_balance;
100
+ this.contact_number_during_leave = contact_number_during_leave;
101
+ this.address_during_leave = address_during_leave;
102
+ this.notes = notes;
103
+ this.delegated_to = delegated_to;
104
+ this.number_of_escort_instances_per_year = number_of_escort_instances_per_year;
105
+ this.accompanying_the_patient = accompanying_the_patient;
106
+ this.treatment_place = treatment_place;
107
+ this.emergency_leaves_available = emergency_leaves_available;
108
+ this.unpaid_leave_type = unpaid_leave_type;
109
+ this.country_or_state_being_visited = country_or_state_being_visited;
110
+ this.leave_balance_summary = leave_balance_summary;
111
+ this.representation = representation;
112
+ this.activity_title = activity_title;
113
+ this.relationship = relationship;
114
+ this.mounring_leave_relation = mounring_leave_relation;
115
+ }
76
116
  }
@@ -1,31 +1,31 @@
1
1
  import { Column, Entity } from "typeorm";
2
2
  import { BaseModel } from './BaseModel';
3
3
 
4
- @Entity({ name: 'Leave_Types' })
4
+ @Entity({ name: 'leave_types' })
5
5
  export class LeaveTypes extends BaseModel {
6
6
 
7
7
  @Column({ nullable: true })
8
8
  name: string;
9
9
 
10
10
  @Column({ nullable: true })
11
- name_in_Arabic: string;
11
+ name_in_arabic: string;
12
12
 
13
13
  @Column({ nullable: true, default: false })
14
- Omani_Only?: boolean = false;
14
+ omani_only?: boolean = false;
15
15
 
16
16
  @Column({ nullable: true, default: false })
17
- Non_Omani_Muslim?: boolean = false;
17
+ non_omani_muslim?: boolean = false;
18
18
 
19
19
  @Column({ nullable: true, default: false })
20
- Non_Omani_Non_Muslim?: boolean = false;
20
+ non_omani_non_muslim?: boolean = false;
21
21
 
22
22
 
23
23
  constructor(
24
24
  name: string,
25
- name_in_Arabic: string,
25
+ name_in_arabic: string,
26
26
  ) {
27
27
  super();
28
28
  this.name = name
29
- this.name_in_Arabic = name_in_Arabic
29
+ this.name_in_arabic = name_in_arabic
30
30
  }
31
31
  }
@@ -0,0 +1,14 @@
1
+ import { Column, Entity } from "typeorm";
2
+ import { BaseModel } from './BaseModel';
3
+
4
+ @Entity({ name: 'mounring_leave_relations' })
5
+
6
+ export class MounringLeaveRelations extends BaseModel {
7
+ @Column({ type: 'varchar', length: 100, nullable: false })
8
+ mounring_leave_relation: string;
9
+
10
+ constructor(mounring_leave_relation: string) {
11
+ super();
12
+ this.mounring_leave_relation = mounring_leave_relation;
13
+ }
14
+ }
@@ -0,0 +1,13 @@
1
+ import { Column, Entity } from "typeorm";
2
+ import { BaseModel } from './BaseModel';
3
+ //This model is used to store the Study Leave Degrees Master Data
4
+ @Entity({ name: 'study_leave_degrees' })
5
+ export class StudyLeaveDegrees extends BaseModel {
6
+ @Column({ type: 'varchar', length: 100, nullable: false })
7
+ study_leave_degree: string;
8
+
9
+ constructor(study_leave_degree: string) {
10
+ super();
11
+ this.study_leave_degree = study_leave_degree;
12
+ }
13
+ }
@@ -0,0 +1,13 @@
1
+ import { Column, Entity } from "typeorm";
2
+ import { BaseModel } from './BaseModel';
3
+ //This model is used to store the Unpaid Leave Categories Master Data
4
+ @Entity({ name: 'unpaid_leave_categories' })
5
+ export class UnpaidLeaveCategories extends BaseModel {
6
+ @Column({ type: 'varchar', length: 100, nullable: false })
7
+ unpaid_leave_category: string;
8
+
9
+ constructor(unpaid_leave_category: string) {
10
+ super();
11
+ this.unpaid_leave_category = unpaid_leave_category;
12
+ }
13
+ }
package/tsconfig.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "compilerOptions": {
3
- "target": "ES2020",
3
+ "target": "ES2022",
4
4
  "module": "CommonJS",
5
5
  "declaration": true,
6
6
  "outDir": "./dist",
@@ -9,7 +9,8 @@
9
9
  "skipLibCheck": true,
10
10
  "strictPropertyInitialization": false,
11
11
  "experimentalDecorators": true,
12
- "emitDecoratorMetadata": true
12
+ "emitDecoratorMetadata": true,
13
+ "useDefineForClassFields": false
13
14
  },
14
15
  "include": ["src"],
15
16
  "exclude": ["node_modules", "dist"]