@7365admin1/layer-common 1.11.16 → 1.11.18

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.
@@ -269,14 +269,18 @@ export default function useTemplateReusable() {
269
269
  _id,
270
270
  site,
271
271
  status,
272
+ userType,
273
+ updatedBy,
272
274
  }: {
273
275
  _id?: string;
274
276
  site?: string;
275
277
  status?: string;
278
+ userType?: string;
279
+ updatedBy?: string;
276
280
  }) {
277
281
  return useNuxtApp().$api("/api/qr-code-templates/v1", {
278
282
  method: "PUT",
279
- body: { _id, site, status },
283
+ body: { _id, site, status, userType, updatedBy },
280
284
  });
281
285
  }
282
286
 
@@ -27,7 +27,7 @@ export default function useVehicle() {
27
27
  }
28
28
 
29
29
  async function updateVehicle(id: string, payload: Partial<TVehiclePayload>) {
30
- return await useNuxtApp().$api<Record<string, any>>(`/api/vehicles/${id}`, {
30
+ return await useNuxtApp().$api<Record<string, any>>(`/api/vehicles/id/${id}`, {
31
31
  method: "PUT",
32
32
  body: payload,
33
33
  });
@@ -51,11 +51,11 @@ export default function useVehicle() {
51
51
  }
52
52
  );
53
53
  }
54
-
54
+
55
55
  interface IDeleteVehicleParams {
56
56
  site: string;
57
57
  id: string;
58
- recno: string;
58
+ recno?: string;
59
59
  type: "whitelist" | "blocklist";
60
60
  }
61
61
 
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@7365admin1/layer-common",
3
3
  "license": "MIT",
4
4
  "type": "module",
5
- "version": "1.11.16",
5
+ "version": "1.11.18",
6
6
  "author": "7365admin1",
7
7
  "main": "./nuxt.config.ts",
8
8
  "publishConfig": {
@@ -9,6 +9,7 @@ declare type TVehicle = {
9
9
  block: number | "";
10
10
  level: string;
11
11
  unit: string;
12
+ uniName?: string; // For display purposes, the API will return the unit name if available
12
13
  nric?: string | null;
13
14
  remarks?: string;
14
15
  seasonPassType?: string;
@@ -43,4 +44,4 @@ declare type TVehiclePayload = Pick<
43
44
  | "site"
44
45
  | "org"
45
46
  | "peopleId"
46
- > & { plateNumber: string[] };
47
+ > & { plateNumber?: string | string[] };
@@ -20,11 +20,15 @@ declare type TVisitor = {
20
20
  org: string;
21
21
  site: string,
22
22
  manualCheckout?: boolean;
23
+ visitorPass?: TPassKeyPayload[];
24
+ passKeys?: TPassKeyPayload[]
25
+ checkInRemarks?: string;
26
+ checkOutRemarks?: string;
23
27
  };
24
28
 
25
29
  declare type TVisitorType = "contractor" | "delivery" | "walk-in" | "pick-up" | "drop-off" | "guest";
26
30
 
27
- declare type TVisitorPayload = Pick<TVisitor, "name" | "type" | "company" | "block" | "level" | "unit" | "unitName" | "contact" | "plateNumber" | "checkOut" | "contractorType" | "deliveryType" | "nric" | "contact" | "remarks" | "attachments" | "org" | "site" | "status"> & {
31
+ declare type TVisitorPayload = Pick<TVisitor, "name" | "type" | "company" | "block" | "level" | "unit" | "unitName" | "contact" | "plateNumber" | "checkOut" | "contractorType" | "deliveryType" | "nric" | "contact" | "remarks" | "attachments" | "org" | "site" | "status" | "visitorPass" | "passKeys" | "checkInRemarks" | "checkOutRemarks"> & {
28
32
  members?: TMemberInfo[]
29
33
  }
30
34
 
@@ -38,6 +42,13 @@ declare type TDefaultOptionObj = {
38
42
  declare type TMemberInfo = {
39
43
  name: string;
40
44
  nric: string;
41
- visitorPass: string;
45
+ visitorPass?: string;
46
+ passKeys?: TPassKeyPayload[];
42
47
  contact: string
43
48
  }
49
+
50
+ declare type TPassKeyPayload = {
51
+ keyId: string;
52
+ status?: string;
53
+ remarks?: string;
54
+ }