@platform-modules/foreign-ministry 1.0.97 → 1.0.99
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 -10
- package/dist/data-source.js +1 -1
- package/dist/models/NotificationModel.d.ts +3 -1
- package/dist/models/NotificationModel.js +12 -2
- package/dist/models/user.d.ts +2 -1
- package/dist/models/user.js +7 -2
- package/package.json +1 -1
- package/src/data-source.ts +1 -1
- package/src/models/NotificationModel.ts +10 -0
- package/src/models/user.ts +5 -0
- package/dist/models/HelpContentMappedCategoriesModel.d.ts +0 -6
- package/dist/models/HelpContentMappedCategoriesModel.js +0 -34
- package/dist/models/HelpContentMappedTagsModel.d.ts +0 -6
- package/dist/models/HelpContentMappedTagsModel.js +0 -34
- package/dist/models/HelpContentTagsModel.d.ts +0 -5
- package/dist/models/HelpContentTagsModel.js +0 -29
- package/dist/models/questionTagsModel.d.ts +0 -6
- package/dist/models/questionTagsModel.js +0 -34
package/.env
CHANGED
|
@@ -1,13 +1,5 @@
|
|
|
1
1
|
DB_HOST=localhost
|
|
2
|
-
DB_PORT=
|
|
2
|
+
DB_PORT=5432
|
|
3
3
|
DB_USER=postgres
|
|
4
|
-
DB_PASS=123
|
|
4
|
+
DB_PASS=Fa@123
|
|
5
5
|
DB_NAME=FM
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
# DB_HOST=164.52.222.169
|
|
10
|
-
# DB_PORT=5432
|
|
11
|
-
# DB_USER=postgres_admin_user
|
|
12
|
-
# DB_PASS=pg_admin_user_pwd_caa_fa_$%^&OIukhjgcvbn
|
|
13
|
-
# DB_NAME=FM
|
package/dist/data-source.js
CHANGED
|
@@ -79,7 +79,7 @@ exports.AppDataSource = new typeorm_1.DataSource({
|
|
|
79
79
|
username: process.env.DB_USER || 'postgres',
|
|
80
80
|
password: process.env.DB_PASS || 'postgres',
|
|
81
81
|
database: process.env.DB_NAME || 'common_models',
|
|
82
|
-
synchronize:
|
|
82
|
+
synchronize: false, // auto-create tables (disable in prod)
|
|
83
83
|
logging: false,
|
|
84
84
|
entities: [
|
|
85
85
|
user_1.User,
|
|
@@ -13,6 +13,8 @@ export declare class Notification extends BaseModel {
|
|
|
13
13
|
content: any;
|
|
14
14
|
is_read: boolean;
|
|
15
15
|
request_id: number;
|
|
16
|
+
service_id: number;
|
|
17
|
+
sub_service_id: number;
|
|
16
18
|
route_path: string;
|
|
17
|
-
constructor(type: NotificationType, user_id: number, role_id: number, department_id: number, section_id: number, content: any, is_read: boolean, request_id: number, route_path: string);
|
|
19
|
+
constructor(type: NotificationType, user_id: number, role_id: number, department_id: number, section_id: number, content: any, is_read: boolean, request_id: number, service_id: number, sub_service_id: number, route_path: string);
|
|
18
20
|
}
|
|
@@ -19,7 +19,7 @@ var NotificationType;
|
|
|
19
19
|
NotificationType["IMPORT"] = "import";
|
|
20
20
|
})(NotificationType || (exports.NotificationType = NotificationType = {}));
|
|
21
21
|
let Notification = class Notification extends BaseModel_1.BaseModel {
|
|
22
|
-
constructor(type, user_id, role_id, department_id, section_id, content, is_read, request_id, route_path) {
|
|
22
|
+
constructor(type, user_id, role_id, department_id, section_id, content, is_read, request_id, service_id, sub_service_id, route_path) {
|
|
23
23
|
super();
|
|
24
24
|
this.type = type;
|
|
25
25
|
this.user_id = user_id;
|
|
@@ -29,6 +29,8 @@ let Notification = class Notification extends BaseModel_1.BaseModel {
|
|
|
29
29
|
this.content = content;
|
|
30
30
|
this.is_read = is_read;
|
|
31
31
|
this.request_id = request_id;
|
|
32
|
+
this.service_id = service_id;
|
|
33
|
+
this.sub_service_id = sub_service_id;
|
|
32
34
|
this.route_path = route_path;
|
|
33
35
|
}
|
|
34
36
|
};
|
|
@@ -69,11 +71,19 @@ __decorate([
|
|
|
69
71
|
(0, typeorm_1.Column)({ type: 'bigint', nullable: true }),
|
|
70
72
|
__metadata("design:type", Number)
|
|
71
73
|
], Notification.prototype, "request_id", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, typeorm_1.Column)({ type: 'bigint', nullable: true }),
|
|
76
|
+
__metadata("design:type", Number)
|
|
77
|
+
], Notification.prototype, "service_id", void 0);
|
|
78
|
+
__decorate([
|
|
79
|
+
(0, typeorm_1.Column)({ type: 'bigint', nullable: true }),
|
|
80
|
+
__metadata("design:type", Number)
|
|
81
|
+
], Notification.prototype, "sub_service_id", void 0);
|
|
72
82
|
__decorate([
|
|
73
83
|
(0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: true }),
|
|
74
84
|
__metadata("design:type", String)
|
|
75
85
|
], Notification.prototype, "route_path", void 0);
|
|
76
86
|
exports.Notification = Notification = __decorate([
|
|
77
87
|
(0, typeorm_1.Entity)({ name: 'notification' }),
|
|
78
|
-
__metadata("design:paramtypes", [String, Number, Number, Number, Number, Object, Boolean, Number, String])
|
|
88
|
+
__metadata("design:paramtypes", [String, Number, Number, Number, Number, Object, Boolean, Number, Number, Number, String])
|
|
79
89
|
], Notification);
|
package/dist/models/user.d.ts
CHANGED
|
@@ -38,5 +38,6 @@ export declare class User extends BaseModel {
|
|
|
38
38
|
spouse_name?: string;
|
|
39
39
|
children1_name?: string;
|
|
40
40
|
children2_name?: string;
|
|
41
|
-
|
|
41
|
+
language_preferences?: string;
|
|
42
|
+
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, 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, diplomatic_name?: string, civil_employee_id?: number, qualification?: string, father_name?: string, spouse_name?: string, children1_name?: string, children2_name?: string, language_preferences?: string);
|
|
42
43
|
}
|
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, department, section, grade, location, country, is_admin, division, reporting_to, address, residential_status, religion, designation, avatar, passport_number, personal_email, extension_number, diplomatic_name, civil_employee_id, qualification, father_name, spouse_name, children1_name, children2_name) {
|
|
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, department, section, grade, location, country, is_admin, division, reporting_to, address, residential_status, religion, designation, avatar, passport_number, personal_email, extension_number, diplomatic_name, civil_employee_id, qualification, father_name, spouse_name, children1_name, children2_name, language_preferences) {
|
|
17
17
|
super();
|
|
18
18
|
this.employee_id = employee_id;
|
|
19
19
|
this.employee_name = employee_name;
|
|
@@ -53,6 +53,7 @@ let User = class User extends BaseModel_1.BaseModel {
|
|
|
53
53
|
this.spouse_name = spouse_name;
|
|
54
54
|
this.children1_name = children1_name;
|
|
55
55
|
this.children2_name = children2_name;
|
|
56
|
+
this.language_preferences = language_preferences;
|
|
56
57
|
}
|
|
57
58
|
};
|
|
58
59
|
exports.User = User;
|
|
@@ -208,7 +209,11 @@ __decorate([
|
|
|
208
209
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
209
210
|
__metadata("design:type", String)
|
|
210
211
|
], User.prototype, "children2_name", void 0);
|
|
212
|
+
__decorate([
|
|
213
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
214
|
+
__metadata("design:type", String)
|
|
215
|
+
], User.prototype, "language_preferences", void 0);
|
|
211
216
|
exports.User = User = __decorate([
|
|
212
217
|
(0, typeorm_1.Entity)({ name: 'users' }),
|
|
213
|
-
__metadata("design:paramtypes", [Number, String, String, String, String, String, String, String, String, String, String, String, String, Number, String, Number, Number, Number, String, String, Boolean, Number, Number, String, String, String, Number, String, String, String, Number, String, Number, String, String, String, String, String])
|
|
218
|
+
__metadata("design:paramtypes", [Number, String, String, String, String, String, String, String, String, String, String, String, String, Number, String, Number, Number, Number, String, String, Boolean, Number, Number, String, String, String, Number, String, String, String, Number, String, Number, String, String, String, String, String, String])
|
|
214
219
|
], User);
|
package/package.json
CHANGED
package/src/data-source.ts
CHANGED
|
@@ -85,7 +85,7 @@ export const AppDataSource = new DataSource({
|
|
|
85
85
|
username: process.env.DB_USER || 'postgres',
|
|
86
86
|
password: process.env.DB_PASS || 'postgres',
|
|
87
87
|
database: process.env.DB_NAME || 'common_models',
|
|
88
|
-
synchronize:
|
|
88
|
+
synchronize: false, // auto-create tables (disable in prod)
|
|
89
89
|
logging: false,
|
|
90
90
|
entities: [
|
|
91
91
|
User,
|
|
@@ -39,6 +39,12 @@ export class Notification extends BaseModel {
|
|
|
39
39
|
@Column({ type: 'bigint', nullable: true })
|
|
40
40
|
request_id: number;
|
|
41
41
|
|
|
42
|
+
@Column({ type: 'bigint', nullable: true })
|
|
43
|
+
service_id: number;
|
|
44
|
+
|
|
45
|
+
@Column({ type: 'bigint', nullable: true })
|
|
46
|
+
sub_service_id: number;
|
|
47
|
+
|
|
42
48
|
@Column({ type: 'varchar', length: 500, nullable: true })
|
|
43
49
|
route_path: string;
|
|
44
50
|
|
|
@@ -51,6 +57,8 @@ export class Notification extends BaseModel {
|
|
|
51
57
|
content: any,
|
|
52
58
|
is_read: boolean,
|
|
53
59
|
request_id: number,
|
|
60
|
+
service_id: number,
|
|
61
|
+
sub_service_id: number,
|
|
54
62
|
route_path: string
|
|
55
63
|
) {
|
|
56
64
|
super();
|
|
@@ -62,6 +70,8 @@ export class Notification extends BaseModel {
|
|
|
62
70
|
this.content = content;
|
|
63
71
|
this.is_read = is_read;
|
|
64
72
|
this.request_id = request_id;
|
|
73
|
+
this.service_id = service_id;
|
|
74
|
+
this.sub_service_id = sub_service_id;
|
|
65
75
|
this.route_path = route_path;
|
|
66
76
|
}
|
|
67
77
|
}
|
package/src/models/user.ts
CHANGED
|
@@ -119,6 +119,9 @@ export class User extends BaseModel {
|
|
|
119
119
|
@Column({ nullable: true })
|
|
120
120
|
children2_name?: string;
|
|
121
121
|
|
|
122
|
+
@Column({ nullable: true })
|
|
123
|
+
language_preferences?: string;
|
|
124
|
+
|
|
122
125
|
constructor(
|
|
123
126
|
employee_id?: number,
|
|
124
127
|
employee_name?: string,
|
|
@@ -158,6 +161,7 @@ export class User extends BaseModel {
|
|
|
158
161
|
spouse_name?: string,
|
|
159
162
|
children1_name?: string,
|
|
160
163
|
children2_name?: string,
|
|
164
|
+
language_preferences?: string,
|
|
161
165
|
) {
|
|
162
166
|
super();
|
|
163
167
|
this.employee_id = employee_id;
|
|
@@ -198,5 +202,6 @@ export class User extends BaseModel {
|
|
|
198
202
|
this.spouse_name = spouse_name;
|
|
199
203
|
this.children1_name = children1_name;
|
|
200
204
|
this.children2_name = children2_name;
|
|
205
|
+
this.language_preferences = language_preferences;
|
|
201
206
|
}
|
|
202
207
|
}
|
|
@@ -1,34 +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.HelpContentMappedCategories = void 0;
|
|
13
|
-
const typeorm_1 = require("typeorm");
|
|
14
|
-
const BaseModel_1 = require("./BaseModel");
|
|
15
|
-
let HelpContentMappedCategories = class HelpContentMappedCategories extends BaseModel_1.BaseModel {
|
|
16
|
-
constructor(help_content_category_Id, help_content_Id) {
|
|
17
|
-
super();
|
|
18
|
-
this.help_content_category_Id = help_content_category_Id,
|
|
19
|
-
this.help_content_Id = help_content_Id;
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
exports.HelpContentMappedCategories = HelpContentMappedCategories;
|
|
23
|
-
__decorate([
|
|
24
|
-
(0, typeorm_1.Column)({ nullable: true }),
|
|
25
|
-
__metadata("design:type", Number)
|
|
26
|
-
], HelpContentMappedCategories.prototype, "help_content_category_Id", void 0);
|
|
27
|
-
__decorate([
|
|
28
|
-
(0, typeorm_1.Column)({ nullable: true }),
|
|
29
|
-
__metadata("design:type", Number)
|
|
30
|
-
], HelpContentMappedCategories.prototype, "help_content_Id", void 0);
|
|
31
|
-
exports.HelpContentMappedCategories = HelpContentMappedCategories = __decorate([
|
|
32
|
-
(0, typeorm_1.Entity)({ name: 'help_content_mapped_categories' }),
|
|
33
|
-
__metadata("design:paramtypes", [Number, Number])
|
|
34
|
-
], HelpContentMappedCategories);
|
|
@@ -1,34 +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.HelpContentMappedTags = void 0;
|
|
13
|
-
const typeorm_1 = require("typeorm");
|
|
14
|
-
const BaseModel_1 = require("./BaseModel");
|
|
15
|
-
let HelpContentMappedTags = class HelpContentMappedTags extends BaseModel_1.BaseModel {
|
|
16
|
-
constructor(help_content_tag_Id, help_content_Id) {
|
|
17
|
-
super();
|
|
18
|
-
this.help_content_tag_Id = help_content_tag_Id,
|
|
19
|
-
this.help_content_Id = help_content_Id;
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
exports.HelpContentMappedTags = HelpContentMappedTags;
|
|
23
|
-
__decorate([
|
|
24
|
-
(0, typeorm_1.Column)({ nullable: true }),
|
|
25
|
-
__metadata("design:type", Number)
|
|
26
|
-
], HelpContentMappedTags.prototype, "help_content_tag_Id", void 0);
|
|
27
|
-
__decorate([
|
|
28
|
-
(0, typeorm_1.Column)({ nullable: true }),
|
|
29
|
-
__metadata("design:type", Number)
|
|
30
|
-
], HelpContentMappedTags.prototype, "help_content_Id", void 0);
|
|
31
|
-
exports.HelpContentMappedTags = HelpContentMappedTags = __decorate([
|
|
32
|
-
(0, typeorm_1.Entity)({ name: 'help_content_mapped_tags' }),
|
|
33
|
-
__metadata("design:paramtypes", [Number, Number])
|
|
34
|
-
], HelpContentMappedTags);
|
|
@@ -1,29 +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.HelpContentTags = void 0;
|
|
13
|
-
const typeorm_1 = require("typeorm");
|
|
14
|
-
const BaseModel_1 = require("./BaseModel");
|
|
15
|
-
let HelpContentTags = class HelpContentTags extends BaseModel_1.BaseModel {
|
|
16
|
-
constructor(name) {
|
|
17
|
-
super();
|
|
18
|
-
this.name = name;
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
exports.HelpContentTags = HelpContentTags;
|
|
22
|
-
__decorate([
|
|
23
|
-
(0, typeorm_1.Column)({ nullable: true }),
|
|
24
|
-
__metadata("design:type", String)
|
|
25
|
-
], HelpContentTags.prototype, "name", void 0);
|
|
26
|
-
exports.HelpContentTags = HelpContentTags = __decorate([
|
|
27
|
-
(0, typeorm_1.Entity)({ name: 'help_content_tags' }),
|
|
28
|
-
__metadata("design:paramtypes", [String])
|
|
29
|
-
], HelpContentTags);
|
|
@@ -1,34 +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.QuestionTags = void 0;
|
|
13
|
-
const typeorm_1 = require("typeorm");
|
|
14
|
-
const BaseModel_1 = require("./BaseModel");
|
|
15
|
-
let QuestionTags = class QuestionTags extends BaseModel_1.BaseModel {
|
|
16
|
-
constructor(name, question_Id) {
|
|
17
|
-
super();
|
|
18
|
-
this.name = name,
|
|
19
|
-
this.question_Id = question_Id;
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
exports.QuestionTags = QuestionTags;
|
|
23
|
-
__decorate([
|
|
24
|
-
(0, typeorm_1.Column)({ nullable: true }),
|
|
25
|
-
__metadata("design:type", String)
|
|
26
|
-
], QuestionTags.prototype, "name", void 0);
|
|
27
|
-
__decorate([
|
|
28
|
-
(0, typeorm_1.Column)({ nullable: true }),
|
|
29
|
-
__metadata("design:type", Number)
|
|
30
|
-
], QuestionTags.prototype, "question_Id", void 0);
|
|
31
|
-
exports.QuestionTags = QuestionTags = __decorate([
|
|
32
|
-
(0, typeorm_1.Entity)({ name: 'question_tags' }),
|
|
33
|
-
__metadata("design:paramtypes", [String, Number])
|
|
34
|
-
], QuestionTags);
|