@7365admin1/layer-common 4.97.1-staging.717 → 4.97.1-staging.719

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.
@@ -36,9 +36,12 @@
36
36
 
37
37
  <div v-if="enabled" class="hid-personal-qr__fields">
38
38
  <div class="hid-personal-qr__field">
39
+ <!-- The name sits ABOVE the box: AppField's in-box label never
40
+ shrinks (nowrap), so a long one leaves no room to type. -->
41
+ <label class="hid-personal-qr__name" for="hid-personal-qr-validity">Valid for</label>
39
42
  <AppField
43
+ id="hid-personal-qr-validity"
40
44
  v-model="validityInput"
41
- label="Valid for"
42
45
  type="number"
43
46
  min="5"
44
47
  max="240"
@@ -54,9 +57,10 @@
54
57
  </p>
55
58
  </div>
56
59
  <div class="hid-personal-qr__field">
60
+ <label class="hid-personal-qr__name" for="hid-personal-qr-max">New codes per person per hour</label>
57
61
  <AppField
62
+ id="hid-personal-qr-max"
58
63
  v-model="maxInput"
59
- label="New codes per person per hour"
60
64
  type="number"
61
65
  min="1"
62
66
  max="20"
@@ -216,6 +220,13 @@ async function save() {
216
220
  min-width: 0;
217
221
  }
218
222
 
223
+ .hid-personal-qr__name {
224
+ color: var(--text);
225
+ font-family: var(--font-sans);
226
+ font-size: 13px;
227
+ font-weight: 600;
228
+ }
229
+
219
230
  .hid-personal-qr__unit {
220
231
  padding-right: 10px;
221
232
  color: var(--muted);
@@ -714,7 +714,7 @@ const siteAccessUser = ref("");
714
714
  const siteAccessName = ref("");
715
715
  function openSiteAccess(item: Record<string, any>) {
716
716
  siteAccessUser.value = String(item.user ?? "");
717
- siteAccessName.value = String(item.name || item.email || "");
717
+ siteAccessName.value = memberPerson(item).name;
718
718
  siteAccessDialog.value = true;
719
719
  }
720
720
  function onSiteAccessSaved(msg: string) {
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.97.1-staging.717",
5
+ "version": "4.97.1-staging.719",
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.",
@@ -66,9 +66,17 @@ export function memberAccess(item: Record<string, any> | null | undefined, orgLe
66
66
  return { roles: text ? [text] : [], tone: chip?.tone ?? "info", scope, sites: [] };
67
67
  }
68
68
 
69
- /** Name on top, email underneath - the email only when it adds something. */
69
+ /**
70
+ * Name on top, email underneath - the email only when it adds something.
71
+ *
72
+ * The ACCOUNT's name (`userName`, from GET /api/members) first, then the
73
+ * membership's. A membership is often saved with the e-mail as its name (core
74
+ * `createMemberDirect`), while the account holds the name the person signed up
75
+ * with (DV-1857). Same order as the HID picker (`memberCandidateOf`).
76
+ */
70
77
  export function memberPerson(item: Record<string, any> | null | undefined): { name: string; email: string } {
71
- const name = typeof item?.name === "string" ? item.name.trim() : "";
78
+ const text = (value: unknown) => (typeof value === "string" ? value.trim() : "");
79
+ const name = text(item?.userName) || text(item?.name);
72
80
  const email = typeof item?.email === "string" ? item.email.trim() : "";
73
81
  if (!name) return { name: email, email: "" };
74
82
  return { name, email: email.toLowerCase() === name.toLowerCase() ? "" : email };