@7365admin1/layer-common 4.21.4-staging.348 → 4.23.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 (35) hide show
  1. package/CHANGELOG.md +32 -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/DocumentForm.vue +112 -407
  6. package/components/DocumentManagement.vue +12 -213
  7. package/components/EntryPass/QrTemplatePreview.vue +25 -21
  8. package/components/EntryPassInformation.vue +24 -119
  9. package/components/Facility/BookingSetup.vue +0 -63
  10. package/components/HidAccessLogDashboard.vue +5 -29
  11. package/components/HidIntercomManagement.vue +14 -148
  12. package/components/HidReaderManagement.vue +0 -26
  13. package/components/HidReaderUserRoster.vue +2 -32
  14. package/components/HidUserEnrollment.vue +152 -833
  15. package/components/InvitationClientForm.vue +1 -19
  16. package/components/VisitorManagement.vue +5 -267
  17. package/composables/useAccessManagement.ts +0 -5
  18. package/composables/useDocument.ts +0 -7
  19. package/composables/useFacility.ts +0 -11
  20. package/composables/useHidAmico.ts +0 -117
  21. package/composables/useHidNavigation.ts +1 -25
  22. package/composables/usePeople.ts +0 -19
  23. package/composables/useSiteEntryPassSettings.ts +0 -26
  24. package/composables/useWebUsb.ts +11 -14
  25. package/package.json +1 -1
  26. package/pages/[org]/[site]/access-mgmt/administrator/index.vue +1 -1
  27. package/pages/[org]/[site]/access-mgmt/hid-cards/index.vue +1 -1
  28. package/pages/[org]/[site]/access-mgmt/hid-readers/index.vue +1 -1
  29. package/types/document.d.ts +0 -14
  30. package/types/facility.d.ts +0 -4
  31. package/types/people.d.ts +1 -4
  32. package/components/HidAccessPermissions.vue +0 -424
  33. package/components/HidProfileQrCode.vue +0 -323
  34. package/pages/[org]/[site]/access-mgmt/hid-qr-code/index.vue +0 -23
  35. package/utils/hid-permission-assignments.ts +0 -190
package/CHANGELOG.md CHANGED
@@ -1,5 +1,33 @@
1
1
  # @iservice365/layer-common
2
2
 
3
+ ## 4.23.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 4b80f17: Robot fleet screens, shared by every application that shows robots
8
+
9
+ Adds `useRobots` (the `/api/robots` calls), `utils/robot-display.ts` (one set of
10
+ words and colours for a robot's state), and two components: `RobotFleet` — the
11
+ list with live status, floor and the Clean / Return actions — and `RobotForm`
12
+ for registering a robot.
13
+
14
+ One component rather than a copy per app, so Property Management, Hygiene, the
15
+ Seven365 console and the two mobile apps cannot drift into describing the same
16
+ robot four different ways. Each app passes only which robot `type` it presents
17
+ and which actions its user holds a permission for; the API narrows the result
18
+ again on its own side.
19
+
20
+ An unrecognised mode renders as "Unknown" and is never offered a Clean button,
21
+ and an unknown floor is shown as unknown rather than guessed. Return-to-dock
22
+ stays available while a robot is busy, because that is how an operator recovers
23
+ one.
24
+
25
+ ## 4.22.0
26
+
27
+ ### Minor Changes
28
+
29
+ - a0d5977: Vehicle Mgmt: three tabs - Residents, Season Passes and Block Listed - each showing every status (Temporary, Blocked, Unblocked and the rest). Adding a Whitelist vehicle files it as resident, a Season Pass as season_pass, and a Blocklist vehicle as Visitor or Contractor from a new Category dropdown. Adding a plate the site already holds shows which tab and status it is under, with Cancel or Update - Update saves the entered details on that record and moves it to the form's tab. Block and Unblock call the blocklist endpoints; a History button on each plate shows its last 20 changes (who, when, which fields). Visitor Mgmt: a Block button beside a Registered visitor's vehicle number (new `canBlockVehicle` prop) opens the Block Listed form with the plate, name, NRIC and phone filled in and the category taken from the visitor type (guest as Visitor; contractor, delivery, pick-up, drop-off as they are).
30
+
3
31
  ## 4.21.3
4
32
 
5
33
  ### Patch Changes
@@ -1252,11 +1280,11 @@
1252
1280
  `utils/console-tier.ts` + `composables/useConsoleTier.ts` mirror the server's
1253
1281
  own rule from two endpoints the console already calls, unprojected:
1254
1282
 
1255
- GET /api/members/user/:user/app/admin the Seven365 staff membership
1256
- GET /api/roles/id/:role that membership's role document
1283
+ GET /api/members/user/:user/app/admin the Seven365 staff membership
1284
+ GET /api/roles/id/:role that membership's role document
1257
1285
 
1258
- owner = member.type === "admin" && role.type === "admin" && role.default === true
1259
- staff = member.type === "admin" && role.type === "admin"
1286
+ owner = member.type === "admin" && role.type === "admin" && role.default === true
1287
+ staff = member.type === "admin" && role.type === "admin"
1260
1288
 
1261
1289
  `role.default` is the marker because it is the only property of a platform
1262
1290
  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 {