@7365admin1/layer-common 4.11.0 → 4.11.1-staging.314
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/components/DocumentForm.vue +407 -112
- package/components/DocumentManagement.vue +213 -12
- package/components/EntryPass/QrTemplatePreview.vue +21 -25
- package/components/Facility/BookingSetup.vue +63 -0
- package/components/HidIntercomManagement.vue +193 -43
- package/components/HidProfileQrCode.vue +323 -0
- package/components/HidReaderUserRoster.vue +32 -2
- package/components/HidUserEnrollment.vue +771 -212
- package/components/InvitationClientForm.vue +47 -8
- package/components/Layout/Header.vue +26 -0
- package/components/NotificationBell.vue +321 -0
- package/components/VisitorManagement.vue +267 -5
- package/composables/useDocument.ts +7 -0
- package/composables/useFacility.ts +11 -0
- package/composables/useHidAmico.ts +97 -0
- package/composables/useHidNavigation.ts +25 -1
- package/composables/useNotification.ts +78 -0
- package/composables/usePeople.ts +19 -0
- package/composables/useWebUsb.ts +14 -11
- package/package.json +1 -1
- package/pages/[org]/[site]/access-mgmt/hid-qr-code/index.vue +23 -0
- package/types/document.d.ts +14 -0
- package/types/facility.d.ts +4 -0
- package/types/people.d.ts +4 -1
- package/utils/materialSymbols.ts +3 -0
package/composables/useWebUsb.ts
CHANGED
|
@@ -345,16 +345,19 @@ export default function useWebUsb() {
|
|
|
345
345
|
70,
|
|
346
346
|
);
|
|
347
347
|
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
348
|
+
// The pass used to print five copies of the same QR - four 140px ones at
|
|
349
|
+
// the corners around a 250px centre - so a strip could be cut apart. It now
|
|
350
|
+
// prints a single large QR filling that same band (y 90 to 440, above the
|
|
351
|
+
// company name at y 470), which scans far more reliably on a thermal print.
|
|
352
|
+
// Generated at the size it is drawn at: the old corner copies were
|
|
353
|
+
// downscaled from the 250px canvas, which softened their modules.
|
|
354
|
+
const qrSize = 350;
|
|
355
|
+
const qrCanvas = await QRCode.toCanvas(qrUrlImage, {
|
|
356
|
+
width: qrSize,
|
|
357
|
+
margin: 1,
|
|
358
|
+
});
|
|
352
359
|
|
|
353
|
-
ctx.drawImage(qrCanvas,
|
|
354
|
-
ctx.drawImage(qrCanvas, canvas.width - qrSmall - margin, 90, qrSmall, qrSmall);
|
|
355
|
-
ctx.drawImage(qrCanvas, (canvas.width - qrCenter) / 2, 110, qrCenter, qrCenter);
|
|
356
|
-
ctx.drawImage(qrCanvas, margin, 300, qrSmall, qrSmall);
|
|
357
|
-
ctx.drawImage(qrCanvas, canvas.width - qrSmall - margin, 300, qrSmall, qrSmall);
|
|
360
|
+
ctx.drawImage(qrCanvas, (canvas.width - qrSize) / 2, 90, qrSize, qrSize);
|
|
358
361
|
|
|
359
362
|
ctx.font = "25px Arial";
|
|
360
363
|
ctx.fillText(companyName || "", canvas.width / 2, 470);
|
|
@@ -401,8 +404,8 @@ export default function useWebUsb() {
|
|
|
401
404
|
/**
|
|
402
405
|
* The self-service onboarding QR: one large QR code, a "SCAN QR CODE"-style
|
|
403
406
|
* subtext, and a dark site-name banner along the bottom - a single-purpose
|
|
404
|
-
* gate sign, not the
|
|
405
|
-
*
|
|
407
|
+
* gate sign, not the visitor-pass receipt `createReceiptLayout` produces
|
|
408
|
+
* (that one pairs its QR with company, date, access and instruction lines).
|
|
406
409
|
*/
|
|
407
410
|
async function createOnboardingQrLayout(
|
|
408
411
|
qrUrlImage: string,
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@7365admin1/layer-common",
|
|
3
3
|
"license": "MIT",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"version": "4.11.
|
|
5
|
+
"version": "4.11.1-staging.314",
|
|
6
6
|
"author": "7365admin1",
|
|
7
7
|
"main": "./nuxt.config.ts",
|
|
8
8
|
"//files": "What a consumer extending this layer actually loads. Without this npm ships the whole working tree - the changesets, the CI workflows, the render harness in tools/ and any scratch directory that happened to exist at publish time. Nuxt resolves a layer by directory, so every runtime directory below has to stay listed; adding a new top-level runtime directory means adding it here too.",
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<v-container fluid>
|
|
3
|
+
<HidEnabledGate
|
|
4
|
+
:site="siteId"
|
|
5
|
+
:org="orgId"
|
|
6
|
+
message="Enable HID as a service for this site before generating a QR code."
|
|
7
|
+
>
|
|
8
|
+
<HidProfileQrCode :site="siteId" />
|
|
9
|
+
</HidEnabledGate>
|
|
10
|
+
</v-container>
|
|
11
|
+
</template>
|
|
12
|
+
|
|
13
|
+
<script setup lang="ts">
|
|
14
|
+
definePageMeta({
|
|
15
|
+
layout: "default",
|
|
16
|
+
middleware: ["01-auth", "02-org"],
|
|
17
|
+
memberOnly: true,
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
const route = useRoute();
|
|
21
|
+
const siteId = computed(() => String(route.params.site ?? ""));
|
|
22
|
+
const orgId = computed(() => String(route.params.org ?? ""));
|
|
23
|
+
</script>
|
package/types/document.d.ts
CHANGED
|
@@ -3,4 +3,18 @@ declare type TDocument = {
|
|
|
3
3
|
name: string;
|
|
4
4
|
attachment: string;
|
|
5
5
|
type: string;
|
|
6
|
+
/**
|
|
7
|
+
* Set at upload or renewal, absent when the document never expires.
|
|
8
|
+
*
|
|
9
|
+
* An ISO instant on the way out of the API and a `YYYY-MM-DD` string on the
|
|
10
|
+
* way back in, which is what `InputDatePicker` binds to - hence the loose
|
|
11
|
+
* type rather than `string`.
|
|
12
|
+
*/
|
|
13
|
+
expiryDate?: string | Date | null;
|
|
14
|
+
remarks?: string;
|
|
15
|
+
size?: number;
|
|
16
|
+
parentId?: string | null;
|
|
17
|
+
createdAt?: string | Date;
|
|
18
|
+
updatedAt?: string | Date;
|
|
19
|
+
status?: string;
|
|
6
20
|
};
|
package/types/facility.d.ts
CHANGED
|
@@ -73,6 +73,10 @@ declare type TFacility = {
|
|
|
73
73
|
hourInterval?: number;
|
|
74
74
|
isBookingFeeEnabled: boolean;
|
|
75
75
|
isGuestEnabled: boolean;
|
|
76
|
+
/** Residents may complete this facility's checklist themselves. */
|
|
77
|
+
isResidentChecklistEnabled?: boolean;
|
|
78
|
+
/** Security may complete it. Mutually exclusive with the above. */
|
|
79
|
+
isSecurityChecklistEnabled?: boolean;
|
|
76
80
|
bookingAmount: number | null;
|
|
77
81
|
peakBookingFeeAmount?: number | null;
|
|
78
82
|
bookingFeeGuestAmount?: number | null;
|
package/types/people.d.ts
CHANGED
|
@@ -22,11 +22,14 @@ declare type TPeople = {
|
|
|
22
22
|
email?: string;
|
|
23
23
|
files?: { name: string, id: string }[];
|
|
24
24
|
isOwner?: boolean;
|
|
25
|
+
// Link to this person's `users` row. Empty for the person types that carry
|
|
26
|
+
// no login, and empty for a resident whose account was never written.
|
|
27
|
+
user?: string;
|
|
25
28
|
};
|
|
26
29
|
|
|
27
30
|
declare type TPlateNumber = { plateNumber: string, recNo: string, _id?: string, status: "active" | "deleted" | "pending", type: TVehicleType };
|
|
28
31
|
|
|
29
32
|
|
|
30
|
-
declare type TPeoplePayload = Pick<TGuest, "name" | "block" | "level" | "unit" | "unitName" | "contact" | "plateNumber" | "nric" | "contact" | "remarks" | "org" | "site" | "start" | "end" | "type" | "isOwner"> & { status?: string }
|
|
33
|
+
declare type TPeoplePayload = Pick<TGuest, "name" | "block" | "level" | "unit" | "unitName" | "contact" | "plateNumber" | "nric" | "contact" | "remarks" | "org" | "site" | "start" | "end" | "type" | "isOwner"> & { status?: string; user?: string }
|
|
31
34
|
|
|
32
35
|
declare type TPeopleType = "guest" | "resident" | "tenant"
|
package/utils/materialSymbols.ts
CHANGED
|
@@ -242,6 +242,9 @@ export const MDI_TO_SYMBOL: Record<string, string> = {
|
|
|
242
242
|
"mdi-link-variant": "link",
|
|
243
243
|
"mdi-lan-connect": "lan",
|
|
244
244
|
"mdi-lan-disconnect": "link_off", // NEAREST: no disconnected-LAN glyph
|
|
245
|
+
"mdi-lan-check": "network_check",
|
|
246
|
+
"mdi-dialpad": "dialpad",
|
|
247
|
+
"mdi-headset": "headset_mic",
|
|
245
248
|
"mdi-bluetooth": "bluetooth",
|
|
246
249
|
"mdi-nfc": "nfc",
|
|
247
250
|
|