@7365admin1/layer-common 1.11.19 → 1.11.21
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 +114 -53
- package/components/AreaChecklistHistoryMain.vue +29 -1
- package/components/BulletinBoardView.vue +158 -16
- package/components/CleaningScheduleMain.vue +2 -2
- package/components/Input/DateTimePicker.vue +45 -9
- package/components/OvernightParkingAvailability.vue +291 -155
- package/components/ScanVisitorQRCode.vue +157 -0
- package/components/ScheduleAreaMain.vue +6 -6
- package/components/SiteSettings.vue +303 -243
- package/components/TableMain.vue +72 -21
- package/components/VisitorManagement.vue +656 -234
- package/composables/useFeedback.ts +1 -1
- package/composables/useOrg.ts +16 -0
- package/composables/useSiteSettings.ts +30 -1
- 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
|
}
|
|
@@ -140,6 +140,33 @@ export default function () {
|
|
|
140
140
|
);
|
|
141
141
|
}
|
|
142
142
|
|
|
143
|
+
async function getOvernightParkingAvailabilityV2(
|
|
144
|
+
siteId: string,
|
|
145
|
+
userType = "site"
|
|
146
|
+
) {
|
|
147
|
+
return await useNuxtApp().$api<Record<string, any>>(
|
|
148
|
+
`/api/overnight-parking-approval-settings2/v1`,
|
|
149
|
+
{
|
|
150
|
+
method: "PATCH",
|
|
151
|
+
body: JSON.stringify({ site: siteId, userType }),
|
|
152
|
+
}
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
async function createOrUpdateOvernightParkingAvailabilityV2(
|
|
157
|
+
siteId: string,
|
|
158
|
+
payload: Record<string, any>,
|
|
159
|
+
userType = "site"
|
|
160
|
+
) {
|
|
161
|
+
return await useNuxtApp().$api<Record<string, any>>(
|
|
162
|
+
`/api/overnight-parking-approval-settings2/v1`,
|
|
163
|
+
{
|
|
164
|
+
method: "POST",
|
|
165
|
+
body: JSON.stringify({ site: siteId, userType, ...payload }),
|
|
166
|
+
}
|
|
167
|
+
);
|
|
168
|
+
}
|
|
169
|
+
|
|
143
170
|
return {
|
|
144
171
|
getSiteById,
|
|
145
172
|
getSiteLevels,
|
|
@@ -153,6 +180,8 @@ export default function () {
|
|
|
153
180
|
updateSitebyId,
|
|
154
181
|
updateSiteInformation,
|
|
155
182
|
getOvernightParkingAvailability,
|
|
156
|
-
updateOvernightParkingAvailability
|
|
183
|
+
updateOvernightParkingAvailability,
|
|
184
|
+
getOvernightParkingAvailabilityV2,
|
|
185
|
+
createOrUpdateOvernightParkingAvailabilityV2,
|
|
157
186
|
};
|
|
158
187
|
}
|
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
|
+
};
|