@eeplatform/nuxt-layer-common 1.4.8 → 1.4.10

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/nuxt-layer-common
2
2
 
3
+ ## 1.4.10
4
+
5
+ ### Patch Changes
6
+
7
+ - 816345b: Fix basic education composable
8
+
9
+ ## 1.4.9
10
+
11
+ ### Patch Changes
12
+
13
+ - 26680ae: Add createdBy filter to enrollment getAll()
14
+
3
15
  ## 1.4.8
4
16
 
5
17
  ### Patch Changes
@@ -220,6 +220,7 @@ export default function useBasicEdu() {
220
220
  ];
221
221
 
222
222
  return {
223
+ getGradeLevels,
223
224
  educationLevels,
224
225
  gradeLevels,
225
226
  generateSchoolYears,
@@ -95,9 +95,10 @@ export default function useEnrollment() {
95
95
  page = 1,
96
96
  limit = 10,
97
97
  search = "",
98
+ createdBy = "",
98
99
  } = {}) {
99
100
  return $fetch<Record<string, any>>("/api/basic-education/enrollments", {
100
- query: { school, status, page, limit, search },
101
+ query: { status, page, limit, search, createdBy, school },
101
102
  });
102
103
  }
103
104
 
@@ -0,0 +1,26 @@
1
+ export default function useLearner() {
2
+ function getAll({
3
+ page = 1,
4
+ search = "",
5
+ status = "active",
6
+ limit = 20,
7
+ school = "",
8
+ level = "",
9
+ } = {}) {
10
+ return $fetch<Record<string, any>>("/api/basic-education/learners", {
11
+ query: { page, search, status, limit, school, level },
12
+ });
13
+ }
14
+
15
+ function add(value: TTLearner) {
16
+ return $fetch("/api/basic-education/learners", {
17
+ method: "POST",
18
+ body: value,
19
+ });
20
+ }
21
+
22
+ return {
23
+ getAll,
24
+ add,
25
+ };
26
+ }
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@eeplatform/nuxt-layer-common",
3
3
  "license": "MIT",
4
4
  "type": "module",
5
- "version": "1.4.8",
5
+ "version": "1.4.10",
6
6
  "main": "./nuxt.config.ts",
7
7
  "publishConfig": {
8
8
  "access": "public"