@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.
@@ -0,0 +1,1498 @@
1
+ <template>
2
+ <v-row no-gutters>
3
+ <v-col cols="12" class="mb-4">
4
+ <v-row>
5
+ <v-col cols="3" class="pb-0">
6
+ <v-row no-gutters>
7
+ <InputLabel class="text-capitalize" title="Region" />
8
+ <v-col cols="12">
9
+ <v-autocomplete
10
+ v-model="region"
11
+ :items="regions"
12
+ item-title="name"
13
+ item-value="code"
14
+ :loading="regionStatus"
15
+ ></v-autocomplete>
16
+ </v-col>
17
+ </v-row>
18
+ </v-col>
19
+
20
+ <v-col cols="3" class="pb-0">
21
+ <v-row no-gutters>
22
+ <InputLabel class="text-capitalize" title="Province" />
23
+ <v-col cols="12">
24
+ <v-autocomplete
25
+ v-model="province"
26
+ :items="provinces"
27
+ item-title="name"
28
+ item-value="code"
29
+ :loading="provincesStatus"
30
+ ></v-autocomplete>
31
+ </v-col>
32
+ </v-row>
33
+ </v-col>
34
+
35
+ <v-col cols="4" class="pb-0">
36
+ <v-row no-gutters>
37
+ <InputLabel class="text-capitalize" title="City/Municipality" />
38
+ <v-col cols="12">
39
+ <v-autocomplete
40
+ v-model="cityMunicipality"
41
+ :items="citiesMunicipalities"
42
+ item-title="name"
43
+ item-value="name"
44
+ :loading="citiesMunicipalitiesStatus"
45
+ ></v-autocomplete>
46
+ </v-col>
47
+ </v-row>
48
+ </v-col>
49
+ </v-row>
50
+ </v-col>
51
+
52
+ <v-col cols="12" class="mb-4">
53
+ <v-row>
54
+ <v-col cols="6" class="pb-0">
55
+ <v-row no-gutters>
56
+ <InputLabel class="text-capitalize" title="School" required />
57
+ <v-col cols="12">
58
+ <v-autocomplete
59
+ v-model="enrollment.school"
60
+ :rules="[requiredRule]"
61
+ :items="gradeLevels"
62
+ ></v-autocomplete>
63
+ </v-col>
64
+ </v-row>
65
+ </v-col>
66
+ </v-row>
67
+ </v-col>
68
+
69
+ <v-col cols="12" class="mb-2">
70
+ <v-row>
71
+ <v-col cols="2" class="pb-0">
72
+ <v-row no-gutters>
73
+ <InputLabel class="text-capitalize" title="School Year" required />
74
+ <v-col cols="12">
75
+ <v-autocomplete
76
+ v-model="enrollment.schoolYear"
77
+ :rules="[requiredRule]"
78
+ :items="effectiveSchoolYearOptions"
79
+ ></v-autocomplete>
80
+ </v-col>
81
+ </v-row>
82
+ </v-col>
83
+
84
+ <v-col cols="2" class="pb-0">
85
+ <v-row no-gutters>
86
+ <InputLabel class="text-capitalize" title="Grade Level" required />
87
+ <v-col cols="12">
88
+ <v-autocomplete
89
+ v-model="enrollment.gradeLevel"
90
+ :rules="[requiredRule]"
91
+ :items="gradeLevels"
92
+ ></v-autocomplete>
93
+ </v-col>
94
+ </v-row>
95
+ </v-col>
96
+ </v-row>
97
+ </v-col>
98
+
99
+ <v-col cols="12">
100
+ <v-checkbox
101
+ v-model="returningLearner"
102
+ label="Returning Learner(Balik-Aral)"
103
+ hide-details
104
+ density="compact"
105
+ ></v-checkbox>
106
+ </v-col>
107
+
108
+ <v-col v-if="!returningLearner" cols="12">
109
+ <v-row no-gutters>
110
+ <v-col cols="12" class="mt-4">
111
+ <v-row>
112
+ <v-col cols="3">
113
+ <v-row no-gutters>
114
+ <InputLabel
115
+ class="text-capitalize"
116
+ title="PSA Birth Certificate No."
117
+ />
118
+ <v-col cols="12">
119
+ <v-text-field
120
+ v-model="enrollment.learnerInfo.psaBirthCertificateNo"
121
+ type="number"
122
+ ></v-text-field>
123
+ </v-col>
124
+ </v-row>
125
+ </v-col>
126
+
127
+ <v-col cols="3">
128
+ <v-row no-gutters>
129
+ <InputLabel
130
+ class="text-capitalize"
131
+ title="Leaner Reference Number"
132
+ required
133
+ />
134
+ <v-col cols="12">
135
+ <v-text-field
136
+ v-model="enrollment.learnerInfo.learnerReferenceNumber"
137
+ :rules="[requiredRule]"
138
+ type="number"
139
+ ></v-text-field>
140
+ </v-col>
141
+ </v-row>
142
+ </v-col>
143
+ </v-row>
144
+ </v-col>
145
+
146
+ <v-col cols="12">
147
+ <v-row>
148
+ <v-col cols="4">
149
+ <v-row no-gutters>
150
+ <InputLabel
151
+ class="text-capitalize"
152
+ title="Last Name"
153
+ required
154
+ />
155
+ <v-col cols="12">
156
+ <v-text-field
157
+ v-model="enrollment.learnerInfo.lastName"
158
+ :rules="[requiredRule]"
159
+ ></v-text-field>
160
+ </v-col>
161
+ </v-row>
162
+ </v-col>
163
+
164
+ <v-col cols="4">
165
+ <v-row no-gutters>
166
+ <InputLabel
167
+ class="text-capitalize"
168
+ title="First Name"
169
+ required
170
+ />
171
+ <v-col cols="12">
172
+ <v-text-field
173
+ v-model="enrollment.learnerInfo.firstName"
174
+ :rules="[requiredRule]"
175
+ ></v-text-field>
176
+ </v-col>
177
+ </v-row>
178
+ </v-col>
179
+
180
+ <v-col cols="4">
181
+ <v-row no-gutters>
182
+ <InputLabel
183
+ v-model="enrollment.learnerInfo.middleName"
184
+ class="text-capitalize"
185
+ title="Middle Name"
186
+ required
187
+ />
188
+ <v-col cols="12">
189
+ <v-text-field></v-text-field>
190
+ </v-col>
191
+ </v-row>
192
+ </v-col>
193
+ </v-row>
194
+ </v-col>
195
+
196
+ <v-col cols="12">
197
+ <v-row>
198
+ <v-col cols="2">
199
+ <v-row no-gutters>
200
+ <v-col cols="12">
201
+ <InputLabel class="text-capitalize" title="Extension Name" />
202
+ </v-col>
203
+ <v-col cols="12">
204
+ <v-text-field
205
+ v-model="enrollment.learnerInfo.extensionName"
206
+ placeholder="e.g., Jr., Sr., III"
207
+ ></v-text-field>
208
+ </v-col>
209
+ </v-row>
210
+ </v-col>
211
+
212
+ <v-col cols="2">
213
+ <v-row no-gutters>
214
+ <v-col cols="12">
215
+ <InputLabel
216
+ class="text-capitalize"
217
+ title="Birthdate"
218
+ required
219
+ />
220
+ </v-col>
221
+ <v-col cols="12">
222
+ <v-mask-input
223
+ v-model="enrollment.learnerInfo.birthDate"
224
+ mask="##/##/####"
225
+ placeholder="MM/DD/YYYY"
226
+ density="comfortable"
227
+ variant="outlined"
228
+ ></v-mask-input>
229
+ </v-col>
230
+ </v-row>
231
+ </v-col>
232
+
233
+ <v-col cols="1">
234
+ <v-row no-gutters>
235
+ <v-col cols="12">
236
+ <InputLabel class="text-capitalize" title="Age" />
237
+ </v-col>
238
+ <v-col cols="12">
239
+ <v-text-field
240
+ v-model="enrollment.learnerInfo.age"
241
+ type="number"
242
+ readonly
243
+ ></v-text-field>
244
+ </v-col>
245
+ </v-row>
246
+ </v-col>
247
+
248
+ <v-col cols="2">
249
+ <v-row no-gutters>
250
+ <v-col cols="12">
251
+ <InputLabel class="text-capitalize" title="Sex" />
252
+ </v-col>
253
+ <v-col cols="12">
254
+ <v-select
255
+ v-model="enrollment.learnerInfo.sex"
256
+ :items="['Male', 'Female']"
257
+ placeholder="Select Sex"
258
+ ></v-select>
259
+ </v-col>
260
+ </v-row>
261
+ </v-col>
262
+ </v-row>
263
+ </v-col>
264
+
265
+ <v-col cols="12" class="mt-4">
266
+ <v-row>
267
+ <v-col cols="4">
268
+ <v-row no-gutters>
269
+ <InputLabel
270
+ class="text-capitalize"
271
+ title="Place of Birth (Municipality/City)"
272
+ required
273
+ />
274
+ <v-col cols="12">
275
+ <v-combobox
276
+ v-model="enrollment.learnerInfo.placeOfBirth"
277
+ :rules="[requiredRule]"
278
+ :items="citiesMunicipalities"
279
+ :hide-no-data="false"
280
+ >
281
+ <template v-slot:no-data>
282
+ <v-list-item>
283
+ <v-list-item-title>
284
+ No results matching "<strong>search</strong>". Press
285
+ <kbd>enter</kbd> to create a new one
286
+ </v-list-item-title>
287
+ </v-list-item>
288
+ </template>
289
+ </v-combobox>
290
+ </v-col>
291
+ </v-row>
292
+ </v-col>
293
+
294
+ <v-col cols="3">
295
+ <v-row no-gutters>
296
+ <InputLabel
297
+ class="text-capitalize"
298
+ title="Mother Tongue"
299
+ required
300
+ />
301
+ <v-col cols="12">
302
+ <v-combobox
303
+ v-model="enrollment.learnerInfo.motherTongue"
304
+ :rules="[requiredRule]"
305
+ :items="motherTongueOptions"
306
+ :hide-no-data="false"
307
+ >
308
+ <template v-slot:no-data>
309
+ <v-list-item>
310
+ <v-list-item-title>
311
+ No results matching "<strong>search</strong>". Press
312
+ <kbd>enter</kbd> to create a new one
313
+ </v-list-item-title>
314
+ </v-list-item>
315
+ </template>
316
+ </v-combobox>
317
+ </v-col>
318
+ </v-row>
319
+ </v-col>
320
+
321
+ <v-col cols="4">
322
+ <v-row>
323
+ <v-col cols="12" class="pb-0">
324
+ <InputLabel
325
+ class="text-capitalize"
326
+ title="Indigenous People/Cultural Community"
327
+ />
328
+ </v-col>
329
+ <v-col cols="9" class="pt-0">
330
+ <v-combobox
331
+ v-model="enrollment.learnerInfo.indigenousCommunity"
332
+ :items="indigenousCommunitiesPhilippines"
333
+ :hide-no-data="false"
334
+ >
335
+ <template v-slot:no-data>
336
+ <v-list-item>
337
+ <v-list-item-title>
338
+ No results matching "<strong>search</strong>". Press
339
+ <kbd>enter</kbd> to create a new one
340
+ </v-list-item-title>
341
+ </v-list-item>
342
+ </template>
343
+ </v-combobox>
344
+ </v-col>
345
+ </v-row>
346
+ </v-col>
347
+ </v-row>
348
+ </v-col>
349
+
350
+ <v-col cols="12">
351
+ <v-row>
352
+ <v-col cols="12" class="pb-0">
353
+ <InputLabel
354
+ class="text-capitalize"
355
+ title="4Ps Household ID Number"
356
+ />
357
+ </v-col>
358
+ <v-col cols="4" class="pt-0">
359
+ <v-text-field
360
+ v-model="enrollment.learnerInfo.fourPsHouseholdId"
361
+ ></v-text-field>
362
+ </v-col>
363
+ </v-row>
364
+ </v-col>
365
+
366
+ <v-col cols="12">
367
+ <v-checkbox
368
+ v-model="withDisability"
369
+ label="Learner with Disability"
370
+ hide-details
371
+ density="compact"
372
+ ></v-checkbox>
373
+ </v-col>
374
+
375
+ <v-col v-if="withDisability" cols="12">
376
+ <v-row no-gutters>
377
+ <v-col cols="12">
378
+ <v-checkbox
379
+ v-model="enrollment.learnerInfo.disabilities"
380
+ label="Visual Impairment"
381
+ hide-details
382
+ density="compact"
383
+ value="Visual Impairment"
384
+ ></v-checkbox>
385
+ </v-col>
386
+
387
+ <v-col cols="12" class="pl-6">
388
+ <v-checkbox
389
+ v-model="enrollment.learnerInfo.disabilities"
390
+ label="A. Blind"
391
+ hide-details
392
+ density="compact"
393
+ value="Visual Impairment(Blind)"
394
+ ></v-checkbox>
395
+ </v-col>
396
+
397
+ <v-col cols="12" class="pl-6">
398
+ <v-checkbox
399
+ v-model="enrollment.learnerInfo.disabilities"
400
+ label="B. Low vision"
401
+ hide-details
402
+ density="compact"
403
+ value="Visual Impairment(Low vision)"
404
+ ></v-checkbox>
405
+ </v-col>
406
+
407
+ <v-col cols="12">
408
+ <v-checkbox
409
+ v-model="enrollment.learnerInfo.disabilities"
410
+ label="Multiple Disorder"
411
+ hide-details
412
+ density="compact"
413
+ value="Multiple Disorder"
414
+ ></v-checkbox>
415
+ </v-col>
416
+
417
+ <v-col cols="12">
418
+ <v-checkbox
419
+ v-model="enrollment.learnerInfo.disabilities"
420
+ label="Hearing Impairment"
421
+ hide-details
422
+ density="compact"
423
+ value="Hearing Impairment"
424
+ ></v-checkbox>
425
+ </v-col>
426
+
427
+ <v-col cols="12">
428
+ <v-checkbox
429
+ v-model="enrollment.learnerInfo.disabilities"
430
+ label="Autism Spectrum Disorder"
431
+ hide-details
432
+ density="compact"
433
+ value="Autism Spectrum Disorder"
434
+ ></v-checkbox>
435
+ </v-col>
436
+
437
+ <v-col cols="12">
438
+ <v-checkbox
439
+ v-model="enrollment.learnerInfo.disabilities"
440
+ label="Speech/Language Disorder"
441
+ hide-details
442
+ density="compact"
443
+ value="Speech Language Disorder"
444
+ ></v-checkbox>
445
+ </v-col>
446
+
447
+ <v-col cols="12">
448
+ <v-checkbox
449
+ v-model="enrollment.learnerInfo.disabilities"
450
+ label="Learning Disability"
451
+ hide-details
452
+ density="compact"
453
+ value="Learning Disability"
454
+ ></v-checkbox>
455
+ </v-col>
456
+
457
+ <v-col cols="12">
458
+ <v-checkbox
459
+ v-model="enrollment.learnerInfo.disabilities"
460
+ label="Emotional - Behavioral Disorder"
461
+ hide-details
462
+ density="compact"
463
+ value="Emotional Behavioral Disorder"
464
+ ></v-checkbox>
465
+ </v-col>
466
+
467
+ <v-col cols="12">
468
+ <v-checkbox
469
+ v-model="enrollment.learnerInfo.disabilities"
470
+ label="Cerebral Palsy"
471
+ hide-details
472
+ density="compact"
473
+ value="Cerebral Palsy"
474
+ ></v-checkbox>
475
+ </v-col>
476
+
477
+ <v-col cols="12">
478
+ <v-checkbox
479
+ v-model="enrollment.learnerInfo.disabilities"
480
+ label="Intellectual Disability"
481
+ hide-details
482
+ density="compact"
483
+ value="Intellectual Disability"
484
+ ></v-checkbox>
485
+ </v-col>
486
+
487
+ <v-col cols="12">
488
+ <v-checkbox
489
+ v-model="enrollment.learnerInfo.disabilities"
490
+ label="Orthopedic/Physical Handicap"
491
+ hide-details
492
+ density="compact"
493
+ value="Orthopedic Physical Handicap"
494
+ ></v-checkbox>
495
+ </v-col>
496
+
497
+ <v-col cols="12">
498
+ <v-checkbox
499
+ v-model="enrollment.learnerInfo.disabilities"
500
+ label="Special Health Problem / Chronic Disease"
501
+ hide-details
502
+ density="compact"
503
+ value="Special Health Problem"
504
+ ></v-checkbox>
505
+ </v-col>
506
+
507
+ <v-col cols="12" class="pl-6">
508
+ <v-checkbox
509
+ v-model="enrollment.learnerInfo.disabilities"
510
+ label="A. Cancer"
511
+ hide-details
512
+ density="compact"
513
+ value="Cancer"
514
+ ></v-checkbox>
515
+ </v-col>
516
+ </v-row>
517
+ </v-col>
518
+
519
+ <v-col cols="12" class="mt-2">
520
+ <v-row no-gutters>
521
+ <v-col cols="12">
522
+ <span class="font-weight-bold text-subtitle-1">
523
+ Current Address
524
+ </span>
525
+ </v-col>
526
+
527
+ <v-col cols="12">
528
+ <v-row>
529
+ <v-col cols="3">
530
+ <v-row no-gutters>
531
+ <InputLabel class="text-capitalize" title="House No." />
532
+ <v-col cols="12">
533
+ <v-text-field
534
+ v-model="enrollment.address.current.houseNumber"
535
+ ></v-text-field>
536
+ </v-col>
537
+ </v-row>
538
+ </v-col>
539
+
540
+ <v-col cols="3">
541
+ <v-row no-gutters>
542
+ <InputLabel class="text-capitalize" title="Street" />
543
+ <v-col cols="12">
544
+ <v-text-field
545
+ v-model="enrollment.address.current.streetName"
546
+ ></v-text-field>
547
+ </v-col>
548
+ </v-row>
549
+ </v-col>
550
+
551
+ <v-col cols="3">
552
+ <v-row no-gutters>
553
+ <InputLabel
554
+ class="text-capitalize"
555
+ title="Barangay"
556
+ required
557
+ />
558
+ <v-col cols="12">
559
+ <v-text-field
560
+ v-model="enrollment.address.current.barangay"
561
+ :rules="[requiredRule]"
562
+ ></v-text-field>
563
+ </v-col>
564
+ </v-row>
565
+ </v-col>
566
+ </v-row>
567
+ </v-col>
568
+
569
+ <v-col cols="12">
570
+ <v-row>
571
+ <v-col cols="3">
572
+ <v-row no-gutters>
573
+ <InputLabel
574
+ class="text-capitalize"
575
+ title="Municipality/City"
576
+ required
577
+ />
578
+ <v-col cols="12">
579
+ <v-text-field
580
+ v-model="enrollment.address.current.municipalityCity"
581
+ :rules="[requiredRule]"
582
+ ></v-text-field>
583
+ </v-col>
584
+ </v-row>
585
+ </v-col>
586
+
587
+ <v-col cols="3">
588
+ <v-row no-gutters>
589
+ <InputLabel
590
+ class="text-capitalize"
591
+ title="Province"
592
+ required
593
+ />
594
+ <v-col cols="12">
595
+ <v-text-field
596
+ v-model="enrollment.address.current.province"
597
+ :rules="[requiredRule]"
598
+ ></v-text-field>
599
+ </v-col>
600
+ </v-row>
601
+ </v-col>
602
+
603
+ <v-col cols="3">
604
+ <v-row no-gutters>
605
+ <InputLabel
606
+ class="text-capitalize"
607
+ title="Country"
608
+ required
609
+ />
610
+ <v-col cols="12">
611
+ <v-text-field
612
+ v-model="enrollment.address.current.country"
613
+ :rules="[requiredRule]"
614
+ ></v-text-field>
615
+ </v-col>
616
+ </v-row>
617
+ </v-col>
618
+
619
+ <v-col cols="2">
620
+ <v-row no-gutters>
621
+ <InputLabel
622
+ class="text-capitalize"
623
+ title="Zip Code"
624
+ required
625
+ />
626
+ <v-col cols="12">
627
+ <v-text-field
628
+ v-model="enrollment.address.current.zipCode"
629
+ :rules="[requiredRule]"
630
+ ></v-text-field>
631
+ </v-col>
632
+ </v-row>
633
+ </v-col>
634
+ </v-row>
635
+ </v-col>
636
+ </v-row>
637
+ </v-col>
638
+
639
+ <v-col cols="12" class="mt-2">
640
+ <v-row no-gutters>
641
+ <v-col cols="12">
642
+ <span class="font-weight-bold text-subtitle-1">
643
+ Permanent Address
644
+ </span>
645
+ </v-col>
646
+
647
+ <v-col cols="12">
648
+ <v-checkbox
649
+ v-model="sameAsCurrentAddress"
650
+ label="Same as Current Address"
651
+ hide-details
652
+ density="compact"
653
+ ></v-checkbox>
654
+ </v-col>
655
+
656
+ <v-col cols="12">
657
+ <v-row>
658
+ <v-col cols="3">
659
+ <v-row no-gutters>
660
+ <InputLabel class="text-capitalize" title="House No." />
661
+ <v-col cols="12">
662
+ <v-text-field
663
+ v-model="enrollment.address.permanent.houseNumber"
664
+ :readonly="sameAsCurrentAddress"
665
+ ></v-text-field>
666
+ </v-col>
667
+ </v-row>
668
+ </v-col>
669
+
670
+ <v-col cols="3">
671
+ <v-row no-gutters>
672
+ <InputLabel class="text-capitalize" title="Street" />
673
+ <v-col cols="12">
674
+ <v-text-field
675
+ v-model="enrollment.address.permanent.streetName"
676
+ :readonly="sameAsCurrentAddress"
677
+ ></v-text-field>
678
+ </v-col>
679
+ </v-row>
680
+ </v-col>
681
+
682
+ <v-col cols="3">
683
+ <v-row no-gutters>
684
+ <InputLabel
685
+ class="text-capitalize"
686
+ title="Barangay"
687
+ required
688
+ />
689
+ <v-col cols="12">
690
+ <v-text-field
691
+ v-model="enrollment.address.permanent.barangay"
692
+ :rules="[requiredRule]"
693
+ :readonly="sameAsCurrentAddress"
694
+ ></v-text-field>
695
+ </v-col>
696
+ </v-row>
697
+ </v-col>
698
+ </v-row>
699
+ </v-col>
700
+
701
+ <v-col cols="12">
702
+ <v-row>
703
+ <v-col cols="3">
704
+ <v-row no-gutters>
705
+ <InputLabel
706
+ class="text-capitalize"
707
+ title="Municipality/City"
708
+ required
709
+ />
710
+ <v-col cols="12">
711
+ <v-text-field
712
+ v-model="enrollment.address.permanent.municipalityCity"
713
+ :rules="[requiredRule]"
714
+ :readonly="sameAsCurrentAddress"
715
+ ></v-text-field>
716
+ </v-col>
717
+ </v-row>
718
+ </v-col>
719
+
720
+ <v-col cols="3">
721
+ <v-row no-gutters>
722
+ <InputLabel
723
+ class="text-capitalize"
724
+ title="Province"
725
+ required
726
+ />
727
+ <v-col cols="12">
728
+ <v-text-field
729
+ v-model="enrollment.address.permanent.province"
730
+ :rules="[requiredRule]"
731
+ :readonly="sameAsCurrentAddress"
732
+ ></v-text-field>
733
+ </v-col>
734
+ </v-row>
735
+ </v-col>
736
+
737
+ <v-col cols="3">
738
+ <v-row no-gutters>
739
+ <InputLabel
740
+ class="text-capitalize"
741
+ title="Country"
742
+ required
743
+ />
744
+ <v-col cols="12">
745
+ <v-text-field
746
+ v-model="enrollment.address.permanent.country"
747
+ :rules="[requiredRule]"
748
+ :readonly="sameAsCurrentAddress"
749
+ ></v-text-field>
750
+ </v-col>
751
+ </v-row>
752
+ </v-col>
753
+
754
+ <v-col cols="2">
755
+ <v-row no-gutters>
756
+ <InputLabel
757
+ class="text-capitalize"
758
+ title="Zip Code"
759
+ required
760
+ />
761
+ <v-col cols="12">
762
+ <v-text-field
763
+ v-model="enrollment.address.permanent.zipCode"
764
+ :rules="[requiredRule]"
765
+ :readonly="sameAsCurrentAddress"
766
+ ></v-text-field>
767
+ </v-col>
768
+ </v-row>
769
+ </v-col>
770
+ </v-row>
771
+ </v-col>
772
+ </v-row>
773
+ </v-col>
774
+
775
+ <v-col cols="12" class="mt-2">
776
+ <v-row no-gutters>
777
+ <v-col cols="12">
778
+ <span class="font-weight-bold text-subtitle-1">
779
+ Parent/Guardian Information
780
+ </span>
781
+ </v-col>
782
+
783
+ <v-col cols="12">
784
+ <span class="font-weight-bold text-subtitle-2">
785
+ Father's Name
786
+ </span>
787
+ </v-col>
788
+
789
+ <v-col cols="12">
790
+ <v-row>
791
+ <v-col cols="3">
792
+ <v-row no-gutters>
793
+ <InputLabel
794
+ class="text-capitalize"
795
+ title="Last Name"
796
+ required
797
+ />
798
+ <v-col cols="12">
799
+ <v-text-field
800
+ v-model="enrollment.parentGuardianInfo.father.lastName"
801
+ :rules="[requiredRule]"
802
+ ></v-text-field>
803
+ </v-col>
804
+ </v-row>
805
+ </v-col>
806
+
807
+ <v-col cols="3">
808
+ <v-row no-gutters>
809
+ <InputLabel
810
+ class="text-capitalize"
811
+ title="First Name"
812
+ required
813
+ />
814
+ <v-col cols="12">
815
+ <v-text-field
816
+ v-model="enrollment.parentGuardianInfo.father.firstName"
817
+ :rules="[requiredRule]"
818
+ ></v-text-field>
819
+ </v-col>
820
+ </v-row>
821
+ </v-col>
822
+
823
+ <v-col cols="3">
824
+ <v-row no-gutters>
825
+ <InputLabel class="text-capitalize" title="Middle Name" />
826
+ <v-col cols="12">
827
+ <v-text-field
828
+ v-model="
829
+ enrollment.parentGuardianInfo.father.middleName
830
+ "
831
+ ></v-text-field>
832
+ </v-col>
833
+ </v-row>
834
+ </v-col>
835
+
836
+ <v-col cols="3">
837
+ <v-row no-gutters>
838
+ <InputLabel
839
+ class="text-capitalize"
840
+ title="Contact Number"
841
+ />
842
+ <v-col cols="12">
843
+ <v-mask-input
844
+ v-model="
845
+ enrollment.parentGuardianInfo.father.contactNumber
846
+ "
847
+ :mask="{
848
+ mask: '09NN-NNN-NNNN',
849
+ tokens: {
850
+ N: { pattern: /[0-9]/ },
851
+ },
852
+ }"
853
+ placeholder="09XX-XXX-XXXX"
854
+ variant="outlined"
855
+ density="comfortable"
856
+ ></v-mask-input>
857
+ </v-col>
858
+ </v-row>
859
+ </v-col>
860
+ </v-row>
861
+ </v-col>
862
+
863
+ <v-col cols="12">
864
+ <span class="font-weight-bold text-subtitle-2">
865
+ Mother's Name
866
+ </span>
867
+ </v-col>
868
+
869
+ <v-col cols="12">
870
+ <v-row>
871
+ <v-col cols="3">
872
+ <v-row no-gutters>
873
+ <InputLabel
874
+ class="text-capitalize"
875
+ title="Last Name"
876
+ required
877
+ />
878
+ <v-col cols="12">
879
+ <v-text-field
880
+ v-model="enrollment.parentGuardianInfo.mother.lastName"
881
+ :rules="[requiredRule]"
882
+ ></v-text-field>
883
+ </v-col>
884
+ </v-row>
885
+ </v-col>
886
+
887
+ <v-col cols="3">
888
+ <v-row no-gutters>
889
+ <InputLabel
890
+ class="text-capitalize"
891
+ title="First Name"
892
+ required
893
+ />
894
+ <v-col cols="12">
895
+ <v-text-field
896
+ v-model="enrollment.parentGuardianInfo.mother.firstName"
897
+ :rules="[requiredRule]"
898
+ ></v-text-field>
899
+ </v-col>
900
+ </v-row>
901
+ </v-col>
902
+
903
+ <v-col cols="3">
904
+ <v-row no-gutters>
905
+ <InputLabel class="text-capitalize" title="Middle Name" />
906
+ <v-col cols="12">
907
+ <v-text-field
908
+ v-model="
909
+ enrollment.parentGuardianInfo.mother.middleName
910
+ "
911
+ ></v-text-field>
912
+ </v-col>
913
+ </v-row>
914
+ </v-col>
915
+
916
+ <v-col cols="3">
917
+ <v-row no-gutters>
918
+ <InputLabel
919
+ class="text-capitalize"
920
+ title="Contact Number"
921
+ />
922
+ <v-col cols="12">
923
+ <v-mask-input
924
+ v-model="
925
+ enrollment.parentGuardianInfo.mother.contactNumber
926
+ "
927
+ :mask="{
928
+ mask: '09NN-NNN-NNNN',
929
+ tokens: {
930
+ N: { pattern: /[0-9]/ },
931
+ },
932
+ }"
933
+ placeholder="09XX-XXX-XXXX"
934
+ variant="outlined"
935
+ density="comfortable"
936
+ ></v-mask-input>
937
+ </v-col>
938
+ </v-row>
939
+ </v-col>
940
+ </v-row>
941
+ </v-col>
942
+
943
+ <v-col cols="12">
944
+ <span class="font-weight-bold text-subtitle-2">
945
+ Legal Guardian’s Name
946
+ </span>
947
+ </v-col>
948
+
949
+ <v-col cols="3">
950
+ <v-checkbox
951
+ v-model="fatherLegalGuardianSame"
952
+ label="Father is the Legal Guardian"
953
+ hide-details
954
+ density="compact"
955
+ ></v-checkbox>
956
+ </v-col>
957
+
958
+ <v-col cols="3">
959
+ <v-checkbox
960
+ v-model="motherLegalGuardianSame"
961
+ label="Mother is the Legal Guardian"
962
+ hide-details
963
+ density="compact"
964
+ ></v-checkbox>
965
+ </v-col>
966
+
967
+ <v-col cols="12">
968
+ <v-row>
969
+ <v-col cols="3">
970
+ <v-row no-gutters>
971
+ <InputLabel
972
+ class="text-capitalize"
973
+ title="Last Name"
974
+ required
975
+ />
976
+ <v-col cols="12">
977
+ <v-text-field
978
+ v-model="
979
+ enrollment.parentGuardianInfo.legalGuardian.lastName
980
+ "
981
+ :rules="[requiredRule]"
982
+ :readonly="
983
+ fatherLegalGuardianSame || motherLegalGuardianSame
984
+ "
985
+ ></v-text-field>
986
+ </v-col>
987
+ </v-row>
988
+ </v-col>
989
+
990
+ <v-col cols="3">
991
+ <v-row no-gutters>
992
+ <InputLabel
993
+ class="text-capitalize"
994
+ title="First Name"
995
+ required
996
+ />
997
+ <v-col cols="12">
998
+ <v-text-field
999
+ v-model="
1000
+ enrollment.parentGuardianInfo.legalGuardian.firstName
1001
+ "
1002
+ :rules="[requiredRule]"
1003
+ :readonly="
1004
+ fatherLegalGuardianSame || motherLegalGuardianSame
1005
+ "
1006
+ ></v-text-field>
1007
+ </v-col>
1008
+ </v-row>
1009
+ </v-col>
1010
+
1011
+ <v-col cols="3">
1012
+ <v-row no-gutters>
1013
+ <InputLabel class="text-capitalize" title="Middle Name" />
1014
+ <v-col cols="12">
1015
+ <v-text-field
1016
+ v-model="
1017
+ enrollment.parentGuardianInfo.legalGuardian.middleName
1018
+ "
1019
+ :readonly="
1020
+ fatherLegalGuardianSame || motherLegalGuardianSame
1021
+ "
1022
+ ></v-text-field>
1023
+ </v-col>
1024
+ </v-row>
1025
+ </v-col>
1026
+
1027
+ <v-col cols="3">
1028
+ <v-row no-gutters>
1029
+ <InputLabel
1030
+ class="text-capitalize"
1031
+ title="Contact Number"
1032
+ />
1033
+ <v-col cols="12">
1034
+ <v-mask-input
1035
+ v-model="
1036
+ enrollment.parentGuardianInfo.legalGuardian
1037
+ .contactNumber
1038
+ "
1039
+ :mask="{
1040
+ mask: '09NN-NNN-NNNN',
1041
+ tokens: {
1042
+ N: { pattern: /[0-9]/ },
1043
+ },
1044
+ }"
1045
+ placeholder="09XX-XXX-XXXX"
1046
+ variant="outlined"
1047
+ density="comfortable"
1048
+ :readonly="
1049
+ fatherLegalGuardianSame || motherLegalGuardianSame
1050
+ "
1051
+ ></v-mask-input>
1052
+ </v-col>
1053
+ </v-row>
1054
+ </v-col>
1055
+ </v-row>
1056
+ </v-col>
1057
+ </v-row>
1058
+ </v-col>
1059
+ </v-row>
1060
+ </v-col>
1061
+
1062
+ <v-col v-else cols="12">
1063
+ <v-row no-gutters>
1064
+ <v-col cols="12">
1065
+ <v-row>
1066
+ <v-col cols="3">
1067
+ <v-row no-gutters>
1068
+ <InputLabel
1069
+ class="text-capitalize"
1070
+ title="Last Grade Level Completed"
1071
+ required
1072
+ />
1073
+ <v-col cols="12">
1074
+ <v-autocomplete
1075
+ v-model="enrollment.lastGradeLevelCompleted"
1076
+ :rules="[requiredRule]"
1077
+ :items="gradeLevels"
1078
+ ></v-autocomplete>
1079
+ </v-col>
1080
+ </v-row>
1081
+ </v-col>
1082
+
1083
+ <v-col cols="3">
1084
+ <v-row no-gutters>
1085
+ <InputLabel
1086
+ class="text-capitalize"
1087
+ title="Last School Year Completed"
1088
+ required
1089
+ />
1090
+ <v-col cols="12">
1091
+ <v-autocomplete
1092
+ v-model="enrollment.lastGradeLevelCompleted"
1093
+ :rules="[requiredRule]"
1094
+ :items="lastSchoolYearOptions"
1095
+ ></v-autocomplete>
1096
+ </v-col>
1097
+ </v-row>
1098
+ </v-col>
1099
+ </v-row>
1100
+ </v-col>
1101
+
1102
+ <v-col cols="8">
1103
+ <v-row no-gutters>
1104
+ <InputLabel
1105
+ class="text-capitalize"
1106
+ title="Last School Attended"
1107
+ required
1108
+ />
1109
+ <v-col cols="12">
1110
+ <v-text-field
1111
+ v-model="enrollment.lastSchoolAttended"
1112
+ :rules="[requiredRule]"
1113
+ ></v-text-field>
1114
+ </v-col>
1115
+ </v-row>
1116
+ </v-col>
1117
+ </v-row>
1118
+ </v-col>
1119
+
1120
+ <v-col cols="12" class="mt-4">
1121
+ <span class="font-weight-bold text-subtitle-2">
1122
+ If school will implement other distance learning modalities aside from
1123
+ face-to-face instruction, what would you prefer for your child?
1124
+ </span>
1125
+ </v-col>
1126
+
1127
+ <v-col cols="12" class="mt-2">
1128
+ <span class="font-weight-bold text-subtitle-2">
1129
+ Choose all that apply:
1130
+ </span>
1131
+ </v-col>
1132
+
1133
+ <v-col cols="12">
1134
+ <v-row no-gutters>
1135
+ <v-col v-for="alternative in alternativeLearning" cols="3">
1136
+ <v-checkbox
1137
+ v-model="enrollment.alternativeLearningOptions"
1138
+ label="Modular (Print)"
1139
+ hide-details
1140
+ density="compact"
1141
+ :value="alternative"
1142
+ >
1143
+ <template #label>
1144
+ <span class="font-weight-bold text-subtitle-2">
1145
+ {{ alternative }}
1146
+ </span>
1147
+ </template>
1148
+ </v-checkbox>
1149
+ </v-col>
1150
+ </v-row>
1151
+ </v-col>
1152
+
1153
+ <v-col cols="12" class="mt-16">
1154
+ <v-checkbox
1155
+ v-model="enrollment.isCertifiedAndConsented"
1156
+ hide-details
1157
+ density="compact"
1158
+ :rules="[requiredRule]"
1159
+ >
1160
+ <template v-slot:label>
1161
+ <span class="font-weight-bold text-subtitle-2">
1162
+ I hereby certify that the above information given are true and
1163
+ correct o the best of my knowledge and I allow the Department of
1164
+ Education to use my child’s details to create and/or update his/her
1165
+ learner profile in the Learner Information System. The information
1166
+ herein shall be treated as confidential in compliance with the Data
1167
+ Privacy Act of 2012.
1168
+ </span>
1169
+ </template>
1170
+ </v-checkbox>
1171
+ </v-col>
1172
+ </v-row>
1173
+ </template>
1174
+ <script setup lang="ts">
1175
+ const prop = defineProps({
1176
+ selfService: {
1177
+ type: Boolean,
1178
+ default: false,
1179
+ },
1180
+ });
1181
+
1182
+ import { VMaskInput } from "vuetify/labs/VMaskInput";
1183
+ const { requiredRule } = useUtils();
1184
+
1185
+ const { getAll: getAllPSGC } = usePSGC();
1186
+
1187
+ const region = ref("");
1188
+ const regions = ref<Array<Record<string, any>>>([]);
1189
+
1190
+ const { data: getAllRegPSGCData, status: getAllRegionStatus } =
1191
+ await useLazyAsyncData("get-all-psgc-region", () =>
1192
+ getAllPSGC({ type: "Reg" })
1193
+ );
1194
+
1195
+ const regionStatus = computed(() => getAllRegionStatus.value === "pending");
1196
+
1197
+ watchEffect(() => {
1198
+ if (getAllRegPSGCData.value) {
1199
+ regions.value = getAllRegPSGCData.value.items;
1200
+ }
1201
+ });
1202
+
1203
+ const provinces = ref<Array<Record<string, any>>>([]);
1204
+ const province = ref("");
1205
+
1206
+ watch(region, () => {
1207
+ province.value = "";
1208
+ });
1209
+
1210
+ const { data: getAllPSGCProvData, status: getAllProvStatus } =
1211
+ await useLazyAsyncData(
1212
+ "get-all-psgc-provinces",
1213
+ () => getAllPSGC({ type: "Prov", prefix: region.value.slice(0, 2) }),
1214
+ {
1215
+ watch: [region],
1216
+ }
1217
+ );
1218
+
1219
+ const provincesStatus = computed(() => getAllProvStatus.value === "pending");
1220
+
1221
+ watchEffect(() => {
1222
+ if (getAllPSGCProvData.value) {
1223
+ provinces.value = getAllPSGCProvData.value.items;
1224
+ }
1225
+ });
1226
+
1227
+ const citiesMunicipalities = ref<Array<Record<string, any>>>([]);
1228
+ const cityMunicipality = ref("");
1229
+
1230
+ watch(province, () => {
1231
+ cityMunicipality.value = "";
1232
+ });
1233
+
1234
+ const cityMunicipalityPrefix = computed(() => {
1235
+ let prefix = "";
1236
+ if (region.value) {
1237
+ prefix = region.value.slice(0, 2);
1238
+ }
1239
+
1240
+ if (province.value) {
1241
+ prefix = province.value.slice(0, 5);
1242
+ }
1243
+
1244
+ return prefix;
1245
+ });
1246
+
1247
+ const { data: getAllPSGCCityMunData, status: getAllCityMunStatus } =
1248
+ await useLazyAsyncData(
1249
+ `get-all-psgc-citiesMunicipalities-by-prefix-${cityMunicipalityPrefix.value}`,
1250
+ () =>
1251
+ getAllPSGC({
1252
+ type: "City",
1253
+ prefix: cityMunicipalityPrefix.value,
1254
+ limit: 2000,
1255
+ }),
1256
+ {
1257
+ watch: [cityMunicipalityPrefix],
1258
+ }
1259
+ );
1260
+
1261
+ const citiesMunicipalitiesStatus = computed(
1262
+ () => getAllCityMunStatus.value === "pending"
1263
+ );
1264
+
1265
+ watchEffect(() => {
1266
+ if (getAllPSGCCityMunData.value) {
1267
+ citiesMunicipalities.value = getAllPSGCCityMunData.value.items;
1268
+ }
1269
+ });
1270
+
1271
+ const regionOptions: string[] = [];
1272
+ const provinceOptions: string[] = [];
1273
+ const cityMunicipalityOptions: string[] = [];
1274
+
1275
+ const {
1276
+ gradeLevels,
1277
+ generateSchoolYears,
1278
+ getPhilippineCities,
1279
+ getPhilippineMunicipalities,
1280
+ motherTongueOptions,
1281
+ } = useBasicEdu();
1282
+
1283
+ const effectiveSchoolYearOptions = generateSchoolYears();
1284
+ const lastSchoolYearOptions = generateSchoolYears(50).reverse();
1285
+
1286
+ const { data: citiesData } = await useLazyAsyncData("getCities", () =>
1287
+ getPhilippineCities()
1288
+ );
1289
+
1290
+ const { data: municipalitiesData } = await useLazyAsyncData(
1291
+ "getMunicipalities",
1292
+ () => getPhilippineMunicipalities()
1293
+ );
1294
+
1295
+ const indigenousCommunitiesPhilippines = [
1296
+ // Luzon (Northern Philippines) - Cordillera Groups (Igorot Subgroups)
1297
+ "Ifugao",
1298
+ "Bontoc",
1299
+ "Kalinga",
1300
+ "Ibaloi",
1301
+ "Kankanaey",
1302
+ "Isneg",
1303
+ "Tinguian",
1304
+
1305
+ // Luzon (Northern Philippines) - Negrito Groups
1306
+ "Aeta",
1307
+ "Agta",
1308
+ "Dumagat",
1309
+
1310
+ // Visayas (Central Philippines) - Mindoro, Palawan, and other groups
1311
+ "Hanunoo (Mindoro)",
1312
+ "Buhid (Mindoro)",
1313
+ "Iraya (Mindoro)",
1314
+ "Tagbanwa (Palawan)",
1315
+ "Palawano (Palawan)",
1316
+ "Batak (Palawan)",
1317
+ "Ati (Visayas)",
1318
+ "Suludnon (Panay)",
1319
+
1320
+ // Mindanao (Southern Philippines) - Lumad Subgroups (Non-Muslim)
1321
+ "Manobo",
1322
+ "T'boli",
1323
+ "B'laan",
1324
+ "Higaonon",
1325
+ "Mandaya",
1326
+ "Bagobo",
1327
+ "Subanen",
1328
+ "Talaandig",
1329
+
1330
+ // Mindanao (Southern Philippines) - Moro Groups (Muslim)
1331
+ "Maranao",
1332
+ "Maguindanao",
1333
+ "Tausug",
1334
+ "Yakan",
1335
+ "Sama-Bajau",
1336
+ ];
1337
+
1338
+ const returningLearner = ref(false);
1339
+ const withDisability = ref(false);
1340
+ const sameAsCurrentAddress = ref(false);
1341
+ const fatherLegalGuardianSame = ref(false);
1342
+ const motherLegalGuardianSame = ref(false);
1343
+
1344
+ const alternativeLearning = [
1345
+ "Modular (Print)",
1346
+ "Online",
1347
+ "Radio-Based Instruction",
1348
+ "Blended",
1349
+ "Modular (Digital)",
1350
+ "Educational Television",
1351
+ "Homeschooling",
1352
+ ];
1353
+
1354
+ const enrollment = defineModel<TBasicEducEnrForm>({
1355
+ default: () => useEnrollment().enrollment,
1356
+ });
1357
+
1358
+ watch(returningLearner, (val) => {
1359
+ if (val) {
1360
+ enrollment.value.learnerInfo.psaBirthCertificateNo = "";
1361
+ enrollment.value.learnerInfo.learnerReferenceNumber = "";
1362
+ enrollment.value.learnerInfo.firstName = "";
1363
+ enrollment.value.learnerInfo.middleName = "";
1364
+ enrollment.value.learnerInfo.lastName = "";
1365
+ enrollment.value.learnerInfo.extensionName = "";
1366
+ enrollment.value.learnerInfo.birthDate = "";
1367
+ enrollment.value.learnerInfo.placeOfBirth = "";
1368
+ enrollment.value.learnerInfo.sex = "";
1369
+ enrollment.value.learnerInfo.motherTongue = "";
1370
+ enrollment.value.learnerInfo.age = 0;
1371
+ enrollment.value.learnerInfo.disabilities = [];
1372
+ enrollment.value.learnerInfo.indigenousCommunity = "";
1373
+ enrollment.value.learnerInfo.fourPsHouseholdId = "";
1374
+ enrollment.value.parentGuardianInfo.father.firstName = "";
1375
+ enrollment.value.parentGuardianInfo.father.lastName = "";
1376
+ enrollment.value.parentGuardianInfo.father.middleName = "";
1377
+ enrollment.value.parentGuardianInfo.father.contactNumber = "";
1378
+ enrollment.value.parentGuardianInfo.mother.firstName = "";
1379
+ enrollment.value.parentGuardianInfo.mother.lastName = "";
1380
+ enrollment.value.parentGuardianInfo.mother.middleName = "";
1381
+ enrollment.value.parentGuardianInfo.mother.contactNumber = "";
1382
+ enrollment.value.parentGuardianInfo.legalGuardian.firstName = "";
1383
+ enrollment.value.parentGuardianInfo.legalGuardian.lastName = "";
1384
+ enrollment.value.parentGuardianInfo.legalGuardian.middleName = "";
1385
+ enrollment.value.parentGuardianInfo.legalGuardian.contactNumber = "";
1386
+ enrollment.value.address.current.houseNumber = "";
1387
+ enrollment.value.address.current.streetName = "";
1388
+ enrollment.value.address.current.sitio = "";
1389
+ enrollment.value.address.current.barangay = "";
1390
+ enrollment.value.address.current.municipalityCity = "";
1391
+ enrollment.value.address.current.province = "";
1392
+ enrollment.value.address.current.country = "";
1393
+ enrollment.value.address.current.zipCode = "";
1394
+ enrollment.value.address.permanent.houseNumber = "";
1395
+ enrollment.value.address.permanent.streetName = "";
1396
+ enrollment.value.address.permanent.sitio = "";
1397
+ enrollment.value.address.permanent.barangay = "";
1398
+ enrollment.value.address.permanent.municipalityCity = "";
1399
+ enrollment.value.address.permanent.province = "";
1400
+ enrollment.value.address.permanent.country = "";
1401
+ enrollment.value.address.permanent.zipCode = "";
1402
+ }
1403
+ });
1404
+
1405
+ watchEffect(() => {
1406
+ if (sameAsCurrentAddress.value) {
1407
+ enrollment.value.address.permanent.houseNumber =
1408
+ enrollment.value.address.current.houseNumber;
1409
+ enrollment.value.address.permanent.streetName =
1410
+ enrollment.value.address.current.streetName;
1411
+ enrollment.value.address.permanent.sitio =
1412
+ enrollment.value.address.current.sitio;
1413
+ enrollment.value.address.permanent.barangay =
1414
+ enrollment.value.address.current.barangay;
1415
+ enrollment.value.address.permanent.municipalityCity =
1416
+ enrollment.value.address.current.municipalityCity;
1417
+ enrollment.value.address.permanent.province =
1418
+ enrollment.value.address.current.province;
1419
+ enrollment.value.address.permanent.country =
1420
+ enrollment.value.address.current.country;
1421
+ enrollment.value.address.permanent.zipCode =
1422
+ enrollment.value.address.current.zipCode;
1423
+ } else {
1424
+ enrollment.value.address.permanent.houseNumber = "";
1425
+ enrollment.value.address.permanent.streetName = "";
1426
+ enrollment.value.address.permanent.sitio = "";
1427
+ enrollment.value.address.permanent.barangay = "";
1428
+ enrollment.value.address.permanent.municipalityCity = "";
1429
+ enrollment.value.address.permanent.province = "";
1430
+ enrollment.value.address.permanent.country = "";
1431
+ enrollment.value.address.permanent.zipCode = "";
1432
+ }
1433
+ });
1434
+
1435
+ watchEffect(() => {
1436
+ if (fatherLegalGuardianSame.value) {
1437
+ enrollment.value.parentGuardianInfo.legalGuardian.firstName =
1438
+ enrollment.value.parentGuardianInfo.father.firstName;
1439
+ enrollment.value.parentGuardianInfo.legalGuardian.lastName =
1440
+ enrollment.value.parentGuardianInfo.father.lastName;
1441
+ enrollment.value.parentGuardianInfo.legalGuardian.middleName =
1442
+ enrollment.value.parentGuardianInfo.father.middleName;
1443
+ enrollment.value.parentGuardianInfo.legalGuardian.contactNumber =
1444
+ enrollment.value.parentGuardianInfo.father.contactNumber;
1445
+ motherLegalGuardianSame.value = false;
1446
+ } else {
1447
+ enrollment.value.parentGuardianInfo.legalGuardian.firstName = "";
1448
+ enrollment.value.parentGuardianInfo.legalGuardian.lastName = "";
1449
+ enrollment.value.parentGuardianInfo.legalGuardian.middleName = "";
1450
+ enrollment.value.parentGuardianInfo.legalGuardian.contactNumber = "";
1451
+ }
1452
+ });
1453
+
1454
+ watchEffect(() => {
1455
+ if (motherLegalGuardianSame.value) {
1456
+ enrollment.value.parentGuardianInfo.legalGuardian.firstName =
1457
+ enrollment.value.parentGuardianInfo.mother.firstName;
1458
+ enrollment.value.parentGuardianInfo.legalGuardian.lastName =
1459
+ enrollment.value.parentGuardianInfo.mother.lastName;
1460
+ enrollment.value.parentGuardianInfo.legalGuardian.middleName =
1461
+ enrollment.value.parentGuardianInfo.mother.middleName;
1462
+ enrollment.value.parentGuardianInfo.legalGuardian.contactNumber =
1463
+ enrollment.value.parentGuardianInfo.mother.contactNumber;
1464
+ fatherLegalGuardianSame.value = false;
1465
+ } else {
1466
+ enrollment.value.parentGuardianInfo.legalGuardian.firstName = "";
1467
+ enrollment.value.parentGuardianInfo.legalGuardian.lastName = "";
1468
+ enrollment.value.parentGuardianInfo.legalGuardian.middleName = "";
1469
+ enrollment.value.parentGuardianInfo.legalGuardian.contactNumber = "";
1470
+ }
1471
+ });
1472
+
1473
+ import { useMask } from "vuetify";
1474
+
1475
+ watchEffect(() => {
1476
+ const mask = useMask({ mask: "##/##/####" });
1477
+ const date = mask.mask(enrollment.value.learnerInfo.birthDate);
1478
+ if (
1479
+ enrollment.value.learnerInfo.birthDate &&
1480
+ new Date(date).toString() !== "Invalid Date"
1481
+ ) {
1482
+ const birthDate = new Date(date);
1483
+
1484
+ const today = new Date();
1485
+ let age = today.getFullYear() - birthDate.getFullYear();
1486
+ const monthDiff = today.getMonth() - birthDate.getMonth();
1487
+ if (
1488
+ monthDiff < 0 ||
1489
+ (monthDiff === 0 && today.getDate() < birthDate.getDate())
1490
+ ) {
1491
+ age--;
1492
+ }
1493
+ enrollment.value.learnerInfo.age = age;
1494
+ } else {
1495
+ enrollment.value.learnerInfo.age = 0;
1496
+ }
1497
+ });
1498
+ </script>