@7365admin1/layer-common 4.28.0 → 4.28.1-staging.356

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 (42) hide show
  1. package/CHANGELOG.md +4 -16
  2. package/components/AccessCardAddForm.vue +5 -4
  3. package/components/AccessCardAssignToUnitForm.vue +3 -2
  4. package/components/AccessCardPreviewDialog.vue +4 -3
  5. package/components/Dialog/UpdateMoreAction.vue +11 -1
  6. package/components/DocumentForm.vue +407 -112
  7. package/components/DocumentManagement.vue +213 -12
  8. package/components/EntryPass/QrTemplatePreview.vue +21 -25
  9. package/components/EntryPassInformation.vue +119 -24
  10. package/components/Facility/BookingSetup.vue +63 -0
  11. package/components/HidAccessLogDashboard.vue +29 -5
  12. package/components/HidAccessPermissions.vue +424 -0
  13. package/components/HidIntercomManagement.vue +148 -14
  14. package/components/HidProfileQrCode.vue +323 -0
  15. package/components/HidReaderManagement.vue +26 -0
  16. package/components/HidReaderUserRoster.vue +32 -2
  17. package/components/HidUserEnrollment.vue +833 -152
  18. package/components/InvitationClientForm.vue +19 -1
  19. package/components/RolePermissionFormCreate.vue +163 -19
  20. package/components/RolePermissionFormPreviewUpdate.vue +230 -19
  21. package/components/RolePermissionMain.vue +19 -0
  22. package/components/VisitorManagement.vue +267 -5
  23. package/composables/useAccessManagement.ts +5 -0
  24. package/composables/useDocument.ts +7 -0
  25. package/composables/useFacility.ts +11 -0
  26. package/composables/useHidAmico.ts +117 -0
  27. package/composables/useHidNavigation.ts +25 -1
  28. package/composables/usePeople.ts +19 -0
  29. package/composables/useSiteCategory.ts +45 -0
  30. package/composables/useSiteEntryPassSettings.ts +26 -0
  31. package/composables/useWebUsb.ts +14 -11
  32. package/package.json +1 -1
  33. package/pages/[org]/[site]/access-mgmt/administrator/index.vue +1 -1
  34. package/pages/[org]/[site]/access-mgmt/hid-cards/index.vue +1 -1
  35. package/pages/[org]/[site]/access-mgmt/hid-qr-code/index.vue +23 -0
  36. package/pages/[org]/[site]/access-mgmt/hid-readers/index.vue +1 -1
  37. package/types/document.d.ts +14 -0
  38. package/types/facility.d.ts +4 -0
  39. package/types/people.d.ts +28 -1
  40. package/utils/hid-permission-assignments.ts +190 -0
  41. package/utils/occupancy-role.ts +109 -0
  42. package/utils/permission-labels.ts +30 -0
package/CHANGELOG.md CHANGED
@@ -1,17 +1,5 @@
1
1
  # @iservice365/layer-common
2
2
 
3
- ## 4.28.0
4
-
5
- ### Minor Changes
6
-
7
- - 94984ba: Robots: draw walls and zones on the building layout. The layout editor can now draw, move, reshape and remove wall segments and named zone polygons per floor, with undo of the last change and keyboard shortcuts; walls and zones are saved with the building map and drawn in the 3D view.
8
-
9
- ## 4.27.0
10
-
11
- ### Minor Changes
12
-
13
- - 98dbabc: Robots: building layout editor in the 3D view (place, move and remove doors and lift shafts, floor heights, save/remove the layout), doors and lift shafts drawn in 3D with shafts spanning stacked floors, and a live lift queue panel (simulated lift) with request/release for demo robots. New useRobots calls for building maps and lift sessions.
14
-
15
3
  ## 4.26.0
16
4
 
17
5
  ### Minor Changes
@@ -1349,11 +1337,11 @@
1349
1337
  `utils/console-tier.ts` + `composables/useConsoleTier.ts` mirror the server's
1350
1338
  own rule from two endpoints the console already calls, unprojected:
1351
1339
 
1352
- GET /api/members/user/:user/app/admin the Seven365 staff membership
1353
- GET /api/roles/id/:role that membership's role document
1340
+ GET /api/members/user/:user/app/admin the Seven365 staff membership
1341
+ GET /api/roles/id/:role that membership's role document
1354
1342
 
1355
- owner = member.type === "admin" && role.type === "admin" && role.default === true
1356
- staff = member.type === "admin" && role.type === "admin"
1343
+ owner = member.type === "admin" && role.type === "admin" && role.default === true
1344
+ staff = member.type === "admin" && role.type === "admin"
1357
1345
 
1358
1346
  `role.default` is the marker because it is the only property of a platform
1359
1347
  staff role no API caller can set - `role.controller.ts` validates create and
