@eeplatform/nuxt-layer-common 1.7.35 → 1.7.37

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,17 @@
1
1
  # @eeplatform/nuxt-layer-common
2
2
 
3
+ ## 1.7.37
4
+
5
+ ### Patch Changes
6
+
7
+ - d35d59f: Fix enrollment application preview component
8
+
9
+ ## 1.7.36
10
+
11
+ ### Patch Changes
12
+
13
+ - dac36cb: Fix enrollment form
14
+
3
15
  ## 1.7.35
4
16
 
5
17
  ### Patch Changes
@@ -134,13 +134,7 @@
134
134
  </v-col>
135
135
  <v-col cols="12" class="mb-2">
136
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
- }}
137
+ {{ birthDate }}
144
138
  </v-col>
145
139
  <v-col cols="6" class="mb-2">
146
140
  <strong>Age:</strong>
@@ -152,18 +146,7 @@
152
146
  </v-col>
153
147
  <v-col cols="6" class="mb-2">
154
148
  <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
- }}
149
+ {{ placeOfBirth }}
167
150
  </v-col>
168
151
  <v-col cols="12" class="mb-2">
169
152
  <strong>Mother Tongue:</strong>
@@ -574,42 +557,44 @@
574
557
  </v-btn>
575
558
  </v-col>
576
559
 
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>
560
+ <slot name="action">
561
+ <v-col
562
+ v-if="localProps.application?.status === 'pending'"
563
+ cols="6"
564
+ class="pa-0"
565
+ >
566
+ <v-menu>
567
+ <template #activator="{ props }">
568
+ <v-btn
569
+ block
570
+ variant="flat"
571
+ color="black"
572
+ class="text-none"
573
+ size="large"
574
+ height="48"
575
+ v-bind="props"
576
+ tile
577
+ >
578
+ More actions
579
+ </v-btn>
580
+ </template>
581
+
582
+ <v-list class="pa-0">
583
+ <v-list-item @click="emits('accept')">
584
+ <v-list-item-title class="text-subtitle-1 font-weight-medium">
585
+ Accept Application
586
+ </v-list-item-title>
587
+ </v-list-item>
588
+
589
+ <v-list-item @click="emits('reject')" class="text-red">
590
+ <v-list-item-title class="text-subtitle-1 font-weight-medium">
591
+ Reject Application
592
+ </v-list-item-title>
593
+ </v-list-item>
594
+ </v-list>
595
+ </v-menu>
596
+ </v-col>
597
+ </slot>
613
598
  </v-row>
614
599
  </v-toolbar>
615
600
  </v-card>
@@ -622,6 +607,32 @@ const localProps = defineProps({
622
607
  },
623
608
  });
624
609
 
610
+ const placeOfBirth = computed(() => {
611
+ const province =
612
+ localProps.application.learnerInfo?.placeOfBirth.provinceName ?? "";
613
+ const city =
614
+ localProps.application.learnerInfo?.placeOfBirth.cityMunicipalityName ?? "";
615
+
616
+ if (province && city) {
617
+ return `${province}, ${city}`;
618
+ } else if (!province && city) {
619
+ return city;
620
+ } else {
621
+ return "N/A";
622
+ }
623
+ });
624
+
625
+ const birthDate = computed(() => {
626
+ const dateStr = localProps.application.learnerInfo?.birthDate;
627
+ if (!dateStr) return "N/A";
628
+
629
+ try {
630
+ return new Date(dateStr).toLocaleDateString();
631
+ } catch {
632
+ return dateStr;
633
+ }
634
+ });
635
+
625
636
  const emits = defineEmits(["close", "reject", "accept"]);
626
637
 
627
638
  function getStatusColor(status: string): string {
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.35",
5
+ "version": "1.7.37",
6
6
  "main": "./nuxt.config.ts",
7
7
  "publishConfig": {
8
8
  "access": "public"