@platform-modules/foreign-ministry 1.0.80 → 1.0.82

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 (75) hide show
  1. package/.env +2 -2
  2. package/dist/data-source.js +2 -12
  3. package/dist/index.d.ts +13 -5
  4. package/dist/index.js +13 -5
  5. package/dist/models/AllowanceRequestsModel.d.ts +9 -0
  6. package/dist/models/AllowanceRequestsModel.js +49 -0
  7. package/dist/models/AllowanceTypesModel.d.ts +8 -0
  8. package/dist/models/AllowanceTypesModel.js +43 -0
  9. package/dist/models/BankAccountChangeRequestsModel.d.ts +12 -0
  10. package/dist/models/BankAccountChangeRequestsModel.js +62 -0
  11. package/dist/models/FMServices.js +1 -1
  12. package/dist/models/FinancialApprovalsModel.d.ts +19 -0
  13. package/dist/models/FinancialApprovalsModel.js +69 -0
  14. package/dist/models/FinancialAttachmentsModel.d.ts +10 -0
  15. package/dist/models/FinancialAttachmentsModel.js +50 -0
  16. package/dist/models/FinancialChatsModel.d.ts +9 -0
  17. package/dist/models/FinancialChatsModel.js +45 -0
  18. package/dist/models/FinancialRequestsModel.d.ts +49 -0
  19. package/dist/models/FinancialRequestsModel.js +154 -0
  20. package/dist/models/FinancialSettingsModel.d.ts +8 -0
  21. package/dist/models/FinancialSettingsModel.js +44 -0
  22. package/dist/models/FinancialWorkFlowModel.d.ts +18 -0
  23. package/dist/models/FinancialWorkFlowModel.js +67 -0
  24. package/dist/models/PayslipRequestsModel.d.ts +10 -0
  25. package/dist/models/PayslipRequestsModel.js +50 -0
  26. package/dist/models/ReimbursementRequestsModel.d.ts +14 -0
  27. package/dist/models/ReimbursementRequestsModel.js +73 -0
  28. package/dist/models/RequestTypeMasterModel.d.ts +11 -0
  29. package/dist/models/RequestTypeMasterModel.js +55 -0
  30. package/dist/models/SalaryCertificateRequestsModel.d.ts +12 -0
  31. package/dist/models/SalaryCertificateRequestsModel.js +62 -0
  32. package/dist/models/role.d.ts +7 -1
  33. package/dist/models/role.js +2 -2
  34. package/dist/models/user.d.ts +1 -5
  35. package/dist/models/user.js +2 -22
  36. package/package.json +1 -1
  37. package/src/data-source.ts +2 -12
  38. package/src/index.ts +13 -5
  39. package/src/models/AllowanceRequestsModel.ts +38 -0
  40. package/src/models/AllowanceTypesModel.ts +26 -0
  41. package/src/models/BankAccountChangeRequestsModel.ts +50 -0
  42. package/src/models/FMServices.ts +1 -1
  43. package/src/models/FinancialApprovalsModel.ts +52 -0
  44. package/src/models/FinancialAttachmentsModel.ts +35 -0
  45. package/src/models/FinancialChatsModel.ts +27 -0
  46. package/src/models/FinancialRequestsModel.ts +122 -0
  47. package/src/models/FinancialSettingsModel.ts +30 -0
  48. package/src/models/FinancialWorkFlowModel.ts +51 -0
  49. package/src/models/PayslipRequestsModel.ts +31 -0
  50. package/src/models/ReimbursementRequestsModel.ts +58 -0
  51. package/src/models/RequestTypeMasterModel.ts +36 -0
  52. package/src/models/SalaryCertificateRequestsModel.ts +40 -0
  53. package/src/models/role.ts +7 -1
  54. package/src/models/user.ts +0 -21
  55. package/dist/models/HelpContentMappedCategoriesModel.d.ts +0 -6
  56. package/dist/models/HelpContentMappedCategoriesModel.js +0 -34
  57. package/dist/models/HelpContentMappedTagsModel.d.ts +0 -6
  58. package/dist/models/HelpContentMappedTagsModel.js +0 -34
  59. package/dist/models/HelpContentTagsModel.d.ts +0 -5
  60. package/dist/models/HelpContentTagsModel.js +0 -29
  61. package/dist/models/HolidaysModel.d.ts +0 -11
  62. package/dist/models/HolidaysModel.js +0 -59
  63. package/dist/models/NotificationModel.d.ts +0 -18
  64. package/dist/models/NotificationModel.js +0 -79
  65. package/dist/models/PortalFeedbackModel.d.ts +0 -8
  66. package/dist/models/PortalFeedbackModel.js +0 -44
  67. package/dist/models/roleRightsModel.d.ts +0 -16
  68. package/dist/models/roleRightsModel.js +0 -44
  69. package/dist/models/userRolesModel.d.ts +0 -19
  70. package/dist/models/userRolesModel.js +0 -59
  71. package/src/models/HolidaysModel.ts +0 -46
  72. package/src/models/NotificationModel.ts +0 -68
  73. package/src/models/PortalFeedbackModel.ts +0 -33
  74. package/src/models/roleRightsModel.ts +0 -31
  75. package/src/models/userRolesModel.ts +0 -42
