@platform-modules/foreign-ministry 1.0.79 → 1.0.80
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 +3 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- 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/NotificationModel.d.ts +18 -0
- package/dist/models/NotificationModel.js +79 -0
- package/dist/models/questionTagsModel.d.ts +6 -0
- package/dist/models/questionTagsModel.js +34 -0
- package/dist/models/userRolesModel.d.ts +2 -1
- package/dist/models/userRolesModel.js +7 -2
- package/package.json +1 -1
- package/src/data-source.ts +3 -1
- package/src/index.ts +1 -0
- package/src/models/NotificationModel.ts +68 -0
- package/src/models/userRolesModel.ts +5 -1
- package/dist/models/LeaveApprovalDetailsModel.d.ts +0 -13
- package/dist/models/LeaveApprovalDetailsModel.js +0 -51
- package/dist/models/LeaveApprovalMatrixModel.d.ts +0 -7
- package/dist/models/LeaveApprovalMatrixModel.js +0 -40
package/.env
CHANGED
package/dist/data-source.js
CHANGED
|
@@ -53,6 +53,7 @@ const HolidaysModel_1 = require("./models/HolidaysModel");
|
|
|
53
53
|
const userRolesModel_1 = require("./models/userRolesModel");
|
|
54
54
|
const roleRightsModel_1 = require("./models/roleRightsModel");
|
|
55
55
|
const PortalFeedbackModel_1 = require("./models/PortalFeedbackModel");
|
|
56
|
+
const NotificationModel_1 = require("./models/NotificationModel");
|
|
56
57
|
exports.AppDataSource = new typeorm_1.DataSource({
|
|
57
58
|
type: 'postgres',
|
|
58
59
|
host: process.env.DB_HOST || 'localhost',
|
|
@@ -110,6 +111,7 @@ exports.AppDataSource = new typeorm_1.DataSource({
|
|
|
110
111
|
HolidaysModel_1.Holidays,
|
|
111
112
|
userRolesModel_1.UserRole,
|
|
112
113
|
roleRightsModel_1.RoleRights,
|
|
113
|
-
PortalFeedbackModel_1.PortalFeedback
|
|
114
|
+
PortalFeedbackModel_1.PortalFeedback,
|
|
115
|
+
NotificationModel_1.Notification
|
|
114
116
|
],
|
|
115
117
|
});
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -62,3 +62,4 @@ __exportStar(require("./models/HolidaysModel"), exports);
|
|
|
62
62
|
__exportStar(require("./models/userRolesModel"), exports);
|
|
63
63
|
__exportStar(require("./models/roleRightsModel"), exports);
|
|
64
64
|
__exportStar(require("./models/PortalFeedbackModel"), exports);
|
|
65
|
+
__exportStar(require("./models/NotificationModel"), exports);
|
|
@@ -0,0 +1,34 @@
|
|
|
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);
|
|
@@ -0,0 +1,34 @@
|
|
|
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);
|
|
@@ -0,0 +1,29 @@
|
|
|
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);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
export declare enum NotificationType {
|
|
3
|
+
REQUEST_RAISED = "request raised",
|
|
4
|
+
REMINDER = "reminder",
|
|
5
|
+
IMPORT = "import"
|
|
6
|
+
}
|
|
7
|
+
export declare class Notification extends BaseModel {
|
|
8
|
+
type: NotificationType;
|
|
9
|
+
user_id: number;
|
|
10
|
+
role_id: number;
|
|
11
|
+
department_id: number;
|
|
12
|
+
section_id: number;
|
|
13
|
+
content: any;
|
|
14
|
+
is_read: boolean;
|
|
15
|
+
request_id: number;
|
|
16
|
+
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);
|
|
18
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
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.Notification = exports.NotificationType = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
var NotificationType;
|
|
16
|
+
(function (NotificationType) {
|
|
17
|
+
NotificationType["REQUEST_RAISED"] = "request raised";
|
|
18
|
+
NotificationType["REMINDER"] = "reminder";
|
|
19
|
+
NotificationType["IMPORT"] = "import";
|
|
20
|
+
})(NotificationType || (exports.NotificationType = NotificationType = {}));
|
|
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) {
|
|
23
|
+
super();
|
|
24
|
+
this.type = type;
|
|
25
|
+
this.user_id = user_id;
|
|
26
|
+
this.role_id = role_id;
|
|
27
|
+
this.department_id = department_id;
|
|
28
|
+
this.section_id = section_id;
|
|
29
|
+
this.content = content;
|
|
30
|
+
this.is_read = is_read;
|
|
31
|
+
this.request_id = request_id;
|
|
32
|
+
this.route_path = route_path;
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
exports.Notification = Notification;
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, typeorm_1.Column)({
|
|
38
|
+
type: "enum",
|
|
39
|
+
enum: NotificationType,
|
|
40
|
+
nullable: false,
|
|
41
|
+
}),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], Notification.prototype, "type", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, typeorm_1.Column)({ type: 'bigint', nullable: false }),
|
|
46
|
+
__metadata("design:type", Number)
|
|
47
|
+
], Notification.prototype, "user_id", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, typeorm_1.Column)({ type: 'bigint', nullable: true }),
|
|
50
|
+
__metadata("design:type", Number)
|
|
51
|
+
], Notification.prototype, "role_id", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, typeorm_1.Column)({ type: 'bigint', nullable: true }),
|
|
54
|
+
__metadata("design:type", Number)
|
|
55
|
+
], Notification.prototype, "department_id", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, typeorm_1.Column)({ type: 'bigint', nullable: true }),
|
|
58
|
+
__metadata("design:type", Number)
|
|
59
|
+
], Notification.prototype, "section_id", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, typeorm_1.Column)({ type: 'jsonb', nullable: true }),
|
|
62
|
+
__metadata("design:type", Object)
|
|
63
|
+
], Notification.prototype, "content", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, typeorm_1.Column)({ type: 'boolean', default: false }),
|
|
66
|
+
__metadata("design:type", Boolean)
|
|
67
|
+
], Notification.prototype, "is_read", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, typeorm_1.Column)({ type: 'bigint', nullable: true }),
|
|
70
|
+
__metadata("design:type", Number)
|
|
71
|
+
], Notification.prototype, "request_id", void 0);
|
|
72
|
+
__decorate([
|
|
73
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: true }),
|
|
74
|
+
__metadata("design:type", String)
|
|
75
|
+
], Notification.prototype, "route_path", void 0);
|
|
76
|
+
exports.Notification = Notification = __decorate([
|
|
77
|
+
(0, typeorm_1.Entity)({ name: 'notification' }),
|
|
78
|
+
__metadata("design:paramtypes", [String, Number, Number, Number, Number, Object, Boolean, Number, String])
|
|
79
|
+
], Notification);
|
|
@@ -0,0 +1,34 @@
|
|
|
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);
|
|
@@ -14,5 +14,6 @@ export declare class UserRole extends BaseModel {
|
|
|
14
14
|
user_id: number;
|
|
15
15
|
department_id: number;
|
|
16
16
|
section_id: number;
|
|
17
|
-
|
|
17
|
+
is_active: boolean;
|
|
18
|
+
constructor(role_id: number, user_id: number, department_id: number, section_id: number, is_active?: boolean);
|
|
18
19
|
}
|
|
@@ -23,12 +23,13 @@ exports.UserRole = void 0;
|
|
|
23
23
|
const typeorm_1 = require("typeorm");
|
|
24
24
|
const BaseModel_1 = require("./BaseModel");
|
|
25
25
|
let UserRole = class UserRole extends BaseModel_1.BaseModel {
|
|
26
|
-
constructor(role_id, user_id, department_id, section_id) {
|
|
26
|
+
constructor(role_id, user_id, department_id, section_id, is_active = false) {
|
|
27
27
|
super();
|
|
28
28
|
this.role_id = role_id;
|
|
29
29
|
this.user_id = user_id;
|
|
30
30
|
this.department_id = department_id;
|
|
31
31
|
this.section_id = section_id;
|
|
32
|
+
this.is_active = is_active;
|
|
32
33
|
}
|
|
33
34
|
};
|
|
34
35
|
exports.UserRole = UserRole;
|
|
@@ -48,7 +49,11 @@ __decorate([
|
|
|
48
49
|
(0, typeorm_1.Column)({ type: 'bigint', nullable: true }),
|
|
49
50
|
__metadata("design:type", Number)
|
|
50
51
|
], UserRole.prototype, "section_id", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, typeorm_1.Column)({ type: 'boolean', default: false }),
|
|
54
|
+
__metadata("design:type", Boolean)
|
|
55
|
+
], UserRole.prototype, "is_active", void 0);
|
|
51
56
|
exports.UserRole = UserRole = __decorate([
|
|
52
57
|
(0, typeorm_1.Entity)({ name: 'user_role' }),
|
|
53
|
-
__metadata("design:paramtypes", [Number, Number, Number, Number])
|
|
58
|
+
__metadata("design:paramtypes", [Number, Number, Number, Number, Boolean])
|
|
54
59
|
], UserRole);
|
package/package.json
CHANGED
package/src/data-source.ts
CHANGED
|
@@ -54,6 +54,7 @@ import { Holidays } from './models/HolidaysModel';
|
|
|
54
54
|
import { UserRole } from './models/userRolesModel';
|
|
55
55
|
import { RoleRights } from './models/roleRightsModel';
|
|
56
56
|
import { PortalFeedback } from './models/PortalFeedbackModel';
|
|
57
|
+
import { Notification } from './models/NotificationModel';
|
|
57
58
|
|
|
58
59
|
|
|
59
60
|
export const AppDataSource = new DataSource({
|
|
@@ -113,6 +114,7 @@ export const AppDataSource = new DataSource({
|
|
|
113
114
|
Holidays,
|
|
114
115
|
UserRole,
|
|
115
116
|
RoleRights,
|
|
116
|
-
PortalFeedback
|
|
117
|
+
PortalFeedback,
|
|
118
|
+
Notification
|
|
117
119
|
],
|
|
118
120
|
});
|
package/src/index.ts
CHANGED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
|
|
2
|
+
import { Column, Entity } from "typeorm";
|
|
3
|
+
import { BaseModel } from './BaseModel';
|
|
4
|
+
|
|
5
|
+
export enum NotificationType {
|
|
6
|
+
REQUEST_RAISED = 'request raised',
|
|
7
|
+
REMINDER = 'reminder',
|
|
8
|
+
IMPORT = 'import',
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@Entity({ name: 'notification' })
|
|
12
|
+
export class Notification extends BaseModel {
|
|
13
|
+
|
|
14
|
+
@Column({
|
|
15
|
+
type: "enum",
|
|
16
|
+
enum: NotificationType,
|
|
17
|
+
nullable: false,
|
|
18
|
+
})
|
|
19
|
+
type: NotificationType;
|
|
20
|
+
|
|
21
|
+
@Column({ type: 'bigint', nullable: false })
|
|
22
|
+
user_id: number;
|
|
23
|
+
|
|
24
|
+
@Column({ type: 'bigint', nullable: true })
|
|
25
|
+
role_id: number;
|
|
26
|
+
|
|
27
|
+
@Column({ type: 'bigint', nullable: true })
|
|
28
|
+
department_id: number;
|
|
29
|
+
|
|
30
|
+
@Column({ type: 'bigint', nullable: true })
|
|
31
|
+
section_id: number;
|
|
32
|
+
|
|
33
|
+
@Column({ type: 'jsonb', nullable: true })
|
|
34
|
+
content: any;
|
|
35
|
+
|
|
36
|
+
@Column({ type: 'boolean', default: false })
|
|
37
|
+
is_read: boolean;
|
|
38
|
+
|
|
39
|
+
@Column({ type: 'bigint', nullable: true })
|
|
40
|
+
request_id: number;
|
|
41
|
+
|
|
42
|
+
@Column({ type: 'varchar', length: 500, nullable: true })
|
|
43
|
+
route_path: string;
|
|
44
|
+
|
|
45
|
+
constructor(
|
|
46
|
+
type: NotificationType,
|
|
47
|
+
user_id: number,
|
|
48
|
+
role_id: number,
|
|
49
|
+
department_id: number,
|
|
50
|
+
section_id: number,
|
|
51
|
+
content: any,
|
|
52
|
+
is_read: boolean,
|
|
53
|
+
request_id: number,
|
|
54
|
+
route_path: string
|
|
55
|
+
) {
|
|
56
|
+
super();
|
|
57
|
+
this.type = type;
|
|
58
|
+
this.user_id = user_id;
|
|
59
|
+
this.role_id = role_id;
|
|
60
|
+
this.department_id = department_id;
|
|
61
|
+
this.section_id = section_id;
|
|
62
|
+
this.content = content;
|
|
63
|
+
this.is_read = is_read;
|
|
64
|
+
this.request_id = request_id;
|
|
65
|
+
this.route_path = route_path;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
@@ -28,11 +28,15 @@ export class UserRole extends BaseModel {
|
|
|
28
28
|
@Column({ type: 'bigint', nullable: true })
|
|
29
29
|
section_id: number;
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
@Column({ type: 'boolean', default: false })
|
|
32
|
+
is_active: boolean;
|
|
33
|
+
|
|
34
|
+
constructor(role_id: number, user_id: number, department_id: number, section_id: number, is_active: boolean = false) {
|
|
32
35
|
super();
|
|
33
36
|
this.role_id = role_id
|
|
34
37
|
this.user_id = user_id
|
|
35
38
|
this.department_id = department_id
|
|
36
39
|
this.section_id = section_id
|
|
40
|
+
this.is_active = is_active
|
|
37
41
|
}
|
|
38
42
|
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { BaseModel } from './BaseModel';
|
|
2
|
-
export declare enum ApprovalStatus {
|
|
3
|
-
PENDING = "Pending",
|
|
4
|
-
APPROVED = "Approved",
|
|
5
|
-
REJECTED = "Rejected"
|
|
6
|
-
}
|
|
7
|
-
export declare class LeaveApprovalDetails extends BaseModel {
|
|
8
|
-
leave_request_id: number;
|
|
9
|
-
level: number;
|
|
10
|
-
approver_id: number;
|
|
11
|
-
approval_status: ApprovalStatus;
|
|
12
|
-
constructor(leave_request_id: number, approver_id: number, approval_status: ApprovalStatus, level: number);
|
|
13
|
-
}
|
|
@@ -1,51 +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.LeaveApprovalDetails = exports.ApprovalStatus = void 0;
|
|
13
|
-
const typeorm_1 = require("typeorm");
|
|
14
|
-
const BaseModel_1 = require("./BaseModel");
|
|
15
|
-
var ApprovalStatus;
|
|
16
|
-
(function (ApprovalStatus) {
|
|
17
|
-
ApprovalStatus["PENDING"] = "Pending";
|
|
18
|
-
ApprovalStatus["APPROVED"] = "Approved";
|
|
19
|
-
ApprovalStatus["REJECTED"] = "Rejected";
|
|
20
|
-
})(ApprovalStatus || (exports.ApprovalStatus = ApprovalStatus = {}));
|
|
21
|
-
//This model is used to store the store the leave apporval details of the user for the leave request
|
|
22
|
-
let LeaveApprovalDetails = class LeaveApprovalDetails extends BaseModel_1.BaseModel {
|
|
23
|
-
constructor(leave_request_id, approver_id, approval_status, level) {
|
|
24
|
-
super();
|
|
25
|
-
this.leave_request_id = leave_request_id;
|
|
26
|
-
this.approver_id = approver_id;
|
|
27
|
-
this.approval_status = approval_status;
|
|
28
|
-
this.level = level;
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
exports.LeaveApprovalDetails = LeaveApprovalDetails;
|
|
32
|
-
__decorate([
|
|
33
|
-
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
34
|
-
__metadata("design:type", Number)
|
|
35
|
-
], LeaveApprovalDetails.prototype, "leave_request_id", void 0);
|
|
36
|
-
__decorate([
|
|
37
|
-
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
38
|
-
__metadata("design:type", Number)
|
|
39
|
-
], LeaveApprovalDetails.prototype, "level", void 0);
|
|
40
|
-
__decorate([
|
|
41
|
-
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
42
|
-
__metadata("design:type", Number)
|
|
43
|
-
], LeaveApprovalDetails.prototype, "approver_id", void 0);
|
|
44
|
-
__decorate([
|
|
45
|
-
(0, typeorm_1.Column)({ type: 'enum', enum: ApprovalStatus, default: ApprovalStatus.PENDING, nullable: false }),
|
|
46
|
-
__metadata("design:type", String)
|
|
47
|
-
], LeaveApprovalDetails.prototype, "approval_status", void 0);
|
|
48
|
-
exports.LeaveApprovalDetails = LeaveApprovalDetails = __decorate([
|
|
49
|
-
(0, typeorm_1.Entity)({ name: 'leave_approval_details' }),
|
|
50
|
-
__metadata("design:paramtypes", [Number, Number, String, Number])
|
|
51
|
-
], LeaveApprovalDetails);
|
|
@@ -1,40 +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.LeaveApprovalMatrix = void 0;
|
|
13
|
-
const typeorm_1 = require("typeorm");
|
|
14
|
-
const BaseModel_1 = require("./BaseModel");
|
|
15
|
-
//This model is used to store the store the leave apporval matrix(HOD, Manager, HR, Director) based on leave type along with the levels
|
|
16
|
-
let LeaveApprovalMatrix = class LeaveApprovalMatrix extends BaseModel_1.BaseModel {
|
|
17
|
-
constructor(leave_type, level, approval_matrix) {
|
|
18
|
-
super();
|
|
19
|
-
this.leave_type = leave_type;
|
|
20
|
-
this.level = level;
|
|
21
|
-
this.approval_matrix = approval_matrix;
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
exports.LeaveApprovalMatrix = LeaveApprovalMatrix;
|
|
25
|
-
__decorate([
|
|
26
|
-
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
27
|
-
__metadata("design:type", Number)
|
|
28
|
-
], LeaveApprovalMatrix.prototype, "leave_type", void 0);
|
|
29
|
-
__decorate([
|
|
30
|
-
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
31
|
-
__metadata("design:type", Number)
|
|
32
|
-
], LeaveApprovalMatrix.prototype, "level", void 0);
|
|
33
|
-
__decorate([
|
|
34
|
-
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: false }),
|
|
35
|
-
__metadata("design:type", String)
|
|
36
|
-
], LeaveApprovalMatrix.prototype, "approval_matrix", void 0);
|
|
37
|
-
exports.LeaveApprovalMatrix = LeaveApprovalMatrix = __decorate([
|
|
38
|
-
(0, typeorm_1.Entity)({ name: 'leave_approval_matrix' }),
|
|
39
|
-
__metadata("design:paramtypes", [Number, Number, String])
|
|
40
|
-
], LeaveApprovalMatrix);
|