@eeplatform/nuxt-layer-common 1.7.34 → 1.7.35

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
@@ -1,5 +1,11 @@
1
1
  # @eeplatform/nuxt-layer-common
2
2
 
3
+ ## 1.7.35
4
+
5
+ ### Patch Changes
6
+
7
+ - fe7b774: Add component for enrollment application preview
8
+
3
9
  ## 1.7.34
4
10
 
5
11
  ### Patch Changes
@@ -1452,7 +1452,7 @@ const prop = defineProps({
1452
1452
  });
1453
1453
  const { requiredRule, debounce } = useUtils();
1454
1454
 
1455
- const enrollment = defineModel<TTLearner>({
1455
+ const enrollment = defineModel<TLearner>({
1456
1456
  default: () => useEnrollment().enrollment,
1457
1457
  });
1458
1458
 
@@ -0,0 +1,699 @@
1
+ <template>
2
+ <v-card width="100%">
3
+ <v-toolbar density="compact" class="px-4">
4
+ <v-toolbar-title class="text-h6 font-weight-bold">
5
+ Enrollment Application Details
6
+ </v-toolbar-title>
7
+ </v-toolbar>
8
+
9
+ <v-card-text style="max-height: 100vh; overflow-y: auto" class="pa-6">
10
+ <v-row no-gutters v-if="localProps.application">
11
+ <!-- School Information -->
12
+ <v-col cols="12" class="mb-6">
13
+ <v-card variant="outlined" border="thin" class="pa-4">
14
+ <v-card-title class="text-h6 font-weight-bold pa-0 mb-3">
15
+ School Information
16
+ </v-card-title>
17
+ <v-row no-gutters>
18
+ <v-col cols="12" class="mb-2">
19
+ <strong>Region:</strong>
20
+ {{ localProps.application.regionName ?? "N/A" }}
21
+ </v-col>
22
+ <v-col cols="12" class="mb-2">
23
+ <strong>Division:</strong>
24
+ {{ localProps.application.divisionName ?? "N/A" }}
25
+ </v-col>
26
+ <v-col cols="12" class="mb-2">
27
+ <strong>School:</strong>
28
+ {{ getSchoolName(localProps.application.school) ?? "N/A" }}
29
+ </v-col>
30
+ <v-col cols="12" class="mb-2">
31
+ <strong>School Year:</strong>
32
+ {{ localProps.application.schoolYear ?? "N/A" }}
33
+ </v-col>
34
+ <v-col cols="12" class="mb-2">
35
+ <strong>Grade Level:</strong>
36
+ {{
37
+ formatGradeLevel(localProps.application.gradeLevel) ?? "N/A"
38
+ }}
39
+ </v-col>
40
+ <v-col cols="12">
41
+ <strong>Returning Learner:</strong>
42
+ {{ localProps.application.returningLearner ? "Yes" : "No" }}
43
+ </v-col>
44
+ </v-row>
45
+ </v-card>
46
+ </v-col>
47
+
48
+ <!-- Special Program -->
49
+ <v-col
50
+ cols="12"
51
+ class="mb-6"
52
+ v-if="localProps.application.specialProgram"
53
+ >
54
+ <v-card variant="outlined" border="thin" class="pa-4">
55
+ <v-card-title class="text-h6 font-weight-bold pa-0 mb-3">
56
+ Special Program
57
+ </v-card-title>
58
+ <v-row no-gutters>
59
+ <v-col cols="12" class="mb-2">
60
+ <strong>Special Program:</strong>
61
+ {{ localProps.application.specialProgramName ?? "N/A" }}
62
+ </v-col>
63
+
64
+ <v-col
65
+ v-if="localProps.application.specialProgramMajor"
66
+ cols="12"
67
+ class="mb-2"
68
+ >
69
+ <strong>Major:</strong>
70
+ {{ localProps.application.specialProgramMajor ?? "N/A" }}
71
+ </v-col>
72
+
73
+ <v-col cols="12" class="mb-2">
74
+ <strong>GWA:</strong>
75
+ {{ localProps.application.gwa ?? "N/A" }}
76
+ </v-col>
77
+
78
+ <v-col
79
+ v-if="
80
+ localProps.application.subjects &&
81
+ localProps.application.subjects.length
82
+ "
83
+ cols="12"
84
+ class="mb-2"
85
+ >
86
+ <v-row no-gutters>
87
+ <v-col
88
+ v-for="subject in localProps.application.subjects"
89
+ cols="12"
90
+ class="mb-2"
91
+ >
92
+ <strong>{{ subject.title }}:</strong>
93
+ {{ subject.title ?? "N/A" }}
94
+ </v-col>
95
+ </v-row>
96
+ </v-col>
97
+ </v-row>
98
+ </v-card>
99
+ </v-col>
100
+
101
+ <!-- Learner Information -->
102
+ <v-col
103
+ cols="12"
104
+ class="mb-6"
105
+ v-if="!localProps.application.returningLearner"
106
+ >
107
+ <v-card variant="outlined" border="thin" class="pa-4">
108
+ <v-card-title class="text-h6 font-weight-bold pa-0 mb-3">
109
+ Learner Information
110
+ </v-card-title>
111
+ <v-row no-gutters>
112
+ <v-col cols="6" class="mb-2">
113
+ <strong>PSA Birth Certificate No.:</strong>
114
+ {{
115
+ localProps.application.learnerInfo?.psaBirthCertificateNo ??
116
+ "N/A"
117
+ }}
118
+ </v-col>
119
+ <v-col cols="12" class="mb-2">
120
+ <strong>LRN:</strong>
121
+ {{ localProps.application.learnerInfo?.lrn ?? "N/A" }}
122
+ </v-col>
123
+ <v-col cols="12" class="mb-2">
124
+ <strong>Full Name:</strong>
125
+ {{
126
+ `${localProps.application.learnerInfo?.firstName ?? ""} ${
127
+ localProps.application.learnerInfo?.middleName ?? ""
128
+ } ${localProps.application.learnerInfo?.lastName ?? ""}`
129
+ }}
130
+ </v-col>
131
+ <v-col cols="12" class="mb-2">
132
+ <strong>Extension Name:</strong>
133
+ {{ localProps.application.learnerInfo?.extensionName ?? "N/A" }}
134
+ </v-col>
135
+ <v-col cols="12" class="mb-2">
136
+ <strong>Birth Date:</strong>
137
+ {{
138
+ localProps.application.learnerInfo?.birthDate
139
+ ? new Date(
140
+ localProps.application.learnerInfo.birthDate
141
+ ).toLocaleDateString()
142
+ : "N/A"
143
+ }}
144
+ </v-col>
145
+ <v-col cols="6" class="mb-2">
146
+ <strong>Age:</strong>
147
+ {{ localProps.application.learnerInfo?.age ?? "N/A" }}
148
+ </v-col>
149
+ <v-col cols="12" class="mb-2">
150
+ <strong>Sex:</strong>
151
+ {{ localProps.application.learnerInfo?.sex ?? "N/A" }}
152
+ </v-col>
153
+ <v-col cols="6" class="mb-2">
154
+ <strong>Place of Birth:</strong>
155
+ {{
156
+ localProps.application.learnerInfo?.placeOfBirth.provinceName
157
+ }}
158
+ {{
159
+ localProps.application.learnerInfo?.placeOfBirth.provinceName
160
+ ? ", "
161
+ : ""
162
+ }}
163
+ {{
164
+ localProps.application.learnerInfo?.placeOfBirth
165
+ .cityMunicipalityName
166
+ }}
167
+ </v-col>
168
+ <v-col cols="12" class="mb-2">
169
+ <strong>Mother Tongue:</strong>
170
+ {{ localProps.application.learnerInfo?.motherTongue ?? "N/A" }}
171
+ </v-col>
172
+ <v-col cols="12" class="mb-2">
173
+ <strong>Indigenous Community:</strong>
174
+ {{
175
+ localProps.application.learnerInfo?.indigenousCommunity ??
176
+ "N/A"
177
+ }}
178
+ </v-col>
179
+ <v-col cols="12" class="mb-2">
180
+ <strong>4Ps Household ID:</strong>
181
+ {{
182
+ localProps.application.learnerInfo?.fourPsHouseholdId ?? "N/A"
183
+ }}
184
+ </v-col>
185
+ <v-col cols="12" class="mb-2">
186
+ <strong>With Disability:</strong>
187
+ {{
188
+ localProps.application.learnerInfo?.withDisability
189
+ ? "Yes"
190
+ : "No"
191
+ }}
192
+ </v-col>
193
+ <v-col
194
+ cols="12"
195
+ v-if="
196
+ localProps.application.learnerInfo?.withDisability &&
197
+ localProps.application.learnerInfo?.disabilities?.length
198
+ "
199
+ >
200
+ <strong>Disabilities:</strong>
201
+ <v-chip-group class="mt-1">
202
+ <v-chip
203
+ v-for="disability in localProps.application.learnerInfo
204
+ .disabilities"
205
+ :key="disability"
206
+ size="small"
207
+ variant="outlined"
208
+ >
209
+ {{ disability }}
210
+ </v-chip>
211
+ </v-chip-group>
212
+ </v-col>
213
+ </v-row>
214
+ </v-card>
215
+ </v-col>
216
+
217
+ <!-- Current Address -->
218
+ <v-col
219
+ cols="12"
220
+ class="mb-6"
221
+ v-if="!localProps.application.returningLearner"
222
+ >
223
+ <v-card variant="outlined" border="thin" class="pa-4">
224
+ <v-card-title class="text-h6 font-weight-bold pa-0 mb-3">
225
+ Current Address
226
+ </v-card-title>
227
+ <v-row no-gutters>
228
+ <v-col cols="12" class="mb-2">
229
+ <strong>House No.:</strong>
230
+ {{
231
+ localProps.application.address?.current?.houseNumber ?? "N/A"
232
+ }}
233
+ </v-col>
234
+ <v-col cols="12" class="mb-2">
235
+ <strong>Street:</strong>
236
+ {{
237
+ localProps.application.address?.current?.streetName ?? "N/A"
238
+ }}
239
+ </v-col>
240
+ <v-col cols="12" class="mb-2">
241
+ <strong>Barangay:</strong>
242
+ {{
243
+ localProps.application.address?.current?.barangayName ?? "N/A"
244
+ }}
245
+ </v-col>
246
+ <v-col cols="12" class="mb-2">
247
+ <strong>Municipality/City:</strong>
248
+ {{
249
+ localProps.application.address?.current
250
+ ?.municipalityCityName ?? "N/A"
251
+ }}
252
+ </v-col>
253
+ <v-col cols="12" class="mb-2">
254
+ <strong>Province:</strong>
255
+ {{
256
+ localProps.application.address?.current?.provinceName ?? "N/A"
257
+ }}
258
+ </v-col>
259
+ <v-col cols="12" class="mb-2">
260
+ <strong>Country:</strong>
261
+ {{ localProps.application.address?.current?.country ?? "N/A" }}
262
+ </v-col>
263
+ <v-col cols="12">
264
+ <strong>Zip Code:</strong>
265
+ {{ localProps.application.address?.current?.zipCode ?? "N/A" }}
266
+ </v-col>
267
+ </v-row>
268
+ </v-card>
269
+ </v-col>
270
+
271
+ <!-- Permanent Address -->
272
+ <v-col
273
+ cols="12"
274
+ class="mb-6"
275
+ v-if="!localProps.application.returningLearner"
276
+ >
277
+ <v-card variant="outlined" border="thin" class="pa-4">
278
+ <v-card-title class="text-h6 font-weight-bold pa-0 mb-3">
279
+ Permanent Address
280
+ </v-card-title>
281
+ <v-row no-gutters>
282
+ <v-col cols="12" class="mb-2">
283
+ <strong>House No.:</strong>
284
+ {{
285
+ localProps.application.address?.permanent?.houseNumber ??
286
+ "N/A"
287
+ }}
288
+ </v-col>
289
+ <v-col cols="12" class="mb-2">
290
+ <strong>Street:</strong>
291
+ {{
292
+ localProps.application.address?.permanent?.streetName ?? "N/A"
293
+ }}
294
+ </v-col>
295
+ <v-col cols="12" class="mb-2">
296
+ <strong>Barangay:</strong>
297
+ {{
298
+ localProps.application.address?.permanent?.barangayName ??
299
+ "N/A"
300
+ }}
301
+ </v-col>
302
+ <v-col cols="12" class="mb-2">
303
+ <strong>Municipality/City:</strong>
304
+ {{
305
+ localProps.application.address?.permanent
306
+ ?.municipalityCityName ?? "N/A"
307
+ }}
308
+ </v-col>
309
+ <v-col cols="12" class="mb-2">
310
+ <strong>Province:</strong>
311
+ {{
312
+ localProps.application.address?.permanent?.provinceName ??
313
+ "N/A"
314
+ }}
315
+ </v-col>
316
+ <v-col cols="12" class="mb-2">
317
+ <strong>Country:</strong>
318
+ {{
319
+ localProps.application.address?.permanent?.country ?? "N/A"
320
+ }}
321
+ </v-col>
322
+ <v-col cols="12">
323
+ <strong>Zip Code:</strong>
324
+ {{
325
+ localProps.application.address?.permanent?.zipCode ?? "N/A"
326
+ }}
327
+ </v-col>
328
+ </v-row>
329
+ </v-card>
330
+ </v-col>
331
+
332
+ <!-- Parent/Guardian Information -->
333
+ <v-col
334
+ cols="12"
335
+ class="mb-6"
336
+ v-if="!localProps.application.returningLearner"
337
+ >
338
+ <v-card variant="outlined" border="thin" class="pa-4">
339
+ <v-card-title class="text-h6 font-weight-bold pa-0 mb-3">
340
+ Parent/Guardian Information
341
+ </v-card-title>
342
+
343
+ <!-- Father's Information -->
344
+ <v-row no-gutters class="mb-4">
345
+ <v-col cols="12" class="mb-2">
346
+ <span class="font-weight-medium">Father's Information:</span>
347
+ </v-col>
348
+ <v-col cols="12" class="mb-2">
349
+ <strong>Name:</strong>
350
+ {{
351
+ `${
352
+ localProps.application.parentGuardianInfo?.father
353
+ ?.firstName ?? ""
354
+ } ${
355
+ localProps.application.parentGuardianInfo?.father
356
+ ?.middleName ?? ""
357
+ } ${
358
+ localProps.application.parentGuardianInfo?.father
359
+ ?.lastName ?? ""
360
+ }`
361
+ }}
362
+ </v-col>
363
+ <v-col cols="12" class="mb-2">
364
+ <strong>Contact Number:</strong>
365
+ {{
366
+ localProps.application.parentGuardianInfo?.father
367
+ ?.contactNumber ?? "N/A"
368
+ }}
369
+ </v-col>
370
+ </v-row>
371
+
372
+ <!-- Mother's Information -->
373
+ <v-row no-gutters class="mb-4">
374
+ <v-col cols="12" class="mb-2">
375
+ <span class="font-weight-medium">Mother's Information:</span>
376
+ </v-col>
377
+ <v-col cols="12" class="mb-2">
378
+ <strong>Name:</strong>
379
+ {{
380
+ `${
381
+ localProps.application.parentGuardianInfo?.mother
382
+ ?.firstName ?? ""
383
+ } ${
384
+ localProps.application.parentGuardianInfo?.mother
385
+ ?.middleName ?? ""
386
+ } ${
387
+ localProps.application.parentGuardianInfo?.mother
388
+ ?.lastName ?? ""
389
+ }`
390
+ }}
391
+ </v-col>
392
+ <v-col cols="12" class="mb-2">
393
+ <strong>Contact Number:</strong>
394
+ {{
395
+ localProps.application.parentGuardianInfo?.mother
396
+ ?.contactNumber ?? "N/A"
397
+ }}
398
+ </v-col>
399
+ </v-row>
400
+
401
+ <!-- Legal Guardian's Information -->
402
+ <v-row no-gutters>
403
+ <v-col cols="12" class="mb-2">
404
+ <span class="font-weight-medium"
405
+ >Legal Guardian's Information:</span
406
+ >
407
+ </v-col>
408
+ <v-col cols="12" class="mb-2">
409
+ <strong>Name:</strong>
410
+ {{
411
+ `${
412
+ localProps.application.parentGuardianInfo?.legalGuardian
413
+ ?.firstName ?? ""
414
+ } ${
415
+ localProps.application.parentGuardianInfo?.legalGuardian
416
+ ?.middleName ?? ""
417
+ } ${
418
+ localProps.application.parentGuardianInfo?.legalGuardian
419
+ ?.lastName ?? ""
420
+ }`
421
+ }}
422
+ </v-col>
423
+ <v-col cols="12">
424
+ <strong>Contact Number:</strong>
425
+ {{
426
+ localProps.application.parentGuardianInfo?.legalGuardian
427
+ ?.contactNumber ?? "N/A"
428
+ }}
429
+ </v-col>
430
+ </v-row>
431
+ </v-card>
432
+ </v-col>
433
+
434
+ <!-- Senior High School Information -->
435
+ <v-col
436
+ cols="12"
437
+ class="mb-6"
438
+ v-if="
439
+ localProps.application.seniorHighInfo &&
440
+ ['grade-11', 'grade-12'].includes(localProps.application.gradeLevel)
441
+ "
442
+ >
443
+ <v-card variant="outlined" border="thin" class="pa-4">
444
+ <v-card-title class="text-h6 font-weight-bold pa-0 mb-3">
445
+ Senior High School Information
446
+ </v-card-title>
447
+ <v-row no-gutters>
448
+ <v-col cols="12" class="mb-2">
449
+ <strong>Semester:</strong>
450
+ {{ localProps.application.seniorHighInfo.semester ?? "N/A" }}
451
+ </v-col>
452
+ <v-col cols="12" class="mb-2">
453
+ <strong>Track:</strong>
454
+ {{ localProps.application.seniorHighInfo.trackName ?? "N/A" }}
455
+ </v-col>
456
+ <v-col cols="12">
457
+ <strong>Strand:</strong>
458
+ {{ localProps.application.seniorHighInfo.strandName ?? "N/A" }}
459
+ </v-col>
460
+ </v-row>
461
+ </v-card>
462
+ </v-col>
463
+
464
+ <!-- Returning Learner Information -->
465
+ <v-col
466
+ cols="12"
467
+ class="mb-6"
468
+ v-if="localProps.application.returningLearner"
469
+ >
470
+ <v-card variant="outlined" border="thin" class="pa-4">
471
+ <v-card-title class="text-h6 font-weight-bold pa-0 mb-3">
472
+ Returning Learner Information
473
+ </v-card-title>
474
+ <v-row no-gutters>
475
+ <v-col cols="6" class="mb-2">
476
+ <strong>Last Grade Level Completed:</strong>
477
+ {{
478
+ formatGradeLevel(
479
+ localProps.application.lastGradeLevelCompleted ?? ""
480
+ ) ?? "N/A"
481
+ }}
482
+ </v-col>
483
+ <v-col cols="6" class="mb-2">
484
+ <strong>Last School Year Completed:</strong>
485
+ {{ localProps.application.lastSchoolYearCompleted ?? "N/A" }}
486
+ </v-col>
487
+ <v-col cols="12">
488
+ <strong>Last School Attended:</strong>
489
+ {{ localProps.application.lastSchoolAttended ?? "N/A" }}
490
+ </v-col>
491
+ </v-row>
492
+ </v-card>
493
+ </v-col>
494
+
495
+ <!-- Alternative Learning Options -->
496
+ <v-col
497
+ cols="12"
498
+ class="mb-6"
499
+ v-if="localProps.application.alternativeLearningOptions?.length"
500
+ >
501
+ <v-card variant="outlined" border="thin" class="pa-4">
502
+ <v-card-title class="text-h6 font-weight-bold pa-0 mb-3">
503
+ Preferred Learning Modalities
504
+ </v-card-title>
505
+ <v-chip-group>
506
+ <v-chip
507
+ v-for="option in localProps.application
508
+ .alternativeLearningOptions"
509
+ :key="option"
510
+ size="small"
511
+ variant="outlined"
512
+ color="primary"
513
+ >
514
+ {{ option }}
515
+ </v-chip>
516
+ </v-chip-group>
517
+ </v-card>
518
+ </v-col>
519
+
520
+ <!-- Application Status -->
521
+ <v-col cols="12">
522
+ <v-card variant="outlined" border="thin" class="pa-4">
523
+ <v-card-title class="text-h6 font-weight-bold pa-0 mb-3">
524
+ Application Status
525
+ </v-card-title>
526
+ <v-row no-gutters>
527
+ <v-col cols="12" class="mb-2">
528
+ <strong>Application Date:</strong>
529
+ {{ formatDate(localProps.application.createdAt ?? "") }}
530
+ </v-col>
531
+
532
+ <v-col cols="12" class="mb-2">
533
+ <strong class="mr-2">Status:</strong>
534
+ <v-chip
535
+ size="small"
536
+ :color="getStatusColor(localProps.application.status ?? '')"
537
+ variant="flat"
538
+ >
539
+ {{ formatStatus(localProps.application.status ?? "") }}
540
+ </v-chip>
541
+ </v-col>
542
+
543
+ <v-col
544
+ cols="12"
545
+ v-if="
546
+ localProps.application.updatedAt !==
547
+ localProps.application.createdAt
548
+ "
549
+ >
550
+ <strong>Last Updated:</strong>
551
+ {{ formatDate(localProps.application.updatedAt ?? "") }}
552
+ </v-col>
553
+ </v-row>
554
+ </v-card>
555
+ </v-col>
556
+ </v-row>
557
+ </v-card-text>
558
+
559
+ <v-toolbar class="pa-0" density="compact">
560
+ <v-row no-gutters>
561
+ <v-col
562
+ :cols="localProps.application?.status === 'pending' ? '6' : '12'"
563
+ class="pa-0"
564
+ >
565
+ <v-btn
566
+ block
567
+ variant="text"
568
+ class="text-none"
569
+ @click="emits('close')"
570
+ size="large"
571
+ height="48"
572
+ >
573
+ Close
574
+ </v-btn>
575
+ </v-col>
576
+
577
+ <v-col
578
+ v-if="localProps.application?.status === 'pending'"
579
+ cols="6"
580
+ class="pa-0"
581
+ >
582
+ <v-menu>
583
+ <template #activator="{ props }">
584
+ <v-btn
585
+ block
586
+ variant="flat"
587
+ color="black"
588
+ class="text-none"
589
+ size="large"
590
+ height="48"
591
+ v-bind="props"
592
+ tile
593
+ >
594
+ More actions
595
+ </v-btn>
596
+ </template>
597
+
598
+ <v-list class="pa-0">
599
+ <v-list-item @click="emits('accept')">
600
+ <v-list-item-title class="text-subtitle-1 font-weight-medium">
601
+ Accept Application
602
+ </v-list-item-title>
603
+ </v-list-item>
604
+
605
+ <v-list-item @click="emits('reject')" class="text-red">
606
+ <v-list-item-title class="text-subtitle-1 font-weight-medium">
607
+ Reject Application
608
+ </v-list-item-title>
609
+ </v-list-item>
610
+ </v-list>
611
+ </v-menu>
612
+ </v-col>
613
+ </v-row>
614
+ </v-toolbar>
615
+ </v-card>
616
+ </template>
617
+
618
+ <script setup lang="ts">
619
+ const localProps = defineProps({
620
+ application: {
621
+ default: () => useEnrollment().enrollment.value,
622
+ },
623
+ });
624
+
625
+ const emits = defineEmits(["close", "reject", "accept"]);
626
+
627
+ function getStatusColor(status: string): string {
628
+ const colorMap: Record<string, string> = {
629
+ pending: "warning",
630
+ approved: "success",
631
+ rejected: "error",
632
+ enrolled: "primary",
633
+ };
634
+
635
+ return colorMap[status] || "grey";
636
+ }
637
+
638
+ function formatDate(dateString: string): string {
639
+ if (!dateString) return "N/A";
640
+
641
+ try {
642
+ return new Date(dateString).toLocaleDateString("en-US", {
643
+ year: "numeric",
644
+ month: "long",
645
+ day: "numeric",
646
+ hour: "2-digit",
647
+ minute: "2-digit",
648
+ });
649
+ } catch {
650
+ return dateString;
651
+ }
652
+ }
653
+
654
+ function formatStatus(status: string): string {
655
+ if (!status) return "N/A";
656
+
657
+ const statusMap: Record<string, string> = {
658
+ pending: "Pending",
659
+ approved: "Approved",
660
+ rejected: "Rejected",
661
+ enrolled: "Enrolled",
662
+ };
663
+
664
+ return statusMap[status] || status.charAt(0).toUpperCase() + status.slice(1);
665
+ }
666
+
667
+ function getSchoolName(schoolId: string): string {
668
+ if (!schoolId) return "N/A";
669
+
670
+ // Try to get school name from the selectedApplicant first
671
+ if (localProps.application?.schoolName) {
672
+ return localProps.application.schoolName;
673
+ }
674
+
675
+ return "";
676
+ }
677
+
678
+ function formatGradeLevel(gradeLevel: string): string {
679
+ if (!gradeLevel) return "N/A";
680
+
681
+ const gradeLevelMap: Record<string, string> = {
682
+ kinder: "Kindergarten",
683
+ "grade-1": "Grade 1",
684
+ "grade-2": "Grade 2",
685
+ "grade-3": "Grade 3",
686
+ "grade-4": "Grade 4",
687
+ "grade-5": "Grade 5",
688
+ "grade-6": "Grade 6",
689
+ "grade-7": "Grade 7",
690
+ "grade-8": "Grade 8",
691
+ "grade-9": "Grade 9",
692
+ "grade-10": "Grade 10",
693
+ "grade-11": "Grade 11",
694
+ "grade-12": "Grade 12",
695
+ };
696
+
697
+ return gradeLevelMap[gradeLevel] || gradeLevel;
698
+ }
699
+ </script>
@@ -1,5 +1,5 @@
1
1
  export default function useEnrollment() {
2
- const enrollment = ref<TTLearner>({
2
+ const enrollment = ref<TLearner>({
3
3
  schoolId: "",
4
4
  school: "",
5
5
  schoolName: "",
@@ -109,7 +109,7 @@ export default function useEnrollment() {
109
109
  isCertifiedAndConsented: false,
110
110
  });
111
111
 
112
- function add(value: TTLearner) {
112
+ function add(value: TLearner) {
113
113
  return useNuxtApp().$api("/api/basic-education/enrollments", {
114
114
  method: "POST",
115
115
  body: value,
@@ -15,7 +15,7 @@ export default function useLearner() {
15
15
  );
16
16
  }
17
17
 
18
- function add(value: TTLearner) {
18
+ function add(value: TLearner) {
19
19
  return useNuxtApp().$api("/api/basic-education/learners", {
20
20
  method: "POST",
21
21
  body: value,
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.7.34",
5
+ "version": "1.7.35",
6
6
  "main": "./nuxt.config.ts",
7
7
  "publishConfig": {
8
8
  "access": "public"
@@ -1,4 +1,4 @@
1
- declare type TTLearner = {
1
+ declare type TLearner = {
2
2
  _id?: string;
3
3
  region: string; // e.g., "NCR"
4
4
  regionName?: string; // e.g., "National Capital Region"
@@ -34,9 +34,9 @@ declare type TTLearner = {
34
34
  isCertifiedAndConsented: boolean;
35
35
  status?: string;
36
36
  remarks?: string;
37
- createdAt?: Date | string;
38
- updatedAt?: Date | string;
39
- deletedAt?: Date | string;
37
+ createdAt?: string;
38
+ updatedAt?: string;
39
+ deletedAt?: string;
40
40
  createdBy?: string;
41
41
  updatedBy?: string;
42
42
  deletedBy?: string;