@platform-modules/foreign-ministry 1.0.82 → 1.0.84
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/FinancialRequestsModel.d.ts +10 -10
- package/dist/models/FinancialRequestsModel.js +16 -26
- package/dist/models/SalaryCertificateRequestsModel.d.ts +2 -5
- package/dist/models/SalaryCertificateRequestsModel.js +5 -22
- package/package.json +1 -1
- package/src/models/FinancialRequestsModel.ts +22 -20
- package/src/models/SalaryCertificateRequestsModel.ts +4 -16
|
@@ -1,14 +1,14 @@
|
|
|
1
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';
|
|
2
|
+
import type { PayslipRequests } from './PayslipRequestsModel';
|
|
3
|
+
import type { SalaryCertificateRequests } from './SalaryCertificateRequestsModel';
|
|
4
|
+
import type { AllowanceRequests } from './AllowanceRequestsModel';
|
|
5
|
+
import type { ReimbursementRequests } from './ReimbursementRequestsModel';
|
|
6
|
+
import type { BankAccountChangeRequests } from './BankAccountChangeRequestsModel';
|
|
7
|
+
import type { FinancialChats } from './FinancialChatsModel';
|
|
8
|
+
import type { FinancialApprovals } from './FinancialApprovalsModel';
|
|
9
|
+
import type { FinancialWorkFlow } from './FinancialWorkFlowModel';
|
|
10
|
+
import type { FinancialAttachments } from './FinancialAttachmentsModel';
|
|
11
|
+
import type { RequestTypeMaster } from './RequestTypeMasterModel';
|
|
12
12
|
export declare enum FinancialRequestStatus {
|
|
13
13
|
DRAFT = "Draft",
|
|
14
14
|
SUBMITTED = "Submitted",
|
|
@@ -12,16 +12,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.FinancialRequests = exports.FinancialRequestStatus = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const BaseModel_1 = require("./BaseModel");
|
|
15
|
-
const PayslipRequestsModel_1 = require("./PayslipRequestsModel");
|
|
16
|
-
const SalaryCertificateRequestsModel_1 = require("./SalaryCertificateRequestsModel");
|
|
17
|
-
const AllowanceRequestsModel_1 = require("./AllowanceRequestsModel");
|
|
18
|
-
const ReimbursementRequestsModel_1 = require("./ReimbursementRequestsModel");
|
|
19
|
-
const BankAccountChangeRequestsModel_1 = require("./BankAccountChangeRequestsModel");
|
|
20
|
-
const FinancialChatsModel_1 = require("./FinancialChatsModel");
|
|
21
|
-
const FinancialApprovalsModel_1 = require("./FinancialApprovalsModel");
|
|
22
|
-
const FinancialWorkFlowModel_1 = require("./FinancialWorkFlowModel");
|
|
23
|
-
const FinancialAttachmentsModel_1 = require("./FinancialAttachmentsModel");
|
|
24
|
-
const RequestTypeMasterModel_1 = require("./RequestTypeMasterModel");
|
|
25
15
|
var FinancialRequestStatus;
|
|
26
16
|
(function (FinancialRequestStatus) {
|
|
27
17
|
FinancialRequestStatus["DRAFT"] = "Draft";
|
|
@@ -108,45 +98,45 @@ __decorate([
|
|
|
108
98
|
__metadata("design:type", Number)
|
|
109
99
|
], FinancialRequests.prototype, "current_approver_id", void 0);
|
|
110
100
|
__decorate([
|
|
111
|
-
(0, typeorm_1.OneToOne)(
|
|
112
|
-
__metadata("design:type",
|
|
101
|
+
(0, typeorm_1.OneToOne)('PayslipRequests', 'financialRequest', { nullable: true }),
|
|
102
|
+
__metadata("design:type", Function)
|
|
113
103
|
], FinancialRequests.prototype, "payslipRequest", void 0);
|
|
114
104
|
__decorate([
|
|
115
|
-
(0, typeorm_1.OneToOne)(
|
|
116
|
-
__metadata("design:type",
|
|
105
|
+
(0, typeorm_1.OneToOne)('SalaryCertificateRequests', 'financialRequest', { nullable: true }),
|
|
106
|
+
__metadata("design:type", Function)
|
|
117
107
|
], FinancialRequests.prototype, "salaryCertificateRequest", void 0);
|
|
118
108
|
__decorate([
|
|
119
|
-
(0, typeorm_1.OneToOne)(
|
|
120
|
-
__metadata("design:type",
|
|
109
|
+
(0, typeorm_1.OneToOne)('AllowanceRequests', 'financialRequest', { nullable: true }),
|
|
110
|
+
__metadata("design:type", Function)
|
|
121
111
|
], FinancialRequests.prototype, "allowanceRequest", void 0);
|
|
122
112
|
__decorate([
|
|
123
|
-
(0, typeorm_1.OneToOne)(
|
|
124
|
-
__metadata("design:type",
|
|
113
|
+
(0, typeorm_1.OneToOne)('ReimbursementRequests', 'financialRequest', { nullable: true }),
|
|
114
|
+
__metadata("design:type", Function)
|
|
125
115
|
], FinancialRequests.prototype, "reimbursementRequest", void 0);
|
|
126
116
|
__decorate([
|
|
127
|
-
(0, typeorm_1.OneToOne)(
|
|
128
|
-
__metadata("design:type",
|
|
117
|
+
(0, typeorm_1.OneToOne)('BankAccountChangeRequests', 'financialRequest', { nullable: true }),
|
|
118
|
+
__metadata("design:type", Function)
|
|
129
119
|
], FinancialRequests.prototype, "bankAccountChangeRequest", void 0);
|
|
130
120
|
__decorate([
|
|
131
|
-
(0, typeorm_1.OneToMany)(
|
|
121
|
+
(0, typeorm_1.OneToMany)('FinancialChats', 'financialRequest'),
|
|
132
122
|
__metadata("design:type", Array)
|
|
133
123
|
], FinancialRequests.prototype, "chats", void 0);
|
|
134
124
|
__decorate([
|
|
135
|
-
(0, typeorm_1.OneToMany)(
|
|
125
|
+
(0, typeorm_1.OneToMany)('FinancialApprovals', 'financialRequest'),
|
|
136
126
|
__metadata("design:type", Array)
|
|
137
127
|
], FinancialRequests.prototype, "approvals", void 0);
|
|
138
128
|
__decorate([
|
|
139
|
-
(0, typeorm_1.OneToMany)(
|
|
129
|
+
(0, typeorm_1.OneToMany)('FinancialWorkFlow', 'financialRequest'),
|
|
140
130
|
__metadata("design:type", Array)
|
|
141
131
|
], FinancialRequests.prototype, "workflows", void 0);
|
|
142
132
|
__decorate([
|
|
143
|
-
(0, typeorm_1.OneToMany)(
|
|
133
|
+
(0, typeorm_1.OneToMany)('FinancialAttachments', 'financialRequest'),
|
|
144
134
|
__metadata("design:type", Array)
|
|
145
135
|
], FinancialRequests.prototype, "attachments", void 0);
|
|
146
136
|
__decorate([
|
|
147
|
-
(0, typeorm_1.ManyToOne)(
|
|
137
|
+
(0, typeorm_1.ManyToOne)('RequestTypeMaster'),
|
|
148
138
|
(0, typeorm_1.JoinColumn)({ name: 'request_type_id' }),
|
|
149
|
-
__metadata("design:type",
|
|
139
|
+
__metadata("design:type", Function)
|
|
150
140
|
], FinancialRequests.prototype, "requestType", void 0);
|
|
151
141
|
exports.FinancialRequests = FinancialRequests = __decorate([
|
|
152
142
|
(0, typeorm_1.Entity)({ name: 'financial_requests' }),
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import { BaseModel } from './BaseModel';
|
|
2
|
+
import { FinancialRequests } from "./FinancialRequestsModel";
|
|
2
3
|
export declare class SalaryCertificateRequests extends BaseModel {
|
|
3
4
|
financial_request_id: number;
|
|
4
5
|
certificate_purpose: string;
|
|
5
6
|
certificate_url: string;
|
|
6
|
-
|
|
7
|
-
addressee_details: string;
|
|
8
|
-
include_salary_details: boolean;
|
|
9
|
-
include_allowances: boolean;
|
|
10
|
-
certificate_language: string;
|
|
7
|
+
financialRequest?: FinancialRequests;
|
|
11
8
|
constructor(financial_request_id: number, certificate_purpose: string, certificate_url: string);
|
|
12
9
|
}
|
|
@@ -12,15 +12,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.SalaryCertificateRequests = 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 SalaryCertificateRequests = class SalaryCertificateRequests extends BaseModel_1.BaseModel {
|
|
16
17
|
constructor(financial_request_id, certificate_purpose, certificate_url) {
|
|
17
18
|
super();
|
|
18
19
|
this.financial_request_id = financial_request_id;
|
|
19
20
|
this.certificate_purpose = certificate_purpose;
|
|
20
21
|
this.certificate_url = certificate_url;
|
|
21
|
-
this.include_salary_details = false;
|
|
22
|
-
this.include_allowances = false;
|
|
23
|
-
this.certificate_language = 'English';
|
|
24
22
|
}
|
|
25
23
|
};
|
|
26
24
|
exports.SalaryCertificateRequests = SalaryCertificateRequests;
|
|
@@ -37,25 +35,10 @@ __decorate([
|
|
|
37
35
|
__metadata("design:type", String)
|
|
38
36
|
], SalaryCertificateRequests.prototype, "certificate_url", void 0);
|
|
39
37
|
__decorate([
|
|
40
|
-
(0, typeorm_1.
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
45
|
-
__metadata("design:type", String)
|
|
46
|
-
], SalaryCertificateRequests.prototype, "addressee_details", void 0);
|
|
47
|
-
__decorate([
|
|
48
|
-
(0, typeorm_1.Column)({ type: 'boolean', default: false }),
|
|
49
|
-
__metadata("design:type", Boolean)
|
|
50
|
-
], SalaryCertificateRequests.prototype, "include_salary_details", void 0);
|
|
51
|
-
__decorate([
|
|
52
|
-
(0, typeorm_1.Column)({ type: 'boolean', default: false }),
|
|
53
|
-
__metadata("design:type", Boolean)
|
|
54
|
-
], SalaryCertificateRequests.prototype, "include_allowances", void 0);
|
|
55
|
-
__decorate([
|
|
56
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 50, nullable: true }),
|
|
57
|
-
__metadata("design:type", String)
|
|
58
|
-
], SalaryCertificateRequests.prototype, "certificate_language", void 0);
|
|
38
|
+
(0, typeorm_1.OneToOne)(() => FinancialRequestsModel_1.FinancialRequests, fr => fr.salaryCertificateRequest),
|
|
39
|
+
(0, typeorm_1.JoinColumn)({ name: 'financial_request_id' }),
|
|
40
|
+
__metadata("design:type", FinancialRequestsModel_1.FinancialRequests)
|
|
41
|
+
], SalaryCertificateRequests.prototype, "financialRequest", void 0);
|
|
59
42
|
exports.SalaryCertificateRequests = SalaryCertificateRequests = __decorate([
|
|
60
43
|
(0, typeorm_1.Entity)({ name: 'salary_certificate_requests' }),
|
|
61
44
|
__metadata("design:paramtypes", [Number, String, String])
|
package/package.json
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import { Column, Entity, OneToOne, OneToMany, ManyToOne, JoinColumn } from "typeorm";
|
|
2
2
|
import { BaseModel } from './BaseModel';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
3
|
+
|
|
4
|
+
// Import types only (not for runtime)
|
|
5
|
+
import type { PayslipRequests } from './PayslipRequestsModel';
|
|
6
|
+
import type { SalaryCertificateRequests } from './SalaryCertificateRequestsModel';
|
|
7
|
+
import type { AllowanceRequests } from './AllowanceRequestsModel';
|
|
8
|
+
import type { ReimbursementRequests } from './ReimbursementRequestsModel';
|
|
9
|
+
import type { BankAccountChangeRequests } from './BankAccountChangeRequestsModel';
|
|
10
|
+
import type { FinancialChats } from './FinancialChatsModel';
|
|
11
|
+
import type { FinancialApprovals } from './FinancialApprovalsModel';
|
|
12
|
+
import type { FinancialWorkFlow } from './FinancialWorkFlowModel';
|
|
13
|
+
import type { FinancialAttachments } from './FinancialAttachmentsModel';
|
|
14
|
+
import type { RequestTypeMaster } from './RequestTypeMasterModel';
|
|
13
15
|
|
|
14
16
|
export enum FinancialRequestStatus {
|
|
15
17
|
DRAFT = "Draft",
|
|
@@ -69,34 +71,34 @@ export class FinancialRequests extends BaseModel {
|
|
|
69
71
|
@Column({ type: 'int', nullable: true })
|
|
70
72
|
current_approver_id: number;
|
|
71
73
|
|
|
72
|
-
@OneToOne(
|
|
74
|
+
@OneToOne('PayslipRequests', 'financialRequest', { nullable: true })
|
|
73
75
|
payslipRequest?: PayslipRequests;
|
|
74
76
|
|
|
75
|
-
@OneToOne(
|
|
77
|
+
@OneToOne('SalaryCertificateRequests', 'financialRequest', { nullable: true })
|
|
76
78
|
salaryCertificateRequest?: SalaryCertificateRequests;
|
|
77
79
|
|
|
78
|
-
@OneToOne(
|
|
80
|
+
@OneToOne('AllowanceRequests', 'financialRequest', { nullable: true })
|
|
79
81
|
allowanceRequest?: AllowanceRequests;
|
|
80
82
|
|
|
81
|
-
@OneToOne(
|
|
83
|
+
@OneToOne('ReimbursementRequests', 'financialRequest', { nullable: true })
|
|
82
84
|
reimbursementRequest?: ReimbursementRequests;
|
|
83
85
|
|
|
84
|
-
@OneToOne(
|
|
86
|
+
@OneToOne('BankAccountChangeRequests', 'financialRequest', { nullable: true })
|
|
85
87
|
bankAccountChangeRequest?: BankAccountChangeRequests;
|
|
86
88
|
|
|
87
|
-
@OneToMany(
|
|
89
|
+
@OneToMany('FinancialChats', 'financialRequest')
|
|
88
90
|
chats?: FinancialChats[];
|
|
89
91
|
|
|
90
|
-
@OneToMany(
|
|
92
|
+
@OneToMany('FinancialApprovals', 'financialRequest')
|
|
91
93
|
approvals?: FinancialApprovals[];
|
|
92
94
|
|
|
93
|
-
@OneToMany(
|
|
95
|
+
@OneToMany('FinancialWorkFlow', 'financialRequest')
|
|
94
96
|
workflows?: FinancialWorkFlow[];
|
|
95
97
|
|
|
96
|
-
@OneToMany(
|
|
98
|
+
@OneToMany('FinancialAttachments', 'financialRequest')
|
|
97
99
|
attachments?: FinancialAttachments[];
|
|
98
100
|
|
|
99
|
-
@ManyToOne(
|
|
101
|
+
@ManyToOne('RequestTypeMaster')
|
|
100
102
|
@JoinColumn({ name: 'request_type_id' })
|
|
101
103
|
requestType?: RequestTypeMaster;
|
|
102
104
|
|
|
@@ -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: 'salary_certificate_requests' })
|
|
5
6
|
export class SalaryCertificateRequests extends BaseModel {
|
|
@@ -12,29 +13,16 @@ export class SalaryCertificateRequests extends BaseModel {
|
|
|
12
13
|
@Column({ type: 'varchar', length: 500, nullable: true })
|
|
13
14
|
certificate_url: string;
|
|
14
15
|
|
|
15
|
-
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
16
|
-
addressee_name: string;
|
|
17
16
|
|
|
18
|
-
@
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
@Column({ type: 'boolean', default: false })
|
|
22
|
-
include_salary_details: boolean;
|
|
23
|
-
|
|
24
|
-
@Column({ type: 'boolean', default: false })
|
|
25
|
-
include_allowances: boolean;
|
|
26
|
-
|
|
27
|
-
@Column({ type: 'varchar', length: 50, nullable: true })
|
|
28
|
-
certificate_language: string; // English, Arabic
|
|
17
|
+
@OneToOne(() => FinancialRequests, fr => fr.salaryCertificateRequest)
|
|
18
|
+
@JoinColumn({ name: 'financial_request_id' })
|
|
19
|
+
financialRequest?: FinancialRequests;
|
|
29
20
|
|
|
30
21
|
constructor(financial_request_id: number, certificate_purpose: string, certificate_url: string) {
|
|
31
22
|
super();
|
|
32
23
|
this.financial_request_id = financial_request_id;
|
|
33
24
|
this.certificate_purpose = certificate_purpose;
|
|
34
25
|
this.certificate_url = certificate_url;
|
|
35
|
-
this.include_salary_details = false;
|
|
36
|
-
this.include_allowances = false;
|
|
37
|
-
this.certificate_language = 'English';
|
|
38
26
|
}
|
|
39
27
|
}
|
|
40
28
|
|