@7365admin1/layer-common 4.33.1 → 4.34.1-staging.367
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.
- package/CHANGELOG.md +4 -16
- package/components/AccessCardAddForm.vue +5 -4
- package/components/AccessCardAssignToUnitForm.vue +3 -2
- package/components/AccessCardPreviewDialog.vue +4 -3
- package/components/Dialog/DeleteConfirmation.vue +17 -2
- package/components/Dialog/ReusablePrompt.vue +26 -3
- package/components/Dialog/UpdateMoreAction.vue +11 -1
- package/components/DocumentForm.vue +407 -112
- package/components/DocumentManagement.vue +213 -12
- package/components/EntryPass/QrTemplatePreview.vue +21 -25
- package/components/EntryPassInformation.vue +119 -24
- package/components/Facility/BookingSetup.vue +63 -0
- package/components/HidAccessLogDashboard.vue +41 -8
- package/components/HidAccessPermissions.vue +424 -0
- package/components/HidIntercomManagement.vue +148 -14
- package/components/HidProfileQrCode.vue +332 -0
- package/components/HidReaderManagement.vue +26 -0
- package/components/HidReaderUserRoster.vue +44 -3
- package/components/HidUserEnrollment.vue +845 -155
- package/components/InvitationClientForm.vue +19 -1
- package/components/NotificationBell.vue +39 -3
- package/components/VehicleForm.vue +45 -2
- package/components/VehicleManagement.vue +95 -10
- package/components/VisitorManagement.vue +267 -5
- package/composables/useAccessManagement.ts +5 -0
- package/composables/useCleaningPermission.ts +4 -4
- package/composables/useCommonPermission.ts +16 -0
- package/composables/useDocument.ts +7 -0
- package/composables/useFacility.ts +11 -0
- package/composables/useHidAmico.ts +117 -0
- package/composables/useHidNavigation.ts +25 -1
- package/composables/useHidReaderSelection.ts +50 -0
- package/composables/useLandscapingPermission.ts +4 -4
- package/composables/useMechanicalElectricalPermission.ts +4 -4
- package/composables/usePeople.ts +19 -0
- package/composables/usePestControlPermission.ts +4 -4
- package/composables/usePoolMaintenancePermission.ts +4 -4
- package/composables/useSecurityPermission.ts +4 -10
- package/composables/useSiteCategory.ts +45 -0
- package/composables/useSiteEntryPassSettings.ts +26 -0
- package/composables/useWebUsb.ts +14 -11
- package/package.json +1 -1
- package/pages/[org]/[site]/access-mgmt/administrator/index.vue +1 -1
- package/pages/[org]/[site]/access-mgmt/hid-cards/index.vue +1 -1
- package/pages/[org]/[site]/access-mgmt/hid-qr-code/index.vue +23 -0
- package/pages/[org]/[site]/access-mgmt/hid-readers/index.vue +1 -1
- package/types/document.d.ts +14 -0
- package/types/facility.d.ts +4 -0
- package/types/people.d.ts +28 -1
- package/utils/hid-permission-assignments.ts +190 -0
- package/utils/hid-reader-selection.ts +52 -0
- package/utils/notification-target.ts +75 -0
- package/utils/occupancy-role.ts +109 -0
- package/utils/vehicle-actions.ts +12 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,17 +1,5 @@
|
|
|
1
1
|
# @iservice365/layer-common
|
|
2
2
|
|
|
3
|
-
## 4.33.1
|
|
4
|
-
|
|
5
|
-
### Patch Changes
|
|
6
|
-
|
|
7
|
-
- 498481c: HERO robot rules for the mobile apps: `scripts/sync-robot-rules.mjs` writes a generated, hash-stamped copy of `utils/robot-display.ts` (+ lift-queue rows, HERO_PALETTE) and shared test vectors into iClean365, iMA365 and iSecure365. Repo tooling only; nothing a consuming app loads changes.
|
|
8
|
-
|
|
9
|
-
## 4.33.0
|
|
10
|
-
|
|
11
|
-
### Minor Changes
|
|
12
|
-
|
|
13
|
-
- 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.
|
|
14
|
-
|
|
15
3
|
## 4.32.0
|
|
16
4
|
|
|
17
5
|
### Minor Changes
|
|
@@ -1387,11 +1375,11 @@
|
|
|
1387
1375
|
`utils/console-tier.ts` + `composables/useConsoleTier.ts` mirror the server's
|
|
1388
1376
|
own rule from two endpoints the console already calls, unprojected:
|
|
1389
1377
|
|
|
1390
|
-
|
|
1391
|
-
|
|
1378
|
+
GET /api/members/user/:user/app/admin the Seven365 staff membership
|
|
1379
|
+
GET /api/roles/id/:role that membership's role document
|
|
1392
1380
|
|
|
1393
|
-
|
|
1394
|
-
|
|
1381
|
+
owner = member.type === "admin" && role.type === "admin" && role.default === true
|
|
1382
|
+
staff = member.type === "admin" && role.type === "admin"
|
|
1395
1383
|
|
|
1396
1384
|
`role.default` is the marker because it is the only property of a platform
|
|
1397
1385
|
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 {
|
|
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
|
|
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
|
-
|
|
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
|
|
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,
|
|
479
|
+
const [residentsRes, acmUrl] = await Promise.all([
|
|
479
480
|
getResidents({ orgId: props.orgId, siteId: props.siteId, unitId: props.unit._id }),
|
|
480
|
-
|
|
481
|
+
getEncryptedAcmUrl(props.siteId),
|
|
481
482
|
]);
|
|
482
483
|
peopleItems.value = residentsRes?.data ?? [];
|
|
483
|
-
encryptedAcmUrl.value =
|
|
484
|
+
encryptedAcmUrl.value = acmUrl ?? "";
|
|
484
485
|
} catch {
|
|
485
486
|
peopleItems.value = [];
|
|
486
487
|
} finally {
|
|
@@ -27,7 +27,8 @@
|
|
|
27
27
|
Cancel
|
|
28
28
|
</v-btn>
|
|
29
29
|
|
|
30
|
-
<v-btn class="screen-btn-primary"
|
|
30
|
+
<v-btn class="screen-btn-primary" :class="{ 'no-permission': noPermission }"
|
|
31
|
+
:aria-disabled="noPermission || undefined" variant="flat" @click="emit('delete')">
|
|
31
32
|
Delete
|
|
32
33
|
</v-btn>
|
|
33
34
|
</div>
|
|
@@ -47,6 +48,15 @@ const props = defineProps({
|
|
|
47
48
|
loading: {
|
|
48
49
|
type: Boolean,
|
|
49
50
|
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
|
|
50
60
|
}
|
|
51
61
|
})
|
|
52
62
|
|
|
@@ -54,4 +64,9 @@ const emit = defineEmits(["close", "delete"])
|
|
|
54
64
|
|
|
55
65
|
</script>
|
|
56
66
|
|
|
57
|
-
<style scoped
|
|
67
|
+
<style scoped>
|
|
68
|
+
.no-permission {
|
|
69
|
+
opacity: 0.45;
|
|
70
|
+
cursor: not-allowed;
|
|
71
|
+
}
|
|
72
|
+
</style>
|
|
@@ -3,7 +3,10 @@
|
|
|
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
|
-
|
|
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 }">
|
|
7
10
|
{{ message }}
|
|
8
11
|
</span>
|
|
9
12
|
</v-card-text>
|
|
@@ -25,7 +28,8 @@
|
|
|
25
28
|
draws no destructive button, so overriding it here would be
|
|
26
29
|
inventing a control the design never named. Left as it renders
|
|
27
30
|
today and raised for a design decision. -->
|
|
28
|
-
<v-btn :class="confirmButtonColor ? 'text-none' : 'screen-btn-primary'"
|
|
31
|
+
<v-btn :class="[confirmButtonColor ? 'text-none' : 'screen-btn-primary', { 'no-permission': noPermission }]"
|
|
32
|
+
:aria-disabled="noPermission || undefined"
|
|
29
33
|
variant="flat" :color="confirmButtonColor || undefined" @click="emit('proceed')">
|
|
30
34
|
{{ confirmLabel }}
|
|
31
35
|
</v-btn>
|
|
@@ -54,6 +58,20 @@ const props = defineProps({
|
|
|
54
58
|
confirmButtonColor: {
|
|
55
59
|
type: String,
|
|
56
60
|
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
|
|
57
75
|
}
|
|
58
76
|
|
|
59
77
|
})
|
|
@@ -62,4 +80,9 @@ const emit = defineEmits(["close", "proceed"])
|
|
|
62
80
|
|
|
63
81
|
</script>
|
|
64
82
|
|
|
65
|
-
<style scoped
|
|
83
|
+
<style scoped>
|
|
84
|
+
.no-permission {
|
|
85
|
+
opacity: 0.45;
|
|
86
|
+
cursor: not-allowed;
|
|
87
|
+
}
|
|
88
|
+
</style>
|
|
@@ -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 }}
|