@eeplatform/nuxt-layer-common 1.7.53 → 1.7.54
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/EnrollmentQuestion.vue +738 -0
- package/components/InvitationForm.vue +4 -4
- package/nuxt.config.ts +1 -0
- package/package.json +1 -1
- package/types/enrollment.d.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -0,0 +1,738 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<v-row no-gutters class="fill-height" justify="center" align-content="start">
|
|
3
|
+
<v-col cols="6" class="mt-4">
|
|
4
|
+
<v-row no-gutters>
|
|
5
|
+
<v-col cols="12">
|
|
6
|
+
<v-row no-gutters justify="space-between">
|
|
7
|
+
<v-btn icon variant="text" density="comfortable" @click="goBack">
|
|
8
|
+
<v-icon> ph:arrow-left-bold </v-icon>
|
|
9
|
+
</v-btn>
|
|
10
|
+
</v-row>
|
|
11
|
+
</v-col>
|
|
12
|
+
|
|
13
|
+
<v-col cols="12" class="pl-2 mt-2">
|
|
14
|
+
<v-progress-linear
|
|
15
|
+
:model-value="progress"
|
|
16
|
+
rounded="lg"
|
|
17
|
+
height="10"
|
|
18
|
+
></v-progress-linear>
|
|
19
|
+
</v-col>
|
|
20
|
+
|
|
21
|
+
<v-col v-if="currentStep === 1" cols="12" class="mt-8 pl-2">
|
|
22
|
+
<v-row no-gutters>
|
|
23
|
+
<v-col cols="12">
|
|
24
|
+
<v-form v-model="step1.valid">
|
|
25
|
+
<v-row no-gutters>
|
|
26
|
+
<v-col cols="12" class="mb-6">
|
|
27
|
+
<span class="text-h5 font-weight-bold">
|
|
28
|
+
{{ step1.question }}
|
|
29
|
+
</span>
|
|
30
|
+
</v-col>
|
|
31
|
+
|
|
32
|
+
<v-col v-if="isSelfService" cols="12">
|
|
33
|
+
<InputLabel title="Region" />
|
|
34
|
+
<v-autocomplete
|
|
35
|
+
v-model="step1.answer.region"
|
|
36
|
+
:items="regions"
|
|
37
|
+
item-title="name"
|
|
38
|
+
item-value="code"
|
|
39
|
+
:loading="regionStatus"
|
|
40
|
+
:disabled="regionStatus"
|
|
41
|
+
></v-autocomplete>
|
|
42
|
+
</v-col>
|
|
43
|
+
|
|
44
|
+
<v-col v-if="isSelfService" cols="12">
|
|
45
|
+
<InputLabel title="Province" />
|
|
46
|
+
<v-autocomplete
|
|
47
|
+
v-model="step1.answer.province"
|
|
48
|
+
:items="step1Provinces"
|
|
49
|
+
item-title="name"
|
|
50
|
+
item-value="code"
|
|
51
|
+
:return-object="false"
|
|
52
|
+
:loading="step1ProvincesStatus"
|
|
53
|
+
:disabled="step1ProvincesStatus || !step1.answer.region"
|
|
54
|
+
></v-autocomplete>
|
|
55
|
+
</v-col>
|
|
56
|
+
|
|
57
|
+
<v-col v-if="isSelfService" cols="12">
|
|
58
|
+
<InputLabel title="City/Municipality" />
|
|
59
|
+
<v-autocomplete
|
|
60
|
+
v-model="step1.answer.cityMunicipality"
|
|
61
|
+
:items="step1CitiesMunicipalities"
|
|
62
|
+
item-title="name"
|
|
63
|
+
item-value="code"
|
|
64
|
+
:loading="step1CitiesMunicipalitiesStatus"
|
|
65
|
+
:disabled="
|
|
66
|
+
step1CitiesMunicipalitiesStatus ||
|
|
67
|
+
!step1.answer.province
|
|
68
|
+
"
|
|
69
|
+
></v-autocomplete>
|
|
70
|
+
</v-col>
|
|
71
|
+
|
|
72
|
+
<v-col cols="12">
|
|
73
|
+
<InputLabel title="School" required />
|
|
74
|
+
<v-combobox
|
|
75
|
+
v-model="step1.answer.schoolId"
|
|
76
|
+
v-model:search="searchSchool"
|
|
77
|
+
:rules="[requiredRule]"
|
|
78
|
+
:items="schools"
|
|
79
|
+
item-title="name"
|
|
80
|
+
item-value="id"
|
|
81
|
+
:return-object="false"
|
|
82
|
+
:loading="schoolsStatus"
|
|
83
|
+
:disabled="schoolsStatus"
|
|
84
|
+
:hide-no-data="false"
|
|
85
|
+
>
|
|
86
|
+
<template v-slot:no-data>
|
|
87
|
+
<v-list-item>
|
|
88
|
+
<v-list-item-title>
|
|
89
|
+
No results matching "<strong>{{
|
|
90
|
+
searchSchool
|
|
91
|
+
}}</strong
|
|
92
|
+
>". Click the search button and try again.
|
|
93
|
+
</v-list-item-title>
|
|
94
|
+
</v-list-item>
|
|
95
|
+
</template>
|
|
96
|
+
|
|
97
|
+
<template #append>
|
|
98
|
+
<v-btn
|
|
99
|
+
variant="tonal"
|
|
100
|
+
:disabled="schoolsStatus"
|
|
101
|
+
class="text-none"
|
|
102
|
+
size="48"
|
|
103
|
+
width="100"
|
|
104
|
+
icon
|
|
105
|
+
@click="refreshSchools()"
|
|
106
|
+
>
|
|
107
|
+
<v-icon>ph:magnifying-glass-bold</v-icon>
|
|
108
|
+
</v-btn>
|
|
109
|
+
</template>
|
|
110
|
+
</v-combobox>
|
|
111
|
+
</v-col>
|
|
112
|
+
|
|
113
|
+
<v-col cols="12" class="mt-4">
|
|
114
|
+
<v-btn
|
|
115
|
+
class="text-none px-4"
|
|
116
|
+
size="large"
|
|
117
|
+
variant="flat"
|
|
118
|
+
color="black"
|
|
119
|
+
rounded="lg"
|
|
120
|
+
@click="step1.save()"
|
|
121
|
+
:disabled="!step1.valid"
|
|
122
|
+
>
|
|
123
|
+
Continue
|
|
124
|
+
</v-btn>
|
|
125
|
+
</v-col>
|
|
126
|
+
</v-row>
|
|
127
|
+
</v-form>
|
|
128
|
+
</v-col>
|
|
129
|
+
</v-row>
|
|
130
|
+
</v-col>
|
|
131
|
+
</v-row>
|
|
132
|
+
</v-col>
|
|
133
|
+
</v-row>
|
|
134
|
+
</template>
|
|
135
|
+
|
|
136
|
+
<script setup lang="ts">
|
|
137
|
+
const localProps = defineProps({
|
|
138
|
+
type: {
|
|
139
|
+
type: String as PropType<"self-service" | "encoder">,
|
|
140
|
+
default: "encoder",
|
|
141
|
+
},
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
const { loggedInUser, currentUser } = useLocalAuth();
|
|
145
|
+
|
|
146
|
+
const isEncoder = computed(() => localProps.type === "encoder");
|
|
147
|
+
const isSelfService = computed(() => localProps.type === "self-service");
|
|
148
|
+
|
|
149
|
+
const { enrollment } = useEnrollment();
|
|
150
|
+
|
|
151
|
+
const emit = defineEmits(["close"]);
|
|
152
|
+
|
|
153
|
+
const { requiredRule } = useUtils();
|
|
154
|
+
|
|
155
|
+
// enrollment questions — matched to useEnrollment().enrollment
|
|
156
|
+
|
|
157
|
+
// enrollment.region, .regionName, .province, .cityMunicipality, .schoolId, .school, .schoolName
|
|
158
|
+
const step1 = ref({
|
|
159
|
+
question: "Which school do you want to enroll in?",
|
|
160
|
+
answer: {
|
|
161
|
+
region: "",
|
|
162
|
+
regionName: "",
|
|
163
|
+
province: "",
|
|
164
|
+
cityMunicipality: "",
|
|
165
|
+
schoolId: "",
|
|
166
|
+
school: "",
|
|
167
|
+
schoolName: "",
|
|
168
|
+
},
|
|
169
|
+
save() {
|
|
170
|
+
const school = schools.value.find(
|
|
171
|
+
(s) => s.id === step1.value.answer.schoolId
|
|
172
|
+
);
|
|
173
|
+
|
|
174
|
+
if (school) {
|
|
175
|
+
step1.value.answer.school = school._id ?? "";
|
|
176
|
+
step1.value.answer.schoolName = school.name;
|
|
177
|
+
step1.value.answer.cityMunicipality = school.cityMunicipalityPSGC ?? "";
|
|
178
|
+
step1.value.answer.province = school.cityMunicipalityPSGC
|
|
179
|
+
? school.cityMunicipalityPSGC.slice(0, 5) + "00000"
|
|
180
|
+
: "";
|
|
181
|
+
step1.value.answer.region = school.cityMunicipalityPSGC
|
|
182
|
+
? school.cityMunicipalityPSGC.slice(0, 2) + "00000000"
|
|
183
|
+
: "";
|
|
184
|
+
step1.value.answer.regionName = school.regionName ?? "";
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
enrollment.value.region = step1.value.answer.region;
|
|
188
|
+
enrollment.value.regionName = step1.value.answer.regionName;
|
|
189
|
+
enrollment.value.province = step1.value.answer.province;
|
|
190
|
+
enrollment.value.cityMunicipality = step1.value.answer.cityMunicipality;
|
|
191
|
+
enrollment.value.schoolId = step1.value.answer.schoolId;
|
|
192
|
+
enrollment.value.school = step1.value.answer.school;
|
|
193
|
+
enrollment.value.schoolName = step1.value.answer.schoolName;
|
|
194
|
+
currentStep.value++;
|
|
195
|
+
},
|
|
196
|
+
valid: false,
|
|
197
|
+
});
|
|
198
|
+
|
|
199
|
+
// Step 1 data fetching
|
|
200
|
+
const { getAll: getAllPSGC } = usePSGC();
|
|
201
|
+
const { getAll: getAllSchools } = useSchool();
|
|
202
|
+
|
|
203
|
+
// Regions
|
|
204
|
+
const regions = ref<Array<Record<string, any>>>([]);
|
|
205
|
+
|
|
206
|
+
const { data: step1RegionsData, status: step1RegionsStatus } = useLazyAsyncData(
|
|
207
|
+
"eq-psgc-regions",
|
|
208
|
+
() => getAllPSGC({ type: "Reg" })
|
|
209
|
+
);
|
|
210
|
+
|
|
211
|
+
const regionStatus = computed(() => step1RegionsStatus.value === "pending");
|
|
212
|
+
|
|
213
|
+
watchEffect(() => {
|
|
214
|
+
if (step1RegionsData.value) {
|
|
215
|
+
regions.value = step1RegionsData.value.items;
|
|
216
|
+
}
|
|
217
|
+
});
|
|
218
|
+
|
|
219
|
+
// Provinces (filtered by selected region)
|
|
220
|
+
const step1Provinces = ref<Array<Record<string, any>>>([]);
|
|
221
|
+
|
|
222
|
+
const step1SelectedRegion = computed(() => step1.value.answer.region);
|
|
223
|
+
|
|
224
|
+
const { data: step1ProvData, status: step1ProvReqStatus } = useLazyAsyncData(
|
|
225
|
+
"eq-psgc-provinces",
|
|
226
|
+
() =>
|
|
227
|
+
getAllPSGC({
|
|
228
|
+
type: "Prov",
|
|
229
|
+
prefix: step1SelectedRegion.value.slice(0, 2),
|
|
230
|
+
limit: 100,
|
|
231
|
+
}),
|
|
232
|
+
{ watch: [step1SelectedRegion] }
|
|
233
|
+
);
|
|
234
|
+
|
|
235
|
+
const step1ProvincesStatus = computed(
|
|
236
|
+
() => step1ProvReqStatus.value === "pending"
|
|
237
|
+
);
|
|
238
|
+
|
|
239
|
+
watchEffect(() => {
|
|
240
|
+
if (step1ProvData.value) {
|
|
241
|
+
step1Provinces.value = step1ProvData.value.items;
|
|
242
|
+
}
|
|
243
|
+
});
|
|
244
|
+
|
|
245
|
+
// Cities/Municipalities (filtered by selected province)
|
|
246
|
+
const step1CitiesMunicipalities = ref<Array<Record<string, any>>>([]);
|
|
247
|
+
|
|
248
|
+
const step1SelectedProvince = computed(() => step1.value.answer.province);
|
|
249
|
+
|
|
250
|
+
const { data: step1CityMunData, status: step1CityMunReqStatus } =
|
|
251
|
+
useLazyAsyncData(
|
|
252
|
+
"eq-psgc-cities-municipalities",
|
|
253
|
+
() =>
|
|
254
|
+
getAllPSGC({
|
|
255
|
+
type: "City",
|
|
256
|
+
prefix: step1SelectedProvince.value.slice(0, 5),
|
|
257
|
+
limit: 2000,
|
|
258
|
+
}),
|
|
259
|
+
{ watch: [step1SelectedProvince] }
|
|
260
|
+
);
|
|
261
|
+
|
|
262
|
+
const step1CitiesMunicipalitiesStatus = computed(
|
|
263
|
+
() => step1CityMunReqStatus.value === "pending"
|
|
264
|
+
);
|
|
265
|
+
|
|
266
|
+
watchEffect(() => {
|
|
267
|
+
if (step1CityMunData.value) {
|
|
268
|
+
step1CitiesMunicipalities.value = step1CityMunData.value.items;
|
|
269
|
+
}
|
|
270
|
+
});
|
|
271
|
+
|
|
272
|
+
// Clear cascade: region -> province -> city
|
|
273
|
+
watch(
|
|
274
|
+
() => step1.value.answer.region,
|
|
275
|
+
() => {
|
|
276
|
+
step1.value.answer.province = "";
|
|
277
|
+
step1.value.answer.cityMunicipality = "";
|
|
278
|
+
step1.value.answer.schoolId = "";
|
|
279
|
+
}
|
|
280
|
+
);
|
|
281
|
+
|
|
282
|
+
watch(
|
|
283
|
+
() => step1.value.answer.province,
|
|
284
|
+
() => {
|
|
285
|
+
step1.value.answer.cityMunicipality = "";
|
|
286
|
+
step1.value.answer.schoolId = "";
|
|
287
|
+
}
|
|
288
|
+
);
|
|
289
|
+
|
|
290
|
+
watch(
|
|
291
|
+
() => step1.value.answer.cityMunicipality,
|
|
292
|
+
() => {
|
|
293
|
+
step1.value.answer.schoolId = "";
|
|
294
|
+
}
|
|
295
|
+
);
|
|
296
|
+
|
|
297
|
+
// Schools (filtered by PSGC prefix)
|
|
298
|
+
const schools = ref<TSchool[]>([]);
|
|
299
|
+
const searchSchool = ref("");
|
|
300
|
+
|
|
301
|
+
const psgcSchoolPrefix = computed(() => {
|
|
302
|
+
if (step1.value.answer.cityMunicipality) {
|
|
303
|
+
return step1.value.answer.cityMunicipality.slice(0, 7);
|
|
304
|
+
}
|
|
305
|
+
if (step1.value.answer.province) {
|
|
306
|
+
return step1.value.answer.province.slice(0, 5);
|
|
307
|
+
}
|
|
308
|
+
if (step1.value.answer.region) {
|
|
309
|
+
return step1.value.answer.region.slice(0, 2);
|
|
310
|
+
}
|
|
311
|
+
return "";
|
|
312
|
+
});
|
|
313
|
+
|
|
314
|
+
const {
|
|
315
|
+
data: step1SchoolsData,
|
|
316
|
+
status: step1SchoolsReqStatus,
|
|
317
|
+
refresh: refreshSchools,
|
|
318
|
+
} = useLazyAsyncData(
|
|
319
|
+
"eq-schools",
|
|
320
|
+
() =>
|
|
321
|
+
getAllSchools({
|
|
322
|
+
limit: 100,
|
|
323
|
+
psgc: psgcSchoolPrefix.value,
|
|
324
|
+
search: searchSchool.value,
|
|
325
|
+
}),
|
|
326
|
+
{ watch: [psgcSchoolPrefix] }
|
|
327
|
+
);
|
|
328
|
+
|
|
329
|
+
const schoolsStatus = computed(() => step1SchoolsReqStatus.value === "pending");
|
|
330
|
+
|
|
331
|
+
watchEffect(() => {
|
|
332
|
+
if (step1SchoolsData.value) {
|
|
333
|
+
schools.value = step1SchoolsData.value.items;
|
|
334
|
+
}
|
|
335
|
+
});
|
|
336
|
+
|
|
337
|
+
// enrollment.schoolYear
|
|
338
|
+
const step2 = ref({
|
|
339
|
+
question: "Which school year do you want to enroll in?",
|
|
340
|
+
answer: {
|
|
341
|
+
schoolYear: "",
|
|
342
|
+
},
|
|
343
|
+
save() {
|
|
344
|
+
enrollment.value.schoolYear = step2.value.answer.schoolYear;
|
|
345
|
+
},
|
|
346
|
+
valid: false,
|
|
347
|
+
});
|
|
348
|
+
|
|
349
|
+
// enrollment.gradeLevel
|
|
350
|
+
const step3 = ref({
|
|
351
|
+
question: "Which grade level do you want to enroll in?",
|
|
352
|
+
answer: {
|
|
353
|
+
gradeLevel: "",
|
|
354
|
+
},
|
|
355
|
+
save() {
|
|
356
|
+
enrollment.value.gradeLevel = step3.value.answer.gradeLevel;
|
|
357
|
+
},
|
|
358
|
+
valid: false,
|
|
359
|
+
});
|
|
360
|
+
|
|
361
|
+
// enrollment.seniorHighInfo.semester (shown when grade 11 or 12)
|
|
362
|
+
const step4 = ref({
|
|
363
|
+
question: "What semester do you want to enroll in?",
|
|
364
|
+
answer: {
|
|
365
|
+
semester: "",
|
|
366
|
+
},
|
|
367
|
+
save() {
|
|
368
|
+
enrollment.value.seniorHighInfo!.semester = step4.value.answer.semester;
|
|
369
|
+
},
|
|
370
|
+
valid: false,
|
|
371
|
+
});
|
|
372
|
+
|
|
373
|
+
// enrollment.seniorHighInfo.track, .trackName (shown when grade 11 or 12)
|
|
374
|
+
const step5 = ref({
|
|
375
|
+
question: "What track do you want to enroll in?",
|
|
376
|
+
answer: {
|
|
377
|
+
track: "",
|
|
378
|
+
trackName: "",
|
|
379
|
+
},
|
|
380
|
+
save() {
|
|
381
|
+
enrollment.value.seniorHighInfo!.track = step5.value.answer.track;
|
|
382
|
+
enrollment.value.seniorHighInfo!.trackName = step5.value.answer.trackName;
|
|
383
|
+
},
|
|
384
|
+
valid: false,
|
|
385
|
+
});
|
|
386
|
+
|
|
387
|
+
// enrollment.seniorHighInfo.strand, .strandName (shown when grade 11 or 12)
|
|
388
|
+
const step6 = ref({
|
|
389
|
+
question: "What strand do you want to enroll in?",
|
|
390
|
+
answer: {
|
|
391
|
+
strand: "",
|
|
392
|
+
strandName: "",
|
|
393
|
+
},
|
|
394
|
+
save() {
|
|
395
|
+
enrollment.value.seniorHighInfo!.strand = step6.value.answer.strand;
|
|
396
|
+
enrollment.value.seniorHighInfo!.strandName = step6.value.answer.strandName;
|
|
397
|
+
},
|
|
398
|
+
valid: false,
|
|
399
|
+
});
|
|
400
|
+
|
|
401
|
+
// enrollment.returningLearner
|
|
402
|
+
const step7 = ref({
|
|
403
|
+
question: "Is the learner a returning learner?",
|
|
404
|
+
answer: {
|
|
405
|
+
returningLearner: false,
|
|
406
|
+
},
|
|
407
|
+
save() {
|
|
408
|
+
enrollment.value.returningLearner = step7.value.answer.returningLearner;
|
|
409
|
+
},
|
|
410
|
+
valid: false,
|
|
411
|
+
});
|
|
412
|
+
|
|
413
|
+
// enrollment.learnerInfo.psaBirthCertificateNo, .lrn
|
|
414
|
+
const step8 = ref({
|
|
415
|
+
question: "What is the learner's PSA Birth Certificate No. and LRN?",
|
|
416
|
+
answer: {
|
|
417
|
+
psaBirthCertificateNo: "",
|
|
418
|
+
lrn: "",
|
|
419
|
+
},
|
|
420
|
+
save() {
|
|
421
|
+
enrollment.value.learnerInfo.psaBirthCertificateNo =
|
|
422
|
+
step8.value.answer.psaBirthCertificateNo;
|
|
423
|
+
enrollment.value.learnerInfo.lrn = step8.value.answer.lrn;
|
|
424
|
+
},
|
|
425
|
+
valid: false,
|
|
426
|
+
});
|
|
427
|
+
|
|
428
|
+
// enrollment.learnerInfo.lastName, .firstName, .middleName, .extensionName
|
|
429
|
+
const step9 = ref({
|
|
430
|
+
question: "What is the learner's full name?",
|
|
431
|
+
answer: {
|
|
432
|
+
lastName: "",
|
|
433
|
+
firstName: "",
|
|
434
|
+
middleName: "",
|
|
435
|
+
extensionName: "",
|
|
436
|
+
},
|
|
437
|
+
save() {
|
|
438
|
+
enrollment.value.learnerInfo.lastName = step9.value.answer.lastName;
|
|
439
|
+
enrollment.value.learnerInfo.firstName = step9.value.answer.firstName;
|
|
440
|
+
enrollment.value.learnerInfo.middleName = step9.value.answer.middleName;
|
|
441
|
+
enrollment.value.learnerInfo.extensionName =
|
|
442
|
+
step9.value.answer.extensionName;
|
|
443
|
+
},
|
|
444
|
+
valid: false,
|
|
445
|
+
});
|
|
446
|
+
|
|
447
|
+
// enrollment.learnerInfo.birthDate, .age
|
|
448
|
+
const step10 = ref({
|
|
449
|
+
question: "What is the learner's birthdate?",
|
|
450
|
+
answer: {
|
|
451
|
+
birthDate: "",
|
|
452
|
+
age: 0,
|
|
453
|
+
},
|
|
454
|
+
save() {
|
|
455
|
+
enrollment.value.learnerInfo.birthDate = step10.value.answer.birthDate;
|
|
456
|
+
enrollment.value.learnerInfo.age = step10.value.answer.age;
|
|
457
|
+
},
|
|
458
|
+
valid: false,
|
|
459
|
+
});
|
|
460
|
+
|
|
461
|
+
// enrollment.learnerInfo.sex
|
|
462
|
+
const step11 = ref({
|
|
463
|
+
question: "What is the learner's sex?",
|
|
464
|
+
answer: {
|
|
465
|
+
sex: "",
|
|
466
|
+
},
|
|
467
|
+
save() {
|
|
468
|
+
enrollment.value.learnerInfo.sex = step11.value.answer.sex;
|
|
469
|
+
},
|
|
470
|
+
valid: false,
|
|
471
|
+
});
|
|
472
|
+
|
|
473
|
+
// enrollment.learnerInfo.placeOfBirth
|
|
474
|
+
const step12 = ref({
|
|
475
|
+
question: "What is the learner's place of birth?",
|
|
476
|
+
answer: {
|
|
477
|
+
placeOfBirth: {
|
|
478
|
+
region: "",
|
|
479
|
+
regionName: "",
|
|
480
|
+
province: "",
|
|
481
|
+
provinceName: "",
|
|
482
|
+
cityMunicipality: "",
|
|
483
|
+
cityMunicipalityName: "",
|
|
484
|
+
},
|
|
485
|
+
},
|
|
486
|
+
save() {
|
|
487
|
+
enrollment.value.learnerInfo.placeOfBirth = {
|
|
488
|
+
...step12.value.answer.placeOfBirth,
|
|
489
|
+
};
|
|
490
|
+
},
|
|
491
|
+
valid: false,
|
|
492
|
+
});
|
|
493
|
+
|
|
494
|
+
// enrollment.learnerInfo.motherTongue
|
|
495
|
+
const step13 = ref({
|
|
496
|
+
question: "What is the learner's mother tongue?",
|
|
497
|
+
answer: {
|
|
498
|
+
motherTongue: "",
|
|
499
|
+
},
|
|
500
|
+
save() {
|
|
501
|
+
enrollment.value.learnerInfo.motherTongue =
|
|
502
|
+
step13.value.answer.motherTongue;
|
|
503
|
+
},
|
|
504
|
+
valid: false,
|
|
505
|
+
});
|
|
506
|
+
|
|
507
|
+
// enrollment.learnerInfo.indigenousCommunity
|
|
508
|
+
const step14 = ref({
|
|
509
|
+
question: "Is the learner part of an indigenous community?",
|
|
510
|
+
answer: {
|
|
511
|
+
indigenousCommunity: "",
|
|
512
|
+
},
|
|
513
|
+
save() {
|
|
514
|
+
enrollment.value.learnerInfo.indigenousCommunity =
|
|
515
|
+
step14.value.answer.indigenousCommunity;
|
|
516
|
+
},
|
|
517
|
+
valid: false,
|
|
518
|
+
});
|
|
519
|
+
|
|
520
|
+
// enrollment.learnerInfo.fourPsHouseholdId
|
|
521
|
+
const step15 = ref({
|
|
522
|
+
question: "Is the learner part of a 4Ps household?",
|
|
523
|
+
answer: {
|
|
524
|
+
fourPsHouseholdId: "",
|
|
525
|
+
},
|
|
526
|
+
save() {
|
|
527
|
+
enrollment.value.learnerInfo.fourPsHouseholdId =
|
|
528
|
+
step15.value.answer.fourPsHouseholdId;
|
|
529
|
+
},
|
|
530
|
+
valid: false,
|
|
531
|
+
});
|
|
532
|
+
|
|
533
|
+
// enrollment.learnerInfo.withDisability, .disabilities
|
|
534
|
+
const step16 = ref({
|
|
535
|
+
question: "Does the learner have a disability?",
|
|
536
|
+
answer: {
|
|
537
|
+
withDisability: false,
|
|
538
|
+
disabilities: [] as string[],
|
|
539
|
+
},
|
|
540
|
+
save() {
|
|
541
|
+
enrollment.value.learnerInfo.withDisability =
|
|
542
|
+
step16.value.answer.withDisability;
|
|
543
|
+
enrollment.value.learnerInfo.disabilities = [
|
|
544
|
+
...step16.value.answer.disabilities,
|
|
545
|
+
];
|
|
546
|
+
},
|
|
547
|
+
valid: false,
|
|
548
|
+
});
|
|
549
|
+
|
|
550
|
+
// enrollment.address.current
|
|
551
|
+
const step17 = ref({
|
|
552
|
+
question: "What is the learner's current address?",
|
|
553
|
+
answer: {
|
|
554
|
+
houseNumber: "",
|
|
555
|
+
streetName: "",
|
|
556
|
+
sitio: "",
|
|
557
|
+
barangay: "",
|
|
558
|
+
barangayName: "",
|
|
559
|
+
municipalityCity: "",
|
|
560
|
+
municipalityCityName: "",
|
|
561
|
+
province: "",
|
|
562
|
+
provinceName: "",
|
|
563
|
+
region: "",
|
|
564
|
+
regionName: "",
|
|
565
|
+
country: "",
|
|
566
|
+
zipCode: "",
|
|
567
|
+
},
|
|
568
|
+
save() {
|
|
569
|
+
enrollment.value.address.current = { ...step17.value.answer };
|
|
570
|
+
},
|
|
571
|
+
valid: false,
|
|
572
|
+
});
|
|
573
|
+
|
|
574
|
+
// enrollment.address.permanent
|
|
575
|
+
const step18 = ref({
|
|
576
|
+
question: "What is the learner's permanent address?",
|
|
577
|
+
answer: {
|
|
578
|
+
houseNumber: "",
|
|
579
|
+
streetName: "",
|
|
580
|
+
sitio: "",
|
|
581
|
+
barangay: "",
|
|
582
|
+
municipalityCity: "",
|
|
583
|
+
municipalityCityName: "",
|
|
584
|
+
province: "",
|
|
585
|
+
region: "",
|
|
586
|
+
regionName: "",
|
|
587
|
+
country: "",
|
|
588
|
+
zipCode: "",
|
|
589
|
+
},
|
|
590
|
+
save() {
|
|
591
|
+
enrollment.value.address.permanent = { ...step18.value.answer };
|
|
592
|
+
},
|
|
593
|
+
valid: false,
|
|
594
|
+
});
|
|
595
|
+
|
|
596
|
+
// enrollment.parentGuardianInfo.father
|
|
597
|
+
const step19 = ref({
|
|
598
|
+
question: "What is the learner's father's name?",
|
|
599
|
+
answer: {
|
|
600
|
+
firstName: "",
|
|
601
|
+
lastName: "",
|
|
602
|
+
middleName: "",
|
|
603
|
+
contactNumber: "",
|
|
604
|
+
},
|
|
605
|
+
save() {
|
|
606
|
+
enrollment.value.parentGuardianInfo.father = { ...step19.value.answer };
|
|
607
|
+
},
|
|
608
|
+
valid: false,
|
|
609
|
+
});
|
|
610
|
+
|
|
611
|
+
// enrollment.parentGuardianInfo.mother
|
|
612
|
+
const step20 = ref({
|
|
613
|
+
question: "What is the learner's mother's name?",
|
|
614
|
+
answer: {
|
|
615
|
+
firstName: "",
|
|
616
|
+
lastName: "",
|
|
617
|
+
middleName: "",
|
|
618
|
+
contactNumber: "",
|
|
619
|
+
},
|
|
620
|
+
save() {
|
|
621
|
+
enrollment.value.parentGuardianInfo.mother = { ...step20.value.answer };
|
|
622
|
+
},
|
|
623
|
+
valid: false,
|
|
624
|
+
});
|
|
625
|
+
|
|
626
|
+
// enrollment.parentGuardianInfo.legalGuardian
|
|
627
|
+
const step21 = ref({
|
|
628
|
+
question: "What is the learner's legal guardian's name?",
|
|
629
|
+
answer: {
|
|
630
|
+
firstName: "",
|
|
631
|
+
lastName: "",
|
|
632
|
+
middleName: "",
|
|
633
|
+
contactNumber: "",
|
|
634
|
+
},
|
|
635
|
+
save() {
|
|
636
|
+
enrollment.value.parentGuardianInfo.legalGuardian = {
|
|
637
|
+
...step21.value.answer,
|
|
638
|
+
};
|
|
639
|
+
},
|
|
640
|
+
valid: false,
|
|
641
|
+
});
|
|
642
|
+
|
|
643
|
+
// enrollment.returningLearnerInfo.lastGradeLevelCompleted
|
|
644
|
+
const step22 = ref({
|
|
645
|
+
question: "What grade level did the learner last complete?",
|
|
646
|
+
answer: {
|
|
647
|
+
lastGradeLevelCompleted: "",
|
|
648
|
+
},
|
|
649
|
+
save() {
|
|
650
|
+
enrollment.value.returningLearnerInfo.lastGradeLevelCompleted =
|
|
651
|
+
step22.value.answer.lastGradeLevelCompleted;
|
|
652
|
+
},
|
|
653
|
+
valid: false,
|
|
654
|
+
});
|
|
655
|
+
|
|
656
|
+
// enrollment.returningLearnerInfo.lastSchoolYearCompleted
|
|
657
|
+
const step23 = ref({
|
|
658
|
+
question: "What school year did the learner last complete?",
|
|
659
|
+
answer: {
|
|
660
|
+
lastSchoolYearCompleted: "",
|
|
661
|
+
},
|
|
662
|
+
save() {
|
|
663
|
+
enrollment.value.returningLearnerInfo.lastSchoolYearCompleted =
|
|
664
|
+
step23.value.answer.lastSchoolYearCompleted;
|
|
665
|
+
},
|
|
666
|
+
valid: false,
|
|
667
|
+
});
|
|
668
|
+
|
|
669
|
+
// enrollment.returningLearnerInfo.lastSchoolAttended, .lastSchoolId
|
|
670
|
+
const step24 = ref({
|
|
671
|
+
question: "What school did the learner last attend?",
|
|
672
|
+
answer: {
|
|
673
|
+
lastSchoolAttended: "",
|
|
674
|
+
lastSchoolId: "",
|
|
675
|
+
},
|
|
676
|
+
save() {
|
|
677
|
+
enrollment.value.returningLearnerInfo.lastSchoolAttended =
|
|
678
|
+
step24.value.answer.lastSchoolAttended;
|
|
679
|
+
enrollment.value.returningLearnerInfo.lastSchoolId =
|
|
680
|
+
step24.value.answer.lastSchoolId;
|
|
681
|
+
},
|
|
682
|
+
valid: false,
|
|
683
|
+
});
|
|
684
|
+
|
|
685
|
+
// enrollment.alternativeLearningOptions
|
|
686
|
+
const step25 = ref({
|
|
687
|
+
question: "What alternative learning options do you want to enroll in?",
|
|
688
|
+
answer: {
|
|
689
|
+
alternativeLearningOptions: [] as string[],
|
|
690
|
+
},
|
|
691
|
+
save() {
|
|
692
|
+
enrollment.value.alternativeLearningOptions = [
|
|
693
|
+
...step25.value.answer.alternativeLearningOptions,
|
|
694
|
+
];
|
|
695
|
+
},
|
|
696
|
+
valid: false,
|
|
697
|
+
});
|
|
698
|
+
|
|
699
|
+
// enrollment.isCertifiedAndConsented
|
|
700
|
+
const step26 = ref({
|
|
701
|
+
question: `I hereby certify that the above information given are true and
|
|
702
|
+
correct to the best of my knowledge and I allow the Department of
|
|
703
|
+
Education to use my child's details to create and/or update his/her
|
|
704
|
+
learner profile in the Learner Information System. The information
|
|
705
|
+
herein shall be treated as confidential in compliance with the Data
|
|
706
|
+
Privacy Act of 2012.`,
|
|
707
|
+
answer: {
|
|
708
|
+
isCertifiedAndConsented: false,
|
|
709
|
+
},
|
|
710
|
+
save() {
|
|
711
|
+
enrollment.value.isCertifiedAndConsented =
|
|
712
|
+
step26.value.answer.isCertifiedAndConsented;
|
|
713
|
+
},
|
|
714
|
+
valid: false,
|
|
715
|
+
});
|
|
716
|
+
|
|
717
|
+
const currentStep = ref(1);
|
|
718
|
+
|
|
719
|
+
function goBack() {
|
|
720
|
+
if (currentStep.value === 1) {
|
|
721
|
+
emit("close");
|
|
722
|
+
} else {
|
|
723
|
+
currentStep.value--;
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
const isSeniorHigh = computed(
|
|
728
|
+
() =>
|
|
729
|
+
step3.value.answer.gradeLevel === "Grade 11" ||
|
|
730
|
+
step3.value.answer.gradeLevel === "Grade 12"
|
|
731
|
+
);
|
|
732
|
+
|
|
733
|
+
const totalSteps = computed(() => (isSeniorHigh.value ? 26 : 23));
|
|
734
|
+
|
|
735
|
+
const progress = computed(() =>
|
|
736
|
+
Math.round((currentStep.value / totalSteps.value) * 100)
|
|
737
|
+
);
|
|
738
|
+
</script>
|
|
@@ -143,15 +143,15 @@ const invite = ref({
|
|
|
143
143
|
const searchRole = ref("");
|
|
144
144
|
const roles = ref<Array<Record<string, any>>>([]);
|
|
145
145
|
|
|
146
|
-
const {
|
|
146
|
+
const { getAll } = useRole();
|
|
147
147
|
|
|
148
148
|
const { data: getRolesData, status: getRolesStatus } = await useLazyAsyncData(
|
|
149
149
|
"get-roles",
|
|
150
150
|
() =>
|
|
151
|
-
|
|
151
|
+
getAll({
|
|
152
152
|
search: searchRole.value,
|
|
153
|
-
|
|
154
|
-
|
|
153
|
+
app: prop.app,
|
|
154
|
+
org: prop.org,
|
|
155
155
|
limit: 20,
|
|
156
156
|
})
|
|
157
157
|
);
|
package/nuxt.config.ts
CHANGED
|
@@ -36,6 +36,7 @@ export default defineNuxtConfig({
|
|
|
36
36
|
APP_LOCAL_GOV_PROV: (process.env.APP_LOCAL_GOV_PROV as string) ?? "",
|
|
37
37
|
APP_LOCAL_GOV_CITY: (process.env.APP_LOCAL_GOV_CITY as string) ?? "",
|
|
38
38
|
APP_LOCAL_GOV_BRGY: (process.env.APP_LOCAL_GOV_BRGY as string) ?? "",
|
|
39
|
+
ENROLLMENT: (process.env.ENROLLMENT as string) ?? "",
|
|
39
40
|
},
|
|
40
41
|
},
|
|
41
42
|
|
package/package.json
CHANGED
package/types/enrollment.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ declare type TLearner = {
|
|
|
24
24
|
learnerInfo: EnrLearnerInfo;
|
|
25
25
|
parentGuardianInfo: EnrParentGuardianInfo;
|
|
26
26
|
address: AddressInformation;
|
|
27
|
-
returningLearnerInfo
|
|
27
|
+
returningLearnerInfo: EnrReturningLearnerInfo;
|
|
28
28
|
seniorHighInfo?: EnrSeniorHighInformation;
|
|
29
29
|
lastGradeLevelCompleted?: string;
|
|
30
30
|
lastSchoolYearCompleted?: string;
|