@7365admin1/layer-common 1.11.20 → 1.11.22
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/AddPassKeyToVisitor.vue +117 -56
- package/components/AreaMain.vue +10 -8
- package/components/BulletinBoardView.vue +158 -16
- package/components/OvernightParkingAvailability.vue +286 -151
- package/components/ScanVisitorQRCode.vue +157 -0
- package/components/SiteSettings.vue +303 -243
- package/components/TableMain.vue +72 -21
- package/components/UnitMain.vue +10 -8
- package/components/VisitorForm.vue +1 -1
- package/components/VisitorManagement.vue +598 -229
- package/composables/useOrg.ts +16 -0
- package/composables/useVisitor.ts +12 -0
- package/package.json +1 -1
- package/plugins/html5-qrcode.client.js +8 -0
- package/types/overnight-parking.d.ts +3 -2
package/composables/useOrg.ts
CHANGED
|
@@ -112,6 +112,21 @@ export default function useOrg() {
|
|
|
112
112
|
});
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
+
function addOnboardingOrg(
|
|
116
|
+
value: Partial<Pick<TOrg, "name" | "email" | "nature" | "contact">>
|
|
117
|
+
) {
|
|
118
|
+
return useNuxtApp()
|
|
119
|
+
.$api<Record<string, any>>("/api/organizations/onboarding-org", {
|
|
120
|
+
method: "POST",
|
|
121
|
+
body: value,
|
|
122
|
+
})
|
|
123
|
+
.then((response: Record<string, any>) => {
|
|
124
|
+
return (
|
|
125
|
+
response?.organization ?? response?.org ?? response?.data ?? response
|
|
126
|
+
) as TOrg;
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
|
|
115
130
|
return {
|
|
116
131
|
org,
|
|
117
132
|
getOrgs,
|
|
@@ -125,5 +140,6 @@ export default function useOrg() {
|
|
|
125
140
|
getById,
|
|
126
141
|
getAll,
|
|
127
142
|
add,
|
|
143
|
+
addOnboardingOrg,
|
|
128
144
|
};
|
|
129
145
|
}
|
|
@@ -111,6 +111,17 @@ export default function () {
|
|
|
111
111
|
);
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
+
async function updateVisitorPassKey(_id: string, payload: TPassKeyPayload[]){
|
|
115
|
+
return await useNuxtApp().$api<Record<string, any>>(
|
|
116
|
+
`/api/visitor-transactions/replace-keys/id/${_id}`,
|
|
117
|
+
{
|
|
118
|
+
method: "PUT",
|
|
119
|
+
body: payload,
|
|
120
|
+
}
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
|
|
114
125
|
return {
|
|
115
126
|
typeFieldMap,
|
|
116
127
|
visitorSelection,
|
|
@@ -119,5 +130,6 @@ export default function () {
|
|
|
119
130
|
getVisitors,
|
|
120
131
|
updateVisitor,
|
|
121
132
|
deleteVisitor,
|
|
133
|
+
updateVisitorPassKey
|
|
122
134
|
};
|
|
123
135
|
}
|
package/package.json
CHANGED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// plugins/html5-qrcode.client.js
|
|
2
|
+
import { defineNuxtPlugin } from "#app";
|
|
3
|
+
import { Html5Qrcode } from "html5-qrcode";
|
|
4
|
+
|
|
5
|
+
export default defineNuxtPlugin((nuxtApp) => {
|
|
6
|
+
// Attach Html5Qrcode to the global Vue instance
|
|
7
|
+
nuxtApp.provide("Html5Qrcode", Html5Qrcode);
|
|
8
|
+
});
|
|
@@ -12,6 +12,7 @@ declare type TOvernightParkingAvailability = {
|
|
|
12
12
|
friday: TOvernightParkingDay;
|
|
13
13
|
saturday: TOvernightParkingDay;
|
|
14
14
|
sunday: TOvernightParkingDay;
|
|
15
|
+
isAllowPlateNumberOpenBarrier?: boolean;
|
|
15
16
|
autoApproveOvernightParking?: boolean;
|
|
16
17
|
};
|
|
17
18
|
|
|
@@ -35,9 +36,9 @@ declare type TOvernightParkingRequest = {
|
|
|
35
36
|
invitedBy: {
|
|
36
37
|
_id: string | ObjectId;
|
|
37
38
|
name: string;
|
|
38
|
-
}
|
|
39
|
+
};
|
|
39
40
|
createdAt?: string | Date;
|
|
40
41
|
updatedAt?: string | Date;
|
|
41
42
|
deletedAt?: string | Date;
|
|
42
43
|
remarks?: string;
|
|
43
|
-
};
|
|
44
|
+
};
|