@eeplatform/basic-edu 1.3.2 → 1.3.4

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.3.4
4
+
5
+ ### Patch Changes
6
+
7
+ - af90cbb: Update dependencies
8
+
9
+ ## 1.3.3
10
+
11
+ ### Patch Changes
12
+
13
+ - 9b4cca8: Update dependencies
14
+
3
15
  ## 1.3.2
4
16
 
5
17
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -472,8 +472,8 @@ type TSchool = {
472
472
  barangay?: string;
473
473
  cityMunicipality?: string;
474
474
  province?: string;
475
- provincePSGC?: number;
476
- cityMunicipalityPSGC?: number;
475
+ provincePSGC?: string;
476
+ cityMunicipalityPSGC?: string;
477
477
  postalCode?: string;
478
478
  contactNumber?: string;
479
479
  email?: string;
package/dist/index.js CHANGED
@@ -1872,8 +1872,9 @@ var learnerInfoSchema = import_joi3.default.object({
1872
1872
  hasDisability: import_joi3.default.boolean().required(),
1873
1873
  disabilityTypes: import_joi3.default.array().items(
1874
1874
  import_joi3.default.string().valid(
1875
- "Visual Impairment (Blind)",
1876
- "Visual Impairment (Low Vision)",
1875
+ "Visual Impairment",
1876
+ "Visual Impairment(Blind)",
1877
+ "Visual Impairment(Low Vision)",
1877
1878
  "Hearing Impairment",
1878
1879
  "Learning Disability",
1879
1880
  "Intellectual Disability",
@@ -1884,8 +1885,7 @@ var learnerInfoSchema = import_joi3.default.object({
1884
1885
  "Cerebral Palsy",
1885
1886
  "Special Health Problem/Chronic Disease",
1886
1887
  "Multiple Disorder",
1887
- "Cancer",
1888
- "Other"
1888
+ "Cancer"
1889
1889
  )
1890
1890
  ).optional(),
1891
1891
  otherDisabilityDetails: import_joi3.default.string().optional().allow("", null),
@@ -4335,6 +4335,13 @@ function useDivisionRepo() {
4335
4335
  } catch (error2) {
4336
4336
  throw new import_nodejs_utils15.BadRequestError("Invalid ID.");
4337
4337
  }
4338
+ if (options.region) {
4339
+ try {
4340
+ options.region = new import_mongodb10.ObjectId(options.region);
4341
+ } catch (error2) {
4342
+ throw new import_nodejs_utils15.BadRequestError("Invalid region ID.");
4343
+ }
4344
+ }
4338
4345
  try {
4339
4346
  await collection.updateOne({ _id }, { $set: options }, { session });
4340
4347
  delCachedData();
@@ -4394,8 +4401,8 @@ var schemaSchool = import_joi10.default.object({
4394
4401
  barangay: import_joi10.default.string().max(200).optional().allow(null, ""),
4395
4402
  cityMunicipality: import_joi10.default.string().max(100).optional().allow(null, ""),
4396
4403
  province: import_joi10.default.string().max(100).optional().allow(null, ""),
4397
- provincePSGC: import_joi10.default.number().optional().allow(null, ""),
4398
- cityMunicipalityPSGC: import_joi10.default.number().optional().allow(null, ""),
4404
+ provincePSGC: import_joi10.default.string().length(10).optional().allow(null, ""),
4405
+ cityMunicipalityPSGC: import_joi10.default.string().length(10).optional().allow(null, ""),
4399
4406
  postalCode: import_joi10.default.string().max(20).optional().allow(null, ""),
4400
4407
  contactNumber: import_joi10.default.string().max(20).optional().allow(null, ""),
4401
4408
  email: import_joi10.default.string().email().max(100).optional().allow(null, ""),
@@ -4418,8 +4425,8 @@ var schemaSchoolUpdate = import_joi10.default.object({
4418
4425
  barangay: import_joi10.default.string().max(200).optional().allow(null, ""),
4419
4426
  cityMunicipality: import_joi10.default.string().max(100).optional().allow(null, ""),
4420
4427
  province: import_joi10.default.string().max(100).optional().allow(null, ""),
4421
- provincePSGC: import_joi10.default.number().optional().allow(null, ""),
4422
- cityMunicipalityPSGC: import_joi10.default.number().optional().allow(null, ""),
4428
+ provincePSGC: import_joi10.default.string().length(10).optional().allow(null, ""),
4429
+ cityMunicipalityPSGC: import_joi10.default.string().length(10).optional().allow(null, ""),
4423
4430
  postalCode: import_joi10.default.string().max(20).optional().allow(null, ""),
4424
4431
  contactNumber: import_joi10.default.string().max(20).optional().allow(null, ""),
4425
4432
  email: import_joi10.default.string().email().max(100).optional().allow(null, "")
@@ -4475,8 +4482,8 @@ function modelSchool(value) {
4475
4482
  contactNumber: value.contactNumber ?? "",
4476
4483
  email: value.email ?? "",
4477
4484
  status: value.status ?? "active",
4478
- provincePSGC: value.provincePSGC ?? 0,
4479
- cityMunicipalityPSGC: value.cityMunicipalityPSGC ?? 0,
4485
+ provincePSGC: value.provincePSGC ?? "",
4486
+ cityMunicipalityPSGC: value.cityMunicipalityPSGC ?? "",
4480
4487
  createdBy: value.createdBy ?? "",
4481
4488
  createdAt: value.createdAt ?? (/* @__PURE__ */ new Date()).toISOString(),
4482
4489
  updatedAt: value.updatedAt ?? "",
@@ -33288,16 +33295,16 @@ ${errors.slice(0, 5).join("\n")}${errors.length > 5 ? `
33288
33295
  }
33289
33296
  const cityMunPSGC = await getPSGCByName({
33290
33297
  name: school.cityMunicipality ?? "",
33291
- cityMunicipality: true,
33292
- code: provincePSGC.code
33298
+ type: "City",
33299
+ prefix: provincePSGC.code.toString().slice(0, 5)
33293
33300
  });
33294
33301
  if (!cityMunPSGC) {
33295
33302
  throw new import_nodejs_utils18.BadRequestError(
33296
33303
  `City/Municipality '${school.cityMunicipality}' not found in PSGC data.`
33297
33304
  );
33298
33305
  }
33299
- school.provincePSGC = provincePSGC.code ?? 0;
33300
- school.cityMunicipalityPSGC = cityMunPSGC.code ?? 0;
33306
+ school.provincePSGC = provincePSGC.code ?? "";
33307
+ school.cityMunicipalityPSGC = cityMunPSGC.code ?? "";
33301
33308
  const schoolId = await addSchool(school, session, false);
33302
33309
  await addRole(
33303
33310
  {