@eeplatform/nuxt-layer-common 1.7.22 → 1.7.23

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/nuxt-layer-common
2
2
 
3
+ ## 1.7.23
4
+
5
+ ### Patch Changes
6
+
7
+ - ee23a56: Set schoolId asynchronously and add getById
8
+
3
9
  ## 1.7.22
4
10
 
5
11
  ### Patch Changes
@@ -1405,7 +1405,9 @@ const enrollment = defineModel<TTLearner>({
1405
1405
  const { cookieConfig } = useRuntimeConfig().public;
1406
1406
 
1407
1407
  if (prop.school) {
1408
- enrollment.value.school = prop.school ?? "school";
1408
+ setTimeout(() => {
1409
+ enrollment.value.schoolId = prop.school ?? "school";
1410
+ }, 1000);
1409
1411
  }
1410
1412
 
1411
1413
  enrollment.value.createdBy = useCookie("user", cookieConfig).value ?? "";
@@ -14,7 +14,14 @@ export default function useSchool() {
14
14
  );
15
15
  }
16
16
 
17
+ function getById(id: string) {
18
+ return useNuxtApp().$api<Record<string, any>>(
19
+ `/api/basic-education/schools/id/${id}`
20
+ );
21
+ }
22
+
17
23
  return {
18
24
  getAll,
25
+ getById,
19
26
  };
20
27
  }
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.7.22",
5
+ "version": "1.7.23",
6
6
  "main": "./nuxt.config.ts",
7
7
  "publishConfig": {
8
8
  "access": "public"