@7365admin1/layer-common 4.0.3-staging.232 → 4.0.3-staging.234
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/HidAccessLogDashboard.vue +16 -77
- package/components/HidQrCodeConfiguration.vue +37 -38
- package/components/HidReaderManagement.vue +18 -284
- package/components/HidReaderUserRoster.vue +303 -60
- package/components/HidUserEnrollment.vue +26 -43
- package/components/VisitorForm.vue +25 -10
- package/composables/useHidAmico.ts +1 -0
- package/composables/useHidNavigation.ts +0 -7
- package/package.json +3 -2
- package/components/HidUserMapping.vue +0 -583
- package/pages/[org]/[site]/access-mgmt/hid-user-mapping/index.vue +0 -23
- package/utils/breadcrumb.test.ts +0 -108
- package/utils/camera-wall.test.ts +0 -634
- package/utils/client-nature.test.ts +0 -77
- package/utils/client-subscription.test.ts +0 -240
- package/utils/console-tier.test.ts +0 -87
- package/utils/dashboard.test.ts +0 -118
- package/utils/data.test.ts +0 -179
- package/utils/hid-discover.test.ts +0 -115
- package/utils/list-page.test.ts +0 -60
- package/utils/nav-sections.test.ts +0 -190
- package/utils/nfc-patrol-report.test.ts +0 -130
- package/utils/promo-code-form.test.ts +0 -437
- package/utils/role.test.ts +0 -69
- package/utils/route-name.test.ts +0 -85
- package/utils/status.test.ts +0 -110
- package/utils/subscription-form.test.ts +0 -284
- package/utils/table-card.test.ts +0 -84
- package/utils/theme.test.ts +0 -679
|
@@ -1,23 +0,0 @@
|
|
|
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 mapping HID users."
|
|
7
|
-
>
|
|
8
|
-
<HidUserMapping :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/utils/breadcrumb.test.ts
DELETED
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import assert from "node:assert/strict";
|
|
2
|
-
import { test } from "node:test";
|
|
3
|
-
|
|
4
|
-
import { moduleNameFromRoute } from "./breadcrumb.ts";
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Real routes, not invented ones: name, path and parameters exactly as
|
|
8
|
-
* vue-router hands them to the bar in each application.
|
|
9
|
-
*/
|
|
10
|
-
const ID = "68b0c1d2e3f4a5b6c7d8e9f0";
|
|
11
|
-
|
|
12
|
-
test("a site application names the page, not its parameters", () => {
|
|
13
|
-
assert.equal(
|
|
14
|
-
moduleNameFromRoute({
|
|
15
|
-
name: "org-site-work-orders",
|
|
16
|
-
path: `/${ID}/${ID}/work-orders`,
|
|
17
|
-
params: { org: ID, site: ID },
|
|
18
|
-
}),
|
|
19
|
-
"Work Orders"
|
|
20
|
-
);
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
test("a detail route names its module, not its argument", () => {
|
|
24
|
-
assert.equal(
|
|
25
|
-
moduleNameFromRoute({
|
|
26
|
-
name: "org-site-feedbacks-id",
|
|
27
|
-
path: `/${ID}/${ID}/feedbacks/${ID}`,
|
|
28
|
-
params: { org: ID, site: ID, id: ID },
|
|
29
|
-
}),
|
|
30
|
-
"Feedbacks"
|
|
31
|
-
);
|
|
32
|
-
assert.equal(
|
|
33
|
-
moduleNameFromRoute({
|
|
34
|
-
name: "org-site-members-status",
|
|
35
|
-
path: `/${ID}/${ID}/members/pending`,
|
|
36
|
-
params: { org: ID, site: ID, status: "pending" },
|
|
37
|
-
}),
|
|
38
|
-
"Members"
|
|
39
|
-
);
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
test("a fixed folder in front of the context parameter is not the page", () => {
|
|
43
|
-
// THE DEFECT: every screen of the organization application read "Org".
|
|
44
|
-
assert.equal(
|
|
45
|
-
moduleNameFromRoute({
|
|
46
|
-
name: "org-organization-marketplace",
|
|
47
|
-
path: `/org/${ID}/marketplace`,
|
|
48
|
-
params: { organization: ID },
|
|
49
|
-
}),
|
|
50
|
-
"Marketplace"
|
|
51
|
-
);
|
|
52
|
-
assert.equal(
|
|
53
|
-
moduleNameFromRoute({
|
|
54
|
-
name: "org-organization-payment-methods-linked",
|
|
55
|
-
path: `/org/${ID}/payment-methods/linked`,
|
|
56
|
-
params: { organization: ID },
|
|
57
|
-
}),
|
|
58
|
-
"Payment Methods Linked"
|
|
59
|
-
);
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
test("a literal second segment is NOT a skipped context", () => {
|
|
63
|
-
// `/organizations/status/:status` also begins with a literal folder, but
|
|
64
|
-
// "Organizations" is the page here - only the THIRD segment is a parameter.
|
|
65
|
-
assert.equal(
|
|
66
|
-
moduleNameFromRoute({
|
|
67
|
-
name: "organizations-status-status",
|
|
68
|
-
path: "/organizations/status/pending",
|
|
69
|
-
params: { status: "pending" },
|
|
70
|
-
}),
|
|
71
|
-
"Organizations"
|
|
72
|
-
);
|
|
73
|
-
});
|
|
74
|
-
|
|
75
|
-
test("a route with no parameters is left alone", () => {
|
|
76
|
-
assert.equal(
|
|
77
|
-
moduleNameFromRoute({
|
|
78
|
-
name: "super-admin-client-list",
|
|
79
|
-
path: "/super-admin/client-list",
|
|
80
|
-
params: {},
|
|
81
|
-
}),
|
|
82
|
-
"Super Admin Client List"
|
|
83
|
-
);
|
|
84
|
-
assert.equal(
|
|
85
|
-
moduleNameFromRoute({ name: "personal-info-name", path: "/personal-info/name", params: {} }),
|
|
86
|
-
"Personal Info Name"
|
|
87
|
-
);
|
|
88
|
-
});
|
|
89
|
-
|
|
90
|
-
test("acronyms keep their case", () => {
|
|
91
|
-
assert.equal(
|
|
92
|
-
moduleNameFromRoute({
|
|
93
|
-
name: "org-site-virtual-patrol-cctv",
|
|
94
|
-
path: `/${ID}/${ID}/virtual-patrol/cctv`,
|
|
95
|
-
params: { org: ID, site: ID },
|
|
96
|
-
}),
|
|
97
|
-
"Virtual Patrol CCTV"
|
|
98
|
-
);
|
|
99
|
-
});
|
|
100
|
-
|
|
101
|
-
test("a context-only route has no page half", () => {
|
|
102
|
-
// The organization dashboard: the bar shows the organization's name alone.
|
|
103
|
-
assert.equal(
|
|
104
|
-
moduleNameFromRoute({ name: "org-organization", path: `/org/${ID}`, params: { organization: ID } }),
|
|
105
|
-
""
|
|
106
|
-
);
|
|
107
|
-
assert.equal(moduleNameFromRoute({ name: "", path: "/", params: {} }), "");
|
|
108
|
-
});
|