@eeplatform/nuxt-layer-common 1.3.2 → 1.3.3
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 +6 -0
- package/components/EnrollmentForm.vue +1419 -0
- package/composables/useBasicEdu.ts +231 -0
- package/composables/useEnrollment.ts +97 -0
- package/package.json +1 -1
- package/types/enrollment.d.ts +95 -0
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
export default function useBasicEdu() {
|
|
2
|
+
const educationLevels = [
|
|
3
|
+
{
|
|
4
|
+
title: "Kindergarten",
|
|
5
|
+
value: "kindergarten",
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
title: "Elementary",
|
|
9
|
+
value: "elementary",
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
title: "Junior High School",
|
|
13
|
+
value: "junior-high-school",
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
title: "Senior High School",
|
|
17
|
+
value: "senior-high-school",
|
|
18
|
+
},
|
|
19
|
+
];
|
|
20
|
+
|
|
21
|
+
// K-12 only
|
|
22
|
+
function getGradeLevels(educationLevel: string) {
|
|
23
|
+
switch (educationLevel) {
|
|
24
|
+
case "kindergarten":
|
|
25
|
+
return ["K1", "K2"];
|
|
26
|
+
case "elementary":
|
|
27
|
+
return [
|
|
28
|
+
"Grade 1",
|
|
29
|
+
"Grade 2",
|
|
30
|
+
"Grade 3",
|
|
31
|
+
"Grade 4",
|
|
32
|
+
"Grade 5",
|
|
33
|
+
"Grade 6",
|
|
34
|
+
];
|
|
35
|
+
case "junior-high-school":
|
|
36
|
+
return ["Grade 7", "Grade 8", "Grade 9", "Grade 10"];
|
|
37
|
+
case "senior-high-school":
|
|
38
|
+
return ["Grade 11", "Grade 12"];
|
|
39
|
+
default:
|
|
40
|
+
return [];
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
const gradeLevels = [
|
|
45
|
+
{
|
|
46
|
+
title: "K1",
|
|
47
|
+
value: "K1",
|
|
48
|
+
level: "kindergarten",
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
title: "K2",
|
|
52
|
+
value: "K2",
|
|
53
|
+
level: "kindergarten",
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
title: "Grade 1",
|
|
57
|
+
value: "grade-1",
|
|
58
|
+
level: "elementary",
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
title: "Grade 2",
|
|
62
|
+
value: "grade-2",
|
|
63
|
+
level: "elementary",
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
title: "Grade 3",
|
|
67
|
+
value: "grade-3",
|
|
68
|
+
level: "elementary",
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
title: "Grade 4",
|
|
72
|
+
value: "grade-4",
|
|
73
|
+
level: "elementary",
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
title: "Grade 5",
|
|
77
|
+
value: "grade-5",
|
|
78
|
+
level: "elementary",
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
title: "Grade 6",
|
|
82
|
+
value: "grade-6",
|
|
83
|
+
level: "elementary",
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
title: "Grade 7",
|
|
87
|
+
value: "grade-7",
|
|
88
|
+
level: "junior-high-school",
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
title: "Grade 8",
|
|
92
|
+
value: "grade-8",
|
|
93
|
+
level: "junior-high-school",
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
title: "Grade 9",
|
|
97
|
+
value: "grade-9",
|
|
98
|
+
level: "junior-high-school",
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
title: "Grade 10",
|
|
102
|
+
value: "grade-10",
|
|
103
|
+
level: "junior-high-school",
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
title: "Grade 11",
|
|
107
|
+
value: "grade-11",
|
|
108
|
+
level: "senior-high-school",
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
title: "Grade 12",
|
|
112
|
+
value: "grade-12",
|
|
113
|
+
level: "senior-high-school",
|
|
114
|
+
},
|
|
115
|
+
];
|
|
116
|
+
|
|
117
|
+
function generateSchoolYears(generation = 0) {
|
|
118
|
+
const currentYear = new Date().getFullYear();
|
|
119
|
+
const years = [];
|
|
120
|
+
for (let i = currentYear - generation; i <= currentYear; i++) {
|
|
121
|
+
years.push(`${i}-${i + 1}`);
|
|
122
|
+
}
|
|
123
|
+
return years;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
async function getPhilippineMunicipalities() {
|
|
127
|
+
return $fetch<Record<string, any>>("https://psgc.cloud/api/municipalities");
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
async function getPhilippineCities() {
|
|
131
|
+
return $fetch<Record<string, any>>("https://psgc.cloud/api/cities");
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
const motherTongueOptions = [
|
|
135
|
+
"Tagalog",
|
|
136
|
+
"Cebuano",
|
|
137
|
+
"Ilocano",
|
|
138
|
+
"Hiligaynon/Ilonggo",
|
|
139
|
+
"Bikol",
|
|
140
|
+
"Waray",
|
|
141
|
+
"Kapampangan",
|
|
142
|
+
"Pangasinan",
|
|
143
|
+
"Maranao",
|
|
144
|
+
"Maguindanaoan",
|
|
145
|
+
"Tausug",
|
|
146
|
+
"Chavacano",
|
|
147
|
+
"Kinaray-a",
|
|
148
|
+
"Aklanon",
|
|
149
|
+
"Ibanag",
|
|
150
|
+
"Ivatan",
|
|
151
|
+
"Yakan",
|
|
152
|
+
"Surigaonon",
|
|
153
|
+
"Butuanon",
|
|
154
|
+
"Subanen",
|
|
155
|
+
"Manobo languages",
|
|
156
|
+
];
|
|
157
|
+
|
|
158
|
+
const tracks = [
|
|
159
|
+
{
|
|
160
|
+
title: "Academic",
|
|
161
|
+
value: "academic",
|
|
162
|
+
strands: [
|
|
163
|
+
{
|
|
164
|
+
title: "Accountancy, Business and Management (ABM)",
|
|
165
|
+
value: "accountancy-business-and-management-abm",
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
title: "Humanities and Social Sciences (HUMSS)",
|
|
169
|
+
value: "humanities-and-social-sciences",
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
title: "Science, Technology, Engineering and Mathematics (STEM)",
|
|
173
|
+
value: "science-technology-engineering-and-mathematics",
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
title: "General Academic Strand (GAS)",
|
|
177
|
+
value: "general-academic-strand",
|
|
178
|
+
},
|
|
179
|
+
],
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
title: "Technical-Vocational-Livelihood",
|
|
183
|
+
value: "technical-vocational-livelihood",
|
|
184
|
+
strands: [
|
|
185
|
+
{
|
|
186
|
+
title: "Home Economics",
|
|
187
|
+
value: "home-economics",
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
title: "Information and Communications Technology (ICT)",
|
|
191
|
+
value: "information-and-communications-technology",
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
title: "Industrial Arts",
|
|
195
|
+
value: "industrial-arts",
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
title: "Agri-Fishery Arts",
|
|
199
|
+
value: "agri-fishery-arts",
|
|
200
|
+
},
|
|
201
|
+
],
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
title: "Sports",
|
|
205
|
+
value: "sports",
|
|
206
|
+
strands: [
|
|
207
|
+
{ title: "Sports Performance", value: "sports-performance" },
|
|
208
|
+
{ title: "Sports Coaching", value: "sports-coaching" },
|
|
209
|
+
],
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
title: "Arts and Design",
|
|
213
|
+
value: "arts-and-design",
|
|
214
|
+
strands: [
|
|
215
|
+
{ title: "Visual Arts", value: "visual-arts" },
|
|
216
|
+
{ title: "Performing Arts", value: "performing-arts" },
|
|
217
|
+
{ title: "Media Arts", value: "media-arts" },
|
|
218
|
+
],
|
|
219
|
+
},
|
|
220
|
+
];
|
|
221
|
+
|
|
222
|
+
return {
|
|
223
|
+
educationLevels,
|
|
224
|
+
gradeLevels,
|
|
225
|
+
generateSchoolYears,
|
|
226
|
+
getPhilippineMunicipalities,
|
|
227
|
+
getPhilippineCities,
|
|
228
|
+
motherTongueOptions,
|
|
229
|
+
tracks,
|
|
230
|
+
};
|
|
231
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
export default function useEnrollment() {
|
|
2
|
+
const enrollment = ref<TBasicEducEnrForm>({
|
|
3
|
+
school: "",
|
|
4
|
+
schoolName: "",
|
|
5
|
+
region: "",
|
|
6
|
+
regionName: "",
|
|
7
|
+
division: "",
|
|
8
|
+
divisionName: "",
|
|
9
|
+
province: "",
|
|
10
|
+
provincePSGC: "",
|
|
11
|
+
cityMunicipality: "",
|
|
12
|
+
cityMunicipalityPSGC: "",
|
|
13
|
+
schoolYear: "",
|
|
14
|
+
gradeLevel: "",
|
|
15
|
+
learnerInfo: {
|
|
16
|
+
psaBirthCertificateNo: "",
|
|
17
|
+
learnerReferenceNumber: "",
|
|
18
|
+
firstName: "",
|
|
19
|
+
middleName: "",
|
|
20
|
+
lastName: "",
|
|
21
|
+
extensionName: "",
|
|
22
|
+
birthDate: "",
|
|
23
|
+
placeOfBirth: "",
|
|
24
|
+
sex: "",
|
|
25
|
+
motherTongue: "",
|
|
26
|
+
age: 0,
|
|
27
|
+
disabilities: [],
|
|
28
|
+
indigenousCommunity: "",
|
|
29
|
+
fourPsHouseholdId: "",
|
|
30
|
+
},
|
|
31
|
+
parentGuardianInfo: {
|
|
32
|
+
father: {
|
|
33
|
+
firstName: "",
|
|
34
|
+
lastName: "",
|
|
35
|
+
middleName: "",
|
|
36
|
+
contactNumber: "",
|
|
37
|
+
},
|
|
38
|
+
mother: {
|
|
39
|
+
firstName: "",
|
|
40
|
+
lastName: "",
|
|
41
|
+
middleName: "",
|
|
42
|
+
contactNumber: "",
|
|
43
|
+
},
|
|
44
|
+
legalGuardian: {
|
|
45
|
+
firstName: "",
|
|
46
|
+
lastName: "",
|
|
47
|
+
middleName: "",
|
|
48
|
+
contactNumber: "",
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
address: {
|
|
52
|
+
current: {
|
|
53
|
+
houseNumber: "",
|
|
54
|
+
streetName: "",
|
|
55
|
+
sitio: "",
|
|
56
|
+
barangay: "",
|
|
57
|
+
municipalityCity: "",
|
|
58
|
+
province: "",
|
|
59
|
+
country: "Philippines",
|
|
60
|
+
zipCode: "",
|
|
61
|
+
},
|
|
62
|
+
permanent: {
|
|
63
|
+
houseNumber: "",
|
|
64
|
+
streetName: "",
|
|
65
|
+
sitio: "",
|
|
66
|
+
barangay: "",
|
|
67
|
+
municipalityCity: "",
|
|
68
|
+
province: "",
|
|
69
|
+
country: "",
|
|
70
|
+
zipCode: "",
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
returningLearnerInfo: {
|
|
74
|
+
lastGradeLevelCompleted: "",
|
|
75
|
+
lastSchoolYearCompleted: "",
|
|
76
|
+
lastSchoolAttended: "",
|
|
77
|
+
lastSchoolId: "",
|
|
78
|
+
},
|
|
79
|
+
seniorHighInfo: {
|
|
80
|
+
track: "",
|
|
81
|
+
strand: "",
|
|
82
|
+
semester: "",
|
|
83
|
+
},
|
|
84
|
+
preferredLearningModalities: [],
|
|
85
|
+
lastGradeLevelCompleted: "",
|
|
86
|
+
lastSchoolYearCompleted: "",
|
|
87
|
+
lastSchoolAttended: "",
|
|
88
|
+
lastSchoolId: "",
|
|
89
|
+
remarks: "",
|
|
90
|
+
alternativeLearningOptions: [],
|
|
91
|
+
isCertifiedAndConsented: false,
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
return {
|
|
95
|
+
enrollment,
|
|
96
|
+
};
|
|
97
|
+
}
|
package/package.json
CHANGED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
declare type TBasicEducEnrForm = {
|
|
2
|
+
_id?: string;
|
|
3
|
+
region: string; // e.g., "NCR"
|
|
4
|
+
regionName?: string; // e.g., "National Capital Region"
|
|
5
|
+
province: string; // e.g., "Metro Manila"
|
|
6
|
+
provincePSGC?: string; // e.g., "Metro Manila"
|
|
7
|
+
cityMunicipality: string; // e.g., "Manila"
|
|
8
|
+
cityMunicipalityPSGC?: string; // e.g., "Manila"
|
|
9
|
+
division: string; // e.g., "Manila"
|
|
10
|
+
divisionName?: string; // e.g., "Manila"
|
|
11
|
+
school: string;
|
|
12
|
+
schoolName?: string;
|
|
13
|
+
schoolYear: string; // e.g., "2025-2026"
|
|
14
|
+
gradeLevel: string; // e.g., "Grade 7"
|
|
15
|
+
learnerInfo: EnrLearnerInfo;
|
|
16
|
+
parentGuardianInfo: EnrParentGuardianInfo;
|
|
17
|
+
address: AddressInformation;
|
|
18
|
+
returningLearnerInfo?: EnrReturningLearnerInfo;
|
|
19
|
+
seniorHighInfo?: EnrSeniorHighInformation;
|
|
20
|
+
preferredLearningModalities?: string[];
|
|
21
|
+
lastGradeLevelCompleted?: string;
|
|
22
|
+
lastSchoolYearCompleted?: string;
|
|
23
|
+
lastSchoolAttended?: string;
|
|
24
|
+
lastSchoolId?: string;
|
|
25
|
+
alternativeLearningOptions?: string[];
|
|
26
|
+
isCertifiedAndConsented: boolean;
|
|
27
|
+
status?: string;
|
|
28
|
+
remarks?: string;
|
|
29
|
+
rejectionReason?: string;
|
|
30
|
+
createdAt?: Date | string;
|
|
31
|
+
updatedAt?: Date | string;
|
|
32
|
+
deletedAt?: Date | string;
|
|
33
|
+
createdBy?: string;
|
|
34
|
+
updatedBy?: string;
|
|
35
|
+
deletedBy?: string;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
declare type EnrLearnerInfo = {
|
|
39
|
+
psaBirthCertificateNo?: string;
|
|
40
|
+
learnerReferenceNumber?: string; // Learner Reference Number
|
|
41
|
+
lastName: string;
|
|
42
|
+
firstName: string;
|
|
43
|
+
middleName?: string;
|
|
44
|
+
extensionName?: string; // e.g., Jr., III
|
|
45
|
+
birthDate: string; // ISO format: YYYY-MM-DD
|
|
46
|
+
sex: string;
|
|
47
|
+
age: number;
|
|
48
|
+
placeOfBirth: string;
|
|
49
|
+
motherTongue?: string;
|
|
50
|
+
fourPsHouseholdId?: string;
|
|
51
|
+
indigenousCommunity?: string;
|
|
52
|
+
disabilities?: string[];
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
declare type EnrParentGuardianInfo = {
|
|
56
|
+
father: PersonContact;
|
|
57
|
+
mother: PersonContact;
|
|
58
|
+
legalGuardian: PersonContact;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
declare type PersonContact = {
|
|
62
|
+
lastName: string;
|
|
63
|
+
firstName: string;
|
|
64
|
+
middleName?: string;
|
|
65
|
+
contactNumber?: string;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
declare type AddressInformation = {
|
|
69
|
+
current: EnrAddress;
|
|
70
|
+
permanent: EnrAddress;
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
declare type EnrAddress = {
|
|
74
|
+
houseNumber?: string;
|
|
75
|
+
streetName?: string;
|
|
76
|
+
sitio?: string;
|
|
77
|
+
barangay: string;
|
|
78
|
+
municipalityCity: string;
|
|
79
|
+
province: string;
|
|
80
|
+
country?: string;
|
|
81
|
+
zipCode?: string;
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
declare type EnrReturningLearnerInfo = {
|
|
85
|
+
lastGradeLevelCompleted: string;
|
|
86
|
+
lastSchoolYearCompleted: string;
|
|
87
|
+
lastSchoolAttended: string;
|
|
88
|
+
lastSchoolId?: string;
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
declare type EnrSeniorHighInformation = {
|
|
92
|
+
semester: string;
|
|
93
|
+
track: string;
|
|
94
|
+
strand: string;
|
|
95
|
+
};
|