@platform-modules/foreign-ministry 1.3.355 → 1.3.359

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.
Files changed (83) hide show
  1. package/dist/auth/authenticate-jwt-session.d.ts +19 -0
  2. package/dist/auth/authenticate-jwt-session.js +35 -0
  3. package/dist/auth/jwt-token.helper.d.ts +18 -0
  4. package/dist/auth/jwt-token.helper.js +58 -0
  5. package/dist/auth/user-session-validation.d.ts +42 -0
  6. package/dist/auth/user-session-validation.js +95 -0
  7. package/dist/helpers/employee-evaluation-request.utils.d.ts +12 -0
  8. package/dist/helpers/employee-evaluation-request.utils.js +85 -0
  9. package/dist/i18n/workflow-chat-i18n.d.ts +5 -0
  10. package/dist/i18n/workflow-chat-i18n.js +21 -0
  11. package/dist/i18n/workflow-chat-i18n.json +320 -0
  12. package/dist/i18n/workflow-chat-message.builder.d.ts +325 -0
  13. package/dist/i18n/workflow-chat-message.builder.js +924 -0
  14. package/dist/index.d.ts +1 -1
  15. package/dist/index.js +4 -3
  16. package/dist/models/InitiatorEmployeeNominationRequestModel.d.ts +2 -1
  17. package/dist/models/InitiatorEmployeeNominationRequestModel.js +3 -3
  18. package/dist/models/ProjectTasksModel.d.ts +1 -1
  19. package/dist/models/ProjectTasksModel.js +1 -1
  20. package/dist/models/SlaApprovalsViewModel.js +54 -54
  21. package/dist/models/SlaMyRequestsViewModel.js +57 -57
  22. package/package.json +2 -2
  23. package/scripts/check-column-types.js +38 -38
  24. package/scripts/check-service-tables.js +42 -42
  25. package/scripts/sync-sla-reports-sql.js +92 -92
  26. package/sql/initiator_employee_nomination_initiator_id.sql +12 -0
  27. package/sql/sla-reports-sync.manifest.json +9 -9
  28. package/sql/sla_reports_admin_procedures.sql +321 -322
  29. package/sql/sla_reports_approvals_workbook.sql +427 -430
  30. package/sql/sla_reports_procedures.sql +883 -886
  31. package/sql/sla_requests_status_to_varchar.sql +28 -28
  32. package/sql/vw_sla_approvals.sql +115 -115
  33. package/sql/vw_sla_my_requests.sql +60 -60
  34. package/src/helpers/employee-evaluation-request.utils.ts +127 -0
  35. package/src/helpers/evaluation-eligibility.utils.ts +126 -126
  36. package/src/index.ts +1 -0
  37. package/src/models/DiplomaticAcademyRequestModel.ts +80 -80
  38. package/src/models/DocumentationFileModel.ts +40 -40
  39. package/src/models/EmbassyEvaluationCycleModel.ts +45 -45
  40. package/src/models/EmbassyEvaluationRequestModel.ts +59 -59
  41. package/src/models/EmployeeEvaluationAnswerModel.ts +26 -26
  42. package/src/models/EvaluationEligibilitySettingModel.ts +51 -51
  43. package/src/models/EvaluationFormModel.ts +44 -44
  44. package/src/models/InitiatorEmployeeNominationRequestModel.ts +3 -2
  45. package/src/models/LanguageCourseRequestModel.ts +67 -67
  46. package/src/models/LeaveApprovalsModel.ts +66 -66
  47. package/src/models/LeaveConfigModel.ts +71 -71
  48. package/src/models/MissionTravelApprovalModel.ts +101 -101
  49. package/src/models/MissionTravelAttachmentModel.ts +56 -56
  50. package/src/models/MissionTravelChatModel.ts +52 -52
  51. package/src/models/MissionTravelPersonModel.ts +105 -105
  52. package/src/models/MissionTravelWorkflowModel.ts +54 -54
  53. package/src/models/ProjectContactsModel.ts +51 -51
  54. package/src/models/ProjectFaqModel.ts +36 -36
  55. package/src/models/ProjectInvoicesModel.ts +41 -41
  56. package/src/models/ProjectModel.ts +75 -75
  57. package/src/models/ProjectTasksModel.ts +75 -75
  58. package/src/models/ServiceSlaApprovalModel.ts +63 -63
  59. package/src/models/ServicesNotificationConfigsModel.ts +55 -55
  60. package/src/models/SlaApprovalsViewModel.ts +142 -142
  61. package/src/models/SlaMyRequestsViewModel.ts +192 -192
  62. package/src/models/SlaRequestModel.ts +57 -57
  63. package/src/sla-report-views.ts +3 -3
  64. package/dist/helpers/sla-request-status.helper.d.ts +0 -3
  65. package/dist/helpers/sla-request-status.helper.js +0 -36
  66. package/dist/models/EmbassyEvaluationDepartmentSettingModel.d.ts +0 -14
  67. package/dist/models/EmbassyEvaluationDepartmentSettingModel.js +0 -56
  68. package/dist/models/EvaluationMastersModel.d.ts +0 -16
  69. package/dist/models/EvaluationMastersModel.js +0 -67
  70. package/dist/models/EvaluationQuestionMasterModel.d.ts +0 -10
  71. package/dist/models/EvaluationQuestionMasterModel.js +0 -42
  72. package/dist/models/EvaluationSectionMasterModel.d.ts +0 -7
  73. package/dist/models/EvaluationSectionMasterModel.js +0 -36
  74. package/dist/models/EvaluationWorkflowModel.d.ts +0 -60
  75. package/dist/models/EvaluationWorkflowModel.js +0 -215
  76. package/dist/models/IneligibleForEvaluationModel.d.ts +0 -8
  77. package/dist/models/IneligibleForEvaluationModel.js +0 -44
  78. package/dist/models/MissionTravelClassConfigModel.d.ts +0 -10
  79. package/dist/models/MissionTravelClassConfigModel.js +0 -50
  80. package/dist/models/MissionTravelPerdiemModel.d.ts +0 -10
  81. package/dist/models/MissionTravelPerdiemModel.js +0 -54
  82. package/dist/models/UuidAuditModel.d.ts +0 -9
  83. package/dist/models/UuidAuditModel.js +0 -41