@@ -433,7 +433,10 @@ const {
433
433
  bulkPhysicalAccessCard: _bulkPhysicalAccessCard,
434
434
  getBlockLevelUnitList: _getBlockLevelUnitList,
435
435
  } = useAccessManagement();
436
- const { getBySiteId: _getEntryPassSettings } = useSiteEntryPassSettings();
436
+ const {
437
+ getBySiteId: _getEntryPassSettings,
438
+ getEncryptedAcmUrl: _getEncryptedAcmUrl,
439
+ } = useSiteEntryPassSettings();
437
440
  const { getFileUrl } = useFile();
438
441
 
439
442
  const config = useRuntimeConfig();
@@ -588,9 +591,7 @@ watch(uploadMode, (mode) => {
588
591
 
589
592
  onMounted(async () => {
590
593
  try {
591
- const { encrypted: acmUrl } = await $fetch<{ encrypted: string }>(
592
- "/api/encrypt-acm-url"
593
- );
594
+ const acmUrl = await _getEncryptedAcmUrl(siteId);
594
595
  encryptedAcmUrl.value = acmUrl;
595
596
  const [doorLevels, liftLevels, groups] = await Promise.all([
596
597
  _getDoorAccessLevels(acmUrl),
@@ -203,6 +203,7 @@ const {
203
203
  getBlockLevelUnitList: _getBlockLevelUnitList,
204
204
  } = useAccessManagement();
205
205
  const { requiredRule } = useUtils();
206
+ const { getEncryptedAcmUrl } = useSiteEntryPassSettings();
206
207
 
207
208
  const route = useRoute();
208
209
  const siteId = computed(() => props.siteId || (route.params.site as string));
@@ -294,7 +295,7 @@ onMounted(async () => {
294
295
 
295
296
  const [blockLevelResult, acmResult] = await Promise.allSettled([
296
297
  _getBlockLevelUnitList(siteId.value),
297
- $fetch<{ encrypted: string }>("/api/encrypt-acm-url"),
298
+ getEncryptedAcmUrl(siteId.value),
298
299
  ]);
299
300
 
300
301
  // Blocks / Levels / Units
@@ -309,7 +310,7 @@ onMounted(async () => {
309
310
 
310
311
  // ACM levels (door + lift)
311
312
  if (acmResult.status === "fulfilled") {
312
- const acmUrl = acmResult.value.encrypted;
313
+ const acmUrl = acmResult.value;
313
314
  try {
314
315
  const [doorLevels, liftLevels] = await Promise.all([
315
316
  _getDoorAccessLevels(acmUrl),
@@ -403,6 +403,7 @@ const emit = defineEmits<{
403
403
  }>();
404
404
 
405
405
  const { getResidents, assignUser } = useAccessManagement();
406
+ const { getEncryptedAcmUrl } = useSiteEntryPassSettings();
406
407
 
407
408
  const historyDialog = ref(false);
408
409
  const showAssignForm = ref(false);
@@ -475,12 +476,12 @@ async function openAssignForm() {
475
476
  if (!props.unit?._id || !props.orgId || !props.siteId) return;
476
477
  peopleLoading.value = true;
477
478
  try {
478
- const [residentsRes, acmRes] = await Promise.all([
479
+ const [residentsRes, acmUrl] = await Promise.all([
479
480
  getResidents({ orgId: props.orgId, siteId: props.siteId, unitId: props.unit._id }),
480
- $fetch<{ encrypted: string }>("/api/encrypt-acm-url"),
481
+ getEncryptedAcmUrl(props.siteId),
481
482
  ]);
482
483
  peopleItems.value = residentsRes?.data ?? [];
483
- encryptedAcmUrl.value = acmRes?.encrypted ?? "";
484
+ encryptedAcmUrl.value = acmUrl ?? "";
484
485
  } catch {
485
486
  peopleItems.value = [];
486
487
  } finally {
@@ -23,7 +23,7 @@
23
23
  Close
24
24
  </v-btn>
25
25
 
26
- <v-menu v-if="canUpdate || canDelete" contained>
26
+ <v-menu v-if="canUpdate || canDelete || $slots.actions" contained>
27
27
  <template #activator="{ props }">
28
28
  <v-btn
29
29
  variant="flat"
@@ -42,6 +42,16 @@
42
42
  render-verified either. Only the row type and the destructive ink
43
43
  change. -->
44
44
  <v-list class="pa-0 update-more__list">
45
+ <!--
46
+ Screen-specific rows, above Edit and the destructive one.
47
+
48
+ Additive: a screen that passes nothing gets the menu it always
49
+ had, and `$slots.actions` is undefined unless a caller actually
50
+ defines the slot - so the button does not appear over an empty
51
+ list when a screen has neither permission nor extra rows.
52
+ -->
53
+ <slot name="actions" />
54
+
45
55
  <v-list-item v-if="canUpdate" @click="emit('edit')">
46
56
  <v-list-item-title>
47
57
  {{ editButtonLabel }}