@platform-modules/foreign-ministry 1.3.342 → 1.3.350
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 +4 -4
- package/dist/helpers/employee-evaluation-request.utils.d.ts +6 -0
- package/dist/helpers/employee-evaluation-request.utils.js +83 -5
- package/dist/helpers/sla-request-status.helper.d.ts +3 -0
- package/dist/helpers/sla-request-status.helper.js +36 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -3
- package/dist/models/EmbassyEvaluationDepartmentSettingModel.d.ts +14 -0
- package/dist/models/EmbassyEvaluationDepartmentSettingModel.js +56 -0
- package/dist/models/EmployeeEvaluationRequestModel.d.ts +1 -0
- package/dist/models/EmployeeEvaluationRequestModel.js +4 -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/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 +92 -92
- package/sql/add_employee_evaluation_requests_is_draft.sql +2 -0
- package/sql/sla-reports-sync.manifest.json +9 -9
- package/sql/sla_reports_admin_procedures.sql +304 -304
- package/sql/sla_reports_approvals_workbook.sql +383 -383
- package/sql/sla_reports_procedures.sql +886 -886
- package/sql/sla_requests_status_to_varchar.sql +28 -28
- 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 +87 -7
- package/src/helpers/evaluation-eligibility.utils.ts +126 -126
- package/src/index.ts +1 -0
- 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/EmployeeEvaluationRequestModel.ts +3 -0
- package/src/models/EvaluationEligibilitySettingModel.ts +51 -51
- package/src/models/EvaluationFormModel.ts +44 -44
- 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 -57
- package/src/sla-report-views.ts +3 -3
- package/dist/auth/authenticate-jwt-session.d.ts +0 -19
- package/dist/auth/authenticate-jwt-session.js +0 -35
- package/dist/auth/jwt-token.helper.d.ts +0 -18
- package/dist/auth/jwt-token.helper.js +0 -58
- package/dist/auth/user-session-validation.d.ts +0 -42
- package/dist/auth/user-session-validation.js +0 -95
- package/dist/i18n/workflow-chat-i18n.d.ts +0 -5
- package/dist/i18n/workflow-chat-i18n.js +0 -21
- package/dist/i18n/workflow-chat-i18n.json +0 -320
- package/dist/i18n/workflow-chat-message.builder.d.ts +0 -325
- package/dist/i18n/workflow-chat-message.builder.js +0 -924
package/.env
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
DB_HOST=
|
|
1
|
+
DB_HOST=10.0.1.74
|
|
2
2
|
DB_PORT=5432
|
|
3
|
-
DB_USER=
|
|
4
|
-
DB_PASS=
|
|
5
|
-
DB_NAME=
|
|
3
|
+
DB_USER=appuser
|
|
4
|
+
DB_PASS=hrms@fm1292
|
|
5
|
+
DB_NAME=fm
|
|
@@ -16,6 +16,11 @@ export declare function normalizeEmployeeSubmissions(raw: unknown): {
|
|
|
16
16
|
employees: NormalizedEmployeeSubmission[];
|
|
17
17
|
error?: string;
|
|
18
18
|
};
|
|
19
|
+
/** Relaxed validation for draft saves — employees/answers may be empty or partial. */
|
|
20
|
+
export declare function normalizeEmployeeDraftSubmissions(raw: unknown): {
|
|
21
|
+
employees: NormalizedEmployeeSubmission[];
|
|
22
|
+
error?: string;
|
|
23
|
+
};
|
|
19
24
|
/** Resolve max employees from active exception cycle for the evaluation month. */
|
|
20
25
|
export declare function resolveMaxEmployeesPerRequest(manager: EntityManager, month: number): Promise<number>;
|
|
21
26
|
export declare function persistEmployeeEvaluationScores(manager: EntityManager, opts: {
|
|
@@ -23,6 +28,7 @@ export declare function persistEmployeeEvaluationScores(manager: EntityManager,
|
|
|
23
28
|
formId: number;
|
|
24
29
|
createdBy: string;
|
|
25
30
|
employees: NormalizedEmployeeSubmission[];
|
|
31
|
+
isDraft?: boolean;
|
|
26
32
|
}): Promise<{
|
|
27
33
|
totalScore: number;
|
|
28
34
|
averageScore: number;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DEFAULT_MAX_EMPLOYEES_PER_REQUEST = void 0;
|
|
4
4
|
exports.normalizeEmployeeSubmissions = normalizeEmployeeSubmissions;
|
|
5
|
+
exports.normalizeEmployeeDraftSubmissions = normalizeEmployeeDraftSubmissions;
|
|
5
6
|
exports.resolveMaxEmployeesPerRequest = resolveMaxEmployeesPerRequest;
|
|
6
7
|
exports.persistEmployeeEvaluationScores = persistEmployeeEvaluationScores;
|
|
7
8
|
const EmployeeEvaluationAnswerModel_1 = require("../models/EmployeeEvaluationAnswerModel");
|
|
@@ -69,6 +70,78 @@ function normalizeEmployeeSubmissions(raw) {
|
|
|
69
70
|
}
|
|
70
71
|
return { employees };
|
|
71
72
|
}
|
|
73
|
+
/** Relaxed validation for draft saves — employees/answers may be empty or partial. */
|
|
74
|
+
function normalizeEmployeeDraftSubmissions(raw) {
|
|
75
|
+
if (raw == null || raw === undefined) {
|
|
76
|
+
return { employees: [] };
|
|
77
|
+
}
|
|
78
|
+
if (!Array.isArray(raw)) {
|
|
79
|
+
return { employees: [], error: 'employees must be an array when provided' };
|
|
80
|
+
}
|
|
81
|
+
if (raw.length === 0) {
|
|
82
|
+
return { employees: [] };
|
|
83
|
+
}
|
|
84
|
+
const seen = new Set();
|
|
85
|
+
const employees = [];
|
|
86
|
+
for (const item of raw) {
|
|
87
|
+
if (item == null || typeof item !== 'object') {
|
|
88
|
+
return { employees: [], error: 'Each employee entry must be an object' };
|
|
89
|
+
}
|
|
90
|
+
const o = item;
|
|
91
|
+
const user_id = Number(o.user_id ?? o.employee_id);
|
|
92
|
+
if (!Number.isFinite(user_id) || user_id <= 0) {
|
|
93
|
+
return { employees: [], error: 'Each employee must have a valid user_id' };
|
|
94
|
+
}
|
|
95
|
+
if (seen.has(user_id)) {
|
|
96
|
+
return { employees: [], error: `Duplicate user_id ${user_id} in employees list` };
|
|
97
|
+
}
|
|
98
|
+
seen.add(user_id);
|
|
99
|
+
const answersRaw = o.answers;
|
|
100
|
+
const answers = [];
|
|
101
|
+
if (answersRaw != null) {
|
|
102
|
+
if (!Array.isArray(answersRaw)) {
|
|
103
|
+
return { employees: [], error: `Employee ${user_id} answers must be an array when provided` };
|
|
104
|
+
}
|
|
105
|
+
const qSeen = new Set();
|
|
106
|
+
for (const a of answersRaw) {
|
|
107
|
+
if (a == null || typeof a !== 'object')
|
|
108
|
+
continue;
|
|
109
|
+
const ar = a;
|
|
110
|
+
const section_id = Number(ar.section_id);
|
|
111
|
+
const question_id = Number(ar.question_id);
|
|
112
|
+
const score = Number(ar.score);
|
|
113
|
+
if (!Number.isFinite(section_id) || !Number.isFinite(question_id)) {
|
|
114
|
+
return {
|
|
115
|
+
employees: [],
|
|
116
|
+
error: `section_id and question_id required for employee ${user_id} when answer is provided`,
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
if (!Number.isFinite(score) || score < 0) {
|
|
120
|
+
return {
|
|
121
|
+
employees: [],
|
|
122
|
+
error: `score must be a non-negative number for employee ${user_id}, question ${question_id}`,
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
if (qSeen.has(question_id)) {
|
|
126
|
+
return { employees: [], error: `Duplicate question_id ${question_id} for employee ${user_id}` };
|
|
127
|
+
}
|
|
128
|
+
qSeen.add(question_id);
|
|
129
|
+
answers.push({
|
|
130
|
+
section_id,
|
|
131
|
+
question_id,
|
|
132
|
+
score,
|
|
133
|
+
remarks: ar.remarks != null ? String(ar.remarks) : null,
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
employees.push({
|
|
138
|
+
user_id,
|
|
139
|
+
is_rca: o.is_rca !== undefined ? Boolean(o.is_rca) : false,
|
|
140
|
+
answers,
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
return { employees };
|
|
144
|
+
}
|
|
72
145
|
/** Resolve max employees from active exception cycle for the evaluation month. */
|
|
73
146
|
async function resolveMaxEmployeesPerRequest(manager, month) {
|
|
74
147
|
const rows = await manager
|
|
@@ -86,7 +159,7 @@ async function resolveMaxEmployeesPerRequest(manager, month) {
|
|
|
86
159
|
return exports.DEFAULT_MAX_EMPLOYEES_PER_REQUEST;
|
|
87
160
|
}
|
|
88
161
|
async function persistEmployeeEvaluationScores(manager, opts) {
|
|
89
|
-
const { requestId, formId, createdBy, employees } = opts;
|
|
162
|
+
const { requestId, formId, createdBy, employees, isDraft = false } = opts;
|
|
90
163
|
let requestTotal = 0;
|
|
91
164
|
for (const emp of employees) {
|
|
92
165
|
let personTotal = 0;
|
|
@@ -95,11 +168,16 @@ async function persistEmployeeEvaluationScores(manager, opts) {
|
|
|
95
168
|
where: { id: ans.question_id, is_deleted: false },
|
|
96
169
|
});
|
|
97
170
|
const questionSectionId = qMeta?.form_section_id;
|
|
98
|
-
if (!
|
|
99
|
-
|
|
171
|
+
if (!isDraft) {
|
|
172
|
+
if (!qMeta || questionSectionId == null || questionSectionId !== ans.section_id) {
|
|
173
|
+
throw new Error(`Invalid question ${ans.question_id} for section ${ans.section_id}`);
|
|
174
|
+
}
|
|
175
|
+
if (qMeta.max_score != null && ans.score > qMeta.max_score) {
|
|
176
|
+
throw new Error(`score ${ans.score} exceeds max_score ${qMeta.max_score} for question ${ans.question_id}`);
|
|
177
|
+
}
|
|
100
178
|
}
|
|
101
|
-
if (qMeta.
|
|
102
|
-
throw new Error(`
|
|
179
|
+
else if (qMeta && qMeta.form_section_id != null && qMeta.form_section_id !== ans.section_id) {
|
|
180
|
+
throw new Error(`Invalid question ${ans.question_id} for section ${ans.section_id}`);
|
|
103
181
|
}
|
|
104
182
|
personTotal += ans.score;
|
|
105
183
|
await manager.save(EmployeeEvaluationAnswerModel_1.EmployeeEvaluationAnswers, manager.create(EmployeeEvaluationAnswerModel_1.EmployeeEvaluationAnswers, {
|
|
@@ -0,0 +1,3 @@
|
|
|
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;
|
|
@@ -0,0 +1,36 @@
|
|
|
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
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -410,7 +410,7 @@ export type { FmServicesNotificationConfigRecipient, CollectFmServicesNotificati
|
|
|
410
410
|
export * from './models/MoodleUsersModel';
|
|
411
411
|
export { EvaluationEligibilitySetting, EvaluationEligibilitySettingEmployee, } from './models/EvaluationEligibilitySettingModel';
|
|
412
412
|
export { isEvaluationEligibilityWindowOpen, isCalendarMonthInEligibilityRange, mmDdWindowsOverlap, mmDdSortKey, parseMonthDay, parseEligibilityDateRange, parseEvaluationEndDay, parseMonthRange, } from './helpers/evaluation-eligibility.utils';
|
|
413
|
-
export { DEFAULT_MAX_EMPLOYEES_PER_REQUEST, normalizeEmployeeSubmissions, resolveMaxEmployeesPerRequest, persistEmployeeEvaluationScores, } from './helpers/employee-evaluation-request.utils';
|
|
413
|
+
export { DEFAULT_MAX_EMPLOYEES_PER_REQUEST, normalizeEmployeeSubmissions, normalizeEmployeeDraftSubmissions, resolveMaxEmployeesPerRequest, persistEmployeeEvaluationScores, } from './helpers/employee-evaluation-request.utils';
|
|
414
414
|
export type { EmployeeEvaluationSubmitAnswer, EmployeeEvaluationSubmitEmployee, NormalizedEmployeeSubmission, } from './helpers/employee-evaluation-request.utils';
|
|
415
415
|
export { EmployeeEvaluationRequests, EmployeeEvaluationRequestStatus, EmployeeEvaluationRoutingBucket, } from './models/EmployeeEvaluationRequestModel';
|
|
416
416
|
export { EmployeeEvaluation, EmployeeEvaluationUsFeedback } from './models/EmployeeEvaluationModel';
|
package/dist/index.js
CHANGED
|
@@ -15,9 +15,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.collectFmServicesNotificationConfigRecipients = exports.ServicesNotificationTriggerType = exports.AppointmentWorkFlowStatus = exports.AppointmentMessageType = exports.AppointmentAttendeeStatus = exports.AppointmentApprovalStatus = exports.AppointmentAttendees = exports.AppointmentWorkFlow = exports.AppointmentRequestChat = exports.AppointmentRequestAttachment = exports.AppointmentApprovalDetails = exports.AppointmentRequestStatus = exports.AppointmentRequests = exports.TravelClass = exports.MissionTravelWorkFlowStatus = exports.MissionTravelApprovalStatus = exports.AllowanceRatio = exports.DecisionType = exports.MissionType = exports.MissionTravelStatus = exports.GatePassMessageType = exports.GatePassWorkFlowStatus = exports.GatePassApprovalStatus = exports.GatePassType = exports.GatePassRequestStatus = exports.SecurityDeptMessageType = exports.SecurityDeptAccessType = exports.SecurityDeptRequestStatus = exports.RetiredCardMessageType = exports.RetiredCardWorkFlowStatus = exports.RetiredCardApprovalStatus = exports.RetiredCardAccessType = exports.RetiredCardRequestStatus = exports.TitleCategory = exports.ProfileUpdateRequestStatus = exports.StayAfterHoursTransactionStatus = exports.StayAfterHoursTransaction = exports.StayAfterHoursBalance = exports.EarlyCheckoutTransactionStatus = exports.EarlyCheckoutTransaction = exports.EarlyCheckoutFrequency = exports.EarlyCheckoutConfiguration = exports.EarlyCheckoutBalance = exports.LeaveTransactionStatus = exports.LeaveTransaction = exports.LeaveConfigurationGrades = exports.enumFrequency = exports.LeaveConfiguration = exports.ParcelDepartmentCategory = exports.RegisterCandidateExperienceActivity = void 0;
|
|
18
|
-
exports.
|
|
19
|
-
exports.
|
|
20
|
-
exports.EvaluationFormQuestionType = void 0;
|
|
18
|
+
exports.InitiatorEmployeeNominationApprovalDetails = exports.InitiatorInitiativeType = exports.InitiatorEmployeeNominationRequestStatus = exports.InitiatorEmployeeNominationRequests = exports.IpeGrievanceRequestAttachment = exports.IpeGrievanceMessageType = exports.IpeGrievanceRequestChat = exports.IpeGrievanceWorkFlowStatus = exports.IpeGrievanceWorkFlow = exports.IpeGrievanceApprovalStatus = exports.IpeGrievanceApprovalDetails = exports.IpeGrievancePeriodRating = exports.IpeGrievanceExemptionReason = exports.IpeGrievancePeriodType = exports.IpeGrievanceFinalEvaluationResult = exports.IpeGrievanceRequestStatus = exports.IpeGrievanceRequests = exports.EmployeeEvaluationRequestAttachment = exports.EmployeeEvaluationMessageType = exports.EmployeeEvaluationRequestChat = exports.EmployeeEvaluationWorkFlowStatus = exports.EmployeeEvaluationWorkFlow = exports.EmployeeEvaluationApprovalStatus = exports.EmployeeEvaluationApprovalDetails = exports.EmployeeEvaluationPersonScore = exports.EmployeeEvaluationAnswers = exports.EmployeeEvaluationUsFeedback = exports.EmployeeEvaluation = exports.EmployeeEvaluationRoutingBucket = exports.EmployeeEvaluationRequestStatus = exports.EmployeeEvaluationRequests = exports.persistEmployeeEvaluationScores = exports.resolveMaxEmployeesPerRequest = exports.normalizeEmployeeDraftSubmissions = exports.normalizeEmployeeSubmissions = exports.DEFAULT_MAX_EMPLOYEES_PER_REQUEST = exports.parseMonthRange = exports.parseEvaluationEndDay = exports.parseEligibilityDateRange = exports.parseMonthDay = exports.mmDdSortKey = exports.mmDdWindowsOverlap = exports.isCalendarMonthInEligibilityRange = exports.isEvaluationEligibilityWindowOpen = exports.EvaluationEligibilitySettingEmployee = exports.EvaluationEligibilitySetting = exports.isPortalAdminFromRequest = exports.userHasPortalAdminRole = exports.parsePortalUserIdFromRequest = exports.sendFmServicesNotificationConfigNotifications = void 0;
|
|
19
|
+
exports.EvaluationFormSection = exports.EvaluationFormType = exports.EvaluationForm = exports.EmbassyEvaluationRequestAttachment = exports.EmbassyEvaluationMessageType = exports.EmbassyEvaluationRequestChat = exports.EmbassyEvaluationWorkFlowStatus = exports.EmbassyEvaluationWorkFlow = exports.EmbassyEvaluationApprovalStatus = exports.EmbassyEvaluationApprovalDetails = exports.EmbassyEvaluationRequestStatus = exports.EmbassyEvaluationRequests = exports.EmbassyEvaluationResponse = exports.EmbassyEvaluationAssignmentStatus = exports.EmbassyEvaluationAssignment = exports.EmbassyEvaluationCycleStatus = exports.EmbassyEvaluationCycle = exports.EmployeeOfMonthSupportNominationRequestAttachment = exports.EmployeeOfMonthSupportNominationMessageType = exports.EmployeeOfMonthSupportNominationRequestChat = exports.EmployeeOfMonthSupportNominationWorkFlowStatus = exports.EmployeeOfMonthSupportNominationWorkFlow = exports.EmployeeOfMonthSupportNominationApprovalStatus = exports.EmployeeOfMonthSupportNominationApprovalDetails = exports.EmployeeOfMonthSupportNominationRequestStatus = exports.EmployeeOfMonthSupportNominationRequests = exports.EmployeeOfMonthNominationRequestAttachment = exports.EmployeeOfMonthNominationMessageType = exports.EmployeeOfMonthNominationRequestChat = exports.EmployeeOfMonthNominationWorkFlowStatus = exports.EmployeeOfMonthNominationWorkFlow = exports.EmployeeOfMonthNominationApprovalStatus = exports.EmployeeOfMonthNominationApprovalDetails = exports.EmployeeOfMonthNominationRequestStatus = exports.EmployeeOfMonthNominationRequests = exports.InnovativeEmployeeNominationRequestAttachment = exports.InnovativeEmployeeNominationMessageType = exports.InnovativeEmployeeNominationRequestChat = exports.InnovativeEmployeeNominationWorkFlowStatus = exports.InnovativeEmployeeNominationWorkFlow = exports.InnovativeEmployeeNominationApprovalStatus = exports.InnovativeEmployeeNominationApprovalDetails = exports.InnovativeEmployeeNominationRequestStatus = exports.InnovativeEmployeeNominationRequests = exports.InitiatorEmployeeNominationRequestAttachment = exports.InitiatorEmployeeNominationMessageType = exports.InitiatorEmployeeNominationRequestChat = exports.InitiatorEmployeeNominationWorkFlowStatus = exports.InitiatorEmployeeNominationWorkFlow = exports.InitiatorEmployeeNominationApprovalStatus = void 0;
|
|
20
|
+
exports.EvaluationFormQuestionType = exports.EvaluationFormQuestion = void 0;
|
|
21
21
|
__exportStar(require("./models/user"), exports);
|
|
22
22
|
__exportStar(require("./models/role"), exports);
|
|
23
23
|
__exportStar(require("./models/user-sessions"), exports);
|
|
@@ -516,6 +516,7 @@ Object.defineProperty(exports, "parseMonthRange", { enumerable: true, get: funct
|
|
|
516
516
|
var employee_evaluation_request_utils_1 = require("./helpers/employee-evaluation-request.utils");
|
|
517
517
|
Object.defineProperty(exports, "DEFAULT_MAX_EMPLOYEES_PER_REQUEST", { enumerable: true, get: function () { return employee_evaluation_request_utils_1.DEFAULT_MAX_EMPLOYEES_PER_REQUEST; } });
|
|
518
518
|
Object.defineProperty(exports, "normalizeEmployeeSubmissions", { enumerable: true, get: function () { return employee_evaluation_request_utils_1.normalizeEmployeeSubmissions; } });
|
|
519
|
+
Object.defineProperty(exports, "normalizeEmployeeDraftSubmissions", { enumerable: true, get: function () { return employee_evaluation_request_utils_1.normalizeEmployeeDraftSubmissions; } });
|
|
519
520
|
Object.defineProperty(exports, "resolveMaxEmployeesPerRequest", { enumerable: true, get: function () { return employee_evaluation_request_utils_1.resolveMaxEmployeesPerRequest; } });
|
|
520
521
|
Object.defineProperty(exports, "persistEmployeeEvaluationScores", { enumerable: true, get: function () { return employee_evaluation_request_utils_1.persistEmployeeEvaluationScores; } });
|
|
521
522
|
var EmployeeEvaluationRequestModel_1 = require("./models/EmployeeEvaluationRequestModel");
|
|
@@ -0,0 +1,14 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
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);
|
|
@@ -34,6 +34,7 @@ export declare class EmployeeEvaluationRequests extends BaseModel {
|
|
|
34
34
|
total_score: number | null;
|
|
35
35
|
average_score: number | null;
|
|
36
36
|
employee_count: number;
|
|
37
|
+
is_draft: boolean;
|
|
37
38
|
/** Form structure snapshot at request creation (sections/questions). */
|
|
38
39
|
dynamic_evaluation_form: Record<string, unknown> | null;
|
|
39
40
|
}
|
|
@@ -111,6 +111,10 @@ __decorate([
|
|
|
111
111
|
(0, typeorm_1.Column)({ type: 'int', default: 0, nullable: false }),
|
|
112
112
|
__metadata("design:type", Number)
|
|
113
113
|
], EmployeeEvaluationRequests.prototype, "employee_count", void 0);
|
|
114
|
+
__decorate([
|
|
115
|
+
(0, typeorm_1.Column)({ type: 'boolean', default: false, nullable: false }),
|
|
116
|
+
__metadata("design:type", Boolean)
|
|
117
|
+
], EmployeeEvaluationRequests.prototype, "is_draft", void 0);
|
|
114
118
|
__decorate([
|
|
115
119
|
(0, typeorm_1.Column)({ type: 'jsonb', nullable: true }),
|
|
116
120
|
__metadata("design:type", Object)
|
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
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);
|
|
@@ -0,0 +1,10 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
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);
|
|
@@ -0,0 +1,36 @@
|
|
|
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);
|
|
@@ -0,0 +1,60 @@
|
|
|
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
|
+
}
|