@eeplatform/nuxt-layer-common 1.4.6 → 1.4.8
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
|
@@ -1286,10 +1286,14 @@ 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
|
|
|
1293
|
+
const { cookieConfig } = useRuntimeConfig().public;
|
|
1294
|
+
|
|
1295
|
+
enrollment.value.createdBy = useCookie("user", cookieConfig).value ?? "";
|
|
1296
|
+
|
|
1293
1297
|
const { getAll: getAllPSGC } = usePSGC();
|
|
1294
1298
|
|
|
1295
1299
|
const region = ref("");
|
|
@@ -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: "",
|
|
@@ -82,7 +82,7 @@ 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,
|
|
@@ -101,9 +101,19 @@ export default function useEnrollment() {
|
|
|
101
101
|
});
|
|
102
102
|
}
|
|
103
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
|
+
|
|
104
113
|
return {
|
|
105
114
|
enrollment,
|
|
106
115
|
add,
|
|
107
116
|
getAll,
|
|
117
|
+
updateStatusById,
|
|
108
118
|
};
|
|
109
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;
|