@7365admin1/layer-common 3.0.27 → 3.0.29
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 +12 -0
- package/components/AccessCardDetailsDialog.vue +24 -11
- package/components/AccessCardPreviewDialog.vue +7 -3
- package/components/BulletinBoardView.vue +368 -288
- package/components/VehicleForm.vue +570 -285
- package/components/VisitorForm.vue +417 -82
- package/components/VisitorManagement.vue +43 -11
- package/composables/useAccessManagement.ts +1 -1
- package/composables/useVisitor.ts +63 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -60,19 +60,31 @@
|
|
|
60
60
|
</div>
|
|
61
61
|
</div>
|
|
62
62
|
|
|
63
|
-
|
|
63
|
+
<div v-if="details.userType">
|
|
64
|
+
<div class="text-caption text-grey">User Type</div>
|
|
65
|
+
<div class="text-body-2 font-weight-medium">{{ details.userType }}</div>
|
|
66
|
+
</div>
|
|
67
|
+
|
|
68
|
+
<!-- Visitor / Resident Credentials -->
|
|
64
69
|
<template v-if="details.userCred">
|
|
65
70
|
<v-divider />
|
|
66
|
-
<div class="text-caption font-weight-bold text-grey-darken-2 text-uppercase">
|
|
71
|
+
<div class="text-caption font-weight-bold text-grey-darken-2 text-uppercase">
|
|
72
|
+
{{ details.userType ?? "Visitor Information" }}
|
|
73
|
+
</div>
|
|
74
|
+
|
|
75
|
+
<div v-if="details.userCred.email">
|
|
76
|
+
<div class="text-caption text-grey">Email</div>
|
|
77
|
+
<div class="text-body-2 font-weight-medium">{{ details.userCred.email }}</div>
|
|
78
|
+
</div>
|
|
67
79
|
|
|
68
|
-
<div>
|
|
80
|
+
<div v-if="details.userCred.nric">
|
|
69
81
|
<div class="text-caption text-grey">NRIC</div>
|
|
70
|
-
<div class="text-body-2 font-weight-medium">{{ details.userCred.nric
|
|
82
|
+
<div class="text-body-2 font-weight-medium">{{ details.userCred.nric }}</div>
|
|
71
83
|
</div>
|
|
72
84
|
|
|
73
|
-
<div>
|
|
85
|
+
<div v-if="details.userCred.contact">
|
|
74
86
|
<div class="text-caption text-grey">Contact</div>
|
|
75
|
-
<div class="text-body-2 font-weight-medium">{{ details.userCred.contact
|
|
87
|
+
<div class="text-body-2 font-weight-medium">{{ details.userCred.contact }}</div>
|
|
76
88
|
</div>
|
|
77
89
|
|
|
78
90
|
<div v-if="details.userCred.company">
|
|
@@ -125,7 +137,7 @@
|
|
|
125
137
|
<div class="d-flex flex-column align-center" style="width: 20px; flex-shrink: 0;">
|
|
126
138
|
<div
|
|
127
139
|
class="timeline-dot rounded-circle mt-1"
|
|
128
|
-
:class="entry.visitorId ? 'bg-blue' : 'bg-orange'"
|
|
140
|
+
:class="(entry.type === 'assigned' || entry.visitorId) ? 'bg-blue' : 'bg-orange'"
|
|
129
141
|
/>
|
|
130
142
|
<div
|
|
131
143
|
v-if="idx < sortedHistory.length - 1"
|
|
@@ -139,20 +151,21 @@
|
|
|
139
151
|
<v-chip
|
|
140
152
|
size="x-small"
|
|
141
153
|
variant="tonal"
|
|
142
|
-
:color="entry.visitorId ? 'blue' : 'orange'"
|
|
143
|
-
:prepend-icon="entry.visitorId ? 'mdi-account-arrow-right' : 'mdi-arrow-u-left-top'"
|
|
154
|
+
:color="(entry.type === 'assigned' || entry.visitorId) ? 'blue' : 'orange'"
|
|
155
|
+
:prepend-icon="(entry.type === 'assigned' || entry.visitorId) ? 'mdi-account-arrow-right' : 'mdi-arrow-u-left-top'"
|
|
144
156
|
>
|
|
145
|
-
{{ entry.visitorId ? "Assigned" : "Returned" }}
|
|
157
|
+
{{ (entry.type === 'assigned' || entry.visitorId) ? "Assigned" : "Returned" }}
|
|
146
158
|
</v-chip>
|
|
147
159
|
<span class="text-caption text-grey">{{ formatDate(entry.createdAt) }}</span>
|
|
148
160
|
</div>
|
|
149
161
|
|
|
150
162
|
<!-- Assignment entry -->
|
|
151
|
-
<template v-if="entry.visitorId">
|
|
163
|
+
<template v-if="entry.type === 'assigned' || entry.visitorId">
|
|
152
164
|
<div class="text-body-2 font-weight-medium">{{ entry.name ?? "N/A" }}</div>
|
|
153
165
|
<div class="text-caption text-grey-darken-1">
|
|
154
166
|
<span v-if="entry.nric">NRIC: {{ entry.nric }}</span>
|
|
155
167
|
<span v-if="entry.contact" class="ml-2">· {{ entry.contact }}</span>
|
|
168
|
+
<span v-if="entry.email && !entry.nric && !entry.contact">{{ entry.email }}</span>
|
|
156
169
|
</div>
|
|
157
170
|
<div class="text-caption text-grey-darken-1">
|
|
158
171
|
<span v-if="entry.company">{{ entry.company }}</span>
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
<div class="text-caption font-weight-bold mb-1 text-uppercase text-grey-darken-1">
|
|
42
42
|
Person <span class="text-error">*</span>
|
|
43
43
|
</div>
|
|
44
|
-
<v-
|
|
44
|
+
<v-select
|
|
45
45
|
v-model="assignPerson"
|
|
46
46
|
:items="filteredPeopleItems"
|
|
47
47
|
density="compact"
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
{{ personTypeLabel(item.raw) }}
|
|
64
64
|
</v-chip>
|
|
65
65
|
</template>
|
|
66
|
-
</v-
|
|
66
|
+
</v-select>
|
|
67
67
|
<p v-if="assignError" class="text-error text-caption mt-2">{{ assignError }}</p>
|
|
68
68
|
</v-card-text>
|
|
69
69
|
|
|
@@ -536,6 +536,7 @@ async function confirmAssign() {
|
|
|
536
536
|
unit: props.unit._id,
|
|
537
537
|
type: selectedCardType.value,
|
|
538
538
|
acm_url: encryptedAcmUrl.value,
|
|
539
|
+
id: props.selectedCardInUnit?._id,
|
|
539
540
|
});
|
|
540
541
|
emit("assign-to-person", {
|
|
541
542
|
card: props.selectedCardInUnit,
|
|
@@ -545,7 +546,10 @@ async function confirmAssign() {
|
|
|
545
546
|
cancelAssign();
|
|
546
547
|
emit("refresh");
|
|
547
548
|
} catch (e: any) {
|
|
548
|
-
const
|
|
549
|
+
const rawMsg = e?.data?.message ?? "";
|
|
550
|
+
const msg = rawMsg.includes("500")
|
|
551
|
+
? "EntryPass server is unavailable. Please contact your administrator."
|
|
552
|
+
: rawMsg || "Failed to assign. Please try again.";
|
|
549
553
|
assignError.value = msg;
|
|
550
554
|
showToast(msg, "error");
|
|
551
555
|
} finally {
|