@@ -1,57 +1,57 @@
1
- import { Column, Entity, Index } from "typeorm";
2
- import { BaseModel } from "./BaseModel";
3
-
4
- export enum SlaRequestStatus {
5
- PENDING = "Pending",
6
- IN_PROGRESS = "In Progress",
7
- APPROVED = "Approved",
8
- REJECTED = "Rejected",
9
- ASSIGNED = "Assigned",
10
- COMPLETED = "Completed"
11
- }
12
-
13
- @Entity({ name: "sla_requests" })
14
- // @Index("uq_sla_requests_request_id", ["request_id"])
15
- @Index("idx_sla_requests_user_id", ["user_id"])
16
- @Index("idx_sla_requests_service_subservice", ["service_id", "sub_service_id"])
17
- @Index("idx_sla_requests_workflow_execution_id", ["workflow_execution_id"])
18
- @Index("idx_sla_requests_status", ["status"])
19
- export class SlaRequest extends BaseModel {
20
- @Column({ type: "int", nullable: true })
21
- req_user_department_id: number | null;
22
-
23
- @Column({ type: "int", nullable: true })
24
- req_user_section_id: number | null;
25
-
26
- @Column({ type: "int", nullable: true })
27
- service_id: number | null;
28
-
29
- @Column({ type: "int", nullable: true })
30
- sub_service_id: number | null;
31
-
32
- @Column({ type: "int", nullable: false })
33
- user_id: number;
34
-
35
- @Column({
36
- type: "varchar",
37
- length: 64,
38
- default: SlaRequestStatus.PENDING,
39
- nullable: false
40
- })
41
- status: string;
42
-
43
- @Column({ type: "varchar", length: 255, nullable: true })
44
- workflow_execution_id: string | null;
45
-
46
- @Column({ type: "int", nullable: false })
47
- request_id: number;
48
-
49
- @Column({ type: "jsonb", nullable: false, default: () => "'{}'::jsonb" })
50
- request_obj: Record<string, unknown>;
51
-
52
- constructor() {
53
- super();
54
- this.request_id = 0;
55
- this.request_obj = {};
56
- }
57
- }
1
+ import { Column, Entity, Index } from "typeorm";
2
+ import { BaseModel } from "./BaseModel";
3
+
4
+ export enum SlaRequestStatus {
5
+ PENDING = "Pending",
6
+ IN_PROGRESS = "In Progress",
7
+ APPROVED = "Approved",
8
+ REJECTED = "Rejected",
9
+ ASSIGNED = "Assigned",
10
+ COMPLETED = "Completed"
11
+ }
12
+
13
+ @Entity({ name: "sla_requests" })
14
+ // @Index("uq_sla_requests_request_id", ["request_id"])
15
+ @Index("idx_sla_requests_user_id", ["user_id"])
16
+ @Index("idx_sla_requests_service_subservice", ["service_id", "sub_service_id"])
17
+ @Index("idx_sla_requests_workflow_execution_id", ["workflow_execution_id"])
18
+ @Index("idx_sla_requests_status", ["status"])
19
+ export class SlaRequest extends BaseModel {
20
+ @Column({ type: "int", nullable: true })
21
+ req_user_department_id: number | null;
22
+
23
+ @Column({ type: "int", nullable: true })
24
+ req_user_section_id: number | null;
25
+
26
+ @Column({ type: "int", nullable: true })
27
+ service_id: number | null;
28
+
29
+ @Column({ type: "int", nullable: true })
30
+ sub_service_id: number | null;
31
+
32
+ @Column({ type: "int", nullable: false })
33
+ user_id: number;
34
+
35
+ @Column({
36
+ type: "varchar",
37
+ length: 64,
38
+ default: SlaRequestStatus.PENDING,
39
+ nullable: false
40
+ })
41
+ status: string;
42
+
43
+ @Column({ type: "varchar", length: 255, nullable: true })
44
+ workflow_execution_id: string | null;
45
+
46
+ @Column({ type: "int", nullable: false })
47
+ request_id: number;
48
+
49
+ @Column({ type: "jsonb", nullable: false, default: () => "'{}'::jsonb" })
50
+ request_obj: Record<string, unknown>;
51
+
52
+ constructor() {
53
+ super();
54
+ this.request_id = 0;
55
+ this.request_obj = {};
56
+ }
57
+ }
@@ -1,3 +1,3 @@
1
- /** SLA report views — import from `@platform-modules/foreign-ministry/sla-report-views` (Reports_Service only). Not in main index to avoid TypeORM synchronize conflicts. */
2
- export * from './models/SlaMyRequestsViewModel';
3
- export * from './models/SlaApprovalsViewModel';
1
+ /** SLA report views — import from `@platform-modules/foreign-ministry/sla-report-views` (Reports_Service only). Not in main index to avoid TypeORM synchronize conflicts. */
2
+ export * from './models/SlaMyRequestsViewModel';
3
+ export * from './models/SlaApprovalsViewModel';
@@ -1,3 +0,0 @@
1
- export declare function resolveSlaRequestStatusFromNative(nativeStatus: unknown, fallback?: string): string;
2
- /** Maps portal/native request status to a value stored on `sla_requests.status`. */
3
- export declare function mapPortalRequestStatusToSla(status: string): string | null;
@@ -1,36 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.resolveSlaRequestStatusFromNative = resolveSlaRequestStatusFromNative;
4
- exports.mapPortalRequestStatusToSla = mapPortalRequestStatusToSla;
5
- const SlaRequestModel_1 = require("../models/SlaRequestModel");
6
- const SLA_MIRROR_STATUS_CANONICAL = {
7
- pending: SlaRequestModel_1.SlaRequestStatus.PENDING,
8
- "in progress": SlaRequestModel_1.SlaRequestStatus.IN_PROGRESS,
9
- approved: SlaRequestModel_1.SlaRequestStatus.APPROVED,
10
- rejected: SlaRequestModel_1.SlaRequestStatus.REJECTED,
11
- assigned: SlaRequestModel_1.SlaRequestStatus.ASSIGNED,
12
- completed: SlaRequestModel_1.SlaRequestStatus.COMPLETED,
13
- closed: "Closed",
14
- returned: "Returned",
15
- rfc: "RFC",
16
- "request for change": "Request For Change"
17
- };
18
- function resolveSlaRequestStatusFromNative(nativeStatus, fallback = SlaRequestModel_1.SlaRequestStatus.PENDING) {
19
- const trimmed = String(nativeStatus ?? "").trim();
20
- if (!trimmed) {
21
- return fallback;
22
- }
23
- const canonical = SLA_MIRROR_STATUS_CANONICAL[trimmed.toLowerCase()];
24
- return canonical ?? trimmed;
25
- }
26
- /** Maps portal/native request status to a value stored on `sla_requests.status`. */
27
- function mapPortalRequestStatusToSla(status) {
28
- const resolved = resolveSlaRequestStatusFromNative(status, "");
29
- if (!resolved) {
30
- return null;
31
- }
32
- if (String(status || "").trim().toLowerCase() === "cancelled") {
33
- return SlaRequestModel_1.SlaRequestStatus.REJECTED;
34
- }
35
- return resolved;
36
- }
@@ -1,14 +0,0 @@
1
- import { BaseModel } from './BaseModel';
2
- export declare enum EmbassyEvaluationDepartmentSettingStatus {
3
- ACTIVE = "Active",
4
- INACTIVE = "Inactive"
5
- }
6
- /** Required department–section pairs that participate in embassy evaluations. */
7
- export declare class EmbassyEvaluationDepartmentSetting extends BaseModel {
8
- department_id: number;
9
- section_id: number;
10
- /** Department evaluation form (EvaluationFormType.DEPARTMENT). */
11
- form_id: number;
12
- is_mandatory: boolean;
13
- status: EmbassyEvaluationDepartmentSettingStatus;
14
- }
@@ -1,56 +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.EmbassyEvaluationDepartmentSetting = exports.EmbassyEvaluationDepartmentSettingStatus = void 0;
13
- const typeorm_1 = require("typeorm");
14
- const BaseModel_1 = require("./BaseModel");
15
- var EmbassyEvaluationDepartmentSettingStatus;
16
- (function (EmbassyEvaluationDepartmentSettingStatus) {
17
- EmbassyEvaluationDepartmentSettingStatus["ACTIVE"] = "Active";
18
- EmbassyEvaluationDepartmentSettingStatus["INACTIVE"] = "Inactive";
19
- })(EmbassyEvaluationDepartmentSettingStatus || (exports.EmbassyEvaluationDepartmentSettingStatus = EmbassyEvaluationDepartmentSettingStatus = {}));
20
- /** Required department–section pairs that participate in embassy evaluations. */
21
- let EmbassyEvaluationDepartmentSetting = class EmbassyEvaluationDepartmentSetting extends BaseModel_1.BaseModel {
22
- };
23
- exports.EmbassyEvaluationDepartmentSetting = EmbassyEvaluationDepartmentSetting;
24
- __decorate([
25
- (0, typeorm_1.Column)({ type: 'int', nullable: false }),
26
- __metadata("design:type", Number)
27
- ], EmbassyEvaluationDepartmentSetting.prototype, "department_id", void 0);
28
- __decorate([
29
- (0, typeorm_1.Column)({ type: 'int', nullable: false }),
30
- __metadata("design:type", Number)
31
- ], EmbassyEvaluationDepartmentSetting.prototype, "section_id", void 0);
32
- __decorate([
33
- (0, typeorm_1.Column)({ type: 'int', nullable: false }),
34
- __metadata("design:type", Number)
35
- ], EmbassyEvaluationDepartmentSetting.prototype, "form_id", void 0);
36
- __decorate([
37
- (0, typeorm_1.Column)({ type: 'boolean', default: true, nullable: false }),
38
- __metadata("design:type", Boolean)
39
- ], EmbassyEvaluationDepartmentSetting.prototype, "is_mandatory", void 0);
40
- __decorate([
41
- (0, typeorm_1.Column)({
42
- type: 'enum',
43
- enum: EmbassyEvaluationDepartmentSettingStatus,
44
- enumName: 'embassy_eval_dept_setting_status_enum',
45
- default: EmbassyEvaluationDepartmentSettingStatus.ACTIVE,
46
- nullable: false,
47
- }),
48
- __metadata("design:type", String)
49
- ], EmbassyEvaluationDepartmentSetting.prototype, "status", void 0);
50
- exports.EmbassyEvaluationDepartmentSetting = EmbassyEvaluationDepartmentSetting = __decorate([
51
- (0, typeorm_1.Entity)({ name: 'embassy_evaluation_department_settings' }),
52
- (0, typeorm_1.Index)('uq_embassy_eval_dept_setting', ['department_id', 'section_id'], {
53
- unique: true,
54
- where: '"is_deleted" = false',
55
- })
56
- ], EmbassyEvaluationDepartmentSetting);
@@ -1,16 +0,0 @@
1
- import { BaseModel } from './BaseModel';
2
- export declare class EvaluationSection extends BaseModel {
3
- section_name: string;
4
- section_code: string | null;
5
- sequence: number;
6
- is_active: boolean;
7
- questions?: EvaluationQuestion[];
8
- }
9
- export declare class EvaluationQuestion extends BaseModel {
10
- evaluation_section: EvaluationSection;
11
- question_text: string;
12
- sequence: number;
13
- /** Max score for this question (default 4 per project scale 0–4). */
14
- max_score: number;
15
- is_active: boolean;
16
- }
@@ -1,67 +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.EvaluationQuestion = exports.EvaluationSection = void 0;
13
- const typeorm_1 = require("typeorm");
14
- const BaseModel_1 = require("./BaseModel");
15
- let EvaluationSection = class EvaluationSection extends BaseModel_1.BaseModel {
16
- };
17
- exports.EvaluationSection = EvaluationSection;
18
- __decorate([
19
- (0, typeorm_1.Column)({ type: 'varchar', length: 255 }),
20
- __metadata("design:type", String)
21
- ], EvaluationSection.prototype, "section_name", void 0);
22
- __decorate([
23
- (0, typeorm_1.Column)({ type: 'varchar', length: 64, nullable: true }),
24
- __metadata("design:type", Object)
25
- ], EvaluationSection.prototype, "section_code", void 0);
26
- __decorate([
27
- (0, typeorm_1.Column)({ type: 'int', default: 0 }),
28
- __metadata("design:type", Number)
29
- ], EvaluationSection.prototype, "sequence", void 0);
30
- __decorate([
31
- (0, typeorm_1.Column)({ type: 'boolean', default: true }),
32
- __metadata("design:type", Boolean)
33
- ], EvaluationSection.prototype, "is_active", void 0);
34
- __decorate([
35
- (0, typeorm_1.OneToMany)(() => EvaluationQuestion, (q) => q.evaluation_section),
36
- __metadata("design:type", Array)
37
- ], EvaluationSection.prototype, "questions", void 0);
38
- exports.EvaluationSection = EvaluationSection = __decorate([
39
- (0, typeorm_1.Entity)({ name: 'evaluation_sections' })
40
- ], EvaluationSection);
41
- let EvaluationQuestion = class EvaluationQuestion extends BaseModel_1.BaseModel {
42
- };
43
- exports.EvaluationQuestion = EvaluationQuestion;
44
- __decorate([
45
- (0, typeorm_1.ManyToOne)(() => EvaluationSection, (s) => s.questions, { onDelete: 'CASCADE' }),
46
- (0, typeorm_1.JoinColumn)({ name: 'evaluation_section_id' }),
47
- __metadata("design:type", EvaluationSection)
48
- ], EvaluationQuestion.prototype, "evaluation_section", void 0);
49
- __decorate([
50
- (0, typeorm_1.Column)({ type: 'text' }),
51
- __metadata("design:type", String)
52
- ], EvaluationQuestion.prototype, "question_text", void 0);
53
- __decorate([
54
- (0, typeorm_1.Column)({ type: 'int', default: 0 }),
55
- __metadata("design:type", Number)
56
- ], EvaluationQuestion.prototype, "sequence", void 0);
57
- __decorate([
58
- (0, typeorm_1.Column)({ type: 'int', default: 4 }),
59
- __metadata("design:type", Number)
60
- ], EvaluationQuestion.prototype, "max_score", void 0);
61
- __decorate([
62
- (0, typeorm_1.Column)({ type: 'boolean', default: true }),
63
- __metadata("design:type", Boolean)
64
- ], EvaluationQuestion.prototype, "is_active", void 0);
65
- exports.EvaluationQuestion = EvaluationQuestion = __decorate([
66
- (0, typeorm_1.Entity)({ name: 'evaluation_questions' })
67
- ], EvaluationQuestion);
@@ -1,10 +0,0 @@
1
- import { BaseModel } from './BaseModel';
2
- import { EvaluationSectionMaster } from './EvaluationSectionMasterModel';
3
- export declare class EvaluationQuestionMaster extends BaseModel {
4
- evaluation_section: EvaluationSectionMaster;
5
- question_text: string;
6
- sequence_order: number;
7
- /** Max score for this question (evaluation scale 0–4). */
8
- max_score: number;
9
- is_active: boolean;
10
- }
@@ -1,42 +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.EvaluationQuestionMaster = void 0;
13
- const typeorm_1 = require("typeorm");
14
- const BaseModel_1 = require("./BaseModel");
15
- const EvaluationSectionMasterModel_1 = require("./EvaluationSectionMasterModel");
16
- let EvaluationQuestionMaster = class EvaluationQuestionMaster extends BaseModel_1.BaseModel {
17
- };
18
- exports.EvaluationQuestionMaster = EvaluationQuestionMaster;
19
- __decorate([
20
- (0, typeorm_1.ManyToOne)(() => EvaluationSectionMasterModel_1.EvaluationSectionMaster, { onDelete: 'CASCADE' }),
21
- (0, typeorm_1.JoinColumn)({ name: 'evaluation_section_id' }),
22
- __metadata("design:type", EvaluationSectionMasterModel_1.EvaluationSectionMaster)
23
- ], EvaluationQuestionMaster.prototype, "evaluation_section", void 0);
24
- __decorate([
25
- (0, typeorm_1.Column)({ type: 'text', nullable: false }),
26
- __metadata("design:type", String)
27
- ], EvaluationQuestionMaster.prototype, "question_text", void 0);
28
- __decorate([
29
- (0, typeorm_1.Column)({ type: 'int', default: 0 }),
30
- __metadata("design:type", Number)
31
- ], EvaluationQuestionMaster.prototype, "sequence_order", void 0);
32
- __decorate([
33
- (0, typeorm_1.Column)({ type: 'int', default: 4 }),
34
- __metadata("design:type", Number)
35
- ], EvaluationQuestionMaster.prototype, "max_score", void 0);
36
- __decorate([
37
- (0, typeorm_1.Column)({ type: 'boolean', default: true }),
38
- __metadata("design:type", Boolean)
39
- ], EvaluationQuestionMaster.prototype, "is_active", void 0);
40
- exports.EvaluationQuestionMaster = EvaluationQuestionMaster = __decorate([
41
- (0, typeorm_1.Entity)({ name: 'evaluation_question_master' })
42
- ], EvaluationQuestionMaster);
@@ -1,7 +0,0 @@
1
- import { BaseModel } from './BaseModel';
2
- export declare class EvaluationSectionMaster extends BaseModel {
3
- section_code: string;
4
- section_title: string;
5
- sequence_order: number;
6
- is_active: boolean;
7
- }
@@ -1,36 +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.EvaluationSectionMaster = void 0;
13
- const typeorm_1 = require("typeorm");
14
- const BaseModel_1 = require("./BaseModel");
15
- let EvaluationSectionMaster = class EvaluationSectionMaster extends BaseModel_1.BaseModel {
16
- };
17
- exports.EvaluationSectionMaster = EvaluationSectionMaster;
18
- __decorate([
19
- (0, typeorm_1.Column)({ type: 'varchar', length: 64, nullable: false }),
20
- __metadata("design:type", String)
21
- ], EvaluationSectionMaster.prototype, "section_code", void 0);
22
- __decorate([
23
- (0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: false }),
24
- __metadata("design:type", String)
25
- ], EvaluationSectionMaster.prototype, "section_title", void 0);
26
- __decorate([
27
- (0, typeorm_1.Column)({ type: 'int', default: 0 }),
28
- __metadata("design:type", Number)
29
- ], EvaluationSectionMaster.prototype, "sequence_order", void 0);
30
- __decorate([
31
- (0, typeorm_1.Column)({ type: 'boolean', default: true }),
32
- __metadata("design:type", Boolean)
33
- ], EvaluationSectionMaster.prototype, "is_active", void 0);
34
- exports.EvaluationSectionMaster = EvaluationSectionMaster = __decorate([
35
- (0, typeorm_1.Entity)({ name: 'evaluation_section_master' })
36
- ], EvaluationSectionMaster);
@@ -1,60 +0,0 @@
1
- import { BaseModel } from './BaseModel';
2
- /** Request lifecycle */
3
- export type EvaluationRequestStatusValue = 'draft' | 'submitted' | 'in_progress' | 'completed' | 'rejected';
4
- /** Current workflow lane */
5
- export type EvaluationStepKeyValue = 'evaluation_office_1' | 'us_feedback' | 'evaluation_office_2' | 'completed';
6
- export declare class EvaluationRequest extends BaseModel {
7
- user_id: number;
8
- department_id: number;
9
- section_id: number;
10
- evaluation_year: number;
11
- evaluation_period: string;
12
- evaluation_month: number;
13
- status: EvaluationRequestStatusValue;
14
- current_step_key: EvaluationStepKeyValue;
15
- /** From `departments.undersecretary_department_id` of raiser’s department — routes US feedback pool. */
16
- undersecretary_department_id: number | null;
17
- raiser_department_id: number;
18
- raiser_section_id: number;
19
- workflow_execution_id: string | null;
20
- employee_evaluations?: EvaluationEmployeeEvaluation[];
21
- approvals?: EvaluationApproval[];
22
- chats?: EvaluationChat[];
23
- attachments?: EvaluationAttachment[];
24
- }
25
- export declare class EvaluationEmployeeEvaluation extends BaseModel {
26
- evaluation_request: EvaluationRequest;
27
- user_id: number;
28
- /** Snapshot of section/question structure or metadata (not a substitute for normalized answers). */
29
- dynamic_evaluation_form: Record<string, unknown>;
30
- is_rca: boolean;
31
- /** US Political / Finance pool: Excellent | Very_good */
32
- us_feedback: string | null;
33
- answers?: EvaluationEmployeeAnswer[];
34
- }
35
- export declare class EvaluationEmployeeAnswer extends BaseModel {
36
- evaluation_employee_evaluation: EvaluationEmployeeEvaluation;
37
- evaluation_section_id: number;
38
- evaluation_question_id: number;
39
- score: number;
40
- remarks: string | null;
41
- }
42
- export declare class EvaluationApproval extends BaseModel {
43
- evaluation_request: EvaluationRequest;
44
- step_key: string;
45
- step_order: number;
46
- approval_status: string;
47
- approver_user_id: number | null;
48
- comments: string | null;
49
- }
50
- export declare class EvaluationChat extends BaseModel {
51
- evaluation_request: EvaluationRequest;
52
- sender_user_id: number;
53
- message_text: string;
54
- }
55
- export declare class EvaluationAttachment extends BaseModel {
56
- evaluation_request: EvaluationRequest;
57
- file_name: string;
58
- file_url: string;
59
- uploaded_by_user_id: number;
60
- }