@platform-modules/foreign-ministry 1.0.76 → 1.0.78
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.
- package/.env +2 -2
- package/dist/data-source.js +12 -2
- package/dist/index.d.ts +5 -13
- package/dist/index.js +5 -13
- package/dist/models/FMServices.js +1 -1
- package/dist/models/HelpContentMappedCategoriesModel.d.ts +6 -0
- package/dist/models/HelpContentMappedCategoriesModel.js +34 -0
- package/dist/models/HelpContentMappedTagsModel.d.ts +6 -0
- package/dist/models/HelpContentMappedTagsModel.js +34 -0
- package/dist/models/HelpContentTagsModel.d.ts +5 -0
- package/dist/models/HelpContentTagsModel.js +29 -0
- package/dist/models/HolidaysModel.d.ts +11 -0
- package/dist/models/HolidaysModel.js +59 -0
- package/dist/models/NotificationModel.d.ts +18 -0
- package/dist/models/NotificationModel.js +79 -0
- package/dist/models/PortalFeedbackModel.d.ts +8 -0
- package/dist/models/{FinancialChatsModel.js → PortalFeedbackModel.js} +24 -19
- package/dist/models/role.d.ts +1 -7
- package/dist/models/role.js +2 -2
- package/dist/models/roleRightsModel.d.ts +16 -0
- package/dist/models/roleRightsModel.js +44 -0
- package/dist/models/user.d.ts +5 -1
- package/dist/models/user.js +22 -2
- package/dist/models/userRolesModel.d.ts +18 -0
- package/dist/models/{FinancialSettingsModel.js → userRolesModel.js} +31 -21
- package/package.json +1 -1
- package/src/data-source.ts +12 -2
- package/src/index.ts +5 -13
- package/src/models/FMServices.ts +1 -1
- package/src/models/HolidaysModel.ts +46 -0
- package/src/models/NotificationModel.ts +68 -0
- package/src/models/PortalFeedbackModel.ts +33 -0
- package/src/models/role.ts +1 -7
- package/src/models/roleRightsModel.ts +31 -0
- package/src/models/user.ts +21 -0
- package/src/models/userRolesModel.ts +38 -0
- package/FINANCIAL_MODELS_SUMMARY.md +0 -144
- package/FINANCIAL_SERVICES_MODELS.md +0 -236
- package/dist/models/AllowanceRequestsModel.d.ts +0 -9
- package/dist/models/AllowanceRequestsModel.js +0 -49
- package/dist/models/AllowanceTypesModel.d.ts +0 -8
- package/dist/models/AllowanceTypesModel.js +0 -43
- package/dist/models/BankAccountChangeRequestsModel.d.ts +0 -12
- package/dist/models/BankAccountChangeRequestsModel.js +0 -62
- package/dist/models/FinancialApprovalsModel.d.ts +0 -20
- package/dist/models/FinancialApprovalsModel.js +0 -76
- package/dist/models/FinancialAttachmentsModel.d.ts +0 -8
- package/dist/models/FinancialAttachmentsModel.js +0 -43
- package/dist/models/FinancialChatsModel.d.ts +0 -7
- package/dist/models/FinancialRequestsModel.d.ts +0 -29
- package/dist/models/FinancialRequestsModel.js +0 -103
- package/dist/models/FinancialSettingsModel.d.ts +0 -8
- package/dist/models/FinancialWorkFlowModel.d.ts +0 -16
- package/dist/models/FinancialWorkFlowModel.js +0 -61
- package/dist/models/PayslipRequestsModel.d.ts +0 -8
- package/dist/models/PayslipRequestsModel.js +0 -44
- package/dist/models/ReimbursementRequestsModel.d.ts +0 -14
- package/dist/models/ReimbursementRequestsModel.js +0 -73
- package/dist/models/RequestTypeMasterModel.d.ts +0 -12
- package/dist/models/RequestTypeMasterModel.js +0 -60
- package/dist/models/SalaryCertificateRequestsModel.d.ts +0 -7
- package/dist/models/SalaryCertificateRequestsModel.js +0 -39
- package/src/models/AllowanceRequestsModel.ts +0 -38
- package/src/models/AllowanceTypesModel.ts +0 -26
- package/src/models/BankAccountChangeRequestsModel.ts +0 -50
- package/src/models/FinancialApprovalsModel.ts +0 -57
- package/src/models/FinancialAttachmentsModel.ts +0 -30
- package/src/models/FinancialChatsModel.ts +0 -23
- package/src/models/FinancialRequestsModel.ts +0 -81
- package/src/models/FinancialSettingsModel.ts +0 -30
- package/src/models/FinancialWorkFlowModel.ts +0 -47
- package/src/models/PayslipRequestsModel.ts +0 -29
- package/src/models/ReimbursementRequestsModel.ts +0 -58
- package/src/models/RequestTypeMasterModel.ts +0 -38
- package/src/models/SalaryCertificateRequestsModel.ts +0 -24
|
@@ -1,236 +0,0 @@
|
|
|
1
|
-
# Financial Services Models - Created Successfully ✅
|
|
2
|
-
|
|
3
|
-
## 📋 Summary
|
|
4
|
-
|
|
5
|
-
13 Financial Service database models have been created in `shared_models/src/models/`
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## 🗂️ Core Tables
|
|
10
|
-
|
|
11
|
-
### 1. **FinancialRequestsModel.ts** (Main/Parent Table)
|
|
12
|
-
- Common fields for all financial requests
|
|
13
|
-
- Uses `id` (auto-increment) as unique identifier
|
|
14
|
-
- Includes: employee details, request_type, status, etc.
|
|
15
|
-
- **Enum:** `FinancialRequestStatus` (Draft, Submitted, Pending, In Progress, Approved, Rejected, Completed, Cancelled)
|
|
16
|
-
|
|
17
|
-
---
|
|
18
|
-
|
|
19
|
-
## 📑 Request Type Specific Tables (One-to-One with FinancialRequests)
|
|
20
|
-
|
|
21
|
-
### 2. **PayslipRequestsModel.ts** (FM001)
|
|
22
|
-
- Financial Request ID (FK - Unique)
|
|
23
|
-
- Payslip month & year
|
|
24
|
-
- Generation status & URL
|
|
25
|
-
- Generated by user ID & date
|
|
26
|
-
|
|
27
|
-
### 3. **SalaryCertificateRequestsModel.ts** (FM002)
|
|
28
|
-
- Financial Request ID (FK - Unique)
|
|
29
|
-
- Certificate purpose, addressee details
|
|
30
|
-
- Language preference (English/Arabic)
|
|
31
|
-
- Include salary/allowances flags
|
|
32
|
-
- Generation status & URL
|
|
33
|
-
|
|
34
|
-
### 4. **AllowanceRequestsModel.ts** (FM003)
|
|
35
|
-
- Financial Request ID (FK - Unique)
|
|
36
|
-
- Allowance type ID & name
|
|
37
|
-
- Requested amount & effective date
|
|
38
|
-
- Justification
|
|
39
|
-
- Recurring/frequency options
|
|
40
|
-
- Approved amount & date
|
|
41
|
-
|
|
42
|
-
### 5. **ReimbursementRequestsModel.ts** (FM004)
|
|
43
|
-
- Financial Request ID (FK - Unique)
|
|
44
|
-
- Reimbursement type (free text - user enters directly)
|
|
45
|
-
- Claimed amount & expense date
|
|
46
|
-
- Expense description
|
|
47
|
-
- Vendor name & invoice number
|
|
48
|
-
- Approved amount & verification details
|
|
49
|
-
- Payment processing status
|
|
50
|
-
|
|
51
|
-
### 6. **BankAccountChangeRequestsModel.ts** (FM005)
|
|
52
|
-
- Financial Request ID (FK - Unique)
|
|
53
|
-
- Old bank details (optional)
|
|
54
|
-
- New bank details (required)
|
|
55
|
-
- IBAN, branch, SWIFT code
|
|
56
|
-
- Reason for change
|
|
57
|
-
- HR verification & payroll update status
|
|
58
|
-
|
|
59
|
-
---
|
|
60
|
-
|
|
61
|
-
## 🔄 Supporting Tables (One-to-Many with FinancialRequests)
|
|
62
|
-
|
|
63
|
-
### 7. **FinancialChatsModel.ts**
|
|
64
|
-
- Financial Request ID (FK)
|
|
65
|
-
- Content & sender user ID
|
|
66
|
-
- Sender role (Employee, Manager, Finance, HR)
|
|
67
|
-
|
|
68
|
-
### 8. **FinancialApprovalsModel.ts**
|
|
69
|
-
- Financial Request ID (FK)
|
|
70
|
-
- Approval level & approver details
|
|
71
|
-
- Comment & action date
|
|
72
|
-
- SLA days & overdue flag
|
|
73
|
-
- **Enum:** `FinancialApprovalStatus` (Pending, Approved, Rejected, Skipped)
|
|
74
|
-
|
|
75
|
-
### 9. **FinancialWorkFlowModel.ts**
|
|
76
|
-
- Financial Request ID (FK)
|
|
77
|
-
- Financial Approval ID (FK - optional)
|
|
78
|
-
- Activity description & status
|
|
79
|
-
- Performed by user ID & date
|
|
80
|
-
- **Enum:** `FinancialWorkFlowStatus` (Completed, Not Yet Started, Pending, In Progress)
|
|
81
|
-
|
|
82
|
-
### 10. **FinancialAttachmentsModel.ts**
|
|
83
|
-
- Financial Request ID (FK)
|
|
84
|
-
- File URL, name, type, size
|
|
85
|
-
- Uploaded by user ID
|
|
86
|
-
- Attachment category (Receipt, Invoice, BankStatement, Payslip, Certificate, Supporting)
|
|
87
|
-
|
|
88
|
-
---
|
|
89
|
-
|
|
90
|
-
## ⚙️ Configuration/Master Tables
|
|
91
|
-
|
|
92
|
-
### 11. **RequestTypeMasterModel.ts**
|
|
93
|
-
- Request code (FM001, FM002, etc.) - Unique
|
|
94
|
-
- Request name & description
|
|
95
|
-
- Specific table name
|
|
96
|
-
- Icon, SLA days, display order
|
|
97
|
-
- Active status
|
|
98
|
-
|
|
99
|
-
### 12. **FinancialSettingsModel.ts**
|
|
100
|
-
- Request type ID & code
|
|
101
|
-
- Approval level & role details
|
|
102
|
-
- Mandatory flag
|
|
103
|
-
- SLA days per level
|
|
104
|
-
- Active status
|
|
105
|
-
|
|
106
|
-
### 13. **AllowanceTypesModel.ts**
|
|
107
|
-
- Allowance code (HOUSING, TRANSPORT, EDUCATION) - Unique
|
|
108
|
-
- Allowance name & description
|
|
109
|
-
- Default amount & max limit
|
|
110
|
-
- Active status
|
|
111
|
-
|
|
112
|
-
### ~~14. ReimbursementCategoriesModel.ts~~ ❌ REMOVED
|
|
113
|
-
- **Not needed** - Users will directly enter reimbursement type and description
|
|
114
|
-
|
|
115
|
-
---
|
|
116
|
-
|
|
117
|
-
## 📊 Relationships
|
|
118
|
-
|
|
119
|
-
```
|
|
120
|
-
FinancialRequests (1) ←──→ (1) PayslipRequests
|
|
121
|
-
←──→ (1) SalaryCertificateRequests
|
|
122
|
-
←──→ (1) AllowanceRequests
|
|
123
|
-
←──→ (1) ReimbursementRequests
|
|
124
|
-
←──→ (1) BankAccountChangeRequests
|
|
125
|
-
|
|
126
|
-
←──→ (Many) FinancialChats
|
|
127
|
-
←──→ (Many) FinancialApprovals
|
|
128
|
-
←──→ (Many) FinancialWorkFlow
|
|
129
|
-
←──→ (Many) FinancialAttachments
|
|
130
|
-
|
|
131
|
-
RequestTypeMaster (1) ←──→ (Many) FinancialRequests
|
|
132
|
-
AllowanceTypes (1) ←──→ (Many) AllowanceRequests
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
---
|
|
136
|
-
|
|
137
|
-
## 🚀 Next Steps
|
|
138
|
-
|
|
139
|
-
### 1. **Compile Shared Models**
|
|
140
|
-
```bash
|
|
141
|
-
cd FM_Backend/shared_models
|
|
142
|
-
npm run build
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
### 2. **Update Data Source** (data-source.ts)
|
|
146
|
-
Import all new entities in the TypeORM configuration
|
|
147
|
-
|
|
148
|
-
### 3. **Run Migrations**
|
|
149
|
-
Generate and run TypeORM migrations to create the database tables
|
|
150
|
-
|
|
151
|
-
### 4. **Seed Master Data**
|
|
152
|
-
Populate:
|
|
153
|
-
- `request_type_master` (FM001-FM005)
|
|
154
|
-
- `financial_settings` (approval matrix)
|
|
155
|
-
- `allowance_types` (Housing, Transport, etc.)
|
|
156
|
-
- `reimbursement_categories` (Medical, Travel, etc.)
|
|
157
|
-
|
|
158
|
-
### 5. **Create Repositories**
|
|
159
|
-
Create repository files in `User_service/src/models/repositories/`:
|
|
160
|
-
- `financial-requests.repo.ts`
|
|
161
|
-
- `financial-approvals.repo.ts`
|
|
162
|
-
- `financial-workflows.repo.ts`
|
|
163
|
-
- etc.
|
|
164
|
-
|
|
165
|
-
### 6. **Create Services**
|
|
166
|
-
Create service files in `User_service/src/controllers/`:
|
|
167
|
-
- `financial-requests.service.ts`
|
|
168
|
-
- `financial-approvals.service.ts`
|
|
169
|
-
- etc.
|
|
170
|
-
|
|
171
|
-
### 7. **Add API Routes**
|
|
172
|
-
Add routes in `User_service/src/routes/api-gateway.ts`
|
|
173
|
-
|
|
174
|
-
### 8. **Create Joi Validation Schemas**
|
|
175
|
-
Add validation in `User_service/src/helpers/utils/validate-schemas.ts`
|
|
176
|
-
|
|
177
|
-
---
|
|
178
|
-
|
|
179
|
-
## 📝 Request Codes
|
|
180
|
-
|
|
181
|
-
| Code | Request Type | Table Name |
|
|
182
|
-
|-------|-----------------------------------|-----------------------------------|
|
|
183
|
-
| FM001 | Request for Pay slip | payslip_requests |
|
|
184
|
-
| FM002 | Request for Salary Certificate | salary_certificate_requests |
|
|
185
|
-
| FM003 | Request for Allowance | allowance_requests |
|
|
186
|
-
| FM004 | Request for Reimbursement | reimbursement_requests |
|
|
187
|
-
| FM005 | Request for Bank Account Change | bank_account_change_requests |
|
|
188
|
-
|
|
189
|
-
---
|
|
190
|
-
|
|
191
|
-
## ✅ Status
|
|
192
|
-
|
|
193
|
-
**All models created and exported successfully!**
|
|
194
|
-
|
|
195
|
-
- ✅ 13 TypeScript model files created
|
|
196
|
-
- ✅ All exported in `index.ts`
|
|
197
|
-
- ✅ No linter errors
|
|
198
|
-
- ✅ Ready for compilation and use
|
|
199
|
-
|
|
200
|
-
---
|
|
201
|
-
|
|
202
|
-
## 📚 Usage Example
|
|
203
|
-
|
|
204
|
-
```typescript
|
|
205
|
-
import {
|
|
206
|
-
FinancialRequests,
|
|
207
|
-
PayslipRequests,
|
|
208
|
-
FinancialApprovals,
|
|
209
|
-
FinancialRequestStatus,
|
|
210
|
-
FinancialApprovalStatus
|
|
211
|
-
} from '@platform-modules/foreign-ministry';
|
|
212
|
-
|
|
213
|
-
// Create a payslip request
|
|
214
|
-
const financialRequest = new FinancialRequests(
|
|
215
|
-
101, // user_id
|
|
216
|
-
'EMP1234', // employee_id
|
|
217
|
-
'John Doe', // employee_name
|
|
218
|
-
'john@example.com',// email_address
|
|
219
|
-
'+966501234567', // contact_number
|
|
220
|
-
1, // request_type_id
|
|
221
|
-
'FM001' // request_code
|
|
222
|
-
);
|
|
223
|
-
|
|
224
|
-
await save(financialRequest); // id will be auto-generated
|
|
225
|
-
|
|
226
|
-
const payslipRequest = new PayslipRequests(
|
|
227
|
-
financialRequest.id, // FK to financial_requests
|
|
228
|
-
'2025-01',
|
|
229
|
-
2025
|
|
230
|
-
);
|
|
231
|
-
```
|
|
232
|
-
|
|
233
|
-
---
|
|
234
|
-
|
|
235
|
-
Created: $(date)
|
|
236
|
-
|
|
@@ -1,9 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,49 +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
|
-
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);
|
|
@@ -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,20 +0,0 @@
|
|
|
1
|
-
import { BaseModel } from './BaseModel';
|
|
2
|
-
export declare enum FinancialApprovalStatus {
|
|
3
|
-
PENDING = "Pending",
|
|
4
|
-
APPROVED = "Approved",
|
|
5
|
-
REJECTED = "Rejected",
|
|
6
|
-
SKIPPED = "Skipped"
|
|
7
|
-
}
|
|
8
|
-
export declare class FinancialApprovals extends BaseModel {
|
|
9
|
-
financial_request_id: number;
|
|
10
|
-
level: number;
|
|
11
|
-
approver_user_id: number;
|
|
12
|
-
approver_role_id: number;
|
|
13
|
-
approver_name: string;
|
|
14
|
-
comment: string;
|
|
15
|
-
approval_status: FinancialApprovalStatus;
|
|
16
|
-
action_date: Date;
|
|
17
|
-
sla_days: number;
|
|
18
|
-
is_overdue: boolean;
|
|
19
|
-
constructor(financial_request_id: number, level: number, approver_role_id: number, approval_status: FinancialApprovalStatus);
|
|
20
|
-
}
|
|
@@ -1,76 +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
|
-
var FinancialApprovalStatus;
|
|
16
|
-
(function (FinancialApprovalStatus) {
|
|
17
|
-
FinancialApprovalStatus["PENDING"] = "Pending";
|
|
18
|
-
FinancialApprovalStatus["APPROVED"] = "Approved";
|
|
19
|
-
FinancialApprovalStatus["REJECTED"] = "Rejected";
|
|
20
|
-
FinancialApprovalStatus["SKIPPED"] = "Skipped";
|
|
21
|
-
})(FinancialApprovalStatus || (exports.FinancialApprovalStatus = FinancialApprovalStatus = {}));
|
|
22
|
-
let FinancialApprovals = class FinancialApprovals extends BaseModel_1.BaseModel {
|
|
23
|
-
constructor(financial_request_id, level, approver_role_id, approval_status) {
|
|
24
|
-
super();
|
|
25
|
-
this.financial_request_id = financial_request_id;
|
|
26
|
-
this.level = level;
|
|
27
|
-
this.approver_role_id = approver_role_id;
|
|
28
|
-
this.approval_status = approval_status;
|
|
29
|
-
this.is_overdue = false;
|
|
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: 'varchar', length: 100, nullable: true }),
|
|
51
|
-
__metadata("design:type", String)
|
|
52
|
-
], FinancialApprovals.prototype, "approver_name", void 0);
|
|
53
|
-
__decorate([
|
|
54
|
-
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
55
|
-
__metadata("design:type", String)
|
|
56
|
-
], FinancialApprovals.prototype, "comment", void 0);
|
|
57
|
-
__decorate([
|
|
58
|
-
(0, typeorm_1.Column)({ type: 'enum', enum: FinancialApprovalStatus, default: FinancialApprovalStatus.PENDING }),
|
|
59
|
-
__metadata("design:type", String)
|
|
60
|
-
], FinancialApprovals.prototype, "approval_status", void 0);
|
|
61
|
-
__decorate([
|
|
62
|
-
(0, typeorm_1.Column)({ type: 'datetime', nullable: true }),
|
|
63
|
-
__metadata("design:type", Date)
|
|
64
|
-
], FinancialApprovals.prototype, "action_date", void 0);
|
|
65
|
-
__decorate([
|
|
66
|
-
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
67
|
-
__metadata("design:type", Number)
|
|
68
|
-
], FinancialApprovals.prototype, "sla_days", void 0);
|
|
69
|
-
__decorate([
|
|
70
|
-
(0, typeorm_1.Column)({ type: 'boolean', default: false }),
|
|
71
|
-
__metadata("design:type", Boolean)
|
|
72
|
-
], FinancialApprovals.prototype, "is_overdue", void 0);
|
|
73
|
-
exports.FinancialApprovals = FinancialApprovals = __decorate([
|
|
74
|
-
(0, typeorm_1.Entity)({ name: 'financial_approvals' }),
|
|
75
|
-
__metadata("design:paramtypes", [Number, Number, Number, String])
|
|
76
|
-
], FinancialApprovals);
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { BaseModel } from './BaseModel';
|
|
2
|
-
export declare class FinancialAttachments extends BaseModel {
|
|
3
|
-
financial_request_id: number;
|
|
4
|
-
file_url: string;
|
|
5
|
-
file_name: string;
|
|
6
|
-
file_type: string;
|
|
7
|
-
constructor(financial_request_id: number, file_url: string, file_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.FinancialAttachments = void 0;
|
|
13
|
-
const typeorm_1 = require("typeorm");
|
|
14
|
-
const BaseModel_1 = require("./BaseModel");
|
|
15
|
-
let FinancialAttachments = class FinancialAttachments extends BaseModel_1.BaseModel {
|
|
16
|
-
constructor(financial_request_id, file_url, file_name) {
|
|
17
|
-
super();
|
|
18
|
-
this.financial_request_id = financial_request_id;
|
|
19
|
-
this.file_url = file_url;
|
|
20
|
-
this.file_name = file_name;
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
exports.FinancialAttachments = FinancialAttachments;
|
|
24
|
-
__decorate([
|
|
25
|
-
(0, typeorm_1.Column)({ type: 'int' }),
|
|
26
|
-
__metadata("design:type", Number)
|
|
27
|
-
], FinancialAttachments.prototype, "financial_request_id", void 0);
|
|
28
|
-
__decorate([
|
|
29
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 500 }),
|
|
30
|
-
__metadata("design:type", String)
|
|
31
|
-
], FinancialAttachments.prototype, "file_url", void 0);
|
|
32
|
-
__decorate([
|
|
33
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 255 }),
|
|
34
|
-
__metadata("design:type", String)
|
|
35
|
-
], FinancialAttachments.prototype, "file_name", void 0);
|
|
36
|
-
__decorate([
|
|
37
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 50, nullable: true }),
|
|
38
|
-
__metadata("design:type", String)
|
|
39
|
-
], FinancialAttachments.prototype, "file_type", void 0);
|
|
40
|
-
exports.FinancialAttachments = FinancialAttachments = __decorate([
|
|
41
|
-
(0, typeorm_1.Entity)({ name: 'financial_attachments' }),
|
|
42
|
-
__metadata("design:paramtypes", [Number, String, String])
|
|
43
|
-
], FinancialAttachments);
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { BaseModel } from './BaseModel';
|
|
2
|
-
export declare enum FinancialRequestStatus {
|
|
3
|
-
DRAFT = "Draft",
|
|
4
|
-
SUBMITTED = "Submitted",
|
|
5
|
-
PENDING = "Pending",
|
|
6
|
-
IN_PROGRESS = "In Progress",
|
|
7
|
-
APPROVED = "Approved",
|
|
8
|
-
REJECTED = "Rejected",
|
|
9
|
-
COMPLETED = "Completed",
|
|
10
|
-
CANCELLED = "Cancelled"
|
|
11
|
-
}
|
|
12
|
-
export declare class FinancialRequests extends BaseModel {
|
|
13
|
-
user_id: number;
|
|
14
|
-
employee_id: string;
|
|
15
|
-
employee_name: string;
|
|
16
|
-
grade: string;
|
|
17
|
-
designation_id: number;
|
|
18
|
-
department_id: number;
|
|
19
|
-
email_address: string;
|
|
20
|
-
contact_number: string;
|
|
21
|
-
request_type_id: number;
|
|
22
|
-
request_date: Date;
|
|
23
|
-
request_status: FinancialRequestStatus;
|
|
24
|
-
request_close_date: Date;
|
|
25
|
-
remarks: string;
|
|
26
|
-
current_approval_level: number;
|
|
27
|
-
current_approver_id: number;
|
|
28
|
-
constructor(user_id: number, employee_id: string, employee_name: string, email_address: string, contact_number: string, request_type_id: number);
|
|
29
|
-
}
|