package/.env CHANGED
@@ -1,5 +1,5 @@
1
1
  DB_HOST=localhost
2
- DB_PORT=5433
2
+ DB_PORT=5432
3
3
  DB_USER=postgres
4
- DB_PASS=123
4
+ DB_PASS=Fa@123
5
5
  DB_NAME=FM
@@ -49,11 +49,6 @@ const MessageReadStatusModel_1 = require("./models/MessageReadStatusModel");
49
49
  const ShifttimesModel_1 = require("./models/ShifttimesModel");
50
50
  const AttendanceModel_1 = require("./models/AttendanceModel");
51
51
  const UserShiftModel_1 = require("./models/UserShiftModel");
52
- const HolidaysModel_1 = require("./models/HolidaysModel");
53
- const userRolesModel_1 = require("./models/userRolesModel");
54
- const roleRightsModel_1 = require("./models/roleRightsModel");
55
- const PortalFeedbackModel_1 = require("./models/PortalFeedbackModel");
56
- const NotificationModel_1 = require("./models/NotificationModel");
57
52
  exports.AppDataSource = new typeorm_1.DataSource({
58
53
  type: 'postgres',
59
54
  host: process.env.DB_HOST || 'localhost',
@@ -61,7 +56,7 @@ exports.AppDataSource = new typeorm_1.DataSource({
61
56
  username: process.env.DB_USER || 'postgres',
62
57
  password: process.env.DB_PASS || 'postgres',
63
58
  database: process.env.DB_NAME || 'common_models',
64
- synchronize: true, // auto-create tables (disable in prod)
59
+ synchronize: false, // auto-create tables (disable in prod)
65
60
  logging: false,
66
61
  entities: [
67
62
  user_1.User,
@@ -107,11 +102,6 @@ exports.AppDataSource = new typeorm_1.DataSource({
107
102
  MessageReadStatusModel_1.MessageReadStatus,
108
103
  ShifttimesModel_1.ShiftDetails,
109
104
  AttendanceModel_1.AttendanceDetails,
110
- UserShiftModel_1.UserShift,
111
- HolidaysModel_1.Holidays,
112
- userRolesModel_1.UserRole,
113
- roleRightsModel_1.RoleRights,
114
- PortalFeedbackModel_1.PortalFeedback,
115
- NotificationModel_1.Notification
105
+ UserShiftModel_1.UserShift
116
106
  ],
117
107
  });
package/dist/index.d.ts CHANGED
@@ -42,8 +42,16 @@ export * from './models/ShifttimesModel';
42
42
  export * from './models/AttendanceModel';
43
43
  export * from './models/contactInfoModel';
44
44
  export * from './models/UserShiftModel';
45
- export * from './models/HolidaysModel';
46
- export * from './models/userRolesModel';
47
- export * from './models/roleRightsModel';
48
- export * from './models/PortalFeedbackModel';
49
- export * from './models/NotificationModel';
45
+ export * from './models/FinancialRequestsModel';
46
+ export * from './models/PayslipRequestsModel';
47
+ export * from './models/SalaryCertificateRequestsModel';
48
+ export * from './models/AllowanceRequestsModel';
49
+ export * from './models/ReimbursementRequestsModel';
50
+ export * from './models/BankAccountChangeRequestsModel';
51
+ export * from './models/FinancialChatsModel';
52
+ export * from './models/FinancialApprovalsModel';
53
+ export * from './models/FinancialWorkFlowModel';
54
+ export * from './models/FinancialAttachmentsModel';
55
+ export * from './models/RequestTypeMasterModel';
56
+ export * from './models/FinancialSettingsModel';
57
+ export * from './models/AllowanceTypesModel';
package/dist/index.js CHANGED
@@ -58,8 +58,16 @@ __exportStar(require("./models/ShifttimesModel"), exports);
58
58
  __exportStar(require("./models/AttendanceModel"), exports);
59
59
  __exportStar(require("./models/contactInfoModel"), exports);
60
60
  __exportStar(require("./models/UserShiftModel"), exports);
61
- __exportStar(require("./models/HolidaysModel"), exports);
62
- __exportStar(require("./models/userRolesModel"), exports);
63
- __exportStar(require("./models/roleRightsModel"), exports);
64
- __exportStar(require("./models/PortalFeedbackModel"), exports);
65
- __exportStar(require("./models/NotificationModel"), exports);
61
+ __exportStar(require("./models/FinancialRequestsModel"), exports);
62
+ __exportStar(require("./models/PayslipRequestsModel"), exports);
63
+ __exportStar(require("./models/SalaryCertificateRequestsModel"), exports);
64
+ __exportStar(require("./models/AllowanceRequestsModel"), exports);
65
+ __exportStar(require("./models/ReimbursementRequestsModel"), exports);
66
+ __exportStar(require("./models/BankAccountChangeRequestsModel"), exports);
67
+ __exportStar(require("./models/FinancialChatsModel"), exports);
68
+ __exportStar(require("./models/FinancialApprovalsModel"), exports);
69
+ __exportStar(require("./models/FinancialWorkFlowModel"), exports);
70
+ __exportStar(require("./models/FinancialAttachmentsModel"), exports);
71
+ __exportStar(require("./models/RequestTypeMasterModel"), exports);
72
+ __exportStar(require("./models/FinancialSettingsModel"), exports);
73
+ __exportStar(require("./models/AllowanceTypesModel"), exports);
@@ -0,0 +1,9 @@
1
+ import { BaseModel } from './BaseModel';
2
+ export declare class AllowanceRequests extends BaseModel {
3
+ financial_request_id: number;
4
+ allowance_type_id: number;
5
+ allowance_amount: number;
6
+ approved_allowance_amount: number;
7
+ currency: string;
8
+ constructor(financial_request_id: number, allowance_type_id: number, allowance_amount: number, approved_allowance_amount: number, currency: string);
9
+ }
@@ -0,0 +1,49 @@
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
+ let AllowanceRequests = class AllowanceRequests extends BaseModel_1.BaseModel {
16
+ constructor(financial_request_id, allowance_type_id, allowance_amount, approved_allowance_amount, currency) {
17
+ super();
18
+ this.financial_request_id = financial_request_id;
19
+ this.allowance_type_id = allowance_type_id;
20
+ this.allowance_amount = allowance_amount;
21
+ this.approved_allowance_amount = approved_allowance_amount;
22
+ this.currency = currency;
23
+ }
24
+ };
25
+ exports.AllowanceRequests = AllowanceRequests;
26
+ __decorate([
27
+ (0, typeorm_1.Column)({ type: 'int', unique: true }),
28
+ __metadata("design:type", Number)
29
+ ], AllowanceRequests.prototype, "financial_request_id", void 0);
30
+ __decorate([
31
+ (0, typeorm_1.Column)({ type: 'int' }),
32
+ __metadata("design:type", Number)
33
+ ], AllowanceRequests.prototype, "allowance_type_id", void 0);
34
+ __decorate([
35
+ (0, typeorm_1.Column)({ type: 'decimal', precision: 10, scale: 2 }),
36
+ __metadata("design:type", Number)
37
+ ], AllowanceRequests.prototype, "allowance_amount", void 0);
38
+ __decorate([
39
+ (0, typeorm_1.Column)({ type: 'decimal', precision: 10, scale: 2, nullable: true }),
40
+ __metadata("design:type", Number)
41
+ ], AllowanceRequests.prototype, "approved_allowance_amount", void 0);
42
+ __decorate([
43
+ (0, typeorm_1.Column)({ type: 'boolean', default: false }),
44
+ __metadata("design:type", String)
45
+ ], AllowanceRequests.prototype, "currency", void 0);
46
+ exports.AllowanceRequests = AllowanceRequests = __decorate([
47
+ (0, typeorm_1.Entity)({ name: 'allowance_requests' }),
48
+ __metadata("design:paramtypes", [Number, Number, Number, Number, String])
49
+ ], AllowanceRequests);
@@ -0,0 +1,8 @@
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
+ }
@@ -0,0 +1,43 @@
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);
@@ -0,0 +1,12 @@
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
+ }
@@ -0,0 +1,62 @@
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);
@@ -35,7 +35,7 @@ __decorate([
35
35
  __metadata("design:type", String)
36
36
  ], FMServices.prototype, "description", void 0);
