@7365admin1/layer-common 1.11.17 → 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.
- package/CHANGELOG.md +6 -0
- package/components/Card/MemberInfoSummary.vue +5 -1
- package/components/MemberInformation.vue +92 -20
- package/components/PassInformation.vue +75 -30
- package/components/VehicleManagement.vue +107 -34
- package/components/VisitorForm.vue +72 -30
- package/components/VisitorManagement.vue +244 -29
- package/composables/useKey.ts +4 -0
- package/composables/useLocalAuth.ts +2 -4
- package/composables/useTemplateReusable.ts +5 -1
- package/composables/useVehicle.ts +3 -3
- package/package.json +1 -1
- package/types/vehicle.d.ts +2 -1
- package/types/visitor.d.ts +13 -2
|
@@ -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
|
|
58
|
+
recno?: string;
|
|
59
59
|
type: "whitelist" | "blocklist";
|
|
60
60
|
}
|
|
61
61
|
|
package/package.json
CHANGED
package/types/vehicle.d.ts
CHANGED
|
@@ -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
|
|
47
|
+
> & { plateNumber?: string | string[] };
|
package/types/visitor.d.ts
CHANGED
|
@@ -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
|
|
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
|
+
}
|