@platform-modules/foreign-ministry 1.3.296 → 1.3.307

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 (57) hide show
  1. package/dist/data-source.js +16 -0
  2. package/dist/index.d.ts +8 -0
  3. package/dist/index.js +23 -1
  4. package/dist/models/EmbassyEvaluationApprovalModel.d.ts +22 -0
  5. package/dist/models/EmbassyEvaluationApprovalModel.js +85 -0
  6. package/dist/models/EmbassyEvaluationAssignmentModel.d.ts +24 -0
  7. package/dist/models/EmbassyEvaluationAssignmentModel.js +89 -0
  8. package/dist/models/EmbassyEvaluationAttachmentModel.d.ts +10 -0
  9. package/dist/models/EmbassyEvaluationAttachmentModel.js +48 -0
  10. package/dist/models/EmbassyEvaluationChatModel.d.ts +18 -0
  11. package/dist/models/EmbassyEvaluationChatModel.js +66 -0
  12. package/dist/models/EmbassyEvaluationCycleModel.d.ts +17 -0
  13. package/dist/models/EmbassyEvaluationCycleModel.js +57 -0
  14. package/dist/models/EmbassyEvaluationDepartmentSettingModel.d.ts +14 -0
  15. package/dist/models/EmbassyEvaluationDepartmentSettingModel.js +56 -0
  16. package/dist/models/EmbassyEvaluationRequestModel.d.ts +24 -0
  17. package/dist/models/EmbassyEvaluationRequestModel.js +86 -0
  18. package/dist/models/EmbassyEvaluationResponseModel.d.ts +8 -0
  19. package/dist/models/EmbassyEvaluationResponseModel.js +44 -0
  20. package/dist/models/EmbassyEvaluationWorkflowModel.d.ts +19 -0
  21. package/dist/models/EmbassyEvaluationWorkflowModel.js +73 -0
  22. package/dist/models/EmployeeOfMonthNominationApprovalModel.js +1 -0
  23. package/dist/models/EmployeeOfMonthNominationChatModel.js +1 -0
  24. package/dist/models/EmployeeOfMonthNominationRequestModel.js +1 -0
  25. package/dist/models/EmployeeOfMonthNominationWorkflowModel.js +1 -0
  26. package/dist/models/EmployeeOfMonthSupportNominationApprovalModel.d.ts +9 -7
  27. package/dist/models/EmployeeOfMonthSupportNominationApprovalModel.js +10 -10
  28. package/dist/models/EmployeeOfMonthSupportNominationChatModel.js +1 -0
  29. package/dist/models/EmployeeOfMonthSupportNominationRequestModel.js +1 -0
  30. package/dist/models/EmployeeOfMonthSupportNominationWorkflowModel.js +1 -0
  31. package/dist/models/EvaluationFormModel.js +5 -1
  32. package/package.json +1 -1
  33. package/src/data-source.ts +16 -0
  34. package/src/helpers/employee-evaluation-request.utils.ts +181 -181
  35. package/src/helpers/evaluation-eligibility.utils.ts +36 -36
  36. package/src/index.ts +26 -0
  37. package/src/models/EmbassyEvaluationApprovalModel.ts +57 -0
  38. package/src/models/EmbassyEvaluationAssignmentModel.ts +63 -0
  39. package/src/models/EmbassyEvaluationAttachmentModel.ts +26 -0
  40. package/src/models/EmbassyEvaluationChatModel.ts +43 -0
  41. package/src/models/EmbassyEvaluationCycleModel.ts +38 -0
  42. package/src/models/EmbassyEvaluationRequestModel.ts +59 -0
  43. package/src/models/EmbassyEvaluationResponseModel.ts +24 -0
  44. package/src/models/EmbassyEvaluationWorkflowModel.ts +48 -0
  45. package/src/models/EmployeeEvaluationPersonScoreModel.ts +25 -25
  46. package/src/models/EmployeeEvaluationRequestModel.ts +90 -90
  47. package/src/models/EmployeeOfMonthNominationApprovalModel.ts +1 -0
  48. package/src/models/EmployeeOfMonthNominationChatModel.ts +1 -0
  49. package/src/models/EmployeeOfMonthNominationRequestModel.ts +1 -0
  50. package/src/models/EmployeeOfMonthNominationWorkflowModel.ts +1 -0
  51. package/src/models/EmployeeOfMonthSupportNominationApprovalModel.ts +60 -56
  52. package/src/models/EmployeeOfMonthSupportNominationChatModel.ts +1 -0
  53. package/src/models/EmployeeOfMonthSupportNominationRequestModel.ts +1 -0
  54. package/src/models/EmployeeOfMonthSupportNominationWorkflowModel.ts +48 -47
  55. package/src/models/EvaluationFormModel.ts +4 -0
  56. package/src/models/EvaluationFormQuestionModel.ts +52 -52
  57. package/src/models/EvaluationFormSectionModel.ts +33 -33
