@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.
@@ -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,
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@7365admin1/layer-common",
3
3
  "license": "MIT",
4
4
  "type": "module",
5
- "version": "3.0.26",
5
+ "version": "3.0.28",
6
6
  "author": "7365admin1",
7
7
  "main": "./nuxt.config.ts",
8
8
  "publishConfig": {