@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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # @eeplatform/basic-edu
2
2
 
3
+ ## 1.3.9
4
+
5
+ ### Patch Changes
6
+
7
+ - 1cad10f: Revise addBulk(), province is no longer required in CSV or excel file
8
+
9
+ ## 1.3.8
10
+
11
+ ### Patch Changes
12
+
13
+ - 42a3a20: Update dependencies and addBulk function
14
+
3
15
  ## 1.3.7
4
16
 
5
17
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -472,7 +472,6 @@ type TSchool = {
472
472
  barangay?: string;
473
473
  cityMunicipality?: string;
474
474
  province?: string;
475
- provincePSGC?: string;
476
475
  cityMunicipalityPSGC?: string;
477
476
  postalCode?: string;
478
477
  contactNumber?: string;
package/dist/index.js CHANGED
@@ -4401,7 +4401,6 @@ var schemaSchool = import_joi10.default.object({
4401
4401
  barangay: import_joi10.default.string().max(200).optional().allow(null, ""),
4402
4402
  cityMunicipality: import_joi10.default.string().max(100).optional().allow(null, ""),
4403
4403
  province: import_joi10.default.string().max(100).optional().allow(null, ""),
4404
- provincePSGC: import_joi10.default.string().length(10).optional().allow(null, ""),
4405
4404
  cityMunicipalityPSGC: import_joi10.default.string().length(10).optional().allow(null, ""),
4406
4405
  postalCode: import_joi10.default.string().max(20).optional().allow(null, ""),
4407
4406
  contactNumber: import_joi10.default.string().max(20).optional().allow(null, ""),
@@ -4425,7 +4424,6 @@ var schemaSchoolUpdate = import_joi10.default.object({
4425
4424
  barangay: import_joi10.default.string().max(200).optional().allow(null, ""),
4426
4425
  cityMunicipality: import_joi10.default.string().max(100).optional().allow(null, ""),
4427
4426
  province: import_joi10.default.string().max(100).optional().allow(null, ""),
4428
- provincePSGC: import_joi10.default.string().length(10).optional().allow(null, ""),
4429
4427
  cityMunicipalityPSGC: import_joi10.default.string().length(10).optional().allow(null, ""),
4430
4428
  postalCode: import_joi10.default.string().max(20).optional().allow(null, ""),
4431
4429
  contactNumber: import_joi10.default.string().max(20).optional().allow(null, ""),
@@ -4482,7 +4480,6 @@ function modelSchool(value) {
4482
4480
  contactNumber: value.contactNumber ?? "",
4483
4481
  email: value.email ?? "",
4484
4482
  status: value.status ?? "active",
4485
- provincePSGC: value.provincePSGC ?? "",
4486
4483
  cityMunicipalityPSGC: value.cityMunicipalityPSGC ?? "",
4487
4484
  createdBy: value.createdBy ?? "",
4488
4485
  createdAt: value.createdAt ?? (/* @__PURE__ */ new Date()).toISOString(),
@@ -33242,10 +33239,6 @@ function useSchoolService() {
33242
33239
  errors.push(`Row ${rowNum}: name is required`);
33243
33240
  continue;
33244
33241
  }
33245
- if (!province) {
33246
- errors.push(`Row ${rowNum}: province is required`);
33247
- continue;
33248
- }
33249
33242
  if (!cityMunicipality) {
33250
33243
  errors.push(`Row ${rowNum}: city/municipality is required`);
33251
33244
  continue;
@@ -33294,22 +33287,16 @@ ${errors.slice(0, 5).join("\n")}${errors.length > 5 ? `
33294
33287
  name: school.province ?? "",
33295
33288
  type: "Prov"
33296
33289
  });
33297
- if (!provincePSGC) {
33298
- throw new import_nodejs_utils18.BadRequestError(
33299
- `Province '${school.province}' not found in PSGC data.`
33300
- );
33301
- }
33302
33290
  const cityMunPSGC = await getPSGCByName({
33303
33291
  name: school.cityMunicipality ?? "",
33304
33292
  type: "City",
33305
- prefix: provincePSGC.code.toString().slice(0, 5)
33293
+ prefix: provincePSGC ? provincePSGC.code.toString().slice(0, 5) : ""
33306
33294
  });
33307
33295
  if (!cityMunPSGC) {
33308
33296
  throw new import_nodejs_utils18.BadRequestError(
33309
33297
  `City/Municipality '${school.cityMunicipality}' not found in PSGC data.`
33310
33298
  );
33311
33299
  }
33312
- school.provincePSGC = provincePSGC.code ?? "";
33313
33300
  school.cityMunicipalityPSGC = cityMunPSGC.code ?? "";
33314
33301
  const schoolId = await addSchool(school, session, false);
33315
33302
  await addRole(