@eeplatform/basic-edu 1.3.2 → 1.3.3

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
@@ -1832,8 +1832,9 @@ var learnerInfoSchema = Joi3.object({
1832
1832
  hasDisability: Joi3.boolean().required(),
1833
1833
  disabilityTypes: Joi3.array().items(
1834
1834
  Joi3.string().valid(
1835
- "Visual Impairment (Blind)",
1836
- "Visual Impairment (Low Vision)",
1835
+ "Visual Impairment",
1836
+ "Visual Impairment(Blind)",
1837
+ "Visual Impairment(Low Vision)",
1837
1838
  "Hearing Impairment",
1838
1839
  "Learning Disability",
1839
1840
  "Intellectual Disability",
@@ -1844,8 +1845,7 @@ var learnerInfoSchema = Joi3.object({
1844
1845
  "Cerebral Palsy",
1845
1846
  "Special Health Problem/Chronic Disease",
1846
1847
  "Multiple Disorder",
1847
- "Cancer",
1848
- "Other"
1848
+ "Cancer"
1849
1849
  )
1850
1850
  ).optional(),
1851
1851
  otherDisabilityDetails: Joi3.string().optional().allow("", null),
@@ -4336,6 +4336,13 @@ function useDivisionRepo() {
4336
4336
  } catch (error2) {
4337
4337
  throw new BadRequestError15("Invalid ID.");
4338
4338
  }
4339
+ if (options.region) {
4340
+ try {
4341
+ options.region = new ObjectId10(options.region);
4342
+ } catch (error2) {
4343
+ throw new BadRequestError15("Invalid region ID.");
4344
+ }
4345
+ }
4339
4346
  try {
4340
4347
  await collection.updateOne({ _id }, { $set: options }, { session });
4341
4348
  delCachedData();
@@ -4395,8 +4402,8 @@ var schemaSchool = Joi10.object({
4395
4402
  barangay: Joi10.string().max(200).optional().allow(null, ""),
4396
4403
  cityMunicipality: Joi10.string().max(100).optional().allow(null, ""),
4397
4404
  province: Joi10.string().max(100).optional().allow(null, ""),
4398
- provincePSGC: Joi10.number().optional().allow(null, ""),
4399
- cityMunicipalityPSGC: Joi10.number().optional().allow(null, ""),
4405
+ provincePSGC: Joi10.string().length(10).optional().allow(null, ""),
4406
+ cityMunicipalityPSGC: Joi10.string().length(10).optional().allow(null, ""),
4400
4407
  postalCode: Joi10.string().max(20).optional().allow(null, ""),
4401
4408
  contactNumber: Joi10.string().max(20).optional().allow(null, ""),
4402
4409
  email: Joi10.string().email().max(100).optional().allow(null, ""),
@@ -4419,8 +4426,8 @@ var schemaSchoolUpdate = Joi10.object({
4419
4426
  barangay: Joi10.string().max(200).optional().allow(null, ""),
4420
4427
  cityMunicipality: Joi10.string().max(100).optional().allow(null, ""),
4421
4428
  province: Joi10.string().max(100).optional().allow(null, ""),
4422
- provincePSGC: Joi10.number().optional().allow(null, ""),
4423
- cityMunicipalityPSGC: Joi10.number().optional().allow(null, ""),
4429
+ provincePSGC: Joi10.string().length(10).optional().allow(null, ""),
4430
+ cityMunicipalityPSGC: Joi10.string().length(10).optional().allow(null, ""),
4424
4431
  postalCode: Joi10.string().max(20).optional().allow(null, ""),
4425
4432
  contactNumber: Joi10.string().max(20).optional().allow(null, ""),
4426
4433
  email: Joi10.string().email().max(100).optional().allow(null, "")
@@ -4476,8 +4483,8 @@ function modelSchool(value) {
4476
4483
  contactNumber: value.contactNumber ?? "",
4477
4484
  email: value.email ?? "",
4478
4485
  status: value.status ?? "active",
4479
- provincePSGC: value.provincePSGC ?? 0,
4480
- cityMunicipalityPSGC: value.cityMunicipalityPSGC ?? 0,
4486
+ provincePSGC: value.provincePSGC ?? "",
4487
+ cityMunicipalityPSGC: value.cityMunicipalityPSGC ?? "",
4481
4488
  createdBy: value.createdBy ?? "",
4482
4489
  createdAt: value.createdAt ?? (/* @__PURE__ */ new Date()).toISOString(),
4483
4490
  updatedAt: value.updatedAt ?? "",
@@ -33303,16 +33310,16 @@ ${errors.slice(0, 5).join("\n")}${errors.length > 5 ? `
33303
33310
  }
33304
33311
  const cityMunPSGC = await getPSGCByName({
33305
33312
  name: school.cityMunicipality ?? "",
33306
- cityMunicipality: true,
33307
- code: provincePSGC.code
33313
+ type: "City",
33314
+ prefix: provincePSGC.code.toString().slice(0, 5)
33308
33315
  });
33309
33316
  if (!cityMunPSGC) {
33310
33317
  throw new BadRequestError18(
33311
33318
  `City/Municipality '${school.cityMunicipality}' not found in PSGC data.`
33312
33319
  );
33313
33320
  }
33314
- school.provincePSGC = provincePSGC.code ?? 0;
33315
- school.cityMunicipalityPSGC = cityMunPSGC.code ?? 0;
33321
+ school.provincePSGC = provincePSGC.code ?? "";
33322
+ school.cityMunicipalityPSGC = cityMunPSGC.code ?? "";
33316
33323
  const schoolId = await addSchool(school, session, false);
33317
33324
  await addRole(
33318
33325
  {