@7365admin1/layer-common 4.32.1-staging.365 → 4.33.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 (54) hide show
  1. package/CHANGELOG.md +10 -4
  2. package/components/AccessCardAddForm.vue +4 -5
  3. package/components/AccessCardAssignToUnitForm.vue +2 -3
  4. package/components/AccessCardPreviewDialog.vue +3 -4
  5. package/components/Dialog/DeleteConfirmation.vue +2 -17
  6. package/components/Dialog/ReusablePrompt.vue +3 -26
  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/EntryPass/QrTemplatePreview.vue +25 -21
  11. package/components/EntryPassInformation.vue +24 -119
  12. package/components/Facility/BookingSetup.vue +0 -63
  13. package/components/HidAccessLogDashboard.vue +8 -41
  14. package/components/HidIntercomManagement.vue +14 -148
  15. package/components/HidReaderManagement.vue +0 -26
  16. package/components/HidReaderUserRoster.vue +3 -44
  17. package/components/HidUserEnrollment.vue +155 -845
  18. package/components/InvitationClientForm.vue +1 -19
  19. package/components/NotificationBell.vue +3 -39
  20. package/components/VehicleForm.vue +2 -45
  21. package/components/VehicleManagement.vue +10 -95
  22. package/components/VisitorManagement.vue +5 -267
  23. package/composables/useAccessManagement.ts +0 -5
  24. package/composables/useCleaningPermission.ts +4 -4
  25. package/composables/useCommonPermission.ts +0 -16
  26. package/composables/useDocument.ts +0 -7
  27. package/composables/useFacility.ts +0 -11
  28. package/composables/useHidAmico.ts +0 -117
  29. package/composables/useHidNavigation.ts +1 -25
  30. package/composables/useLandscapingPermission.ts +4 -4
  31. package/composables/useMechanicalElectricalPermission.ts +4 -4
  32. package/composables/usePeople.ts +0 -19
  33. package/composables/usePestControlPermission.ts +4 -4
  34. package/composables/usePoolMaintenancePermission.ts +4 -4
  35. package/composables/useSecurityPermission.ts +10 -4
  36. package/composables/useSiteEntryPassSettings.ts +0 -26
  37. package/composables/useWebUsb.ts +11 -14
  38. package/package.json +1 -1
  39. package/pages/[org]/[site]/access-mgmt/administrator/index.vue +1 -1
  40. package/pages/[org]/[site]/access-mgmt/hid-cards/index.vue +1 -1
  41. package/pages/[org]/[site]/access-mgmt/hid-readers/index.vue +1 -1
  42. package/types/document.d.ts +0 -14
  43. package/types/facility.d.ts +0 -4
  44. package/types/people.d.ts +1 -28
  45. package/utils/vehicle-actions.ts +4 -12
  46. package/components/HidAccessPermissions.vue +0 -424
  47. package/components/HidProfileQrCode.vue +0 -332
  48. package/composables/useHidReaderSelection.ts +0 -50
  49. package/composables/useSiteCategory.ts +0 -45
  50. package/pages/[org]/[site]/access-mgmt/hid-qr-code/index.vue +0 -23
  51. package/utils/hid-permission-assignments.ts +0 -190
  52. package/utils/hid-reader-selection.ts +0 -52
  53. package/utils/notification-target.ts +0 -75
  54. package/utils/occupancy-role.ts +0 -109
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @iservice365/layer-common
2
2
 
3
+ ## 4.33.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 8fc0212: HERO robots phase e: site Alerts (`RobotSiteAlerts`) and Activity log (`RobotActivityLog`, site or network) as RobotSiteScreen views `alerts` / `log`; the header bell shows the site's open faults on every view; the Add / edit robot dialog rebuilt to the handoff (520px, type-filtered brands with capability, replace-only credentials) and the Remove dialog's wording; the building map reads the site's map whichever robot type saved it; mini-map name tags stay inside the plan.
8
+
3
9
  ## 4.32.0
4
10
 
5
11
  ### Minor Changes
@@ -1375,11 +1381,11 @@
1375
1381
  `utils/console-tier.ts` + `composables/useConsoleTier.ts` mirror the server's
1376
1382
  own rule from two endpoints the console already calls, unprojected:
1377
1383
 
