@7365admin1/layer-common 3.0.24 → 3.0.26
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 +13 -0
- package/components/AccessCardAddForm.vue +2 -2
- package/components/AccessCardAssignToUnitForm.vue +2 -2
- package/components/AccessCardDetailsDialog.vue +31 -1
- package/components/AccessManagement.vue +16 -6
- package/components/AddPassKeyToVisitor.vue +346 -225
- package/components/BuildingUnitFormEdit.vue +1 -1
- package/components/DashboardMain.vue +124 -60
- package/components/DocumentManagement.vue +294 -1
- package/components/HidIntercomManagement.vue +186 -0
- package/components/HidReaderManagement.vue +21 -1
- package/components/Nfc/NFCPatrolReportMain.vue +1 -0
- package/components/Nfc/PatrolReport/PatrolReportTab.vue +2 -1
- package/components/Nfc/PatrolReport/ReportFilters.vue +3 -1
- package/components/RolePermissionMain.vue +34 -5
- package/components/SiteSettings.vue +3 -1
- package/components/VisitorForm.vue +174 -398
- package/components/VisitorManagement.vue +302 -679
- package/components/VisitorSocketPopUp.vue +29 -1
- package/composables/useANPRSettings.ts +57 -8
- package/composables/useAccessManagement.ts +9 -1
- package/composables/useCleaningPermission.ts +2 -2
- package/composables/useCommonPermission.ts +2 -39
- package/composables/useDocument.ts +21 -0
- package/composables/useLocalAuth.ts +3 -1
- package/composables/useNFCPatrolLog.ts +35 -0
- package/composables/useNFCPatrolReport.ts +37 -4
- package/composables/useNFCPatrolReportFilters.ts +28 -5
- package/package.json +1 -1
- package/pages/[org]/[site]/access-mgmt/administrator/index.vue +2 -0
- package/pages/[org]/[site]/access-mgmt/hid-readers/index.vue +2 -0
- package/pages/[org]/[site]/access-mgmt/hid-users/index.vue +2 -0
- package/pages/[org]/[site]/access-mgmt/identity-mapping/index.vue +2 -0
- package/services/nfcPatrolReport.ts +5 -1
- package/types/nfc-patrol-report.ts +7 -1
- package/types/visitor.d.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @iservice365/layer-common
|
|
2
2
|
|
|
3
|
+
## 3.0.26
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 4c4e01d: Update Package Version
|
|
8
|
+
- 165fd5a: Update Layer Common Version
|
|
9
|
+
|
|
10
|
+
## 3.0.25
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- d4a5bb0: Update Layer Common Version
|
|
15
|
+
|
|
3
16
|
## 3.0.24
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
|
@@ -650,7 +650,7 @@ watch(() => card.value.showAssign, async (newVal) => {
|
|
|
650
650
|
const response = await _getBlockLevelUnitList(siteId);
|
|
651
651
|
blockLevelUnitData.value = (response as any)?.data || [];
|
|
652
652
|
buildingItems.value = blockLevelUnitData.value.map((b: any) => ({
|
|
653
|
-
name: b.block
|
|
653
|
+
name: `${b.block} (${b.name})`,
|
|
654
654
|
value: b._id,
|
|
655
655
|
}));
|
|
656
656
|
} catch (error) {
|
|
@@ -676,7 +676,7 @@ watch(() => card.value.assignBuilding, (newVal) => {
|
|
|
676
676
|
if (newVal) {
|
|
677
677
|
const selectedBlock = blockLevelUnitData.value.find((b: any) => b._id === newVal);
|
|
678
678
|
levelItems.value = selectedBlock?.levels?.map((l: any) => ({
|
|
679
|
-
name: l.
|
|
679
|
+
name: l.name,
|
|
680
680
|
value: l._id,
|
|
681
681
|
})) || [];
|
|
682
682
|
} else {
|
|
@@ -309,7 +309,7 @@ onMounted(async () => {
|
|
|
309
309
|
if (blockLevelResult.status === "fulfilled") {
|
|
310
310
|
blockLevelUnitData.value = (blockLevelResult.value as any)?.data || [];
|
|
311
311
|
buildingItems.value = blockLevelUnitData.value.map((b: any) => ({
|
|
312
|
-
name: b.block
|
|
312
|
+
name: `${b.block} (${b.name})`,
|
|
313
313
|
value: b._id,
|
|
314
314
|
}));
|
|
315
315
|
}
|
|
@@ -352,7 +352,7 @@ watch(
|
|
|
352
352
|
const selectedBlock = blockLevelUnitData.value.find((b: any) => b._id === newVal);
|
|
353
353
|
if (selectedBlock?.levels) {
|
|
354
354
|
levelItems.value = selectedBlock.levels.map((l: any) => ({
|
|
355
|
-
name: l.
|
|
355
|
+
name: l.name,
|
|
356
356
|
value: l._id,
|
|
357
357
|
}));
|
|
358
358
|
}
|
|
@@ -54,9 +54,39 @@
|
|
|
54
54
|
|
|
55
55
|
<div>
|
|
56
56
|
<div class="text-caption text-grey">User</div>
|
|
57
|
-
<div class="text-body-2 font-weight-medium">
|
|
57
|
+
<div class="text-body-2 font-weight-medium">
|
|
58
|
+
{{ details.userCred?.name ?? details.user?.name ?? "N/A" }}
|
|
59
|
+
<template v-if="details.user?.email">({{ details.user.email }})</template>
|
|
60
|
+
</div>
|
|
58
61
|
</div>
|
|
59
62
|
|
|
63
|
+
<!-- Visitor Credentials -->
|
|
64
|
+
<template v-if="details.userCred">
|
|
65
|
+
<v-divider />
|
|
66
|
+
<div class="text-caption font-weight-bold text-grey-darken-2 text-uppercase">Visitor Information</div>
|
|
67
|
+
|
|
68
|
+
<div>
|
|
69
|
+
<div class="text-caption text-grey">NRIC</div>
|
|
70
|
+
<div class="text-body-2 font-weight-medium">{{ details.userCred.nric ?? "N/A" }}</div>
|
|
71
|
+
</div>
|
|
72
|
+
|
|
73
|
+
<div>
|
|
74
|
+
<div class="text-caption text-grey">Contact</div>
|
|
75
|
+
<div class="text-body-2 font-weight-medium">{{ details.userCred.contact ?? "N/A" }}</div>
|
|
76
|
+
</div>
|
|
77
|
+
|
|
78
|
+
<div v-if="details.userCred.company">
|
|
79
|
+
<div class="text-caption text-grey">Company</div>
|
|
80
|
+
<div class="text-body-2 font-weight-medium">{{ details.userCred.company }}</div>
|
|
81
|
+
</div>
|
|
82
|
+
|
|
83
|
+
<div v-if="details.userCred.plateNumber">
|
|
84
|
+
<div class="text-caption text-grey">Plate Number</div>
|
|
85
|
+
<div class="text-body-2 font-weight-medium">{{ details.userCred.plateNumber }}</div>
|
|
86
|
+
</div>
|
|
87
|
+
<v-divider />
|
|
88
|
+
</template>
|
|
89
|
+
|
|
60
90
|
<div>
|
|
61
91
|
<div class="text-caption text-grey">Created At</div>
|
|
62
92
|
<div class="text-body-2 font-weight-medium">{{ formatDate(details.createdAt) }}</div>
|
|
@@ -152,6 +152,10 @@ const props = defineProps({
|
|
|
152
152
|
headers: {
|
|
153
153
|
type: Array as PropType<Array<Record<string, any>>>,
|
|
154
154
|
default: () => [
|
|
155
|
+
{
|
|
156
|
+
title: "Block Name",
|
|
157
|
+
value: "block.name",
|
|
158
|
+
},
|
|
155
159
|
{
|
|
156
160
|
title: "Block",
|
|
157
161
|
value: "block.block",
|
|
@@ -180,10 +184,6 @@ const props = defineProps({
|
|
|
180
184
|
title: "Asgn. (NP)",
|
|
181
185
|
value: "cardCounts.assigned.non_physical",
|
|
182
186
|
},
|
|
183
|
-
{
|
|
184
|
-
title: "Total",
|
|
185
|
-
value: "totalCardCount",
|
|
186
|
-
},
|
|
187
187
|
// { title: "Action", value: "action-table" },
|
|
188
188
|
],
|
|
189
189
|
},
|
|
@@ -234,6 +234,7 @@ const deleteLoading = ref(false);
|
|
|
234
234
|
const deleteError = ref("");
|
|
235
235
|
const confirmDialog = ref(false);
|
|
236
236
|
const searchText = ref("");
|
|
237
|
+
const debouncedSearch = ref("");
|
|
237
238
|
const replaceDialog = ref(false);
|
|
238
239
|
|
|
239
240
|
const route = useRoute();
|
|
@@ -277,16 +278,25 @@ const {
|
|
|
277
278
|
() =>
|
|
278
279
|
getUserTypeAccessCards({
|
|
279
280
|
page: page.value,
|
|
280
|
-
search:
|
|
281
|
+
search: debouncedSearch.value,
|
|
281
282
|
organization: orgId.value,
|
|
282
283
|
site: siteId.value,
|
|
283
284
|
userType: "Visitor/Resident",
|
|
284
285
|
}),
|
|
285
286
|
{
|
|
286
|
-
watch: [page,
|
|
287
|
+
watch: [page, debouncedSearch],
|
|
287
288
|
}
|
|
288
289
|
);
|
|
289
290
|
|
|
291
|
+
let debounceTimer: ReturnType<typeof setTimeout> | null = null;
|
|
292
|
+
watch(searchText, (val) => {
|
|
293
|
+
page.value = 1;
|
|
294
|
+
if (debounceTimer) clearTimeout(debounceTimer);
|
|
295
|
+
debounceTimer = setTimeout(() => {
|
|
296
|
+
debouncedSearch.value = val;
|
|
297
|
+
}, 400);
|
|
298
|
+
});
|
|
299
|
+
|
|
290
300
|
const loading = computed(() => getAllReqStatus.value === "pending");
|
|
291
301
|
|
|
292
302
|
watchEffect(() => {
|