@eeplatform/basic-edu 1.3.7 → 1.3.9
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 +12 -0
- package/dist/index.d.ts +0 -1
- package/dist/index.js +1 -14
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -14
- 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(),
|
|
@@ -33257,10 +33254,6 @@ function useSchoolService() {
|
|
|
33257
33254
|
errors.push(`Row ${rowNum}: name is required`);
|
|
33258
33255
|
continue;
|
|
33259
33256
|
}
|
|
33260
|
-
if (!province) {
|
|
33261
|
-
errors.push(`Row ${rowNum}: province is required`);
|
|
33262
|
-
continue;
|
|
33263
|
-
}
|
|
33264
33257
|
if (!cityMunicipality) {
|
|
33265
33258
|
errors.push(`Row ${rowNum}: city/municipality is required`);
|
|
33266
33259
|
continue;
|
|
@@ -33309,22 +33302,16 @@ ${errors.slice(0, 5).join("\n")}${errors.length > 5 ? `
|
|
|
33309
33302
|
name: school.province ?? "",
|
|
33310
33303
|
type: "Prov"
|
|
33311
33304
|
});
|
|
33312
|
-
if (!provincePSGC) {
|
|
33313
|
-
throw new BadRequestError18(
|
|
33314
|
-
`Province '${school.province}' not found in PSGC data.`
|
|
33315
|
-
);
|
|
33316
|
-
}
|
|
33317
33305
|
const cityMunPSGC = await getPSGCByName({
|
|
33318
33306
|
name: school.cityMunicipality ?? "",
|
|
33319
33307
|
type: "City",
|
|
33320
|
-
prefix: provincePSGC.code.toString().slice(0, 5)
|
|
33308
|
+
prefix: provincePSGC ? provincePSGC.code.toString().slice(0, 5) : ""
|
|
33321
33309
|
});
|
|
33322
33310
|
if (!cityMunPSGC) {
|
|
33323
33311
|
throw new BadRequestError18(
|
|
33324
33312
|
`City/Municipality '${school.cityMunicipality}' not found in PSGC data.`
|
|
33325
33313
|
);
|
|
33326
33314
|
}
|
|
33327
|
-
school.provincePSGC = provincePSGC.code ?? "";
|
|
33328
33315
|
school.cityMunicipalityPSGC = cityMunPSGC.code ?? "";
|
|
33329
33316
|
const schoolId = await addSchool(school, session, false);
|
|
33330
33317
|
await addRole(
|