@eeplatform/basic-edu 1.10.13 → 1.10.15

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
@@ -5139,7 +5139,6 @@ function useProgramRepo() {
5139
5139
  } = {}) {
5140
5140
  page = page > 0 ? page - 1 : 0;
5141
5141
  const query = {
5142
- deletedAt: { $in: ["", null] },
5143
5142
  status
5144
5143
  };
5145
5144
  sort = Object.keys(sort).length > 0 ? sort : { _id: 1 };
@@ -5428,7 +5427,7 @@ function useProgramController() {
5428
5427
  const status = req.query.status ?? "active";
5429
5428
  const school = req.query.school ?? "";
5430
5429
  const isDefault = req.query.isDefault === "true" ? true : req.query.isDefault === "false" ? false : void 0;
5431
- const gradeLevel = req.query.gradeLevel?.split(",") ?? [];
5430
+ const gradeLevel = req.query.gradeLevel ? req.query.gradeLevel?.split(",") : [];
5432
5431
  const isPageNumber = isFinite(page);
5433
5432
  if (!isPageNumber) {
5434
5433
  next(new BadRequestError19("Invalid page number."));
@@ -46617,7 +46616,6 @@ function useKindergartenRoutineRepo() {
46617
46616
  } = {}) {
46618
46617
  page = page > 0 ? page - 1 : 0;
46619
46618
  const query = {
46620
- deletedAt: { $in: ["", null] },
46621
46619
  status
46622
46620
  };
46623
46621
  sort = Object.keys(sort).length > 0 ? sort : { _id: 1 };
@@ -46966,7 +46964,7 @@ function useKindergartenRoutineController() {
46966
46964
  const limit = typeof req.query.limit === "string" ? Number(req.query.limit) : 10;
46967
46965
  const search = req.query.search ?? "";
46968
46966
  const status = req.query.status ?? "active";
46969
- const school = req.query.school ?? "";
46967
+ const school = req.params.school ?? "";
46970
46968
  const section = req.query.section ?? "";
46971
46969
  const classroom = req.query.classroom ?? "";
46972
46970
  const type = req.query.type ?? "";
@@ -47192,9 +47190,10 @@ function useKindergartenDomainRepo() {
47192
47190
  { key: { createdBy: 1 } },
47193
47191
  { key: { title: "text" } },
47194
47192
  {
47195
- key: { title: 1, school: 1, status: 1 },
47193
+ key: { title: 1, school: 1 },
47196
47194
  unique: true,
47197
- name: "unique_kindergarten_domain"
47195
+ name: "unique_kindergarten_domain",
47196
+ partialFilterExpression: { status: "active" }
47198
47197
  }
47199
47198
  ]);
47200
47199
  } catch (error) {
@@ -47517,6 +47516,8 @@ function useKindergartenDomainService() {
47517
47516
  );
47518
47517
  }
47519
47518
  await _deleteById(id, session);
47519
+ await session.commitTransaction();
47520
+ return "Successfully deleted kindergarten domain.";
47520
47521
  } catch (error) {
47521
47522
  await session.abortTransaction();
47522
47523
  if (error instanceof AppError33) {
@@ -47577,7 +47578,7 @@ function useKindergartenDomainController() {
47577
47578
  const limit = typeof req.query.limit === "string" ? Number(req.query.limit) : 10;
47578
47579
  const search = req.query.search ?? "";
47579
47580
  const status = req.query.status ?? "active";
47580
- const school = req.query.school ?? "";
47581
+ const school = req.params.school ?? "";
47581
47582
  const createdBy = req.query.createdBy ?? "";
47582
47583
  const isPageNumber = isFinite(page);
47583
47584
  if (!isPageNumber) {