@7365admin1/layer-common 4.2.9-staging.277 → 4.2.9-staging.279
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.
|
@@ -54,6 +54,21 @@
|
|
|
54
54
|
</v-combobox>
|
|
55
55
|
</v-col>
|
|
56
56
|
|
|
57
|
+
<!--
|
|
58
|
+
The `:key` remount exists for ONE case: an edit dialog opens with a
|
|
59
|
+
block/level/unit already stored, `withUnresolved` shows
|
|
60
|
+
"Loading unit..." until the list arrives, and Vuetify needs the
|
|
61
|
+
remount to swap in the real name. `&& vehicle.<field>` limits it to
|
|
62
|
+
exactly that case.
|
|
63
|
+
|
|
64
|
+
Without the guard it also fired on an EMPTY field: pick a Block, the
|
|
65
|
+
level list refetches, `levelListDataPending` flips, the key changes,
|
|
66
|
+
and Vue destroys and recreates the Level autocomplete underneath the
|
|
67
|
+
person using it - discarding whatever they had typed to filter it and
|
|
68
|
+
taking the open menu with it. That is the "eats keystrokes" half of
|
|
69
|
+
the Season Pass dialog report. An empty field has nothing unresolved
|
|
70
|
+
to redraw, so it has nothing to gain from the remount.
|
|
71
|
+
-->
|
|
57
72
|
<v-col v-if="shouldShowField('block')" cols="12">
|
|
58
73
|
<InputLabel class="text-capitalize" title="Block" required />
|
|
59
74
|
<v-autocomplete
|
|
@@ -61,7 +76,9 @@
|
|
|
61
76
|
:items="blockItems"
|
|
62
77
|
autocomplete="off"
|
|
63
78
|
:key="
|
|
64
|
-
blockListDataPending
|
|
79
|
+
blockListDataPending && vehicle.block
|
|
80
|
+
? 'block-list-pending'
|
|
81
|
+
: 'block-list-ready'
|
|
65
82
|
"
|
|
66
83
|
:loading="blockListDataPending"
|
|
67
84
|
item-value="value"
|
|
@@ -79,7 +96,9 @@
|
|
|
79
96
|
:items="levelItems"
|
|
80
97
|
autocomplete="off"
|
|
81
98
|
:key="
|
|
82
|
-
levelListDataPending
|
|
99
|
+
levelListDataPending && vehicle.level
|
|
100
|
+
? 'level-list-pending'
|
|
101
|
+
: 'level-list-ready'
|
|
83
102
|
"
|
|
84
103
|
:loading="levelListDataPending"
|
|
85
104
|
density="comfortable"
|
|
@@ -96,7 +115,9 @@
|
|
|
96
115
|
:items="unitItems"
|
|
97
116
|
autocomplete="off"
|
|
98
117
|
:key="
|
|
99
|
-
unitListDataPending
|
|
118
|
+
unitListDataPending && vehicle.unit
|
|
119
|
+
? 'unit-list-pending'
|
|
120
|
+
: 'unit-list-ready'
|
|
100
121
|
"
|
|
101
122
|
:loading="unitListDataPending"
|
|
102
123
|
density="comfortable"
|
|
@@ -881,10 +902,18 @@ async function submit() {
|
|
|
881
902
|
|
|
882
903
|
processing.value = true;
|
|
883
904
|
try {
|
|
905
|
+
// Whitespace only. This used to be
|
|
906
|
+
// `charAt(0).toUpperCase() + slice(1).toLowerCase()`, which re-cased the
|
|
907
|
+
// WHOLE string: picking "Resident Season Pass" from the list saved
|
|
908
|
+
// "Resident season pass", and "VIP/Preferred Parking Pass" saved
|
|
909
|
+
// "Vip/preferred parking pass". Because the combobox adds any value it does
|
|
910
|
+
// not recognise as a new custom type, the re-cased copy came back as a
|
|
911
|
+
// SECOND entry in the list next to the original - which is how the Season
|
|
912
|
+
// Pass Type chooser stacked up near-duplicate options. The value the person
|
|
913
|
+
// picked is the value that is stored.
|
|
884
914
|
const SPTVal = vehicle?.seasonPassType as string;
|
|
885
915
|
if (SPTVal) {
|
|
886
|
-
vehicle.seasonPassType =
|
|
887
|
-
SPTVal?.charAt(0)?.toUpperCase() + SPTVal?.slice(1)?.toLowerCase();
|
|
916
|
+
vehicle.seasonPassType = SPTVal.trim();
|
|
888
917
|
}
|
|
889
918
|
|
|
890
919
|
const {
|
|
@@ -2034,15 +2034,27 @@ const selectedVisitorObject = computed<Record<string, any>>(() => {
|
|
|
2034
2034
|
];
|
|
2035
2035
|
includedKeys.unshift(...(typeFieldMap[type] ?? []));
|
|
2036
2036
|
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2037
|
+
/**
|
|
2038
|
+
* V-07: THE DETAIL DIALOG PRINTED `undefined / undefined / 12-34`.
|
|
2039
|
+
*
|
|
2040
|
+
* The guard was an OR over the three parts, but the string interpolated all
|
|
2041
|
+
* THREE unconditionally - so a visitor recorded against a unit with no block
|
|
2042
|
+
* and no level (every walk-in registered from the unit number alone) got the
|
|
2043
|
+
* word `undefined` twice, joined by the separators, in front of a perfectly
|
|
2044
|
+
* good unit. The `else if (block)` branch below it could never run: the OR
|
|
2045
|
+
* above had already matched on the same block.
|
|
2046
|
+
*
|
|
2047
|
+
* Only the parts that EXIST are joined now, which is the same rule
|
|
2048
|
+
* `useSecurityUtils().formatLocation` already applies everywhere else, so a
|
|
2049
|
+
* full location still reads `Block A / Level 12 / 12-34` exactly as before
|
|
2050
|
+
* and a partial one reads `12-34` instead of two undefineds.
|
|
2051
|
+
*/
|
|
2052
|
+
const locationParts = [obj?.block?.name, obj?.level?.name, obj?.unitName]
|
|
2053
|
+
.filter((part) => part !== null && part !== undefined && part !== "");
|
|
2054
|
+
|
|
2055
|
+
const locationString = locationParts.length
|
|
2056
|
+
? locationParts.join(" / ")
|
|
2057
|
+
: "N/A";
|
|
2046
2058
|
|
|
2047
2059
|
return {
|
|
2048
2060
|
...Object.fromEntries(
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@7365admin1/layer-common",
|
|
3
3
|
"license": "MIT",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"version": "4.2.9-staging.
|
|
5
|
+
"version": "4.2.9-staging.279",
|
|
6
6
|
"author": "7365admin1",
|
|
7
7
|
"main": "./nuxt.config.ts",
|
|
8
8
|
"//files": "What a consumer extending this layer actually loads. Without this npm ships the whole working tree - the changesets, the CI workflows, the render harness in tools/ and any scratch directory that happened to exist at publish time. Nuxt resolves a layer by directory, so every runtime directory below has to stay listed; adding a new top-level runtime directory means adding it here too.",
|