@eeplatform/basic-edu 1.10.28 → 1.10.30
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/CHANGELOG.md +12 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +43 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +43 -10
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -2947,8 +2947,13 @@ var addressSchema = Joi5.object({
|
|
|
2947
2947
|
streetName: Joi5.string().optional().allow("", null),
|
|
2948
2948
|
sitio: Joi5.string().optional().allow("", null),
|
|
2949
2949
|
barangay: Joi5.string().required(),
|
|
2950
|
+
barangayName: Joi5.string().optional().allow("", null),
|
|
2950
2951
|
municipalityCity: Joi5.string().required(),
|
|
2952
|
+
municipalityCityName: Joi5.string().optional().allow("", null),
|
|
2951
2953
|
province: Joi5.string().optional().allow("", null),
|
|
2954
|
+
provinceName: Joi5.string().optional().allow("", null),
|
|
2955
|
+
region: Joi5.string().optional().allow("", null),
|
|
2956
|
+
regionName: Joi5.string().optional().allow("", null),
|
|
2952
2957
|
country: Joi5.string().optional().allow("", null),
|
|
2953
2958
|
zipCode: Joi5.string().optional().allow("", null)
|
|
2954
2959
|
});
|
|
@@ -2972,9 +2977,9 @@ var learnerInfoSchema = Joi5.object({
|
|
|
2972
2977
|
placeOfBirth: Joi5.object({
|
|
2973
2978
|
region: Joi5.string().required(),
|
|
2974
2979
|
regionName: Joi5.string().optional().allow("", null),
|
|
2975
|
-
province: Joi5.string().
|
|
2980
|
+
province: Joi5.string().optional().allow("", null),
|
|
2976
2981
|
provinceName: Joi5.string().optional().allow("", null),
|
|
2977
|
-
cityMunicipality: Joi5.string().
|
|
2982
|
+
cityMunicipality: Joi5.string().optional().allow("", null),
|
|
2978
2983
|
cityMunicipalityName: Joi5.string().optional().allow("", null)
|
|
2979
2984
|
}).required(),
|
|
2980
2985
|
motherTongue: Joi5.string().optional().allow("", null),
|
|
@@ -3030,6 +3035,8 @@ var schemaEnrollment = Joi5.object({
|
|
|
3030
3035
|
specialProgram: Joi5.string().optional().allow("", null),
|
|
3031
3036
|
specialProgramName: Joi5.string().optional().allow("", null),
|
|
3032
3037
|
// Added to match frontend
|
|
3038
|
+
specialProgramMajor: Joi5.string().optional().allow("", null),
|
|
3039
|
+
// Added to match frontend
|
|
3033
3040
|
gwa: Joi5.number().optional().allow(null, 0),
|
|
3034
3041
|
subjects: Joi5.array().items(
|
|
3035
3042
|
Joi5.object({
|
|
@@ -3064,9 +3071,9 @@ var schemaEnrollment = Joi5.object({
|
|
|
3064
3071
|
}).optional(),
|
|
3065
3072
|
seniorHighInfo: Joi5.object({
|
|
3066
3073
|
semester: Joi5.string().optional().allow("", null),
|
|
3067
|
-
track: Joi5.string().
|
|
3074
|
+
track: Joi5.string().optional().allow("", null),
|
|
3068
3075
|
trackName: Joi5.string().optional().allow("", null),
|
|
3069
|
-
strand: Joi5.string().
|
|
3076
|
+
strand: Joi5.string().optional().allow("", null),
|
|
3070
3077
|
strandName: Joi5.string().optional().allow("", null)
|
|
3071
3078
|
}).optional(),
|
|
3072
3079
|
alternativeLearningOptions: Joi5.array().items(Joi5.string()).optional(),
|
|
@@ -3164,6 +3171,8 @@ function MLearner(value) {
|
|
|
3164
3171
|
specialProgram: value.specialProgram,
|
|
3165
3172
|
specialProgramName: value.specialProgramName ?? "",
|
|
3166
3173
|
// Added to match frontend
|
|
3174
|
+
specialProgramMajor: value.specialProgramMajor ?? "",
|
|
3175
|
+
// Added to match frontend
|
|
3167
3176
|
gwa: value.gwa ?? 0,
|
|
3168
3177
|
subjects: value.subjects ?? [],
|
|
3169
3178
|
returningLearner: value.returningLearner ?? false,
|
|
@@ -4037,6 +4046,7 @@ var schemaProgramScreening = Joi9.object({
|
|
|
4037
4046
|
specialProgram: Joi9.string().hex().required(),
|
|
4038
4047
|
specialProgramName: Joi9.string().optional().allow("", null),
|
|
4039
4048
|
specialProgramCode: Joi9.string().optional().allow("", null),
|
|
4049
|
+
specialProgramMajor: Joi9.string().optional().allow("", null),
|
|
4040
4050
|
gradeLevel: Joi9.string().required(),
|
|
4041
4051
|
applicant: Joi9.string().hex().required(),
|
|
4042
4052
|
applicantName: Joi9.string().optional().allow("", null),
|
|
@@ -4099,6 +4109,7 @@ function modelProgramScreening(value) {
|
|
|
4099
4109
|
specialProgram: value.specialProgram,
|
|
4100
4110
|
specialProgramName: value.specialProgramName ?? "",
|
|
4101
4111
|
specialProgramCode: value.specialProgramCode ?? "",
|
|
4112
|
+
specialProgramMajor: value.specialProgramMajor ?? "",
|
|
4102
4113
|
applicant: value.applicant,
|
|
4103
4114
|
applicantName: value.applicantName ?? "",
|
|
4104
4115
|
gwa: value.gwa ?? 0,
|
|
@@ -4817,6 +4828,12 @@ var schemaProgram = Joi11.object({
|
|
|
4817
4828
|
grade: Joi11.number().min(0).max(100).required()
|
|
4818
4829
|
})
|
|
4819
4830
|
).optional(),
|
|
4831
|
+
majors: Joi11.array().items(
|
|
4832
|
+
Joi11.object({
|
|
4833
|
+
title: Joi11.string().max(100).required(),
|
|
4834
|
+
value: Joi11.string().max(100).required()
|
|
4835
|
+
})
|
|
4836
|
+
).optional(),
|
|
4820
4837
|
description: Joi11.string().max(500).optional().allow(null, ""),
|
|
4821
4838
|
status: Joi11.string().valid("active", "inactive", "deleted").optional(),
|
|
4822
4839
|
createdAt: Joi11.string().isoDate().optional(),
|
|
@@ -4834,6 +4851,12 @@ var schemaProgramUpdate = Joi11.object({
|
|
|
4834
4851
|
title: Joi11.string().max(100).required(),
|
|
4835
4852
|
grade: Joi11.number().min(0).max(100).required()
|
|
4836
4853
|
})
|
|
4854
|
+
).optional(),
|
|
4855
|
+
majors: Joi11.array().items(
|
|
4856
|
+
Joi11.object({
|
|
4857
|
+
title: Joi11.string().max(100).required(),
|
|
4858
|
+
value: Joi11.string().max(100).required()
|
|
4859
|
+
})
|
|
4837
4860
|
).optional()
|
|
4838
4861
|
});
|
|
4839
4862
|
function modelProgram(value) {
|
|
@@ -4864,6 +4887,7 @@ function modelProgram(value) {
|
|
|
4864
4887
|
gradeLevels: value.gradeLevels ?? [],
|
|
4865
4888
|
gwa: value.gwa ?? 0,
|
|
4866
4889
|
subjects: value.subjects ?? [],
|
|
4890
|
+
majors: value.majors ?? [],
|
|
4867
4891
|
description: value.description ?? "",
|
|
4868
4892
|
status: value.status ?? "active",
|
|
4869
4893
|
createdAt: value.createdAt ?? (/* @__PURE__ */ new Date()).toISOString(),
|
|
@@ -5468,16 +5492,18 @@ function useEnrollmentService() {
|
|
|
5468
5492
|
);
|
|
5469
5493
|
}
|
|
5470
5494
|
}
|
|
5471
|
-
|
|
5495
|
+
let specialProgram = null;
|
|
5496
|
+
const programId = String(value.specialProgram);
|
|
5497
|
+
if (programId) {
|
|
5472
5498
|
value.status = "screening";
|
|
5473
|
-
|
|
5474
|
-
const enrollmentId = await _add(value, session);
|
|
5475
|
-
if (value.specialProgram) {
|
|
5476
|
-
const programId = String(value.specialProgram);
|
|
5477
|
-
const specialProgram = await getProgramById(programId);
|
|
5499
|
+
specialProgram = await getProgramById(programId);
|
|
5478
5500
|
if (!specialProgram) {
|
|
5479
5501
|
throw new BadRequestError18("Special program not found.");
|
|
5480
5502
|
}
|
|
5503
|
+
value.specialProgramName = specialProgram.name;
|
|
5504
|
+
}
|
|
5505
|
+
const enrollmentId = await _add(value, session);
|
|
5506
|
+
if (specialProgram) {
|
|
5481
5507
|
await addProgramScreening(
|
|
5482
5508
|
{
|
|
5483
5509
|
school: String(value.school),
|
|
@@ -5486,6 +5512,7 @@ function useEnrollmentService() {
|
|
|
5486
5512
|
specialProgram: programId,
|
|
5487
5513
|
specialProgramName: specialProgram.name,
|
|
5488
5514
|
specialProgramCode: specialProgram.code,
|
|
5515
|
+
specialProgramMajor: value.specialProgramMajor,
|
|
5489
5516
|
gradeLevel: value.gradeLevel,
|
|
5490
5517
|
applicant: enrollmentId.toString(),
|
|
5491
5518
|
applicantName: `${value.learnerInfo.firstName} ${value.learnerInfo.lastName}`,
|
|
@@ -35713,6 +35740,7 @@ function useGradeLevelService() {
|
|
|
35713
35740
|
}
|
|
35714
35741
|
for (let index = 0; index < value.gradeLevels.length; index++) {
|
|
35715
35742
|
const gradeLevel = value.gradeLevels[index];
|
|
35743
|
+
const isNonGradeLevel = gradeLevel.toLowerCase() === "non-grade-level";
|
|
35716
35744
|
const isKindergarten = gradeLevel.toLowerCase() === "kindergarten";
|
|
35717
35745
|
const isPrimary = [
|
|
35718
35746
|
"grade-1",
|
|
@@ -35725,6 +35753,11 @@ function useGradeLevelService() {
|
|
|
35725
35753
|
let educationLevel = "";
|
|
35726
35754
|
let minNumberOfLearners = 0;
|
|
35727
35755
|
let maxNumberOfLearners = 0;
|
|
35756
|
+
if (isNonGradeLevel) {
|
|
35757
|
+
educationLevel = "non-grade-level";
|
|
35758
|
+
minNumberOfLearners = 15;
|
|
35759
|
+
maxNumberOfLearners = 30;
|
|
35760
|
+
}
|
|
35728
35761
|
if (isKindergarten) {
|
|
35729
35762
|
educationLevel = "elementary";
|
|
35730
35763
|
minNumberOfLearners = 15;
|