@7365admin1/layer-common 4.8.1-staging.304 → 4.8.1

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
  # @iservice365/layer-common
2
2
 
3
+ ## 4.8.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 6821cfb: Update Version to 4.8.1
8
+
3
9
  ## 4.8.0
4
10
 
5
11
  ### Minor Changes
@@ -1000,11 +1006,11 @@
1000
1006
  `utils/console-tier.ts` + `composables/useConsoleTier.ts` mirror the server's
1001
1007
  own rule from two endpoints the console already calls, unprojected:
1002
1008
 
1003
- GET /api/members/user/:user/app/admin the Seven365 staff membership
1004
- GET /api/roles/id/:role that membership's role document
1009
+ GET /api/members/user/:user/app/admin the Seven365 staff membership
1010
+ GET /api/roles/id/:role that membership's role document
1005
1011
 
1006
- owner = member.type === "admin" && role.type === "admin" && role.default === true
1007
- staff = member.type === "admin" && role.type === "admin"
1012
+ owner = member.type === "admin" && role.type === "admin" && role.default === true
1013
+ staff = member.type === "admin" && role.type === "admin"
1008
1014
 
1009
1015
  `role.default` is the marker because it is the only property of a platform
1010
1016
  staff role no API caller can set - `role.controller.ts` validates create and
@@ -32,18 +32,28 @@
32
32
  </v-col>
33
33
 
34
34
  <v-col cols="12" class="mt-5">
35
- <!-- The pass used to print five QRs - four 80px copies at the
36
- corners around a 130px centre one - so a strip could be cut
37
- apart. It now carries a single large QR, matching what
38
- `createReceiptLayout` sends to the thermal printer. -->
39
- <img
40
- v-if="qrLarge"
41
- :src="qrLarge"
42
- width="260"
43
- height="260"
44
- class="qr-preview__code my-2"
45
- alt="Entry pass QR code"
46
- />
35
+ <!-- UPPER QR -->
36
+ <v-row no-gutters>
37
+ <v-col cols="6">
38
+ <img v-if="qrSmall" :src="qrSmall" width="80" height="80" />
39
+ </v-col>
40
+ <v-col cols="6">
41
+ <img v-if="qrSmall" :src="qrSmall" width="80" height="80" />
42
+ </v-col>
43
+ </v-row>
44
+
45
+ <!-- CENTER QR -->
46
+ <img v-if="qrLarge" :src="qrLarge" width="130" height="130" class="my-2" />
47
+
48
+ <!-- LOWER QR -->
49
+ <v-row no-gutters>
50
+ <v-col cols="6">
51
+ <img v-if="qrSmall" :src="qrSmall" width="80" height="80" />
52
+ </v-col>
53
+ <v-col cols="6">
54
+ <img v-if="qrSmall" :src="qrSmall" width="80" height="80" />
55
+ </v-col>
56
+ </v-row>
47
57
  </v-col>
48
58
 
49
59
  <v-col cols="12" class="mt-5">
