@platform-modules/foreign-ministry 1.0.77 → 1.0.79
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/data-source.js +10 -2
- package/dist/index.d.ts +4 -13
- package/dist/index.js +4 -13
- package/dist/models/FMServices.js +1 -1
- package/dist/models/HolidaysModel.d.ts +11 -0
- package/dist/models/HolidaysModel.js +59 -0
- package/dist/models/LeaveApprovalDetailsModel.d.ts +13 -0
- package/dist/models/LeaveApprovalDetailsModel.js +51 -0
- package/dist/models/LeaveApprovalMatrixModel.d.ts +7 -0
- package/dist/models/LeaveApprovalMatrixModel.js +40 -0
- package/dist/models/PortalFeedbackModel.d.ts +8 -0
- package/dist/models/{questionTagsModel.js → PortalFeedbackModel.js} +22 -12
- package/dist/models/role.d.ts +1 -7
- package/dist/models/role.js +2 -2
- package/dist/models/roleRightsModel.d.ts +16 -0
- package/dist/models/{FinancialChatsModel.js → roleRightsModel.js} +24 -19
- package/dist/models/user.d.ts +5 -1
- package/dist/models/user.js +22 -2
- package/dist/models/userRolesModel.d.ts +18 -0
- package/dist/models/{FinancialSettingsModel.js → userRolesModel.js} +31 -21
- package/package.json +1 -1
- package/src/data-source.ts +10 -2
- package/src/index.ts +4 -13
- package/src/models/FMServices.ts +1 -1
- package/src/models/HolidaysModel.ts +46 -0
- package/src/models/PortalFeedbackModel.ts +33 -0
- package/src/models/role.ts +1 -7
- package/src/models/roleRightsModel.ts +31 -0
- package/src/models/user.ts +21 -0
- package/src/models/userRolesModel.ts +38 -0
- package/FINANCIAL_MODELS_SUMMARY.md +0 -144
- package/FINANCIAL_SERVICES_MODELS.md +0 -236
- package/dist/models/AllowanceRequestsModel.d.ts +0 -9
- package/dist/models/AllowanceRequestsModel.js +0 -49
- package/dist/models/AllowanceTypesModel.d.ts +0 -8
- package/dist/models/AllowanceTypesModel.js +0 -43
- package/dist/models/BankAccountChangeRequestsModel.d.ts +0 -12
- package/dist/models/BankAccountChangeRequestsModel.js +0 -62
- package/dist/models/FinancialApprovalsModel.d.ts +0 -17
- package/dist/models/FinancialApprovalsModel.js +0 -63
- package/dist/models/FinancialAttachmentsModel.d.ts +0 -8
- package/dist/models/FinancialAttachmentsModel.js +0 -44
- package/dist/models/FinancialChatsModel.d.ts +0 -7
- package/dist/models/FinancialRequestsModel.d.ts +0 -29
- package/dist/models/FinancialRequestsModel.js +0 -103
- package/dist/models/FinancialSettingsModel.d.ts +0 -8
- package/dist/models/FinancialWorkFlowModel.d.ts +0 -16
- package/dist/models/FinancialWorkFlowModel.js +0 -61
- package/dist/models/PayslipRequestsModel.d.ts +0 -8
- package/dist/models/PayslipRequestsModel.js +0 -44
- package/dist/models/ReimbursementRequestsModel.d.ts +0 -14
- package/dist/models/ReimbursementRequestsModel.js +0 -73
- package/dist/models/RequestTypeMasterModel.d.ts +0 -12
- package/dist/models/RequestTypeMasterModel.js +0 -60
- package/dist/models/SalaryCertificateRequestsModel.d.ts +0 -12
- package/dist/models/SalaryCertificateRequestsModel.js +0 -62
- package/dist/models/questionTagsModel.d.ts +0 -6
- package/src/models/AllowanceRequestsModel.ts +0 -38
- package/src/models/AllowanceTypesModel.ts +0 -26
- package/src/models/BankAccountChangeRequestsModel.ts +0 -50
- package/src/models/FinancialApprovalsModel.ts +0 -47
- package/src/models/FinancialAttachmentsModel.ts +0 -30
- package/src/models/FinancialChatsModel.ts +0 -22
- package/src/models/FinancialRequestsModel.ts +0 -81
- package/src/models/FinancialSettingsModel.ts +0 -30
- package/src/models/FinancialWorkFlowModel.ts +0 -46
- package/src/models/PayslipRequestsModel.ts +0 -26
- package/src/models/ReimbursementRequestsModel.ts +0 -58
- package/src/models/RequestTypeMasterModel.ts +0 -38
- package/src/models/SalaryCertificateRequestsModel.ts +0 -40
package/dist/data-source.js
CHANGED
|
@@ -49,6 +49,10 @@ const MessageReadStatusModel_1 = require("./models/MessageReadStatusModel");
|
|
|
49
49
|
const ShifttimesModel_1 = require("./models/ShifttimesModel");
|
|
50
50
|
const AttendanceModel_1 = require("./models/AttendanceModel");
|
|
51
51
|
const UserShiftModel_1 = require("./models/UserShiftModel");
|
|
52
|
+
const HolidaysModel_1 = require("./models/HolidaysModel");
|
|
53
|
+
const userRolesModel_1 = require("./models/userRolesModel");
|
|
54
|
+
const roleRightsModel_1 = require("./models/roleRightsModel");
|
|
55
|
+
const PortalFeedbackModel_1 = require("./models/PortalFeedbackModel");
|
|
52
56
|
exports.AppDataSource = new typeorm_1.DataSource({
|
|
53
57
|
type: 'postgres',
|
|
54
58
|
host: process.env.DB_HOST || 'localhost',
|
|
@@ -56,7 +60,7 @@ exports.AppDataSource = new typeorm_1.DataSource({
|
|
|
56
60
|
username: process.env.DB_USER || 'postgres',
|
|
57
61
|
password: process.env.DB_PASS || 'postgres',
|
|
58
62
|
database: process.env.DB_NAME || 'common_models',
|
|
59
|
-
synchronize:
|
|
63
|
+
synchronize: true, // auto-create tables (disable in prod)
|
|
60
64
|
logging: false,
|
|
61
65
|
entities: [
|
|
62
66
|
user_1.User,
|
|
@@ -102,6 +106,10 @@ exports.AppDataSource = new typeorm_1.DataSource({
|
|
|
102
106
|
MessageReadStatusModel_1.MessageReadStatus,
|
|
103
107
|
ShifttimesModel_1.ShiftDetails,
|
|
104
108
|
AttendanceModel_1.AttendanceDetails,
|
|
105
|
-
UserShiftModel_1.UserShift
|
|
109
|
+
UserShiftModel_1.UserShift,
|
|
110
|
+
HolidaysModel_1.Holidays,
|
|
111
|
+
userRolesModel_1.UserRole,
|
|
112
|
+
roleRightsModel_1.RoleRights,
|
|
113
|
+
PortalFeedbackModel_1.PortalFeedback
|
|
106
114
|
],
|
|
107
115
|
});
|
package/dist/index.d.ts
CHANGED
|
@@ -42,16 +42,7 @@ export * from './models/ShifttimesModel';
|
|
|
42
42
|
export * from './models/AttendanceModel';
|
|
43
43
|
export * from './models/contactInfoModel';
|
|
44
44
|
export * from './models/UserShiftModel';
|
|
45
|
-
export * from './models/
|
|
46
|
-
export * from './models/
|
|
47
|
-
export * from './models/
|
|
48
|
-
export * from './models/
|
|
49
|
-
export * from './models/ReimbursementRequestsModel';
|
|
50
|
-
export * from './models/BankAccountChangeRequestsModel';
|
|
51
|
-
export * from './models/FinancialChatsModel';
|
|
52
|
-
export * from './models/FinancialApprovalsModel';
|
|
53
|
-
export * from './models/FinancialWorkFlowModel';
|
|
54
|
-
export * from './models/FinancialAttachmentsModel';
|
|
55
|
-
export * from './models/RequestTypeMasterModel';
|
|
56
|
-
export * from './models/FinancialSettingsModel';
|
|
57
|
-
export * from './models/AllowanceTypesModel';
|
|
45
|
+
export * from './models/HolidaysModel';
|
|
46
|
+
export * from './models/userRolesModel';
|
|
47
|
+
export * from './models/roleRightsModel';
|
|
48
|
+
export * from './models/PortalFeedbackModel';
|
package/dist/index.js
CHANGED
|
@@ -58,16 +58,7 @@ __exportStar(require("./models/ShifttimesModel"), exports);
|
|
|
58
58
|
__exportStar(require("./models/AttendanceModel"), exports);
|
|
59
59
|
__exportStar(require("./models/contactInfoModel"), exports);
|
|
60
60
|
__exportStar(require("./models/UserShiftModel"), exports);
|
|
61
|
-
__exportStar(require("./models/
|
|
62
|
-
__exportStar(require("./models/
|
|
63
|
-
__exportStar(require("./models/
|
|
64
|
-
__exportStar(require("./models/
|
|
65
|
-
__exportStar(require("./models/ReimbursementRequestsModel"), exports);
|
|
66
|
-
__exportStar(require("./models/BankAccountChangeRequestsModel"), exports);
|
|
67
|
-
__exportStar(require("./models/FinancialChatsModel"), exports);
|
|
68
|
-
__exportStar(require("./models/FinancialApprovalsModel"), exports);
|
|
69
|
-
__exportStar(require("./models/FinancialWorkFlowModel"), exports);
|
|
70
|
-
__exportStar(require("./models/FinancialAttachmentsModel"), exports);
|
|
71
|
-
__exportStar(require("./models/RequestTypeMasterModel"), exports);
|
|
72
|
-
__exportStar(require("./models/FinancialSettingsModel"), exports);
|
|
73
|
-
__exportStar(require("./models/AllowanceTypesModel"), exports);
|
|
61
|
+
__exportStar(require("./models/HolidaysModel"), exports);
|
|
62
|
+
__exportStar(require("./models/userRolesModel"), exports);
|
|
63
|
+
__exportStar(require("./models/roleRightsModel"), exports);
|
|
64
|
+
__exportStar(require("./models/PortalFeedbackModel"), exports);
|
|
@@ -35,7 +35,7 @@ __decorate([
|
|
|
35
35
|
__metadata("design:type", String)
|
|
36
36
|
], FMServices.prototype, "description", void 0);
|
|
37
37
|
__decorate([
|
|
38
|
-
(0, typeorm_1.Column)({ nullable:
|
|
38
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
39
39
|
__metadata("design:type", String)
|
|
40
40
|
], FMServices.prototype, "logo_url", void 0);
|
|
41
41
|
exports.FMServices = FMServices = __decorate([
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
export declare class Holidays extends BaseModel {
|
|
3
|
+
title: string;
|
|
4
|
+
holiday_date: Date;
|
|
5
|
+
description?: string;
|
|
6
|
+
region?: string;
|
|
7
|
+
is_optional: boolean;
|
|
8
|
+
holiday_type: string;
|
|
9
|
+
year?: number;
|
|
10
|
+
constructor(title: string, holiday_date: Date, description?: string, region?: string, is_optional?: boolean, holiday_type?: string, year?: number);
|
|
11
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
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.Holidays = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
let Holidays = class Holidays extends BaseModel_1.BaseModel {
|
|
16
|
+
constructor(title, holiday_date, description, region, is_optional = false, holiday_type = 'Public', year) {
|
|
17
|
+
super();
|
|
18
|
+
this.title = title;
|
|
19
|
+
this.holiday_date = holiday_date;
|
|
20
|
+
this.description = description;
|
|
21
|
+
this.region = region;
|
|
22
|
+
this.is_optional = is_optional;
|
|
23
|
+
this.holiday_type = holiday_type;
|
|
24
|
+
this.year = year;
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
exports.Holidays = Holidays;
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 200 }),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], Holidays.prototype, "title", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, typeorm_1.Column)({ type: 'date', name: 'holiday_date' }),
|
|
34
|
+
__metadata("design:type", Date)
|
|
35
|
+
], Holidays.prototype, "holiday_date", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
38
|
+
__metadata("design:type", String)
|
|
39
|
+
], Holidays.prototype, "description", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 200, nullable: true }),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], Holidays.prototype, "region", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, typeorm_1.Column)({ type: 'boolean', name: 'is_optional', default: false }),
|
|
46
|
+
__metadata("design:type", Boolean)
|
|
47
|
+
], Holidays.prototype, "is_optional", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 30, name: 'holiday_type', default: 'Public' }),
|
|
50
|
+
__metadata("design:type", String)
|
|
51
|
+
], Holidays.prototype, "holiday_type", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
54
|
+
__metadata("design:type", Number)
|
|
55
|
+
], Holidays.prototype, "year", void 0);
|
|
56
|
+
exports.Holidays = Holidays = __decorate([
|
|
57
|
+
(0, typeorm_1.Entity)({ name: 'holidays' }),
|
|
58
|
+
__metadata("design:paramtypes", [String, Date, String, String, Boolean, String, Number])
|
|
59
|
+
], Holidays);
|
|
@@ -0,0 +1,13 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
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);
|
|
@@ -0,0 +1,40 @@
|
|
|
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);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
import { Rating } from './feedbackModel';
|
|
3
|
+
export declare class PortalFeedback extends BaseModel {
|
|
4
|
+
comment: string;
|
|
5
|
+
rating: Rating;
|
|
6
|
+
user_Id: number;
|
|
7
|
+
constructor(comment: string, rating: Rating, user_Id: number);
|
|
8
|
+
}
|
|
@@ -9,26 +9,36 @@ 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.
|
|
12
|
+
exports.PortalFeedback = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const BaseModel_1 = require("./BaseModel");
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
const feedbackModel_1 = require("./feedbackModel");
|
|
16
|
+
let PortalFeedback = class PortalFeedback extends BaseModel_1.BaseModel {
|
|
17
|
+
constructor(comment, rating, user_Id) {
|
|
17
18
|
super();
|
|
18
|
-
this.
|
|
19
|
-
this.
|
|
19
|
+
this.comment = comment,
|
|
20
|
+
this.rating = rating,
|
|
21
|
+
this.user_Id = user_Id;
|
|
20
22
|
}
|
|
21
23
|
};
|
|
22
|
-
exports.
|
|
24
|
+
exports.PortalFeedback = PortalFeedback;
|
|
23
25
|
__decorate([
|
|
24
26
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
25
27
|
__metadata("design:type", String)
|
|
26
|
-
],
|
|
28
|
+
], PortalFeedback.prototype, "comment", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, typeorm_1.Column)({
|
|
31
|
+
type: "enum",
|
|
32
|
+
enum: feedbackModel_1.Rating,
|
|
33
|
+
nullable: true,
|
|
34
|
+
}),
|
|
35
|
+
__metadata("design:type", Number)
|
|
36
|
+
], PortalFeedback.prototype, "rating", void 0);
|
|
27
37
|
__decorate([
|
|
28
38
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
29
39
|
__metadata("design:type", Number)
|
|
30
|
-
],
|
|
31
|
-
exports.
|
|
32
|
-
(0, typeorm_1.Entity)({ name: '
|
|
33
|
-
__metadata("design:paramtypes", [String, Number])
|
|
34
|
-
],
|
|
40
|
+
], PortalFeedback.prototype, "user_Id", void 0);
|
|
41
|
+
exports.PortalFeedback = PortalFeedback = __decorate([
|
|
42
|
+
(0, typeorm_1.Entity)({ name: 'portal_feedback' }),
|
|
43
|
+
__metadata("design:paramtypes", [String, Number, Number])
|
|
44
|
+
], PortalFeedback);
|
package/dist/models/role.d.ts
CHANGED
|
@@ -9,14 +9,8 @@ Role
|
|
|
9
9
|
Userrole Information will store
|
|
10
10
|
*/
|
|
11
11
|
import { BaseModel } from './BaseModel';
|
|
12
|
-
export interface Irole {
|
|
13
|
-
name: string;
|
|
14
|
-
id?: number;
|
|
15
|
-
is_deleted?: boolean;
|
|
16
|
-
created_by?: number;
|
|
17
|
-
}
|
|
18
12
|
export declare class Role extends BaseModel {
|
|
19
13
|
name: string;
|
|
20
14
|
is_deleted?: boolean;
|
|
21
|
-
constructor(name: string, is_deleted: boolean
|
|
15
|
+
constructor(name: string, is_deleted: boolean);
|
|
22
16
|
}
|
package/dist/models/role.js
CHANGED
|
@@ -23,7 +23,7 @@ exports.Role = void 0;
|
|
|
23
23
|
const typeorm_1 = require("typeorm");
|
|
24
24
|
const BaseModel_1 = require("./BaseModel");
|
|
25
25
|
let Role = class Role extends BaseModel_1.BaseModel {
|
|
26
|
-
constructor(name, is_deleted
|
|
26
|
+
constructor(name, is_deleted) {
|
|
27
27
|
super();
|
|
28
28
|
this.name = name;
|
|
29
29
|
this.is_deleted = is_deleted;
|
|
@@ -40,5 +40,5 @@ __decorate([
|
|
|
40
40
|
], Role.prototype, "is_deleted", void 0);
|
|
41
41
|
exports.Role = Role = __decorate([
|
|
42
42
|
(0, typeorm_1.Entity)({ name: 'role' }),
|
|
43
|
-
__metadata("design:paramtypes", [String, Boolean
|
|
43
|
+
__metadata("design:paramtypes", [String, Boolean])
|
|
44
44
|
], Role);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/** *
|
|
2
|
+
@author
|
|
3
|
+
Amnet Digital
|
|
4
|
+
@date
|
|
5
|
+
2024-05-20
|
|
6
|
+
@Model
|
|
7
|
+
Role
|
|
8
|
+
@usage
|
|
9
|
+
Userrole Information will store
|
|
10
|
+
*/
|
|
11
|
+
import { BaseModel } from './BaseModel';
|
|
12
|
+
export declare class RoleRights extends BaseModel {
|
|
13
|
+
user_role_id: number;
|
|
14
|
+
service_id: number;
|
|
15
|
+
constructor(user_role_id: number, service_id: number);
|
|
16
|
+
}
|
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/** *
|
|
3
|
+
@author
|
|
4
|
+
Amnet Digital
|
|
5
|
+
@date
|
|
6
|
+
2024-05-20
|
|
7
|
+
@Model
|
|
8
|
+
Role
|
|
9
|
+
@usage
|
|
10
|
+
Userrole Information will store
|
|
11
|
+
*/
|
|
2
12
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
13
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
14
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -9,31 +19,26 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
19
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
20
|
};
|
|
11
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
22
|
+
exports.RoleRights = void 0;
|
|
13
23
|
const typeorm_1 = require("typeorm");
|
|
14
24
|
const BaseModel_1 = require("./BaseModel");
|
|
15
|
-
let
|
|
16
|
-
constructor(
|
|
25
|
+
let RoleRights = class RoleRights extends BaseModel_1.BaseModel {
|
|
26
|
+
constructor(user_role_id, service_id) {
|
|
17
27
|
super();
|
|
18
|
-
this.
|
|
19
|
-
this.
|
|
20
|
-
this.sender_user_id = sender_user_id;
|
|
28
|
+
this.user_role_id = user_role_id;
|
|
29
|
+
this.service_id = service_id;
|
|
21
30
|
}
|
|
22
31
|
};
|
|
23
|
-
exports.
|
|
32
|
+
exports.RoleRights = RoleRights;
|
|
24
33
|
__decorate([
|
|
25
|
-
(0, typeorm_1.Column)({ type: '
|
|
34
|
+
(0, typeorm_1.Column)({ type: 'bigint', nullable: true }),
|
|
26
35
|
__metadata("design:type", Number)
|
|
27
|
-
],
|
|
36
|
+
], RoleRights.prototype, "user_role_id", void 0);
|
|
28
37
|
__decorate([
|
|
29
|
-
(0, typeorm_1.Column)({ type: '
|
|
30
|
-
__metadata("design:type", String)
|
|
31
|
-
], FinancialChats.prototype, "content", void 0);
|
|
32
|
-
__decorate([
|
|
33
|
-
(0, typeorm_1.Column)({ type: 'int' }),
|
|
38
|
+
(0, typeorm_1.Column)({ type: 'bigint', nullable: false }),
|
|
34
39
|
__metadata("design:type", Number)
|
|
35
|
-
],
|
|
36
|
-
exports.
|
|
37
|
-
(0, typeorm_1.Entity)({ name: '
|
|
38
|
-
__metadata("design:paramtypes", [Number,
|
|
39
|
-
],
|
|
40
|
+
], RoleRights.prototype, "service_id", void 0);
|
|
41
|
+
exports.RoleRights = RoleRights = __decorate([
|
|
42
|
+
(0, typeorm_1.Entity)({ name: 'role_rights' }),
|
|
43
|
+
__metadata("design:paramtypes", [Number, Number])
|
|
44
|
+
], RoleRights);
|
package/dist/models/user.d.ts
CHANGED
|
@@ -34,5 +34,9 @@ export declare class User extends BaseModel {
|
|
|
34
34
|
diplomatic_name?: string;
|
|
35
35
|
civil_employee_id?: number;
|
|
36
36
|
qualification?: string;
|
|
37
|
-
|
|
37
|
+
father_name?: string;
|
|
38
|
+
spouse_name?: string;
|
|
39
|
+
children1_name?: string;
|
|
40
|
+
children2_name?: string;
|
|
41
|
+
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);
|
|
38
42
|
}
|
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) {
|
|
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) {
|
|
17
17
|
super();
|
|
18
18
|
this.employee_id = employee_id;
|
|
19
19
|
this.employee_name = employee_name;
|
|
@@ -49,6 +49,10 @@ let User = class User extends BaseModel_1.BaseModel {
|
|
|
49
49
|
this.diplomatic_name = diplomatic_name;
|
|
50
50
|
this.civil_employee_id = civil_employee_id;
|
|
51
51
|
this.qualification = qualification;
|
|
52
|
+
this.father_name = father_name;
|
|
53
|
+
this.spouse_name = spouse_name;
|
|
54
|
+
this.children1_name = children1_name;
|
|
55
|
+
this.children2_name = children2_name;
|
|
52
56
|
}
|
|
53
57
|
};
|
|
54
58
|
exports.User = User;
|
|
@@ -188,7 +192,23 @@ __decorate([
|
|
|
188
192
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
189
193
|
__metadata("design:type", String)
|
|
190
194
|
], User.prototype, "qualification", void 0);
|
|
195
|
+
__decorate([
|
|
196
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
197
|
+
__metadata("design:type", String)
|
|
198
|
+
], User.prototype, "father_name", void 0);
|
|
199
|
+
__decorate([
|
|
200
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
201
|
+
__metadata("design:type", String)
|
|
202
|
+
], User.prototype, "spouse_name", void 0);
|
|
203
|
+
__decorate([
|
|
204
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
205
|
+
__metadata("design:type", String)
|
|
206
|
+
], User.prototype, "children1_name", void 0);
|
|
207
|
+
__decorate([
|
|
208
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
209
|
+
__metadata("design:type", String)
|
|
210
|
+
], User.prototype, "children2_name", void 0);
|
|
191
211
|
exports.User = User = __decorate([
|
|
192
212
|
(0, typeorm_1.Entity)({ name: 'users' }),
|
|
193
|
-
__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])
|
|
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])
|
|
194
214
|
], User);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/** *
|
|
2
|
+
@author
|
|
3
|
+
Amnet Digital
|
|
4
|
+
@date
|
|
5
|
+
2024-05-20
|
|
6
|
+
@Model
|
|
7
|
+
Role
|
|
8
|
+
@usage
|
|
9
|
+
Userrole Information will store
|
|
10
|
+
*/
|
|
11
|
+
import { BaseModel } from './BaseModel';
|
|
12
|
+
export declare class UserRole extends BaseModel {
|
|
13
|
+
role_id: number;
|
|
14
|
+
user_id: number;
|
|
15
|
+
department_id: number;
|
|
16
|
+
section_id: number;
|
|
17
|
+
constructor(role_id: number, user_id: number, department_id: number, section_id: number);
|
|
18
|
+
}
|
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/** *
|
|
3
|
+
@author
|
|
4
|
+
Amnet Digital
|
|
5
|
+
@date
|
|
6
|
+
2024-05-20
|
|
7
|
+
@Model
|
|
8
|
+
Role
|
|
9
|
+
@usage
|
|
10
|
+
Userrole Information will store
|
|
11
|
+
*/
|
|
2
12
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
13
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
14
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -9,36 +19,36 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
19
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
20
|
};
|
|
11
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
22
|
+
exports.UserRole = void 0;
|
|
13
23
|
const typeorm_1 = require("typeorm");
|
|
14
24
|
const BaseModel_1 = require("./BaseModel");
|
|
15
|
-
let
|
|
16
|
-
constructor(
|
|
25
|
+
let UserRole = class UserRole extends BaseModel_1.BaseModel {
|
|
26
|
+
constructor(role_id, user_id, department_id, section_id) {
|
|
17
27
|
super();
|
|
18
|
-
this.
|
|
19
|
-
this.
|
|
20
|
-
this.
|
|
21
|
-
this.
|
|
28
|
+
this.role_id = role_id;
|
|
29
|
+
this.user_id = user_id;
|
|
30
|
+
this.department_id = department_id;
|
|
31
|
+
this.section_id = section_id;
|
|
22
32
|
}
|
|
23
33
|
};
|
|
24
|
-
exports.
|
|
34
|
+
exports.UserRole = UserRole;
|
|
25
35
|
__decorate([
|
|
26
|
-
(0, typeorm_1.Column)({ type: '
|
|
36
|
+
(0, typeorm_1.Column)({ type: 'bigint', nullable: false }),
|
|
27
37
|
__metadata("design:type", Number)
|
|
28
|
-
],
|
|
38
|
+
], UserRole.prototype, "role_id", void 0);
|
|
29
39
|
__decorate([
|
|
30
|
-
(0, typeorm_1.Column)({ type: '
|
|
40
|
+
(0, typeorm_1.Column)({ type: 'bigint', nullable: false }),
|
|
31
41
|
__metadata("design:type", Number)
|
|
32
|
-
],
|
|
42
|
+
], UserRole.prototype, "user_id", void 0);
|
|
33
43
|
__decorate([
|
|
34
|
-
(0, typeorm_1.Column)({ type: '
|
|
44
|
+
(0, typeorm_1.Column)({ type: 'bigint', nullable: true }),
|
|
35
45
|
__metadata("design:type", Number)
|
|
36
|
-
],
|
|
46
|
+
], UserRole.prototype, "department_id", void 0);
|
|
37
47
|
__decorate([
|
|
38
|
-
(0, typeorm_1.Column)({ type: '
|
|
39
|
-
__metadata("design:type",
|
|
40
|
-
],
|
|
41
|
-
exports.
|
|
42
|
-
(0, typeorm_1.Entity)({ name: '
|
|
43
|
-
__metadata("design:paramtypes", [Number, Number, Number])
|
|
44
|
-
],
|
|
48
|
+
(0, typeorm_1.Column)({ type: 'bigint', nullable: true }),
|
|
49
|
+
__metadata("design:type", Number)
|
|
50
|
+
], UserRole.prototype, "section_id", void 0);
|
|
51
|
+
exports.UserRole = UserRole = __decorate([
|
|
52
|
+
(0, typeorm_1.Entity)({ name: 'user_role' }),
|
|
53
|
+
__metadata("design:paramtypes", [Number, Number, Number, Number])
|
|
54
|
+
], UserRole);
|
package/package.json
CHANGED
package/src/data-source.ts
CHANGED
|
@@ -50,6 +50,10 @@ import { MessageReadStatus } from './models/MessageReadStatusModel';
|
|
|
50
50
|
import { ShiftDetails } from './models/ShifttimesModel';
|
|
51
51
|
import { AttendanceDetails } from './models/AttendanceModel';
|
|
52
52
|
import { UserShift } from './models/UserShiftModel';
|
|
53
|
+
import { Holidays } from './models/HolidaysModel';
|
|
54
|
+
import { UserRole } from './models/userRolesModel';
|
|
55
|
+
import { RoleRights } from './models/roleRightsModel';
|
|
56
|
+
import { PortalFeedback } from './models/PortalFeedbackModel';
|
|
53
57
|
|
|
54
58
|
|
|
55
59
|
export const AppDataSource = new DataSource({
|
|
@@ -59,7 +63,7 @@ export const AppDataSource = new DataSource({
|
|
|
59
63
|
username: process.env.DB_USER || 'postgres',
|
|
60
64
|
password: process.env.DB_PASS || 'postgres',
|
|
61
65
|
database: process.env.DB_NAME || 'common_models',
|
|
62
|
-
synchronize:
|
|
66
|
+
synchronize: true, // auto-create tables (disable in prod)
|
|
63
67
|
logging: false,
|
|
64
68
|
entities: [
|
|
65
69
|
User,
|
|
@@ -105,6 +109,10 @@ export const AppDataSource = new DataSource({
|
|
|
105
109
|
MessageReadStatus,
|
|
106
110
|
ShiftDetails,
|
|
107
111
|
AttendanceDetails,
|
|
108
|
-
UserShift
|
|
112
|
+
UserShift,
|
|
113
|
+
Holidays,
|
|
114
|
+
UserRole,
|
|
115
|
+
RoleRights,
|
|
116
|
+
PortalFeedback
|
|
109
117
|
],
|
|
110
118
|
});
|