@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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @eeplatform/basic-edu
2
2
 
3
+ ## 1.10.15
4
+
5
+ ### Patch Changes
6
+
7
+ - 95ccd7a: Fix kindergarten routine and domain
8
+
9
+ ## 1.10.14
10
+
11
+ ### Patch Changes
12
+
13
+ - 8dbfd25: Fix getAll program query
14
+
3
15
  ## 1.10.13
4
16
 
5
17
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -1846,7 +1846,7 @@ declare function useKindergartenDomainRepo(): {
1846
1846
  };
1847
1847
 
1848
1848
  declare function useKindergartenDomainService(): {
1849
- deleteById: (id: string) => Promise<void>;
1849
+ deleteById: (id: string) => Promise<string>;
1850
1850
  };
1851
1851
 
1852
1852
  declare function useKindergartenDomainController(): {
package/dist/index.js CHANGED
@@ -5201,7 +5201,6 @@ function useProgramRepo() {
5201
5201
  } = {}) {
5202
5202
  page = page > 0 ? page - 1 : 0;
5203
5203
  const query = {
5204
- deletedAt: { $in: ["", null] },
5205
5204
  status
5206
5205
  };
5207
5206
  sort = Object.keys(sort).length > 0 ? sort : { _id: 1 };
@@ -5490,7 +5489,7 @@ function useProgramController() {
5490
5489
  const status = req.query.status ?? "active";
5491
5490
  const school = req.query.school ?? "";
5492
5491
  const isDefault = req.query.isDefault === "true" ? true : req.query.isDefault === "false" ? false : void 0;
5493
- const gradeLevel = req.query.gradeLevel?.split(",") ?? [];
5492
+ const gradeLevel = req.query.gradeLevel ? req.query.gradeLevel?.split(",") : [];
5494
5493
  const isPageNumber = isFinite(page);
5495
5494
  if (!isPageNumber) {
5496
5495
  next(new import_nodejs_utils20.BadRequestError("Invalid page number."));
@@ -46494,7 +46493,6 @@ function useKindergartenRoutineRepo() {
46494
46493
  } = {}) {
46495
46494
  page = page > 0 ? page - 1 : 0;
46496
46495
  const query = {
46497
- deletedAt: { $in: ["", null] },
46498
46496
  status
46499
46497
  };
46500
46498
  sort = Object.keys(sort).length > 0 ? sort : { _id: 1 };
@@ -46843,7 +46841,7 @@ function useKindergartenRoutineController() {
46843
46841
  const limit = typeof req.query.limit === "string" ? Number(req.query.limit) : 10;
46844
46842
  const search = req.query.search ?? "";
46845
46843
  const status = req.query.status ?? "active";
46846
- const school = req.query.school ?? "";
46844
+ const school = req.params.school ?? "";
46847
46845
  const section = req.query.section ?? "";
46848
46846
  const classroom = req.query.classroom ?? "";
46849
46847
  const type = req.query.type ?? "";
@@ -47060,9 +47058,10 @@ function useKindergartenDomainRepo() {
47060
47058
  { key: { createdBy: 1 } },
47061
47059
  { key: { title: "text" } },
47062
47060
  {
47063
- key: { title: 1, school: 1, status: 1 },
47061
+ key: { title: 1, school: 1 },
47064
47062
  unique: true,
47065
- name: "unique_kindergarten_domain"
47063
+ name: "unique_kindergarten_domain",
47064
+ partialFilterExpression: { status: "active" }
47066
47065
  }
47067
47066
  ]);
47068
47067
  } catch (error) {
@@ -47385,6 +47384,8 @@ function useKindergartenDomainService() {
47385
47384
  );
47386
47385
  }
47387
47386
  await _deleteById(id, session);
47387
+ await session.commitTransaction();
47388
+ return "Successfully deleted kindergarten domain.";
47388
47389
  } catch (error) {
47389
47390
  await session.abortTransaction();
47390
47391
  if (error instanceof import_nodejs_utils91.AppError) {
@@ -47445,7 +47446,7 @@ function useKindergartenDomainController() {
47445
47446
  const limit = typeof req.query.limit === "string" ? Number(req.query.limit) : 10;
47446
47447
  const search = req.query.search ?? "";
47447
47448
  const status = req.query.status ?? "active";
47448
- const school = req.query.school ?? "";
47449
+ const school = req.params.school ?? "";
47449
47450
  const createdBy = req.query.createdBy ?? "";
47450
47451
  const isPageNumber = isFinite(page);
47451
47452
  if (!isPageNumber) {