@@ -80,11 +90,12 @@ defineProps({
80
90
 
81
91
  const emit = defineEmits(["update:modelValue"]);
82
92
 
93
+ const qrSmall = ref<string>("");
83
94
  const qrLarge = ref<string>("");
84
95
 
85
96
  onMounted(async () => {
86
- // Rendered at the size it is displayed at, so the modules stay crisp.
87
- qrLarge.value = await QRCode.toDataURL("123123", { width: 260, margin: 1 });
97
+ qrSmall.value = await QRCode.toDataURL("123123", { width: 80, margin: 1 });
98
+ qrLarge.value = await QRCode.toDataURL("123123", { width: 130, margin: 1 });
88
99
  });
89
100
 
90
101
  const now = new Date();
@@ -101,11 +112,4 @@ const timeStr = now.toLocaleTimeString();
101
112
  font-weight: var(--fw-card-title);
102
113
  color: var(--text);
103
114
  }
104
-
105
- /* The dialog is 550px wide but narrows on small screens, so the QR is capped
106
- at its own width rather than a fixed 260px that would overflow the card. */
107
- .qr-preview__code {
108
- max-width: 100%;
109
- height: auto;
110
- }
111
115
  </style>
@@ -482,55 +482,6 @@
482
482
  </draggable>
483
483
  </section>
484
484
 
485
- <!-- RESIDENT CHECKLISTS -->
486
- <v-col cols="12" class="mt-4 border-t">
487
- <v-row align="center" no-gutters class="pt-5">
488
- <v-col cols="9" class="d-flex align-center text-body-2">
489
- <v-row no-gutters>
490
- <v-col cols="12" class="header-style">
491
- Resident Checklists
492
- </v-col>
493
- <v-col cols="12" class="text-body-2 text-medium-emphasis">
494
- Allow residents to view and complete assigned checklists. Each
495
- checklist requires a photo upload before submission.
496
- </v-col>
497
- </v-row>
498
- </v-col>
499
- <v-col cols="3" class="d-flex align-center justify-end">
500
- <v-switch
501
- v-model="facility.isResidentChecklistEnabled"
502
- class="d-flex align-center"
503
- color="accent"
504
- hide-details
505
- @update:model-value="onToggleResidentChecklist"
506
- />
507
- </v-col>
508
- </v-row>
509
-
510
- <!-- SECURITY CHECKLISTS -->
511
- <v-row align="center" no-gutters class="border-t pt-5 mt-5">
512
- <v-col cols="9" class="d-flex align-center text-body-2">
513
- <v-row no-gutters>
514
- <v-col cols="12" class="header-style">
515
- Security Checklists
516
- </v-col>
517
- <v-col cols="12" class="text-body-2 text-medium-emphasis">
518
- Allow Security to view and complete assigned checklists
519
- </v-col>
520
- </v-row>
521
- </v-col>
522
- <v-col cols="3" class="d-flex align-center justify-end">
523
- <v-switch
524
- v-model="facility.isSecurityChecklistEnabled"
525
- class="d-flex align-center"
526
- color="accent"
527
- hide-details
528
- @update:model-value="onToggleSecurityChecklist"
529
- />
530
- </v-col>
531
- </v-row>
532
- </v-col>
533
-
534
485
  <v-col cols="12" class="mt-10">
535
486
  <p class="header-style font-weight-bold mb-5 mt-md-0 ml-md-4">
536
487
  Other Settings
@@ -1069,20 +1020,6 @@ watchEffect(() => {
1069
1020
  }
1070
1021
  });
1071
1022
 
