@platform-modules/foreign-ministry 1.0.19 → 1.0.21
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 +5 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/models/LeaveWorkFlowModel.js +1 -1
- package/dist/models/faqsModel.d.ts +9 -0
- package/dist/models/faqsModel.js +49 -0
- package/dist/models/questionTagsModel.d.ts +6 -0
- package/dist/models/questionTagsModel.js +34 -0
- package/package.json +1 -1
- package/src/data-source.ts +5 -1
- package/src/index.ts +3 -1
- package/src/models/LeaveWorkFlowModel.ts +1 -1
- package/src/models/faqsModel.ts +37 -0
- package/src/models/questionTagsModel.ts +22 -0
- 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/dist/data-source.js
CHANGED
|
@@ -20,6 +20,8 @@ const LeaveApprovalsModel_1 = require("./models/LeaveApprovalsModel");
|
|
|
20
20
|
const LeaveAttachmentsModel_1 = require("./models/LeaveAttachmentsModel");
|
|
21
21
|
const LeaveChatModel_1 = require("./models/LeaveChatModel");
|
|
22
22
|
const LeaveWorkFlowModel_1 = require("./models/LeaveWorkFlowModel");
|
|
23
|
+
const faqsModel_1 = require("./models/faqsModel");
|
|
24
|
+
const questionTagsModel_1 = require("./models/questionTagsModel");
|
|
23
25
|
exports.AppDataSource = new typeorm_1.DataSource({
|
|
24
26
|
type: 'postgres',
|
|
25
27
|
host: process.env.DB_HOST || 'localhost',
|
|
@@ -44,6 +46,8 @@ exports.AppDataSource = new typeorm_1.DataSource({
|
|
|
44
46
|
LeaveApprovalsModel_1.LeaveApprovalDetails,
|
|
45
47
|
LeaveAttachmentsModel_1.LeaveAttachments,
|
|
46
48
|
LeaveChatModel_1.LeaveChat,
|
|
47
|
-
LeaveWorkFlowModel_1.LeaveWorkFlow
|
|
49
|
+
LeaveWorkFlowModel_1.LeaveWorkFlow,
|
|
50
|
+
faqsModel_1.Faqs,
|
|
51
|
+
questionTagsModel_1.QuestionTags
|
|
48
52
|
],
|
|
49
53
|
});
|
package/dist/index.d.ts
CHANGED
|
@@ -13,3 +13,5 @@ export * from './models/LeaveApprovalsModel';
|
|
|
13
13
|
export * from './models/LeaveAttachmentsModel';
|
|
14
14
|
export * from './models/LeaveChatModel';
|
|
15
15
|
export * from './models/LeaveWorkFlowModel';
|
|
16
|
+
export * from './models/faqsModel';
|
|
17
|
+
export * from './models/questionTagsModel';
|
package/dist/index.js
CHANGED
|
@@ -29,3 +29,5 @@ __exportStar(require("./models/LeaveApprovalsModel"), exports);
|
|
|
29
29
|
__exportStar(require("./models/LeaveAttachmentsModel"), exports);
|
|
30
30
|
__exportStar(require("./models/LeaveChatModel"), exports);
|
|
31
31
|
__exportStar(require("./models/LeaveWorkFlowModel"), exports);
|
|
32
|
+
__exportStar(require("./models/faqsModel"), exports);
|
|
33
|
+
__exportStar(require("./models/questionTagsModel"), exports);
|
|
@@ -34,7 +34,7 @@ __decorate([
|
|
|
34
34
|
__metadata("design:type", Number)
|
|
35
35
|
], LeaveWorkFlow.prototype, "leave_request_id", void 0);
|
|
36
36
|
__decorate([
|
|
37
|
-
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
37
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: false, default: 0 }),
|
|
38
38
|
__metadata("design:type", Number)
|
|
39
39
|
], LeaveWorkFlow.prototype, "leave_approval_details_id", void 0);
|
|
40
40
|
__decorate([
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
export declare class Faqs extends BaseModel {
|
|
3
|
+
question: string;
|
|
4
|
+
answer: string;
|
|
5
|
+
category_Id: number;
|
|
6
|
+
sub_category_Id: number;
|
|
7
|
+
department_Id: number;
|
|
8
|
+
constructor(question: string, answer: string, category_Id: number, sub_category_Id: number, department_Id: number);
|
|
9
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
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.Faqs = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
let Faqs = class Faqs extends BaseModel_1.BaseModel {
|
|
16
|
+
constructor(question, answer, category_Id, sub_category_Id, department_Id) {
|
|
17
|
+
super();
|
|
18
|
+
this.question = question,
|
|
19
|
+
this.answer = answer,
|
|
20
|
+
this.category_Id = category_Id,
|
|
21
|
+
this.sub_category_Id = sub_category_Id,
|
|
22
|
+
this.department_Id = department_Id;
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
exports.Faqs = Faqs;
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], Faqs.prototype, "question", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], Faqs.prototype, "answer", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
36
|
+
__metadata("design:type", Number)
|
|
37
|
+
], Faqs.prototype, "category_Id", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
40
|
+
__metadata("design:type", Number)
|
|
41
|
+
], Faqs.prototype, "sub_category_Id", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
44
|
+
__metadata("design:type", Number)
|
|
45
|
+
], Faqs.prototype, "department_Id", void 0);
|
|
46
|
+
exports.Faqs = Faqs = __decorate([
|
|
47
|
+
(0, typeorm_1.Entity)({ name: 'faqs' }),
|
|
48
|
+
__metadata("design:paramtypes", [String, String, Number, Number, Number])
|
|
49
|
+
], Faqs);
|
|
@@ -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);
|
package/package.json
CHANGED
package/src/data-source.ts
CHANGED
|
@@ -17,6 +17,8 @@ import { LeaveApprovalDetails } from './models/LeaveApprovalsModel';
|
|
|
17
17
|
import { LeaveAttachments } from './models/LeaveAttachmentsModel';
|
|
18
18
|
import { LeaveChat } from './models/LeaveChatModel';
|
|
19
19
|
import { LeaveWorkFlow } from './models/LeaveWorkFlowModel';
|
|
20
|
+
import { Faqs } from './models/faqsModel';
|
|
21
|
+
import { QuestionTags } from './models/questionTagsModel';
|
|
20
22
|
|
|
21
23
|
|
|
22
24
|
export const AppDataSource = new DataSource({
|
|
@@ -43,6 +45,8 @@ export const AppDataSource = new DataSource({
|
|
|
43
45
|
LeaveApprovalDetails,
|
|
44
46
|
LeaveAttachments,
|
|
45
47
|
LeaveChat,
|
|
46
|
-
LeaveWorkFlow
|
|
48
|
+
LeaveWorkFlow,
|
|
49
|
+
Faqs,
|
|
50
|
+
QuestionTags
|
|
47
51
|
],
|
|
48
52
|
});
|
package/src/index.ts
CHANGED
|
@@ -12,4 +12,6 @@ export * from './models/LeaveSettingsModel';
|
|
|
12
12
|
export * from './models/LeaveApprovalsModel';
|
|
13
13
|
export * from './models/LeaveAttachmentsModel';
|
|
14
14
|
export * from './models/LeaveChatModel';
|
|
15
|
-
export * from './models/LeaveWorkFlowModel';
|
|
15
|
+
export * from './models/LeaveWorkFlowModel';
|
|
16
|
+
export * from './models/faqsModel';
|
|
17
|
+
export * from './models/questionTagsModel';
|
|
@@ -13,7 +13,7 @@ export class LeaveWorkFlow extends BaseModel {
|
|
|
13
13
|
@Column({ type: 'int', nullable: false })
|
|
14
14
|
leave_request_id: number;
|
|
15
15
|
|
|
16
|
-
@Column({ type: 'int', nullable: false })
|
|
16
|
+
@Column({ type: 'int', nullable: false, default: 0 })
|
|
17
17
|
leave_approval_details_id: number;
|
|
18
18
|
|
|
19
19
|
@Column({ type: 'varchar', length: 255, nullable: false })
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
|
|
2
|
+
import { Column, Entity ,BeforeInsert,BeforeUpdate } from "typeorm";
|
|
3
|
+
import { BaseModel } from './BaseModel';
|
|
4
|
+
|
|
5
|
+
@Entity({ name: 'faqs' })
|
|
6
|
+
export class Faqs extends BaseModel {
|
|
7
|
+
|
|
8
|
+
@Column({ nullable: true })
|
|
9
|
+
question: string;
|
|
10
|
+
|
|
11
|
+
@Column({ nullable: true })
|
|
12
|
+
answer: string;
|
|
13
|
+
|
|
14
|
+
@Column({ nullable: true })
|
|
15
|
+
category_Id: number;
|
|
16
|
+
|
|
17
|
+
@Column({ nullable: true })
|
|
18
|
+
sub_category_Id: number;
|
|
19
|
+
|
|
20
|
+
@Column({ nullable: true })
|
|
21
|
+
department_Id: number;
|
|
22
|
+
|
|
23
|
+
constructor(
|
|
24
|
+
question: string,
|
|
25
|
+
answer: string,
|
|
26
|
+
category_Id: number,
|
|
27
|
+
sub_category_Id: number,
|
|
28
|
+
department_Id: number,
|
|
29
|
+
) {
|
|
30
|
+
super();
|
|
31
|
+
this.question = question,
|
|
32
|
+
this.answer = answer,
|
|
33
|
+
this.category_Id = category_Id ,
|
|
34
|
+
this.sub_category_Id = sub_category_Id,
|
|
35
|
+
this.department_Id = department_Id
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
|
|
2
|
+
import { Column, Entity ,BeforeInsert,BeforeUpdate } from "typeorm";
|
|
3
|
+
import { BaseModel } from './BaseModel';
|
|
4
|
+
|
|
5
|
+
@Entity({ name: 'question_tags' })
|
|
6
|
+
export class QuestionTags extends BaseModel {
|
|
7
|
+
|
|
8
|
+
@Column({ nullable: true })
|
|
9
|
+
name: string;
|
|
10
|
+
|
|
11
|
+
@Column({ nullable: true })
|
|
12
|
+
question_Id: number;
|
|
13
|
+
|
|
14
|
+
constructor(
|
|
15
|
+
name: string,
|
|
16
|
+
question_Id: number
|
|
17
|
+
) {
|
|
18
|
+
super();
|
|
19
|
+
this.name = name,
|
|
20
|
+
this.question_Id = question_Id
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -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);
|