@eeplatform/basic-edu 1.10.14 → 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,11 @@
1
1
  # @eeplatform/basic-edu
2
2
 
3
+ ## 1.10.15
4
+
5
+ ### Patch Changes
6
+
7
+ - 95ccd7a: Fix kindergarten routine and domain
8
+
3
9
  ## 1.10.14
4
10
 
5
11
  ### 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
@@ -46493,7 +46493,6 @@ function useKindergartenRoutineRepo() {
46493
46493
  } = {}) {
46494
46494
  page = page > 0 ? page - 1 : 0;
46495
46495
  const query = {
46496
- deletedAt: { $in: ["", null] },
46497
46496
  status
46498
46497
  };
46499
46498
  sort = Object.keys(sort).length > 0 ? sort : { _id: 1 };
@@ -46842,7 +46841,7 @@ function useKindergartenRoutineController() {
46842
46841
  const limit = typeof req.query.limit === "string" ? Number(req.query.limit) : 10;
46843
46842
  const search = req.query.search ?? "";
46844
46843
  const status = req.query.status ?? "active";
46845
- const school = req.query.school ?? "";
46844
+ const school = req.params.school ?? "";
46846
46845
  const section = req.query.section ?? "";
46847
46846
  const classroom = req.query.classroom ?? "";
46848
46847
  const type = req.query.type ?? "";
@@ -47059,9 +47058,10 @@ function useKindergartenDomainRepo() {
47059
47058
  { key: { createdBy: 1 } },
47060
47059
  { key: { title: "text" } },
47061
47060
  {
47062
- key: { title: 1, school: 1, status: 1 },
47061
+ key: { title: 1, school: 1 },
47063
47062
  unique: true,
47064
- name: "unique_kindergarten_domain"
47063
+ name: "unique_kindergarten_domain",
47064
+ partialFilterExpression: { status: "active" }
47065
47065
  }
47066
47066
  ]);
47067
47067
  } catch (error) {
@@ -47384,6 +47384,8 @@ function useKindergartenDomainService() {
47384
47384
  );
47385
47385
  }
47386
47386
  await _deleteById(id, session);
47387
+ await session.commitTransaction();
47388
+ return "Successfully deleted kindergarten domain.";
47387
47389
  } catch (error) {
47388
47390
  await session.abortTransaction();
47389
47391
  if (error instanceof import_nodejs_utils91.AppError) {
@@ -47444,7 +47446,7 @@ function useKindergartenDomainController() {
47444
47446
  const limit = typeof req.query.limit === "string" ? Number(req.query.limit) : 10;
47445
47447
  const search = req.query.search ?? "";
47446
47448
  const status = req.query.status ?? "active";
47447
- const school = req.query.school ?? "";
47449
+ const school = req.params.school ?? "";
47448
47450
  const createdBy = req.query.createdBy ?? "";
47449
47451
  const isPageNumber = isFinite(page);
47450
47452
  if (!isPageNumber) {