@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/CHANGELOG.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -246,6 +246,7 @@ type TEnrollment = TLearner & {
|
|
|
246
246
|
applyToSpecialProgram?: boolean;
|
|
247
247
|
specialProgram?: string | ObjectId;
|
|
248
248
|
specialProgramName?: string;
|
|
249
|
+
specialProgramMajor?: string;
|
|
249
250
|
gwa?: number;
|
|
250
251
|
subjects?: {
|
|
251
252
|
title: string;
|
|
@@ -298,8 +299,13 @@ type TAddress = {
|
|
|
298
299
|
streetName?: string;
|
|
299
300
|
sitio?: string;
|
|
300
301
|
barangay: string;
|
|
302
|
+
barangayName?: string;
|
|
301
303
|
municipalityCity: string;
|
|
304
|
+
municipalityCityName?: string;
|
|
302
305
|
province: string;
|
|
306
|
+
provinceName?: string;
|
|
307
|
+
region?: string;
|
|
308
|
+
regionName?: string;
|
|
303
309
|
country?: string;
|
|
304
310
|
zipCode?: string;
|
|
305
311
|
};
|
|
@@ -334,6 +340,7 @@ declare function MLearner(value: TEnrollment): {
|
|
|
334
340
|
gradeLevel: string;
|
|
335
341
|
specialProgram: string | ObjectId | undefined;
|
|
336
342
|
specialProgramName: string;
|
|
343
|
+
specialProgramMajor: string;
|
|
337
344
|
gwa: number;
|
|
338
345
|
subjects: {
|
|
339
346
|
title: string;
|
|
@@ -1611,6 +1618,10 @@ type TProgram = {
|
|
|
1611
1618
|
title: string;
|
|
1612
1619
|
grade: number;
|
|
1613
1620
|
}[];
|
|
1621
|
+
majors?: {
|
|
1622
|
+
title: string;
|
|
1623
|
+
value: string;
|
|
1624
|
+
}[];
|
|
1614
1625
|
description?: string;
|
|
1615
1626
|
status: string;
|
|
1616
1627
|
createdAt?: string | Date;
|
|
@@ -1668,6 +1679,7 @@ type TProgramScreening = {
|
|
|
1668
1679
|
specialProgram: string | ObjectId;
|
|
1669
1680
|
specialProgramName?: string;
|
|
1670
1681
|
specialProgramCode?: string;
|
|
1682
|
+
specialProgramMajor?: string;
|
|
1671
1683
|
applicant: string | ObjectId;
|
|
1672
1684
|
applicantName?: string;
|
|
1673
1685
|
gwa?: number;
|
package/dist/index.js
CHANGED
|
@@ -3058,8 +3058,13 @@ var addressSchema = import_joi5.default.object({
|
|
|
3058
3058
|
streetName: import_joi5.default.string().optional().allow("", null),
|
|
3059
3059
|
sitio: import_joi5.default.string().optional().allow("", null),
|
|
3060
3060
|
barangay: import_joi5.default.string().required(),
|
|
3061
|
+
barangayName: import_joi5.default.string().optional().allow("", null),
|
|
3061
3062
|
municipalityCity: import_joi5.default.string().required(),
|
|
3063
|
+
municipalityCityName: import_joi5.default.string().optional().allow("", null),
|
|
3062
3064
|
province: import_joi5.default.string().optional().allow("", null),
|
|
3065
|
+
provinceName: import_joi5.default.string().optional().allow("", null),
|
|
3066
|
+
region: import_joi5.default.string().optional().allow("", null),
|
|
3067
|
+
regionName: import_joi5.default.string().optional().allow("", null),
|
|
3063
3068
|
country: import_joi5.default.string().optional().allow("", null),
|
|
3064
3069
|
zipCode: import_joi5.default.string().optional().allow("", null)
|
|
3065
3070
|
});
|
|
@@ -3083,9 +3088,9 @@ var learnerInfoSchema = import_joi5.default.object({
|
|
|
3083
3088
|
placeOfBirth: import_joi5.default.object({
|
|
3084
3089
|
region: import_joi5.default.string().required(),
|
|
3085
3090
|
regionName: import_joi5.default.string().optional().allow("", null),
|
|
3086
|
-
province: import_joi5.default.string().
|
|
3091
|
+
province: import_joi5.default.string().optional().allow("", null),
|
|
3087
3092
|
provinceName: import_joi5.default.string().optional().allow("", null),
|
|
3088
|
-
cityMunicipality: import_joi5.default.string().
|
|
3093
|
+
cityMunicipality: import_joi5.default.string().optional().allow("", null),
|
|
3089
3094
|
cityMunicipalityName: import_joi5.default.string().optional().allow("", null)
|
|
3090
3095
|
}).required(),
|
|
3091
3096
|
motherTongue: import_joi5.default.string().optional().allow("", null),
|
|
@@ -3141,6 +3146,8 @@ var schemaEnrollment = import_joi5.default.object({
|
|
|
3141
3146
|
specialProgram: import_joi5.default.string().optional().allow("", null),
|
|
3142
3147
|
specialProgramName: import_joi5.default.string().optional().allow("", null),
|
|
3143
3148
|
// Added to match frontend
|
|
3149
|
+
specialProgramMajor: import_joi5.default.string().optional().allow("", null),
|
|
3150
|
+
// Added to match frontend
|
|
3144
3151
|
gwa: import_joi5.default.number().optional().allow(null, 0),
|
|
3145
3152
|
subjects: import_joi5.default.array().items(
|
|
3146
3153
|
import_joi5.default.object({
|
|
@@ -3175,9 +3182,9 @@ var schemaEnrollment = import_joi5.default.object({
|
|
|
3175
3182
|
}).optional(),
|
|
3176
3183
|
seniorHighInfo: import_joi5.default.object({
|
|
3177
3184
|
semester: import_joi5.default.string().optional().allow("", null),
|
|
3178
|
-
track: import_joi5.default.string().
|
|
3185
|
+
track: import_joi5.default.string().optional().allow("", null),
|
|
3179
3186
|
trackName: import_joi5.default.string().optional().allow("", null),
|
|
3180
|
-
strand: import_joi5.default.string().
|
|
3187
|
+
strand: import_joi5.default.string().optional().allow("", null),
|
|
3181
3188
|
strandName: import_joi5.default.string().optional().allow("", null)
|
|
3182
3189
|
}).optional(),
|
|
3183
3190
|
alternativeLearningOptions: import_joi5.default.array().items(import_joi5.default.string()).optional(),
|
|
@@ -3275,6 +3282,8 @@ function MLearner(value) {
|
|
|
3275
3282
|
specialProgram: value.specialProgram,
|
|
3276
3283
|
specialProgramName: value.specialProgramName ?? "",
|
|
3277
3284
|
// Added to match frontend
|
|
3285
|
+
specialProgramMajor: value.specialProgramMajor ?? "",
|
|
3286
|
+
// Added to match frontend
|
|
3278
3287
|
gwa: value.gwa ?? 0,
|
|
3279
3288
|
subjects: value.subjects ?? [],
|
|
3280
3289
|
returningLearner: value.returningLearner ?? false,
|
|
@@ -4124,6 +4133,7 @@ var schemaProgramScreening = import_joi9.default.object({
|
|
|
4124
4133
|
specialProgram: import_joi9.default.string().hex().required(),
|
|
4125
4134
|
specialProgramName: import_joi9.default.string().optional().allow("", null),
|
|
4126
4135
|
specialProgramCode: import_joi9.default.string().optional().allow("", null),
|
|
4136
|
+
specialProgramMajor: import_joi9.default.string().optional().allow("", null),
|
|
4127
4137
|
gradeLevel: import_joi9.default.string().required(),
|
|
4128
4138
|
applicant: import_joi9.default.string().hex().required(),
|
|
4129
4139
|
applicantName: import_joi9.default.string().optional().allow("", null),
|
|
@@ -4186,6 +4196,7 @@ function modelProgramScreening(value) {
|
|
|
4186
4196
|
specialProgram: value.specialProgram,
|
|
4187
4197
|
specialProgramName: value.specialProgramName ?? "",
|
|
4188
4198
|
specialProgramCode: value.specialProgramCode ?? "",
|
|
4199
|
+
specialProgramMajor: value.specialProgramMajor ?? "",
|
|
4189
4200
|
applicant: value.applicant,
|
|
4190
4201
|
applicantName: value.applicantName ?? "",
|
|
4191
4202
|
gwa: value.gwa ?? 0,
|
|
@@ -4895,6 +4906,12 @@ var schemaProgram = import_joi11.default.object({
|
|
|
4895
4906
|
grade: import_joi11.default.number().min(0).max(100).required()
|
|
4896
4907
|
})
|
|
4897
4908
|
).optional(),
|
|
4909
|
+
majors: import_joi11.default.array().items(
|
|
4910
|
+
import_joi11.default.object({
|
|
4911
|
+
title: import_joi11.default.string().max(100).required(),
|
|
4912
|
+
value: import_joi11.default.string().max(100).required()
|
|
4913
|
+
})
|
|
4914
|
+
).optional(),
|
|
4898
4915
|
description: import_joi11.default.string().max(500).optional().allow(null, ""),
|
|
4899
4916
|
status: import_joi11.default.string().valid("active", "inactive", "deleted").optional(),
|
|
4900
4917
|
createdAt: import_joi11.default.string().isoDate().optional(),
|
|
@@ -4912,6 +4929,12 @@ var schemaProgramUpdate = import_joi11.default.object({
|
|
|
4912
4929
|
title: import_joi11.default.string().max(100).required(),
|
|
4913
4930
|
grade: import_joi11.default.number().min(0).max(100).required()
|
|
4914
4931
|
})
|
|
4932
|
+
).optional(),
|
|
4933
|
+
majors: import_joi11.default.array().items(
|
|
4934
|
+
import_joi11.default.object({
|
|
4935
|
+
title: import_joi11.default.string().max(100).required(),
|
|
4936
|
+
value: import_joi11.default.string().max(100).required()
|
|
4937
|
+
})
|
|
4915
4938
|
).optional()
|
|
4916
4939
|
});
|
|
4917
4940
|
function modelProgram(value) {
|
|
@@ -4942,6 +4965,7 @@ function modelProgram(value) {
|
|
|
4942
4965
|
gradeLevels: value.gradeLevels ?? [],
|
|
4943
4966
|
gwa: value.gwa ?? 0,
|
|
4944
4967
|
subjects: value.subjects ?? [],
|
|
4968
|
+
majors: value.majors ?? [],
|
|
4945
4969
|
description: value.description ?? "",
|
|
4946
4970
|
status: value.status ?? "active",
|
|
4947
4971
|
createdAt: value.createdAt ?? (/* @__PURE__ */ new Date()).toISOString(),
|
|
@@ -5537,16 +5561,18 @@ function useEnrollmentService() {
|
|
|
5537
5561
|
);
|
|
5538
5562
|
}
|
|
5539
5563
|
}
|
|
5540
|
-
|
|
5564
|
+
let specialProgram = null;
|
|
5565
|
+
const programId = String(value.specialProgram);
|
|
5566
|
+
if (programId) {
|
|
5541
5567
|
value.status = "screening";
|
|
5542
|
-
|
|
5543
|
-
const enrollmentId = await _add(value, session);
|
|
5544
|
-
if (value.specialProgram) {
|
|
5545
|
-
const programId = String(value.specialProgram);
|
|
5546
|
-
const specialProgram = await getProgramById(programId);
|
|
5568
|
+
specialProgram = await getProgramById(programId);
|
|
5547
5569
|
if (!specialProgram) {
|
|
5548
5570
|
throw new import_nodejs_utils19.BadRequestError("Special program not found.");
|
|
5549
5571
|
}
|
|
5572
|
+
value.specialProgramName = specialProgram.name;
|
|
5573
|
+
}
|
|
5574
|
+
const enrollmentId = await _add(value, session);
|
|
5575
|
+
if (specialProgram) {
|
|
5550
5576
|
await addProgramScreening(
|
|
5551
5577
|
{
|
|
5552
5578
|
school: String(value.school),
|
|
@@ -5555,6 +5581,7 @@ function useEnrollmentService() {
|
|
|
5555
5581
|
specialProgram: programId,
|
|
5556
5582
|
specialProgramName: specialProgram.name,
|
|
5557
5583
|
specialProgramCode: specialProgram.code,
|
|
5584
|
+
specialProgramMajor: value.specialProgramMajor,
|
|
5558
5585
|
gradeLevel: value.gradeLevel,
|
|
5559
5586
|
applicant: enrollmentId.toString(),
|
|
5560
5587
|
applicantName: `${value.learnerInfo.firstName} ${value.learnerInfo.lastName}`,
|
|
@@ -35748,6 +35775,7 @@ function useGradeLevelService() {
|
|
|
35748
35775
|
}
|
|
35749
35776
|
for (let index = 0; index < value.gradeLevels.length; index++) {
|
|
35750
35777
|
const gradeLevel = value.gradeLevels[index];
|
|
35778
|
+
const isNonGradeLevel = gradeLevel.toLowerCase() === "non-grade-level";
|
|
35751
35779
|
const isKindergarten = gradeLevel.toLowerCase() === "kindergarten";
|
|
35752
35780
|
const isPrimary = [
|
|
35753
35781
|
"grade-1",
|
|
@@ -35760,6 +35788,11 @@ function useGradeLevelService() {
|
|
|
35760
35788
|
let educationLevel = "";
|
|
35761
35789
|
let minNumberOfLearners = 0;
|
|
35762
35790
|
let maxNumberOfLearners = 0;
|
|
35791
|
+
if (isNonGradeLevel) {
|
|
35792
|
+
educationLevel = "non-grade-level";
|
|
35793
|
+
minNumberOfLearners = 15;
|
|
35794
|
+
maxNumberOfLearners = 30;
|
|
35795
|
+
}
|
|
35763
35796
|
if (isKindergarten) {
|
|
35764
35797
|
educationLevel = "elementary";
|
|
35765
35798
|
minNumberOfLearners = 15;
|