1072
- /**
1073
- * One checklist, one owner, and always one. A facility is completed either by
1074
- * its residents or by Security, so the two switches are each other's inverse:
1075
- * turning either off turns the other on. There is no state where a facility
1076
- * has no checklist owner.
1077
- */
1078
- function onToggleResidentChecklist(enabled: boolean | null) {
1079
- facility.value.isSecurityChecklistEnabled = !enabled;
1080
- }
1081
-
1082
- function onToggleSecurityChecklist(enabled: boolean | null) {
1083
- facility.value.isResidentChecklistEnabled = !enabled;
1084
- }
1085
-
1086
1023
  function onToggleBookingUnitLimit(val: any) {
1087
1024
  if (val) {
1088
1025
  isBookingUnitLimitEnabled.value = true;
@@ -132,18 +132,15 @@
132
132
  </template>
133
133
 
134
134
  <template #[`item.contactStatus`]="{ item }">
135
- <span class="contact-status-cell">
136
- <StatusChip :status="getContactReaderStatus(item)" />
137
- <v-btn
138
- icon="mdi-refresh"
139
- size="x-small"
140
- variant="text"
141
- class="contact-status-refresh"
142
- aria-label="Check reader SIP status"
143
- :loading="testingContactReaderId === item.readerId"
144
- @click="testContactSipStatus(item)"
145
- />
146
- </span>
135
+ <v-btn
136
+ size="small"
137
+ variant="outlined"
138
+ class="text-none"
139
+ :loading="testingContactReaderId === item.readerId"
140
+ @click="testContactSipStatus(item)"
141
+ >
142
+ {{ getContactReaderStatus(item) }}
143
+ </v-btn>
147
144
  </template>
148
145
 
149
146
  <template #[`item.action-table`]="{ item }">
@@ -151,26 +148,24 @@
151
148
  <template #activator="{ props: menuProps }">
152
149
  <AppButton v-bind="menuProps" variant="row" icon="mdi-dots-vertical" />
153
150
  </template>
154
- <v-list v-if="activeTab === 'intercom'" density="compact" class="screen-menu">
155
- <v-list-item class="screen-menu__item" title="View" prepend-icon="mdi-eye" @click="openViewDialog(item)" />
151
+ <v-list v-if="activeTab === 'intercom'" density="compact" class="row-menu">
152
+ <v-list-item title="View" @click="openViewDialog(item)" />
156
153
  <v-list-item
157
- class="screen-menu__item"
158
154
  title="Test Connection with SIP"
159
- prepend-icon="mdi-lan-check"
160
155
  :disabled="testingSipReaderId === item.reader._id"
161
156
  @click="testSipConnection(item)"
162
157
  />
163
- <v-list-item class="screen-menu__item" title="Call Settings" prepend-icon="mdi-cog" @click="openCallDialog(item)" />
164
- <v-list-item class="screen-menu__item" title="Dial Code" prepend-icon="mdi-dialpad" @click="openDialCodeDialog(item)" />
165
- <v-list-item class="screen-menu__item" title="Make a call" prepend-icon="mdi-phone" @click="openMakeCallDialog(item)" />
166
- <v-list-item class="screen-menu__item" title="Web call" prepend-icon="mdi-headset" @click="openWebPhoneDialog(item)" />
158
+ <v-list-item title="Call Settings" @click="openCallDialog(item)" />
159
+ <v-list-item title="Dial Code" @click="openDialCodeDialog(item)" />
160
+ <v-list-item title="Make a call" @click="openMakeCallDialog(item)" />
161
+ <v-list-item title="Web call" @click="openWebPhoneDialog(item)" />
167
162
  </v-list>
168
- <v-list v-else density="compact" class="screen-menu">
169
- <v-list-item class="screen-menu__item" title="Call" prepend-icon="mdi-phone" @click="openContactCall(item)" />
170
- <v-list-item class="screen-menu__item" title="Check reader SIP status" prepend-icon="mdi-lan-check" @click="testContactSipStatus(item)" />
171
- <v-list-item class="screen-menu__item" title="View" prepend-icon="mdi-eye" @click="openContactView(item)" />
172
- <v-list-item class="screen-menu__item" title="Edit" prepend-icon="mdi-pencil" @click="openContactDialog(item)" />
173
- <v-list-item class="screen-menu__item screen-menu__item--danger" title="Delete" prepend-icon="mdi-delete-outline" @click="openDeleteContact(item)" />
163
+ <v-list v-else density="compact" class="row-menu">
164
+ <v-list-item title="Call" prepend-icon="mdi-phone" @click="openContactCall(item)" />
165
+ <v-list-item title="Check reader SIP status" prepend-icon="mdi-lan-check" @click="testContactSipStatus(item)" />
166
+ <v-list-item title="View" @click="openContactView(item)" />
167
+ <v-list-item title="Edit" @click="openContactDialog(item)" />
168
+ <v-list-item title="Delete" @click="openDeleteContact(item)" />
174
169
  </v-list>
175
170
  </v-menu>
176
171
  </template>
@@ -579,7 +574,7 @@
579
574
  </v-dialog>
580
575
 
581
576
  <v-dialog v-model="contactDialog" max-width="360" persistent>
582
- <v-card class="form-dialog contact-dialog" rounded="lg">
577
+ <v-card class="form-dialog" rounded="lg">
583
578
  <v-card-title class="dialog-title">{{ contactForm.id ? 'Edit Contact' : 'Add Contact' }}</v-card-title>
584
579
  <v-card-text class="dialog-body">
585
580
  <FieldLabel text="HID Reader" required />
@@ -589,10 +584,9 @@
589
584
  :disabled="Boolean(contactForm.id)"
590
585
  />
591
586
  <FieldLabel text="Name" required />
592
- <AppField v-model="contactForm.name" placeholder="Name shown on calls" class="my-3" />
593
- <FieldLabel text="Address" required />
594
- <AppField v-model="contactForm.serverAddress" :placeholder="contactAddressPlaceholder" />
595
- <p class="field-hint">{{ contactAddressHint }}</p>
587
+ <AppField v-model="contactForm.name" placeholder="Enter name" />
588
+ <FieldLabel text="SIP Number / Address" required />
589
+ <AppField v-model="contactForm.serverAddress" placeholder="7100 or user@example.com" />
596
590
  </v-card-text>
597
591
  <v-card-actions class="dialog-actions pa-0">
598
592
  <v-btn class="text-none action-cancel" variant="flat" height="44" @click="contactDialog = false">Cancel</v-btn>
@@ -732,7 +726,6 @@ const {
732
726
  makeIntercomCall,
733
727
  finalizeIntercomCall,
734
728
  ensureSipAccount,
735
- notifyIntercomCall,
736
729
  } = useHidAmico();
737
730
 
738
731
  const activeTab = ref<IntercomTab>("intercom");
@@ -965,26 +958,6 @@ const webPhoneButtonClass = computed(() => ({
965
958
  "has-incoming-call": webPhone.callState.value === "incoming",
966
959
  }));
967
960
  const isPeerToPeerMode = computed(() => sipForm.operatingMode === "peer-to-peer");
968
-
969
- /**
970
- * The user guide (6.3 Intercom contacts) gives a contact ONE address field
971
- * whose meaning follows the reader's operating mode: an extension number in
972
- * SIP Client mode, a local IP address in Peer-to-Peer mode. The reader chosen
973
- * in the contact dialog decides which one the field asks for.
974
- */
975
- const contactReaderRow = computed(() =>
976
- intercomRows.value.find((row) => row.reader._id === contactForm.readerId)
977
- );
978
- const isContactReaderPeerToPeer = computed(() => contactReaderRow.value?.operatingMode === "Peer-to-Peer");
979
- const contactAddressPlaceholder = computed(() => (isContactReaderPeerToPeer.value ? "192.168.0.129" : "7100"));
980
- const contactAddressHint = computed(() => {
981
- if (!contactReaderRow.value) {
982
- return "Extension number (SIP Client) or local IP address (Peer-to-Peer), depending on the reader's operating mode.";
983
- }
984
- return isContactReaderPeerToPeer.value
985
- ? "Peer-to-Peer mode: enter the contact's local IP address."
986
- : "SIP Client mode: enter the contact's extension number.";
987
- });
988
961
  const areSipCredentialFieldsDisabled = computed(() => !sipForm.enabled || isPeerToPeerMode.value);
989
962
  const intercomDetailSections = computed(() => {
990
963
  const row = selectedRow.value;
@@ -1443,10 +1416,8 @@ async function disconnectWebPhone() {
1443
1416
 
1444
1417
  async function startWebCall() {
1445
1418
  webPhoneActionLoading.value = true;
1446
- const destination = webPhoneForm.destination;
1447
1419
  try {
1448
- await webPhone.call(destination);
1449
- void ringResidentPhone(destination);
1420
+ await webPhone.call(webPhoneForm.destination);
1450
1421
  } catch (error: unknown) {
1451
1422
  showMessage(getErrorMessage(error), "error");
1452
1423
  } finally {
@@ -1454,50 +1425,6 @@ async function startWebCall() {
1454
1425
  }
1455
1426
  }
1456
1427
 
1457
- /**
1458
- * Wake the called resident's mobile so they are there to answer.
1459
- *
1460
- * Deliberately fired AFTER the INVITE and never awaited. The SIP leg is the
1461
- * call: it is already ringing by the time this runs, and a resident whose
1462
- * phone is asleep is the only thing this fixes. So a failure here is logged
1463
- * and dropped rather than shown — telling the operator "call failed" for a
1464
- * call that is ringing would be worse than a silent miss.
1465
- *
1466
- * A destination with no resident behind it (a staff extension, an external SIP
1467
- * address) comes back `notified: false` with a reason and is not an error.
1468
- */
1469
- async function ringResidentPhone(destination: string) {
1470
- if (!props.org || !props.site) return;
1471
-
1472
- try {
1473
- // No `readerId`: this call came from the web phone, not a door station.
1474
- // The reader selected in the table above is whatever the operator happens
1475
- // to be looking at, and sending it would tell the resident's app the call
1476
- // arrived at a door it never touched.
1477
- await notifyIntercomCall(props.site, {
1478
- orgId: props.org,
1479
- destination,
1480
- callId: createCallId(),
1481
- });
1482
- } catch (error: unknown) {
1483
- console.warn("[intercom] could not send the incoming-call push", error);
1484
- }
1485
- }
1486
-
1487
- /**
1488
- * A per-call id, so a second push for the same call replaces the first on the
1489
- * resident's lock screen rather than stacking a second ringing card.
1490
- * `randomUUID` needs a secure context, which the web phone already requires —
1491
- * getUserMedia does not run without one — but the fallback keeps a call from
1492
- * failing on that account alone.
1493
- */
1494
- function createCallId() {
1495
- if (typeof crypto !== "undefined" && typeof crypto.randomUUID === "function") {
1496
- return crypto.randomUUID();
1497
- }
1498
- return `call-${Date.now()}-${Math.random().toString(16).slice(2)}`;
1499
- }
1500
-
1501
1428
  async function answerWebCall() {
1502
1429
  webPhoneActionLoading.value = true;
1503
1430
  try {
@@ -1539,14 +1466,7 @@ function toggleWebMute() {
1539
1466
  }
1540
1467
  }
1541
1468
 
1542
- function hasReaderContactId(contact: ContactRow) {
1543
- if (contact.id !== undefined) return true;
1544
- showMessage("This contact has no identifier on the HID reader. Refresh the list and try again.", "error");
1545
- return false;
1546
- }
1547
-
1548
1469
  function openContactDialog(contact?: ContactRow) {
1549
- if (contact && !hasReaderContactId(contact)) return;
1550
1470
  selectedContact.value = contact || null;
1551
1471
  contactForm.id = contact?.id;
1552
1472
  contactForm.readerId = contact?.readerId || selectedReaderId.value || readers.value[0]?._id || "";
@@ -1596,20 +1516,10 @@ function openContactCall(contact: ContactRow) {
1596
1516
  }
1597
1517
 
1598
1518
  function openDeleteContact(contact: ContactRow) {
1599
- if (!hasReaderContactId(contact)) return;
1600
1519
  selectedContact.value = contact;
1601
1520
  deleteContactDialog.value = true;
1602
1521
  }
1603
1522
 
1604
- /**
1605
- * modify_objects and destroy_objects answer { changes: n } (API guide, Modify
1606
- * Objects / Delete Objects). Zero means the where clause matched nothing on the
1607
- * reader - typically a contact already removed from the touchscreen.
1608
- */
1609
- function readChanges(response: unknown) {
1610
- return toNumber(toRecord(toRecord(response).data ?? response).changes, Number.NaN);
1611
- }
1612
-
1613
1523
  async function saveSipSettings() {
1614
1524
  if (!selectedRow.value) return;
1615
1525
  const isPeerToPeer = sipForm.operatingMode === "peer-to-peer";
@@ -1710,17 +1620,6 @@ function isSipCallTarget(value = "") {
1710
1620
  return /^(?:sip:)?[A-Za-z0-9_.+-]+(?:@[A-Za-z0-9.-]+(?::\d{1,5})?)?$/.test(value.trim());
1711
1621
  }
1712
1622
 
1713
- function isIpv4Address(value = "") {
1714
- const [host, port, ...rest] = value.trim().split(":");
1715
- if (rest.length || (port !== undefined && !/^\d{1,5}$/.test(port))) return false;
1716
- const octets = host.split(".");
1717
- return octets.length === 4 && octets.every((octet) => /^\d{1,3}$/.test(octet) && Number(octet) <= 255);
1718
- }
1719
-
1720
- function isContactAddress(value: string, peerToPeer: boolean) {
1721
- return peerToPeer ? isIpv4Address(value) : isSipCallTarget(value);
1722
- }
1723
-
1724
1623
  async function runHangupCall() {
1725
1624
  if (!selectedRow.value) return;
1726
1625
  hangingUp.value = true;
@@ -1809,20 +1708,15 @@ async function saveContact() {
1809
1708
  return;
1810
1709
  }
1811
1710
 
1812
- if (!isContactAddress(contactForm.serverAddress, isContactReaderPeerToPeer.value)) {
1813
- showMessage(
1814
- isContactReaderPeerToPeer.value
1815
- ? "Enter the contact's local IPv4 address for a Peer-to-Peer reader."
1816
- : "Enter a valid extension number or SIP address.",
1817
- "warning",
1818
- );
1711
+ if (!isSipCallTarget(contactForm.serverAddress)) {
1712
+ showMessage("Enter a valid extension, SIP address, or IPv4 address.", "warning");
1819
1713
  return;
1820
1714
  }
1821
1715
 
1822
1716
  contactsSaving.value = true;
1823
1717
  try {
1824
- if (contactForm.id !== undefined) {
1825
- const response = await runObjectOperation(contactForm.readerId, {
1718
+ if (contactForm.id) {
1719
+ await runObjectOperation(contactForm.readerId, {
1826
1720
  operation: "modify",
1827
1721
  object: "contacts",
1828
1722
  values: {
@@ -1831,14 +1725,8 @@ async function saveContact() {
1831
1725
  },
1832
1726
  where: { contacts: { id: contactForm.id } },
1833
1727
  });
1834
- if (readChanges(response) === 0) {
1835
- contactDialog.value = false;
1836
- await loadContacts();
1837
- showMessage("The HID reader no longer has this contact. The list has been refreshed.", "warning");
1838
- return;
1839
- }
1840
1728
  } else {
1841
- const response = await runObjectOperation(contactForm.readerId, {
1729
+ await runObjectOperation(contactForm.readerId, {
1842
1730
  operation: "create",
1843
1731
  object: "contacts",
1844
1732
  values: [{
@@ -1846,15 +1734,6 @@ async function saveContact() {
1846
1734
  number: contactForm.serverAddress.trim(),
1847
1735
  }],
1848
1736
  });
1849
- // create_objects answers { ids: [...] } with the id of each created
1850
- // object. No id means the reader accepted the request but created nothing.
1851
- const created = toRecord(response?.data ?? response).ids;
1852
- if (!Array.isArray(created) || created.length === 0) {
1853
- contactDialog.value = false;
1854
- await loadContacts();
1855
- showMessage("The HID reader did not confirm the new contact. Check the contact list.", "warning");
1856
- return;
1857
- }
1858
1737
  }
1859
1738
  contactDialog.value = false;
1860
1739
  await loadContacts();
@@ -1867,21 +1746,16 @@ async function saveContact() {
1867
1746
  }
1868
1747
 
1869
1748
  async function deleteContact() {
1870
- const contact = selectedContact.value;
1871
- if (!contact || !hasReaderContactId(contact)) return;
1749
+ if (!selectedContact.value?.id) return;
1872
1750
  contactsSaving.value = true;
1873
1751
  try {
1874
- const response = await runObjectOperation(contact.readerId, {
1752
+ await runObjectOperation(selectedContact.value.readerId, {
1875
1753
  operation: "destroy",
1876
1754
  object: "contacts",
1877
- where: { contacts: { id: contact.id } },
1755
+ where: { contacts: { id: selectedContact.value.id } },
1878
1756
  });
1879
1757
  deleteContactDialog.value = false;
1880
1758
  await loadContacts();
1881
- if (readChanges(response) === 0) {
1882
- showMessage("The HID reader had already removed this contact. The list has been refreshed.", "warning");
1883
- return;
1884
- }
1885
1759
  showMessage("Intercom contact deleted.", "success");
1886
1760
  } catch (error: unknown) {
1887
1761
  showMessage(getErrorMessage(error), "error");
@@ -2069,14 +1943,9 @@ export default {
2069
1943
 
2070
1944
 
2071
1945
 
2072
- .contact-status-cell {
2073
- display: inline-flex;
2074
- align-items: center;
2075
- gap: 4px;
2076
- }
2077
-
2078
- .contact-status-refresh {
2079
- color: var(--text2);
1946
+ .row-menu {
1947
+ min-width: 160px;
1948
+ border-radius: 6px;
2080
1949
  }
2081
1950
 
2082
1951
  .link-text {
@@ -2136,27 +2005,10 @@ export default {
2136
2005
  color: var(--err);
2137
2006
  }
2138
2007
 
2139
- .field-hint {
2140
- margin: 6px 0 0;
2141
- color: var(--text2);
2142
- font-size: 11px;
2143
- line-height: 1.4;
2144
- }
2145
-
2146
2008
  .sip-settings-dialog .field-label {
2147
2009
  margin-top: 14px;
2148
2010
  }
2149
2011
 
2150
- /* Room between the contact dialog's three inputs; the first label sits
2151
- against the body padding. */
2152
- .contact-dialog .field-label {
2153
- margin-top: 18px;
2154
- }
2155
-
2156
- .contact-dialog .field-label:first-child {
2157
- margin-top: 0;
2158
- }
2159
-
2160
2012
  .sip-label {
2161
2013
  margin: 12px 0 6px;
2162
2014
  color: var(--text);
@@ -2854,18 +2706,14 @@ export default {
2854
2706
  margin-top: 0;
2855
2707
  }
2856
2708
 
2857
- .detail-dialog .dialog-title {
2858
- font-size: var(--fs-card-title);
2859
- }
2860
-
2861
2709
  .detail-row {
2862
2710
  display: flex;
2863
2711
  align-items: center;
2864
2712
  justify-content: space-between;
2865
2713
  gap: 16px;
2866
- min-height: 32px;
2714
+ min-height: 26px;
2867
2715
  color: var(--muted);
2868
- font-size: var(--fs-cell);
2716
+ font-size: 11px;
2869
2717
  }
2870
2718
 
2871
2719
  .detail-row strong {
@@ -2877,11 +2725,13 @@ export default {
2877
2725
  .dialog-actions {
2878
2726
  display: grid;
2879
2727
  grid-template-columns: 1fr 1fr;
2880
- gap: 0;
2881
- min-height: 0;
2882
2728
  border-top: 1px solid var(--border);
2883
2729
  }
2884
2730
 
2731
+ .sip-settings-dialog .dialog-actions {
2732
+ min-height: 46px;
2733
+ }
2734
+
2885
2735
  /* The split footer bar, as panels 2, 4 and 5 keep it: the SHAPE is the
2886
2736
  screen's own (the handoff draws no such bar); only the colours change. The
2887
2737
  navy was a fixed hex that sat on the dark card unchanged. */
@@ -27,7 +27,7 @@
27
27
  v-model="search"
28
28
  search
29
29
  placeholder="Search Amico user, UID or registration"
30
- @keyup.enter="onSearchSubmit"
30
+ @keyup.enter="reloadFromFirstPage"
31
31
  />
32
32
  <AppSelect
33
33
  v-model="userType"
@@ -284,8 +284,6 @@ async function loadUsers() {
284
284
  return;
285
285
  }
286
286
 
287
- const sequence = loadUsersSequence.value + 1;
288
- loadUsersSequence.value = sequence;
289
287
  loading.value = true;
290
288
  try {
291
289
  let clientFiltersUserType = false;
@@ -321,7 +319,6 @@ async function loadUsers() {
321
319
  const pageItems = clientFiltersUserType
322
320
  ? matchingItems.slice(pageStart, pageStart + 10)
323
321
  : matchingItems;
324
- if (sequence !== loadUsersSequence.value) return;
325
322
  users.value = pageItems.map(toReaderUser);
326
323
  total.value = clientFiltersUserType
327
324
  ? matchingItems.length
@@ -333,15 +330,13 @@ async function loadUsers() {
333
330
  ? ""
334
331
  : toText(response.pageRange ?? data.pageRange);
335
332
  } catch (error: unknown) {
336
- if (sequence !== loadUsersSequence.value) return;
337
333
  users.value = [];
338
334
  total.value = 0;
339
335
  pages.value = 1;
340
336
  serverPageRange.value = "";
341
337
  showToast(getErrorMessage(error), "error");
342
338
  } finally {
343
- // Only the newest load owns the spinner.
344
- if (sequence === loadUsersSequence.value) loading.value = false;
339
+ loading.value = false;
345
340
  }
346
341
  }
347
342
 
@@ -355,31 +350,6 @@ function reloadFromFirstPage() {
355
350
  loadUsers();
356
351
  }
357
352
 
358
- /**
359
- * Typing is the search. It used to reload on `@keyup.enter` and on nothing
360
- * else, so unless you guessed Enter was required the screen sent no request at
361
- * all. Debounced, because each reload is a login/load/logout round trip to a
362
- * reader over a VPN; Enter still works and skips the wait.
363
- */
364
- const SEARCH_DEBOUNCE_MS = 400;
365
- let searchDebounce: ReturnType<typeof setTimeout> | undefined;
366
-
367
- function onSearchInput() {
368
- clearTimeout(searchDebounce);
369
- searchDebounce = setTimeout(reloadFromFirstPage, SEARCH_DEBOUNCE_MS);
370
- }
371
-
372
- function onSearchSubmit() {
373
- clearTimeout(searchDebounce);
374
- reloadFromFirstPage();
375
- }
376
-
377
- watch(search, onSearchInput);
378
- onBeforeUnmount(() => clearTimeout(searchDebounce));
379
-
380
- /** Discards a load whose answer arrives after a newer one started. */
381
- const loadUsersSequence = ref(0);
382
-
383
353
  function hasFacialData(user: HidReaderUser) {
384
354
  return user.metadata?.facialEnrolled === true || Boolean(toText(user.metadata?.facialData));
385
355
  }