@platform-modules/foreign-ministry 1.0.85 → 1.0.87
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/dist/models/AllowanceRequestsModel.d.ts +5 -1
- package/dist/models/AllowanceRequestsModel.js +17 -2
- package/dist/models/FinancialSettingsModel.d.ts +4 -1
- package/dist/models/FinancialSettingsModel.js +17 -2
- package/dist/models/ReimbursementRequestsModel.d.ts +2 -0
- package/dist/models/ReimbursementRequestsModel.js +5 -0
- package/package.json +1 -1
- package/src/models/AllowanceRequestsModel.ts +16 -2
- package/src/models/FinancialSettingsModel.ts +15 -0
- package/src/models/ReimbursementRequestsModel.ts +4 -0
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { BaseModel } from './BaseModel';
|
|
2
|
+
import { FinancialRequests } from "./FinancialRequestsModel";
|
|
2
3
|
export declare class AllowanceRequests extends BaseModel {
|
|
3
4
|
financial_request_id: number;
|
|
4
5
|
allowance_type_id: number;
|
|
5
6
|
allowance_amount: number;
|
|
6
7
|
approved_allowance_amount: number;
|
|
7
8
|
currency: string;
|
|
8
|
-
|
|
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);
|
|
9
13
|
}
|
|
@@ -12,14 +12,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.AllowanceRequests = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
const FinancialRequestsModel_1 = require("./FinancialRequestsModel");
|
|
15
16
|
let AllowanceRequests = class AllowanceRequests extends BaseModel_1.BaseModel {
|
|
16
|
-
constructor(financial_request_id, allowance_type_id, allowance_amount, approved_allowance_amount, currency) {
|
|
17
|
+
constructor(financial_request_id, allowance_type_id, allowance_amount, approved_allowance_amount, currency, contact_number, description) {
|
|
17
18
|
super();
|
|
18
19
|
this.financial_request_id = financial_request_id;
|
|
19
20
|
this.allowance_type_id = allowance_type_id;
|
|
20
21
|
this.allowance_amount = allowance_amount;
|
|
21
22
|
this.approved_allowance_amount = approved_allowance_amount;
|
|
22
23
|
this.currency = currency;
|
|
24
|
+
this.contact_number = contact_number;
|
|
25
|
+
this.description = description;
|
|
23
26
|
}
|
|
24
27
|
};
|
|
25
28
|
exports.AllowanceRequests = AllowanceRequests;
|
|
@@ -43,7 +46,19 @@ __decorate([
|
|
|
43
46
|
(0, typeorm_1.Column)({ type: 'boolean', default: false }),
|
|
44
47
|
__metadata("design:type", String)
|
|
45
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);
|
|
46
61
|
exports.AllowanceRequests = AllowanceRequests = __decorate([
|
|
47
62
|
(0, typeorm_1.Entity)({ name: 'allowance_requests' }),
|
|
48
|
-
__metadata("design:paramtypes", [Number, Number, Number, Number, String])
|
|
63
|
+
__metadata("design:paramtypes", [Number, Number, Number, Number, String, String, String])
|
|
49
64
|
], AllowanceRequests);
|
|
@@ -4,5 +4,8 @@ export declare class FinancialSettings extends BaseModel {
|
|
|
4
4
|
approval_level: number;
|
|
5
5
|
approver_role_id: number;
|
|
6
6
|
is_active: boolean;
|
|
7
|
-
|
|
7
|
+
sub_service_id: number;
|
|
8
|
+
department_id: number;
|
|
9
|
+
section_id: number;
|
|
10
|
+
constructor(service_id: number, approval_level: number, approver_role_id: number, sub_service_id: number, department_id: number, section_id: number);
|
|
8
11
|
}
|
|
@@ -13,12 +13,15 @@ exports.FinancialSettings = void 0;
|
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const BaseModel_1 = require("./BaseModel");
|
|
15
15
|
let FinancialSettings = class FinancialSettings extends BaseModel_1.BaseModel {
|
|
16
|
-
constructor(service_id, approval_level, approver_role_id) {
|
|
16
|
+
constructor(service_id, approval_level, approver_role_id, sub_service_id, department_id, section_id) {
|
|
17
17
|
super();
|
|
18
18
|
this.service_id = service_id;
|
|
19
19
|
this.approval_level = approval_level;
|
|
20
20
|
this.approver_role_id = approver_role_id;
|
|
21
21
|
this.is_active = true;
|
|
22
|
+
this.sub_service_id = sub_service_id;
|
|
23
|
+
this.department_id = department_id;
|
|
24
|
+
this.section_id = section_id;
|
|
22
25
|
}
|
|
23
26
|
};
|
|
24
27
|
exports.FinancialSettings = FinancialSettings;
|
|
@@ -38,7 +41,19 @@ __decorate([
|
|
|
38
41
|
(0, typeorm_1.Column)({ type: 'boolean', default: true }),
|
|
39
42
|
__metadata("design:type", Boolean)
|
|
40
43
|
], FinancialSettings.prototype, "is_active", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
46
|
+
__metadata("design:type", Number)
|
|
47
|
+
], FinancialSettings.prototype, "sub_service_id", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
50
|
+
__metadata("design:type", Number)
|
|
51
|
+
], FinancialSettings.prototype, "department_id", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
54
|
+
__metadata("design:type", Number)
|
|
55
|
+
], FinancialSettings.prototype, "section_id", void 0);
|
|
41
56
|
exports.FinancialSettings = FinancialSettings = __decorate([
|
|
42
57
|
(0, typeorm_1.Entity)({ name: 'financial_settings' }),
|
|
43
|
-
__metadata("design:paramtypes", [Number, Number, Number])
|
|
58
|
+
__metadata("design:paramtypes", [Number, Number, Number, Number, Number, Number])
|
|
44
59
|
], FinancialSettings);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BaseModel } from './BaseModel';
|
|
2
|
+
import { FinancialRequests } from "./FinancialRequestsModel";
|
|
2
3
|
export declare class ReimbursementRequests extends BaseModel {
|
|
3
4
|
financial_request_id: number;
|
|
4
5
|
expense_description: string;
|
|
@@ -10,5 +11,6 @@ export declare class ReimbursementRequests extends BaseModel {
|
|
|
10
11
|
payment_processed: boolean;
|
|
11
12
|
payment_mode: string;
|
|
12
13
|
payment_date: Date;
|
|
14
|
+
financialRequest?: FinancialRequests;
|
|
13
15
|
constructor(financial_request_id: number, amount: number, quantity: number, total_amount: number, approved_amount: number, payment_mode: string, payment_date: Date, expense_description: string);
|
|
14
16
|
}
|
|
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.ReimbursementRequests = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
const FinancialRequestsModel_1 = require("./FinancialRequestsModel");
|
|
15
16
|
let ReimbursementRequests = class ReimbursementRequests extends BaseModel_1.BaseModel {
|
|
16
17
|
constructor(financial_request_id, amount, quantity, total_amount, approved_amount, payment_mode, payment_date, expense_description) {
|
|
17
18
|
super();
|
|
@@ -67,6 +68,10 @@ __decorate([
|
|
|
67
68
|
(0, typeorm_1.Column)({ type: 'date', nullable: true }),
|
|
68
69
|
__metadata("design:type", Date)
|
|
69
70
|
], ReimbursementRequests.prototype, "payment_date", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, typeorm_1.OneToOne)('FinancialRequests', 'reimbursementRequest'),
|
|
73
|
+
__metadata("design:type", FinancialRequestsModel_1.FinancialRequests)
|
|
74
|
+
], ReimbursementRequests.prototype, "financialRequest", void 0);
|
|
70
75
|
exports.ReimbursementRequests = ReimbursementRequests = __decorate([
|
|
71
76
|
(0, typeorm_1.Entity)({ name: 'reimbursement_requests' }),
|
|
72
77
|
__metadata("design:paramtypes", [Number, Number, Number, Number, Number, String, Date, String])
|
package/package.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Column, Entity, OneToOne, JoinColumn, ManyToOne } from "typeorm";
|
|
2
2
|
import { BaseModel } from './BaseModel';
|
|
3
|
+
import { FinancialRequests } from "./FinancialRequestsModel";
|
|
3
4
|
|
|
4
5
|
@Entity({ name: 'allowance_requests' })
|
|
5
6
|
export class AllowanceRequests extends BaseModel {
|
|
@@ -16,7 +17,16 @@ export class AllowanceRequests extends BaseModel {
|
|
|
16
17
|
approved_allowance_amount: number;
|
|
17
18
|
|
|
18
19
|
@Column({ type: 'boolean', default: false })
|
|
19
|
-
currency : string;
|
|
20
|
+
currency : string;
|
|
21
|
+
|
|
22
|
+
@Column({ type: 'varchar', length: 10, nullable: true })
|
|
23
|
+
contact_number: string;
|
|
24
|
+
|
|
25
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
26
|
+
description: string;
|
|
27
|
+
|
|
28
|
+
@OneToOne('FinancialRequests', 'allowanceRequest')
|
|
29
|
+
financialRequest?: FinancialRequests;
|
|
20
30
|
|
|
21
31
|
|
|
22
32
|
constructor(
|
|
@@ -24,7 +34,9 @@ export class AllowanceRequests extends BaseModel {
|
|
|
24
34
|
allowance_type_id: number,
|
|
25
35
|
allowance_amount: number,
|
|
26
36
|
approved_allowance_amount: number,
|
|
27
|
-
currency: string
|
|
37
|
+
currency: string,
|
|
38
|
+
contact_number: string,
|
|
39
|
+
description: string
|
|
28
40
|
|
|
29
41
|
) {
|
|
30
42
|
super();
|
|
@@ -33,6 +45,8 @@ export class AllowanceRequests extends BaseModel {
|
|
|
33
45
|
this.allowance_amount = allowance_amount;
|
|
34
46
|
this.approved_allowance_amount = approved_allowance_amount;
|
|
35
47
|
this.currency = currency;
|
|
48
|
+
this.contact_number = contact_number;
|
|
49
|
+
this.description = description;
|
|
36
50
|
}
|
|
37
51
|
}
|
|
38
52
|
|
|
@@ -15,16 +15,31 @@ export class FinancialSettings extends BaseModel {
|
|
|
15
15
|
@Column({ type: 'boolean', default: true })
|
|
16
16
|
is_active: boolean;
|
|
17
17
|
|
|
18
|
+
@Column({ type: 'int',nullable: true })
|
|
19
|
+
sub_service_id: number;
|
|
20
|
+
|
|
21
|
+
@Column({ type: 'int',nullable: true })
|
|
22
|
+
department_id: number;
|
|
23
|
+
|
|
24
|
+
@Column({ type: 'int',nullable: true })
|
|
25
|
+
section_id: number;
|
|
26
|
+
|
|
18
27
|
constructor(
|
|
19
28
|
service_id: number,
|
|
20
29
|
approval_level: number,
|
|
21
30
|
approver_role_id: number,
|
|
31
|
+
sub_service_id: number,
|
|
32
|
+
department_id: number,
|
|
33
|
+
section_id: number
|
|
22
34
|
) {
|
|
23
35
|
super();
|
|
24
36
|
this.service_id = service_id;
|
|
25
37
|
this.approval_level = approval_level;
|
|
26
38
|
this.approver_role_id = approver_role_id;
|
|
27
39
|
this.is_active = true;
|
|
40
|
+
this.sub_service_id = sub_service_id;
|
|
41
|
+
this.department_id = department_id;
|
|
42
|
+
this.section_id = section_id;
|
|
28
43
|
}
|
|
29
44
|
}
|
|
30
45
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Column, Entity, OneToOne, JoinColumn } from "typeorm";
|
|
2
2
|
import { BaseModel } from './BaseModel';
|
|
3
|
+
import { FinancialRequests } from "./FinancialRequestsModel";
|
|
3
4
|
|
|
4
5
|
@Entity({ name: 'reimbursement_requests' })
|
|
5
6
|
export class ReimbursementRequests extends BaseModel {
|
|
@@ -33,6 +34,9 @@ export class ReimbursementRequests extends BaseModel {
|
|
|
33
34
|
@Column({ type: 'date', nullable: true })
|
|
34
35
|
payment_date: Date;
|
|
35
36
|
|
|
37
|
+
@OneToOne('FinancialRequests', 'reimbursementRequest')
|
|
38
|
+
financialRequest?: FinancialRequests;
|
|
39
|
+
|
|
36
40
|
constructor(
|
|
37
41
|
financial_request_id: number,
|
|
38
42
|
amount: number,
|