@eeplatform/basic-edu 1.10.20 → 1.10.22

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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @eeplatform/basic-edu
2
2
 
3
+ ## 1.10.22
4
+
5
+ ### Patch Changes
6
+
7
+ - 5cd19b0: Default specialProgram to none; tidy params
8
+
9
+ ## 1.10.21
10
+
11
+ ### Patch Changes
12
+
13
+ - 82c1c45: Adjust enrollment status handling and minor fixes
14
+
3
15
  ## 1.10.20
4
16
 
5
17
  ### Patch Changes
package/dist/index.js CHANGED
@@ -3232,7 +3232,6 @@ function MLearner(value) {
3232
3232
  if (value.specialProgram && typeof value.specialProgram === "string") {
3233
3233
  try {
3234
3234
  value.specialProgram = new import_mongodb5.ObjectId(value.specialProgram);
3235
- value.status = "screening";
3236
3235
  } catch (error2) {
3237
3236
  throw new import_nodejs_utils8.BadRequestError("Invalid specialProgram format");
3238
3237
  }
@@ -3851,6 +3850,9 @@ function useLearnerRepo() {
3851
3850
  throw new import_nodejs_utils10.BadRequestError("Invalid special program ID.");
3852
3851
  }
3853
3852
  cacheKeyOptions.specialProgram = value.specialProgram.toString();
3853
+ } else {
3854
+ query["learnerInfo.specialProgram"] = { $in: [null, ""] };
3855
+ cacheKeyOptions.specialProgram = "none";
3854
3856
  }
3855
3857
  if (value.track) {
3856
3858
  try {
@@ -36206,7 +36208,6 @@ function useEnrollmentService() {
36206
36208
  if (status === "accepted") {
36207
36209
  delete enrollment._id;
36208
36210
  enrollment.school = enrollment.school.toString();
36209
- enrollment.status = "active";
36210
36211
  enrollment.updatedAt = "";
36211
36212
  enrollment.createdAt = /* @__PURE__ */ new Date();
36212
36213
  enrollment.deletedAt = "";
@@ -36242,14 +36243,13 @@ function useEnrollmentService() {
36242
36243
  if (enrollment.seniorHighInfo?.strand) {
36243
36244
  enrollment.seniorHighInfo.strand = enrollment.seniorHighInfo?.strand?.toString();
36244
36245
  }
36246
+ enrollment.status = "active";
36245
36247
  await addLearner(enrollment, session);
36246
36248
  }
36247
36249
  const programScreening = await getByApplicantId(_id);
36248
36250
  if (programScreening) {
36249
36251
  if (["cancelled", "withdrawn"].includes(status)) {
36250
36252
  await updateStatusByApplicantId(_id, "cancelled", session);
36251
- } else {
36252
- await updateStatusByApplicantId(_id, status, session);
36253
36253
  }
36254
36254
  }
36255
36255
  await session.commitTransaction();