@eeplatform/nuxt-layer-common 1.4.2 → 1.4.4
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 +12 -0
- package/components/InvitationForm.vue +1 -1
- package/composables/useEnrollment.ts +26 -26
- package/package.json +2 -2
- package/pages/require-membership.vue +29 -0
- package/plugins/admin.client.ts +45 -0
package/CHANGELOG.md
CHANGED
|
@@ -8,21 +8,21 @@ export default function useEnrollment() {
|
|
|
8
8
|
divisionName: "",
|
|
9
9
|
province: "",
|
|
10
10
|
cityMunicipality: "",
|
|
11
|
-
schoolYear: "
|
|
11
|
+
schoolYear: "",
|
|
12
12
|
gradeLevel: "K1",
|
|
13
13
|
returningLearner: false,
|
|
14
14
|
learnerInfo: {
|
|
15
15
|
psaBirthCertificateNo: "",
|
|
16
|
-
lrn: "
|
|
17
|
-
firstName: "
|
|
16
|
+
lrn: "",
|
|
17
|
+
firstName: "",
|
|
18
18
|
middleName: "",
|
|
19
|
-
lastName: "
|
|
19
|
+
lastName: "",
|
|
20
20
|
extensionName: "",
|
|
21
|
-
birthDate: "
|
|
22
|
-
placeOfBirth: "
|
|
23
|
-
sex: "
|
|
24
|
-
motherTongue: "
|
|
25
|
-
age:
|
|
21
|
+
birthDate: "",
|
|
22
|
+
placeOfBirth: "",
|
|
23
|
+
sex: "",
|
|
24
|
+
motherTongue: "",
|
|
25
|
+
age: 0,
|
|
26
26
|
withDisability: false,
|
|
27
27
|
disabilities: [],
|
|
28
28
|
indigenousCommunity: "",
|
|
@@ -30,20 +30,20 @@ export default function useEnrollment() {
|
|
|
30
30
|
},
|
|
31
31
|
parentGuardianInfo: {
|
|
32
32
|
father: {
|
|
33
|
-
firstName: "
|
|
34
|
-
lastName: "
|
|
33
|
+
firstName: "",
|
|
34
|
+
lastName: "",
|
|
35
35
|
middleName: "",
|
|
36
36
|
contactNumber: "",
|
|
37
37
|
},
|
|
38
38
|
mother: {
|
|
39
|
-
firstName: "
|
|
40
|
-
lastName: "
|
|
39
|
+
firstName: "",
|
|
40
|
+
lastName: "",
|
|
41
41
|
middleName: "",
|
|
42
42
|
contactNumber: "",
|
|
43
43
|
},
|
|
44
44
|
legalGuardian: {
|
|
45
|
-
firstName: "
|
|
46
|
-
lastName: "
|
|
45
|
+
firstName: "",
|
|
46
|
+
lastName: "",
|
|
47
47
|
middleName: "",
|
|
48
48
|
contactNumber: "",
|
|
49
49
|
},
|
|
@@ -53,21 +53,21 @@ export default function useEnrollment() {
|
|
|
53
53
|
houseNumber: "",
|
|
54
54
|
streetName: "",
|
|
55
55
|
sitio: "",
|
|
56
|
-
barangay: "
|
|
57
|
-
municipalityCity: "
|
|
58
|
-
province: "
|
|
59
|
-
country: "
|
|
60
|
-
zipCode: "
|
|
56
|
+
barangay: "",
|
|
57
|
+
municipalityCity: "",
|
|
58
|
+
province: "",
|
|
59
|
+
country: "",
|
|
60
|
+
zipCode: "",
|
|
61
61
|
},
|
|
62
62
|
permanent: {
|
|
63
63
|
houseNumber: "",
|
|
64
64
|
streetName: "",
|
|
65
65
|
sitio: "",
|
|
66
|
-
barangay: "
|
|
67
|
-
municipalityCity: "
|
|
68
|
-
province: "
|
|
69
|
-
country: "
|
|
70
|
-
zipCode: "
|
|
66
|
+
barangay: "",
|
|
67
|
+
municipalityCity: "",
|
|
68
|
+
province: "",
|
|
69
|
+
country: "",
|
|
70
|
+
zipCode: "",
|
|
71
71
|
},
|
|
72
72
|
},
|
|
73
73
|
returningLearnerInfo: {
|
|
@@ -78,7 +78,7 @@ export default function useEnrollment() {
|
|
|
78
78
|
},
|
|
79
79
|
seniorHighInfo: { track: "", strand: "", semester: "" },
|
|
80
80
|
remarks: "",
|
|
81
|
-
alternativeLearningOptions: [
|
|
81
|
+
alternativeLearningOptions: [],
|
|
82
82
|
isCertifiedAndConsented: true,
|
|
83
83
|
});
|
|
84
84
|
|
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.
|
|
5
|
+
"version": "1.4.4",
|
|
6
6
|
"main": "./nuxt.config.ts",
|
|
7
7
|
"publishConfig": {
|
|
8
8
|
"access": "public"
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"typescript": "^5.6.3",
|
|
24
24
|
"vite-plugin-vuetify": "^2.0.4",
|
|
25
25
|
"vue": "latest",
|
|
26
|
-
"vuetify": "^3.10.
|
|
26
|
+
"vuetify": "^3.10.11"
|
|
27
27
|
},
|
|
28
28
|
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e",
|
|
29
29
|
"dependencies": {
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<v-row no-gutters class="fill-height" align="center" justify="center">
|
|
3
|
+
<v-col cols="12" lg="6" md="6" sm="6" class="text-center text-subtitle-1">
|
|
4
|
+
Membership is required to access this app. Please contact administrator.
|
|
5
|
+
<v-row no-gutters justify="center" align="center" class="mt-2">
|
|
6
|
+
<v-btn
|
|
7
|
+
@click="goToAccount"
|
|
8
|
+
rounded="xl"
|
|
9
|
+
variant="tonal"
|
|
10
|
+
class="text-none text-subtitle-2"
|
|
11
|
+
>
|
|
12
|
+
Go to Account Page
|
|
13
|
+
</v-btn>
|
|
14
|
+
</v-row>
|
|
15
|
+
</v-col>
|
|
16
|
+
</v-row>
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<script setup lang="ts">
|
|
20
|
+
definePageMeta({
|
|
21
|
+
layout: "plain",
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
const { APP_ACCOUNT } = useRuntimeConfig().public;
|
|
25
|
+
|
|
26
|
+
function goToAccount() {
|
|
27
|
+
window.location.href = `${APP_ACCOUNT}/home`;
|
|
28
|
+
}
|
|
29
|
+
</script>
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export default defineNuxtPlugin(() => {
|
|
2
|
+
const router = useRouter();
|
|
3
|
+
const { getByUserType } = useMember();
|
|
4
|
+
const { getRoleById } = useRole();
|
|
5
|
+
|
|
6
|
+
const { userAppRole, id } = useLocalSetup();
|
|
7
|
+
|
|
8
|
+
router.afterEach((to) => {
|
|
9
|
+
const isMember = to.meta?.member;
|
|
10
|
+
if (!isMember) return;
|
|
11
|
+
|
|
12
|
+
const APP = useRuntimeConfig().public.APP;
|
|
13
|
+
const org = (to.params.org as string) ?? "";
|
|
14
|
+
|
|
15
|
+
const userId = computed(() => useCookie("user").value ?? "");
|
|
16
|
+
|
|
17
|
+
const { data: userMemberData, error: userMemberError } = useLazyAsyncData(
|
|
18
|
+
"get-member-by-id",
|
|
19
|
+
() => getByUserType(userId.value, APP, org),
|
|
20
|
+
{ watch: [userId] }
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
watchEffect(() => {
|
|
24
|
+
if (userMemberError.value) {
|
|
25
|
+
navigateTo({
|
|
26
|
+
name: "require-membership",
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
const roleId = computed(() => userMemberData.value?.role ?? "");
|
|
32
|
+
|
|
33
|
+
const { data: getRoleByIdReq } = useLazyAsyncData(
|
|
34
|
+
"get-role-by-id",
|
|
35
|
+
() => getRoleById(roleId.value),
|
|
36
|
+
{ watch: [roleId], immediate: false }
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
watchEffect(() => {
|
|
40
|
+
if (getRoleByIdReq.value) {
|
|
41
|
+
userAppRole.value = getRoleByIdReq.value;
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
});
|