@platform-modules/foreign-ministry 1.1.20 → 1.1.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 +16 -8
- package/dist/index.d.ts +8 -4
- package/dist/index.js +8 -4
- package/dist/models/AttendanceModel.d.ts +1 -2
- package/dist/models/AttendanceModel.js +1 -2
- package/dist/models/DiplomaticClubCardApprovalModel.d.ts +16 -0
- package/dist/models/DiplomaticClubCardApprovalModel.js +58 -0
- package/dist/models/DiplomaticClubCardAttachmentModel.d.ts +9 -0
- package/dist/models/DiplomaticClubCardAttachmentModel.js +44 -0
- package/dist/models/DiplomaticClubCardChatModel.d.ts +7 -0
- package/dist/models/{LeaveApprovalMatrixModel.js → DiplomaticClubCardChatModel.js} +14 -18
- package/dist/models/DiplomaticClubCardMemberModel.d.ts +13 -0
- package/dist/models/DiplomaticClubCardMemberModel.js +60 -0
- package/dist/models/DiplomaticClubCardRequestModel.d.ts +33 -0
- package/dist/models/DiplomaticClubCardRequestModel.js +98 -0
- package/dist/models/DiplomaticClubCardWorkFlowModel.d.ts +12 -0
- package/dist/models/DiplomaticClubCardWorkFlowModel.js +42 -0
- package/dist/models/DiplomaticTitleModel.d.ts +12 -0
- package/dist/models/DiplomaticTitleModel.js +45 -0
- package/dist/models/LeaveApprovalsModel.d.ts +1 -4
- package/dist/models/LeaveApprovalsModel.js +0 -9
- package/dist/models/SubscriptionAmountModel.d.ts +10 -0
- package/dist/models/SubscriptionAmountModel.js +45 -0
- package/dist/models/WorkflowTask.d.ts +2 -5
- package/dist/models/WorkflowTask.js +4 -28
- package/dist/models/WorkflowTaskNames.d.ts +3 -12
- package/dist/models/WorkflowTaskNames.js +9 -28
- package/package.json +1 -1
- package/src/data-source.ts +16 -8
- package/src/index.ts +8 -4
- package/src/models/AttendanceModel.ts +1 -2
- package/src/models/DiplomaticClubCardApprovalModel.ts +37 -0
- package/src/models/DiplomaticClubCardAttachmentModel.ts +25 -0
- package/src/models/DiplomaticClubCardChatModel.ts +19 -0
- package/src/models/DiplomaticClubCardMemberModel.ts +37 -0
- package/src/models/DiplomaticClubCardRequestModel.ts +70 -0
- package/src/models/DiplomaticClubCardWorkFlowModel.ts +25 -0
- package/src/models/DiplomaticTitleModel.ts +27 -0
- package/src/models/LeaveApprovalsModel.ts +1 -8
- package/src/models/SubscriptionAmountModel.ts +26 -0
- package/src/models/WorkflowTask.ts +4 -31
- package/src/models/WorkflowTaskNames.ts +8 -27
- 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/UpdateAttendanceApprovalModel.d.ts +0 -21
- package/dist/models/UpdateAttendanceApprovalModel.js +0 -75
- package/dist/models/UpdateAttendanceChatModel.d.ts +0 -16
- package/dist/models/UpdateAttendanceChatModel.js +0 -52
- package/dist/models/UpdateAttendanceRequestModel.d.ts +0 -28
- package/dist/models/UpdateAttendanceRequestModel.js +0 -86
- package/dist/models/UpdateAttendanceWorkflowModel.d.ts +0 -13
- package/dist/models/UpdateAttendanceWorkflowModel.js +0 -46
- package/dist/models/UpdateAttendenceRequestModel.d.ts +0 -28
- package/dist/models/UpdateAttendenceRequestModel.js +0 -86
- package/src/models/UpdateAttendanceApprovalModel.ts +0 -50
- package/src/models/UpdateAttendanceChatModel.ts +0 -34
- package/src/models/UpdateAttendanceRequestModel.ts +0 -62
- package/src/models/UpdateAttendanceWorkflowModel.ts +0 -28
|
@@ -17,7 +17,6 @@ var ApprovalStatus;
|
|
|
17
17
|
ApprovalStatus["PENDING"] = "Pending";
|
|
18
18
|
ApprovalStatus["APPROVED"] = "Approved";
|
|
19
19
|
ApprovalStatus["REJECTED"] = "Rejected";
|
|
20
|
-
ApprovalStatus["IN_PROGRESS"] = "In Progress";
|
|
21
20
|
})(ApprovalStatus || (exports.ApprovalStatus = ApprovalStatus = {}));
|
|
22
21
|
//This model is used to store the store the leave apporval details of the user for the leave request
|
|
23
22
|
let LeaveApprovalDetails = class LeaveApprovalDetails extends BaseModel_1.BaseModel {
|
|
@@ -50,14 +49,6 @@ __decorate([
|
|
|
50
49
|
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
51
50
|
__metadata("design:type", Number)
|
|
52
51
|
], LeaveApprovalDetails.prototype, "approver_role_id", void 0);
|
|
53
|
-
__decorate([
|
|
54
|
-
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
55
|
-
__metadata("design:type", Object)
|
|
56
|
-
], LeaveApprovalDetails.prototype, "delegate_user_id", void 0);
|
|
57
|
-
__decorate([
|
|
58
|
-
(0, typeorm_1.Column)({ type: 'integer', nullable: true }),
|
|
59
|
-
__metadata("design:type", Object)
|
|
60
|
-
], LeaveApprovalDetails.prototype, "approved_by", void 0);
|
|
61
52
|
__decorate([
|
|
62
53
|
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
63
54
|
__metadata("design:type", Number)
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
import { MembershipType } from './DiplomaticClubCardRequestModel';
|
|
3
|
+
export declare class SubscriptionAmounts extends BaseModel {
|
|
4
|
+
membership_type: MembershipType;
|
|
5
|
+
amount: number;
|
|
6
|
+
description: string | null;
|
|
7
|
+
is_active: boolean;
|
|
8
|
+
effective_from: Date | null;
|
|
9
|
+
effective_to: Date | null;
|
|
10
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
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.SubscriptionAmounts = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
const DiplomaticClubCardRequestModel_1 = require("./DiplomaticClubCardRequestModel");
|
|
16
|
+
let SubscriptionAmounts = class SubscriptionAmounts extends BaseModel_1.BaseModel {
|
|
17
|
+
};
|
|
18
|
+
exports.SubscriptionAmounts = SubscriptionAmounts;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, typeorm_1.Column)({ type: 'enum', enum: DiplomaticClubCardRequestModel_1.MembershipType, nullable: false }),
|
|
21
|
+
__metadata("design:type", String)
|
|
22
|
+
], SubscriptionAmounts.prototype, "membership_type", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, typeorm_1.Column)({ type: 'decimal', precision: 10, scale: 2, nullable: false }),
|
|
25
|
+
__metadata("design:type", Number)
|
|
26
|
+
], SubscriptionAmounts.prototype, "amount", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: true }),
|
|
29
|
+
__metadata("design:type", Object)
|
|
30
|
+
], SubscriptionAmounts.prototype, "description", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, typeorm_1.Column)({ type: 'boolean', default: true, nullable: false }),
|
|
33
|
+
__metadata("design:type", Boolean)
|
|
34
|
+
], SubscriptionAmounts.prototype, "is_active", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typeorm_1.Column)({ type: 'date', nullable: true }),
|
|
37
|
+
__metadata("design:type", Object)
|
|
38
|
+
], SubscriptionAmounts.prototype, "effective_from", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, typeorm_1.Column)({ type: 'date', nullable: true }),
|
|
41
|
+
__metadata("design:type", Object)
|
|
42
|
+
], SubscriptionAmounts.prototype, "effective_to", void 0);
|
|
43
|
+
exports.SubscriptionAmounts = SubscriptionAmounts = __decorate([
|
|
44
|
+
(0, typeorm_1.Entity)({ name: 'subscription_amounts' })
|
|
45
|
+
], SubscriptionAmounts);
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import { BaseModel } from './BaseModel';
|
|
2
|
-
import { TaskType } from "./WorkflowTaskNames";
|
|
3
|
-
import { CategoryType } from "./WorkflowTaskNames";
|
|
4
2
|
export declare class WorkflowTask extends BaseModel {
|
|
5
3
|
task_id: number;
|
|
6
4
|
name: string;
|
|
7
|
-
task_type:
|
|
8
|
-
|
|
9
|
-
constructor(name: string, task_id?: number, task_type?: TaskType, category?: CategoryType);
|
|
5
|
+
task_type: string;
|
|
6
|
+
constructor(name: string, task_id?: number, task_type?: string);
|
|
10
7
|
}
|
|
@@ -12,24 +12,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.WorkflowTask = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const BaseModel_1 = require("./BaseModel");
|
|
15
|
-
const WorkflowTaskNames_1 = require("./WorkflowTaskNames");
|
|
16
|
-
const WorkflowTaskNames_2 = require("./WorkflowTaskNames");
|
|
17
|
-
// export enum TaskNameType {
|
|
18
|
-
// SIMPLE = 'SIMPLE',
|
|
19
|
-
// HUMAN = 'HUMAN'
|
|
20
|
-
// }
|
|
21
|
-
// export enum CategoryNameType {
|
|
22
|
-
// CREATE = 'CREATE',
|
|
23
|
-
// APPROVAL = 'APPROVAL',
|
|
24
|
-
// NOTIFICATION = 'NOTIFICATION'
|
|
25
|
-
// }
|
|
26
15
|
let WorkflowTask = class WorkflowTask extends BaseModel_1.BaseModel {
|
|
27
|
-
constructor(name, task_id, task_type
|
|
16
|
+
constructor(name, task_id, task_type) {
|
|
28
17
|
super();
|
|
29
18
|
this.name = name;
|
|
30
19
|
this.task_id = task_id || 0;
|
|
31
|
-
this.task_type = task_type ||
|
|
32
|
-
this.category = category || WorkflowTaskNames_2.CategoryType.CREATE;
|
|
20
|
+
this.task_type = task_type || '';
|
|
33
21
|
}
|
|
34
22
|
};
|
|
35
23
|
exports.WorkflowTask = WorkflowTask;
|
|
@@ -42,22 +30,10 @@ __decorate([
|
|
|
42
30
|
__metadata("design:type", String)
|
|
43
31
|
], WorkflowTask.prototype, "name", void 0);
|
|
44
32
|
__decorate([
|
|
45
|
-
(0, typeorm_1.Column)({
|
|
46
|
-
type: 'enum',
|
|
47
|
-
enum: WorkflowTaskNames_1.TaskType,
|
|
48
|
-
nullable: true
|
|
49
|
-
}),
|
|
33
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 200, nullable: true }),
|
|
50
34
|
__metadata("design:type", String)
|
|
51
35
|
], WorkflowTask.prototype, "task_type", void 0);
|
|
52
|
-
__decorate([
|
|
53
|
-
(0, typeorm_1.Column)({
|
|
54
|
-
type: 'enum',
|
|
55
|
-
enum: WorkflowTaskNames_2.CategoryType,
|
|
56
|
-
nullable: true
|
|
57
|
-
}),
|
|
58
|
-
__metadata("design:type", String)
|
|
59
|
-
], WorkflowTask.prototype, "category", void 0);
|
|
60
36
|
exports.WorkflowTask = WorkflowTask = __decorate([
|
|
61
37
|
(0, typeorm_1.Entity)({ name: 'workflow_tasks' }),
|
|
62
|
-
__metadata("design:paramtypes", [String, Number, String
|
|
38
|
+
__metadata("design:paramtypes", [String, Number, String])
|
|
63
39
|
], WorkflowTask);
|
|
@@ -1,17 +1,8 @@
|
|
|
1
1
|
import { BaseModel } from './BaseModel';
|
|
2
|
-
export declare enum TaskType {
|
|
3
|
-
SIMPLE = "SIMPLE",
|
|
4
|
-
HUMAN = "HUMAN"
|
|
5
|
-
}
|
|
6
|
-
export declare enum CategoryType {
|
|
7
|
-
CREATE = "CREATE",
|
|
8
|
-
APPROVAL = "APPROVAL",
|
|
9
|
-
NOTIFICATION = "NOTIFICATION"
|
|
10
|
-
}
|
|
11
2
|
export declare class WorkflowTaskNames extends BaseModel {
|
|
12
3
|
name: string;
|
|
4
|
+
task_id: number;
|
|
13
5
|
description: string;
|
|
14
|
-
task_type:
|
|
15
|
-
|
|
16
|
-
constructor(name: string, description: string, task_type: TaskType, category: CategoryType);
|
|
6
|
+
task_type: string;
|
|
7
|
+
constructor(name: string, task_id: number, description: string, task_type: string);
|
|
17
8
|
}
|
|
@@ -9,27 +9,16 @@ 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.WorkflowTaskNames =
|
|
12
|
+
exports.WorkflowTaskNames = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const BaseModel_1 = require("./BaseModel");
|
|
15
|
-
var TaskType;
|
|
16
|
-
(function (TaskType) {
|
|
17
|
-
TaskType["SIMPLE"] = "SIMPLE";
|
|
18
|
-
TaskType["HUMAN"] = "HUMAN";
|
|
19
|
-
})(TaskType || (exports.TaskType = TaskType = {}));
|
|
20
|
-
var CategoryType;
|
|
21
|
-
(function (CategoryType) {
|
|
22
|
-
CategoryType["CREATE"] = "CREATE";
|
|
23
|
-
CategoryType["APPROVAL"] = "APPROVAL";
|
|
24
|
-
CategoryType["NOTIFICATION"] = "NOTIFICATION";
|
|
25
|
-
})(CategoryType || (exports.CategoryType = CategoryType = {}));
|
|
26
15
|
let WorkflowTaskNames = class WorkflowTaskNames extends BaseModel_1.BaseModel {
|
|
27
|
-
constructor(name, description, task_type
|
|
16
|
+
constructor(name, task_id, description, task_type) {
|
|
28
17
|
super();
|
|
29
18
|
this.name = name;
|
|
19
|
+
this.task_id = task_id;
|
|
30
20
|
this.description = description;
|
|
31
21
|
this.task_type = task_type;
|
|
32
|
-
this.category = category;
|
|
33
22
|
}
|
|
34
23
|
};
|
|
35
24
|
exports.WorkflowTaskNames = WorkflowTaskNames;
|
|
@@ -37,27 +26,19 @@ __decorate([
|
|
|
37
26
|
(0, typeorm_1.Column)({ type: 'varchar', length: 100, nullable: false }),
|
|
38
27
|
__metadata("design:type", String)
|
|
39
28
|
], WorkflowTaskNames.prototype, "name", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, typeorm_1.Column)({ type: 'integer', nullable: false }),
|
|
31
|
+
__metadata("design:type", Number)
|
|
32
|
+
], WorkflowTaskNames.prototype, "task_id", void 0);
|
|
40
33
|
__decorate([
|
|
41
34
|
(0, typeorm_1.Column)({ type: 'varchar', length: 200, nullable: true }),
|
|
42
35
|
__metadata("design:type", String)
|
|
43
36
|
], WorkflowTaskNames.prototype, "description", void 0);
|
|
44
37
|
__decorate([
|
|
45
|
-
(0, typeorm_1.Column)({
|
|
46
|
-
type: 'enum',
|
|
47
|
-
enum: TaskType,
|
|
48
|
-
nullable: true
|
|
49
|
-
}),
|
|
38
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 200, nullable: true }),
|
|
50
39
|
__metadata("design:type", String)
|
|
51
40
|
], WorkflowTaskNames.prototype, "task_type", void 0);
|
|
52
|
-
__decorate([
|
|
53
|
-
(0, typeorm_1.Column)({
|
|
54
|
-
type: 'enum',
|
|
55
|
-
enum: CategoryType,
|
|
56
|
-
nullable: true
|
|
57
|
-
}),
|
|
58
|
-
__metadata("design:type", String)
|
|
59
|
-
], WorkflowTaskNames.prototype, "category", void 0);
|
|
60
41
|
exports.WorkflowTaskNames = WorkflowTaskNames = __decorate([
|
|
61
42
|
(0, typeorm_1.Entity)({ name: 'workflow_task_names' }),
|
|
62
|
-
__metadata("design:paramtypes", [String,
|
|
43
|
+
__metadata("design:paramtypes", [String, Number, String, String])
|
|
63
44
|
], WorkflowTaskNames);
|
package/package.json
CHANGED
package/src/data-source.ts
CHANGED
|
@@ -80,6 +80,14 @@ import { StayAfterHoursApprovalDetails } from './models/StayAfterHoursApprovalMo
|
|
|
80
80
|
import { StayAfterHoursRequestAttachment } from './models/StayAfterHoursAttachmentModel';
|
|
81
81
|
import { StayAfterHoursRequestChat } from './models/StayAfterHoursChatModel';
|
|
82
82
|
import { StayAfterHoursWorkFlow } from './models/StayAfterHoursWorkflowModel';
|
|
83
|
+
import { DiplomaticClubCardRequests } from './models/DiplomaticClubCardRequestModel';
|
|
84
|
+
import { DiplomaticClubCardMembers } from './models/DiplomaticClubCardMemberModel';
|
|
85
|
+
import { DiplomaticClubCardApprovals } from './models/DiplomaticClubCardApprovalModel';
|
|
86
|
+
import { DiplomaticClubCardAttachments } from './models/DiplomaticClubCardAttachmentModel';
|
|
87
|
+
import { DiplomaticClubCardWorkFlow } from './models/DiplomaticClubCardWorkFlowModel';
|
|
88
|
+
import { DiplomaticClubCardChat } from './models/DiplomaticClubCardChatModel';
|
|
89
|
+
import { DiplomaticTitles } from './models/DiplomaticTitleModel';
|
|
90
|
+
import { SubscriptionAmounts } from './models/SubscriptionAmountModel';
|
|
83
91
|
|
|
84
92
|
|
|
85
93
|
import { WorkflowTask } from './models/WorkflowTask';
|
|
@@ -88,10 +96,6 @@ import { WorkflowDefinitions } from './models/WorkflowDefinitions';
|
|
|
88
96
|
import { WorkflowHierarchy } from './models/WorkflowHierarchy';
|
|
89
97
|
import { ImportantLinks } from './models/importantLinksModel';
|
|
90
98
|
import { DelegateSettings } from './models/DelegateSettingsModel';
|
|
91
|
-
import { UpdateAttendanceRequests } from './models/UpdateAttendanceRequestModel';
|
|
92
|
-
import { UpdateAttendanceApprovalDetails } from './models/UpdateAttendanceApprovalModel';
|
|
93
|
-
import { UpdateAttendanceRequestChat } from './models/UpdateAttendanceChatModel';
|
|
94
|
-
import { UpdateAttendanceWorkFlow } from './models/UpdateAttendanceWorkflowModel';
|
|
95
99
|
|
|
96
100
|
|
|
97
101
|
export const AppDataSource = new DataSource({
|
|
@@ -183,9 +187,13 @@ export const AppDataSource = new DataSource({
|
|
|
183
187
|
,StayAfterHoursRequestAttachment
|
|
184
188
|
,StayAfterHoursRequestChat
|
|
185
189
|
,StayAfterHoursWorkFlow
|
|
186
|
-
,
|
|
187
|
-
,
|
|
188
|
-
,
|
|
189
|
-
,
|
|
190
|
+
,DiplomaticClubCardRequests
|
|
191
|
+
,DiplomaticClubCardMembers
|
|
192
|
+
,DiplomaticClubCardApprovals
|
|
193
|
+
,DiplomaticClubCardAttachments
|
|
194
|
+
,DiplomaticClubCardWorkFlow
|
|
195
|
+
,DiplomaticClubCardChat
|
|
196
|
+
,DiplomaticTitles
|
|
197
|
+
,SubscriptionAmounts
|
|
190
198
|
],
|
|
191
199
|
});
|
package/src/index.ts
CHANGED
|
@@ -77,7 +77,11 @@ export * from './models/StayAfterHoursApprovalModel';
|
|
|
77
77
|
export * from './models/StayAfterHoursAttachmentModel';
|
|
78
78
|
export * from './models/StayAfterHoursChatModel';
|
|
79
79
|
export * from './models/StayAfterHoursWorkflowModel';
|
|
80
|
-
export * from './models/
|
|
81
|
-
export * from './models/
|
|
82
|
-
export * from './models/
|
|
83
|
-
export * from './models/
|
|
80
|
+
export * from './models/DiplomaticClubCardRequestModel';
|
|
81
|
+
export * from './models/DiplomaticClubCardMemberModel';
|
|
82
|
+
export * from './models/DiplomaticClubCardApprovalModel';
|
|
83
|
+
export * from './models/DiplomaticClubCardAttachmentModel';
|
|
84
|
+
export * from './models/DiplomaticClubCardWorkFlowModel';
|
|
85
|
+
export * from './models/DiplomaticClubCardChatModel';
|
|
86
|
+
export * from './models/DiplomaticTitleModel';
|
|
87
|
+
export * from './models/SubscriptionAmountModel';
|
|
@@ -7,7 +7,6 @@ export enum AttendanceStatus {
|
|
|
7
7
|
ABSENT = 'ABSENT',
|
|
8
8
|
LEAVE = 'LEAVE',
|
|
9
9
|
HALF_DAY = 'HALF_DAY',
|
|
10
|
-
REGULARISED = 'REGULARISED',
|
|
11
10
|
}
|
|
12
11
|
|
|
13
12
|
@Entity({ name: 'attendance_details' })
|
|
@@ -20,7 +19,7 @@ export class AttendanceDetails extends BaseModel {
|
|
|
20
19
|
@Column({ type: 'int', nullable: true })
|
|
21
20
|
shift_id: number;
|
|
22
21
|
|
|
23
|
-
@Column({ type: 'date', nullable: true })
|
|
22
|
+
@Column({ type: 'date', nullable: true , unique: true})
|
|
24
23
|
attendance_date: string;
|
|
25
24
|
|
|
26
25
|
@Column({ type: 'time', nullable: true })
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
export enum DiplomaticClubCardApprovalStatus {
|
|
5
|
+
PENDING = "Pending",
|
|
6
|
+
APPROVED = "Approved",
|
|
7
|
+
REJECTED = "Rejected"
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
@Entity({ name: 'diplomatic_club_card_approvals' })
|
|
11
|
+
export class DiplomaticClubCardApprovals extends BaseModel {
|
|
12
|
+
|
|
13
|
+
@Column({ type: 'int', nullable: false })
|
|
14
|
+
request_id: number; // Reference to diplomatic_club_card_requests
|
|
15
|
+
|
|
16
|
+
@Column({ type: 'int', nullable: false })
|
|
17
|
+
approver_user_id: number;
|
|
18
|
+
|
|
19
|
+
@Column({ type: 'int', nullable: true })
|
|
20
|
+
approver_role_id: number | null;
|
|
21
|
+
|
|
22
|
+
@Column({ type: 'int', nullable: false, default: 0 })
|
|
23
|
+
step_order: number; // Approval step order
|
|
24
|
+
|
|
25
|
+
@Column({ type: 'enum', enum: DiplomaticClubCardApprovalStatus, default: DiplomaticClubCardApprovalStatus.PENDING, nullable: false })
|
|
26
|
+
status: DiplomaticClubCardApprovalStatus;
|
|
27
|
+
|
|
28
|
+
@Column({ type: 'text', nullable: true })
|
|
29
|
+
comments: string | null;
|
|
30
|
+
|
|
31
|
+
@Column({ type: 'timestamp', nullable: true })
|
|
32
|
+
approved_at: Date | null;
|
|
33
|
+
|
|
34
|
+
@Column({ type: 'timestamp', nullable: true })
|
|
35
|
+
rejected_at: Date | null;
|
|
36
|
+
}
|
|
37
|
+
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
@Entity({ name: 'diplomatic_club_card_attachments' })
|
|
5
|
+
export class DiplomaticClubCardAttachments extends BaseModel {
|
|
6
|
+
|
|
7
|
+
@Column({ type: 'int', nullable: false })
|
|
8
|
+
request_id: number; // Reference to diplomatic_club_card_requests
|
|
9
|
+
|
|
10
|
+
@Column({ type: 'int', nullable: true })
|
|
11
|
+
member_id: number | null; // Reference to diplomatic_club_card_members (if family member)
|
|
12
|
+
|
|
13
|
+
@Column({ type: 'varchar', length: 255, nullable: false })
|
|
14
|
+
file_name: string;
|
|
15
|
+
|
|
16
|
+
@Column({ type: 'varchar', length: 500, nullable: false })
|
|
17
|
+
file_path: string;
|
|
18
|
+
|
|
19
|
+
@Column({ type: 'varchar', length: 50, nullable: true })
|
|
20
|
+
file_type: string | null; // image/jpeg, image/png, etc.
|
|
21
|
+
|
|
22
|
+
@Column({ type: 'varchar', length: 50, nullable: true })
|
|
23
|
+
attachment_type: string | null; // photo, document, etc.
|
|
24
|
+
}
|
|
25
|
+
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
@Entity({ name: 'diplomatic_club_card_chats' })
|
|
5
|
+
export class DiplomaticClubCardChat extends BaseModel {
|
|
6
|
+
|
|
7
|
+
@Column({ type: 'int', nullable: false })
|
|
8
|
+
request_id: number; // Reference to diplomatic_club_card_requests
|
|
9
|
+
|
|
10
|
+
@Column({ type: 'int', nullable: false })
|
|
11
|
+
user_id: number; // User who sent the message
|
|
12
|
+
|
|
13
|
+
@Column({ type: 'text', nullable: false })
|
|
14
|
+
message: string;
|
|
15
|
+
|
|
16
|
+
@Column({ type: 'varchar', length: 50, nullable: true })
|
|
17
|
+
message_type: string | null; // text, file, etc.
|
|
18
|
+
}
|
|
19
|
+
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
@Entity({ name: 'diplomatic_club_card_members' })
|
|
5
|
+
export class DiplomaticClubCardMembers extends BaseModel {
|
|
6
|
+
|
|
7
|
+
@Column({ type: 'int', nullable: false })
|
|
8
|
+
request_id: number; // Reference to diplomatic_club_card_requests
|
|
9
|
+
|
|
10
|
+
@Column({ type: 'varchar', length: 100, nullable: false })
|
|
11
|
+
member_name: string;
|
|
12
|
+
|
|
13
|
+
@Column({ type: 'varchar', length: 50, nullable: true })
|
|
14
|
+
relation: string | null; // S/O, D/O, W/O, etc.
|
|
15
|
+
|
|
16
|
+
@Column({ type: 'varchar', length: 50, nullable: true })
|
|
17
|
+
membership_id: string | null; // Auto generated
|
|
18
|
+
|
|
19
|
+
@Column({ type: 'varchar', length: 100, nullable: true })
|
|
20
|
+
title: string | null; // S/O (Diplomatic Title), D/O (Diplomatic Title), etc.
|
|
21
|
+
|
|
22
|
+
@Column({ type: 'int', nullable: true })
|
|
23
|
+
diplomatic_title_id: number | null; // Reference to diplomatic_titles master
|
|
24
|
+
|
|
25
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
26
|
+
organization: string | null; // Auto filled as "Foreign Ministry" for family members
|
|
27
|
+
|
|
28
|
+
@Column({ type: 'date', nullable: true })
|
|
29
|
+
expiry_date: Date | null;
|
|
30
|
+
|
|
31
|
+
@Column({ type: 'varchar', length: 500, nullable: true })
|
|
32
|
+
photo: string | null; // Photo URL/path
|
|
33
|
+
|
|
34
|
+
@Column({ type: 'decimal', precision: 10, scale: 2, nullable: true })
|
|
35
|
+
subscription_amount: number | null;
|
|
36
|
+
}
|
|
37
|
+
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
export enum MembershipType {
|
|
5
|
+
SINGLE = "Single",
|
|
6
|
+
FAMILY = "Family"
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export enum RequestStatus {
|
|
10
|
+
PENDING = "Pending",
|
|
11
|
+
APPROVED = "Approved",
|
|
12
|
+
REJECTED = "Rejected",
|
|
13
|
+
IN_PROGRESS = "In Progress"
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export enum RequestType {
|
|
17
|
+
EMPLOYEE_SELF = "Employee Self",
|
|
18
|
+
EMPLOYEE_FAMILY = "Employee Family",
|
|
19
|
+
NON_EMPLOYEE = "Non Employee"
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
@Entity({ name: 'diplomatic_club_card_requests' })
|
|
23
|
+
export class DiplomaticClubCardRequests extends BaseModel {
|
|
24
|
+
|
|
25
|
+
@Column({ type: 'int', nullable: true })
|
|
26
|
+
user_id: number | null; // For employee requests, null for non-employee
|
|
27
|
+
|
|
28
|
+
@Column({ type: 'varchar', length: 50, nullable: false })
|
|
29
|
+
membership_type: MembershipType; // Single or Family
|
|
30
|
+
|
|
31
|
+
@Column({ type: 'enum', enum: RequestType, nullable: false })
|
|
32
|
+
request_type: RequestType; // Employee Self, Employee Family, Non Employee
|
|
33
|
+
|
|
34
|
+
@Column({ type: 'varchar', length: 100, nullable: true })
|
|
35
|
+
member_name: string | null; // For single membership
|
|
36
|
+
|
|
37
|
+
@Column({ type: 'varchar', length: 50, nullable: true })
|
|
38
|
+
membership_id: string | null; // Auto generated
|
|
39
|
+
|
|
40
|
+
@Column({ type: 'int', nullable: true })
|
|
41
|
+
diplomatic_title_id: number | null; // Reference to diplomatic_titles master
|
|
42
|
+
|
|
43
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
44
|
+
organization: string | null; // Auto filled as "Ministry" for employees, manual for non-employees
|
|
45
|
+
|
|
46
|
+
@Column({ type: 'date', nullable: true })
|
|
47
|
+
expiry_date: Date | null;
|
|
48
|
+
|
|
49
|
+
@Column({ type: 'decimal', precision: 10, scale: 2, nullable: true })
|
|
50
|
+
subscription_amount: number | null; // Pulled from master
|
|
51
|
+
|
|
52
|
+
@Column({ type: 'enum', enum: RequestStatus, default: RequestStatus.PENDING, nullable: false })
|
|
53
|
+
status: RequestStatus;
|
|
54
|
+
|
|
55
|
+
@Column({ type: 'int', nullable: true })
|
|
56
|
+
service_id: number | null;
|
|
57
|
+
|
|
58
|
+
@Column({ type: 'int', nullable: true })
|
|
59
|
+
sub_service_id: number | null;
|
|
60
|
+
|
|
61
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
62
|
+
workflow_execution_id: string | null;
|
|
63
|
+
|
|
64
|
+
@Column({ type: 'text', nullable: true })
|
|
65
|
+
notes: string | null;
|
|
66
|
+
|
|
67
|
+
@Column({ type: 'int', nullable: true })
|
|
68
|
+
registered_by_user_id: number | null; // For non-employee registration by diplomatic club staff
|
|
69
|
+
}
|
|
70
|
+
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
export enum DiplomaticClubCardWorkFlowStatus {
|
|
5
|
+
COMPLETED = "Completed",
|
|
6
|
+
NOT_YET_STARTED = "Not Yet Started",
|
|
7
|
+
PENDING = "Pending"
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
@Entity({ name: 'diplomatic_club_card_work_flows' })
|
|
11
|
+
export class DiplomaticClubCardWorkFlow extends BaseModel {
|
|
12
|
+
|
|
13
|
+
@Column({ type: 'int', nullable: false })
|
|
14
|
+
request_id: number; // Reference to diplomatic_club_card_requests
|
|
15
|
+
|
|
16
|
+
@Column({ type: 'int', nullable: false, default: 0 })
|
|
17
|
+
approval_details_id: number; // Reference to diplomatic_club_card_approvals
|
|
18
|
+
|
|
19
|
+
@Column({ type: 'varchar', length: 255, nullable: false })
|
|
20
|
+
content: string;
|
|
21
|
+
|
|
22
|
+
@Column({ type: 'enum', enum: DiplomaticClubCardWorkFlowStatus, default: DiplomaticClubCardWorkFlowStatus.NOT_YET_STARTED, nullable: false })
|
|
23
|
+
status: DiplomaticClubCardWorkFlowStatus;
|
|
24
|
+
}
|
|
25
|
+
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
export enum TitleCategory {
|
|
5
|
+
EMPLOYEE = "Employee",
|
|
6
|
+
NON_EMPLOYEE = "Non Employee"
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
@Entity({ name: 'diplomatic_titles' })
|
|
10
|
+
export class DiplomaticTitles extends BaseModel {
|
|
11
|
+
|
|
12
|
+
@Column({ type: 'varchar', length: 100, nullable: false })
|
|
13
|
+
title_name: string; // Agent or Equivalent, Ambassador, etc.
|
|
14
|
+
|
|
15
|
+
@Column({ type: 'varchar', length: 100, nullable: true })
|
|
16
|
+
title_name_arabic: string | null;
|
|
17
|
+
|
|
18
|
+
@Column({ type: 'enum', enum: TitleCategory, nullable: false })
|
|
19
|
+
category: TitleCategory; // Employee or Non Employee
|
|
20
|
+
|
|
21
|
+
@Column({ type: 'boolean', default: true, nullable: false })
|
|
22
|
+
is_active: boolean;
|
|
23
|
+
|
|
24
|
+
@Column({ type: 'int', nullable: true })
|
|
25
|
+
display_order: number | null;
|
|
26
|
+
}
|
|
27
|
+
|
|
@@ -5,8 +5,7 @@ import { BaseModel } from './BaseModel';
|
|
|
5
5
|
export enum ApprovalStatus {
|
|
6
6
|
PENDING = "Pending",
|
|
7
7
|
APPROVED = "Approved",
|
|
8
|
-
REJECTED = "Rejected"
|
|
9
|
-
IN_PROGRESS = "In Progress"
|
|
8
|
+
REJECTED = "Rejected"
|
|
10
9
|
}
|
|
11
10
|
|
|
12
11
|
//This model is used to store the store the leave apporval details of the user for the leave request
|
|
@@ -24,12 +23,6 @@ export class LeaveApprovalDetails extends BaseModel {
|
|
|
24
23
|
@Column({ type: 'int', nullable: true })
|
|
25
24
|
approver_role_id: number;
|
|
26
25
|
|
|
27
|
-
@Column({ type: 'integer', nullable: true })
|
|
28
|
-
delegate_user_id: number | null;
|
|
29
|
-
|
|
30
|
-
@Column({ type: 'integer', nullable: true })
|
|
31
|
-
approved_by: number | null;
|
|
32
|
-
|
|
33
26
|
@Column({ type: 'int', nullable: true })
|
|
34
27
|
department_id: number;
|
|
35
28
|
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
import { MembershipType } from './DiplomaticClubCardRequestModel';
|
|
4
|
+
|
|
5
|
+
@Entity({ name: 'subscription_amounts' })
|
|
6
|
+
export class SubscriptionAmounts extends BaseModel {
|
|
7
|
+
|
|
8
|
+
@Column({ type: 'enum', enum: MembershipType, nullable: false })
|
|
9
|
+
membership_type: MembershipType; // Single or Family
|
|
10
|
+
|
|
11
|
+
@Column({ type: 'decimal', precision: 10, scale: 2, nullable: false })
|
|
12
|
+
amount: number;
|
|
13
|
+
|
|
14
|
+
@Column({ type: 'varchar', length: 100, nullable: true })
|
|
15
|
+
description: string | null;
|
|
16
|
+
|
|
17
|
+
@Column({ type: 'boolean', default: true, nullable: false })
|
|
18
|
+
is_active: boolean;
|
|
19
|
+
|
|
20
|
+
@Column({ type: 'date', nullable: true })
|
|
21
|
+
effective_from: Date | null;
|
|
22
|
+
|
|
23
|
+
@Column({ type: 'date', nullable: true })
|
|
24
|
+
effective_to: Date | null;
|
|
25
|
+
}
|
|
26
|
+
|