@7365admin1/layer-common 4.81.1-staging.468 → 4.82.0

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.
Files changed (46) hide show
  1. package/CHANGELOG.md +16 -4
  2. package/assets/css/primitives.css +0 -57
  3. package/components/AccessCardDetailsDialog.vue +4 -57
  4. package/components/AccessCardPreviewDialog.vue +50 -291
  5. package/components/AppSelect.vue +4 -143
  6. package/components/BuildingUnitFormEdit.vue +0 -6
  7. package/components/Dialog/UpdateMoreAction.vue +1 -11
  8. package/components/DocumentForm.vue +112 -407
  9. package/components/DocumentManagement.vue +12 -213
  10. package/components/Facility/BookingSetup.vue +0 -63
  11. package/components/HidAccessLogDashboard.vue +17 -74
  12. package/components/HidIntercomManagement.vue +14 -183
  13. package/components/HidQrCodeConfiguration.vue +195 -17
  14. package/components/HidReaderManagement.vue +0 -398
  15. package/components/HidReaderUserRoster.vue +3 -44
  16. package/components/HidUserEnrollment.vue +248 -1521
  17. package/components/InvitationClientForm.vue +1 -19
  18. package/components/VisitorForm.vue +0 -12
  19. package/components/VisitorManagement.vue +5 -267
  20. package/composables/useDocument.ts +0 -7
  21. package/composables/useFacility.ts +0 -11
  22. package/composables/useHidAmico.ts +0 -165
  23. package/composables/useHidNavigation.ts +1 -25
  24. package/composables/useMember.ts +0 -12
  25. package/composables/usePeople.ts +0 -19
  26. package/composables/useServiceProvider.ts +2 -40
  27. package/package.json +1 -1
  28. package/pages/[org]/[site]/access-mgmt/administrator/index.vue +1 -1
  29. package/pages/[org]/[site]/access-mgmt/hid-cards/index.vue +1 -1
  30. package/pages/[org]/[site]/access-mgmt/hid-readers/index.vue +1 -1
  31. package/types/document.d.ts +0 -14
  32. package/types/facility.d.ts +0 -4
  33. package/types/member.d.ts +0 -4
  34. package/types/people.d.ts +1 -28
  35. package/types/service-provider.d.ts +0 -5
  36. package/components/BuildingUnitManagement.vue +0 -298
  37. package/components/HidAccessPermissions.vue +0 -424
  38. package/components/HidProfileQrCode.vue +0 -332
  39. package/composables/useHidReaderSelection.ts +0 -50
  40. package/composables/useSiteCategory.ts +0 -45
  41. package/pages/[org]/[site]/access-mgmt/hid-qr-code/index.vue +0 -23
  42. package/utils/hid-enrolment-subject.ts +0 -144
  43. package/utils/hid-permission-assignments.ts +0 -190
  44. package/utils/hid-reader-selection.ts +0 -52
  45. package/utils/occupancy-role.ts +0 -109
  46. package/utils/service-type.ts +0 -30
