@7365admin1/layer-common 1.10.6 → 1.10.7
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/AccessCardQrTagging.vue +314 -34
- package/components/AccessCardQrTaggingPrintQr.vue +75 -0
- package/components/AreaChecklistHistoryLogs.vue +9 -0
- package/components/BuildingForm.vue +36 -5
- package/components/BuildingManagement/buildings.vue +18 -9
- package/components/BuildingManagement/units.vue +12 -114
- package/components/BuildingUnitFormAdd.vue +39 -30
- package/components/BuildingUnitFormEdit.vue +265 -116
- package/components/CleaningScheduleMain.vue +60 -13
- package/components/Dialog/DeleteConfirmation.vue +2 -2
- package/components/Dialog/UpdateMoreAction.vue +2 -2
- package/components/EntryPassInformation.vue +215 -0
- package/components/Input/InputPhoneNumberV2.vue +8 -0
- package/components/ManageChecklistMain.vue +29 -3
- package/components/ScheduleAreaMain.vue +56 -0
- package/components/TableHygiene.vue +27 -0
- package/components/UnitPersonCard.vue +63 -0
- package/components/VehicleAddSelection.vue +2 -2
- package/components/VehicleForm.vue +78 -19
- package/components/VehicleManagement.vue +164 -40
- package/components/VisitorForm.vue +19 -0
- package/composables/useAccessManagement.ts +52 -0
- package/composables/usePeople.ts +4 -3
- package/composables/useVehicle.ts +15 -1
- package/package.json +3 -2
- package/types/cleaner-schedule.d.ts +1 -0
- package/types/html2pdf.d.ts +19 -0
- package/types/people.d.ts +2 -1
- package/types/site.d.ts +8 -0
- package/types/vehicle.d.ts +2 -3
- package/.playground/app.vue +0 -41
- package/.playground/eslint.config.mjs +0 -6
- package/.playground/nuxt.config.ts +0 -22
- package/.playground/pages/feedback.vue +0 -30
|
@@ -172,6 +172,55 @@ export default function useAccessManagement() {
|
|
|
172
172
|
);
|
|
173
173
|
}
|
|
174
174
|
|
|
175
|
+
function saveVisitorAccessCardQrTag(
|
|
176
|
+
siteId: string,
|
|
177
|
+
payloads: Array<{
|
|
178
|
+
_id: string;
|
|
179
|
+
cardNo: string;
|
|
180
|
+
qrTag: string;
|
|
181
|
+
qrTagCardNo: string;
|
|
182
|
+
}>
|
|
183
|
+
) {
|
|
184
|
+
return useNuxtApp().$api<Record<string, any>>(
|
|
185
|
+
`/api/access-management/qr-tag/${siteId}`,
|
|
186
|
+
{
|
|
187
|
+
method: "POST",
|
|
188
|
+
body: payloads,
|
|
189
|
+
}
|
|
190
|
+
);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
function getAllVisitorAccessCardsQrTags(site: string) {
|
|
194
|
+
return useNuxtApp().$api<Record<string, any>>(
|
|
195
|
+
`/api/access-management/qr-tag`,
|
|
196
|
+
{
|
|
197
|
+
method: "GET",
|
|
198
|
+
query: { site },
|
|
199
|
+
}
|
|
200
|
+
);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
function getVisitorAccessCards(params: {
|
|
204
|
+
page?: number;
|
|
205
|
+
limit?: number;
|
|
206
|
+
site?: string;
|
|
207
|
+
search?: string;
|
|
208
|
+
} = {}) {
|
|
209
|
+
return useNuxtApp().$api<Record<string, any>>(
|
|
210
|
+
`/api/access-management/visitor-access-cards`,
|
|
211
|
+
{
|
|
212
|
+
method: "GET",
|
|
213
|
+
query: {
|
|
214
|
+
type: "Visitor/Resident",
|
|
215
|
+
...(params.page ? { page: params.page } : {}),
|
|
216
|
+
...(params.limit ? { limit: params.limit } : {}),
|
|
217
|
+
...(params.site ? { site: params.site } : {}),
|
|
218
|
+
...(params.search ? { search: params.search } : {}),
|
|
219
|
+
},
|
|
220
|
+
}
|
|
221
|
+
);
|
|
222
|
+
}
|
|
223
|
+
|
|
175
224
|
return {
|
|
176
225
|
getDoorAccessLevels,
|
|
177
226
|
getLiftAccessLevels,
|
|
@@ -186,5 +235,8 @@ export default function useAccessManagement() {
|
|
|
186
235
|
deleteCard,
|
|
187
236
|
getCardHistory,
|
|
188
237
|
getCardDetails,
|
|
238
|
+
getVisitorAccessCards,
|
|
239
|
+
saveVisitorAccessCardQrTag,
|
|
240
|
+
getAllVisitorAccessCardsQrTags,
|
|
189
241
|
};
|
|
190
242
|
}
|
package/composables/usePeople.ts
CHANGED
|
@@ -10,10 +10,11 @@ export default function () {
|
|
|
10
10
|
dateFrom = "",
|
|
11
11
|
type = "",
|
|
12
12
|
displayNoCheckOut = false,
|
|
13
|
+
status = "",
|
|
13
14
|
} = {}) {
|
|
14
15
|
return await useNuxtApp().$api<Record<string, any>>("/api/people", {
|
|
15
16
|
method: "GET",
|
|
16
|
-
query: { page, limit, sort, search, org, site, dateTo, dateFrom, type },
|
|
17
|
+
query: { page, limit, sort, search, org, site, dateTo, dateFrom, type, status },
|
|
17
18
|
});
|
|
18
19
|
}
|
|
19
20
|
|
|
@@ -87,13 +88,13 @@ export default function () {
|
|
|
87
88
|
|
|
88
89
|
async function getPeopleByUnit(
|
|
89
90
|
_id: string,
|
|
90
|
-
{ status = "active", type = "
|
|
91
|
+
{ status = "active", type = "" } = {}
|
|
91
92
|
) {
|
|
92
93
|
return await useNuxtApp().$api<Record<string, any>>(
|
|
93
94
|
`/api/people/unit/${_id}`,
|
|
94
95
|
{
|
|
95
96
|
method: "GET",
|
|
96
|
-
query: { status
|
|
97
|
+
query: { status },
|
|
97
98
|
}
|
|
98
99
|
);
|
|
99
100
|
}
|
|
@@ -64,6 +64,19 @@ export default function useVehicle() {
|
|
|
64
64
|
);
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
+
async function approveVehicle({ site, org, id }: { site: string, org: string, id: string}){
|
|
68
|
+
return await useNuxtApp().$api<Record<string, any>>(
|
|
69
|
+
`/api/vehicles/approve/ ${id}`,
|
|
70
|
+
{
|
|
71
|
+
method: "PUT",
|
|
72
|
+
body: {
|
|
73
|
+
site,
|
|
74
|
+
org,
|
|
75
|
+
},
|
|
76
|
+
}
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
|
|
67
80
|
async function getVehicleByNRIC(search: string) {
|
|
68
81
|
return await useNuxtApp().$api<Record<string, any>>(
|
|
69
82
|
`/api/vehicles/nric`,
|
|
@@ -109,6 +122,7 @@ export default function useVehicle() {
|
|
|
109
122
|
updateVehicle,
|
|
110
123
|
deleteVehicle,
|
|
111
124
|
getVehicleByNRIC,
|
|
112
|
-
formatVehicleStatus
|
|
125
|
+
formatVehicleStatus,
|
|
126
|
+
approveVehicle
|
|
113
127
|
};
|
|
114
128
|
}
|
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.10.
|
|
5
|
+
"version": "1.10.7",
|
|
6
6
|
"author": "7365admin1",
|
|
7
7
|
"main": "./nuxt.config.ts",
|
|
8
8
|
"publishConfig": {
|
|
@@ -30,11 +30,12 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@ckeditor/ckeditor5-vue": "^7.3.0",
|
|
32
32
|
"@iconify/vue": "^5.0.0",
|
|
33
|
-
"qrcode.vue": "^3.4.1",
|
|
34
33
|
"@mdi/font": "^7.4.47",
|
|
35
34
|
"@types/qrcode": "^1.5.6",
|
|
36
35
|
"ckeditor5": "^47.2.0",
|
|
36
|
+
"html2pdf.js": "^0.10.2",
|
|
37
37
|
"qrcode": "^1.5.4",
|
|
38
|
+
"qrcode.vue": "^3.4.1",
|
|
38
39
|
"sass": "^1.80.6",
|
|
39
40
|
"vue3-signature": "^0.2.4",
|
|
40
41
|
"zod": "^3.24.2"
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
declare module "html2pdf.js" {
|
|
2
|
+
interface Html2PdfOptions {
|
|
3
|
+
margin?: number | number[];
|
|
4
|
+
filename?: string;
|
|
5
|
+
image?: { type?: string; quality?: number };
|
|
6
|
+
html2canvas?: Record<string, any>;
|
|
7
|
+
jsPDF?: Record<string, any>;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
interface Html2Pdf {
|
|
11
|
+
set(options: Html2PdfOptions): Html2Pdf;
|
|
12
|
+
from(element: HTMLElement): Html2Pdf;
|
|
13
|
+
save(): Promise<void>;
|
|
14
|
+
output(type: string): Promise<any>;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function html2pdf(): Html2Pdf;
|
|
18
|
+
export default html2pdf;
|
|
19
|
+
}
|
package/types/people.d.ts
CHANGED
|
@@ -17,9 +17,10 @@ declare type TPeople = {
|
|
|
17
17
|
site?: string,
|
|
18
18
|
type?: TPeopleType;
|
|
19
19
|
plates?: TPlateNumber[]
|
|
20
|
+
email?: string;
|
|
20
21
|
};
|
|
21
22
|
|
|
22
|
-
declare type TPlateNumber = { plateNumber: string, recNo: string }
|
|
23
|
+
declare type TPlateNumber = { plateNumber: string, recNo: string, _id?: string, status: "active" | "deleted" | "pending", type: TVehicleType };
|
|
23
24
|
|
|
24
25
|
|
|
25
26
|
declare type TPeoplePayload = Pick<TGuest, "name" | "block" | "level" | "unit" | "unitName" | "contact" | "plateNumber" | "nric" | "contact" | "remarks" | "org" | "site" | "start" | "end" | "type">
|
package/types/site.d.ts
CHANGED
package/types/vehicle.d.ts
CHANGED
|
@@ -20,11 +20,10 @@ declare type TVehicle = {
|
|
|
20
20
|
recNo?: string;
|
|
21
21
|
};
|
|
22
22
|
|
|
23
|
-
declare type TVehicleType = "whitelist" | "blocklist"
|
|
23
|
+
declare type TVehicleType = "whitelist" | "blocklist";
|
|
24
24
|
|
|
25
25
|
declare type TVehiclePayload = Pick<
|
|
26
26
|
TVehicle,
|
|
27
|
-
| "plateNumber"
|
|
28
27
|
| "type"
|
|
29
28
|
| "category"
|
|
30
29
|
| "direction"
|
|
@@ -40,4 +39,4 @@ declare type TVehiclePayload = Pick<
|
|
|
40
39
|
| "end"
|
|
41
40
|
| "site"
|
|
42
41
|
| "org"
|
|
43
|
-
|
|
42
|
+
> & { plateNumber: string[] };
|
package/.playground/app.vue
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<v-app>
|
|
3
|
-
<LayoutHeader />
|
|
4
|
-
|
|
5
|
-
<LayoutNavigationDrawer :navigation-items="navigationItems" />
|
|
6
|
-
|
|
7
|
-
<v-main>
|
|
8
|
-
<NuxtLayout> <NuxtPage /> </NuxtLayout>
|
|
9
|
-
</v-main>
|
|
10
|
-
</v-app>
|
|
11
|
-
</template>
|
|
12
|
-
|
|
13
|
-
<script setup lang="ts">
|
|
14
|
-
const navigationItems = computed(() => {
|
|
15
|
-
const items: Array<TNavigationItem> = [];
|
|
16
|
-
items.push(
|
|
17
|
-
{
|
|
18
|
-
title: "Create new request",
|
|
19
|
-
route: { name: "index" },
|
|
20
|
-
icon: "mdi-plus",
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
title: "Requests",
|
|
24
|
-
route: { name: "index" },
|
|
25
|
-
icon: "mdi-account-circle",
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
title: "Draft",
|
|
29
|
-
route: { name: "index" },
|
|
30
|
-
icon: "mdi-account-circle",
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
title: "Feedback",
|
|
34
|
-
route: { name: "feedback" },
|
|
35
|
-
icon: "mdi-account-circle",
|
|
36
|
-
}
|
|
37
|
-
);
|
|
38
|
-
|
|
39
|
-
return items;
|
|
40
|
-
});
|
|
41
|
-
</script>
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export default defineNuxtConfig({
|
|
2
|
-
extends: [".."],
|
|
3
|
-
modules: ["@nuxt/eslint"],
|
|
4
|
-
compatibilityDate: "2024-11-03",
|
|
5
|
-
|
|
6
|
-
runtimeConfig: {
|
|
7
|
-
public: {
|
|
8
|
-
cookieConfig: {
|
|
9
|
-
domain: (process.env.DOMAIN as string) ?? "localhost",
|
|
10
|
-
secure: true,
|
|
11
|
-
maxAge: 30 * 24 * 60 * 60,
|
|
12
|
-
},
|
|
13
|
-
APP_NAME: (process.env.APP_NAME as string) ?? "App",
|
|
14
|
-
APP_NAME_ROUTE: (process.env.APP_NAME_ROUTE as string) ?? "index",
|
|
15
|
-
APP_ACCOUNT: (process.env.APP_ACCOUNT as string) ?? "",
|
|
16
|
-
API_DO_STORAGE_ENDPOINT:
|
|
17
|
-
(process.env.API_DO_STORAGE_ENDPOINT as string) ?? "",
|
|
18
|
-
APP_ADMIN: (process.env.APP_ADMIN as string) ?? "",
|
|
19
|
-
APP_CBA_RECAP: (process.env.APP_CBA_RECAP as string) ?? "",
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
});
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<v-row class="no-gutters" align="center" justify="center">
|
|
3
|
-
<v-col cols="12" md="10" lg="10">
|
|
4
|
-
<FeedbackListView @click:create="showCreateDialog = true" />
|
|
5
|
-
</v-col>
|
|
6
|
-
|
|
7
|
-
<v-dialog
|
|
8
|
-
v-model="showCreateDialog"
|
|
9
|
-
fullscreen
|
|
10
|
-
transition="dialog-right-transition"
|
|
11
|
-
persistent
|
|
12
|
-
>
|
|
13
|
-
<v-card
|
|
14
|
-
class="ml-auto"
|
|
15
|
-
style="
|
|
16
|
-
height: 100vh;
|
|
17
|
-
width: 400px;
|
|
18
|
-
border-top-left-radius: 12px;
|
|
19
|
-
border-bottom-left-radius: 12px;
|
|
20
|
-
"
|
|
21
|
-
>
|
|
22
|
-
<FeedbackFormCreate @close="showCreateDialog = false" />
|
|
23
|
-
</v-card>
|
|
24
|
-
</v-dialog>
|
|
25
|
-
</v-row>
|
|
26
|
-
</template>
|
|
27
|
-
|
|
28
|
-
<script lang="ts" setup>
|
|
29
|
-
const showCreateDialog = ref(false);
|
|
30
|
-
</script>
|