@eeplatform/basic-edu 1.8.3 → 1.8.5

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
@@ -4047,6 +4047,13 @@ function useBasicEduCountRepo() {
4047
4047
  import { BadRequestError as BadRequestError13 } from "@eeplatform/nodejs-utils";
4048
4048
  import Joi10 from "joi";
4049
4049
  import { ObjectId as ObjectId9 } from "mongodb";
4050
+ var statusesProgramScreening = [
4051
+ "pending",
4052
+ "passed",
4053
+ "failed",
4054
+ "reclassified",
4055
+ "withdrawn"
4056
+ ];
4050
4057
  var schemaProgramScreening = Joi10.object({
4051
4058
  _id: Joi10.string().hex().optional().allow(null, ""),
4052
4059
  school: Joi10.string().hex().required(),
@@ -4065,7 +4072,7 @@ var schemaProgramScreening = Joi10.object({
4065
4072
  grade: Joi10.number().min(0).max(100).required()
4066
4073
  })
4067
4074
  ).optional(),
4068
- status: Joi10.string().valid("pending", "pass", "failed").optional(),
4075
+ status: Joi10.string().valid(...statusesProgramScreening).optional(),
4069
4076
  createdAt: Joi10.string().isoDate().optional(),
4070
4077
  updatedAt: Joi10.string().isoDate().optional(),
4071
4078
  deletedAt: Joi10.string().isoDate().optional().allow(null, "")
@@ -4724,7 +4731,7 @@ function useProgramScreeningController() {
4724
4731
  }
4725
4732
  const value = req.body;
4726
4733
  const { error: updatePayloadError } = Joi11.object({
4727
- status: Joi11.string().valid("passed", "failed").required()
4734
+ status: Joi11.string().valid(...statusesProgramScreening).required()
4728
4735
  }).validate(value);
4729
4736
  if (updatePayloadError) {
4730
4737
  next(new BadRequestError15(updatePayloadError.message));
@@ -5511,6 +5518,7 @@ function useEnrollmentService() {
5511
5518
  enrollment.learnerInfo.lrn = lrn;
5512
5519
  await incrementById(counterId, session);
5513
5520
  }
5521
+ enrollment.specialProgram = enrollment.specialProgram?.toString();
5514
5522
  await addLearner(enrollment, session);
5515
5523
  }
5516
5524
  await session.commitTransaction();
@@ -44175,6 +44183,7 @@ export {
44175
44183
  schemaTeachingLoadSlot,
44176
44184
  schemaUpdateOptions,
44177
44185
  schemaUpdateStatus,
44186
+ statusesProgramScreening,
44178
44187
  useAssetController,
44179
44188
  useAssetRepo,
44180
44189
  useBasicEduCountRepo,