@7365admin1/layer-common 4.17.1-staging.333 → 4.17.1-staging.334
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.
|
@@ -401,7 +401,10 @@ const exportForm = reactive({
|
|
|
401
401
|
});
|
|
402
402
|
|
|
403
403
|
const statusOptions = ["Authorized", "Not Authorized", "Unknown"];
|
|
404
|
-
const accessMethodFilterOptions = ["Facial", "QR Code", "ID and Password", "PIN", "Card"];
|
|
404
|
+
const accessMethodFilterOptions = ["Facial", "QR Code", "ID and Password", "PIN", "Card", "Intercom"];
|
|
405
|
+
|
|
406
|
+
/** The persisted event the resident app records when it opens a door on a call. */
|
|
407
|
+
const INTERCOM_DOOR_OPEN_EVENT = "intercom_door_open";
|
|
405
408
|
const accessMethodOptions = ["All", ...accessMethodFilterOptions];
|
|
406
409
|
|
|
407
410
|
const readerOptions = computed(() =>
|
|
@@ -606,7 +609,7 @@ async function loadDashboard() {
|
|
|
606
609
|
resetDashboardData();
|
|
607
610
|
try {
|
|
608
611
|
const isVisitorTab = activeTab.value === "visitor";
|
|
609
|
-
const [logResponse, hidAccessLogResponse, visitorResponse, readerUserResponse] = await Promise.all([
|
|
612
|
+
const [logResponse, intercomLogResponse, hidAccessLogResponse, visitorResponse, readerUserResponse] = await Promise.all([
|
|
610
613
|
loadDashboardSource(
|
|
611
614
|
getLogs(selectedReaderId.value, {
|
|
612
615
|
page: page.value,
|
|
@@ -615,6 +618,20 @@ async function loadDashboard() {
|
|
|
615
618
|
null,
|
|
616
619
|
"persisted access logs",
|
|
617
620
|
),
|
|
621
|
+
// Door opens from the resident app during an intercom call. The reader
|
|
622
|
+
// never logs a DTMF door open, so these exist only as persisted events
|
|
623
|
+
// and are fetched by type: the general page above is shared with every
|
|
624
|
+
// other event the reader emits and is dropped whenever the reader has
|
|
625
|
+
// live logs, which it always has.
|
|
626
|
+
loadDashboardSource(
|
|
627
|
+
getLogs(selectedReaderId.value, {
|
|
628
|
+
page: page.value,
|
|
629
|
+
limit,
|
|
630
|
+
type: INTERCOM_DOOR_OPEN_EVENT,
|
|
631
|
+
}),
|
|
632
|
+
null,
|
|
633
|
+
"intercom door-open logs",
|
|
634
|
+
),
|
|
618
635
|
loadDashboardSource(
|
|
619
636
|
getReaderAccessLogs(selectedReaderId.value, {
|
|
620
637
|
page: page.value,
|
|
@@ -681,9 +698,14 @@ async function loadDashboard() {
|
|
|
681
698
|
// identity metadata here: it can contain a stale photo from another user.
|
|
682
699
|
allIdentities.value = readerUsers;
|
|
683
700
|
identities.value = readerUsers;
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
701
|
+
const intercomItems = intercomLogResponse?.items ?? intercomLogResponse?.data?.items ?? intercomLogResponse?.data?.logs ?? [];
|
|
702
|
+
logs.value = [
|
|
703
|
+
...(liveItems.length
|
|
704
|
+
? []
|
|
705
|
+
: logResponse?.items ?? logResponse?.data?.items ?? logResponse?.data?.logs ?? []),
|
|
706
|
+
// Always kept: the reader has no live counterpart for these.
|
|
707
|
+
...intercomItems,
|
|
708
|
+
];
|
|
687
709
|
liveAccessLogs.value = liveItems;
|
|
688
710
|
serverPages.value = Number(hidAccessLogResponse?.pages ?? hidAccessLogResponse?.data?.pages ?? 1);
|
|
689
711
|
serverPageRange.value = String(
|
|
@@ -819,6 +841,8 @@ function getAccessMethod(identity: HidAccessRecord, log?: HidAccessRecord) {
|
|
|
819
841
|
id_password: "ID and Password",
|
|
820
842
|
pin: "PIN",
|
|
821
843
|
card: "Card",
|
|
844
|
+
// Set by the API on intercom_door_open events; no reader field implies it.
|
|
845
|
+
intercom: "Intercom",
|
|
822
846
|
};
|
|
823
847
|
const normalizedMethod = String(payload.normalizedMethod || "");
|
|
824
848
|
if (normalizedMethodLabels[normalizedMethod]) return normalizedMethodLabels[normalizedMethod];
|
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.17.1-staging.
|
|
5
|
+
"version": "4.17.1-staging.334",
|
|
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.",
|