@7365admin1/layer-common 4.2.9-staging.278 → 4.2.9

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,22 @@
1
1
  # @iservice365/layer-common
2
2
 
3
+ ## 4.2.9
4
+
5
+ ### Patch Changes
6
+
7
+ - 6047354: Visitor Management preview dialog: gate Check In on the guest's status, and rebuild the field list on the type scale.
8
+
9
+ - Check In is disabled while a guest's registration is still `pending`. The Guests row has withheld its own Checkin button for pending and rejected registrations since DV-0080, but the preview opened from that same row still offered Check In, so a guest could be checked in before anyone approved or rejected them.
10
+ - The Guests status is now shown as a `StatusChip`, which is what tells the reader why Check In is unavailable. Gated on the same `activeTab === 'guests' && status` the row's status column uses, so no other tab's preview gains a field.
11
+ - The fields were `<strong>Label:</strong> value` in a gapless `v-row` - a browser-default bold label beside an unstyled value, no token on either, rows flush against each other. The label still sits beside its value, but on `AccessCardDetailsDialog`'s type - `--fs-breadcrumb`/`--text2` for the label, `--fs-cell`/`--fw-cell`/`--text` for the value - in a fixed 116px label column so every value starts on one edge, with a `--border` hairline per row.
12
+ - Fixed: "Entry Image" and "Exit Image" printed as bare labels over an `AttachmentsViewer` holding `[undefined]` for every visitor without ANPR snapshots. They now render only when that snapshot exists.
13
+ - Fixed: both snapshot fields read `snapshotEntryImage`, so a visitor with both was shown the entry photo twice, the second time labelled "Exit Image".
14
+
15
+ - c427a40: Season Pass dialog (`VehicleForm`): stop the Block/Level/Unit autocompletes from being destroyed mid-typing, and stop the Season Pass Type from being re-cased on save.
16
+
17
+ - The Block, Level and Unit autocompletes were `:key`'d to their loading flag alone, so every time a list resolved Vue destroyed and recreated the field — including while someone was typing into it, discarding the filter text and closing the open menu. The remount now also requires the field to already hold a value, which is the only case it was added for (an edit dialog showing "Loading unit..." until the real name arrives).
18
+ - `submit()` applied `charAt(0).toUpperCase() + slice(1).toLowerCase()` to the whole Season Pass Type, so "Resident Season Pass" was stored as "Resident season pass". The combobox does not recognise the re-cased string, registers it as a new custom type, and the chooser fills up with near-duplicate options. The value is now stored as picked, trimmed only.
19
+
3
20
  ## 4.2.8
4
21
 
5
22
  ### Patch Changes
@@ -527,11 +544,11 @@
527
544
  `utils/console-tier.ts` + `composables/useConsoleTier.ts` mirror the server's
528
545
  own rule from two endpoints the console already calls, unprojected:
529
546
 
530
- GET /api/members/user/:user/app/admin the Seven365 staff membership
531
- GET /api/roles/id/:role that membership's role document
547
+ GET /api/members/user/:user/app/admin the Seven365 staff membership
548
+ GET /api/roles/id/:role that membership's role document
532
549
 
533
- owner = member.type === "admin" && role.type === "admin" && role.default === true
534
- staff = member.type === "admin" && role.type === "admin"
550
+ owner = member.type === "admin" && role.type === "admin" && role.default === true
551
+ staff = member.type === "admin" && role.type === "admin"
535
552
 
536
553
  `role.default` is the marker because it is the only property of a platform
537
554
  staff role no API caller can set - `role.controller.ts` validates create and
@@ -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",
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.",