@eeplatform/nuxt-layer-common 1.7.25 → 1.7.27

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.7.27
4
+
5
+ ### Patch Changes
6
+
7
+ - 8a1ccac: Fix grade level loading
8
+
9
+ ## 1.7.26
10
+
11
+ ### Patch Changes
12
+
13
+ - 1881219: Use schoolId prop and computed school value
14
+
3
15
  ## 1.7.25
4
16
 
5
17
  ### Patch Changes
@@ -123,6 +123,8 @@
123
123
  v-model="enrollment.gradeLevel"
124
124
  :rules="[requiredRule]"
125
125
  :items="gradeLevelOffering"
126
+ :loading="loadingGradeLevel"
127
+ :disabled="loadingGradeLevel"
126
128
  ></v-autocomplete>
127
129
  </v-col>
128
130
  </v-row>
@@ -1450,6 +1452,10 @@ const prop = defineProps({
1450
1452
  type: String,
1451
1453
  default: "",
1452
1454
  },
1455
+ schoolId: {
1456
+ type: String,
1457
+ default: "",
1458
+ },
1453
1459
  });
1454
1460
 
1455
1461
  import { VMaskInput } from "vuetify/labs/VMaskInput";
@@ -1463,7 +1469,7 @@ const { cookieConfig } = useRuntimeConfig().public;
1463
1469
 
1464
1470
  if (prop.school) {
1465
1471
  setTimeout(() => {
1466
- enrollment.value.schoolId = prop.school ?? "school";
1472
+ enrollment.value.schoolId = prop.schoolId ?? "school";
1467
1473
  }, 1000);
1468
1474
  }
1469
1475
 
@@ -1731,13 +1737,18 @@ const gradeLevelOffering = ref<Record<string, any>[]>([]);
1731
1737
 
1732
1738
  const { getAll: getGradeLevels } = useGradeLevel();
1733
1739
 
1734
- const { data: getGradeLevelReq } = await useLazyAsyncData(
1735
- "get-grade-level-offerings" + prop.school,
1736
- () => getGradeLevels({ school: prop.school, limit: 100 }),
1737
- {
1738
- watch: [() => prop.school],
1739
- }
1740
- );
1740
+ const theSchool = computed(() => prop.school || enrollment.value.school);
1741
+
1742
+ const { data: getGradeLevelReq, status: statusGradeLevel } =
1743
+ await useLazyAsyncData(
1744
+ "get-grade-level-offerings" + theSchool.value,
1745
+ () => getGradeLevels({ school: theSchool.value, limit: 100 }),
1746
+ {
1747
+ watch: [theSchool],
1748
+ }
1749
+ );
1750
+
1751
+ const loadingGradeLevel = computed(() => statusGradeLevel.value === "pending");
1741
1752
 
1742
1753
  watchEffect(() => {
1743
1754
  if (getGradeLevelReq.value && getGradeLevelReq.value.items) {
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.25",
5
+ "version": "1.7.27",
6
6
  "main": "./nuxt.config.ts",
7
7
  "publishConfig": {
8
8
  "access": "public"