@@ -388,27 +388,9 @@ watch(
388
388
  const roles = ref<any[]>([])
389
389
  const { getRoles } = useRole()
390
390
 
391
- /*
392
- * `type` is the ROLE type, not the service the client subscribes to, and the
393
- * only caller (`ClientMain.vue` "Invite Client") passes no `app` prop -- so
394
- * this sent `type: ""` and the endpoint applied no type filter at all. The
395
- * dropdown therefore listed every org-less role of every type, which includes
396
- * the platform's OWN staff roles (`type: "admin"` -- the two rows the console's
397
- * `/super-admin/role-permissions` screen edits). Offering a Seven365 console
398
- * staff role on a CLIENT invitation is the defect.
399
- *
400
- * A client admin's role is `type: "organization"`, which is what the client
401
- * roles screen (`org/[organization]/roles-permissions.vue`) already lists. This
402
- * narrows to exactly that. It is a narrowing of this one picker only: no role
403
- * changes, no permission changes, and the org-less `organization` roles that
404
- * were already being picked are all still offered.
405
- *
406
- * Keying off the selected service instead would empty the dropdown -- no
407
- * org-less role carries a service type -- so `props.app` is not the filter.
408
- */
409
391
  const { data: roleData, refresh: refreshRoles } = await useLazyAsyncData(
410
392
  "roles",
411
- () => getRoles({ org: org.value?._id, type: "organization", limit: 50 }),
393
+ () => getRoles({ org: org.value?._id, type: props.app, limit: 50 }),
412
394
  { watch: [() => props.app] }
413
395
  )
414
396
 
@@ -910,20 +910,8 @@ const hidQrReaderId = computed(() => (
910
910
  hidQrConfiguredReaderId.value || String(hidQrReader.value?._id || "")
911
911
  ));
912
912
 
913
- /*
914
- * Visitor QR passes are hidden at the manager's request (2026-09-23).
915
- *
916
- * A flag rather than a deletion: issuing, the preview dialog, printing and the
917
- * regenerate handler below are all intact and untouched, so bringing the
918
- * feature back is this one line. Every surface that offers a Visitor QR reads
919
- * `hidQrCodePassAllowed`, which is why the switch belongs here and not in each
920
- * of them.
921
- */
922
- const HID_VISITOR_QR_ENABLED = false;
923
-
924
913
  const hidQrCodePassAllowed = computed(() => {
925
914
  return (
926
- HID_VISITOR_QR_ENABLED &&
927
915
  hidQrCodePassEnabled.value &&
928
916
  ["guest", "contractor", "walk-in"].includes(prop.type)
929
917
  );
@@ -749,35 +749,11 @@
749
749
  class="visitor-preview__row"
750
750
  >
751
751
  <div class="visitor-preview__label">{{ label }}</div>
752
- <div>
753
- <!-- Was a hover tooltip on the value: the full NRIC only
754
- reachable by hovering, which says nothing is there to
755
- reach and cannot be reached at all on a touch screen.
756
- The eye alone, at the 14px the Incident Report screens
757
- draw it, is a 14px target - the floor is 24px. So the
758
- NUMBER is the control and the eye is its affordance:
759
- the whole masked value is pressable, which makes the
760
- target the width of the digits rather than of a glyph,
761
- and being a real `button` it also takes a tab stop,
762
- which a `v-icon` with a click handler never did. -->
763
- <button
764
- type="button"
765
- class="visitor-preview__reveal"
766
- :aria-label="showVisitorNric ? 'Hide NRIC' : 'Show NRIC'"
767
- :aria-pressed="showVisitorNric"
768
- @click="showVisitorNric = !showVisitorNric"
769
- >
770
- <span class="visitor-preview__value">
771
- {{
772
- showVisitorNric
773
- ? selectedVisitorObject[key]
774
- : maskNRIC(selectedVisitorObject[key])
775
- }}
776
- </span>
777
- <v-icon size="16" class="visitor-preview__eye">
778
- {{ showVisitorNric ? "mdi-eye-off-outline" : "mdi-eye-outline" }}
779
- </v-icon>
780
- </button>
752
+ <div
753
+ v-tooltip:top="selectedVisitorObject[key]"
754
+ class="visitor-preview__value"
755
+ >
756
+ {{ maskNRIC(selectedVisitorObject[key]) }}
781
757
  </div>
782
758
  </div>
783
759
 
@@ -827,84 +803,6 @@
827
803
  </div>
828
804
  </div>
829
805
 
830
- <!--
831
- THE CONTRACTOR'S PARTY.
832
-
833
- The list row has always said `( +2 members)` beside the name
834
- and then had nowhere to send you for the names themselves. The
835
- block spans both columns rather than sitting in the 116px
836
- value track: a member is a record, not a value, and several of
837
- them in a 250px column is unreadable.
838
-
839
- Read off `selectedVisitorDataObject` (the raw row) and not
840
- `selectedVisitorObject`, which filters itself down to
841
- `typeFieldMap` plus five fixed keys - `members` is on neither
842
- list, and widening that computed would change what four other
843
- dialogs on this screen see.
844
- -->
845
- <div
846
- v-else-if="key === 'members' && selectedVisitorMembers.length"
847
- class="visitor-preview__row visitor-preview__row--block"
848
- >
849
- <div class="visitor-preview__label">
850
- {{ label }} ({{ selectedVisitorMembers.length }})
851
- </div>
852
- <div class="visitor-preview__members">
853
- <div
854
- v-for="(member, index) in selectedVisitorMembers"
855
- :key="member?.nric || member?.name || index"
856
- class="visitor-preview__member"
857
- >
858
- <div class="visitor-preview__value">
859
- {{ member?.name || "N/A" }}
860
- </div>
861
- <template v-for="field in memberDetailFields" :key="field.key">
862
- <div
863
- v-if="member?.[field.key]"
864
- class="visitor-preview__member-line"
865
- >
866
- <span class="visitor-preview__member-key">
867
- {{ field.label }}
868
- </span>
869
- <!-- A member's NRIC is the same class of data as the
870
- visitor's, so it gets the same control. Each
871
- member reveals separately - one toggle for the
872
- whole card would show three people's NRICs to
873
- read one. -->
874
- <button
875
- v-if="field.key === 'nric'"
876
- type="button"
877
- class="visitor-preview__reveal"
878
- :aria-label="
879
- isMemberNricShown(index)
880
- ? `Hide NRIC for ${member?.name || 'this member'}`
881
- : `Show NRIC for ${member?.name || 'this member'}`
882
- "
883
- :aria-pressed="isMemberNricShown(index)"
884
- @click="toggleMemberNric(index)"
885
- >
886
- <span>
887
- {{
888
- isMemberNricShown(index)
889
- ? member.nric
890
- : maskNRIC(member.nric)
891
- }}
892
- </span>
893
- <v-icon size="16" class="visitor-preview__eye">
894
- {{
895
- isMemberNricShown(index)
896
- ? "mdi-eye-off-outline"
897
- : "mdi-eye-outline"
898
- }}
899
- </v-icon>
900
- </button>
901
- <span v-else>{{ member[field.key] }}</span>
902
- </div>
903
- </template>
904
- </div>
905
- </div>
906
- </div>
907
-
908
806
  <!-- The vehicle number, with Block on its right: the Registered
909
807
  tab only, for someone who may add vehicles. It opens the
910
808
  Vehicle Mgmt Block Listed form with the category taken from
@@ -2225,71 +2123,6 @@ const isSelectedVisitorPendingApproval = computed(
2225
2123
  () => selectedVisitorStatus.value === "pending"
2226
2124
  );
2227
2125
 
2228
- /**
2229
- * The members a contractor brought with them. Not gated on the Guests tab: the
2230
- * list row's own `( +N members)` count is not either, and a contractor with a
2231
- * party has one wherever the screen shows it.
2232
- *
2233
- * Blank entries are dropped rather than drawn as an empty card - the payload
2234
- * carries `""` for every detail nobody filled in, so a member with no name and
2235
- * no details would otherwise render as a bare inset box.
2236
- */
2237
- const selectedVisitorMembers = computed<Record<string, any>[]>(() => {
2238
- const members = selectedVisitorDataObject.value?.members;
2239
- if (!Array.isArray(members)) return [];
2240
-
2241
- return members.filter(
2242
- (member: Record<string, any>) =>
2243
- member?.name || member?.nric || member?.contact || member?.plateNumber
2244
- );
2245
- });
2246
-
2247
- /**
2248
- * WHICH NRICs ARE UNCOVERED RIGHT NOW.
2249
- *
2250
- * Per member and not per card, so revealing one person's number does not
2251
- * uncover the rest of the party's. Both are cleared when the dialog closes -
2252
- * a preview must not open on the next visitor with the last one's NRIC
2253
- * already showing, and it is the same `selectedVisitorId` that would carry it
2254
- * across if the same row were reopened.
2255
- */
2256
- const showVisitorNric = ref(false);
2257
- const shownMemberNrics = ref<number[]>([]);
2258
-
2259
- function isMemberNricShown(index: number) {
2260
- return shownMemberNrics.value.includes(index);
2261
- }
2262
-
2263
- function toggleMemberNric(index: number) {
2264
- shownMemberNrics.value = isMemberNricShown(index)
2265
- ? shownMemberNrics.value.filter((x) => x !== index)
2266
- : [...shownMemberNrics.value, index];
2267
- }
2268
-
2269
- watch(
2270
- () => dialog.viewVisitor,
2271
- (open) => {
2272
- if (open) return;
2273
- showVisitorNric.value = false;
2274
- shownMemberNrics.value = [];
2275
- }
2276
- );
2277
-
2278
- /**
2279
- * What a member row prints under the name, in order. `plateNumber` is in here
2280
- * because the API returns it on `members[]` even though neither
2281
- * `TMemberInfo` (this package) nor `TContractorMembers` (API-core's visitor
2282
- * model, name and nric only) declares it - the two types have drifted from the
2283
- * document and from each other. Reading the key defensively costs nothing and
2284
- * shows the vehicle a member actually arrived in; the types are somebody's to
2285
- * reconcile separately.
2286
- */
2287
- const memberDetailFields = [
2288
- { key: "nric", label: "NRIC" },
2289
- { key: "contact", label: "Contact" },
2290
- { key: "plateNumber", label: "Vehicle" },
2291
- ] as const;
2292
-
2293
2126
  const formatType = (item: any) =>
2294
2127
  (item.deliveryType ? item.deliveryType + "-" : "") + item.type;
2295
2128
 
@@ -2303,7 +2136,6 @@ const formattedFields = {
2303
2136
  level: "Level",
2304
2137
  unit: "Unit",
2305
2138
  purpose: "Purpose",
2306
- members: "Members",
2307
2139
  checkIn: "Check In",
2308
2140
  snapshotEntryImage: "Entry Image",
2309
2141
  checkOut: "Check Out",
@@ -3310,100 +3142,6 @@ watchEffect(async () => {
3310
3142
  word-break: break-word;
3311
3143
  }
3312
3144
 
3313
- /* A row whose value is a set of records rather than a value - it drops the
3314
- two-column grid and runs the full width of the card body. */
3315
- .visitor-preview__row--block {
3316
- display: block;
3317
- }
3318
-
3319
- .visitor-preview__members {
3320
- display: flex;
3321
- flex-direction: column;
3322
- gap: 8px;
3323
- margin-top: 8px;
3324
- }
3325
-
3326
- /*
3327
- * An added member reads as an inset on the card it sits in - `--hover` on
3328
- * `--border` at the inner radius. Those are `Card/MemberInfoSummary`'s three
3329
- * decisions, unchanged, so a member looks the same in the preview as it does
3330
- * in the form that created it. Only the TYPE differs: that card still prints
3331
- * `<strong>Label:</strong> value`, which is the pattern this dialog just moved
3332
- * off, so the lines below are set on the scale rather than inherited.
3333
- */
3334
- .visitor-preview__member {
3335
- padding: 9px 12px;
3336
- border: 1px solid var(--border);
3337
- border-radius: var(--r-inner);
3338
- background: var(--hover);
3339
- }
3340
-
3341
- .visitor-preview__member-line {
3342
- display: flex;
3343
- gap: 8px;
3344
- margin-top: 3px;
3345
- font-size: var(--fs-breadcrumb);
3346
- color: var(--text2);
3347
- word-break: break-word;
3348
- }
3349
-
3350
- .visitor-preview__member-key {
3351
- flex: 0 0 52px;
3352
- color: var(--muted);
3353
- }
3354
-
3355
- /*
3356
- * THE NRIC REVEAL.
3357
- *
3358
- * The pressable thing is the masked number, not the glyph beside it: an eye on
3359
- * its own is a 14-16px target where 24px is the floor, and on a 12.5px member
3360
- * line an `AppButton variant="icon"` - the layer's 32px icon square - would
3361
- * make the NRIC line half again the height of the Contact line under it.
3362
- * Pressing the digits gives a target the width of the value at no cost to the
3363
- * rhythm, and reads the right way round: the number is what changes.
3364
- *
3365
- * It inherits its type rather than setting any, so the visitor's NRIC stays on
3366
- * `--fs-cell` and a member's on the `--fs-breadcrumb` of the line it sits in.
3367
- * The negative margin pays back the padding, so a revealed value starts on the
3368
- * same left edge as every other value in the card.
3369
- */
3370
- .visitor-preview__reveal {
3371
- display: inline-flex;
3372
- align-items: center;
3373
- gap: 6px;
3374
- margin: -3px -7px;
3375
- padding: 3px 7px;
3376
- border: none;
3377
- border-radius: var(--r-inner-sm);
3378
- background: transparent;
3379
- font: inherit;
3380
- color: inherit;
3381
- text-align: left;
3382
- cursor: pointer;
3383
- transition: background var(--motion) ease;
3384
- }
3385
-
3386
- .visitor-preview__reveal:hover {
3387
- background: var(--hover);
3388
- }
3389
-
3390
- .visitor-preview__reveal:focus-visible {
3391
- outline: 2px solid var(--accent);
3392
- outline-offset: 1px;
3393
- }
3394
-
3395
- /* The design's interactive ink - not Vuetify's fixed blue, which is one colour
3396
- on both themes. `affectedEntities` gives its NRIC eye the same value. */
3397
- .visitor-preview__eye {
3398
- color: var(--accent-text);
3399
- }
3400
-
3401
- @media (prefers-reduced-motion: reduce) {
3402
- .visitor-preview__reveal {
3403
- transition: none;
3404
- }
3405
- }
3406
-
3407
3145
  /* The width the type filter carried as `max-width="200"` on the v-select. */
3408
3146
  .visitor-type-filter {
3409
3147
  max-width: 200px;
@@ -6,7 +6,6 @@ export default function useDocument() {
6
6
  type = "all",
7
7
  site = "",
8
8
  parentId = "",
9
- expiry = "all",
10
9
  }: {
11
10
  page?: number;
12
11
  search?: string;
@@ -14,11 +13,6 @@ export default function useDocument() {
14
13
  type?: string;
15
14
  site?: string;
16
15
  parentId?: string;
17
- /**
18
- * Which tab is asking: "active" for Documents, "expired" for
19
- * Document (Expired). Defaults to "all" so existing callers are unaffected.
20
- */
21
- expiry?: string;
22
16
  } = {}) {
23
17
  const query: Record<string, any> = {
24
18
  page,
@@ -27,7 +21,6 @@ export default function useDocument() {
27
21
  type,
28
22
  site,
29
23
  parentId,
30
- expiry,
31
24
  };
32
25
 
33
26
  return useNuxtApp().$api<Record<string, any>>(`/api/documents`, {
@@ -76,8 +76,6 @@ export default function usetFacility() {
76
76
  hourInterval?: number;
77
77
  isBookingFeeEnabled: boolean;
78
78
  isGuestEnabled: boolean;
79
- isResidentChecklistEnabled: boolean;
80
- isSecurityChecklistEnabled: boolean;
81
79
  bookingAmount: number | null;
82
80
  peakBookingFeeAmount?: number | null;
83
81
  bookingFeeGuestAmount?: number | null;
@@ -175,8 +173,6 @@ export default function usetFacility() {
175
173
  hourInterval = 1,
176
174
  isBookingFeeEnabled = false,
177
175
  isGuestEnabled = false,
178
- isResidentChecklistEnabled = false,
179
- isSecurityChecklistEnabled = false,
180
176
  bookingAmount = 0,
181
177
  peakBookingFeeAmount = 0,
182
178
  bookingFeeGuestAmount = 0,
@@ -240,13 +236,6 @@ export default function usetFacility() {
240
236
  this.hourInterval = hourInterval;
241
237
  this.isBookingFeeEnabled = isBookingFeeEnabled;
242
238
  this.isGuestEnabled = isGuestEnabled;
243
- // Exactly one owner, always. `isResidentChecklistEnabled` is the flag
244
- // the apps gate on, so it decides, and security is its complement —
245
- // stored rather than computed so each app can read its own flag without
246
- // knowing the rule. A facility predating both fields lands on security,
247
- // which is how every one of them already behaved.
248
- this.isResidentChecklistEnabled = isResidentChecklistEnabled === true;
249
- this.isSecurityChecklistEnabled = !this.isResidentChecklistEnabled;
250
239
  this.bookingAmount = bookingAmount;
251
240
  this.peakBookingFeeAmount = peakBookingFeeAmount;
252
241
  this.bookingFeeGuestAmount = bookingFeeGuestAmount;
@@ -28,22 +28,6 @@ export type HidReaderPayload = {
28
28
  lastCallbackType?: string;
29
29
  };
30
30
 
31
- export type HidProfileQr = {
32
- readerId: string;
33
- userId: string;
34
- memberId: string;
35
- hidUserId: string;
36
- registration: string;
37
- readerName: string;
38
- portalName: string;
39
- qrEnabled: boolean;
40
- issued: boolean;
41
- qrValue: string;
42
- issuedAt: string;
43
- /** null when the permission lookup itself failed, so "unknown" stays distinct from "no". */
44
- assigned: boolean | null;
45
- };
46
-
47
31
  type HidIdentityPayload = {
48
32
  site?: string;
49
33
  hidUserId?: string | number;
@@ -155,28 +139,6 @@ export type HidSipAccountData = {
155
139
  provisionedAt: string;
156
140
  };
157
141
 
158
- /** One row of the site's SIP account list - who owns the extension, never its password. */
159
- export type HidSipAccountListItem = {
160
- _id: string;
161
- userId: string;
162
- name: string;
163
- email: string;
164
- /**
165
- * What the owner is called after their name on the contact list: their
166
- * "Blk 1/Level 1/Unit 1" when they live here, and their membership type -
167
- * "Security Agency" - when they do not. "" only when the site knows neither.
168
- *
169
- * Optional because an API still on the `@7365admin1/core` release that
170
- * predates it answers without the field; the contact picker falls back to the
171
- * bare name rather than showing a dangling separator.
172
- */
173
- unitLabel?: string;
174
- extension: string;
175
- username: string;
176
- status: string;
177
- provisionedAt: string;
178
- };
179
-
180
142
  /**
181
143
  * True only for the specific validation error an API that predates core #1878
182
144
  * returns when the discover body carries `site`. Deliberately narrow: after
@@ -204,36 +166,6 @@ export default function useHidAmico() {
204
166
  });
205
167
  }
206
168
 
207
- /**
208
- * The signed-in member's own QR code on one reader.
209
- *
210
- * No user id in the path: the server takes the caller from the session, so
211
- * these cannot be pointed at somebody else. `assigned` in the response says
212
- * whether the HID permissions screen actually admits this member to the
213
- * reader - issuing a code does not grant access, and the screen has to be
214
- * able to say so.
215
- */
216
- function getProfileQr(readerId: string) {
217
- return useNuxtApp().$api<{ data: HidProfileQr }>(
218
- `${basePath}/readers/${readerId}/profile-qr`,
219
- { method: "GET" },
220
- );
221
- }
222
-
223
- function issueProfileQr(readerId: string) {
224
- return useNuxtApp().$api<{ data: HidProfileQr }>(
225
- `${basePath}/readers/${readerId}/profile-qr`,
226
- { method: "POST" },
227
- );
228
- }
229
-
230
- function deleteProfileQr(readerId: string) {
231
- return useNuxtApp().$api<{ data: HidProfileQr }>(
232
- `${basePath}/readers/${readerId}/profile-qr`,
233
- { method: "DELETE" },
234
- );
235
- }
236
-
237
169
  function createReader(payload: HidReaderPayload) {
238
170
  return useNuxtApp().$api<HidApiRecord>(`${basePath}/readers`, {
239
171
  method: "POST",
@@ -325,36 +257,6 @@ export default function useHidAmico() {
325
257
  });
326
258
  }
327
259
 
328
- /**
329
- * Which credentials a reader accepts at the door.
330
- *
331
- * Separate from `setReaderConfiguration` on purpose. That one is the generic
332
- * configuration endpoint, gated by an allowlist of writable objects; this is
333
- * a dedicated route that validates the four methods against the reader's own
334
- * `capabilities` and confirms the write by reading the device back, so a
335
- * refusal here names the credential the hardware would not take.
336
- */
337
- function setReaderIdentificationMethods(readerId: string, payload: HidApiRecord) {
338
- return useNuxtApp().$api<HidApiRecord>(
339
- `${basePath}/readers/${readerId}/identification-methods`,
340
- { method: "PUT", body: payload },
341
- );
342
- }
343
-
344
- /**
345
- * Put a reader back to the settings iService holds for it.
346
- *
347
- * A POST rather than a GET because it WRITES: reading the reader's
348
- * configuration is only the first half, and anything that drifted is
349
- * re-applied before this returns.
350
- */
351
- function reconcileReaderIdentificationMethods(readerId: string) {
352
- return useNuxtApp().$api<HidApiRecord>(
353
- `${basePath}/readers/${readerId}/identification-methods/reconcile`,
354
- { method: "POST" },
355
- );
356
- }
357
-
358
260
  function getIdentities(readerId: string, query: HidApiRecord = {}) {
359
261
  return useNuxtApp().$api<HidApiRecord>(`${basePath}/readers/${readerId}/identities`, {
360
262
  method: "GET",
@@ -512,27 +414,6 @@ export default function useHidAmico() {
512
414
  );
513
415
  }
514
416
 
515
- function getUserPasswordStatus(readerId: string, hidUserId: string | number) {
516
- return useNuxtApp().$api<HidApiRecord>(
517
- `${basePath}/readers/${readerId}/users/${hidUserId}/password`,
518
- { method: "GET" },
519
- );
520
- }
521
-
522
- function setUserPassword(readerId: string, hidUserId: string | number, password: string) {
523
- return useNuxtApp().$api<HidApiRecord>(
524
- `${basePath}/readers/${readerId}/users/${hidUserId}/password`,
525
- { method: "PUT", body: { password } },
526
- );
527
- }
528
-
529
- function deleteUserPassword(readerId: string, hidUserId: string | number) {
530
- return useNuxtApp().$api<HidApiRecord>(
531
- `${basePath}/readers/${readerId}/users/${hidUserId}/password`,
532
- { method: "DELETE" },
533
- );
534
- }
535
-
536
417
  function deleteUserPin(readerId: string, hidUserId: string | number) {
537
418
  return useNuxtApp().$api<{ data: { pinEnrolled: boolean } }>(
538
419
  `${basePath}/readers/${readerId}/users/${hidUserId}/pin`,
@@ -593,42 +474,6 @@ export default function useHidAmico() {
593
474
  );
594
475
  }
595
476
 
596
- /**
597
- * The site's SIP accounts for the intercom contact picker. Site-scoped only:
598
- * the organisation never decided who may read this — the site guard does —
599
- * and sending one narrowed the list on a customer site whose accounts were
600
- * provisioned by a managing agent.
601
- */
602
- function getSipAccounts(siteId: string) {
603
- return useNuxtApp().$api<{ data: HidSipAccountListItem[] }>(
604
- `${basePath}/sites/${siteId}/intercom/sip-accounts`,
605
- { method: "GET" },
606
- );
607
- }
608
-
609
- /**
610
- * Wake the resident's phone for a call the web phone has just placed.
611
- *
612
- * The SIP INVITE is the call and travels over the WebSocket, not through the
613
- * API; this only rings the resident's mobile so somebody is there to answer
614
- * it. It is therefore fired after the INVITE and never awaited in a way that
615
- * could fail the call — see `startWebCall` in `HidIntercomManagement.vue`.
616
- *
617
- * `notified: false` with a reason is a normal response, not an error: staff
618
- * extensions and external SIP addresses have no resident behind them.
619
- */
620
- function notifyIntercomCall(
621
- siteId: string,
622
- payload: { orgId: string; destination: string; callId: string; readerId?: string },
623
- ) {
624
- return useNuxtApp().$api<{
625
- data: { notified: boolean; delivered?: number; reason?: string };
626
- }>(
627
- `${basePath}/sites/${siteId}/intercom/notify-call`,
628
- { method: "POST", body: payload },
629
- );
630
- }
631
-
632
477
  function getPermissionCandidates(
633
478
  siteId: string,
634
479
  query: {
@@ -660,9 +505,6 @@ export default function useHidAmico() {
660
505
 
661
506
  return {
662
507
  getReaders,
663
- getProfileQr,
664
- issueProfileQr,
665
- deleteProfileQr,
666
508
  discoverReader,
667
509
  createReader,
668
510
  updateReader,
@@ -677,8 +519,6 @@ export default function useHidAmico() {
677
519
  issueVisitorQr,
678
520
  getReaderConfiguration,
679
521
  setReaderConfiguration,
680
- setReaderIdentificationMethods,
681
- reconcileReaderIdentificationMethods,
682
522
  getLogs,
683
523
  setUserImage,
684
524
  deleteUserImage,
@@ -690,9 +530,6 @@ export default function useHidAmico() {
690
530
  getUserPinStatus,
691
531
  setUserPin,
692
532
  deleteUserPin,
693
- getUserPasswordStatus,
694
- setUserPassword,
695
- deleteUserPassword,
696
533
  getIdentities,
697
534
  getReaderUsers,
698
535
  getReaderAccessLogs,
@@ -703,8 +540,6 @@ export default function useHidAmico() {
703
540
  makeIntercomCall,
704
541
  finalizeIntercomCall,
705
542
  ensureSipAccount,
706
- getSipAccounts,
707
- notifyIntercomCall,
708
543
  getSitePermissions,
709
544
  getPermissionCandidates,
710
545
  updateSitePermissions,
@@ -46,33 +46,9 @@ export default function useHidNavigation() {
46
46
  },
47
47
  },
48
48
  {
49
- // "HID Reader Users" now points at `access-mgmt/administrator`, not at
50
- // `access-mgmt/hid-users`.
51
- //
52
- // Both routes mount a roster of the reader's users, but only this one
53
- // can act on them. `administrator` renders HidUserEnrollment WITHOUT
54
- // `card-management`, and that prop is what gates the Enroll action:
55
- // <template v-if="!props.cardManagement" #actions>
56
- // `hid-users` renders HidReaderUserRoster, which is read-only apart
57
- // from PIN management. So the menu entry with this name used to lead
58
- // to the screen that cannot enrol, while the screen that can was
59
- // reachable only by typing the URL.
60
- //
61
- // `hid-users` is left in place and simply unlisted - the same state
62
- // `administrator` was in - so any existing link to it still resolves.
63
49
  title: "HID Reader Users",
64
50
  route: {
65
- name: "org-site-access-mgmt-administrator",
66
- params: { org, site },
67
- },
68
- },
69
- {
70
- // The signed-in member's own pass, not somebody else's. Every other
71
- // entry in this group acts on a resident or a visitor; this one has
72
- // no subject but the caller.
73
- title: "HID QR Code",
74
- route: {
75
- name: "org-site-access-mgmt-hid-qr-code",
51
+ name: "org-site-access-mgmt-hid-users",
76
52
  params: { org, site },
77
53
  },
78
54
  },