@eeplatform/nuxt-layer-common 1.4.4 → 1.4.7
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,23 @@
|
|
|
1
1
|
# @eeplatform/nuxt-layer-common
|
|
2
2
|
|
|
3
|
+
## 1.4.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 48e8c38: Update enrollment composable
|
|
8
|
+
|
|
9
|
+
## 1.4.6
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- fe4bc02: Add get all function to enrollment composable
|
|
14
|
+
|
|
15
|
+
## 1.4.5
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- f413853: Removed enrollment composable present data
|
|
20
|
+
|
|
3
21
|
## 1.4.4
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -305,7 +305,7 @@
|
|
|
305
305
|
required
|
|
306
306
|
/>
|
|
307
307
|
<v-col cols="12">
|
|
308
|
-
<v-
|
|
308
|
+
<v-autocomplete
|
|
309
309
|
v-model="enrollment.learnerInfo.placeOfBirth"
|
|
310
310
|
:rules="[requiredRule]"
|
|
311
311
|
:items="citiesMunicipalities"
|
|
@@ -321,7 +321,7 @@
|
|
|
321
321
|
</v-list-item-title>
|
|
322
322
|
</v-list-item>
|
|
323
323
|
</template>
|
|
324
|
-
</v-
|
|
324
|
+
</v-autocomplete>
|
|
325
325
|
</v-col>
|
|
326
326
|
</v-row>
|
|
327
327
|
</v-col>
|
|
@@ -1286,7 +1286,7 @@ const prop = defineProps({
|
|
|
1286
1286
|
import { VMaskInput } from "vuetify/labs/VMaskInput";
|
|
1287
1287
|
const { requiredRule } = useUtils();
|
|
1288
1288
|
|
|
1289
|
-
const enrollment = defineModel<
|
|
1289
|
+
const enrollment = defineModel<TTLearner>({
|
|
1290
1290
|
default: () => useEnrollment().enrollment,
|
|
1291
1291
|
});
|
|
1292
1292
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default function useEnrollment() {
|
|
2
|
-
const enrollment = ref<
|
|
2
|
+
const enrollment = ref<TTLearner>({
|
|
3
3
|
school: "",
|
|
4
4
|
schoolName: "",
|
|
5
5
|
region: "",
|
|
@@ -9,7 +9,7 @@ export default function useEnrollment() {
|
|
|
9
9
|
province: "",
|
|
10
10
|
cityMunicipality: "",
|
|
11
11
|
schoolYear: "",
|
|
12
|
-
gradeLevel: "
|
|
12
|
+
gradeLevel: "",
|
|
13
13
|
returningLearner: false,
|
|
14
14
|
learnerInfo: {
|
|
15
15
|
psaBirthCertificateNo: "",
|
|
@@ -82,15 +82,38 @@ export default function useEnrollment() {
|
|
|
82
82
|
isCertifiedAndConsented: true,
|
|
83
83
|
});
|
|
84
84
|
|
|
85
|
-
function add(value:
|
|
85
|
+
function add(value: TTLearner) {
|
|
86
86
|
return $fetch("/api/basic-education/enrollments", {
|
|
87
87
|
method: "POST",
|
|
88
88
|
body: value,
|
|
89
89
|
});
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
+
function getAll({
|
|
93
|
+
school = "",
|
|
94
|
+
status = "pending",
|
|
95
|
+
page = 1,
|
|
96
|
+
limit = 10,
|
|
97
|
+
search = "",
|
|
98
|
+
} = {}) {
|
|
99
|
+
return $fetch<Record<string, any>>("/api/basic-education/enrollments", {
|
|
100
|
+
query: { school, status, page, limit, search },
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
function updateStatusById(_id: string, status: string) {
|
|
105
|
+
return $fetch<string>(
|
|
106
|
+
`/api/basic-education/enrollments/status/${status}/id/${_id}`,
|
|
107
|
+
{
|
|
108
|
+
method: "PATCH",
|
|
109
|
+
}
|
|
110
|
+
);
|
|
111
|
+
}
|
|
112
|
+
|
|
92
113
|
return {
|
|
93
114
|
enrollment,
|
|
94
115
|
add,
|
|
116
|
+
getAll,
|
|
117
|
+
updateStatusById,
|
|
95
118
|
};
|
|
96
119
|
}
|
package/composables/useSchool.ts
CHANGED
package/package.json
CHANGED
package/types/enrollment.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare type
|
|
1
|
+
declare type TTLearner = {
|
|
2
2
|
_id?: string;
|
|
3
3
|
region: string; // e.g., "NCR"
|
|
4
4
|
regionName?: string; // e.g., "National Capital Region"
|
|
@@ -26,7 +26,6 @@ declare type TBasicEducEnrForm = {
|
|
|
26
26
|
isCertifiedAndConsented: boolean;
|
|
27
27
|
status?: string;
|
|
28
28
|
remarks?: string;
|
|
29
|
-
rejectionReason?: string;
|
|
30
29
|
createdAt?: Date | string;
|
|
31
30
|
updatedAt?: Date | string;
|
|
32
31
|
deletedAt?: Date | string;
|