@platform-modules/foreign-ministry 1.0.28 → 1.0.30
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 +42 -5
- package/dist/index.d.ts +15 -4
- package/dist/index.js +15 -4
- package/dist/models/ConversationModel.d.ts +16 -0
- package/dist/models/ConversationModel.js +64 -0
- package/dist/models/ConversationParticipantModel.d.ts +14 -0
- package/dist/models/ConversationParticipantModel.js +68 -0
- package/dist/models/DepartmentsModel.d.ts +7 -0
- package/dist/models/{FMServices.js → DepartmentsModel.js} +15 -20
- package/dist/models/DesignationModel.d.ts +6 -0
- package/dist/models/DesignationModel.js +34 -0
- package/dist/models/DivisionModel.d.ts +6 -0
- package/dist/models/DivisionModel.js +34 -0
- package/dist/models/LeaveApprovalsModel.d.ts +15 -0
- package/dist/models/{LeaveApprovalDetailsModel.js → LeaveApprovalsModel.js} +23 -7
- package/dist/models/LeaveAttachmentsModel.d.ts +7 -0
- package/dist/models/LeaveAttachmentsModel.js +40 -0
- package/dist/models/LeaveChatModel.d.ts +7 -0
- package/dist/models/LeaveChatModel.js +40 -0
- package/dist/models/LeaveSettingsModel.d.ts +7 -0
- package/dist/models/{LeaveApprovalMatrixModel.js → LeaveSettingsModel.js} +14 -14
- package/dist/models/LeaveWorkFlowModel.d.ts +13 -0
- package/dist/models/LeaveWorkFlowModel.js +51 -0
- package/dist/models/MessageModel.d.ts +27 -0
- package/dist/models/MessageModel.js +108 -0
- package/dist/models/SectionModel.d.ts +8 -0
- package/dist/models/{FMSubservices.js → SectionModel.js} +20 -25
- package/dist/models/faqsModel.d.ts +11 -0
- package/dist/models/faqsModel.js +57 -0
- package/dist/models/questionTagsModel.d.ts +6 -0
- package/dist/models/questionTagsModel.js +34 -0
- package/dist/models/serviceBookmarksModel.d.ts +6 -0
- package/dist/models/serviceBookmarksModel.js +34 -0
- package/dist/models/user.d.ts +29 -16
- package/dist/models/user.js +99 -39
- package/package.json +1 -1
- package/src/data-source.ts +44 -5
- package/src/index.ts +15 -4
- package/src/models/ConversationModel.ts +48 -0
- package/src/models/ConversationParticipantModel.ts +51 -0
- package/src/models/DepartmentsModel.ts +26 -0
- package/src/models/DesignationModel.ts +19 -0
- package/src/models/DivisionModel.ts +19 -0
- package/src/models/LeaveApprovalsModel.ts +41 -0
- package/src/models/LeaveAttachmentsModel.ts +21 -0
- package/src/models/LeaveChatModel.ts +21 -0
- package/src/models/{LeaveApprovalMatrixModel.ts → LeaveSettingsModel.ts} +6 -6
- package/src/models/LeaveWorkFlowModel.ts +32 -0
- package/src/models/MessageModel.ts +93 -0
- package/src/models/SectionModel.ts +31 -0
- package/src/models/faqsModel.ts +43 -0
- package/src/models/questionTagsModel.ts +22 -0
- package/src/models/serviceBookmarksModel.ts +21 -0
- package/src/models/user.ts +111 -60
- package/dist/models/FMServices.d.ts +0 -8
- package/dist/models/FMSubservices.d.ts +0 -9
- package/dist/models/LeaveApprovalDetailsModel.d.ts +0 -8
- package/dist/models/LeaveApprovalMatrixModel.d.ts +0 -7
- package/src/models/FMServices.ts +0 -32
- package/src/models/FMSubservices.ts +0 -37
- package/src/models/LeaveApprovalDetailsModel.ts +0 -25
package/.env
CHANGED
package/dist/data-source.js
CHANGED
|
@@ -15,10 +15,21 @@ const HajjLeaveDatesModel_1 = require("./models/HajjLeaveDatesModel");
|
|
|
15
15
|
const StudyLeaveDegreesModel_1 = require("./models/StudyLeaveDegreesModel");
|
|
16
16
|
const UnpaidLeaveCatgoriesModel_1 = require("./models/UnpaidLeaveCatgoriesModel");
|
|
17
17
|
const MounringLeaveRelationModel_1 = require("./models/MounringLeaveRelationModel");
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
const
|
|
18
|
+
const LeaveSettingsModel_1 = require("./models/LeaveSettingsModel");
|
|
19
|
+
const LeaveApprovalsModel_1 = require("./models/LeaveApprovalsModel");
|
|
20
|
+
const LeaveAttachmentsModel_1 = require("./models/LeaveAttachmentsModel");
|
|
21
|
+
const LeaveChatModel_1 = require("./models/LeaveChatModel");
|
|
22
|
+
const LeaveWorkFlowModel_1 = require("./models/LeaveWorkFlowModel");
|
|
23
|
+
const SectionModel_1 = require("./models/SectionModel");
|
|
24
|
+
const DesignationModel_1 = require("./models/DesignationModel");
|
|
25
|
+
const DepartmentsModel_1 = require("./models/DepartmentsModel");
|
|
26
|
+
const DivisionModel_1 = require("./models/DivisionModel");
|
|
27
|
+
const faqsModel_1 = require("./models/faqsModel");
|
|
28
|
+
const questionTagsModel_1 = require("./models/questionTagsModel");
|
|
29
|
+
const ConversationModel_1 = require("./models/ConversationModel");
|
|
30
|
+
const ConversationParticipantModel_1 = require("./models/ConversationParticipantModel");
|
|
31
|
+
const MessageModel_1 = require("./models/MessageModel");
|
|
32
|
+
const serviceBookmarksModel_1 = require("./models/serviceBookmarksModel");
|
|
22
33
|
exports.AppDataSource = new typeorm_1.DataSource({
|
|
23
34
|
type: 'postgres',
|
|
24
35
|
host: process.env.DB_HOST || 'localhost',
|
|
@@ -28,5 +39,31 @@ exports.AppDataSource = new typeorm_1.DataSource({
|
|
|
28
39
|
database: process.env.DB_NAME || 'common_models',
|
|
29
40
|
synchronize: true, // auto-create tables (disable in prod)
|
|
30
41
|
logging: false,
|
|
31
|
-
entities: [
|
|
42
|
+
entities: [
|
|
43
|
+
user_1.User,
|
|
44
|
+
user_sessions_1.userSessions,
|
|
45
|
+
role_1.Role,
|
|
46
|
+
LeaveRequestModel_1.LeaveRequests,
|
|
47
|
+
LeaveTypesModel_1.LeaveTypes,
|
|
48
|
+
FinancialGradeModel_1.FinancialGrade,
|
|
49
|
+
HajjLeaveDatesModel_1.HajjLeaveDates,
|
|
50
|
+
StudyLeaveDegreesModel_1.StudyLeaveDegrees,
|
|
51
|
+
UnpaidLeaveCatgoriesModel_1.UnpaidLeaveCategories,
|
|
52
|
+
MounringLeaveRelationModel_1.MounringLeaveRelations,
|
|
53
|
+
LeaveSettingsModel_1.LeaveSettings,
|
|
54
|
+
LeaveApprovalsModel_1.LeaveApprovalDetails,
|
|
55
|
+
LeaveAttachmentsModel_1.LeaveAttachments,
|
|
56
|
+
LeaveChatModel_1.LeaveChat,
|
|
57
|
+
LeaveWorkFlowModel_1.LeaveWorkFlow,
|
|
58
|
+
SectionModel_1.Sections,
|
|
59
|
+
DesignationModel_1.Designation,
|
|
60
|
+
DepartmentsModel_1.Departments,
|
|
61
|
+
DivisionModel_1.Division,
|
|
62
|
+
faqsModel_1.Faqs,
|
|
63
|
+
questionTagsModel_1.QuestionTags,
|
|
64
|
+
ConversationModel_1.Conversation,
|
|
65
|
+
ConversationParticipantModel_1.ConversationParticipant,
|
|
66
|
+
MessageModel_1.Message,
|
|
67
|
+
serviceBookmarksModel_1.ServiceBookmarks
|
|
68
|
+
],
|
|
32
69
|
});
|
package/dist/index.d.ts
CHANGED
|
@@ -8,7 +8,18 @@ export * from './models/HajjLeaveDatesModel';
|
|
|
8
8
|
export * from './models/StudyLeaveDegreesModel';
|
|
9
9
|
export * from './models/UnpaidLeaveCatgoriesModel';
|
|
10
10
|
export * from './models/MounringLeaveRelationModel';
|
|
11
|
-
export * from './models/
|
|
12
|
-
export * from './models/
|
|
13
|
-
export * from './models/
|
|
14
|
-
export * from './models/
|
|
11
|
+
export * from './models/LeaveSettingsModel';
|
|
12
|
+
export * from './models/LeaveApprovalsModel';
|
|
13
|
+
export * from './models/LeaveAttachmentsModel';
|
|
14
|
+
export * from './models/LeaveChatModel';
|
|
15
|
+
export * from './models/LeaveWorkFlowModel';
|
|
16
|
+
export * from './models/SectionModel';
|
|
17
|
+
export * from './models/DesignationModel';
|
|
18
|
+
export * from './models/DepartmentsModel';
|
|
19
|
+
export * from './models/DivisionModel';
|
|
20
|
+
export * from './models/faqsModel';
|
|
21
|
+
export * from './models/questionTagsModel';
|
|
22
|
+
export * from './models/ConversationModel';
|
|
23
|
+
export * from './models/ConversationParticipantModel';
|
|
24
|
+
export * from './models/MessageModel';
|
|
25
|
+
export * from './models/serviceBookmarksModel';
|
package/dist/index.js
CHANGED
|
@@ -24,7 +24,18 @@ __exportStar(require("./models/HajjLeaveDatesModel"), exports);
|
|
|
24
24
|
__exportStar(require("./models/StudyLeaveDegreesModel"), exports);
|
|
25
25
|
__exportStar(require("./models/UnpaidLeaveCatgoriesModel"), exports);
|
|
26
26
|
__exportStar(require("./models/MounringLeaveRelationModel"), exports);
|
|
27
|
-
__exportStar(require("./models/
|
|
28
|
-
__exportStar(require("./models/
|
|
29
|
-
__exportStar(require("./models/
|
|
30
|
-
__exportStar(require("./models/
|
|
27
|
+
__exportStar(require("./models/LeaveSettingsModel"), exports);
|
|
28
|
+
__exportStar(require("./models/LeaveApprovalsModel"), exports);
|
|
29
|
+
__exportStar(require("./models/LeaveAttachmentsModel"), exports);
|
|
30
|
+
__exportStar(require("./models/LeaveChatModel"), exports);
|
|
31
|
+
__exportStar(require("./models/LeaveWorkFlowModel"), exports);
|
|
32
|
+
__exportStar(require("./models/SectionModel"), exports);
|
|
33
|
+
__exportStar(require("./models/DesignationModel"), exports);
|
|
34
|
+
__exportStar(require("./models/DepartmentsModel"), exports);
|
|
35
|
+
__exportStar(require("./models/DivisionModel"), exports);
|
|
36
|
+
__exportStar(require("./models/faqsModel"), exports);
|
|
37
|
+
__exportStar(require("./models/questionTagsModel"), exports);
|
|
38
|
+
__exportStar(require("./models/ConversationModel"), exports);
|
|
39
|
+
__exportStar(require("./models/ConversationParticipantModel"), exports);
|
|
40
|
+
__exportStar(require("./models/MessageModel"), exports);
|
|
41
|
+
__exportStar(require("./models/serviceBookmarksModel"), exports);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
import { ConversationParticipant } from './ConversationParticipantModel';
|
|
3
|
+
import { Message } from './MessageModel';
|
|
4
|
+
export declare enum ConversationType {
|
|
5
|
+
DIRECT = "Direct",
|
|
6
|
+
GROUP = "Group"
|
|
7
|
+
}
|
|
8
|
+
export declare class Conversation extends BaseModel {
|
|
9
|
+
conversationType: ConversationType;
|
|
10
|
+
conversationName?: string;
|
|
11
|
+
createdAt: Date;
|
|
12
|
+
updatedAt?: Date;
|
|
13
|
+
participants?: ConversationParticipant[];
|
|
14
|
+
messages?: Message[];
|
|
15
|
+
constructor(conversationType?: ConversationType, conversationName?: string, createdAt?: Date, updatedAt?: Date);
|
|
16
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
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.Conversation = exports.ConversationType = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
const ConversationParticipantModel_1 = require("./ConversationParticipantModel");
|
|
16
|
+
const MessageModel_1 = require("./MessageModel");
|
|
17
|
+
var ConversationType;
|
|
18
|
+
(function (ConversationType) {
|
|
19
|
+
ConversationType["DIRECT"] = "Direct";
|
|
20
|
+
ConversationType["GROUP"] = "Group";
|
|
21
|
+
})(ConversationType || (exports.ConversationType = ConversationType = {}));
|
|
22
|
+
let Conversation = class Conversation extends BaseModel_1.BaseModel {
|
|
23
|
+
constructor(conversationType, conversationName, createdAt, updatedAt) {
|
|
24
|
+
super();
|
|
25
|
+
this.conversationType = conversationType || ConversationType.DIRECT;
|
|
26
|
+
this.conversationName = conversationName;
|
|
27
|
+
this.createdAt = createdAt || new Date();
|
|
28
|
+
this.updatedAt = updatedAt;
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
exports.Conversation = Conversation;
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, typeorm_1.Column)({
|
|
34
|
+
type: 'enum',
|
|
35
|
+
enum: ConversationType,
|
|
36
|
+
default: ConversationType.DIRECT
|
|
37
|
+
}),
|
|
38
|
+
__metadata("design:type", String)
|
|
39
|
+
], Conversation.prototype, "conversationType", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], Conversation.prototype, "conversationName", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, typeorm_1.Column)({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' }),
|
|
46
|
+
__metadata("design:type", Date)
|
|
47
|
+
], Conversation.prototype, "createdAt", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, typeorm_1.Column)({ type: 'timestamp', nullable: true }),
|
|
50
|
+
__metadata("design:type", Date)
|
|
51
|
+
], Conversation.prototype, "updatedAt", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, typeorm_1.OneToMany)(() => ConversationParticipantModel_1.ConversationParticipant, participant => participant.conversation),
|
|
54
|
+
__metadata("design:type", Array)
|
|
55
|
+
], Conversation.prototype, "participants", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, typeorm_1.OneToMany)(() => MessageModel_1.Message, message => message.conversation),
|
|
58
|
+
__metadata("design:type", Array)
|
|
59
|
+
], Conversation.prototype, "messages", void 0);
|
|
60
|
+
exports.Conversation = Conversation = __decorate([
|
|
61
|
+
(0, typeorm_1.Entity)({ name: 'conversations' }),
|
|
62
|
+
__metadata("design:paramtypes", [String, String, Date,
|
|
63
|
+
Date])
|
|
64
|
+
], Conversation);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
import { Conversation } from './ConversationModel';
|
|
3
|
+
import { User } from './user';
|
|
4
|
+
export declare class ConversationParticipant extends BaseModel {
|
|
5
|
+
conversationId: number;
|
|
6
|
+
userId: number;
|
|
7
|
+
roleId: number;
|
|
8
|
+
joinedAt: Date;
|
|
9
|
+
createdAt: Date;
|
|
10
|
+
updatedAt?: Date;
|
|
11
|
+
conversation?: Conversation;
|
|
12
|
+
user?: User;
|
|
13
|
+
constructor(conversationId?: number, userId?: number, roleId?: number, joinedAt?: Date, createdAt?: Date, updatedAt?: Date);
|
|
14
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
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.ConversationParticipant = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
const ConversationModel_1 = require("./ConversationModel");
|
|
16
|
+
const user_1 = require("./user");
|
|
17
|
+
let ConversationParticipant = class ConversationParticipant extends BaseModel_1.BaseModel {
|
|
18
|
+
constructor(conversationId, userId, roleId, joinedAt, createdAt, updatedAt) {
|
|
19
|
+
super();
|
|
20
|
+
this.conversationId = conversationId || 0;
|
|
21
|
+
this.userId = userId || 0;
|
|
22
|
+
this.roleId = roleId || 0;
|
|
23
|
+
this.joinedAt = joinedAt || new Date();
|
|
24
|
+
this.createdAt = createdAt || new Date();
|
|
25
|
+
this.updatedAt = updatedAt;
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
exports.ConversationParticipant = ConversationParticipant;
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, typeorm_1.Column)({ type: 'bigint' }),
|
|
31
|
+
__metadata("design:type", Number)
|
|
32
|
+
], ConversationParticipant.prototype, "conversationId", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, typeorm_1.Column)({ type: 'int' }),
|
|
35
|
+
__metadata("design:type", Number)
|
|
36
|
+
], ConversationParticipant.prototype, "userId", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, typeorm_1.Column)({ type: 'int' }),
|
|
39
|
+
__metadata("design:type", Number)
|
|
40
|
+
], ConversationParticipant.prototype, "roleId", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, typeorm_1.Column)({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' }),
|
|
43
|
+
__metadata("design:type", Date)
|
|
44
|
+
], ConversationParticipant.prototype, "joinedAt", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, typeorm_1.Column)({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' }),
|
|
47
|
+
__metadata("design:type", Date)
|
|
48
|
+
], ConversationParticipant.prototype, "createdAt", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, typeorm_1.Column)({ type: 'timestamp', nullable: true }),
|
|
51
|
+
__metadata("design:type", Date)
|
|
52
|
+
], ConversationParticipant.prototype, "updatedAt", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, typeorm_1.ManyToOne)(() => ConversationModel_1.Conversation, conversation => conversation.participants),
|
|
55
|
+
(0, typeorm_1.JoinColumn)({ name: 'conversationId' }),
|
|
56
|
+
__metadata("design:type", ConversationModel_1.Conversation)
|
|
57
|
+
], ConversationParticipant.prototype, "conversation", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, typeorm_1.ManyToOne)(() => user_1.User),
|
|
60
|
+
(0, typeorm_1.JoinColumn)({ name: 'userId' }),
|
|
61
|
+
__metadata("design:type", user_1.User)
|
|
62
|
+
], ConversationParticipant.prototype, "user", void 0);
|
|
63
|
+
exports.ConversationParticipant = ConversationParticipant = __decorate([
|
|
64
|
+
(0, typeorm_1.Entity)({ name: 'conversation_participants' }),
|
|
65
|
+
__metadata("design:paramtypes", [Number, Number, Number, Date,
|
|
66
|
+
Date,
|
|
67
|
+
Date])
|
|
68
|
+
], ConversationParticipant);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
export declare class Departments extends BaseModel {
|
|
3
|
+
department_name: string;
|
|
4
|
+
department_code: string;
|
|
5
|
+
department_description: string;
|
|
6
|
+
constructor(department_name: string, department_code: string, department_description: string);
|
|
7
|
+
}
|
|
@@ -9,36 +9,31 @@ 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.Departments = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const BaseModel_1 = require("./BaseModel");
|
|
15
|
-
let
|
|
16
|
-
constructor(
|
|
15
|
+
let Departments = class Departments extends BaseModel_1.BaseModel {
|
|
16
|
+
constructor(department_name, department_code, department_description) {
|
|
17
17
|
super();
|
|
18
|
-
this.
|
|
19
|
-
this.
|
|
20
|
-
this.
|
|
21
|
-
this.code = code || '';
|
|
18
|
+
this.department_name = department_name;
|
|
19
|
+
this.department_code = department_code;
|
|
20
|
+
this.department_description = department_description;
|
|
22
21
|
}
|
|
23
22
|
};
|
|
24
|
-
exports.
|
|
23
|
+
exports.Departments = Departments;
|
|
25
24
|
__decorate([
|
|
26
25
|
(0, typeorm_1.Column)({ type: 'varchar', length: 64, nullable: false, unique: true }),
|
|
27
26
|
__metadata("design:type", String)
|
|
28
|
-
],
|
|
27
|
+
], Departments.prototype, "department_name", void 0);
|
|
29
28
|
__decorate([
|
|
30
|
-
(0, typeorm_1.Column)({ nullable: false }),
|
|
31
|
-
__metadata("design:type", String)
|
|
32
|
-
], FMServices.prototype, "name", void 0);
|
|
33
|
-
__decorate([
|
|
34
|
-
(0, typeorm_1.Column)({ nullable: false }),
|
|
29
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 64, nullable: false, unique: true }),
|
|
35
30
|
__metadata("design:type", String)
|
|
36
|
-
],
|
|
31
|
+
], Departments.prototype, "department_code", void 0);
|
|
37
32
|
__decorate([
|
|
38
33
|
(0, typeorm_1.Column)({ nullable: false }),
|
|
39
34
|
__metadata("design:type", String)
|
|
40
|
-
],
|
|
41
|
-
exports.
|
|
42
|
-
(0, typeorm_1.Entity)({ name: '
|
|
43
|
-
__metadata("design:paramtypes", [String, String, String
|
|
44
|
-
],
|
|
35
|
+
], Departments.prototype, "department_description", void 0);
|
|
36
|
+
exports.Departments = Departments = __decorate([
|
|
37
|
+
(0, typeorm_1.Entity)({ name: 'departments' }),
|
|
38
|
+
__metadata("design:paramtypes", [String, String, String])
|
|
39
|
+
], Departments);
|
|
@@ -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.Designation = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
let Designation = class Designation extends BaseModel_1.BaseModel {
|
|
16
|
+
constructor(name, is_deleted) {
|
|
17
|
+
super();
|
|
18
|
+
this.name = name;
|
|
19
|
+
this.is_deleted = is_deleted;
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
exports.Designation = Designation;
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], Designation.prototype, "name", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
29
|
+
__metadata("design:type", Boolean)
|
|
30
|
+
], Designation.prototype, "is_deleted", void 0);
|
|
31
|
+
exports.Designation = Designation = __decorate([
|
|
32
|
+
(0, typeorm_1.Entity)({ name: 'designation' }),
|
|
33
|
+
__metadata("design:paramtypes", [String, Boolean])
|
|
34
|
+
], Designation);
|
|
@@ -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.Division = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
let Division = class Division extends BaseModel_1.BaseModel {
|
|
16
|
+
constructor(name, is_deleted) {
|
|
17
|
+
super();
|
|
18
|
+
this.name = name;
|
|
19
|
+
this.is_deleted = is_deleted;
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
exports.Division = Division;
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], Division.prototype, "name", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
29
|
+
__metadata("design:type", Boolean)
|
|
30
|
+
], Division.prototype, "is_deleted", void 0);
|
|
31
|
+
exports.Division = Division = __decorate([
|
|
32
|
+
(0, typeorm_1.Entity)({ name: 'division' }),
|
|
33
|
+
__metadata("design:paramtypes", [String, Boolean])
|
|
34
|
+
], Division);
|
|
@@ -0,0 +1,15 @@
|
|
|
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_user_id: number;
|
|
11
|
+
approver_role_id: number;
|
|
12
|
+
comment: string;
|
|
13
|
+
approval_status: ApprovalStatus;
|
|
14
|
+
constructor(leave_request_id: number, approver_user_id: number, approver_role_id: number, comment: string, approval_status: ApprovalStatus, level: number);
|
|
15
|
+
}
|
|
@@ -9,15 +9,23 @@ 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.LeaveApprovalDetails = void 0;
|
|
12
|
+
exports.LeaveApprovalDetails = exports.ApprovalStatus = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
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 = {}));
|
|
15
21
|
//This model is used to store the store the leave apporval details of the user for the leave request
|
|
16
22
|
let LeaveApprovalDetails = class LeaveApprovalDetails extends BaseModel_1.BaseModel {
|
|
17
|
-
constructor(leave_request_id,
|
|
23
|
+
constructor(leave_request_id, approver_user_id, approver_role_id, comment, approval_status, level) {
|
|
18
24
|
super();
|
|
19
25
|
this.leave_request_id = leave_request_id;
|
|
20
|
-
this.
|
|
26
|
+
this.approver_user_id = approver_user_id;
|
|
27
|
+
this.approver_role_id = approver_role_id;
|
|
28
|
+
this.comment = comment;
|
|
21
29
|
this.approval_status = approval_status;
|
|
22
30
|
this.level = level;
|
|
23
31
|
}
|
|
@@ -32,14 +40,22 @@ __decorate([
|
|
|
32
40
|
__metadata("design:type", Number)
|
|
33
41
|
], LeaveApprovalDetails.prototype, "level", void 0);
|
|
34
42
|
__decorate([
|
|
35
|
-
(0, typeorm_1.Column)({ type: 'int', nullable:
|
|
43
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
36
44
|
__metadata("design:type", Number)
|
|
37
|
-
], LeaveApprovalDetails.prototype, "
|
|
45
|
+
], LeaveApprovalDetails.prototype, "approver_user_id", void 0);
|
|
38
46
|
__decorate([
|
|
39
47
|
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
40
48
|
__metadata("design:type", Number)
|
|
49
|
+
], LeaveApprovalDetails.prototype, "approver_role_id", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: false }),
|
|
52
|
+
__metadata("design:type", String)
|
|
53
|
+
], LeaveApprovalDetails.prototype, "comment", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, typeorm_1.Column)({ type: 'enum', enum: ApprovalStatus, default: ApprovalStatus.PENDING, nullable: false }),
|
|
56
|
+
__metadata("design:type", String)
|
|
41
57
|
], LeaveApprovalDetails.prototype, "approval_status", void 0);
|
|
42
58
|
exports.LeaveApprovalDetails = LeaveApprovalDetails = __decorate([
|
|
43
|
-
(0, typeorm_1.Entity)({ name: '
|
|
44
|
-
__metadata("design:paramtypes", [Number, Number, Number, Number])
|
|
59
|
+
(0, typeorm_1.Entity)({ name: 'leave_approvals' }),
|
|
60
|
+
__metadata("design:paramtypes", [Number, Number, Number, String, String, Number])
|
|
45
61
|
], 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.LeaveAttachments = 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 LeaveAttachments = class LeaveAttachments extends BaseModel_1.BaseModel {
|
|
17
|
+
constructor(leave_request_id, files, attached_by_user_id) {
|
|
18
|
+
super();
|
|
19
|
+
this.leave_request_id = leave_request_id;
|
|
20
|
+
this.files = files;
|
|
21
|
+
this.attached_by_user_id = attached_by_user_id;
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
exports.LeaveAttachments = LeaveAttachments;
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
27
|
+
__metadata("design:type", Number)
|
|
28
|
+
], LeaveAttachments.prototype, "leave_request_id", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: false }),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], LeaveAttachments.prototype, "files", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
35
|
+
__metadata("design:type", Number)
|
|
36
|
+
], LeaveAttachments.prototype, "attached_by_user_id", void 0);
|
|
37
|
+
exports.LeaveAttachments = LeaveAttachments = __decorate([
|
|
38
|
+
(0, typeorm_1.Entity)({ name: 'leave_attachments' }),
|
|
39
|
+
__metadata("design:paramtypes", [Number, String, Number])
|
|
40
|
+
], LeaveAttachments);
|
|
@@ -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.LeaveChat = 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 LeaveChat = class LeaveChat extends BaseModel_1.BaseModel {
|
|
17
|
+
constructor(leave_request_id, content, sender_user_id) {
|
|
18
|
+
super();
|
|
19
|
+
this.leave_request_id = leave_request_id;
|
|
20
|
+
this.content = content;
|
|
21
|
+
this.sender_user_id = sender_user_id;
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
exports.LeaveChat = LeaveChat;
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
27
|
+
__metadata("design:type", Number)
|
|
28
|
+
], LeaveChat.prototype, "leave_request_id", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: false }),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], LeaveChat.prototype, "content", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
35
|
+
__metadata("design:type", Number)
|
|
36
|
+
], LeaveChat.prototype, "sender_user_id", void 0);
|
|
37
|
+
exports.LeaveChat = LeaveChat = __decorate([
|
|
38
|
+
(0, typeorm_1.Entity)({ name: 'leave_chats' }),
|
|
39
|
+
__metadata("design:paramtypes", [Number, String, Number])
|
|
40
|
+
], LeaveChat);
|