1378
- GET /api/members/user/:user/app/admin the Seven365 staff membership
1379
- GET /api/roles/id/:role that membership's role document
1384
+ GET /api/members/user/:user/app/admin the Seven365 staff membership
1385
+ GET /api/roles/id/:role that membership's role document
1380
1386
 
1381
- owner = member.type === "admin" && role.type === "admin" && role.default === true
1382
- staff = member.type === "admin" && role.type === "admin"
1387
+ owner = member.type === "admin" && role.type === "admin" && role.default === true
1388
+ staff = member.type === "admin" && role.type === "admin"
1383
1389
 
1384
1390
  `role.default` is the marker because it is the only property of a platform
1385
1391
  staff role no API caller can set - `role.controller.ts` validates create and
@@ -433,10 +433,7 @@ const {
433
433
  bulkPhysicalAccessCard: _bulkPhysicalAccessCard,
434
434
  getBlockLevelUnitList: _getBlockLevelUnitList,
435
435
  } = useAccessManagement();
436
- const {
437
- getBySiteId: _getEntryPassSettings,
438
- getEncryptedAcmUrl: _getEncryptedAcmUrl,
439
- } = useSiteEntryPassSettings();
436
+ const { getBySiteId: _getEntryPassSettings } = useSiteEntryPassSettings();
440
437
  const { getFileUrl } = useFile();
441
438
 
442
439
  const config = useRuntimeConfig();
