@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/dist/index.mjs CHANGED
@@ -3121,7 +3121,6 @@ function MLearner(value) {
3121
3121
  if (value.specialProgram && typeof value.specialProgram === "string") {
3122
3122
  try {
3123
3123
  value.specialProgram = new ObjectId5(value.specialProgram);
3124
- value.status = "screening";
3125
3124
  } catch (error2) {
3126
3125
  throw new BadRequestError8("Invalid specialProgram format");
3127
3126
  }
@@ -3764,6 +3763,9 @@ function useLearnerRepo() {
3764
3763
  throw new BadRequestError10("Invalid special program ID.");
3765
3764
  }
3766
3765
  cacheKeyOptions.specialProgram = value.specialProgram.toString();
3766
+ } else {
3767
+ query["learnerInfo.specialProgram"] = { $in: [null, ""] };
3768
+ cacheKeyOptions.specialProgram = "none";
3767
3769
  }
3768
3770
  if (value.track) {
3769
3771
  try {
@@ -36176,7 +36178,6 @@ function useEnrollmentService() {
36176
36178
  if (status === "accepted") {
36177
36179
  delete enrollment._id;
36178
36180
  enrollment.school = enrollment.school.toString();
36179
- enrollment.status = "active";
36180
36181
  enrollment.updatedAt = "";
36181
36182
  enrollment.createdAt = /* @__PURE__ */ new Date();
36182
36183
  enrollment.deletedAt = "";
@@ -36212,14 +36213,13 @@ function useEnrollmentService() {
36212
36213
  if (enrollment.seniorHighInfo?.strand) {
36213
36214
  enrollment.seniorHighInfo.strand = enrollment.seniorHighInfo?.strand?.toString();
36214
36215
  }
36216
+ enrollment.status = "active";
36215
36217
  await addLearner(enrollment, session);
36216
36218
  }
36217
36219
  const programScreening = await getByApplicantId(_id);
36218
36220
  if (programScreening) {
36219
36221
  if (["cancelled", "withdrawn"].includes(status)) {
36220
36222
  await updateStatusByApplicantId(_id, "cancelled", session);
36221
- } else {
36222
- await updateStatusByApplicantId(_id, status, session);
36223
36223
  }
36224
36224
  }
36225
36225
  await session.commitTransaction();