@7365admin1/layer-common 3.0.26 → 3.0.28
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/AccessCardDetailsDialog.vue +98 -2
- package/components/AccessCardPreviewDialog.vue +37 -6
- package/components/AccessManagement.vue +10 -1
- package/components/BulletinBoardView.vue +368 -288
- package/components/EntryPassInformation.vue +55 -17
- package/components/HidReaderForm.vue +10 -16
- package/components/MemberInformation.vue +59 -1
- package/components/VisitorForm.vue +251 -22
- package/components/VisitorManagement.vue +790 -219
- package/composables/useAccessManagement.ts +8 -0
- package/composables/useVisitor.ts +29 -0
- package/package.json +1 -1
|
@@ -321,6 +321,13 @@ export default function useAccessManagement() {
|
|
|
321
321
|
);
|
|
322
322
|
}
|
|
323
323
|
|
|
324
|
+
function visitorCheckout(payload: { cards: { cardId: string; userId: string; status: string; remarks: string }[] }) {
|
|
325
|
+
return useNuxtApp().$api<Record<string, any>>(
|
|
326
|
+
`/api/access-management/visitor-checkout`,
|
|
327
|
+
{ method: "PATCH", body: payload }
|
|
328
|
+
);
|
|
329
|
+
}
|
|
330
|
+
|
|
324
331
|
return {
|
|
325
332
|
getResidents,
|
|
326
333
|
assignUser,
|
|
@@ -345,5 +352,6 @@ export default function useAccessManagement() {
|
|
|
345
352
|
createVisitorPass,
|
|
346
353
|
signQr,
|
|
347
354
|
getBlockLevelUnitList,
|
|
355
|
+
visitorCheckout,
|
|
348
356
|
};
|
|
349
357
|
}
|
|
@@ -94,6 +94,14 @@ export default function () {
|
|
|
94
94
|
tab?: string;
|
|
95
95
|
};
|
|
96
96
|
|
|
97
|
+
type SearchUncheckedOutUnregisteredVisitorParams = {
|
|
98
|
+
site: string;
|
|
99
|
+
plateNumber: string;
|
|
100
|
+
hourAgo?: number;
|
|
101
|
+
page?: number;
|
|
102
|
+
limit?: number;
|
|
103
|
+
};
|
|
104
|
+
|
|
97
105
|
const tab = useState("visitorsTab", () => "visitor");
|
|
98
106
|
|
|
99
107
|
async function getVisitors({
|
|
@@ -159,6 +167,26 @@ export default function () {
|
|
|
159
167
|
);
|
|
160
168
|
}
|
|
161
169
|
|
|
170
|
+
async function checkSearchUncheckedOutUnregisteredVisitor({
|
|
171
|
+
site,
|
|
172
|
+
plateNumber,
|
|
173
|
+
hourAgo = 24,
|
|
174
|
+
page = 1,
|
|
175
|
+
limit = 100,
|
|
176
|
+
}: SearchUncheckedOutUnregisteredVisitorParams) {
|
|
177
|
+
return await useNuxtApp().$api<Record<string, any>>("/api/visitors", {
|
|
178
|
+
method: "GET",
|
|
179
|
+
query: {
|
|
180
|
+
site,
|
|
181
|
+
type: "uncheckout-unregistered",
|
|
182
|
+
plateNumber,
|
|
183
|
+
hourAgo,
|
|
184
|
+
page,
|
|
185
|
+
limit,
|
|
186
|
+
},
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
|
|
162
190
|
async function deleteVisitor(_id: string) {
|
|
163
191
|
return await useNuxtApp().$api<Record<string, any>>(
|
|
164
192
|
`/api/visitor-transactions/id/${_id}`,
|
|
@@ -198,6 +226,7 @@ export default function () {
|
|
|
198
226
|
contractorTypes,
|
|
199
227
|
createVisitor,
|
|
200
228
|
getVisitors,
|
|
229
|
+
checkSearchUncheckedOutUnregisteredVisitor,
|
|
201
230
|
updateVisitor,
|
|
202
231
|
deleteVisitor,
|
|
203
232
|
validateVisitorQrCode,
|