@eeplatform/nuxt-layer-common 1.7.35 → 1.7.36

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.36
4
+
5
+ ### Patch Changes
6
+
7
+ - dac36cb: Fix enrollment form
8
+
3
9
  ## 1.7.35
4
10
 
5
11
  ### 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>
@@ -622,6 +605,32 @@ const localProps = defineProps({
622
605
  },
623
606
  });
624
607
 
608
+ const placeOfBirth = computed(() => {
609
+ const province =
610
+ localProps.application.learnerInfo?.placeOfBirth.provinceName ?? "";
611
+ const city =
612
+ localProps.application.learnerInfo?.placeOfBirth.cityMunicipalityName ?? "";
613
+
614
+ if (province && city) {
615
+ return `${province}, ${city}`;
616
+ } else if (!province && city) {
617
+ return city;
618
+ } else {
619
+ return "N/A";
620
+ }
621
+ });
622
+
623
+ const birthDate = computed(() => {
624
+ const dateStr = localProps.application.learnerInfo?.birthDate;
625
+ if (!dateStr) return "N/A";
626
+
627
+ try {
628
+ return new Date(dateStr).toLocaleDateString();
629
+ } catch {
630
+ return dateStr;
631
+ }
632
+ });
633
+
625
634
  const emits = defineEmits(["close", "reject", "accept"]);
626
635
 
627
636
  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.36",
6
6
  "main": "./nuxt.config.ts",
7
7
  "publishConfig": {
8
8
  "access": "public"