@platform-modules/foreign-ministry 1.0.91 → 1.0.92

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 (51) hide show
  1. package/.env +7 -1
  2. package/dist/data-source.js +1 -35
  3. package/dist/index.d.ts +0 -17
  4. package/dist/index.js +0 -17
  5. package/dist/models/LeaveApprovalDetailsModel.d.ts +13 -0
  6. package/dist/models/LeaveApprovalDetailsModel.js +51 -0
  7. package/dist/models/LeaveApprovalMatrixModel.d.ts +7 -0
  8. package/dist/models/LeaveApprovalMatrixModel.js +40 -0
  9. package/dist/models/userRolesModel.d.ts +1 -2
  10. package/dist/models/userRolesModel.js +2 -7
  11. package/package.json +1 -1
  12. package/src/models/LeaveApprovalsModel.ts +10 -2
  13. package/src/models/LeaveRequestModel.ts +13 -1
  14. package/dist/models/AllowanceRequestsModel.d.ts +0 -13
  15. package/dist/models/AllowanceRequestsModel.js +0 -64
  16. package/dist/models/AllowanceTypesModel.d.ts +0 -8
  17. package/dist/models/AllowanceTypesModel.js +0 -43
  18. package/dist/models/BankAccountChangeRequestsModel.d.ts +0 -12
  19. package/dist/models/BankAccountChangeRequestsModel.js +0 -62
  20. package/dist/models/FinancialApprovalsModel.d.ts +0 -22
  21. package/dist/models/FinancialApprovalsModel.js +0 -84
  22. package/dist/models/FinancialAttachmentsModel.d.ts +0 -10
  23. package/dist/models/FinancialAttachmentsModel.js +0 -50
  24. package/dist/models/FinancialChatsModel.d.ts +0 -9
  25. package/dist/models/FinancialChatsModel.js +0 -45
  26. package/dist/models/FinancialRequestsModel.d.ts +0 -51
  27. package/dist/models/FinancialRequestsModel.js +0 -158
  28. package/dist/models/FinancialSettingsModel.d.ts +0 -11
  29. package/dist/models/FinancialSettingsModel.js +0 -59
  30. package/dist/models/FinancialWorkFlowModel.d.ts +0 -18
  31. package/dist/models/FinancialWorkFlowModel.js +0 -67
  32. package/dist/models/NotificationModel.d.ts +0 -18
  33. package/dist/models/NotificationModel.js +0 -79
  34. package/dist/models/PayslipRequestsModel.d.ts +0 -10
  35. package/dist/models/PayslipRequestsModel.js +0 -50
  36. package/dist/models/ReimbursementRequestsModel.d.ts +0 -16
  37. package/dist/models/ReimbursementRequestsModel.js +0 -78
  38. package/dist/models/RequestTypeMasterModel.d.ts +0 -13
  39. package/dist/models/RequestTypeMasterModel.js +0 -59
  40. package/dist/models/SalaryCertificateRequestsModel.d.ts +0 -9
  41. package/dist/models/SalaryCertificateRequestsModel.js +0 -45
  42. package/dist/models/WorkflowDefinitions.d.ts +0 -16
  43. package/dist/models/WorkflowDefinitions.js +0 -86
  44. package/dist/models/WorkflowHierarchy.d.ts +0 -16
  45. package/dist/models/WorkflowHierarchy.js +0 -81
  46. package/dist/models/WorkflowTask.d.ts +0 -7
  47. package/dist/models/WorkflowTask.js +0 -39
  48. package/dist/models/WorkflowTaskNames.d.ts +0 -8
  49. package/dist/models/WorkflowTaskNames.js +0 -44
  50. package/dist/models/questionTagsModel.d.ts +0 -6
  51. package/dist/models/questionTagsModel.js +0 -34
package/.env CHANGED
@@ -2,4 +2,10 @@ DB_HOST=localhost
2
2
  DB_PORT=5432
3
3
  DB_USER=postgres
4
4
  DB_PASS=Fa@123
