@platform-modules/foreign-ministry 1.3.334 → 1.3.335
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 +9 -4
- package/dist/helpers/sla-request-status.helper.d.ts +3 -0
- package/dist/helpers/sla-request-status.helper.js +36 -0
- package/dist/models/EmbassyEvaluationDepartmentSettingModel.d.ts +14 -0
- package/dist/models/EmbassyEvaluationDepartmentSettingModel.js +56 -0
- package/dist/models/EvaluationMastersModel.d.ts +16 -0
- package/dist/models/EvaluationMastersModel.js +67 -0
- package/dist/models/EvaluationQuestionMasterModel.d.ts +10 -0
- package/dist/models/EvaluationQuestionMasterModel.js +42 -0
- package/dist/models/EvaluationSectionMasterModel.d.ts +7 -0
- package/dist/models/EvaluationSectionMasterModel.js +36 -0
- package/dist/models/EvaluationWorkflowModel.d.ts +60 -0
- package/dist/models/EvaluationWorkflowModel.js +215 -0
- package/dist/models/IneligibleForEvaluationModel.d.ts +8 -0
- package/dist/models/IneligibleForEvaluationModel.js +44 -0
- package/dist/models/MissionTravelClassConfigModel.d.ts +10 -0
- package/dist/models/MissionTravelClassConfigModel.js +50 -0
- package/dist/models/MissionTravelPerdiemModel.d.ts +10 -0
- package/dist/models/MissionTravelPerdiemModel.js +54 -0
- package/dist/models/SlaApprovalsViewModel.js +47 -47
- package/dist/models/SlaMyRequestsViewModel.js +52 -52
- package/dist/models/SlaRequestModel.d.ts +4 -2
- package/dist/models/SlaRequestModel.js +4 -2
- package/dist/models/UuidAuditModel.d.ts +9 -0
- package/dist/models/UuidAuditModel.js +41 -0
- package/package.json +1 -1
- package/scripts/check-column-types.js +38 -38
- package/scripts/check-service-tables.js +42 -42
- package/scripts/sync-sla-reports-sql.js +95 -95
- package/sql/sla-reports-sync.manifest.json +8 -7
- package/sql/sla_reports_admin_procedures.sql +283 -283
- package/sql/sla_reports_approvals_workbook.sql +383 -383
- package/sql/sla_reports_procedures.sql +874 -874
- package/sql/sla_requests_status_to_varchar.sql +28 -0
- package/sql/vw_sla_approvals.sql +108 -108
- package/sql/vw_sla_my_requests.sql +55 -55
- package/src/data-source.ts +686 -686
- package/src/helpers/employee-evaluation-request.utils.ts +178 -178
- package/src/helpers/evaluation-eligibility.utils.ts +126 -126
- package/src/index.ts +617 -617
- package/src/models/DiplomaticAcademyRequestModel.ts +80 -80
- package/src/models/DocumentationFileModel.ts +40 -40
- package/src/models/EmbassyEvaluationCycleModel.ts +45 -45
- package/src/models/EmbassyEvaluationRequestModel.ts +59 -59
- package/src/models/EmployeeEvaluationAnswerModel.ts +26 -26
- package/src/models/EvaluationEligibilitySettingModel.ts +51 -51
- package/src/models/EvaluationFormModel.ts +44 -44
- package/src/models/LMSExternalEntityTrainedPersonModel.ts +45 -45
- package/src/models/LanguageCourseRequestModel.ts +67 -67
- package/src/models/LeaveApprovalsModel.ts +66 -66
- package/src/models/LeaveConfigModel.ts +71 -71
- package/src/models/MissionTravelApprovalModel.ts +101 -101
- package/src/models/MissionTravelAttachmentModel.ts +56 -56
- package/src/models/MissionTravelChatModel.ts +52 -52
- package/src/models/MissionTravelPersonModel.ts +105 -105
- package/src/models/MissionTravelWorkflowModel.ts +54 -54
- package/src/models/ProjectContactsModel.ts +51 -51
- package/src/models/ProjectFaqModel.ts +36 -36
- package/src/models/ProjectInvoicesModel.ts +41 -41
- package/src/models/ProjectModel.ts +75 -75
- package/src/models/ProjectTasksModel.ts +75 -75
- package/src/models/ServiceSlaApprovalModel.ts +63 -63
- package/src/models/ServicesNotificationConfigsModel.ts +55 -55
- package/src/models/SlaApprovalsViewModel.ts +135 -135
- package/src/models/SlaMyRequestsViewModel.ts +172 -172
- package/src/models/SlaRequestModel.ts +57 -55
- package/src/sla-report-views.ts +3 -3
|
@@ -1,80 +1,80 @@
|
|
|
1
|
-
import { Column, Entity } from "typeorm";
|
|
2
|
-
import { BaseModel } from './BaseModel';
|
|
3
|
-
|
|
4
|
-
export enum DiplomaticAcademyStatus {
|
|
5
|
-
SUBMITTED = "Submitted",
|
|
6
|
-
PENDING = "Pending",
|
|
7
|
-
ASSIGNED = "Assigned",
|
|
8
|
-
IN_PROGRESS = "In Progress",
|
|
9
|
-
APPROVED = "Approved",
|
|
10
|
-
REJECTED = "Rejected"
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
@Entity({ name: 'diplomatic_academy_requests' })
|
|
14
|
-
export class DiplomaticAcademyRequests extends BaseModel {
|
|
15
|
-
|
|
16
|
-
// Common columns
|
|
17
|
-
@Column({ type: 'int', nullable: true })
|
|
18
|
-
req_user_department_id: number | null;
|
|
19
|
-
|
|
20
|
-
@Column({ type: 'int', nullable: true })
|
|
21
|
-
req_user_section_id: number | null;
|
|
22
|
-
|
|
23
|
-
@Column({ type: 'int', nullable: true })
|
|
24
|
-
service_id: number | null;
|
|
25
|
-
|
|
26
|
-
@Column({ type: 'int', nullable: true })
|
|
27
|
-
sub_service_id: number | null;
|
|
28
|
-
|
|
29
|
-
@Column({ type: 'int', nullable: false })
|
|
30
|
-
user_id: number;
|
|
31
|
-
|
|
32
|
-
// Diplomatic Academy specific columns
|
|
33
|
-
@Column({ type: 'varchar', length: 500, nullable: false })
|
|
34
|
-
course_name: string;
|
|
35
|
-
|
|
36
|
-
@Column({ type: 'jsonb', nullable: true })
|
|
37
|
-
cost_details: {
|
|
38
|
-
material_price?: number;
|
|
39
|
-
transportation?: number;
|
|
40
|
-
accommodation?: number;
|
|
41
|
-
allowances?: number;
|
|
42
|
-
food?: number;
|
|
43
|
-
present?: number;
|
|
44
|
-
} | null;
|
|
45
|
-
|
|
46
|
-
@Column({ type: 'int', nullable: false })
|
|
47
|
-
estimated_participants: number;
|
|
48
|
-
|
|
49
|
-
@Column({ type: 'date', nullable: false })
|
|
50
|
-
timeline_date_from: Date;
|
|
51
|
-
|
|
52
|
-
@Column({ type: 'date', nullable: false })
|
|
53
|
-
timeline_date_to: Date;
|
|
54
|
-
|
|
55
|
-
@Column({ type: 'time', nullable: true })
|
|
56
|
-
timeline_time_from: string | null;
|
|
57
|
-
|
|
58
|
-
@Column({ type: 'time', nullable: true })
|
|
59
|
-
timeline_time_to: string | null;
|
|
60
|
-
|
|
61
|
-
@Column({ type: 'jsonb', nullable: false })
|
|
62
|
-
participants_details: Array<{
|
|
63
|
-
full_name: string;
|
|
64
|
-
passport: string;
|
|
65
|
-
age: number;
|
|
66
|
-
qualifications: string;
|
|
67
|
-
experience: string;
|
|
68
|
-
institution: string;
|
|
69
|
-
}>;
|
|
70
|
-
|
|
71
|
-
@Column({ type: 'enum', enum: DiplomaticAcademyStatus, default: DiplomaticAcademyStatus.PENDING, nullable: false })
|
|
72
|
-
status: DiplomaticAcademyStatus;
|
|
73
|
-
|
|
74
|
-
@Column({ type: 'int', nullable: true })
|
|
75
|
-
course_id: number | null;
|
|
76
|
-
|
|
77
|
-
@Column({ type: 'varchar', nullable: true })
|
|
78
|
-
workflow_execution_id: string | null;
|
|
79
|
-
|
|
80
|
-
}
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
export enum DiplomaticAcademyStatus {
|
|
5
|
+
SUBMITTED = "Submitted",
|
|
6
|
+
PENDING = "Pending",
|
|
7
|
+
ASSIGNED = "Assigned",
|
|
8
|
+
IN_PROGRESS = "In Progress",
|
|
9
|
+
APPROVED = "Approved",
|
|
10
|
+
REJECTED = "Rejected"
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@Entity({ name: 'diplomatic_academy_requests' })
|
|
14
|
+
export class DiplomaticAcademyRequests extends BaseModel {
|
|
15
|
+
|
|
16
|
+
// Common columns
|
|
17
|
+
@Column({ type: 'int', nullable: true })
|
|
18
|
+
req_user_department_id: number | null;
|
|
19
|
+
|
|
20
|
+
@Column({ type: 'int', nullable: true })
|
|
21
|
+
req_user_section_id: number | null;
|
|
22
|
+
|
|
23
|
+
@Column({ type: 'int', nullable: true })
|
|
24
|
+
service_id: number | null;
|
|
25
|
+
|
|
26
|
+
@Column({ type: 'int', nullable: true })
|
|
27
|
+
sub_service_id: number | null;
|
|
28
|
+
|
|
29
|
+
@Column({ type: 'int', nullable: false })
|
|
30
|
+
user_id: number;
|
|
31
|
+
|
|
32
|
+
// Diplomatic Academy specific columns
|
|
33
|
+
@Column({ type: 'varchar', length: 500, nullable: false })
|
|
34
|
+
course_name: string;
|
|
35
|
+
|
|
36
|
+
@Column({ type: 'jsonb', nullable: true })
|
|
37
|
+
cost_details: {
|
|
38
|
+
material_price?: number;
|
|
39
|
+
transportation?: number;
|
|
40
|
+
accommodation?: number;
|
|
41
|
+
allowances?: number;
|
|
42
|
+
food?: number;
|
|
43
|
+
present?: number;
|
|
44
|
+
} | null;
|
|
45
|
+
|
|
46
|
+
@Column({ type: 'int', nullable: false })
|
|
47
|
+
estimated_participants: number;
|
|
48
|
+
|
|
49
|
+
@Column({ type: 'date', nullable: false })
|
|
50
|
+
timeline_date_from: Date;
|
|
51
|
+
|
|
52
|
+
@Column({ type: 'date', nullable: false })
|
|
53
|
+
timeline_date_to: Date;
|
|
54
|
+
|
|
55
|
+
@Column({ type: 'time', nullable: true })
|
|
56
|
+
timeline_time_from: string | null;
|
|
57
|
+
|
|
58
|
+
@Column({ type: 'time', nullable: true })
|
|
59
|
+
timeline_time_to: string | null;
|
|
60
|
+
|
|
61
|
+
@Column({ type: 'jsonb', nullable: false })
|
|
62
|
+
participants_details: Array<{
|
|
63
|
+
full_name: string;
|
|
64
|
+
passport: string;
|
|
65
|
+
age: number;
|
|
66
|
+
qualifications: string;
|
|
67
|
+
experience: string;
|
|
68
|
+
institution: string;
|
|
69
|
+
}>;
|
|
70
|
+
|
|
71
|
+
@Column({ type: 'enum', enum: DiplomaticAcademyStatus, default: DiplomaticAcademyStatus.PENDING, nullable: false })
|
|
72
|
+
status: DiplomaticAcademyStatus;
|
|
73
|
+
|
|
74
|
+
@Column({ type: 'int', nullable: true })
|
|
75
|
+
course_id: number | null;
|
|
76
|
+
|
|
77
|
+
@Column({ type: 'varchar', nullable: true })
|
|
78
|
+
workflow_execution_id: string | null;
|
|
79
|
+
|
|
80
|
+
}
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
import { Column, Entity } from 'typeorm';
|
|
2
|
-
import { BaseModel } from './BaseModel';
|
|
3
|
-
|
|
4
|
-
@Entity({ name: 'documentation_files' })
|
|
5
|
-
export class DocumentationFile extends BaseModel {
|
|
6
|
-
@Column({ type: 'int', nullable: true })
|
|
7
|
-
project_id: number | null;
|
|
8
|
-
|
|
9
|
-
@Column({ type: 'int' })
|
|
10
|
-
folder_id: number;
|
|
11
|
-
|
|
12
|
-
@Column({ type: 'text', nullable: true })
|
|
13
|
-
file_path: string;
|
|
14
|
-
|
|
15
|
-
@Column({ type: 'varchar', length: 500, nullable: true })
|
|
16
|
-
filename: string;
|
|
17
|
-
|
|
18
|
-
@Column({ type: 'bigint', nullable: true })
|
|
19
|
-
filesize: number;
|
|
20
|
-
|
|
21
|
-
@Column({ type: 'varchar', length: 100, nullable: true })
|
|
22
|
-
filetype: string;
|
|
23
|
-
|
|
24
|
-
constructor(
|
|
25
|
-
project_id?: number | null,
|
|
26
|
-
folder_id?: number,
|
|
27
|
-
file_path?: string,
|
|
28
|
-
filename?: string,
|
|
29
|
-
filesize?: number,
|
|
30
|
-
filetype?: string
|
|
31
|
-
) {
|
|
32
|
-
super();
|
|
33
|
-
this.project_id = project_id ?? null;
|
|
34
|
-
this.folder_id = folder_id ?? 0;
|
|
35
|
-
this.file_path = file_path ?? '';
|
|
36
|
-
this.filename = filename ?? '';
|
|
37
|
-
this.filesize = filesize ?? 0;
|
|
38
|
-
this.filetype = filetype ?? '';
|
|
39
|
-
}
|
|
40
|
-
}
|
|
1
|
+
import { Column, Entity } from 'typeorm';
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
@Entity({ name: 'documentation_files' })
|
|
5
|
+
export class DocumentationFile extends BaseModel {
|
|
6
|
+
@Column({ type: 'int', nullable: true })
|
|
7
|
+
project_id: number | null;
|
|
8
|
+
|
|
9
|
+
@Column({ type: 'int' })
|
|
10
|
+
folder_id: number;
|
|
11
|
+
|
|
12
|
+
@Column({ type: 'text', nullable: true })
|
|
13
|
+
file_path: string;
|
|
14
|
+
|
|
15
|
+
@Column({ type: 'varchar', length: 500, nullable: true })
|
|
16
|
+
filename: string;
|
|
17
|
+
|
|
18
|
+
@Column({ type: 'bigint', nullable: true })
|
|
19
|
+
filesize: number;
|
|
20
|
+
|
|
21
|
+
@Column({ type: 'varchar', length: 100, nullable: true })
|
|
22
|
+
filetype: string;
|
|
23
|
+
|
|
24
|
+
constructor(
|
|
25
|
+
project_id?: number | null,
|
|
26
|
+
folder_id?: number,
|
|
27
|
+
file_path?: string,
|
|
28
|
+
filename?: string,
|
|
29
|
+
filesize?: number,
|
|
30
|
+
filetype?: string
|
|
31
|
+
) {
|
|
32
|
+
super();
|
|
33
|
+
this.project_id = project_id ?? null;
|
|
34
|
+
this.folder_id = folder_id ?? 0;
|
|
35
|
+
this.file_path = file_path ?? '';
|
|
36
|
+
this.filename = filename ?? '';
|
|
37
|
+
this.filesize = filesize ?? 0;
|
|
38
|
+
this.filetype = filetype ?? '';
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
import { Column, Entity } from 'typeorm';
|
|
2
|
-
import { BaseModel } from './BaseModel';
|
|
3
|
-
|
|
4
|
-
export enum EmbassyEvaluationCycleStatus {
|
|
5
|
-
DRAFT = 'Draft',
|
|
6
|
-
ACTIVE = 'Active',
|
|
7
|
-
CLOSED = 'Closed',
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
/** Evaluation period window (month-day stored as MM-DD, year applied at runtime). */
|
|
11
|
-
@Entity({ name: 'embassy_evaluation_cycles' })
|
|
12
|
-
export class EmbassyEvaluationCycle extends BaseModel {
|
|
13
|
-
@Column({ type: 'varchar', length: 255, nullable: false })
|
|
14
|
-
cycle_name: string;
|
|
15
|
-
|
|
16
|
-
/** Start of evaluation window, format MM-DD (e.g. 01-15). */
|
|
17
|
-
@Column({ type: 'varchar', length: 10, nullable: false })
|
|
18
|
-
start_date: string;
|
|
19
|
-
|
|
20
|
-
/** End of evaluation window, format MM-DD. Submissions locked after this date in the active year. */
|
|
21
|
-
@Column({ type: 'varchar', length: 10, nullable: false })
|
|
22
|
-
end_date: string;
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Last day submissions are allowed (MM-DD). Closing reminders use this date.
|
|
26
|
-
* When null, `end_date` is used for submission and reminders.
|
|
27
|
-
*/
|
|
28
|
-
@Column({ type: 'varchar', length: 10, nullable: true })
|
|
29
|
-
last_evaluation_date: string | null;
|
|
30
|
-
|
|
31
|
-
@Column({
|
|
32
|
-
type: 'enum',
|
|
33
|
-
enum: EmbassyEvaluationCycleStatus,
|
|
34
|
-
enumName: 'embassy_eval_cycle_status_enum',
|
|
35
|
-
default: EmbassyEvaluationCycleStatus.DRAFT,
|
|
36
|
-
nullable: false,
|
|
37
|
-
})
|
|
38
|
-
status: EmbassyEvaluationCycleStatus;
|
|
39
|
-
|
|
40
|
-
@Column({ type: 'int', nullable: true })
|
|
41
|
-
service_id: number | null;
|
|
42
|
-
|
|
43
|
-
@Column({ type: 'int', nullable: true })
|
|
44
|
-
sub_service_id: number | null;
|
|
45
|
-
}
|
|
1
|
+
import { Column, Entity } from 'typeorm';
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
export enum EmbassyEvaluationCycleStatus {
|
|
5
|
+
DRAFT = 'Draft',
|
|
6
|
+
ACTIVE = 'Active',
|
|
7
|
+
CLOSED = 'Closed',
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/** Evaluation period window (month-day stored as MM-DD, year applied at runtime). */
|
|
11
|
+
@Entity({ name: 'embassy_evaluation_cycles' })
|
|
12
|
+
export class EmbassyEvaluationCycle extends BaseModel {
|
|
13
|
+
@Column({ type: 'varchar', length: 255, nullable: false })
|
|
14
|
+
cycle_name: string;
|
|
15
|
+
|
|
16
|
+
/** Start of evaluation window, format MM-DD (e.g. 01-15). */
|
|
17
|
+
@Column({ type: 'varchar', length: 10, nullable: false })
|
|
18
|
+
start_date: string;
|
|
19
|
+
|
|
20
|
+
/** End of evaluation window, format MM-DD. Submissions locked after this date in the active year. */
|
|
21
|
+
@Column({ type: 'varchar', length: 10, nullable: false })
|
|
22
|
+
end_date: string;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Last day submissions are allowed (MM-DD). Closing reminders use this date.
|
|
26
|
+
* When null, `end_date` is used for submission and reminders.
|
|
27
|
+
*/
|
|
28
|
+
@Column({ type: 'varchar', length: 10, nullable: true })
|
|
29
|
+
last_evaluation_date: string | null;
|
|
30
|
+
|
|
31
|
+
@Column({
|
|
32
|
+
type: 'enum',
|
|
33
|
+
enum: EmbassyEvaluationCycleStatus,
|
|
34
|
+
enumName: 'embassy_eval_cycle_status_enum',
|
|
35
|
+
default: EmbassyEvaluationCycleStatus.DRAFT,
|
|
36
|
+
nullable: false,
|
|
37
|
+
})
|
|
38
|
+
status: EmbassyEvaluationCycleStatus;
|
|
39
|
+
|
|
40
|
+
@Column({ type: 'int', nullable: true })
|
|
41
|
+
service_id: number | null;
|
|
42
|
+
|
|
43
|
+
@Column({ type: 'int', nullable: true })
|
|
44
|
+
sub_service_id: number | null;
|
|
45
|
+
}
|
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
import { Column, Entity } from 'typeorm';
|
|
2
|
-
import { BaseModel } from './BaseModel';
|
|
3
|
-
|
|
4
|
-
export enum EmbassyEvaluationRequestStatus {
|
|
5
|
-
PENDING = 'Pending',
|
|
6
|
-
IN_PROGRESS = 'In Progress',
|
|
7
|
-
APPROVED = 'Approved',
|
|
8
|
-
REJECTED = 'Rejected',
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
/** Consolidated approval request when all departments complete evaluations for all embassies in a cycle. */
|
|
12
|
-
@Entity({ name: 'embassy_evaluation_requests' })
|
|
13
|
-
export class EmbassyEvaluationRequests extends BaseModel {
|
|
14
|
-
@Column({ type: 'int', nullable: false })
|
|
15
|
-
cycle_id: number;
|
|
16
|
-
|
|
17
|
-
/** Same cycle template can run each calendar year; year is set at activation (assignments), not on cycle. */
|
|
18
|
-
@Column({ type: 'int', nullable: true })
|
|
19
|
-
evaluation_year: number | null;
|
|
20
|
-
|
|
21
|
-
@Column({ type: 'jsonb', nullable: false })
|
|
22
|
-
embassy_ids: number[];
|
|
23
|
-
|
|
24
|
-
@Column({ type: 'int', nullable: true })
|
|
25
|
-
req_user_department_id: number | null;
|
|
26
|
-
|
|
27
|
-
@Column({ type: 'int', nullable: true })
|
|
28
|
-
req_user_section_id: number | null;
|
|
29
|
-
|
|
30
|
-
@Column({ type: 'int', nullable: true })
|
|
31
|
-
service_id: number | null;
|
|
32
|
-
|
|
33
|
-
@Column({ type: 'int', nullable: true })
|
|
34
|
-
sub_service_id: number | null;
|
|
35
|
-
|
|
36
|
-
@Column({ type: 'int', nullable: false })
|
|
37
|
-
user_id: number;
|
|
38
|
-
|
|
39
|
-
@Column({ type: 'int', nullable: false, default: 0 })
|
|
40
|
-
total_assignments: number;
|
|
41
|
-
|
|
42
|
-
@Column({ type: 'int', nullable: false, default: 0 })
|
|
43
|
-
submitted_assignments: number;
|
|
44
|
-
|
|
45
|
-
@Column({
|
|
46
|
-
type: 'enum',
|
|
47
|
-
enum: EmbassyEvaluationRequestStatus,
|
|
48
|
-
enumName: 'embassy_evaluation_request_status_enum',
|
|
49
|
-
default: EmbassyEvaluationRequestStatus.PENDING,
|
|
50
|
-
nullable: false,
|
|
51
|
-
})
|
|
52
|
-
status: EmbassyEvaluationRequestStatus;
|
|
53
|
-
|
|
54
|
-
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
55
|
-
workflow_execution_id: string | null;
|
|
56
|
-
|
|
57
|
-
@Column({ type: 'text', nullable: true })
|
|
58
|
-
comments: string | null;
|
|
59
|
-
}
|
|
1
|
+
import { Column, Entity } from 'typeorm';
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
export enum EmbassyEvaluationRequestStatus {
|
|
5
|
+
PENDING = 'Pending',
|
|
6
|
+
IN_PROGRESS = 'In Progress',
|
|
7
|
+
APPROVED = 'Approved',
|
|
8
|
+
REJECTED = 'Rejected',
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/** Consolidated approval request when all departments complete evaluations for all embassies in a cycle. */
|
|
12
|
+
@Entity({ name: 'embassy_evaluation_requests' })
|
|
13
|
+
export class EmbassyEvaluationRequests extends BaseModel {
|
|
14
|
+
@Column({ type: 'int', nullable: false })
|
|
15
|
+
cycle_id: number;
|
|
16
|
+
|
|
17
|
+
/** Same cycle template can run each calendar year; year is set at activation (assignments), not on cycle. */
|
|
18
|
+
@Column({ type: 'int', nullable: true })
|
|
19
|
+
evaluation_year: number | null;
|
|
20
|
+
|
|
21
|
+
@Column({ type: 'jsonb', nullable: false })
|
|
22
|
+
embassy_ids: number[];
|
|
23
|
+
|
|
24
|
+
@Column({ type: 'int', nullable: true })
|
|
25
|
+
req_user_department_id: number | null;
|
|
26
|
+
|
|
27
|
+
@Column({ type: 'int', nullable: true })
|
|
28
|
+
req_user_section_id: number | null;
|
|
29
|
+
|
|
30
|
+
@Column({ type: 'int', nullable: true })
|
|
31
|
+
service_id: number | null;
|
|
32
|
+
|
|
33
|
+
@Column({ type: 'int', nullable: true })
|
|
34
|
+
sub_service_id: number | null;
|
|
35
|
+
|
|
36
|
+
@Column({ type: 'int', nullable: false })
|
|
37
|
+
user_id: number;
|
|
38
|
+
|
|
39
|
+
@Column({ type: 'int', nullable: false, default: 0 })
|
|
40
|
+
total_assignments: number;
|
|
41
|
+
|
|
42
|
+
@Column({ type: 'int', nullable: false, default: 0 })
|
|
43
|
+
submitted_assignments: number;
|
|
44
|
+
|
|
45
|
+
@Column({
|
|
46
|
+
type: 'enum',
|
|
47
|
+
enum: EmbassyEvaluationRequestStatus,
|
|
48
|
+
enumName: 'embassy_evaluation_request_status_enum',
|
|
49
|
+
default: EmbassyEvaluationRequestStatus.PENDING,
|
|
50
|
+
nullable: false,
|
|
51
|
+
})
|
|
52
|
+
status: EmbassyEvaluationRequestStatus;
|
|
53
|
+
|
|
54
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
55
|
+
workflow_execution_id: string | null;
|
|
56
|
+
|
|
57
|
+
@Column({ type: 'text', nullable: true })
|
|
58
|
+
comments: string | null;
|
|
59
|
+
}
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { Column, Entity } from 'typeorm';
|
|
2
|
-
import { BaseModel } from './BaseModel';
|
|
3
|
-
|
|
4
|
-
@Entity({ name: 'employee_evaluation_answers' })
|
|
5
|
-
export class EmployeeEvaluationAnswers extends BaseModel {
|
|
6
|
-
@Column({ type: 'integer', nullable: false })
|
|
7
|
-
request_id: number;
|
|
8
|
-
|
|
9
|
-
@Column({ type: 'integer', nullable: false })
|
|
10
|
-
user_id: number;
|
|
11
|
-
|
|
12
|
-
@Column({ type: 'integer', nullable: false })
|
|
13
|
-
form_id: number;
|
|
14
|
-
|
|
15
|
-
@Column({ type: 'integer', nullable: false })
|
|
16
|
-
section_id: number;
|
|
17
|
-
|
|
18
|
-
@Column({ type: 'integer', nullable: false })
|
|
19
|
-
question_id: number;
|
|
20
|
-
|
|
21
|
-
@Column({ type: 'integer', nullable: false })
|
|
22
|
-
score: number;
|
|
23
|
-
|
|
24
|
-
@Column({ type: 'text', nullable: true })
|
|
25
|
-
remarks: string | null;
|
|
26
|
-
}
|
|
1
|
+
import { Column, Entity } from 'typeorm';
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
@Entity({ name: 'employee_evaluation_answers' })
|
|
5
|
+
export class EmployeeEvaluationAnswers extends BaseModel {
|
|
6
|
+
@Column({ type: 'integer', nullable: false })
|
|
7
|
+
request_id: number;
|
|
8
|
+
|
|
9
|
+
@Column({ type: 'integer', nullable: false })
|
|
10
|
+
user_id: number;
|
|
11
|
+
|
|
12
|
+
@Column({ type: 'integer', nullable: false })
|
|
13
|
+
form_id: number;
|
|
14
|
+
|
|
15
|
+
@Column({ type: 'integer', nullable: false })
|
|
16
|
+
section_id: number;
|
|
17
|
+
|
|
18
|
+
@Column({ type: 'integer', nullable: false })
|
|
19
|
+
question_id: number;
|
|
20
|
+
|
|
21
|
+
@Column({ type: 'integer', nullable: false })
|
|
22
|
+
score: number;
|
|
23
|
+
|
|
24
|
+
@Column({ type: 'text', nullable: true })
|
|
25
|
+
remarks: string | null;
|
|
26
|
+
}
|
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
import { Column, Entity, JoinColumn, ManyToOne, OneToMany } from 'typeorm';
|
|
2
|
-
import { BaseModel } from './BaseModel';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Cycle-based evaluation exception list: defines the evaluation window (MM-DD dates),
|
|
6
|
-
* last submission day, and employees excluded from evaluation for that cycle.
|
|
7
|
-
*/
|
|
8
|
-
@Entity({ name: 'evaluation_eligibility_settings' })
|
|
9
|
-
export class EvaluationEligibilitySetting extends BaseModel {
|
|
10
|
-
@Column({ type: 'varchar', length: 255 })
|
|
11
|
-
cycle_name: string;
|
|
12
|
-
|
|
13
|
-
@Column({ type: 'varchar', length: 100 })
|
|
14
|
-
cycle_code: string;
|
|
15
|
-
|
|
16
|
-
/** Evaluation window start date as MM-DD (e.g. 01-01). */
|
|
17
|
-
@Column({ type: 'varchar', length: 5 })
|
|
18
|
-
from_month: string;
|
|
19
|
-
|
|
20
|
-
/** Evaluation window end date as MM-DD (e.g. 05-31), inclusive. */
|
|
21
|
-
@Column({ type: 'varchar', length: 5 })
|
|
22
|
-
to_month: string;
|
|
23
|
-
|
|
24
|
-
/** Last submission date as MM-DD; day applies each month in the window (e.g. 04-12 → through the 12th). */
|
|
25
|
-
@Column({ type: 'varchar', length: 5 })
|
|
26
|
-
evaluation_end_date: string;
|
|
27
|
-
|
|
28
|
-
@Column({ type: 'boolean', default: true })
|
|
29
|
-
is_active: boolean;
|
|
30
|
-
|
|
31
|
-
/** Maximum employees allowed in one evaluation request for this cycle window. */
|
|
32
|
-
@Column({ type: 'int', default: 50 })
|
|
33
|
-
max_employees_per_request: number;
|
|
34
|
-
|
|
35
|
-
@OneToMany(() => EvaluationEligibilitySettingEmployee, (e) => e.evaluation_eligibility_setting)
|
|
36
|
-
employees?: EvaluationEligibilitySettingEmployee[];
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
@Entity({ name: 'evaluation_eligibility_setting_employees' })
|
|
40
|
-
export class EvaluationEligibilitySettingEmployee extends BaseModel {
|
|
41
|
-
@ManyToOne(() => EvaluationEligibilitySetting, (s) => s.employees, { onDelete: 'CASCADE' })
|
|
42
|
-
@JoinColumn({ name: 'setting_id' })
|
|
43
|
-
evaluation_eligibility_setting: EvaluationEligibilitySetting;
|
|
44
|
-
|
|
45
|
-
@Column({ type: 'int' })
|
|
46
|
-
employee_id: number;
|
|
47
|
-
|
|
48
|
-
/** When true, employee is excluded from evaluation for this cycle window. */
|
|
49
|
-
@Column({ type: 'boolean', default: true })
|
|
50
|
-
is_excluded_from_evaluation: boolean;
|
|
51
|
-
}
|
|
1
|
+
import { Column, Entity, JoinColumn, ManyToOne, OneToMany } from 'typeorm';
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Cycle-based evaluation exception list: defines the evaluation window (MM-DD dates),
|
|
6
|
+
* last submission day, and employees excluded from evaluation for that cycle.
|
|
7
|
+
*/
|
|
8
|
+
@Entity({ name: 'evaluation_eligibility_settings' })
|
|
9
|
+
export class EvaluationEligibilitySetting extends BaseModel {
|
|
10
|
+
@Column({ type: 'varchar', length: 255 })
|
|
11
|
+
cycle_name: string;
|
|
12
|
+
|
|
13
|
+
@Column({ type: 'varchar', length: 100 })
|
|
14
|
+
cycle_code: string;
|
|
15
|
+
|
|
16
|
+
/** Evaluation window start date as MM-DD (e.g. 01-01). */
|
|
17
|
+
@Column({ type: 'varchar', length: 5 })
|
|
18
|
+
from_month: string;
|
|
19
|
+
|
|
20
|
+
/** Evaluation window end date as MM-DD (e.g. 05-31), inclusive. */
|
|
21
|
+
@Column({ type: 'varchar', length: 5 })
|
|
22
|
+
to_month: string;
|
|
23
|
+
|
|
24
|
+
/** Last submission date as MM-DD; day applies each month in the window (e.g. 04-12 → through the 12th). */
|
|
25
|
+
@Column({ type: 'varchar', length: 5 })
|
|
26
|
+
evaluation_end_date: string;
|
|
27
|
+
|
|
28
|
+
@Column({ type: 'boolean', default: true })
|
|
29
|
+
is_active: boolean;
|
|
30
|
+
|
|
31
|
+
/** Maximum employees allowed in one evaluation request for this cycle window. */
|
|
32
|
+
@Column({ type: 'int', default: 50 })
|
|
33
|
+
max_employees_per_request: number;
|
|
34
|
+
|
|
35
|
+
@OneToMany(() => EvaluationEligibilitySettingEmployee, (e) => e.evaluation_eligibility_setting)
|
|
36
|
+
employees?: EvaluationEligibilitySettingEmployee[];
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
@Entity({ name: 'evaluation_eligibility_setting_employees' })
|
|
40
|
+
export class EvaluationEligibilitySettingEmployee extends BaseModel {
|
|
41
|
+
@ManyToOne(() => EvaluationEligibilitySetting, (s) => s.employees, { onDelete: 'CASCADE' })
|
|
42
|
+
@JoinColumn({ name: 'setting_id' })
|
|
43
|
+
evaluation_eligibility_setting: EvaluationEligibilitySetting;
|
|
44
|
+
|
|
45
|
+
@Column({ type: 'int' })
|
|
46
|
+
employee_id: number;
|
|
47
|
+
|
|
48
|
+
/** When true, employee is excluded from evaluation for this cycle window. */
|
|
49
|
+
@Column({ type: 'boolean', default: true })
|
|
50
|
+
is_excluded_from_evaluation: boolean;
|
|
51
|
+
}
|