@eeplatform/basic-edu 1.10.31 → 1.10.32

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,11 @@
1
1
  # @eeplatform/basic-edu
2
2
 
3
+ ## 1.10.32
4
+
5
+ ### Patch Changes
6
+
7
+ - e9a23b9: Fix birthdate format
8
+
3
9
  ## 1.10.31
4
10
 
5
11
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -260,7 +260,7 @@ type TLearnerInfo = {
260
260
  firstName: string;
261
261
  middleName?: string;
262
262
  extensionName?: string;
263
- birthDate: string;
263
+ birthDate: string | Date;
264
264
  sex: string;
265
265
  age: number;
266
266
  placeOfBirth: {
package/dist/index.js CHANGED
@@ -3081,7 +3081,9 @@ var learnerInfoSchema = import_joi5.default.object({
3081
3081
  firstName: import_joi5.default.string().required(),
3082
3082
  middleName: import_joi5.default.string().optional().allow("", null),
3083
3083
  extensionName: import_joi5.default.string().optional().allow("", null),
3084
- birthDate: import_joi5.default.string().required(),
3084
+ birthDate: import_joi5.default.string().regex(/^\d{2}-\d{2}-\d{4}$/).required().messages({
3085
+ "string.pattern.base": "Birth date must be in the format DD-MM-YYYY"
3086
+ }),
3085
3087
  sex: import_joi5.default.string().required(),
3086
3088
  // Changed to accept any string to match frontend
3087
3089
  age: import_joi5.default.number().integer().min(0).max(150).required(),
@@ -3249,6 +3251,7 @@ function MLearner(value) {
3249
3251
  throw new import_nodejs_utils8.BadRequestError("Invalid specialProgram format");
3250
3252
  }
3251
3253
  }
3254
+ value.learnerInfo.birthDate = new Date(value.learnerInfo.birthDate);
3252
3255
  return {
3253
3256
  _id: value._id ?? void 0,
3254
3257
  region: value.region,