@eeplatform/basic-edu 1.3.7 → 1.3.8
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 +6 -0
- package/dist/index.d.ts +0 -1
- package/dist/index.js +1 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -10
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -4402,7 +4402,6 @@ var schemaSchool = Joi10.object({
|
|
|
4402
4402
|
barangay: Joi10.string().max(200).optional().allow(null, ""),
|
|
4403
4403
|
cityMunicipality: Joi10.string().max(100).optional().allow(null, ""),
|
|
4404
4404
|
province: Joi10.string().max(100).optional().allow(null, ""),
|
|
4405
|
-
provincePSGC: Joi10.string().length(10).optional().allow(null, ""),
|
|
4406
4405
|
cityMunicipalityPSGC: Joi10.string().length(10).optional().allow(null, ""),
|
|
4407
4406
|
postalCode: Joi10.string().max(20).optional().allow(null, ""),
|
|
4408
4407
|
contactNumber: Joi10.string().max(20).optional().allow(null, ""),
|
|
@@ -4426,7 +4425,6 @@ var schemaSchoolUpdate = Joi10.object({
|
|
|
4426
4425
|
barangay: Joi10.string().max(200).optional().allow(null, ""),
|
|
4427
4426
|
cityMunicipality: Joi10.string().max(100).optional().allow(null, ""),
|
|
4428
4427
|
province: Joi10.string().max(100).optional().allow(null, ""),
|
|
4429
|
-
provincePSGC: Joi10.string().length(10).optional().allow(null, ""),
|
|
4430
4428
|
cityMunicipalityPSGC: Joi10.string().length(10).optional().allow(null, ""),
|
|
4431
4429
|
postalCode: Joi10.string().max(20).optional().allow(null, ""),
|
|
4432
4430
|
contactNumber: Joi10.string().max(20).optional().allow(null, ""),
|
|
@@ -4483,7 +4481,6 @@ function modelSchool(value) {
|
|
|
4483
4481
|
contactNumber: value.contactNumber ?? "",
|
|
4484
4482
|
email: value.email ?? "",
|
|
4485
4483
|
status: value.status ?? "active",
|
|
4486
|
-
provincePSGC: value.provincePSGC ?? "",
|
|
4487
4484
|
cityMunicipalityPSGC: value.cityMunicipalityPSGC ?? "",
|
|
4488
4485
|
createdBy: value.createdBy ?? "",
|
|
4489
4486
|
createdAt: value.createdAt ?? (/* @__PURE__ */ new Date()).toISOString(),
|
|
@@ -33309,22 +33306,16 @@ ${errors.slice(0, 5).join("\n")}${errors.length > 5 ? `
|
|
|
33309
33306
|
name: school.province ?? "",
|
|
33310
33307
|
type: "Prov"
|
|
33311
33308
|
});
|
|
33312
|
-
if (!provincePSGC) {
|
|
33313
|
-
throw new BadRequestError18(
|
|
33314
|
-
`Province '${school.province}' not found in PSGC data.`
|
|
33315
|
-
);
|
|
33316
|
-
}
|
|
33317
33309
|
const cityMunPSGC = await getPSGCByName({
|
|
33318
33310
|
name: school.cityMunicipality ?? "",
|
|
33319
33311
|
type: "City",
|
|
33320
|
-
prefix: provincePSGC.code.toString().slice(0, 5)
|
|
33312
|
+
prefix: provincePSGC ? provincePSGC.code.toString().slice(0, 5) : ""
|
|
33321
33313
|
});
|
|
33322
33314
|
if (!cityMunPSGC) {
|
|
33323
33315
|
throw new BadRequestError18(
|
|
33324
33316
|
`City/Municipality '${school.cityMunicipality}' not found in PSGC data.`
|
|
33325
33317
|
);
|
|
33326
33318
|
}
|
|
33327
|
-
school.provincePSGC = provincePSGC.code ?? "";
|
|
33328
33319
|
school.cityMunicipalityPSGC = cityMunPSGC.code ?? "";
|
|
33329
33320
|
const schoolId = await addSchool(school, session, false);
|
|
33330
33321
|
await addRole(
|