@platform-modules/foreign-ministry 1.3.277 → 1.3.286
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 +10 -5
- package/dist/data-source.js +6 -4
- package/dist/helpers/evaluation-eligibility.utils.d.ts +10 -0
- package/dist/helpers/evaluation-eligibility.utils.js +39 -0
- package/dist/index.d.ts +4 -2
- package/dist/index.js +13 -5
- package/dist/models/EmployeeEvaluationAnswerModel.d.ts +6 -4
- package/dist/models/EmployeeEvaluationAnswerModel.js +6 -6
- package/dist/models/EvaluationEligibilitySettingModel.d.ts +6 -3
- package/dist/models/EvaluationEligibilitySettingModel.js +7 -3
- package/dist/models/EvaluationFormModel.d.ts +17 -0
- package/dist/models/EvaluationFormModel.js +64 -0
- package/dist/models/EvaluationFormQuestionModel.d.ts +22 -0
- package/dist/models/EvaluationFormQuestionModel.js +78 -0
- package/dist/models/EvaluationFormSectionModel.d.ts +12 -0
- package/dist/models/EvaluationFormSectionModel.js +54 -0
- package/dist/models/EvaluationMastersModel.d.ts +16 -0
- package/dist/models/EvaluationMastersModel.js +67 -0
- package/dist/models/EvaluationWorkflowModel.d.ts +60 -0
- package/dist/models/EvaluationWorkflowModel.js +215 -0
- package/dist/models/IneligibleForEvaluationModel.d.ts +8 -0
- package/dist/models/IneligibleForEvaluationModel.js +44 -0
- package/dist/models/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/UuidAuditModel.d.ts +9 -0
- package/dist/models/UuidAuditModel.js +41 -0
- package/package.json +1 -1
- package/src/data-source.ts +6 -4
- package/src/helpers/evaluation-eligibility.utils.ts +36 -0
- package/src/index.ts +15 -3
- package/src/models/AnnualTravelTicketPriceConfigurationItemModel.ts +36 -36
- package/src/models/AnnualTravelTicketPriceConfigurationModel.ts +35 -35
- package/src/models/AnnualTravelTicketRequestModel.ts +42 -42
- package/src/models/DiplomaticAcademyRequestModel.ts +80 -80
- package/src/models/DocumentationFileModel.ts +40 -40
- package/src/models/EmployeeEvaluationAnswerModel.ts +8 -6
- package/src/models/EvaluationEligibilitySettingModel.ts +9 -4
- package/src/models/EvaluationFormModel.ts +40 -0
- package/src/models/EvaluationFormQuestionModel.ts +52 -0
- package/src/models/EvaluationFormSectionModel.ts +33 -0
- package/src/models/FinancialWorkFlowModel.ts +15 -15
- package/src/models/GatePassVisitorsModel.ts +7 -7
- package/src/models/LMSExternalEntityTrainedPersonModel.ts +45 -45
- package/src/models/LanguageCourseRequestModel.ts +67 -67
- package/src/models/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/PollOptionsModel.ts +26 -26
- package/src/models/PollVotesModel.ts +37 -37
- package/src/models/PollsModel.ts +49 -49
- package/src/models/ProjectContactsModel.ts +51 -51
- package/src/models/ProjectFaqModel.ts +36 -36
- package/src/models/ProjectInvoicesModel.ts +41 -41
- package/src/models/ProjectModel.ts +75 -75
- package/src/models/ProjectTasksModel.ts +75 -75
- package/src/models/ResignationTerminationApprovalModel.ts +9 -9
- package/src/models/ResignationTerminationRequestModel.ts +17 -17
- package/src/models/SectionModel.ts +35 -35
- package/src/models/ServicesNotificationConfigsModel.ts +55 -55
- package/src/models/TelephoneDirectoryModel.ts +20 -20
- package/dist/models/EmbassyMasterModel.d.ts +0 -16
- package/dist/models/EmbassyMasterModel.js +0 -75
- package/dist/models/UserDependentsModel.d.ts +0 -18
- package/dist/models/UserDependentsModel.js +0 -94
- package/src/models/EvaluationQuestionMasterModel.ts +0 -23
- package/src/models/EvaluationSectionMasterModel.ts +0 -17
package/.env
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
DB_HOST=localhost
|
|
2
|
-
DB_PORT=5432
|
|
3
|
-
DB_USER=postgres
|
|
4
|
-
DB_PASS=
|
|
5
|
-
DB_NAME=FM
|
|
1
|
+
# DB_HOST=localhost
|
|
2
|
+
# DB_PORT=5432
|
|
3
|
+
# DB_USER=postgres
|
|
4
|
+
# DB_PASS=stevejobs
|
|
5
|
+
# DB_NAME=FM
|
|
6
|
+
|
|
7
|
+
DB_HOST = 164.52.222.169
|
|
8
|
+
DB_USER = postgres_admin_user
|
|
9
|
+
DB_PASS = pg_admin_user_pwd_caa_fa_$%^&OIukhjgcvbn
|
|
10
|
+
DB_NAME= FM
|
package/dist/data-source.js
CHANGED
|
@@ -285,8 +285,9 @@ const DocumentationFileModel_1 = require("./models/DocumentationFileModel");
|
|
|
285
285
|
const UniversalLanguageMasterModel_1 = require("./models/UniversalLanguageMasterModel");
|
|
286
286
|
const MeetingAppointmentReminderLogModel_1 = require("./models/MeetingAppointmentReminderLogModel");
|
|
287
287
|
const EvaluationEligibilitySettingModel_1 = require("./models/EvaluationEligibilitySettingModel");
|
|
288
|
-
const
|
|
289
|
-
const
|
|
288
|
+
const EvaluationFormModel_1 = require("./models/EvaluationFormModel");
|
|
289
|
+
const EvaluationFormSectionModel_1 = require("./models/EvaluationFormSectionModel");
|
|
290
|
+
const EvaluationFormQuestionModel_1 = require("./models/EvaluationFormQuestionModel");
|
|
290
291
|
const EmployeeEvaluationRequestModel_1 = require("./models/EmployeeEvaluationRequestModel");
|
|
291
292
|
const EmployeeEvaluationModel_1 = require("./models/EmployeeEvaluationModel");
|
|
292
293
|
const EmployeeEvaluationAnswerModel_1 = require("./models/EmployeeEvaluationAnswerModel");
|
|
@@ -585,8 +586,9 @@ exports.AppDataSource = new typeorm_1.DataSource({
|
|
|
585
586
|
MeetingAppointmentReminderLogModel_1.MeetingAppointmentReminderLog,
|
|
586
587
|
EvaluationEligibilitySettingModel_1.EvaluationEligibilitySetting,
|
|
587
588
|
EvaluationEligibilitySettingModel_1.EvaluationEligibilitySettingEmployee,
|
|
588
|
-
|
|
589
|
-
|
|
589
|
+
EvaluationFormModel_1.EvaluationForm,
|
|
590
|
+
EvaluationFormSectionModel_1.EvaluationFormSection,
|
|
591
|
+
EvaluationFormQuestionModel_1.EvaluationFormQuestion,
|
|
590
592
|
EmployeeEvaluationRequestModel_1.EmployeeEvaluationRequests,
|
|
591
593
|
EmployeeEvaluationModel_1.EmployeeEvaluation,
|
|
592
594
|
EmployeeEvaluationAnswerModel_1.EmployeeEvaluationAnswers,
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whether evaluations are still open for a setting's month range.
|
|
3
|
+
* `evaluation_end_date` is the last calendar day (1–31) of each month in the range.
|
|
4
|
+
*/
|
|
5
|
+
export declare function isEvaluationEligibilityWindowOpen(fromMonth: number, toMonth: number, evaluationEndDay: number, referenceDate?: Date): boolean;
|
|
6
|
+
export declare function parseEvaluationEndDay(input: unknown): number | null;
|
|
7
|
+
export declare function parseMonthRange(fromInput: unknown, toInput: unknown): {
|
|
8
|
+
from_month: number;
|
|
9
|
+
to_month: number;
|
|
10
|
+
} | null;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isEvaluationEligibilityWindowOpen = isEvaluationEligibilityWindowOpen;
|
|
4
|
+
exports.parseEvaluationEndDay = parseEvaluationEndDay;
|
|
5
|
+
exports.parseMonthRange = parseMonthRange;
|
|
6
|
+
/**
|
|
7
|
+
* Whether evaluations are still open for a setting's month range.
|
|
8
|
+
* `evaluation_end_date` is the last calendar day (1–31) of each month in the range.
|
|
9
|
+
*/
|
|
10
|
+
function isEvaluationEligibilityWindowOpen(fromMonth, toMonth, evaluationEndDay, referenceDate = new Date()) {
|
|
11
|
+
const month = referenceDate.getUTCMonth() + 1;
|
|
12
|
+
const day = referenceDate.getUTCDate();
|
|
13
|
+
if (month < fromMonth || month > toMonth)
|
|
14
|
+
return false;
|
|
15
|
+
if (!Number.isFinite(evaluationEndDay) || evaluationEndDay < 1 || evaluationEndDay > 31)
|
|
16
|
+
return false;
|
|
17
|
+
return day <= evaluationEndDay;
|
|
18
|
+
}
|
|
19
|
+
function parseEvaluationEndDay(input) {
|
|
20
|
+
if (input == null || input === '')
|
|
21
|
+
return null;
|
|
22
|
+
const n = typeof input === 'number' ? input : parseInt(String(input).trim(), 10);
|
|
23
|
+
if (!Number.isFinite(n) || n < 1 || n > 31)
|
|
24
|
+
return null;
|
|
25
|
+
return Math.floor(n);
|
|
26
|
+
}
|
|
27
|
+
function parseMonthRange(fromInput, toInput) {
|
|
28
|
+
const from_month = typeof fromInput === 'number' ? fromInput : parseInt(String(fromInput).trim(), 10);
|
|
29
|
+
const to_month = typeof toInput === 'number' ? toInput : parseInt(String(toInput).trim(), 10);
|
|
30
|
+
if (!Number.isFinite(from_month) || !Number.isFinite(to_month))
|
|
31
|
+
return null;
|
|
32
|
+
if (!Number.isInteger(from_month) || !Number.isInteger(to_month))
|
|
33
|
+
return null;
|
|
34
|
+
if (from_month < 1 || from_month > 12 || to_month < 1 || to_month > 12)
|
|
35
|
+
return null;
|
|
36
|
+
if (from_month > to_month)
|
|
37
|
+
return null;
|
|
38
|
+
return { from_month, to_month };
|
|
39
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -406,8 +406,7 @@ export * from './models/ServicesNotificationConfigsModel';
|
|
|
406
406
|
export { ServicesNotificationTriggerType } from './models/ServicesNotificationConfigsModel';
|
|
407
407
|
export * from './models/MoodleUsersModel';
|
|
408
408
|
export { EvaluationEligibilitySetting, EvaluationEligibilitySettingEmployee, } from './models/EvaluationEligibilitySettingModel';
|
|
409
|
-
export {
|
|
410
|
-
export { EvaluationQuestionMaster } from './models/EvaluationQuestionMasterModel';
|
|
409
|
+
export { isEvaluationEligibilityWindowOpen, parseEvaluationEndDay, parseMonthRange, } from './helpers/evaluation-eligibility.utils';
|
|
411
410
|
export { EmployeeEvaluationRequests, EmployeeEvaluationRequestStatus, EmployeeEvaluationRoutingBucket, } from './models/EmployeeEvaluationRequestModel';
|
|
412
411
|
export { EmployeeEvaluation, EmployeeEvaluationUsFeedback } from './models/EmployeeEvaluationModel';
|
|
413
412
|
export { EmployeeEvaluationAnswers } from './models/EmployeeEvaluationAnswerModel';
|
|
@@ -415,3 +414,6 @@ export { EmployeeEvaluationApprovalDetails, EmployeeEvaluationApprovalStatus, }
|
|
|
415
414
|
export { EmployeeEvaluationWorkFlow, EmployeeEvaluationWorkFlowStatus, } from './models/EmployeeEvaluationWorkflowModel';
|
|
416
415
|
export { EmployeeEvaluationRequestChat, EmployeeEvaluationMessageType, } from './models/EmployeeEvaluationChatModel';
|
|
417
416
|
export { EmployeeEvaluationRequestAttachment } from './models/EmployeeEvaluationAttachmentModel';
|
|
417
|
+
export { EvaluationForm, EvaluationFormType, } from './models/EvaluationFormModel';
|
|
418
|
+
export { EvaluationFormSection } from './models/EvaluationFormSectionModel';
|
|
419
|
+
export { EvaluationFormQuestion, EvaluationFormQuestionType, } from './models/EvaluationFormQuestionModel';
|
package/dist/index.js
CHANGED
|
@@ -15,7 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.EvaluationEligibilitySetting = 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.EmployeeEvaluationRequestAttachment = exports.EmployeeEvaluationMessageType = exports.EmployeeEvaluationRequestChat = exports.EmployeeEvaluationWorkFlowStatus = exports.EmployeeEvaluationWorkFlow = exports.EmployeeEvaluationApprovalStatus = exports.EmployeeEvaluationApprovalDetails = exports.EmployeeEvaluationAnswers = exports.EmployeeEvaluationUsFeedback = exports.EmployeeEvaluation = exports.EmployeeEvaluationRoutingBucket = exports.EmployeeEvaluationRequestStatus = exports.EmployeeEvaluationRequests = exports.
|
|
18
|
+
exports.EvaluationFormQuestionType = exports.EvaluationFormQuestion = exports.EvaluationFormSection = exports.EvaluationFormType = exports.EvaluationForm = exports.EmployeeEvaluationRequestAttachment = exports.EmployeeEvaluationMessageType = exports.EmployeeEvaluationRequestChat = exports.EmployeeEvaluationWorkFlowStatus = exports.EmployeeEvaluationWorkFlow = exports.EmployeeEvaluationApprovalStatus = exports.EmployeeEvaluationApprovalDetails = exports.EmployeeEvaluationAnswers = exports.EmployeeEvaluationUsFeedback = exports.EmployeeEvaluation = exports.EmployeeEvaluationRoutingBucket = exports.EmployeeEvaluationRequestStatus = exports.EmployeeEvaluationRequests = exports.parseMonthRange = exports.parseEvaluationEndDay = exports.isEvaluationEligibilityWindowOpen = exports.EvaluationEligibilitySettingEmployee = void 0;
|
|
19
19
|
__exportStar(require("./models/user"), exports);
|
|
20
20
|
__exportStar(require("./models/role"), exports);
|
|
21
21
|
__exportStar(require("./models/user-sessions"), exports);
|
|
@@ -495,10 +495,10 @@ __exportStar(require("./models/MoodleUsersModel"), exports);
|
|
|
495
495
|
var EvaluationEligibilitySettingModel_1 = require("./models/EvaluationEligibilitySettingModel");
|
|
496
496
|
Object.defineProperty(exports, "EvaluationEligibilitySetting", { enumerable: true, get: function () { return EvaluationEligibilitySettingModel_1.EvaluationEligibilitySetting; } });
|
|
497
497
|
Object.defineProperty(exports, "EvaluationEligibilitySettingEmployee", { enumerable: true, get: function () { return EvaluationEligibilitySettingModel_1.EvaluationEligibilitySettingEmployee; } });
|
|
498
|
-
var
|
|
499
|
-
Object.defineProperty(exports, "
|
|
500
|
-
|
|
501
|
-
Object.defineProperty(exports, "
|
|
498
|
+
var evaluation_eligibility_utils_1 = require("./helpers/evaluation-eligibility.utils");
|
|
499
|
+
Object.defineProperty(exports, "isEvaluationEligibilityWindowOpen", { enumerable: true, get: function () { return evaluation_eligibility_utils_1.isEvaluationEligibilityWindowOpen; } });
|
|
500
|
+
Object.defineProperty(exports, "parseEvaluationEndDay", { enumerable: true, get: function () { return evaluation_eligibility_utils_1.parseEvaluationEndDay; } });
|
|
501
|
+
Object.defineProperty(exports, "parseMonthRange", { enumerable: true, get: function () { return evaluation_eligibility_utils_1.parseMonthRange; } });
|
|
502
502
|
var EmployeeEvaluationRequestModel_1 = require("./models/EmployeeEvaluationRequestModel");
|
|
503
503
|
Object.defineProperty(exports, "EmployeeEvaluationRequests", { enumerable: true, get: function () { return EmployeeEvaluationRequestModel_1.EmployeeEvaluationRequests; } });
|
|
504
504
|
Object.defineProperty(exports, "EmployeeEvaluationRequestStatus", { enumerable: true, get: function () { return EmployeeEvaluationRequestModel_1.EmployeeEvaluationRequestStatus; } });
|
|
@@ -519,3 +519,11 @@ Object.defineProperty(exports, "EmployeeEvaluationRequestChat", { enumerable: tr
|
|
|
519
519
|
Object.defineProperty(exports, "EmployeeEvaluationMessageType", { enumerable: true, get: function () { return EmployeeEvaluationChatModel_1.EmployeeEvaluationMessageType; } });
|
|
520
520
|
var EmployeeEvaluationAttachmentModel_1 = require("./models/EmployeeEvaluationAttachmentModel");
|
|
521
521
|
Object.defineProperty(exports, "EmployeeEvaluationRequestAttachment", { enumerable: true, get: function () { return EmployeeEvaluationAttachmentModel_1.EmployeeEvaluationRequestAttachment; } });
|
|
522
|
+
var EvaluationFormModel_1 = require("./models/EvaluationFormModel");
|
|
523
|
+
Object.defineProperty(exports, "EvaluationForm", { enumerable: true, get: function () { return EvaluationFormModel_1.EvaluationForm; } });
|
|
524
|
+
Object.defineProperty(exports, "EvaluationFormType", { enumerable: true, get: function () { return EvaluationFormModel_1.EvaluationFormType; } });
|
|
525
|
+
var EvaluationFormSectionModel_1 = require("./models/EvaluationFormSectionModel");
|
|
526
|
+
Object.defineProperty(exports, "EvaluationFormSection", { enumerable: true, get: function () { return EvaluationFormSectionModel_1.EvaluationFormSection; } });
|
|
527
|
+
var EvaluationFormQuestionModel_1 = require("./models/EvaluationFormQuestionModel");
|
|
528
|
+
Object.defineProperty(exports, "EvaluationFormQuestion", { enumerable: true, get: function () { return EvaluationFormQuestionModel_1.EvaluationFormQuestion; } });
|
|
529
|
+
Object.defineProperty(exports, "EvaluationFormQuestionType", { enumerable: true, get: function () { return EvaluationFormQuestionModel_1.EvaluationFormQuestionType; } });
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { BaseModel } from './BaseModel';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { EvaluationFormSection } from './EvaluationFormSectionModel';
|
|
3
|
+
import { EvaluationFormQuestion } from './EvaluationFormQuestionModel';
|
|
4
4
|
import { EmployeeEvaluation } from './EmployeeEvaluationModel';
|
|
5
5
|
export declare class EmployeeEvaluationAnswers extends BaseModel {
|
|
6
6
|
employee_evaluation: EmployeeEvaluation;
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
/** Form section (replaces legacy evaluation_section_master). */
|
|
8
|
+
evaluation_section: EvaluationFormSection;
|
|
9
|
+
/** Form question (replaces legacy evaluation_question_master). */
|
|
10
|
+
evaluation_question: EvaluationFormQuestion;
|
|
9
11
|
score: number;
|
|
10
12
|
remarks: string | null;
|
|
11
13
|
}
|
|
@@ -12,8 +12,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.EmployeeEvaluationAnswers = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const BaseModel_1 = require("./BaseModel");
|
|
15
|
-
const
|
|
16
|
-
const
|
|
15
|
+
const EvaluationFormSectionModel_1 = require("./EvaluationFormSectionModel");
|
|
16
|
+
const EvaluationFormQuestionModel_1 = require("./EvaluationFormQuestionModel");
|
|
17
17
|
const EmployeeEvaluationModel_1 = require("./EmployeeEvaluationModel");
|
|
18
18
|
let EmployeeEvaluationAnswers = class EmployeeEvaluationAnswers extends BaseModel_1.BaseModel {
|
|
19
19
|
};
|
|
@@ -24,14 +24,14 @@ __decorate([
|
|
|
24
24
|
__metadata("design:type", EmployeeEvaluationModel_1.EmployeeEvaluation)
|
|
25
25
|
], EmployeeEvaluationAnswers.prototype, "employee_evaluation", void 0);
|
|
26
26
|
__decorate([
|
|
27
|
-
(0, typeorm_1.ManyToOne)(() =>
|
|
27
|
+
(0, typeorm_1.ManyToOne)(() => EvaluationFormSectionModel_1.EvaluationFormSection, { onDelete: 'RESTRICT' }),
|
|
28
28
|
(0, typeorm_1.JoinColumn)({ name: 'evaluation_section_id' }),
|
|
29
|
-
__metadata("design:type",
|
|
29
|
+
__metadata("design:type", EvaluationFormSectionModel_1.EvaluationFormSection)
|
|
30
30
|
], EmployeeEvaluationAnswers.prototype, "evaluation_section", void 0);
|
|
31
31
|
__decorate([
|
|
32
|
-
(0, typeorm_1.ManyToOne)(() =>
|
|
32
|
+
(0, typeorm_1.ManyToOne)(() => EvaluationFormQuestionModel_1.EvaluationFormQuestion, { onDelete: 'RESTRICT' }),
|
|
33
33
|
(0, typeorm_1.JoinColumn)({ name: 'evaluation_question_id' }),
|
|
34
|
-
__metadata("design:type",
|
|
34
|
+
__metadata("design:type", EvaluationFormQuestionModel_1.EvaluationFormQuestion)
|
|
35
35
|
], EmployeeEvaluationAnswers.prototype, "evaluation_question", void 0);
|
|
36
36
|
__decorate([
|
|
37
37
|
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
@@ -6,9 +6,12 @@ import { BaseModel } from './BaseModel';
|
|
|
6
6
|
export declare class EvaluationEligibilitySetting extends BaseModel {
|
|
7
7
|
department_id: number;
|
|
8
8
|
section_id: number;
|
|
9
|
-
/**
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
/** Evaluation window start month (1–12). */
|
|
10
|
+
from_month: number;
|
|
11
|
+
/** Evaluation window end month (1–12), inclusive. */
|
|
12
|
+
to_month: number;
|
|
13
|
+
/** Last day of the evaluation month (1–31) when submissions close. */
|
|
14
|
+
evaluation_end_date: number;
|
|
12
15
|
is_active: boolean;
|
|
13
16
|
employees?: EvaluationEligibilitySettingEmployee[];
|
|
14
17
|
}
|
|
@@ -30,10 +30,14 @@ __decorate([
|
|
|
30
30
|
__decorate([
|
|
31
31
|
(0, typeorm_1.Column)({ type: 'int' }),
|
|
32
32
|
__metadata("design:type", Number)
|
|
33
|
-
], EvaluationEligibilitySetting.prototype, "
|
|
33
|
+
], EvaluationEligibilitySetting.prototype, "from_month", void 0);
|
|
34
34
|
__decorate([
|
|
35
|
-
(0, typeorm_1.Column)({ type: '
|
|
36
|
-
__metadata("design:type",
|
|
35
|
+
(0, typeorm_1.Column)({ type: 'int' }),
|
|
36
|
+
__metadata("design:type", Number)
|
|
37
|
+
], EvaluationEligibilitySetting.prototype, "to_month", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typeorm_1.Column)({ type: 'int' }),
|
|
40
|
+
__metadata("design:type", Number)
|
|
37
41
|
], EvaluationEligibilitySetting.prototype, "evaluation_end_date", void 0);
|
|
38
42
|
__decorate([
|
|
39
43
|
(0, typeorm_1.Column)({ type: 'boolean', default: true }),
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
import { EvaluationFormSection } from './EvaluationFormSectionModel';
|
|
3
|
+
export declare enum EvaluationFormType {
|
|
4
|
+
EMPLOYEE_EVALUATION = "employee_evaluation",
|
|
5
|
+
DEPARTMENT = "department"
|
|
6
|
+
}
|
|
7
|
+
export declare class EvaluationForm extends BaseModel {
|
|
8
|
+
form_name: string;
|
|
9
|
+
form_code: string;
|
|
10
|
+
form_type: EvaluationFormType;
|
|
11
|
+
department_id: number | null;
|
|
12
|
+
section_id: number | null;
|
|
13
|
+
min_score: number;
|
|
14
|
+
max_score: number;
|
|
15
|
+
is_active: boolean;
|
|
16
|
+
sections?: EvaluationFormSection[];
|
|
17
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
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.EvaluationForm = exports.EvaluationFormType = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
const EvaluationFormSectionModel_1 = require("./EvaluationFormSectionModel");
|
|
16
|
+
var EvaluationFormType;
|
|
17
|
+
(function (EvaluationFormType) {
|
|
18
|
+
EvaluationFormType["EMPLOYEE_EVALUATION"] = "employee_evaluation";
|
|
19
|
+
EvaluationFormType["DEPARTMENT"] = "department";
|
|
20
|
+
})(EvaluationFormType || (exports.EvaluationFormType = EvaluationFormType = {}));
|
|
21
|
+
let EvaluationForm = class EvaluationForm extends BaseModel_1.BaseModel {
|
|
22
|
+
};
|
|
23
|
+
exports.EvaluationForm = EvaluationForm;
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: false }),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], EvaluationForm.prototype, "form_name", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 64, nullable: false }),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], EvaluationForm.prototype, "form_code", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 32, nullable: false }),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], EvaluationForm.prototype, "form_type", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
38
|
+
__metadata("design:type", Object)
|
|
39
|
+
], EvaluationForm.prototype, "department_id", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
42
|
+
__metadata("design:type", Object)
|
|
43
|
+
], EvaluationForm.prototype, "section_id", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, typeorm_1.Column)({ type: 'int', default: 0 }),
|
|
46
|
+
__metadata("design:type", Number)
|
|
47
|
+
], EvaluationForm.prototype, "min_score", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, typeorm_1.Column)({ type: 'int', default: 10 }),
|
|
50
|
+
__metadata("design:type", Number)
|
|
51
|
+
], EvaluationForm.prototype, "max_score", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, typeorm_1.Column)({ type: 'boolean', default: true }),
|
|
54
|
+
__metadata("design:type", Boolean)
|
|
55
|
+
], EvaluationForm.prototype, "is_active", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, typeorm_1.OneToMany)(() => EvaluationFormSectionModel_1.EvaluationFormSection, (s) => s.form),
|
|
58
|
+
__metadata("design:type", Array)
|
|
59
|
+
], EvaluationForm.prototype, "sections", void 0);
|
|
60
|
+
exports.EvaluationForm = EvaluationForm = __decorate([
|
|
61
|
+
(0, typeorm_1.Entity)({ name: 'evaluation_forms' }),
|
|
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' })
|
|
64
|
+
], EvaluationForm);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
import { EvaluationFormSection } from './EvaluationFormSectionModel';
|
|
3
|
+
export declare enum EvaluationFormQuestionType {
|
|
4
|
+
RATING = "rating",
|
|
5
|
+
TEXT = "text",
|
|
6
|
+
TEXTAREA = "textarea",
|
|
7
|
+
DROPDOWN = "dropdown",
|
|
8
|
+
CHECKBOX = "checkbox"
|
|
9
|
+
}
|
|
10
|
+
export declare class EvaluationFormQuestion extends BaseModel {
|
|
11
|
+
form_section_id: number;
|
|
12
|
+
section: EvaluationFormSection;
|
|
13
|
+
question_text: string;
|
|
14
|
+
question_type: EvaluationFormQuestionType;
|
|
15
|
+
min_score: number;
|
|
16
|
+
max_score: number;
|
|
17
|
+
is_required: boolean;
|
|
18
|
+
display_order: number;
|
|
19
|
+
help_text: string | null;
|
|
20
|
+
options_json: string[] | null;
|
|
21
|
+
is_active: boolean;
|
|
22
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
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.EvaluationFormQuestion = exports.EvaluationFormQuestionType = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
const EvaluationFormSectionModel_1 = require("./EvaluationFormSectionModel");
|
|
16
|
+
var EvaluationFormQuestionType;
|
|
17
|
+
(function (EvaluationFormQuestionType) {
|
|
18
|
+
EvaluationFormQuestionType["RATING"] = "rating";
|
|
19
|
+
EvaluationFormQuestionType["TEXT"] = "text";
|
|
20
|
+
EvaluationFormQuestionType["TEXTAREA"] = "textarea";
|
|
21
|
+
EvaluationFormQuestionType["DROPDOWN"] = "dropdown";
|
|
22
|
+
EvaluationFormQuestionType["CHECKBOX"] = "checkbox";
|
|
23
|
+
})(EvaluationFormQuestionType || (exports.EvaluationFormQuestionType = EvaluationFormQuestionType = {}));
|
|
24
|
+
let EvaluationFormQuestion = class EvaluationFormQuestion extends BaseModel_1.BaseModel {
|
|
25
|
+
};
|
|
26
|
+
exports.EvaluationFormQuestion = EvaluationFormQuestion;
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
29
|
+
__metadata("design:type", Number)
|
|
30
|
+
], EvaluationFormQuestion.prototype, "form_section_id", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, typeorm_1.ManyToOne)(() => EvaluationFormSectionModel_1.EvaluationFormSection, (s) => s.questions, { onDelete: 'CASCADE' }),
|
|
33
|
+
(0, typeorm_1.JoinColumn)({ name: 'form_section_id' }),
|
|
34
|
+
__metadata("design:type", EvaluationFormSectionModel_1.EvaluationFormSection)
|
|
35
|
+
], EvaluationFormQuestion.prototype, "section", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: false }),
|
|
38
|
+
__metadata("design:type", String)
|
|
39
|
+
], EvaluationFormQuestion.prototype, "question_text", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 32, nullable: false, default: EvaluationFormQuestionType.RATING }),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], EvaluationFormQuestion.prototype, "question_type", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, typeorm_1.Column)({ type: 'int', default: 0 }),
|
|
46
|
+
__metadata("design:type", Number)
|
|
47
|
+
], EvaluationFormQuestion.prototype, "min_score", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, typeorm_1.Column)({ type: 'int', default: 10 }),
|
|
50
|
+
__metadata("design:type", Number)
|
|
51
|
+
], EvaluationFormQuestion.prototype, "max_score", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, typeorm_1.Column)({ type: 'boolean', default: false }),
|
|
54
|
+
__metadata("design:type", Boolean)
|
|
55
|
+
], EvaluationFormQuestion.prototype, "is_required", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, typeorm_1.Column)({ type: 'int', default: 0 }),
|
|
58
|
+
__metadata("design:type", Number)
|
|
59
|
+
], EvaluationFormQuestion.prototype, "display_order", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
62
|
+
__metadata("design:type", Object)
|
|
63
|
+
], EvaluationFormQuestion.prototype, "help_text", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, typeorm_1.Column)({ type: 'jsonb', nullable: true }),
|
|
66
|
+
__metadata("design:type", Object)
|
|
67
|
+
], EvaluationFormQuestion.prototype, "options_json", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, typeorm_1.Column)({ type: 'boolean', default: true }),
|
|
70
|
+
__metadata("design:type", Boolean)
|
|
71
|
+
], EvaluationFormQuestion.prototype, "is_active", void 0);
|
|
72
|
+
exports.EvaluationFormQuestion = EvaluationFormQuestion = __decorate([
|
|
73
|
+
(0, typeorm_1.Entity)({ name: 'evaluation_form_questions' }),
|
|
74
|
+
(0, typeorm_1.Index)('uq_evaluation_form_questions_section_display_order', ['form_section_id', 'display_order'], {
|
|
75
|
+
unique: true,
|
|
76
|
+
where: '"is_deleted" = false',
|
|
77
|
+
})
|
|
78
|
+
], EvaluationFormQuestion);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
import { EvaluationForm } from './EvaluationFormModel';
|
|
3
|
+
import type { EvaluationFormQuestion } from './EvaluationFormQuestionModel';
|
|
4
|
+
export declare class EvaluationFormSection extends BaseModel {
|
|
5
|
+
form_id: number;
|
|
6
|
+
form: EvaluationForm;
|
|
7
|
+
section_title: string;
|
|
8
|
+
section_description: string | null;
|
|
9
|
+
display_order: number;
|
|
10
|
+
is_active: boolean;
|
|
11
|
+
questions?: EvaluationFormQuestion[];
|
|
12
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
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.EvaluationFormSection = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
const EvaluationFormModel_1 = require("./EvaluationFormModel");
|
|
16
|
+
let EvaluationFormSection = class EvaluationFormSection extends BaseModel_1.BaseModel {
|
|
17
|
+
};
|
|
18
|
+
exports.EvaluationFormSection = EvaluationFormSection;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
21
|
+
__metadata("design:type", Number)
|
|
22
|
+
], EvaluationFormSection.prototype, "form_id", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, typeorm_1.ManyToOne)(() => EvaluationFormModel_1.EvaluationForm, (f) => f.sections, { onDelete: 'CASCADE' }),
|
|
25
|
+
(0, typeorm_1.JoinColumn)({ name: 'form_id' }),
|
|
26
|
+
__metadata("design:type", EvaluationFormModel_1.EvaluationForm)
|
|
27
|
+
], EvaluationFormSection.prototype, "form", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: false }),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], EvaluationFormSection.prototype, "section_title", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
34
|
+
__metadata("design:type", Object)
|
|
35
|
+
], EvaluationFormSection.prototype, "section_description", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, typeorm_1.Column)({ type: 'int', default: 0 }),
|
|
38
|
+
__metadata("design:type", Number)
|
|
39
|
+
], EvaluationFormSection.prototype, "display_order", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, typeorm_1.Column)({ type: 'boolean', default: true }),
|
|
42
|
+
__metadata("design:type", Boolean)
|
|
43
|
+
], EvaluationFormSection.prototype, "is_active", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, typeorm_1.OneToMany)('EvaluationFormQuestion', 'section'),
|
|
46
|
+
__metadata("design:type", Array)
|
|
47
|
+
], EvaluationFormSection.prototype, "questions", void 0);
|
|
48
|
+
exports.EvaluationFormSection = EvaluationFormSection = __decorate([
|
|
49
|
+
(0, typeorm_1.Entity)({ name: 'evaluation_form_sections' }),
|
|
50
|
+
(0, typeorm_1.Index)('uq_evaluation_form_sections_form_display_order', ['form_id', 'display_order'], {
|
|
51
|
+
unique: true,
|
|
52
|
+
where: '"is_deleted" = false',
|
|
53
|
+
})
|
|
54
|
+
], EvaluationFormSection);
|
|
@@ -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,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
|
+
}
|