@platform-modules/foreign-ministry 1.3.320 → 1.3.322
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/data-source.js +4 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/models/ChildrensEducationRequestModel.d.ts +1 -0
- package/dist/models/ChildrensEducationRequestModel.js +4 -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/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/MedicalExpensesRequestModel.d.ts +1 -0
- package/dist/models/MedicalExpensesRequestModel.js +4 -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/RecruitmentDomesticWorkersRequestModel.d.ts +1 -0
- package/dist/models/RecruitmentDomesticWorkersRequestModel.js +4 -0
- package/dist/models/SlaApprovalsViewModel.d.ts +31 -0
- package/dist/models/SlaApprovalsViewModel.js +174 -0
- package/dist/models/SlaMyRequestsViewModel.d.ts +29 -0
- package/dist/models/SlaMyRequestsViewModel.js +176 -0
- package/dist/models/TransferAllowanceRequestModel.d.ts +1 -0
- package/dist/models/TransferAllowanceRequestModel.js +4 -0
- package/dist/models/TransferSalaryBankAccountRequestModel.d.ts +1 -0
- package/dist/models/TransferSalaryBankAccountRequestModel.js +4 -0
- package/dist/models/UuidAuditModel.d.ts +9 -0
- package/dist/models/UuidAuditModel.js +41 -0
- package/package.json +25 -24
- package/scripts/check-column-types.js +38 -0
- package/scripts/check-service-tables.js +42 -0
- package/scripts/sync-sla-reports-sql.js +95 -0
- package/sql/sla-reports-sync.manifest.json +7 -0
- package/sql/sla_reports_admin_procedures.sql +283 -0
- package/sql/sla_reports_approvals_workbook.sql +383 -0
- package/sql/sla_reports_procedures.sql +874 -0
- package/sql/vw_sla_approvals.sql +108 -0
- package/sql/vw_sla_my_requests.sql +55 -0
- package/src/data-source.ts +690 -686
- package/src/index.ts +600 -598
- package/src/models/AnnualTravelTicketPriceConfigurationItemModel.ts +36 -36
- package/src/models/AnnualTravelTicketPriceConfigurationModel.ts +35 -35
- package/src/models/AnnualTravelTicketRequestModel.ts +42 -42
- package/src/models/ChildrensEducationRequestModel.ts +3 -0
- package/src/models/DiplomaticAcademyRequestModel.ts +80 -80
- package/src/models/DocumentationFileModel.ts +40 -40
- package/src/models/EmbassyEvaluationCycleModel.ts +38 -38
- 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/FinancialWorkFlowModel.ts +15 -15
- package/src/models/GatePassVisitorsModel.ts +7 -7
- 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/MedicalExpensesRequestModel.ts +3 -0
- 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/PollOptionsModel.ts +26 -26
- package/src/models/PollVotesModel.ts +37 -37
- package/src/models/PollsModel.ts +49 -49
- 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/RecruitmentDomesticWorkersRequestModel.ts +3 -0
- package/src/models/ResignationTerminationApprovalModel.ts +9 -9
- package/src/models/ResignationTerminationRequestModel.ts +17 -17
- package/src/models/SectionModel.ts +35 -35
- package/src/models/ServiceSlaApprovalModel.ts +63 -63
- package/src/models/ServicesNotificationConfigsModel.ts +55 -55
- package/src/models/SlaApprovalsViewModel.ts +135 -0
- package/src/models/SlaMyRequestsViewModel.ts +172 -0
- package/src/models/TelephoneDirectoryModel.ts +20 -20
- package/src/models/TransferAllowanceRequestModel.ts +3 -0
- package/src/models/TransferSalaryBankAccountRequestModel.ts +3 -0
- package/dist/models/EmbassyMasterModel.d.ts +0 -16
- package/dist/models/EmbassyMasterModel.js +0 -75
- package/dist/models/UserDependentsModel.d.ts +0 -18
- package/dist/models/UserDependentsModel.js +0 -94
|
@@ -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
|
-
* Department/section/month evaluation window: which employees are excluded or re-included
|
|
6
|
-
* for that cycle (e.g. excluded in January, eligible again in May via a different month row).
|
|
7
|
-
*/
|
|
8
|
-
@Entity({ name: 'evaluation_eligibility_settings' })
|
|
9
|
-
export class EvaluationEligibilitySetting extends BaseModel {
|
|
10
|
-
@Column({ type: 'int' })
|
|
11
|
-
department_id: number;
|
|
12
|
-
|
|
13
|
-
@Column({ type: 'int' })
|
|
14
|
-
section_id: number;
|
|
15
|
-
|
|
16
|
-
/** Evaluation window start month (1–12). */
|
|
17
|
-
@Column({ type: 'int' })
|
|
18
|
-
from_month: number;
|
|
19
|
-
|
|
20
|
-
/** Evaluation window end month (1–12), inclusive. */
|
|
21
|
-
@Column({ type: 'int' })
|
|
22
|
-
to_month: number;
|
|
23
|
-
|
|
24
|
-
/** Last day of the evaluation month (1–31) when submissions close. */
|
|
25
|
-
@Column({ type: 'int' })
|
|
26
|
-
evaluation_end_date: number;
|
|
27
|
-
|
|
28
|
-
@Column({ type: 'boolean', default: true })
|
|
29
|
-
is_active: boolean;
|
|
30
|
-
|
|
31
|
-
/** Maximum employees allowed in one evaluation request for this dept/section 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 setting’s month/department/section. */
|
|
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
|
+
* Department/section/month evaluation window: which employees are excluded or re-included
|
|
6
|
+
* for that cycle (e.g. excluded in January, eligible again in May via a different month row).
|
|
7
|
+
*/
|
|
8
|
+
@Entity({ name: 'evaluation_eligibility_settings' })
|
|
9
|
+
export class EvaluationEligibilitySetting extends BaseModel {
|
|
10
|
+
@Column({ type: 'int' })
|
|
11
|
+
department_id: number;
|
|
12
|
+
|
|
13
|
+
@Column({ type: 'int' })
|
|
14
|
+
section_id: number;
|
|
15
|
+
|
|
16
|
+
/** Evaluation window start month (1–12). */
|
|
17
|
+
@Column({ type: 'int' })
|
|
18
|
+
from_month: number;
|
|
19
|
+
|
|
20
|
+
/** Evaluation window end month (1–12), inclusive. */
|
|
21
|
+
@Column({ type: 'int' })
|
|
22
|
+
to_month: number;
|
|
23
|
+
|
|
24
|
+
/** Last day of the evaluation month (1–31) when submissions close. */
|
|
25
|
+
@Column({ type: 'int' })
|
|
26
|
+
evaluation_end_date: number;
|
|
27
|
+
|
|
28
|
+
@Column({ type: 'boolean', default: true })
|
|
29
|
+
is_active: boolean;
|
|
30
|
+
|
|
31
|
+
/** Maximum employees allowed in one evaluation request for this dept/section 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 setting’s month/department/section. */
|
|
49
|
+
@Column({ type: 'boolean', default: true })
|
|
50
|
+
is_excluded_from_evaluation: boolean;
|
|
51
|
+
}
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import { Column, Entity, Index, OneToMany } from 'typeorm';
|
|
2
|
-
import { BaseModel } from './BaseModel';
|
|
3
|
-
import { EvaluationFormSection } from './EvaluationFormSectionModel';
|
|
4
|
-
|
|
5
|
-
export enum EvaluationFormType {
|
|
6
|
-
EMPLOYEE_EVALUATION = 'employee_evaluation',
|
|
7
|
-
DEPARTMENT = 'department',
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
@Entity({ name: 'evaluation_forms' })
|
|
11
|
-
@Index('uq_evaluation_forms_form_name', ['form_name'], { unique: true, where: '"is_deleted" = false' })
|
|
12
|
-
@Index('uq_evaluation_forms_form_code', ['form_code'], { unique: true, where: '"is_deleted" = false' })
|
|
13
|
-
@Index('uq_evaluation_forms_dept_section', ['department_id', 'section_id'], {
|
|
14
|
-
unique: true,
|
|
15
|
-
where: `"is_deleted" = false AND form_type = 'department'`,
|
|
16
|
-
})
|
|
17
|
-
export class EvaluationForm extends BaseModel {
|
|
18
|
-
@Column({ type: 'varchar', length: 255, nullable: false })
|
|
19
|
-
form_name: string;
|
|
20
|
-
|
|
21
|
-
@Column({ type: 'varchar', length: 64, nullable: false })
|
|
22
|
-
form_code: string;
|
|
23
|
-
|
|
24
|
-
@Column({ type: 'varchar', length: 32, nullable: false })
|
|
25
|
-
form_type: EvaluationFormType;
|
|
26
|
-
|
|
27
|
-
@Column({ type: 'int', nullable: true })
|
|
28
|
-
department_id: number | null;
|
|
29
|
-
|
|
30
|
-
@Column({ type: 'int', nullable: true })
|
|
31
|
-
section_id: number | null;
|
|
32
|
-
|
|
33
|
-
@Column({ type: 'int', default: 0 })
|
|
34
|
-
min_score: number;
|
|
35
|
-
|
|
36
|
-
@Column({ type: 'int', default: 10 })
|
|
37
|
-
max_score: number;
|
|
38
|
-
|
|
39
|
-
@Column({ type: 'boolean', default: true })
|
|
40
|
-
is_active: boolean;
|
|
41
|
-
|
|
42
|
-
@OneToMany(() => EvaluationFormSection, (s) => s.form)
|
|
43
|
-
sections?: EvaluationFormSection[];
|
|
44
|
-
}
|
|
1
|
+
import { Column, Entity, Index, OneToMany } from 'typeorm';
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
import { EvaluationFormSection } from './EvaluationFormSectionModel';
|
|
4
|
+
|
|
5
|
+
export enum EvaluationFormType {
|
|
6
|
+
EMPLOYEE_EVALUATION = 'employee_evaluation',
|
|
7
|
+
DEPARTMENT = 'department',
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
@Entity({ name: 'evaluation_forms' })
|
|
11
|
+
@Index('uq_evaluation_forms_form_name', ['form_name'], { unique: true, where: '"is_deleted" = false' })
|
|
12
|
+
@Index('uq_evaluation_forms_form_code', ['form_code'], { unique: true, where: '"is_deleted" = false' })
|
|
13
|
+
@Index('uq_evaluation_forms_dept_section', ['department_id', 'section_id'], {
|
|
14
|
+
unique: true,
|
|
15
|
+
where: `"is_deleted" = false AND form_type = 'department'`,
|
|
16
|
+
})
|
|
17
|
+
export class EvaluationForm extends BaseModel {
|
|
18
|
+
@Column({ type: 'varchar', length: 255, nullable: false })
|
|
19
|
+
form_name: string;
|
|
20
|
+
|
|
21
|
+
@Column({ type: 'varchar', length: 64, nullable: false })
|
|
22
|
+
form_code: string;
|
|
23
|
+
|
|
24
|
+
@Column({ type: 'varchar', length: 32, nullable: false })
|
|
25
|
+
form_type: EvaluationFormType;
|
|
26
|
+
|
|
27
|
+
@Column({ type: 'int', nullable: true })
|
|
28
|
+
department_id: number | null;
|
|
29
|
+
|
|
30
|
+
@Column({ type: 'int', nullable: true })
|
|
31
|
+
section_id: number | null;
|
|
32
|
+
|
|
33
|
+
@Column({ type: 'int', default: 0 })
|
|
34
|
+
min_score: number;
|
|
35
|
+
|
|
36
|
+
@Column({ type: 'int', default: 10 })
|
|
37
|
+
max_score: number;
|
|
38
|
+
|
|
39
|
+
@Column({ type: 'boolean', default: true })
|
|
40
|
+
is_active: boolean;
|
|
41
|
+
|
|
42
|
+
@OneToMany(() => EvaluationFormSection, (s) => s.form)
|
|
43
|
+
sections?: EvaluationFormSection[];
|
|
44
|
+
}
|
|
@@ -33,15 +33,15 @@ export class FinancialWorkFlow extends BaseModel {
|
|
|
33
33
|
@Column({ type: 'int', nullable: true })
|
|
34
34
|
approved_by_role_id: number;
|
|
35
35
|
|
|
36
|
-
@Column({ type: 'int', nullable: true })
|
|
37
|
-
step_order: number;
|
|
38
|
-
|
|
39
|
-
@Column({ type: 'varchar', length: 50, nullable: true })
|
|
40
|
-
action: string | null;
|
|
41
|
-
|
|
42
|
-
@ManyToOne(() => FinancialRequests, fr => fr.workflows)
|
|
43
|
-
@JoinColumn({ name: 'financial_request_id' })
|
|
44
|
-
financialRequest?: FinancialRequests;
|
|
36
|
+
@Column({ type: 'int', nullable: true })
|
|
37
|
+
step_order: number;
|
|
38
|
+
|
|
39
|
+
@Column({ type: 'varchar', length: 50, nullable: true })
|
|
40
|
+
action: string | null;
|
|
41
|
+
|
|
42
|
+
@ManyToOne(() => FinancialRequests, fr => fr.workflows)
|
|
43
|
+
@JoinColumn({ name: 'financial_request_id' })
|
|
44
|
+
financialRequest?: FinancialRequests;
|
|
45
45
|
|
|
46
46
|
constructor(
|
|
47
47
|
financial_request_id: number,
|
|
@@ -55,10 +55,10 @@ export class FinancialWorkFlow extends BaseModel {
|
|
|
55
55
|
this.status = status;
|
|
56
56
|
this.approved_by_user_id = approved_by_user_id;
|
|
57
57
|
this.content = content;
|
|
58
|
-
this.financial_approval_id = 0;
|
|
59
|
-
this.activity_date = new Date();
|
|
60
|
-
this.step_order = step_order;
|
|
61
|
-
this.action = null;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
58
|
+
this.financial_approval_id = 0;
|
|
59
|
+
this.activity_date = new Date();
|
|
60
|
+
this.step_order = step_order;
|
|
61
|
+
this.action = null;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
64
|
|
|
@@ -85,10 +85,10 @@ export class GatePassVisitors extends BaseModel {
|
|
|
85
85
|
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
86
86
|
visiting_person_in_department: string | null; // زائر في القسم (Visiting Person in Department)
|
|
87
87
|
|
|
88
|
-
@Column({ type: 'int', nullable: true, unique: true })
|
|
89
|
-
serial_number: number | null;
|
|
90
|
-
|
|
91
|
-
// QR Code for Gate Pass
|
|
88
|
+
@Column({ type: 'int', nullable: true, unique: true })
|
|
89
|
+
serial_number: number | null;
|
|
90
|
+
|
|
91
|
+
// QR Code for Gate Pass
|
|
92
92
|
@Column({ type: 'text', nullable: true })
|
|
93
93
|
qr_code_url: string | null; // QR code URL for this visitor (data URL can be 6000+ characters)
|
|
94
94
|
|
|
@@ -134,9 +134,9 @@ export class GatePassVisitors extends BaseModel {
|
|
|
134
134
|
this.visitor_email_address = visitor_email_address;
|
|
135
135
|
this.visitor_mobile_number = visitor_mobile_number;
|
|
136
136
|
this.visitor_photo_url = visitor_photo_url;
|
|
137
|
-
this.visitor_photo_file_name = visitor_photo_file_name;
|
|
138
|
-
this.serial_number = null;
|
|
139
|
-
this.gate_pass_generated = false;
|
|
137
|
+
this.visitor_photo_file_name = visitor_photo_file_name;
|
|
138
|
+
this.serial_number = null;
|
|
139
|
+
this.gate_pass_generated = false;
|
|
140
140
|
this.email_sent = false;
|
|
141
141
|
}
|
|
142
142
|
}
|
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
import { Column, Entity } from "typeorm";
|
|
2
|
-
import { BaseModel } from './BaseModel';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* One person/trainee per row; multiple rows per request (Request for Individual Training).
|
|
6
|
-
*/
|
|
7
|
-
@Entity({ name: 'lms_external_entity_trained_people' })
|
|
8
|
-
export class LMSExternalEntityTrainedPerson extends BaseModel {
|
|
9
|
-
|
|
10
|
-
@Column({ type: 'int', nullable: false })
|
|
11
|
-
request_id: number;
|
|
12
|
-
|
|
13
|
-
@Column({ type: 'int', nullable: true })
|
|
14
|
-
service_id: number | null;
|
|
15
|
-
|
|
16
|
-
@Column({ type: 'int', nullable: true })
|
|
17
|
-
sub_service_id: number | null;
|
|
18
|
-
|
|
19
|
-
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
20
|
-
full_name: string | null;
|
|
21
|
-
|
|
22
|
-
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
23
|
-
employee_id: string | null;
|
|
24
|
-
|
|
25
|
-
@Column({ type: 'int', nullable: true })
|
|
26
|
-
age: number | null;
|
|
27
|
-
|
|
28
|
-
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
29
|
-
university: string | null;
|
|
30
|
-
|
|
31
|
-
@Column({ type: 'text', nullable: true })
|
|
32
|
-
qualification: string | null;
|
|
33
|
-
|
|
34
|
-
@Column({ type: 'text', nullable: true })
|
|
35
|
-
learning_curriculum: string | null;
|
|
36
|
-
|
|
37
|
-
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
38
|
-
training_period: string | null;
|
|
39
|
-
|
|
40
|
-
@Column({ type: 'boolean', default: false })
|
|
41
|
-
is_selected: boolean;
|
|
42
|
-
|
|
43
|
-
@Column({ type: 'int', default: 0 })
|
|
44
|
-
display_order: number;
|
|
45
|
-
}
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* One person/trainee per row; multiple rows per request (Request for Individual Training).
|
|
6
|
+
*/
|
|
7
|
+
@Entity({ name: 'lms_external_entity_trained_people' })
|
|
8
|
+
export class LMSExternalEntityTrainedPerson extends BaseModel {
|
|
9
|
+
|
|
10
|
+
@Column({ type: 'int', nullable: false })
|
|
11
|
+
request_id: number;
|
|
12
|
+
|
|
13
|
+
@Column({ type: 'int', nullable: true })
|
|
14
|
+
service_id: number | null;
|
|
15
|
+
|
|
16
|
+
@Column({ type: 'int', nullable: true })
|
|
17
|
+
sub_service_id: number | null;
|
|
18
|
+
|
|
19
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
20
|
+
full_name: string | null;
|
|
21
|
+
|
|
22
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
23
|
+
employee_id: string | null;
|
|
24
|
+
|
|
25
|
+
@Column({ type: 'int', nullable: true })
|
|
26
|
+
age: number | null;
|
|
27
|
+
|
|
28
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
29
|
+
university: string | null;
|
|
30
|
+
|
|
31
|
+
@Column({ type: 'text', nullable: true })
|
|
32
|
+
qualification: string | null;
|
|
33
|
+
|
|
34
|
+
@Column({ type: 'text', nullable: true })
|
|
35
|
+
learning_curriculum: string | null;
|
|
36
|
+
|
|
37
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
38
|
+
training_period: string | null;
|
|
39
|
+
|
|
40
|
+
@Column({ type: 'boolean', default: false })
|
|
41
|
+
is_selected: boolean;
|
|
42
|
+
|
|
43
|
+
@Column({ type: 'int', default: 0 })
|
|
44
|
+
display_order: number;
|
|
45
|
+
}
|
|
@@ -1,67 +1,67 @@
|
|
|
1
|
-
import { Column, Entity } from "typeorm";
|
|
2
|
-
import { BaseModel } from './BaseModel';
|
|
3
|
-
|
|
4
|
-
export enum LanguageCourseStatus {
|
|
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: 'language_course_requests' })
|
|
14
|
-
export class LanguageCourseRequests 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
|
-
// Language Course specific columns
|
|
33
|
-
@Column({ type: 'varchar', length: 255, nullable: false })
|
|
34
|
-
course_name: string;
|
|
35
|
-
|
|
36
|
-
@Column({ type: 'varchar', length: 100, nullable: false })
|
|
37
|
-
course_level: string;
|
|
38
|
-
|
|
39
|
-
@Column({ type: 'varchar', length: 255, nullable: false })
|
|
40
|
-
institution: string;
|
|
41
|
-
|
|
42
|
-
@Column({ type: 'text', nullable: false })
|
|
43
|
-
reason_of_course: string;
|
|
44
|
-
|
|
45
|
-
@Column({ type: 'int', nullable: false })
|
|
46
|
-
estimated_number_of_participants: number;
|
|
47
|
-
|
|
48
|
-
// Timeline
|
|
49
|
-
@Column({ type: 'date', nullable: false })
|
|
50
|
-
date_from: Date;
|
|
51
|
-
|
|
52
|
-
@Column({ type: 'date', nullable: false })
|
|
53
|
-
date_to: Date;
|
|
54
|
-
|
|
55
|
-
@Column({ type: 'time', nullable: false })
|
|
56
|
-
time_from: string;
|
|
57
|
-
|
|
58
|
-
@Column({ type: 'time', nullable: false })
|
|
59
|
-
time_to: string;
|
|
60
|
-
|
|
61
|
-
@Column({ type: 'enum', enum: LanguageCourseStatus, default: LanguageCourseStatus.PENDING, nullable: false })
|
|
62
|
-
status: LanguageCourseStatus;
|
|
63
|
-
|
|
64
|
-
@Column({ type: 'varchar', nullable: true })
|
|
65
|
-
workflow_execution_id: string | null;
|
|
66
|
-
|
|
67
|
-
}
|
|
1
|
+
import { Column, Entity } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
export enum LanguageCourseStatus {
|
|
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: 'language_course_requests' })
|
|
14
|
+
export class LanguageCourseRequests 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
|
+
// Language Course specific columns
|
|
33
|
+
@Column({ type: 'varchar', length: 255, nullable: false })
|
|
34
|
+
course_name: string;
|
|
35
|
+
|
|
36
|
+
@Column({ type: 'varchar', length: 100, nullable: false })
|
|
37
|
+
course_level: string;
|
|
38
|
+
|
|
39
|
+
@Column({ type: 'varchar', length: 255, nullable: false })
|
|
40
|
+
institution: string;
|
|
41
|
+
|
|
42
|
+
@Column({ type: 'text', nullable: false })
|
|
43
|
+
reason_of_course: string;
|
|
44
|
+
|
|
45
|
+
@Column({ type: 'int', nullable: false })
|
|
46
|
+
estimated_number_of_participants: number;
|
|
47
|
+
|
|
48
|
+
// Timeline
|
|
49
|
+
@Column({ type: 'date', nullable: false })
|
|
50
|
+
date_from: Date;
|
|
51
|
+
|
|
52
|
+
@Column({ type: 'date', nullable: false })
|
|
53
|
+
date_to: Date;
|
|
54
|
+
|
|
55
|
+
@Column({ type: 'time', nullable: false })
|
|
56
|
+
time_from: string;
|
|
57
|
+
|
|
58
|
+
@Column({ type: 'time', nullable: false })
|
|
59
|
+
time_to: string;
|
|
60
|
+
|
|
61
|
+
@Column({ type: 'enum', enum: LanguageCourseStatus, default: LanguageCourseStatus.PENDING, nullable: false })
|
|
62
|
+
status: LanguageCourseStatus;
|
|
63
|
+
|
|
64
|
+
@Column({ type: 'varchar', nullable: true })
|
|
65
|
+
workflow_execution_id: string | null;
|
|
66
|
+
|
|
67
|
+
}
|