5
- DB_NAME=FM
5
+ DB_NAME=FM
6
+
7
+ # DB_HOST=164.52.222.169
8
+ # DB_PORT=5432
9
+ # DB_USER=postgres_admin_user
10
+ # DB_PASS=pg_admin_user_pwd_caa_fa_$%^&OIukhjgcvbn
11
+ # DB_NAME=FM
@@ -53,23 +53,6 @@ const HolidaysModel_1 = require("./models/HolidaysModel");
53
53
  const userRolesModel_1 = require("./models/userRolesModel");
54
54
  const roleRightsModel_1 = require("./models/roleRightsModel");
55
55
  const PortalFeedbackModel_1 = require("./models/PortalFeedbackModel");
56
- const NotificationModel_1 = require("./models/NotificationModel");
57
- const FinancialRequestsModel_1 = require("./models/FinancialRequestsModel");
58
- const FinancialApprovalsModel_1 = require("./models/FinancialApprovalsModel");
59
- const FinancialSettingsModel_1 = require("./models/FinancialSettingsModel");
60
- const PayslipRequestsModel_1 = require("./models/PayslipRequestsModel");
61
- const SalaryCertificateRequestsModel_1 = require("./models/SalaryCertificateRequestsModel");
62
- const AllowanceRequestsModel_1 = require("./models/AllowanceRequestsModel");
63
- const ReimbursementRequestsModel_1 = require("./models/ReimbursementRequestsModel");
64
- const BankAccountChangeRequestsModel_1 = require("./models/BankAccountChangeRequestsModel");
65
- const FinancialChatsModel_1 = require("./models/FinancialChatsModel");
66
- const FinancialWorkFlowModel_1 = require("./models/FinancialWorkFlowModel");
67
- const FinancialAttachmentsModel_1 = require("./models/FinancialAttachmentsModel");
68
- const RequestTypeMasterModel_1 = require("./models/RequestTypeMasterModel");
69
- const WorkflowTask_1 = require("./models/WorkflowTask");
70
- const WorkflowTaskNames_1 = require("./models/WorkflowTaskNames");
71
- const WorkflowDefinitions_1 = require("./models/WorkflowDefinitions");
72
- const WorkflowHierarchy_1 = require("./models/WorkflowHierarchy");
73
56
  exports.AppDataSource = new typeorm_1.DataSource({
74
57
  type: 'postgres',
75
58
  host: process.env.DB_HOST || 'localhost',
@@ -127,23 +110,6 @@ exports.AppDataSource = new typeorm_1.DataSource({
127
110
  HolidaysModel_1.Holidays,
128
111
  userRolesModel_1.UserRole,
129
112
  roleRightsModel_1.RoleRights,
130
- PortalFeedbackModel_1.PortalFeedback,
131
- NotificationModel_1.Notification,
132
- FinancialRequestsModel_1.FinancialRequests,
133
- FinancialApprovalsModel_1.FinancialApprovals,
134
- FinancialSettingsModel_1.FinancialSettings,
135
- PayslipRequestsModel_1.PayslipRequests,
136
- SalaryCertificateRequestsModel_1.SalaryCertificateRequests,
137
- AllowanceRequestsModel_1.AllowanceRequests,
138
- ReimbursementRequestsModel_1.ReimbursementRequests,
139
- BankAccountChangeRequestsModel_1.BankAccountChangeRequests,
140
- FinancialChatsModel_1.FinancialChats,
141
- FinancialWorkFlowModel_1.FinancialWorkFlow,
142
- FinancialAttachmentsModel_1.FinancialAttachments,
143
- RequestTypeMasterModel_1.RequestTypeMaster,
144
- WorkflowTask_1.WorkflowTask,
145
- WorkflowTaskNames_1.WorkflowTaskNames,
146
- WorkflowDefinitions_1.WorkflowDefinitions,
147
- WorkflowHierarchy_1.WorkflowHierarchy,
113
+ PortalFeedbackModel_1.PortalFeedback
148
114
  ],
149
115
  });
package/dist/index.d.ts CHANGED
@@ -46,20 +46,3 @@ export * from './models/HolidaysModel';
46
46
  export * from './models/userRolesModel';
47
47
  export * from './models/roleRightsModel';
48
48
  export * from './models/PortalFeedbackModel';
49
- export * from './models/NotificationModel';
50
- export * from './models/FinancialRequestsModel';
51
- export * from './models/FinancialApprovalsModel';
52
- export * from './models/FinancialSettingsModel';
53
- export * from './models/PayslipRequestsModel';
54
- export * from './models/SalaryCertificateRequestsModel';
55
- export * from './models/AllowanceRequestsModel';
56
- export * from './models/ReimbursementRequestsModel';
57
- export * from './models/BankAccountChangeRequestsModel';
58
- export * from './models/FinancialChatsModel';
59
- export * from './models/FinancialAttachmentsModel';
60
- export * from './models/FinancialWorkFlowModel';
61
- export * from './models/RequestTypeMasterModel';
62
- export * from './models/WorkflowTask';
63
- export * from './models/WorkflowTaskNames';
64
- export * from './models/WorkflowDefinitions';
65
- export * from './models/WorkflowHierarchy';
package/dist/index.js CHANGED
@@ -62,20 +62,3 @@ __exportStar(require("./models/HolidaysModel"), exports);
62
62
  __exportStar(require("./models/userRolesModel"), exports);
63
63
  __exportStar(require("./models/roleRightsModel"), exports);
64
64
  __exportStar(require("./models/PortalFeedbackModel"), exports);
65
- __exportStar(require("./models/NotificationModel"), exports);
66
- __exportStar(require("./models/FinancialRequestsModel"), exports);
67
- __exportStar(require("./models/FinancialApprovalsModel"), exports);
68
- __exportStar(require("./models/FinancialSettingsModel"), exports);
69
- __exportStar(require("./models/PayslipRequestsModel"), exports);
70
- __exportStar(require("./models/SalaryCertificateRequestsModel"), exports);
71
- __exportStar(require("./models/AllowanceRequestsModel"), exports);
72
- __exportStar(require("./models/ReimbursementRequestsModel"), exports);
73
- __exportStar(require("./models/BankAccountChangeRequestsModel"), exports);
74
- __exportStar(require("./models/FinancialChatsModel"), exports);
75
- __exportStar(require("./models/FinancialAttachmentsModel"), exports);
76
- __exportStar(require("./models/FinancialWorkFlowModel"), exports);
77
- __exportStar(require("./models/RequestTypeMasterModel"), exports);
78
- __exportStar(require("./models/WorkflowTask"), exports);
79
- __exportStar(require("./models/WorkflowTaskNames"), exports);
80
- __exportStar(require("./models/WorkflowDefinitions"), exports);
81
- __exportStar(require("./models/WorkflowHierarchy"), exports);
@@ -0,0 +1,13 @@
1
+ import { BaseModel } from './BaseModel';
2
+ export declare enum ApprovalStatus {
3
+ PENDING = "Pending",
4
+ APPROVED = "Approved",
5
+ REJECTED = "Rejected"
6
+ }
7
+ export declare class LeaveApprovalDetails extends BaseModel {
8
+ leave_request_id: number;
9
+ level: number;
10
+ approver_id: number;
11
+ approval_status: ApprovalStatus;
12
+ constructor(leave_request_id: number, approver_id: number, approval_status: ApprovalStatus, level: number);
13
+ }
@@ -0,0 +1,51 @@
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 = exports.ApprovalStatus = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ var ApprovalStatus;
16
+ (function (ApprovalStatus) {
17
+ ApprovalStatus["PENDING"] = "Pending";
18
+ ApprovalStatus["APPROVED"] = "Approved";
19
+ ApprovalStatus["REJECTED"] = "Rejected";
20
+ })(ApprovalStatus || (exports.ApprovalStatus = ApprovalStatus = {}));
21
+ //This model is used to store the store the leave apporval details of the user for the leave request
22
+ let LeaveApprovalDetails = class LeaveApprovalDetails extends BaseModel_1.BaseModel {
23
+ constructor(leave_request_id, approver_id, approval_status, level) {
24
+ super();
25
+ this.leave_request_id = leave_request_id;
26
+ this.approver_id = approver_id;
27
+ this.approval_status = approval_status;
28
+ this.level = level;
29
+ }
30
+ };
31
+ exports.LeaveApprovalDetails = LeaveApprovalDetails;
32
+ __decorate([
33
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
34
+ __metadata("design:type", Number)
35
+ ], LeaveApprovalDetails.prototype, "leave_request_id", void 0);
36
+ __decorate([
37
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
38
+ __metadata("design:type", Number)
39
+ ], LeaveApprovalDetails.prototype, "level", void 0);
40
+ __decorate([
41
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
42
+ __metadata("design:type", Number)
43
+ ], LeaveApprovalDetails.prototype, "approver_id", void 0);
44
+ __decorate([
45
+ (0, typeorm_1.Column)({ type: 'enum', enum: ApprovalStatus, default: ApprovalStatus.PENDING, nullable: false }),
46
+ __metadata("design:type", String)
47
+ ], LeaveApprovalDetails.prototype, "approval_status", void 0);
48
+ exports.LeaveApprovalDetails = LeaveApprovalDetails = __decorate([
49
+ (0, typeorm_1.Entity)({ name: 'leave_approval_details' }),
50
+ __metadata("design:paramtypes", [Number, Number, String, Number])
51
+ ], 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: string;
6
+ constructor(leave_type: number, level: number, approval_matrix: string);
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(HOD, Manager, HR, Director) 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: 'varchar', length: 255, nullable: false }),
35
+ __metadata("design:type", String)
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, String])
40
+ ], LeaveApprovalMatrix);
@@ -14,6 +14,5 @@ export declare class UserRole extends BaseModel {
14
14
  user_id: number;
15
15
  department_id: number;
16
16
  section_id: number;
17
- is_active: boolean;
18
- constructor(role_id: number, user_id: number, department_id: number, section_id: number, is_active?: boolean);
17
+ constructor(role_id: number, user_id: number, department_id: number, section_id: number);
19
18
  }