37
37
  __decorate([
38
- (0, typeorm_1.Column)({ nullable: true }),
38
+ (0, typeorm_1.Column)({ nullable: false }),
39
39
  __metadata("design:type", String)
40
40
  ], FMServices.prototype, "logo_url", void 0);
41
41
  exports.FMServices = FMServices = __decorate([
@@ -0,0 +1,19 @@
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;
13
+ approver_role_id: number;
14
+ comment: string;
15
+ approval_status: FinancialApprovalStatus;
16
+ action_date: Date;
17
+ financialRequest?: FinancialRequests;
18
+ constructor(financial_request_id: number, level: number, approver_role_id: number, approval_status: FinancialApprovalStatus);
19
+ }
@@ -0,0 +1,69 @@
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) {
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
+ }
31
+ };
32
+ exports.FinancialApprovals = FinancialApprovals;
33
+ __decorate([
34
+ (0, typeorm_1.Column)({ type: 'int' }),
35
+ __metadata("design:type", Number)
36
+ ], FinancialApprovals.prototype, "financial_request_id", void 0);
37
+ __decorate([
38
+ (0, typeorm_1.Column)({ type: 'int' }),
39
+ __metadata("design:type", Number)
40
+ ], FinancialApprovals.prototype, "level", void 0);
41
+ __decorate([
42
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
43
+ __metadata("design:type", Number)
44
+ ], FinancialApprovals.prototype, "approver_user_id", void 0);
45
+ __decorate([
46
+ (0, typeorm_1.Column)({ type: 'int' }),
47
+ __metadata("design:type", Number)
48
+ ], FinancialApprovals.prototype, "approver_role_id", void 0);
49
+ __decorate([
50
+ (0, typeorm_1.Column)({ type: 'text', nullable: true }),
51
+ __metadata("design:type", String)
52
+ ], FinancialApprovals.prototype, "comment", void 0);
53
+ __decorate([
54
+ (0, typeorm_1.Column)({ type: 'enum', enum: FinancialApprovalStatus, default: FinancialApprovalStatus.PENDING }),
55
+ __metadata("design:type", String)
56
+ ], FinancialApprovals.prototype, "approval_status", void 0);
57
+ __decorate([
58
+ (0, typeorm_1.Column)({ type: 'timestamp', nullable: true }),
59
+ __metadata("design:type", Date)
60
+ ], FinancialApprovals.prototype, "action_date", void 0);
61
+ __decorate([
62
+ (0, typeorm_1.ManyToOne)(() => FinancialRequestsModel_1.FinancialRequests, fr => fr.approvals),
63
+ (0, typeorm_1.JoinColumn)({ name: 'financial_request_id' }),
64
+ __metadata("design:type", FinancialRequestsModel_1.FinancialRequests)
65
+ ], FinancialApprovals.prototype, "financialRequest", void 0);
66
+ exports.FinancialApprovals = FinancialApprovals = __decorate([
67
+ (0, typeorm_1.Entity)({ name: 'financial_approvals' }),
68
+ __metadata("design:paramtypes", [Number, Number, Number, String])
69
+ ], FinancialApprovals);
@@ -0,0 +1,10 @@
1
+ import { BaseModel } from './BaseModel';
2
+ import { FinancialRequests } from './FinancialRequestsModel';
3
+ export declare class FinancialAttachments extends BaseModel {
4
+ financial_request_id: number;
5
+ file_url: string;
6
+ file_name: string;
7
+ file_type: string;
8
+ financialRequest?: FinancialRequests;
9
+ constructor(financial_request_id: number, file_url: string, file_name: string);
10
+ }
@@ -0,0 +1,50 @@
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.FinancialAttachments = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ const FinancialRequestsModel_1 = require("./FinancialRequestsModel");
16
+ let FinancialAttachments = class FinancialAttachments extends BaseModel_1.BaseModel {
17
+ constructor(financial_request_id, file_url, file_name) {
18
+ super();
19
+ this.financial_request_id = financial_request_id;
20
+ this.file_url = file_url;
21
+ this.file_name = file_name;
22
+ this.file_type = 'PDF';
23
+ }
24
+ };
25
+ exports.FinancialAttachments = FinancialAttachments;
26
+ __decorate([
27
+ (0, typeorm_1.Column)({ type: 'int' }),
28
+ __metadata("design:type", Number)
29
+ ], FinancialAttachments.prototype, "financial_request_id", void 0);
30
+ __decorate([
31
+ (0, typeorm_1.Column)({ type: 'varchar', length: 500 }),
32
+ __metadata("design:type", String)
33
+ ], FinancialAttachments.prototype, "file_url", void 0);
34
+ __decorate([
35
+ (0, typeorm_1.Column)({ type: 'varchar', length: 255 }),
36
+ __metadata("design:type", String)
37
+ ], FinancialAttachments.prototype, "file_name", void 0);
38
+ __decorate([
39
+ (0, typeorm_1.Column)({ type: 'varchar', length: 50, nullable: true }),
40
+ __metadata("design:type", String)
41
+ ], FinancialAttachments.prototype, "file_type", void 0);
42
+ __decorate([
43
+ (0, typeorm_1.ManyToOne)(() => FinancialRequestsModel_1.FinancialRequests, fr => fr.attachments),
44
+ (0, typeorm_1.JoinColumn)({ name: 'financial_request_id' }),
45
+ __metadata("design:type", FinancialRequestsModel_1.FinancialRequests)
46
+ ], FinancialAttachments.prototype, "financialRequest", void 0);
47
+ exports.FinancialAttachments = FinancialAttachments = __decorate([
48
+ (0, typeorm_1.Entity)({ name: 'financial_attachments' }),
49
+ __metadata("design:paramtypes", [Number, String, String])
50
+ ], FinancialAttachments);
@@ -0,0 +1,9 @@
1
+ import { BaseModel } from './BaseModel';
2
+ import { FinancialRequests } from './FinancialRequestsModel';
3
+ export declare class FinancialChats extends BaseModel {
4
+ financial_request_id: number;
5
+ content: string;
6
+ sender_user_id: number;
7
+ financialRequest?: FinancialRequests;
8
+ constructor(financial_request_id: number, content: string, sender_user_id: number);
9
+ }
@@ -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.FinancialChats = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ const FinancialRequestsModel_1 = require("./FinancialRequestsModel");
16
+ let FinancialChats = class FinancialChats extends BaseModel_1.BaseModel {
17
+ constructor(financial_request_id, content, sender_user_id) {
18
+ super();
19
+ this.financial_request_id = financial_request_id;
20
+ this.content = content;
21
+ this.sender_user_id = sender_user_id;
22
+ }
23
+ };
24
+ exports.FinancialChats = FinancialChats;
25
+ __decorate([
26
+ (0, typeorm_1.Column)({ type: 'int' }),
27
+ __metadata("design:type", Number)
28
+ ], FinancialChats.prototype, "financial_request_id", void 0);
29
+ __decorate([
30
+ (0, typeorm_1.Column)({ type: 'text' }),
31
+ __metadata("design:type", String)
32
+ ], FinancialChats.prototype, "content", void 0);
33
+ __decorate([
34
+ (0, typeorm_1.Column)({ type: 'int' }),
35
+ __metadata("design:type", Number)
36
+ ], FinancialChats.prototype, "sender_user_id", void 0);
37
+ __decorate([
38
+ (0, typeorm_1.ManyToOne)(() => FinancialRequestsModel_1.FinancialRequests, fr => fr.chats),
39
+ (0, typeorm_1.JoinColumn)({ name: 'financial_request_id' }),
40
+ __metadata("design:type", FinancialRequestsModel_1.FinancialRequests)
41
+ ], FinancialChats.prototype, "financialRequest", void 0);
42
+ exports.FinancialChats = FinancialChats = __decorate([
43
+ (0, typeorm_1.Entity)({ name: 'financial_chats' }),
44
+ __metadata("design:paramtypes", [Number, String, Number])
45
+ ], FinancialChats);
@@ -0,0 +1,49 @@
1
+ import { BaseModel } from './BaseModel';
2
+ import { PayslipRequests } from './PayslipRequestsModel';
3
+ import { SalaryCertificateRequests } from './SalaryCertificateRequestsModel';
4
+ import { AllowanceRequests } from './AllowanceRequestsModel';
5
+ import { ReimbursementRequests } from './ReimbursementRequestsModel';
6
+ import { BankAccountChangeRequests } from './BankAccountChangeRequestsModel';
7
+ import { FinancialChats } from './FinancialChatsModel';
8
+ import { FinancialApprovals } from './FinancialApprovalsModel';
9
+ import { FinancialWorkFlow } from './FinancialWorkFlowModel';
10
+ import { FinancialAttachments } from './FinancialAttachmentsModel';
11
+ import { RequestTypeMaster } from './RequestTypeMasterModel';
12
+ export declare enum FinancialRequestStatus {
13
+ DRAFT = "Draft",
14
+ SUBMITTED = "Submitted",
15
+ PENDING = "Pending",
16
+ IN_PROGRESS = "In Progress",
17
+ APPROVED = "Approved",
18
+ REJECTED = "Rejected",
19
+ COMPLETED = "Completed",
20
+ CANCELLED = "Cancelled"
21
+ }
22
+ export declare class FinancialRequests extends BaseModel {
23
+ user_id: number;
24
+ employee_id: string;
25
+ employee_name: string;
26
+ grade: string;
27
+ designation_id: number;
28
+ department_id: number;
29
+ email_address: string;
30
+ contact_number: string;
31
+ request_type_id: number;
32
+ request_date: Date;
33
+ request_status: FinancialRequestStatus;
34
+ request_close_date: Date;
35
+ remarks: string;
36
+ current_approval_level: number;
37
+ current_approver_id: number;
38
+ payslipRequest?: PayslipRequests;
39
+ salaryCertificateRequest?: SalaryCertificateRequests;
40
+ allowanceRequest?: AllowanceRequests;
41
+ reimbursementRequest?: ReimbursementRequests;
42
+ bankAccountChangeRequest?: BankAccountChangeRequests;
43
+ chats?: FinancialChats[];
44
+ approvals?: FinancialApprovals[];
45
+ workflows?: FinancialWorkFlow[];
46
+ attachments?: FinancialAttachments[];
47
+ requestType?: RequestTypeMaster;
48
+ constructor(user_id: number, employee_id: string, employee_name: string, email_address: string, contact_number: string, request_type_id: number);
49
+ }