@7365admin1/layer-common 4.2.9-staging.278 → 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 ? 'block-list-pending' : 'block-list-ready'
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 ? 'level-list-pending' : 'level-list-ready'
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 ? 'unit-list-pending' : 'unit-list-ready'
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 {
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.278",
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.",