@@ -0,0 +1,24 @@
1
+ import { BaseModel } from './BaseModel';
2
+ export declare enum EmbassyEvaluationRequestStatus {
3
+ PENDING = "Pending",
4
+ IN_PROGRESS = "In Progress",
5
+ APPROVED = "Approved",
6
+ REJECTED = "Rejected"
7
+ }
8
+ /** Consolidated approval request when all departments complete evaluations for all embassies in a cycle. */
9
+ export declare class EmbassyEvaluationRequests extends BaseModel {
10
+ cycle_id: number;
11
+ /** Same cycle template can run each calendar year; year is set at activation (assignments), not on cycle. */
12
+ evaluation_year: number | null;
13
+ embassy_ids: number[];
14
+ req_user_department_id: number | null;
15
+ req_user_section_id: number | null;
16
+ service_id: number | null;
17
+ sub_service_id: number | null;
18
+ user_id: number;
19
+ total_assignments: number;
20
+ submitted_assignments: number;
21
+ status: EmbassyEvaluationRequestStatus;
22
+ workflow_execution_id: string | null;
23
+ comments: string | null;
24
+ }
@@ -0,0 +1,86 @@
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.EmbassyEvaluationRequests = exports.EmbassyEvaluationRequestStatus = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ var EmbassyEvaluationRequestStatus;
16
+ (function (EmbassyEvaluationRequestStatus) {
17
+ EmbassyEvaluationRequestStatus["PENDING"] = "Pending";
18
+ EmbassyEvaluationRequestStatus["IN_PROGRESS"] = "In Progress";
19
+ EmbassyEvaluationRequestStatus["APPROVED"] = "Approved";
20
+ EmbassyEvaluationRequestStatus["REJECTED"] = "Rejected";
21
+ })(EmbassyEvaluationRequestStatus || (exports.EmbassyEvaluationRequestStatus = EmbassyEvaluationRequestStatus = {}));
22
+ /** Consolidated approval request when all departments complete evaluations for all embassies in a cycle. */
23
+ let EmbassyEvaluationRequests = class EmbassyEvaluationRequests extends BaseModel_1.BaseModel {
24
+ };
25
+ exports.EmbassyEvaluationRequests = EmbassyEvaluationRequests;
26
+ __decorate([
27
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
28
+ __metadata("design:type", Number)
29
+ ], EmbassyEvaluationRequests.prototype, "cycle_id", void 0);
30
+ __decorate([
31
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
32
+ __metadata("design:type", Object)
33
+ ], EmbassyEvaluationRequests.prototype, "evaluation_year", void 0);
34
+ __decorate([
35
+ (0, typeorm_1.Column)({ type: 'jsonb', nullable: false }),
36
+ __metadata("design:type", Array)
37
+ ], EmbassyEvaluationRequests.prototype, "embassy_ids", void 0);
38
+ __decorate([
39
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
40
+ __metadata("design:type", Object)
41
+ ], EmbassyEvaluationRequests.prototype, "req_user_department_id", void 0);
42
+ __decorate([
43
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
44
+ __metadata("design:type", Object)
45
+ ], EmbassyEvaluationRequests.prototype, "req_user_section_id", void 0);
46
+ __decorate([
47
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
48
+ __metadata("design:type", Object)
49
+ ], EmbassyEvaluationRequests.prototype, "service_id", void 0);
50
+ __decorate([
51
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
52
+ __metadata("design:type", Object)
53
+ ], EmbassyEvaluationRequests.prototype, "sub_service_id", void 0);
54
+ __decorate([
55
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
56
+ __metadata("design:type", Number)
57
+ ], EmbassyEvaluationRequests.prototype, "user_id", void 0);
58
+ __decorate([
59
+ (0, typeorm_1.Column)({ type: 'int', nullable: false, default: 0 }),
60
+ __metadata("design:type", Number)
61
+ ], EmbassyEvaluationRequests.prototype, "total_assignments", void 0);
62
+ __decorate([
63
+ (0, typeorm_1.Column)({ type: 'int', nullable: false, default: 0 }),
64
+ __metadata("design:type", Number)
65
+ ], EmbassyEvaluationRequests.prototype, "submitted_assignments", void 0);
66
+ __decorate([
67
+ (0, typeorm_1.Column)({
68
+ type: 'enum',
69
+ enum: EmbassyEvaluationRequestStatus,
70
+ enumName: 'embassy_evaluation_request_status_enum',
71
+ default: EmbassyEvaluationRequestStatus.PENDING,
72
+ nullable: false,
73
+ }),
74
+ __metadata("design:type", String)
75
+ ], EmbassyEvaluationRequests.prototype, "status", void 0);
76
+ __decorate([
77
+ (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
78
+ __metadata("design:type", Object)
79
+ ], EmbassyEvaluationRequests.prototype, "workflow_execution_id", void 0);
80
+ __decorate([
81
+ (0, typeorm_1.Column)({ type: 'text', nullable: true }),
82
+ __metadata("design:type", Object)
83
+ ], EmbassyEvaluationRequests.prototype, "comments", void 0);
84
+ exports.EmbassyEvaluationRequests = EmbassyEvaluationRequests = __decorate([
85
+ (0, typeorm_1.Entity)({ name: 'embassy_evaluation_requests' })
86
+ ], EmbassyEvaluationRequests);
@@ -0,0 +1,8 @@
1
+ import { BaseModel } from './BaseModel';
2
+ export declare class EmbassyEvaluationResponse extends BaseModel {
3
+ assignment_id: number;
4
+ question_id: number;
5
+ answer: string | null;
6
+ score: number | null;
7
+ remarks: string | null;
8
+ }
@@ -0,0 +1,44 @@
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.EmbassyEvaluationResponse = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ let EmbassyEvaluationResponse = class EmbassyEvaluationResponse extends BaseModel_1.BaseModel {
16
+ };
17
+ exports.EmbassyEvaluationResponse = EmbassyEvaluationResponse;
18
+ __decorate([
19
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
20
+ __metadata("design:type", Number)
21
+ ], EmbassyEvaluationResponse.prototype, "assignment_id", void 0);
22
+ __decorate([
23
+ (0, typeorm_1.Column)({ type: 'int', nullable: false }),
24
+ __metadata("design:type", Number)
25
+ ], EmbassyEvaluationResponse.prototype, "question_id", void 0);
26
+ __decorate([
27
+ (0, typeorm_1.Column)({ type: 'text', nullable: true }),
28
+ __metadata("design:type", Object)
29
+ ], EmbassyEvaluationResponse.prototype, "answer", void 0);
30
+ __decorate([
31
+ (0, typeorm_1.Column)({ type: 'decimal', precision: 10, scale: 2, nullable: true }),
32
+ __metadata("design:type", Object)
33
+ ], EmbassyEvaluationResponse.prototype, "score", void 0);
34
+ __decorate([
35
+ (0, typeorm_1.Column)({ type: 'text', nullable: true }),
36
+ __metadata("design:type", Object)
37
+ ], EmbassyEvaluationResponse.prototype, "remarks", void 0);
38
+ exports.EmbassyEvaluationResponse = EmbassyEvaluationResponse = __decorate([
39
+ (0, typeorm_1.Entity)({ name: 'embassy_evaluation_responses' }),
40
+ (0, typeorm_1.Index)('uq_embassy_eval_response', ['assignment_id', 'question_id'], {
41
+ unique: true,
42
+ where: '"is_deleted" = false',
43
+ })
44
+ ], EmbassyEvaluationResponse);
@@ -0,0 +1,19 @@
1
+ import { BaseModel } from './BaseModel';
2
+ export declare enum EmbassyEvaluationWorkFlowStatus {
3
+ PENDING = "Pending",
4
+ IN_PROGRESS = "In Progress",
5
+ COMPLETED = "Completed",
6
+ FAILED = "Failed"
7
+ }
8
+ export declare class EmbassyEvaluationWorkFlow extends BaseModel {
9
+ request_id: number;
10
+ service_id: number | null;
11
+ sub_service_id: number | null;
12
+ user_id: number | null;
13
+ role_id: number | null;
14
+ department_id: number | null;
15
+ section_id: number | null;
16
+ task_name: string;
17
+ description: string | null;
18
+ status: EmbassyEvaluationWorkFlowStatus;
19
+ }
@@ -0,0 +1,73 @@
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.EmbassyEvaluationWorkFlow = exports.EmbassyEvaluationWorkFlowStatus = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const BaseModel_1 = require("./BaseModel");
15
+ var EmbassyEvaluationWorkFlowStatus;
16
+ (function (EmbassyEvaluationWorkFlowStatus) {
17
+ EmbassyEvaluationWorkFlowStatus["PENDING"] = "Pending";
18
+ EmbassyEvaluationWorkFlowStatus["IN_PROGRESS"] = "In Progress";
19
+ EmbassyEvaluationWorkFlowStatus["COMPLETED"] = "Completed";
20
+ EmbassyEvaluationWorkFlowStatus["FAILED"] = "Failed";
21
+ })(EmbassyEvaluationWorkFlowStatus || (exports.EmbassyEvaluationWorkFlowStatus = EmbassyEvaluationWorkFlowStatus = {}));
22
+ let EmbassyEvaluationWorkFlow = class EmbassyEvaluationWorkFlow extends BaseModel_1.BaseModel {
23
+ };
24
+ exports.EmbassyEvaluationWorkFlow = EmbassyEvaluationWorkFlow;
25
+ __decorate([
26
+ (0, typeorm_1.Column)({ type: 'integer', nullable: false }),
27
+ __metadata("design:type", Number)
28
+ ], EmbassyEvaluationWorkFlow.prototype, "request_id", void 0);
29
+ __decorate([
30
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
31
+ __metadata("design:type", Object)
32
+ ], EmbassyEvaluationWorkFlow.prototype, "service_id", void 0);
33
+ __decorate([
34
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
35
+ __metadata("design:type", Object)
36
+ ], EmbassyEvaluationWorkFlow.prototype, "sub_service_id", void 0);
37
+ __decorate([
38
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
39
+ __metadata("design:type", Object)
40
+ ], EmbassyEvaluationWorkFlow.prototype, "user_id", void 0);
41
+ __decorate([
42
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
43
+ __metadata("design:type", Object)
44
+ ], EmbassyEvaluationWorkFlow.prototype, "role_id", void 0);
45
+ __decorate([
46
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
47
+ __metadata("design:type", Object)
48
+ ], EmbassyEvaluationWorkFlow.prototype, "department_id", void 0);
49
+ __decorate([
50
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
51
+ __metadata("design:type", Object)
52
+ ], EmbassyEvaluationWorkFlow.prototype, "section_id", void 0);
53
+ __decorate([
54
+ (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: false }),
55
+ __metadata("design:type", String)
56
+ ], EmbassyEvaluationWorkFlow.prototype, "task_name", void 0);
57
+ __decorate([
58
+ (0, typeorm_1.Column)({ type: 'text', nullable: true }),
59
+ __metadata("design:type", Object)
60
+ ], EmbassyEvaluationWorkFlow.prototype, "description", void 0);
61
+ __decorate([
62
+ (0, typeorm_1.Column)({
63
+ type: 'enum',
64
+ enum: EmbassyEvaluationWorkFlowStatus,
65
+ enumName: 'embassy_evaluation_workflow_status_enum',
66
+ default: EmbassyEvaluationWorkFlowStatus.PENDING,
67
+ nullable: false,
68
+ }),
69
+ __metadata("design:type", String)
70
+ ], EmbassyEvaluationWorkFlow.prototype, "status", void 0);
71
+ exports.EmbassyEvaluationWorkFlow = EmbassyEvaluationWorkFlow = __decorate([
72
+ (0, typeorm_1.Entity)({ name: 'embassy_evaluation_workflows' })
73
+ ], EmbassyEvaluationWorkFlow);
@@ -70,6 +70,7 @@ __decorate([
70
70
  (0, typeorm_1.Column)({
71
71
  type: 'enum',
72
72
  enum: EmployeeOfMonthNominationApprovalStatus,
73
+ enumName: 'eom_nomination_approval_status_enum',
73
74
  default: EmployeeOfMonthNominationApprovalStatus.PENDING,
74
75
  nullable: false,
75
76
  }),
@@ -51,6 +51,7 @@ __decorate([
51
51
  (0, typeorm_1.Column)({
52
52
  type: 'enum',
53
53
  enum: EmployeeOfMonthNominationMessageType,
54
+ enumName: 'eom_nomination_message_type_enum',
54
55
  default: EmployeeOfMonthNominationMessageType.TEXT,
55
56
  nullable: false,
56
57
  }),
@@ -58,6 +58,7 @@ __decorate([
58
58
  (0, typeorm_1.Column)({
59
59
  type: 'enum',
60
60
  enum: EmployeeOfMonthNominationRequestStatus,
61
+ enumName: 'eom_nomination_request_status_enum',
61
62
  default: EmployeeOfMonthNominationRequestStatus.PENDING,
62
63
  nullable: false,
63
64
  }),
@@ -62,6 +62,7 @@ __decorate([
62
62
  (0, typeorm_1.Column)({
63
63
  type: 'enum',
64
64
  enum: EmployeeOfMonthNominationWorkFlowStatus,
65
+ enumName: 'eom_nomination_workflow_status_enum',
65
66
  default: EmployeeOfMonthNominationWorkFlowStatus.PENDING,
66
67
  nullable: false,
67
68
  }),
@@ -1,10 +1,12 @@
1
1
  import { BaseModel } from './BaseModel';
2
- export declare enum EmployeeOfMonthSupportNominationApprovalStatus {
3
- PENDING = "Pending",
4
- IN_PROGRESS = "In Progress",
5
- APPROVED = "Approved",
6
- REJECTED = "Rejected"
7
- }
2
+ /** Approval status values (stored as varchar, not PostgreSQL enum). */
3
+ export declare const EmployeeOfMonthSupportNominationApprovalStatus: {
4
+ readonly PENDING: "Pending";
5
+ readonly IN_PROGRESS: "In Progress";
6
+ readonly APPROVED: "Approved";
7
+ readonly REJECTED: "Rejected";
8
+ };
9
+ export type EmployeeOfMonthSupportNominationApprovalStatus = (typeof EmployeeOfMonthSupportNominationApprovalStatus)[keyof typeof EmployeeOfMonthSupportNominationApprovalStatus];
8
10
  export declare class EmployeeOfMonthSupportNominationApprovalDetails extends BaseModel {
9
11
  request_id: number;
10
12
  service_id: number | null;
@@ -17,6 +19,6 @@ export declare class EmployeeOfMonthSupportNominationApprovalDetails extends Bas
17
19
  delegate_user_id: number | null;
18
20
  approved_by: number | null;
19
21
  comment: string;
20
- approval_status: EmployeeOfMonthSupportNominationApprovalStatus;
22
+ approval_status: string;
21
23
  is_allowed: boolean;
22
24
  }
@@ -12,13 +12,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.EmployeeOfMonthSupportNominationApprovalDetails = exports.EmployeeOfMonthSupportNominationApprovalStatus = void 0;
13
13
  const typeorm_1 = require("typeorm");
14
14
  const BaseModel_1 = require("./BaseModel");
15
- var EmployeeOfMonthSupportNominationApprovalStatus;
16
- (function (EmployeeOfMonthSupportNominationApprovalStatus) {
17
- EmployeeOfMonthSupportNominationApprovalStatus["PENDING"] = "Pending";
18
- EmployeeOfMonthSupportNominationApprovalStatus["IN_PROGRESS"] = "In Progress";
19
- EmployeeOfMonthSupportNominationApprovalStatus["APPROVED"] = "Approved";
20
- EmployeeOfMonthSupportNominationApprovalStatus["REJECTED"] = "Rejected";
21
- })(EmployeeOfMonthSupportNominationApprovalStatus || (exports.EmployeeOfMonthSupportNominationApprovalStatus = EmployeeOfMonthSupportNominationApprovalStatus = {}));
15
+ /** Approval status values (stored as varchar, not PostgreSQL enum). */
16
+ exports.EmployeeOfMonthSupportNominationApprovalStatus = {
17
+ PENDING: 'Pending',
18
+ IN_PROGRESS: 'In Progress',
19
+ APPROVED: 'Approved',
20
+ REJECTED: 'Rejected',
21
+ };
22
22
  let EmployeeOfMonthSupportNominationApprovalDetails = class EmployeeOfMonthSupportNominationApprovalDetails extends BaseModel_1.BaseModel {
23
23
  };
24
24
  exports.EmployeeOfMonthSupportNominationApprovalDetails = EmployeeOfMonthSupportNominationApprovalDetails;
@@ -68,9 +68,9 @@ __decorate([
68
68
  ], EmployeeOfMonthSupportNominationApprovalDetails.prototype, "comment", void 0);
69
69
  __decorate([
70
70
  (0, typeorm_1.Column)({
71
- type: 'enum',
72
- enum: EmployeeOfMonthSupportNominationApprovalStatus,
73
- default: EmployeeOfMonthSupportNominationApprovalStatus.PENDING,
71
+ type: 'varchar',
72
+ length: 32,
73
+ default: exports.EmployeeOfMonthSupportNominationApprovalStatus.PENDING,
74
74
  nullable: false,
75
75
  }),
76
76
  __metadata("design:type", String)
@@ -51,6 +51,7 @@ __decorate([
51
51
  (0, typeorm_1.Column)({
52
52
  type: 'enum',
53
53
  enum: EmployeeOfMonthSupportNominationMessageType,
54
+ enumName: 'eom_support_nomination_message_type_enum',
54
55
  default: EmployeeOfMonthSupportNominationMessageType.TEXT,
55
56
  nullable: false,
56
57
  }),
@@ -58,6 +58,7 @@ __decorate([
58
58
  (0, typeorm_1.Column)({
59
59
  type: 'enum',
60
60
  enum: EmployeeOfMonthSupportNominationRequestStatus,
61
+ enumName: 'eom_support_nomination_request_status_enum',
61
62
  default: EmployeeOfMonthSupportNominationRequestStatus.PENDING,
62
63
  nullable: false,
63
64
  }),
@@ -62,6 +62,7 @@ __decorate([
62
62
  (0, typeorm_1.Column)({
63
63
  type: 'enum',
64
64
  enum: EmployeeOfMonthSupportNominationWorkFlowStatus,
65
+ enumName: 'eom_support_nomination_workflow_status_enum',
65
66
  default: EmployeeOfMonthSupportNominationWorkFlowStatus.PENDING,
66
67
  nullable: false,
67
68
  }),
@@ -60,5 +60,9 @@ __decorate([
60
60
  exports.EvaluationForm = EvaluationForm = __decorate([
61
61
  (0, typeorm_1.Entity)({ name: 'evaluation_forms' }),
62
62
  (0, typeorm_1.Index)('uq_evaluation_forms_form_name', ['form_name'], { unique: true, where: '"is_deleted" = false' }),
63
- (0, typeorm_1.Index)('uq_evaluation_forms_form_code', ['form_code'], { unique: true, where: '"is_deleted" = false' })
63
+ (0, typeorm_1.Index)('uq_evaluation_forms_form_code', ['form_code'], { unique: true, where: '"is_deleted" = false' }),
64
+ (0, typeorm_1.Index)('uq_evaluation_forms_dept_section', ['department_id', 'section_id'], {
65
+ unique: true,
66
+ where: `"is_deleted" = false AND form_type = 'department'`,
67
+ })
64
68
  ], EvaluationForm);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platform-modules/foreign-ministry",
3
- "version": "1.3.296",
3
+ "version": "1.3.307",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {
@@ -332,6 +332,14 @@ import { EmployeeOfMonthSupportNominationApprovalDetails } from './models/Employ
332
332
  import { EmployeeOfMonthSupportNominationWorkFlow } from './models/EmployeeOfMonthSupportNominationWorkflowModel';
333
333
  import { EmployeeOfMonthSupportNominationRequestChat } from './models/EmployeeOfMonthSupportNominationChatModel';
334
334
  import { EmployeeOfMonthSupportNominationRequestAttachment } from './models/EmployeeOfMonthSupportNominationAttachmentModel';
335
+ import { EmbassyEvaluationCycle } from './models/EmbassyEvaluationCycleModel';
336
+ import { EmbassyEvaluationAssignment } from './models/EmbassyEvaluationAssignmentModel';
337
+ import { EmbassyEvaluationResponse } from './models/EmbassyEvaluationResponseModel';
338
+ import { EmbassyEvaluationRequests } from './models/EmbassyEvaluationRequestModel';
339
+ import { EmbassyEvaluationApprovalDetails } from './models/EmbassyEvaluationApprovalModel';
340
+ import { EmbassyEvaluationWorkFlow } from './models/EmbassyEvaluationWorkflowModel';
341
+ import { EmbassyEvaluationRequestChat } from './models/EmbassyEvaluationChatModel';
342
+ import { EmbassyEvaluationRequestAttachment } from './models/EmbassyEvaluationAttachmentModel';
335
343
 
336
344
  export const AppDataSource = new DataSource({
337
345
  type: 'postgres',
@@ -660,5 +668,13 @@ export const AppDataSource = new DataSource({
660
668
  EmployeeOfMonthSupportNominationWorkFlow,
661
669
  EmployeeOfMonthSupportNominationRequestChat,
662
670
  EmployeeOfMonthSupportNominationRequestAttachment,
671
+ EmbassyEvaluationCycle,
672
+ EmbassyEvaluationAssignment,
673
+ EmbassyEvaluationResponse,
674
+ EmbassyEvaluationRequests,
675
+ EmbassyEvaluationApprovalDetails,
676
+ EmbassyEvaluationWorkFlow,
677
+ EmbassyEvaluationRequestChat,
678
+ EmbassyEvaluationRequestAttachment,
663
679
  ],
664
680
  });