@@ -591,7 +588,9 @@ watch(uploadMode, (mode) => {
591
588
 
592
589
  onMounted(async () => {
593
590
  try {
594
- const acmUrl = await _getEncryptedAcmUrl(siteId);
591
+ const { encrypted: acmUrl } = await $fetch<{ encrypted: string }>(
592
+ "/api/encrypt-acm-url"
593
+ );
595
594
  encryptedAcmUrl.value = acmUrl;
596
595
  const [doorLevels, liftLevels, groups] = await Promise.all([
597
596
  _getDoorAccessLevels(acmUrl),
@@ -203,7 +203,6 @@ const {
203
203
  getBlockLevelUnitList: _getBlockLevelUnitList,
204
204
  } = useAccessManagement();
205
205
  const { requiredRule } = useUtils();
206
- const { getEncryptedAcmUrl } = useSiteEntryPassSettings();
207
206
 
208
207
  const route = useRoute();
209
208
  const siteId = computed(() => props.siteId || (route.params.site as string));
@@ -295,7 +294,7 @@ onMounted(async () => {
295
294
 
296
295
  const [blockLevelResult, acmResult] = await Promise.allSettled([
297
296
  _getBlockLevelUnitList(siteId.value),
298
- getEncryptedAcmUrl(siteId.value),
297
+ $fetch<{ encrypted: string }>("/api/encrypt-acm-url"),
299
298
  ]);
300
299
 
301
300
  // Blocks / Levels / Units
@@ -310,7 +309,7 @@ onMounted(async () => {
310
309
 
311
310
  // ACM levels (door + lift)
312
311
  if (acmResult.status === "fulfilled") {
313
- const acmUrl = acmResult.value;
312
+ const acmUrl = acmResult.value.encrypted;
314
313
  try {
315
314
  const [doorLevels, liftLevels] = await Promise.all([
316
315
  _getDoorAccessLevels(acmUrl),
@@ -403,7 +403,6 @@ const emit = defineEmits<{
403
403
  }>();
404
404
 
405
405
  const { getResidents, assignUser } = useAccessManagement();
406
- const { getEncryptedAcmUrl } = useSiteEntryPassSettings();
407
406
 
408
407
  const historyDialog = ref(false);
409
408
  const showAssignForm = ref(false);
@@ -476,12 +475,12 @@ async function openAssignForm() {
476
475
  if (!props.unit?._id || !props.orgId || !props.siteId) return;
477
476
  peopleLoading.value = true;
478
477
  try {
479
- const [residentsRes, acmUrl] = await Promise.all([
478
+ const [residentsRes, acmRes] = await Promise.all([
480
479
  getResidents({ orgId: props.orgId, siteId: props.siteId, unitId: props.unit._id }),
481
- getEncryptedAcmUrl(props.siteId),
480
+ $fetch<{ encrypted: string }>("/api/encrypt-acm-url"),
482
481
  ]);
483
482
  peopleItems.value = residentsRes?.data ?? [];
484
- encryptedAcmUrl.value = acmUrl ?? "";
483
+ encryptedAcmUrl.value = acmRes?.encrypted ?? "";
485
484
  } catch {
486
485
  peopleItems.value = [];
487
486
  } finally {
@@ -27,8 +27,7 @@
27
27
  Cancel
28
28
  </v-btn>
29
29
 
30
- <v-btn class="screen-btn-primary" :class="{ 'no-permission': noPermission }"
31
- :aria-disabled="noPermission || undefined" variant="flat" @click="emit('delete')">
30
+ <v-btn class="screen-btn-primary" variant="flat" @click="emit('delete')">
32
31
  Delete
33
32
  </v-btn>
34
33
  </div>
@@ -48,15 +47,6 @@ const props = defineProps({
48
47
  loading: {
49
48
  type: Boolean,
50
49
  default: false
51
- },
52
- /**
53
- * The action is not allowed (the server has refused it for want of the
54
- * right). The confirm is drawn disabled but still takes the click, so the
55
- * caller can say why - without sending the request again.
56
- */
57
- noPermission: {
58
- type: Boolean,
59
- default: false
60
50
  }
61
51
  })
62
52
 
@@ -64,9 +54,4 @@ const emit = defineEmits(["close", "delete"])
64
54
 
65
55
  </script>
66
56
 
67
- <style scoped>
68
- .no-permission {
69
- opacity: 0.45;
70
- cursor: not-allowed;
71
- }
72
- </style>
57
+ <style scoped></style>
@@ -3,10 +3,7 @@
3
3
  <v-card-text class="screen-modal__body pa-5 my-5 px-7 text-center">
4
4
  <span class="screen-card-title d-block">{{ promptTitle }}</span>
5
5
 
6
- <!-- Red (`text-error`, the theme's error token) when the caller says
7
- the message is a failure; other callers pass notes, so it stays
8
- plain by default. -->
9
- <span v-if="message" class="d-block mt-5" :class="{ 'text-error': messageError }">
6
+ <span v-if="message" class="d-block mt-5">
10
7
  {{ message }}
11
8
  </span>
12
9
  </v-card-text>
@@ -28,8 +25,7 @@
28
25
  draws no destructive button, so overriding it here would be
29
26
  inventing a control the design never named. Left as it renders
30
27
  today and raised for a design decision. -->
31
- <v-btn :class="[confirmButtonColor ? 'text-none' : 'screen-btn-primary', { 'no-permission': noPermission }]"
32
- :aria-disabled="noPermission || undefined"
28
+ <v-btn :class="confirmButtonColor ? 'text-none' : 'screen-btn-primary'"
33
29
  variant="flat" :color="confirmButtonColor || undefined" @click="emit('proceed')">
34
30
  {{ confirmLabel }}
35
31
  </v-btn>
@@ -58,20 +54,6 @@ const props = defineProps({
58
54
  confirmButtonColor: {
59
55
  type: String,
60
56
  default: ""
61
- },
62
- /**
63
- * The action is not allowed (the server has refused it for want of the
64
- * right). The confirm is drawn disabled but still takes the click, so the
65
- * caller can say why - without sending the request again.
66
- */
67
- noPermission: {
68
- type: Boolean,
69
- default: false
70
- },
71
- /** `message` is a refusal or failure: drawn in the error colour. */
72
- messageError: {
73
- type: Boolean,
74
- default: false
75
57
  }
76
58
 
77
59
  })
@@ -80,9 +62,4 @@ const emit = defineEmits(["close", "proceed"])
80
62
 
81
63
  </script>
82
64
 
83
- <style scoped>
84
- .no-permission {
85
- opacity: 0.45;
86
- cursor: not-allowed;
87
- }
88
- </style>
65
+ <style scoped></style>
@@ -23,7 +23,7 @@
23
23
  Close
24
24
  </v-btn>
25
25
 
26
- <v-menu v-if="canUpdate || canDelete || $slots.actions" contained>
26
+ <v-menu v-if="canUpdate || canDelete" contained>
27
27
  <template #activator="{ props }">
28
28
  <v-btn
29
29
  variant="flat"
@@ -42,16 +42,6 @@
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
-
55
45
  <v-list-item v-if="canUpdate" @click="emit('edit')">
56
46
  <v-list-item-title>
57
47
  {{ editButtonLabel }}