@7365admin1/layer-common 4.26.0 → 4.26.1-staging.355

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 +4 -4
  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/Robot/Fleet.vue +3 -0
  20. package/components/Robot/Map3D.vue +1158 -39
  21. package/components/RolePermissionFormCreate.vue +163 -19
  22. package/components/RolePermissionFormPreviewUpdate.vue +230 -19
  23. package/components/RolePermissionMain.vue +19 -0
  24. package/components/VisitorManagement.vue +267 -5
  25. package/composables/useAccessManagement.ts +5 -0
  26. package/composables/useDocument.ts +7 -0
  27. package/composables/useFacility.ts +11 -0
  28. package/composables/useHidAmico.ts +117 -0
  29. package/composables/useHidNavigation.ts +25 -1
  30. package/composables/usePeople.ts +19 -0
  31. package/composables/useRobots.ts +88 -0
  32. package/composables/useSiteCategory.ts +45 -0
  33. package/composables/useSiteEntryPassSettings.ts +26 -0
  34. package/composables/useWebUsb.ts +14 -11
  35. package/package.json +1 -1
  36. package/pages/[org]/[site]/access-mgmt/administrator/index.vue +1 -1
  37. package/pages/[org]/[site]/access-mgmt/hid-cards/index.vue +1 -1
  38. package/pages/[org]/[site]/access-mgmt/hid-qr-code/index.vue +23 -0
  39. package/pages/[org]/[site]/access-mgmt/hid-readers/index.vue +1 -1
  40. package/types/document.d.ts +14 -0
  41. package/types/facility.d.ts +4 -0
  42. package/types/people.d.ts +28 -1
  43. package/utils/building-map.ts +316 -0
  44. package/utils/hid-permission-assignments.ts +190 -0
  45. package/utils/occupancy-role.ts +109 -0
  46. package/utils/permission-labels.ts +30 -0
@@ -388,9 +388,27 @@ 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
+ */
391
409
  const { data: roleData, refresh: refreshRoles } = await useLazyAsyncData(
392
410
  "roles",
393
- () => getRoles({ org: org.value?._id, type: props.app, limit: 50 }),
411
+ () => getRoles({ org: org.value?._id, type: "organization", limit: 50 }),
394
412
  { watch: [() => props.app] }
395
413
  )
396
414
 
@@ -222,6 +222,9 @@
222
222
  :key="mapRobot._id"
223
223
  :robot-id="mapRobot._id"
224
224
  :robot-state="states[mapRobot._id] ?? null"
225
+ :can-edit="canEdit"
226
+ :robot-name="mapRobot.name"
227
+ :robot-brand="mapRobot.brand"
225
228
  />
226
229
  </AppCard>
227
230
  </v-dialog>