@@ -23,13 +23,12 @@ exports.UserRole = void 0;
23
23
  const typeorm_1 = require("typeorm");
24
24
  const BaseModel_1 = require("./BaseModel");
25
25
  let UserRole = class UserRole extends BaseModel_1.BaseModel {
26
- constructor(role_id, user_id, department_id, section_id, is_active = false) {
26
+ constructor(role_id, user_id, department_id, section_id) {
27
27
  super();
28
28
  this.role_id = role_id;
29
29
  this.user_id = user_id;
30
30
  this.department_id = department_id;
31
31
  this.section_id = section_id;
32
- this.is_active = is_active;
33
32
  }
34
33
  };
35
34
  exports.UserRole = UserRole;
@@ -49,11 +48,7 @@ __decorate([
49
48
  (0, typeorm_1.Column)({ type: 'bigint', nullable: true }),
50
49
  __metadata("design:type", Number)
51
50
  ], UserRole.prototype, "section_id", void 0);
52
- __decorate([
53
- (0, typeorm_1.Column)({ type: 'boolean', default: false }),
54
- __metadata("design:type", Boolean)
55
- ], UserRole.prototype, "is_active", void 0);
56
51
  exports.UserRole = UserRole = __decorate([
57
52
  (0, typeorm_1.Entity)({ name: 'user_role' }),
58
- __metadata("design:paramtypes", [Number, Number, Number, Number, Boolean])
53
+ __metadata("design:paramtypes", [Number, Number, Number, Number])
59
54
  ], UserRole);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platform-modules/foreign-ministry",
3
- "version": "1.0.91",
3
+ "version": "1.0.92",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {
@@ -20,20 +20,28 @@ export class LeaveApprovalDetails extends BaseModel {
20
20
  @Column({ type: 'int', nullable: true })
21
21
  approver_user_id: number;
22
22
 
23
- @Column({ type: 'int', nullable: false })
23
+ @Column({ type: 'int', nullable: true })
24
24
  approver_role_id: number;
25
25
 
26
+ @Column({ type: 'int', nullable: true })
27
+ department_id: number;
28
+
29
+ @Column({ type: 'int', nullable: true })
30
+ section_id: number;
31
+
26
32
  @Column({ type: 'varchar', length: 255, nullable: false })
27
33
  comment: string;
28
34
 
29
35
  @Column({ type: 'enum', enum: ApprovalStatus,default: ApprovalStatus.PENDING, nullable: false })
30
36
  approval_status: ApprovalStatus;
31
37
 
32
- constructor(leave_request_id: number, approver_user_id: number, approver_role_id: number, comment: string, approval_status: ApprovalStatus, level: number) {
38
+ constructor(leave_request_id: number, approver_user_id: number, approver_role_id: number, comment: string, approval_status: ApprovalStatus, level: number, department_id: number, section_id: number) {
33
39
  super();
34
40
  this.leave_request_id = leave_request_id;
35
41
  this.approver_user_id = approver_user_id;
36
42
  this.approver_role_id = approver_role_id;
43
+ this.department_id = department_id;
44
+ this.section_id = section_id;
37
45
  this.comment = comment;
38
46
  this.approval_status = approval_status;
39
47
  this.level = level;
@@ -85,8 +85,17 @@ export class LeaveRequests extends BaseModel {
85
85
  @Column({ type: 'int', nullable: true })
86
86
  mounring_leave_relation: number;
87
87
 
88
+ @Column({ type: 'int', nullable: true })
89
+ service_id: number | null;
90
+
91
+ @Column({ type: 'int', nullable: true })
92
+ sub_service_id: number | null;
93
+
94
+ @Column({ type: 'varchar', length: 255, nullable: true })
95
+ workflow_execution_id: string | null;
96
+
88
97
 
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) {
98
+ 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, service_id: number, sub_service_id: number, workflow_execution_id: string) {
90
99
  super();
91
100
  this.user_id = user_id;
92
101
  this.leave_for = leave_for;
@@ -112,5 +121,8 @@ export class LeaveRequests extends BaseModel {
112
121
  this.activity_title = activity_title;
113
122
  this.relationship = relationship;
114
123
  this.mounring_leave_relation = mounring_leave_relation;
124
+ this.service_id = service_id;
125
+ this.sub_service_id = sub_service_id;
126
+ this.workflow_execution_id = workflow_execution_id;
115
127
  }
116
128
  }
@@ -1,13 +0,0 @@
1
- import { BaseModel } from './BaseModel';
2
- import { FinancialRequests } from "./FinancialRequestsModel";
3
- export declare class AllowanceRequests extends BaseModel {
4
- financial_request_id: number;
5
- allowance_type_id: number;
6
- allowance_amount: number;
7
- approved_allowance_amount: number;
8
- currency: string;
9
- contact_number: string;
10
- description: string;
11
- financialRequest?: FinancialRequests;
12
- constructor(financial_request_id: number, allowance_type_id: number, allowance_amount: number, approved_allowance_amount: number, currency: string, contact_number: string, description: string);
13
- }
@@ -1,64 +0,0 @@
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.AllowanceRequests = void 0;
13
- const typeorm_1 = require("typeorm");
14
- const BaseModel_1 = require("./BaseModel");
15
- const FinancialRequestsModel_1 = require("./FinancialRequestsModel");
16
- let AllowanceRequests = class AllowanceRequests extends BaseModel_1.BaseModel {
17
- constructor(financial_request_id, allowance_type_id, allowance_amount, approved_allowance_amount, currency, contact_number, description) {
18
- super();
19
- this.financial_request_id = financial_request_id;
20
- this.allowance_type_id = allowance_type_id;
21
- this.allowance_amount = allowance_amount;
22
- this.approved_allowance_amount = approved_allowance_amount;
23
- this.currency = currency;
24
- this.contact_number = contact_number;
25
- this.description = description;
26
- }
27
- };
28
- exports.AllowanceRequests = AllowanceRequests;
29
- __decorate([
30
- (0, typeorm_1.Column)({ type: 'int', unique: true }),
31
- __metadata("design:type", Number)
32
- ], AllowanceRequests.prototype, "financial_request_id", void 0);
33
- __decorate([
34
- (0, typeorm_1.Column)({ type: 'int' }),
35
- __metadata("design:type", Number)
36
- ], AllowanceRequests.prototype, "allowance_type_id", void 0);
37
- __decorate([
38
- (0, typeorm_1.Column)({ type: 'decimal', precision: 10, scale: 2 }),
39
- __metadata("design:type", Number)
40
- ], AllowanceRequests.prototype, "allowance_amount", void 0);
41
- __decorate([
42
- (0, typeorm_1.Column)({ type: 'decimal', precision: 10, scale: 2, nullable: true }),
43
- __metadata("design:type", Number)
44
- ], AllowanceRequests.prototype, "approved_allowance_amount", void 0);
45
- __decorate([
46
- (0, typeorm_1.Column)({ type: 'boolean', default: false }),
47
- __metadata("design:type", String)
48
- ], AllowanceRequests.prototype, "currency", void 0);
49
- __decorate([
50
- (0, typeorm_1.Column)({ type: 'varchar', length: 10, nullable: true }),
51
- __metadata("design:type", String)
52
- ], AllowanceRequests.prototype, "contact_number", void 0);
53
- __decorate([
54
- (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
55
- __metadata("design:type", String)
56
- ], AllowanceRequests.prototype, "description", void 0);
57
- __decorate([
58
- (0, typeorm_1.OneToOne)('FinancialRequests', 'allowanceRequest'),
59
- __metadata("design:type", FinancialRequestsModel_1.FinancialRequests)
60
- ], AllowanceRequests.prototype, "financialRequest", void 0);
61
- exports.AllowanceRequests = AllowanceRequests = __decorate([
62
- (0, typeorm_1.Entity)({ name: 'allowance_requests' }),
63
- __metadata("design:paramtypes", [Number, Number, Number, Number, String, String, String])
64
- ], AllowanceRequests);
@@ -1,8 +0,0 @@
1
- import { BaseModel } from './BaseModel';
2
- export declare class AllowanceTypes extends BaseModel {
3
- allowance_code: string;
4
- allowance_name: string;
5
- description: string;
6
- is_active: boolean;
7
- constructor(allowance_code: string, allowance_name: string);
8
- }
@@ -1,43 +0,0 @@
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.AllowanceTypes = void 0;
13
- const typeorm_1 = require("typeorm");
14
- const BaseModel_1 = require("./BaseModel");
15
- let AllowanceTypes = class AllowanceTypes extends BaseModel_1.BaseModel {
16
- constructor(allowance_code, allowance_name) {
17
- super();
18
- this.allowance_code = allowance_code;
19
- this.allowance_name = allowance_name;
20
- this.is_active = true;
21
- }
22
- };
23
- exports.AllowanceTypes = AllowanceTypes;
24
- __decorate([
25
- (0, typeorm_1.Column)({ type: 'varchar', length: 100, unique: true }),
26
- __metadata("design:type", String)
27
- ], AllowanceTypes.prototype, "allowance_code", void 0);
28
- __decorate([
29
- (0, typeorm_1.Column)({ type: 'varchar', length: 255 }),
30
- __metadata("design:type", String)
31
- ], AllowanceTypes.prototype, "allowance_name", void 0);
32
- __decorate([
33
- (0, typeorm_1.Column)({ type: 'text', nullable: true }),
34
- __metadata("design:type", String)
35
- ], AllowanceTypes.prototype, "description", void 0);
36
- __decorate([
37
- (0, typeorm_1.Column)({ type: 'boolean', default: true }),
38
- __metadata("design:type", Boolean)
39
- ], AllowanceTypes.prototype, "is_active", void 0);
40
- exports.AllowanceTypes = AllowanceTypes = __decorate([
41
- (0, typeorm_1.Entity)({ name: 'allowance_types' }),
42
- __metadata("design:paramtypes", [String, String])
43
- ], AllowanceTypes);
@@ -1,12 +0,0 @@
1
- import { BaseModel } from './BaseModel';
2
- export declare class BankAccountChangeRequests extends BaseModel {
3
- financial_request_id: number;
4
- old_bank_name: string;
5
- old_account_number: string;
6
- new_bank_name: string;
7
- new_account_number: string;
8
- new_account_name: string;
9
- new_branch_ifsc_code: string;
10
- reason_for_change: string;
11
- constructor(financial_request_id: number, new_bank_name: string, new_account_number: string, new_account_name: string, new_branch_ifsc_code: string, reason_for_change: string);
12
- }
@@ -1,62 +0,0 @@
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.BankAccountChangeRequests = void 0;
13
- const typeorm_1 = require("typeorm");
14
- const BaseModel_1 = require("./BaseModel");
15
- let BankAccountChangeRequests = class BankAccountChangeRequests extends BaseModel_1.BaseModel {
16
- constructor(financial_request_id, new_bank_name, new_account_number, new_account_name, new_branch_ifsc_code, reason_for_change) {
17
- super();
18
- this.financial_request_id = financial_request_id;
19
- this.new_bank_name = new_bank_name;
20
- this.new_account_number = new_account_number;
21
- this.new_account_name = new_account_name;
22
- this.new_branch_ifsc_code = new_branch_ifsc_code;
23
- this.reason_for_change = reason_for_change;
24
- }
25
- };
26
- exports.BankAccountChangeRequests = BankAccountChangeRequests;
27
- __decorate([
28
- (0, typeorm_1.Column)({ type: 'int', unique: true }),
29
- __metadata("design:type", Number)
30
- ], BankAccountChangeRequests.prototype, "financial_request_id", void 0);
31
- __decorate([
32
- (0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
33
- __metadata("design:type", String)
34
- ], BankAccountChangeRequests.prototype, "old_bank_name", void 0);
35
- __decorate([
36
- (0, typeorm_1.Column)({ type: 'varchar', length: 50, nullable: true }),
37
- __metadata("design:type", String)
38
- ], BankAccountChangeRequests.prototype, "old_account_number", void 0);
39
- __decorate([
40
- (0, typeorm_1.Column)({ type: 'varchar', length: 100 }),
41
- __metadata("design:type", String)
42
- ], BankAccountChangeRequests.prototype, "new_bank_name", void 0);
43
- __decorate([
44
- (0, typeorm_1.Column)({ type: 'varchar', length: 50 }),
45
- __metadata("design:type", String)
46
- ], BankAccountChangeRequests.prototype, "new_account_number", void 0);
47
- __decorate([
48
- (0, typeorm_1.Column)({ type: 'varchar', length: 50, nullable: true }),
49
- __metadata("design:type", String)
50
- ], BankAccountChangeRequests.prototype, "new_account_name", void 0);
51
- __decorate([
52
- (0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
53
- __metadata("design:type", String)
54
- ], BankAccountChangeRequests.prototype, "new_branch_ifsc_code", void 0);
55
- __decorate([
56
- (0, typeorm_1.Column)({ type: 'text' }),
57
- __metadata("design:type", String)
58
- ], BankAccountChangeRequests.prototype, "reason_for_change", void 0);
59
- exports.BankAccountChangeRequests = BankAccountChangeRequests = __decorate([
60
- (0, typeorm_1.Entity)({ name: 'bank_account_change_requests' }),
61
- __metadata("design:paramtypes", [Number, String, String, String, String, String])
62
- ], BankAccountChangeRequests);
@@ -1,22 +0,0 @@
1
- import { BaseModel } from './BaseModel';
2
- import { FinancialRequests } from './FinancialRequestsModel';
3
- export declare enum FinancialApprovalStatus {
4
- PENDING = "Pending",
5
- APPROVED = "Approved",
6
- REJECTED = "Rejected",
7
- SKIPPED = "Skipped"
8
- }
9
- export declare class FinancialApprovals extends BaseModel {
10
- financial_request_id: number;
11
- level: number;
12
- approver_user_id: number | null;
13
- approver_role_id: number;
14
- comment: string | null;
15
- approval_status: FinancialApprovalStatus;
16
- action_date: Date;
17
- department_id: number | null;
18
- section_id: number | null;
19
- approved_by: number | null;
20
- financialRequest?: FinancialRequests;
21
- constructor(financial_request_id: number, level: number, approver_role_id: number, approval_status: FinancialApprovalStatus, department_id: number | null, section_id: number | null, approved_by: number | null);
22
- }
@@ -1,84 +0,0 @@
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.FinancialApprovals = exports.FinancialApprovalStatus = void 0;
13
- const typeorm_1 = require("typeorm");
14
- const BaseModel_1 = require("./BaseModel");
15
- const FinancialRequestsModel_1 = require("./FinancialRequestsModel");
16
- var FinancialApprovalStatus;
17
- (function (FinancialApprovalStatus) {
18
- FinancialApprovalStatus["PENDING"] = "Pending";
19
- FinancialApprovalStatus["APPROVED"] = "Approved";
20
- FinancialApprovalStatus["REJECTED"] = "Rejected";
21
- FinancialApprovalStatus["SKIPPED"] = "Skipped";
22
- })(FinancialApprovalStatus || (exports.FinancialApprovalStatus = FinancialApprovalStatus = {}));
23
- let FinancialApprovals = class FinancialApprovals extends BaseModel_1.BaseModel {
24
- constructor(financial_request_id, level, approver_role_id, approval_status, department_id, section_id, approved_by) {
25
- super();
26
- this.financial_request_id = financial_request_id;
27
- this.level = level;
28
- this.approver_role_id = approver_role_id;
29
- this.approval_status = approval_status;
30
- this.department_id = department_id;
31
- this.section_id = section_id;
32
- this.approved_by = approved_by;
33
- }
34
- };
35
- exports.FinancialApprovals = FinancialApprovals;
36
- __decorate([
37
- (0, typeorm_1.Column)({ type: 'int' }),
38
- __metadata("design:type", Number)
39
- ], FinancialApprovals.prototype, "financial_request_id", void 0);
40
- __decorate([
41
- (0, typeorm_1.Column)({ type: 'int' }),
42
- __metadata("design:type", Number)
43
- ], FinancialApprovals.prototype, "level", void 0);
44
- __decorate([
45
- (0, typeorm_1.Column)({ type: 'int', nullable: true }),
46
- __metadata("design:type", Object)
47
- ], FinancialApprovals.prototype, "approver_user_id", void 0);
48
- __decorate([
49
- (0, typeorm_1.Column)({ type: 'int' }),
50
- __metadata("design:type", Number)
51
- ], FinancialApprovals.prototype, "approver_role_id", void 0);
52
- __decorate([
53
- (0, typeorm_1.Column)({ type: 'text', nullable: true }),
54
- __metadata("design:type", Object)
55
- ], FinancialApprovals.prototype, "comment", void 0);
56
- __decorate([
57
- (0, typeorm_1.Column)({ type: 'enum', enum: FinancialApprovalStatus, default: FinancialApprovalStatus.PENDING }),
58
- __metadata("design:type", String)
59
- ], FinancialApprovals.prototype, "approval_status", void 0);
60
- __decorate([
61
- (0, typeorm_1.Column)({ type: 'timestamp', nullable: true }),
62
- __metadata("design:type", Date)
63
- ], FinancialApprovals.prototype, "action_date", void 0);
64
- __decorate([
65
- (0, typeorm_1.Column)({ type: 'int', nullable: true }),
66
- __metadata("design:type", Object)
67
- ], FinancialApprovals.prototype, "department_id", void 0);
68
- __decorate([
69
- (0, typeorm_1.Column)({ type: 'int', nullable: true }),
70
- __metadata("design:type", Object)
71
- ], FinancialApprovals.prototype, "section_id", void 0);
72
- __decorate([
73
- (0, typeorm_1.Column)({ type: 'int', nullable: true }),
74
- __metadata("design:type", Object)
75
- ], FinancialApprovals.prototype, "approved_by", void 0);
76
- __decorate([
77
- (0, typeorm_1.ManyToOne)(() => FinancialRequestsModel_1.FinancialRequests, fr => fr.approvals),
78
- (0, typeorm_1.JoinColumn)({ name: 'financial_request_id' }),
79
- __metadata("design:type", FinancialRequestsModel_1.FinancialRequests)
80
- ], FinancialApprovals.prototype, "financialRequest", void 0);
81
- exports.FinancialApprovals = FinancialApprovals = __decorate([
82
- (0, typeorm_1.Entity)({ name: 'financial_approvals' }),
83
- __metadata("design:paramtypes", [Number, Number, Number, String, Object, Object, Object])
84
- ], FinancialApprovals);