@eeplatform/nuxt-layer-common 1.3.2 → 1.4.0
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/EnrollmentForm.vue +1498 -0
- package/composables/useBasicEdu.ts +231 -0
- package/composables/useDivision.ts +10 -57
- package/composables/useEnrollment.ts +103 -0
- package/composables/usePSGC.ts +17 -0
- package/composables/useRegion.ts +8 -54
- package/composables/useSchool.ts +5 -69
- package/package.json +1 -1
- package/types/basic-edu.d.ts +23 -0
- 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
|
+
}
|
|
@@ -1,64 +1,17 @@
|
|
|
1
|
-
export default function
|
|
2
|
-
function getAll({
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
},
|
|
1
|
+
export default function useRegion() {
|
|
2
|
+
async function getAll({
|
|
3
|
+
page = 1,
|
|
4
|
+
search = "",
|
|
5
|
+
status = "active",
|
|
6
|
+
limit = 20,
|
|
7
|
+
region = "",
|
|
8
|
+
} = {}) {
|
|
9
|
+
return $fetch<Record<string, any>>("/api/basic-education/divisions", {
|
|
10
|
+
query: { page, search, status, limit, region },
|
|
11
11
|
});
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
function getById(id = "") {
|
|
15
|
-
return useNuxtApp().$api<Record<string, any>>(`/api/divisions/id/${id}`, {
|
|
16
|
-
method: "GET",
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
function getByName(name = "") {
|
|
21
|
-
return useNuxtApp().$api(`/api/divisions/name/${name}`, {
|
|
22
|
-
method: "GET",
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
function createDivision(data: Record<string, any>) {
|
|
27
|
-
return useNuxtApp().$api("/api/divisions", {
|
|
28
|
-
method: "POST",
|
|
29
|
-
body: data,
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
function updateDivisionField(id: string, field: string, value: string) {
|
|
34
|
-
return useNuxtApp().$api(`/api/divisions/${id}`, {
|
|
35
|
-
method: "PATCH",
|
|
36
|
-
body: { field, value },
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
function deleteDivision(id: string) {
|
|
41
|
-
return useNuxtApp().$api(`/api/divisions/${id}`, {
|
|
42
|
-
method: "DELETE",
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
const division = ref({
|
|
47
|
-
_id: "",
|
|
48
|
-
name: "",
|
|
49
|
-
region: "",
|
|
50
|
-
regionName: "",
|
|
51
|
-
superintendent: "",
|
|
52
|
-
superintendentName: "",
|
|
53
|
-
});
|
|
54
|
-
|
|
55
14
|
return {
|
|
56
|
-
division,
|
|
57
15
|
getAll,
|
|
58
|
-
getById,
|
|
59
|
-
getByName,
|
|
60
|
-
createDivision,
|
|
61
|
-
updateDivisionField,
|
|
62
|
-
deleteDivision,
|
|
63
16
|
};
|
|
64
17
|
}
|
|
@@ -0,0 +1,103 @@
|
|
|
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
|
+
cityMunicipality: "",
|
|
11
|
+
schoolYear: "",
|
|
12
|
+
gradeLevel: "",
|
|
13
|
+
learnerInfo: {
|
|
14
|
+
psaBirthCertificateNo: "",
|
|
15
|
+
learnerReferenceNumber: "",
|
|
16
|
+
firstName: "",
|
|
17
|
+
middleName: "",
|
|
18
|
+
lastName: "",
|
|
19
|
+
extensionName: "",
|
|
20
|
+
birthDate: "",
|
|
21
|
+
placeOfBirth: "",
|
|
22
|
+
sex: "",
|
|
23
|
+
motherTongue: "",
|
|
24
|
+
age: 0,
|
|
25
|
+
disabilities: [],
|
|
26
|
+
indigenousCommunity: "",
|
|
27
|
+
fourPsHouseholdId: "",
|
|
28
|
+
},
|
|
29
|
+
parentGuardianInfo: {
|
|
30
|
+
father: {
|
|
31
|
+
firstName: "",
|
|
32
|
+
lastName: "",
|
|
33
|
+
middleName: "",
|
|
34
|
+
contactNumber: "",
|
|
35
|
+
},
|
|
36
|
+
mother: {
|
|
37
|
+
firstName: "",
|
|
38
|
+
lastName: "",
|
|
39
|
+
middleName: "",
|
|
40
|
+
contactNumber: "",
|
|
41
|
+
},
|
|
42
|
+
legalGuardian: {
|
|
43
|
+
firstName: "",
|
|
44
|
+
lastName: "",
|
|
45
|
+
middleName: "",
|
|
46
|
+
contactNumber: "",
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
address: {
|
|
50
|
+
current: {
|
|
51
|
+
houseNumber: "",
|
|
52
|
+
streetName: "",
|
|
53
|
+
sitio: "",
|
|
54
|
+
barangay: "",
|
|
55
|
+
municipalityCity: "",
|
|
56
|
+
province: "",
|
|
57
|
+
country: "Philippines",
|
|
58
|
+
zipCode: "",
|
|
59
|
+
},
|
|
60
|
+
permanent: {
|
|
61
|
+
houseNumber: "",
|
|
62
|
+
streetName: "",
|
|
63
|
+
sitio: "",
|
|
64
|
+
barangay: "",
|
|
65
|
+
municipalityCity: "",
|
|
66
|
+
province: "",
|
|
67
|
+
country: "",
|
|
68
|
+
zipCode: "",
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
returningLearnerInfo: {
|
|
72
|
+
lastGradeLevelCompleted: "",
|
|
73
|
+
lastSchoolYearCompleted: "",
|
|
74
|
+
lastSchoolAttended: "",
|
|
75
|
+
lastSchoolId: "",
|
|
76
|
+
},
|
|
77
|
+
seniorHighInfo: {
|
|
78
|
+
track: "",
|
|
79
|
+
strand: "",
|
|
80
|
+
semester: "",
|
|
81
|
+
},
|
|
82
|
+
preferredLearningModalities: [],
|
|
83
|
+
lastGradeLevelCompleted: "",
|
|
84
|
+
lastSchoolYearCompleted: "",
|
|
85
|
+
lastSchoolAttended: "",
|
|
86
|
+
lastSchoolId: "",
|
|
87
|
+
remarks: "",
|
|
88
|
+
alternativeLearningOptions: [],
|
|
89
|
+
isCertifiedAndConsented: false,
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
function add(value: TBasicEducEnrForm) {
|
|
93
|
+
return $fetch("/api/basic-education/enrollments", {
|
|
94
|
+
method: "POST",
|
|
95
|
+
body: value,
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
return {
|
|
100
|
+
enrollment,
|
|
101
|
+
add,
|
|
102
|
+
};
|
|
103
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export default function usePSGC() {
|
|
2
|
+
function getAll({
|
|
3
|
+
page = 1,
|
|
4
|
+
limit = 10,
|
|
5
|
+
search = "",
|
|
6
|
+
type = "",
|
|
7
|
+
prefix = "",
|
|
8
|
+
} = {}) {
|
|
9
|
+
return $fetch<Record<string, any>>("/api/psgc", {
|
|
10
|
+
query: { page, limit, search, type, prefix },
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
return {
|
|
15
|
+
getAll,
|
|
16
|
+
};
|
|
17
|
+
}
|
package/composables/useRegion.ts
CHANGED
|
@@ -1,62 +1,16 @@
|
|
|
1
1
|
export default function useRegion() {
|
|
2
|
-
function getAll({
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
},
|
|
2
|
+
async function getAll({
|
|
3
|
+
page = 1,
|
|
4
|
+
search = "",
|
|
5
|
+
status = "active",
|
|
6
|
+
limit = 20,
|
|
7
|
+
} = {}) {
|
|
8
|
+
return $fetch<Record<string, any>>("/api/basic-education/regions", {
|
|
9
|
+
query: { page, search, status, limit },
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
function getById(id = "") {
|
|
14
|
-
return useNuxtApp().$api<Record<string, any>>(`/api/regions/id/${id}`, {
|
|
15
|
-
method: "GET",
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
function getByName(name = "") {
|
|
20
|
-
return useNuxtApp().$api(`/api/regions/name/${name}`, {
|
|
21
|
-
method: "GET",
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
function createRegion(data: Record<string, any>) {
|
|
26
|
-
return useNuxtApp().$api("/api/regions", {
|
|
27
|
-
method: "POST",
|
|
28
|
-
body: data,
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
function updateRegionField(id: string, field: string, value: string) {
|
|
33
|
-
return useNuxtApp().$api(`/api/regions/${id}`, {
|
|
34
|
-
method: "PATCH",
|
|
35
|
-
body: { field, value },
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
function deleteRegion(id: string) {
|
|
40
|
-
return useNuxtApp().$api(`/api/regions/${id}`, {
|
|
41
|
-
method: "DELETE",
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
const region = ref({
|
|
46
|
-
_id: "",
|
|
47
|
-
name: "",
|
|
48
|
-
director: "",
|
|
49
|
-
directorName: "",
|
|
50
|
-
});
|
|
51
|
-
|
|
52
13
|
return {
|
|
53
|
-
region,
|
|
54
14
|
getAll,
|
|
55
|
-
getById,
|
|
56
|
-
getByName,
|
|
57
|
-
createRegion,
|
|
58
|
-
updateRegionField,
|
|
59
|
-
deleteRegion,
|
|
60
15
|
};
|
|
61
16
|
}
|
|
62
|
-
|
package/composables/useSchool.ts
CHANGED
|
@@ -1,80 +1,16 @@
|
|
|
1
1
|
export default function useSchool() {
|
|
2
|
-
function
|
|
3
|
-
return useNuxtApp().$api<{ message: string }>("/api/schools", {
|
|
4
|
-
method: "POST",
|
|
5
|
-
body: school,
|
|
6
|
-
});
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
function registerSchool(school: TSchool) {
|
|
10
|
-
return useNuxtApp().$api("/api/schools/register", {
|
|
11
|
-
method: "POST",
|
|
12
|
-
body: school,
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
function getPendingByCreatedBy(createdBy: string) {
|
|
17
|
-
return useNuxtApp().$api<Record<string, any>>(
|
|
18
|
-
`/api/schools/createdBy/${createdBy}`,
|
|
19
|
-
{
|
|
20
|
-
method: "GET",
|
|
21
|
-
}
|
|
22
|
-
);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
function approvedById(id: string) {
|
|
26
|
-
return useNuxtApp().$api<Record<string, any>>(
|
|
27
|
-
`/api/schools/approve/${id}`,
|
|
28
|
-
{
|
|
29
|
-
method: "PATCH",
|
|
30
|
-
}
|
|
31
|
-
);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
function getAll({
|
|
2
|
+
async function getAll({
|
|
35
3
|
page = 1,
|
|
36
|
-
status = "active",
|
|
37
4
|
search = "",
|
|
38
|
-
|
|
39
|
-
|
|
5
|
+
status = "active",
|
|
6
|
+
limit = 20,
|
|
40
7
|
} = {}) {
|
|
41
|
-
return
|
|
42
|
-
|
|
43
|
-
query: { page, status, search, org, app },
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
function bulkAdd(file: File | null, region: string, division: string) {
|
|
48
|
-
if (!file) {
|
|
49
|
-
throw new Error("File not found.");
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
const formData = new FormData();
|
|
53
|
-
formData.append("file", file);
|
|
54
|
-
formData.append("region", region);
|
|
55
|
-
formData.append("division", division);
|
|
56
|
-
|
|
57
|
-
return useNuxtApp().$api<{
|
|
58
|
-
message: string;
|
|
59
|
-
details: {
|
|
60
|
-
successful: number;
|
|
61
|
-
failed: number;
|
|
62
|
-
total: number;
|
|
63
|
-
totalSizeMB: number;
|
|
64
|
-
errors: string[];
|
|
65
|
-
};
|
|
66
|
-
}>("/api/schools/bulk", {
|
|
67
|
-
method: "POST",
|
|
68
|
-
body: formData,
|
|
8
|
+
return $fetch<Record<string, any>>("/api/basic-education/schools", {
|
|
9
|
+
query: { page, search, status, limit },
|
|
69
10
|
});
|
|
70
11
|
}
|
|
71
12
|
|
|
72
13
|
return {
|
|
73
|
-
addSchool,
|
|
74
|
-
registerSchool,
|
|
75
|
-
getPendingByCreatedBy,
|
|
76
14
|
getAll,
|
|
77
|
-
approvedById,
|
|
78
|
-
bulkAdd,
|
|
79
15
|
};
|
|
80
16
|
}
|
package/package.json
CHANGED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
declare type TRegion = {
|
|
2
|
+
_id?: string;
|
|
3
|
+
name: string;
|
|
4
|
+
director?: string;
|
|
5
|
+
directorName?: string;
|
|
6
|
+
status: string;
|
|
7
|
+
createdAt?: string;
|
|
8
|
+
updatedAt?: string;
|
|
9
|
+
deletedAt?: string;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
declare type TDivision = {
|
|
13
|
+
_id?: string;
|
|
14
|
+
name: string;
|
|
15
|
+
region?: string;
|
|
16
|
+
regionName?: string;
|
|
17
|
+
superintendent?: string;
|
|
18
|
+
superintendentName?: string;
|
|
19
|
+
status: string;
|
|
20
|
+
createdAt?: string;
|
|
21
|
+
updatedAt?: string;
|
|
22
|
+
deletedAt?: string;
|
|
23
|
+
};
|
|
@@ -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
|
+
};
|