@7365admin1/layer-common 4.5.0 → 4.5.1-staging.293

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.
@@ -414,6 +414,27 @@ export default function useHidAmico() {
414
414
  );
415
415
  }
416
416
 
417
+ function getUserPasswordStatus(readerId: string, hidUserId: string | number) {
418
+ return useNuxtApp().$api<HidApiRecord>(
419
+ `${basePath}/readers/${readerId}/users/${hidUserId}/password`,
420
+ { method: "GET" },
421
+ );
422
+ }
423
+
424
+ function setUserPassword(readerId: string, hidUserId: string | number, password: string) {
425
+ return useNuxtApp().$api<HidApiRecord>(
426
+ `${basePath}/readers/${readerId}/users/${hidUserId}/password`,
427
+ { method: "PUT", body: { password } },
428
+ );
429
+ }
430
+
431
+ function deleteUserPassword(readerId: string, hidUserId: string | number) {
432
+ return useNuxtApp().$api<HidApiRecord>(
433
+ `${basePath}/readers/${readerId}/users/${hidUserId}/password`,
434
+ { method: "DELETE" },
435
+ );
436
+ }
437
+
417
438
  function deleteUserPin(readerId: string, hidUserId: string | number) {
418
439
  return useNuxtApp().$api<{ data: { pinEnrolled: boolean } }>(
419
440
  `${basePath}/readers/${readerId}/users/${hidUserId}/pin`,
@@ -530,6 +551,9 @@ export default function useHidAmico() {
530
551
  getUserPinStatus,
531
552
  setUserPin,
532
553
  deleteUserPin,
554
+ getUserPasswordStatus,
555
+ setUserPassword,
556
+ deleteUserPassword,
533
557
  getIdentities,
534
558
  getReaderUsers,
535
559
  getReaderAccessLogs,
@@ -52,6 +52,22 @@ export default function useHidNavigation() {
52
52
  params: { org, site },
53
53
  },
54
54
  },
55
+ {
56
+ // The enrollment screen, and the handoff's own nav label for it.
57
+ //
58
+ // `access-mgmt/administrator` renders HidUserEnrollment WITHOUT
59
+ // `card-management`, and that prop is what gates the Enroll action:
60
+ // <template v-if="!props.cardManagement" #actions>
61
+ // HID Cards mounts the same component WITH `card-management`, so it
62
+ // deliberately hides Enroll. Until now nothing linked to
63
+ // `administrator`, so the only screen that draws Enroll was
64
+ // reachable by typing the URL and Enroll looked missing entirely.
65
+ title: "Administrator",
66
+ route: {
67
+ name: "org-site-access-mgmt-administrator",
68
+ params: { org, site },
69
+ },
70
+ },
55
71
  {
56
72
  title: "HID Cards",
57
73
  route: {
@@ -115,6 +115,24 @@ export default function () {
115
115
  });
116
116
  }
117
117
 
118
+ /**
119
+ * The blocks, levels and units at a site that actually have an occupant.
120
+ * The other half of the unit picker: this narrows the cascade, then
121
+ * `getPeopleByUnit` answers "which person in this unit?".
122
+ */
123
+ async function getOccupiedStructure(
124
+ site: string,
125
+ { type = "", status = "active", block = "", level = "" } = {}
126
+ ) {
127
+ return await useNuxtApp().$api<Record<string, any>>(
128
+ `/api/people/site/${site}/occupied-structure`,
129
+ {
130
+ method: "GET",
131
+ query: { type, status, block, level },
132
+ }
133
+ );
134
+ }
135
+
118
136
  async function getPeopleByUnit(
119
137
  _id: string,
120
138
  { status = "active", type = "" } = {}
@@ -148,6 +166,7 @@ export default function () {
148
166
  findPersonByPlateNumberMultipleResult,
149
167
  findPersonByContact,
150
168
  getPeopleByUnit,
169
+ getOccupiedStructure,
151
170
  searchCompanyList,
152
171
  findUsersByPlateNumber,
153
172
  reviewResidentPerson,
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.5.0",
5
+ "version": "4.5.1-staging.293",
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.",
@@ -73,6 +73,10 @@ declare type TFacility = {
73
73
  hourInterval?: number;
74
74
  isBookingFeeEnabled: boolean;
75
75
  isGuestEnabled: boolean;
76
+ /** Residents may complete this facility's checklist themselves. */
77
+ isResidentChecklistEnabled?: boolean;
78
+ /** Security may complete it. Mutually exclusive with the above. */
79
+ isSecurityChecklistEnabled?: boolean;
76
80
  bookingAmount: number | null;
77
81
  peakBookingFeeAmount?: number | null;
78
82
  bookingFeeGuestAmount?: number | null;
@@ -242,6 +242,9 @@ export const MDI_TO_SYMBOL: Record<string, string> = {
242
242
  "mdi-link-variant": "link",
243
243
  "mdi-lan-connect": "lan",
244
244
  "mdi-lan-disconnect": "link_off", // NEAREST: no disconnected-LAN glyph
245
+ "mdi-lan-check": "network_check",
246
+ "mdi-dialpad": "dialpad",
247
+ "mdi-headset": "headset_mic",
245
248
  "mdi-bluetooth": "bluetooth",
246
249
  "mdi-nfc": "nfc",
247
250