@platform-modules/foreign-ministry 1.2.20 → 1.2.22
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/FinancialGradeModel.d.ts +3 -1
- package/dist/models/FinancialGradeModel.js +12 -2
- package/dist/models/LeaveRequestModel.d.ts +9 -1
- package/dist/models/LeaveRequestModel.js +28 -3
- package/dist/models/user.d.ts +2 -1
- package/dist/models/user.js +7 -2
- package/package.json +1 -1
- package/src/models/FinancialGradeModel.ts +11 -1
- package/src/models/LeaveRequestModel.ts +21 -1
- package/src/models/user.ts +5 -0
|
@@ -4,5 +4,7 @@ export declare class FinancialGrade extends BaseModel {
|
|
|
4
4
|
arabic_title: string;
|
|
5
5
|
financial_grade: number;
|
|
6
6
|
leave_count: number;
|
|
7
|
-
|
|
7
|
+
daily_allowance: number | null;
|
|
8
|
+
travel_class: string | null;
|
|
9
|
+
constructor(diplomatic_title: string, arabic_title: string, financial_grade: number, leave_count: number, daily_allowance?: number, travel_class?: string);
|
|
8
10
|
}
|
|
@@ -14,12 +14,14 @@ const typeorm_1 = require("typeorm");
|
|
|
14
14
|
const BaseModel_1 = require("./BaseModel");
|
|
15
15
|
//This model is used to store the Financial Grade declaration on the Admin Side
|
|
16
16
|
let FinancialGrade = class FinancialGrade extends BaseModel_1.BaseModel {
|
|
17
|
-
constructor(diplomatic_title, arabic_title, financial_grade, leave_count) {
|
|
17
|
+
constructor(diplomatic_title, arabic_title, financial_grade, leave_count, daily_allowance, travel_class) {
|
|
18
18
|
super();
|
|
19
19
|
this.diplomatic_title = diplomatic_title;
|
|
20
20
|
this.arabic_title = arabic_title;
|
|
21
21
|
this.financial_grade = financial_grade;
|
|
22
22
|
this.leave_count = leave_count;
|
|
23
|
+
this.daily_allowance = daily_allowance || null;
|
|
24
|
+
this.travel_class = travel_class || null;
|
|
23
25
|
}
|
|
24
26
|
};
|
|
25
27
|
exports.FinancialGrade = FinancialGrade;
|
|
@@ -39,7 +41,15 @@ __decorate([
|
|
|
39
41
|
(0, typeorm_1.Column)({ type: "integer", nullable: true }),
|
|
40
42
|
__metadata("design:type", Number)
|
|
41
43
|
], FinancialGrade.prototype, "leave_count", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, typeorm_1.Column)({ type: "decimal", precision: 10, scale: 2, nullable: true }),
|
|
46
|
+
__metadata("design:type", Object)
|
|
47
|
+
], FinancialGrade.prototype, "daily_allowance", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
|
|
50
|
+
__metadata("design:type", Object)
|
|
51
|
+
], FinancialGrade.prototype, "travel_class", void 0);
|
|
42
52
|
exports.FinancialGrade = FinancialGrade = __decorate([
|
|
43
53
|
(0, typeorm_1.Entity)({ name: 'financial_grade' }),
|
|
44
|
-
__metadata("design:paramtypes", [String, String, Number, Number])
|
|
54
|
+
__metadata("design:paramtypes", [String, String, Number, Number, Number, String])
|
|
45
55
|
], FinancialGrade);
|
|
@@ -11,6 +11,10 @@ export declare enum status {
|
|
|
11
11
|
CANCELLED = "Cancelled",
|
|
12
12
|
RETURNED = "Returned"
|
|
13
13
|
}
|
|
14
|
+
export declare enum location {
|
|
15
|
+
INSIDE = "Inside",
|
|
16
|
+
OUTSIDE = "Outside"
|
|
17
|
+
}
|
|
14
18
|
export declare class LeaveRequests extends BaseModel {
|
|
15
19
|
user_id: string;
|
|
16
20
|
leave_for: Leave_For;
|
|
@@ -48,5 +52,9 @@ export declare class LeaveRequests extends BaseModel {
|
|
|
48
52
|
actual_leave_end_date: Date | null;
|
|
49
53
|
actual_leave_duration: string | null;
|
|
50
54
|
no_of_days_delayed: number | null;
|
|
51
|
-
|
|
55
|
+
type_of_representation: string | null;
|
|
56
|
+
location: location;
|
|
57
|
+
exam_start_date: Date;
|
|
58
|
+
exam_end_date: Date;
|
|
59
|
+
constructor(user_id: string, location: location, exam_start_date: Date, exam_end_date: Date, leave_for: Leave_For, leave_type: number, study_leave_degree: number, department: string, status: status, leave_start_date: Date, leave_end_date: Date, leave_duration: number, remaining_leave_balance: number, contact_number_during_leave: string, address_during_leave: string, notes: string, delegated_to: string, number_of_escort_instances_per_year: number, accompanying_the_patient: boolean, treatment_place: string, emergency_leaves_available: number, unpaid_leave_type: string, country_or_state_being_visited: string, leave_balance_summary: string, representation: string, activity_title: string, relationship: string, mounring_leave_relation: number, service_id: number, sub_service_id: number, workflow_execution_id: string, type_of_representation: string);
|
|
52
60
|
}
|
|
@@ -9,7 +9,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.LeaveRequests = exports.status = exports.Leave_For = void 0;
|
|
12
|
+
exports.LeaveRequests = exports.location = exports.status = exports.Leave_For = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const BaseModel_1 = require("./BaseModel");
|
|
15
15
|
//This model is used to store the Leave Request
|
|
@@ -27,8 +27,13 @@ var status;
|
|
|
27
27
|
status["CANCELLED"] = "Cancelled";
|
|
28
28
|
status["RETURNED"] = "Returned";
|
|
29
29
|
})(status || (exports.status = status = {}));
|
|
30
|
+
var location;
|
|
31
|
+
(function (location) {
|
|
32
|
+
location["INSIDE"] = "Inside";
|
|
33
|
+
location["OUTSIDE"] = "Outside";
|
|
34
|
+
})(location || (exports.location = location = {}));
|
|
30
35
|
let LeaveRequests = class LeaveRequests extends BaseModel_1.BaseModel {
|
|
31
|
-
constructor(user_id, leave_for, leave_type, study_leave_degree, department, status, leave_start_date, leave_end_date, leave_duration, remaining_leave_balance, contact_number_during_leave, address_during_leave, notes, delegated_to, number_of_escort_instances_per_year, accompanying_the_patient, treatment_place, emergency_leaves_available, unpaid_leave_type, country_or_state_being_visited, leave_balance_summary, representation, activity_title, relationship, mounring_leave_relation, service_id, sub_service_id, workflow_execution_id) {
|
|
36
|
+
constructor(user_id, location, exam_start_date, exam_end_date, leave_for, leave_type, study_leave_degree, department, status, leave_start_date, leave_end_date, leave_duration, remaining_leave_balance, contact_number_during_leave, address_during_leave, notes, delegated_to, number_of_escort_instances_per_year, accompanying_the_patient, treatment_place, emergency_leaves_available, unpaid_leave_type, country_or_state_being_visited, leave_balance_summary, representation, activity_title, relationship, mounring_leave_relation, service_id, sub_service_id, workflow_execution_id, type_of_representation) {
|
|
32
37
|
super();
|
|
33
38
|
this.user_id = user_id;
|
|
34
39
|
this.leave_for = leave_for;
|
|
@@ -58,6 +63,10 @@ let LeaveRequests = class LeaveRequests extends BaseModel_1.BaseModel {
|
|
|
58
63
|
this.service_id = service_id;
|
|
59
64
|
this.sub_service_id = sub_service_id;
|
|
60
65
|
this.workflow_execution_id = workflow_execution_id;
|
|
66
|
+
this.type_of_representation = type_of_representation;
|
|
67
|
+
this.location = location;
|
|
68
|
+
this.exam_start_date = exam_start_date;
|
|
69
|
+
this.exam_end_date = exam_end_date;
|
|
61
70
|
}
|
|
62
71
|
};
|
|
63
72
|
exports.LeaveRequests = LeaveRequests;
|
|
@@ -205,7 +214,23 @@ __decorate([
|
|
|
205
214
|
(0, typeorm_1.Column)({ type: 'int', nullable: true, default: null }),
|
|
206
215
|
__metadata("design:type", Object)
|
|
207
216
|
], LeaveRequests.prototype, "no_of_days_delayed", void 0);
|
|
217
|
+
__decorate([
|
|
218
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true, default: null }),
|
|
219
|
+
__metadata("design:type", Object)
|
|
220
|
+
], LeaveRequests.prototype, "type_of_representation", void 0);
|
|
221
|
+
__decorate([
|
|
222
|
+
(0, typeorm_1.Column)({ type: "enum", enum: location, default: location.INSIDE, nullable: true }),
|
|
223
|
+
__metadata("design:type", String)
|
|
224
|
+
], LeaveRequests.prototype, "location", void 0);
|
|
225
|
+
__decorate([
|
|
226
|
+
(0, typeorm_1.Column)({ type: 'date', nullable: true }),
|
|
227
|
+
__metadata("design:type", Date)
|
|
228
|
+
], LeaveRequests.prototype, "exam_start_date", void 0);
|
|
229
|
+
__decorate([
|
|
230
|
+
(0, typeorm_1.Column)({ type: 'date', nullable: true }),
|
|
231
|
+
__metadata("design:type", Date)
|
|
232
|
+
], LeaveRequests.prototype, "exam_end_date", void 0);
|
|
208
233
|
exports.LeaveRequests = LeaveRequests = __decorate([
|
|
209
234
|
(0, typeorm_1.Entity)({ name: 'leave_requests' }),
|
|
210
|
-
__metadata("design:paramtypes", [String, String, Number, Number, String, String, Date, Date, Number, Number, String, String, String, String, Number, Boolean, String, Number, String, String, String, String, String, String, Number, Number, Number, String])
|
|
235
|
+
__metadata("design:paramtypes", [String, String, Date, Date, String, Number, Number, String, String, Date, Date, Number, Number, String, String, String, String, Number, Boolean, String, Number, String, String, String, String, String, String, Number, Number, Number, String, String])
|
|
211
236
|
], LeaveRequests);
|
package/dist/models/user.d.ts
CHANGED
|
@@ -43,5 +43,6 @@ export declare class User extends BaseModel {
|
|
|
43
43
|
language_preferences?: string;
|
|
44
44
|
category: "FM" | "Embassy";
|
|
45
45
|
mandc_number: number;
|
|
46
|
-
|
|
46
|
+
is_services_blocked?: boolean;
|
|
47
|
+
constructor(employee_id?: number, employee_name?: string, employee_arabic_name?: string, date_of_birth?: string, region_of_birth?: string, country_of_birth?: string, date_of_joining?: string, last_promotion_date?: string, gender?: string, marital_status?: string, nationality?: string, email?: string, blood_group?: string, national_id?: number, mobile?: string, office_number?: string, department?: number, section?: number, grade?: number, location?: string, country?: string, is_admin?: boolean, division?: number, reporting_to?: number, address?: string, residential_status?: string, religion?: string, designation?: number, avatar?: string, passport_number?: string, personal_email?: string, extension_number?: number, fax_number?: string, diplomatic_name?: string, civil_employee_id?: number, qualification?: string, father_name?: string, spouse_name?: string, children1_name?: string, children2_name?: string, language_preferences?: string, category?: "FM" | "Embassy", mandc_number?: number, is_services_blocked?: boolean);
|
|
47
48
|
}
|
package/dist/models/user.js
CHANGED
|
@@ -13,7 +13,7 @@ exports.User = void 0;
|
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const BaseModel_1 = require("./BaseModel");
|
|
15
15
|
let User = class User extends BaseModel_1.BaseModel {
|
|
16
|
-
constructor(employee_id, employee_name, employee_arabic_name, date_of_birth, region_of_birth, country_of_birth, date_of_joining, last_promotion_date, gender, marital_status, nationality, email, blood_group, national_id, mobile, office_number, department, section, grade, location, country, is_admin, division, reporting_to, address, residential_status, religion, designation, avatar, passport_number, personal_email, extension_number, fax_number, diplomatic_name, civil_employee_id, qualification, father_name, spouse_name, children1_name, children2_name, language_preferences, category, mandc_number) {
|
|
16
|
+
constructor(employee_id, employee_name, employee_arabic_name, date_of_birth, region_of_birth, country_of_birth, date_of_joining, last_promotion_date, gender, marital_status, nationality, email, blood_group, national_id, mobile, office_number, department, section, grade, location, country, is_admin, division, reporting_to, address, residential_status, religion, designation, avatar, passport_number, personal_email, extension_number, fax_number, diplomatic_name, civil_employee_id, qualification, father_name, spouse_name, children1_name, children2_name, language_preferences, category, mandc_number, is_services_blocked) {
|
|
17
17
|
super();
|
|
18
18
|
this.employee_id = employee_id;
|
|
19
19
|
this.employee_name = employee_name;
|
|
@@ -58,6 +58,7 @@ let User = class User extends BaseModel_1.BaseModel {
|
|
|
58
58
|
this.language_preferences = language_preferences;
|
|
59
59
|
this.category = category || "FM";
|
|
60
60
|
this.mandc_number = mandc_number || 0;
|
|
61
|
+
this.is_services_blocked = is_services_blocked;
|
|
61
62
|
}
|
|
62
63
|
};
|
|
63
64
|
exports.User = User;
|
|
@@ -233,7 +234,11 @@ __decorate([
|
|
|
233
234
|
(0, typeorm_1.Column)({ type: "int", nullable: true, default: 0 }),
|
|
234
235
|
__metadata("design:type", Number)
|
|
235
236
|
], User.prototype, "mandc_number", void 0);
|
|
237
|
+
__decorate([
|
|
238
|
+
(0, typeorm_1.Column)({ nullable: true, default: false }),
|
|
239
|
+
__metadata("design:type", Boolean)
|
|
240
|
+
], User.prototype, "is_services_blocked", void 0);
|
|
236
241
|
exports.User = User = __decorate([
|
|
237
242
|
(0, typeorm_1.Entity)({ name: 'users' }),
|
|
238
|
-
__metadata("design:paramtypes", [Number, String, String, String, String, String, String, String, String, String, String, String, String, Number, String, String, Number, Number, Number, String, String, Boolean, Number, Number, String, String, String, Number, String, String, String, Number, String, String, Number, String, String, String, String, String, String, String, Number])
|
|
243
|
+
__metadata("design:paramtypes", [Number, String, String, String, String, String, String, String, String, String, String, String, String, Number, String, String, Number, Number, Number, String, String, Boolean, Number, Number, String, String, String, Number, String, String, String, Number, String, String, Number, String, String, String, String, String, String, String, Number, Boolean])
|
|
239
244
|
], User);
|
package/package.json
CHANGED
|
@@ -16,16 +16,26 @@ export class FinancialGrade extends BaseModel {
|
|
|
16
16
|
@Column({ type: "integer", nullable: true })
|
|
17
17
|
leave_count: number;
|
|
18
18
|
|
|
19
|
+
@Column({ type: "decimal", precision: 10, scale: 2, nullable: true })
|
|
20
|
+
daily_allowance: number | null;
|
|
21
|
+
|
|
22
|
+
@Column({ type: 'varchar', nullable: true })
|
|
23
|
+
travel_class: string | null;
|
|
24
|
+
|
|
19
25
|
constructor(
|
|
20
26
|
diplomatic_title: string,
|
|
21
27
|
arabic_title: string,
|
|
22
28
|
financial_grade: number,
|
|
23
|
-
leave_count: number
|
|
29
|
+
leave_count: number,
|
|
30
|
+
daily_allowance?: number,
|
|
31
|
+
travel_class?: string
|
|
24
32
|
) {
|
|
25
33
|
super();
|
|
26
34
|
this.diplomatic_title = diplomatic_title;
|
|
27
35
|
this.arabic_title = arabic_title;
|
|
28
36
|
this.financial_grade = financial_grade;
|
|
29
37
|
this.leave_count = leave_count;
|
|
38
|
+
this.daily_allowance = daily_allowance || null;
|
|
39
|
+
this.travel_class = travel_class || null;
|
|
30
40
|
}
|
|
31
41
|
}
|
|
@@ -14,6 +14,11 @@ export enum status {
|
|
|
14
14
|
CANCELLED = "Cancelled",
|
|
15
15
|
RETURNED = "Returned"
|
|
16
16
|
}
|
|
17
|
+
export enum location {
|
|
18
|
+
INSIDE = "Inside",
|
|
19
|
+
OUTSIDE = "Outside",
|
|
20
|
+
}
|
|
21
|
+
|
|
17
22
|
@Entity({ name: 'leave_requests' })
|
|
18
23
|
export class LeaveRequests extends BaseModel {
|
|
19
24
|
@Column({ type: 'varchar', length: 100, nullable: true })
|
|
@@ -125,8 +130,19 @@ export class LeaveRequests extends BaseModel {
|
|
|
125
130
|
@Column({ type: 'int', nullable: true ,default: null})
|
|
126
131
|
no_of_days_delayed: number | null;
|
|
127
132
|
|
|
133
|
+
@Column({ type: 'varchar', length: 255, nullable: true, default: null})
|
|
134
|
+
type_of_representation: string | null;
|
|
135
|
+
|
|
136
|
+
@Column({ type: "enum", enum: location, default: location.INSIDE, nullable: true })
|
|
137
|
+
location: location;
|
|
138
|
+
|
|
139
|
+
@Column({ type: 'date', nullable: true })
|
|
140
|
+
exam_start_date: Date;
|
|
141
|
+
|
|
142
|
+
@Column({ type: 'date', nullable: true })
|
|
143
|
+
exam_end_date: Date;
|
|
128
144
|
|
|
129
|
-
constructor(user_id: string, leave_for: Leave_For, leave_type: number, study_leave_degree: number, department: string, status: status, leave_start_date: Date, leave_end_date: Date, leave_duration: number, remaining_leave_balance: number, contact_number_during_leave: string, address_during_leave: string, notes: string, delegated_to: string, number_of_escort_instances_per_year: number, accompanying_the_patient: boolean, treatment_place: string, emergency_leaves_available: number, unpaid_leave_type: string, country_or_state_being_visited: string, leave_balance_summary: string, representation: string, activity_title: string, relationship: string, mounring_leave_relation: number, service_id: number, sub_service_id: number, workflow_execution_id: string) {
|
|
145
|
+
constructor(user_id: string, location: location, exam_start_date: Date, exam_end_date: Date, leave_for: Leave_For, leave_type: number, study_leave_degree: number, department: string, status: status, leave_start_date: Date, leave_end_date: Date, leave_duration: number, remaining_leave_balance: number, contact_number_during_leave: string, address_during_leave: string, notes: string, delegated_to: string, number_of_escort_instances_per_year: number, accompanying_the_patient: boolean, treatment_place: string, emergency_leaves_available: number, unpaid_leave_type: string, country_or_state_being_visited: string, leave_balance_summary: string, representation: string, activity_title: string, relationship: string, mounring_leave_relation: number, service_id: number, sub_service_id: number, workflow_execution_id: string, type_of_representation: string) {
|
|
130
146
|
super();
|
|
131
147
|
this.user_id = user_id;
|
|
132
148
|
this.leave_for = leave_for;
|
|
@@ -156,5 +172,9 @@ export class LeaveRequests extends BaseModel {
|
|
|
156
172
|
this.service_id = service_id;
|
|
157
173
|
this.sub_service_id = sub_service_id;
|
|
158
174
|
this.workflow_execution_id = workflow_execution_id;
|
|
175
|
+
this.type_of_representation = type_of_representation;
|
|
176
|
+
this.location = location;
|
|
177
|
+
this.exam_start_date = exam_start_date;
|
|
178
|
+
this.exam_end_date = exam_end_date;
|
|
159
179
|
}
|
|
160
180
|
}
|
package/src/models/user.ts
CHANGED
|
@@ -135,6 +135,9 @@ export class User extends BaseModel {
|
|
|
135
135
|
@Column({ type: "int", nullable: true , default: 0})
|
|
136
136
|
mandc_number: number;
|
|
137
137
|
|
|
138
|
+
@Column({ nullable: true , default: false})
|
|
139
|
+
is_services_blocked?: boolean;
|
|
140
|
+
|
|
138
141
|
constructor(
|
|
139
142
|
employee_id?: number,
|
|
140
143
|
employee_name?: string,
|
|
@@ -179,6 +182,7 @@ export class User extends BaseModel {
|
|
|
179
182
|
language_preferences?: string,
|
|
180
183
|
category?: "FM" | "Embassy",
|
|
181
184
|
mandc_number?: number,
|
|
185
|
+
is_services_blocked?: boolean,
|
|
182
186
|
) {
|
|
183
187
|
super();
|
|
184
188
|
this.employee_id = employee_id;
|
|
@@ -224,5 +228,6 @@ export class User extends BaseModel {
|
|
|
224
228
|
this.language_preferences = language_preferences;
|
|
225
229
|
this.category = category || "FM";
|
|
226
230
|
this.mandc_number = mandc_number || 0;
|
|
231
|
+
this.is_services_blocked = is_services_blocked;
|
|
227
232
|
}
|
|
228
233
|
}
|