@7365admin1/layer-common 3.2.2-staging.118 → 3.2.2-staging.120
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/components/AddPassKeyToVisitor.vue +95 -73
- package/components/IncidentReport/Authorities.vue +30 -18
- package/components/ScanVisitorQRCode.vue +64 -28
- package/components/SearchVehicleNumberUser.vue +39 -37
- package/components/VehicleAddSelection.vue +48 -32
- package/components/VehicleForm.vue +112 -129
- package/components/VehicleUpdateMoreAction.vue +59 -46
- package/components/VisitorDataFromScannedQRCodeForm.vue +90 -65
- package/components/VisitorFormSelection.vue +40 -37
- package/components/VisitorPassKeyQRScanner.vue +65 -18
- package/components/VisitorSocketPopUp.vue +21 -13
- package/components/VisitorsReportPreview.vue +41 -29
- package/package.json +1 -1
|
@@ -1,46 +1,23 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<v-card width="100%">
|
|
3
|
-
<v-
|
|
4
|
-
<v-row no-gutters class="fill-height px-6" align="center">
|
|
5
|
-
<span class="font-weight-bold text-h5 text-capitalize">
|
|
6
|
-
{{ mode }} Visitor
|
|
7
|
-
</span>
|
|
8
|
-
</v-row>
|
|
9
|
-
</v-toolbar>
|
|
2
|
+
<v-card width="100%" class="screen-modal visitor-select">
|
|
3
|
+
<v-card-title class="text-capitalize">{{ mode }} Visitor</v-card-title>
|
|
10
4
|
|
|
11
|
-
<
|
|
12
|
-
<
|
|
5
|
+
<div class="screen-modal__body visitor-select__body">
|
|
6
|
+
<p class="visitor-select__hint">Please Select Visitor Type</p>
|
|
13
7
|
<template v-for="item in selection" :key="item.value">
|
|
14
|
-
<
|
|
8
|
+
<AppButton
|
|
15
9
|
v-if="showSelection(item)"
|
|
16
|
-
|
|
17
|
-
block
|
|
18
|
-
variant="flat"
|
|
19
|
-
rounded="md"
|
|
20
|
-
size="48"
|
|
21
|
-
:text="item.label"
|
|
10
|
+
class="visitor-select__option"
|
|
22
11
|
@click="select(item.value)"
|
|
23
|
-
|
|
24
|
-
|
|
12
|
+
>
|
|
13
|
+
{{ item.label }}
|
|
14
|
+
</AppButton>
|
|
25
15
|
</template>
|
|
26
|
-
</
|
|
16
|
+
</div>
|
|
27
17
|
|
|
28
|
-
<
|
|
29
|
-
<
|
|
30
|
-
|
|
31
|
-
<v-btn
|
|
32
|
-
tile
|
|
33
|
-
block
|
|
34
|
-
variant="text"
|
|
35
|
-
class="text-none"
|
|
36
|
-
size="48"
|
|
37
|
-
@click="cancel"
|
|
38
|
-
>
|
|
39
|
-
Cancel
|
|
40
|
-
</v-btn>
|
|
41
|
-
</v-col>
|
|
42
|
-
</v-row>
|
|
43
|
-
</v-toolbar>
|
|
18
|
+
<div class="visitor-select__footer">
|
|
19
|
+
<AppButton variant="ghost" @click="cancel">Cancel</AppButton>
|
|
20
|
+
</div>
|
|
44
21
|
</v-card>
|
|
45
22
|
</template>
|
|
46
23
|
|
|
@@ -69,6 +46,32 @@ function showSelection(item: any) {
|
|
|
69
46
|
if(item.value === 'walk-in' && prop.mode === 'register') {
|
|
70
47
|
return false ;
|
|
71
48
|
} return true;
|
|
72
|
-
|
|
49
|
+
|
|
73
50
|
}
|
|
74
51
|
</script>
|
|
52
|
+
|
|
53
|
+
<style scoped>
|
|
54
|
+
/* Same shape as the Add Vehicle prompt: full-width choices, one per row. */
|
|
55
|
+
.visitor-select__body {
|
|
56
|
+
padding: 20px;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.visitor-select__hint {
|
|
60
|
+
margin: 0 0 14px;
|
|
61
|
+
text-align: center;
|
|
62
|
+
font-size: var(--fs-cell);
|
|
63
|
+
color: var(--muted);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.visitor-select__option {
|
|
67
|
+
display: flex;
|
|
68
|
+
width: 100%;
|
|
69
|
+
margin-bottom: 10px;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.visitor-select__footer {
|
|
73
|
+
display: flex;
|
|
74
|
+
justify-content: flex-end;
|
|
75
|
+
padding: 0 20px 20px;
|
|
76
|
+
}
|
|
77
|
+
</style>
|
|
@@ -3,26 +3,27 @@
|
|
|
3
3
|
@after-enter="handleScanVisitorQRCode">
|
|
4
4
|
<v-container class="d-flex justify-center" max-height="90vh">
|
|
5
5
|
<!-- QR code reader container -->
|
|
6
|
-
<v-card
|
|
7
|
-
<
|
|
8
|
-
<v-card-title
|
|
9
|
-
<
|
|
10
|
-
<v-btn color="grey-darken-1" icon="mdi-close" @click="closeDialog()" />
|
|
11
|
-
</v-toolbar>
|
|
12
|
-
|
|
13
|
-
<div id="reader" class="d-flex justify-center align-center w-100 h-100"
|
|
14
|
-
style="height: calc(100vh - 64px)">
|
|
15
|
-
<!-- The QR code scanner box -->
|
|
16
|
-
<!-- This is where the QR code scanner will be displayed -->
|
|
6
|
+
<v-card class="screen-modal qr-scanner">
|
|
7
|
+
<div class="qr-scanner__head">
|
|
8
|
+
<v-card-title>Scan QR Code</v-card-title>
|
|
9
|
+
<AppButton variant="icon" icon="mdi-close" @click="closeDialog()" />
|
|
17
10
|
</div>
|
|
18
|
-
|
|
19
|
-
<div
|
|
20
|
-
<
|
|
11
|
+
|
|
12
|
+
<div class="screen-modal__body qr-scanner__body">
|
|
13
|
+
<div id="reader" class="qr-scanner__reader">
|
|
14
|
+
<!-- The QR code scanner box -->
|
|
15
|
+
<!-- This is where the QR code scanner will be displayed -->
|
|
16
|
+
</div>
|
|
17
|
+
<!-- Show Error Messages -->
|
|
18
|
+
<p v-if="showNotFoundMessage" class="qr-scanner__error">{{ errorMessage }}</p>
|
|
19
|
+
<!-- Switch camera button inside the reader box -->
|
|
20
|
+
<AppButton
|
|
21
|
+
icon="mdi-camera-switch"
|
|
22
|
+
class="qr-scanner__switch"
|
|
23
|
+
aria-label="Switch camera"
|
|
24
|
+
@click="switchCamera()"
|
|
25
|
+
/>
|
|
21
26
|
</div>
|
|
22
|
-
<!-- Switch camera button inside the reader box -->
|
|
23
|
-
<v-btn color="primary" icon class="mt-4" @click="switchCamera()">
|
|
24
|
-
<v-icon icon="mdi-camera-switch" large />
|
|
25
|
-
</v-btn>
|
|
26
27
|
</v-card>
|
|
27
28
|
</v-container>
|
|
28
29
|
</v-dialog>
|
|
@@ -136,3 +137,49 @@ const stopScanner = () => {
|
|
|
136
137
|
});
|
|
137
138
|
};
|
|
138
139
|
</script>
|
|
140
|
+
|
|
141
|
+
<style scoped>
|
|
142
|
+
/* The card used to be `w-100` inside the centring container; keep that width
|
|
143
|
+
or the dialog collapses to the width of the reader box. */
|
|
144
|
+
.qr-scanner {
|
|
145
|
+
width: 100%;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.qr-scanner__head {
|
|
149
|
+
display: flex;
|
|
150
|
+
align-items: center;
|
|
151
|
+
justify-content: space-between;
|
|
152
|
+
padding-right: 12px;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.qr-scanner__body {
|
|
156
|
+
display: flex;
|
|
157
|
+
flex-direction: column;
|
|
158
|
+
align-items: center;
|
|
159
|
+
gap: 16px;
|
|
160
|
+
padding: 4px 20px 20px;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/* The scanner paints its own video into this box; only the frame is ours. */
|
|
164
|
+
.qr-scanner__reader {
|
|
165
|
+
display: flex;
|
|
166
|
+
align-items: center;
|
|
167
|
+
justify-content: center;
|
|
168
|
+
width: 100%;
|
|
169
|
+
min-height: 320px;
|
|
170
|
+
border: 1px solid var(--border);
|
|
171
|
+
border-radius: var(--r-inner);
|
|
172
|
+
background: var(--thead);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.qr-scanner__error {
|
|
176
|
+
margin: 0;
|
|
177
|
+
font-size: var(--fs-cell);
|
|
178
|
+
color: var(--err);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.qr-scanner__switch {
|
|
182
|
+
width: var(--btn-h);
|
|
183
|
+
padding: 0;
|
|
184
|
+
}
|
|
185
|
+
</style>
|
|
@@ -90,19 +90,14 @@
|
|
|
90
90
|
</v-snackbar>
|
|
91
91
|
|
|
92
92
|
<v-dialog v-model="permanentMessageDialog.modal" max-width="480" persistent>
|
|
93
|
-
<v-card>
|
|
94
|
-
<v-card-title
|
|
95
|
-
<
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
@click="permanentMessageDialog.modal = false"
|
|
102
|
-
>
|
|
103
|
-
Close
|
|
104
|
-
</v-btn>
|
|
105
|
-
</v-card-actions>
|
|
93
|
+
<v-card class="screen-modal socket-notice">
|
|
94
|
+
<v-card-title>Notice</v-card-title>
|
|
95
|
+
<div class="screen-modal__body socket-notice__body">
|
|
96
|
+
{{ permanentMessageDialog.text }}
|
|
97
|
+
</div>
|
|
98
|
+
<div class="socket-notice__footer">
|
|
99
|
+
<AppButton @click="permanentMessageDialog.modal = false">Close</AppButton>
|
|
100
|
+
</div>
|
|
106
101
|
</v-card>
|
|
107
102
|
</v-dialog>
|
|
108
103
|
</div>
|
|
@@ -372,3 +367,16 @@ onUnmounted(() => {
|
|
|
372
367
|
|
|
373
368
|
|
|
374
369
|
</script>
|
|
370
|
+
|
|
371
|
+
<style scoped>
|
|
372
|
+
.socket-notice__body {
|
|
373
|
+
padding: 4px 20px 0;
|
|
374
|
+
color: var(--text2);
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
.socket-notice__footer {
|
|
378
|
+
display: flex;
|
|
379
|
+
justify-content: flex-end;
|
|
380
|
+
padding: 16px 20px 20px;
|
|
381
|
+
}
|
|
382
|
+
</style>
|
|
@@ -1,22 +1,25 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<AppCard class="pa-2 pa-sm-5">
|
|
3
3
|
<v-row no-gutters>
|
|
4
4
|
<v-col cols="12">
|
|
5
5
|
<v-row no-gutters class="d-flex ga-2 justify-space-between align-start mb-3 mb-sm-5 flex-wrap">
|
|
6
6
|
|
|
7
7
|
<div class="d-flex flex-column" style="min-width: 0;">
|
|
8
|
-
<span class="
|
|
8
|
+
<span class="screen-card-title" style="word-break: break-word;">Visitor
|
|
9
9
|
Management - Visitor ({{ items.length }} visitors)</span>
|
|
10
|
-
<span
|
|
10
|
+
<span class="report-meta" style="word-break: break-word;">Date Range: {{
|
|
11
11
|
formatDateDDMMYYYY(dateFrom) }} - {{ formatDateDDMMYYYY(dateTo) ?? "" }}</span>
|
|
12
|
-
<span class="
|
|
12
|
+
<span class="report-meta" style="word-break: break-word;">Site Name: {{ activeSiteName
|
|
13
13
|
}}</span>
|
|
14
14
|
</div>
|
|
15
15
|
|
|
16
16
|
</v-row>
|
|
17
|
-
|
|
17
|
+
<!-- `text-black` forced every cell AND the empty-state line to
|
|
18
|
+
literal black, which on the dark theme's card measured
|
|
19
|
+
1.26:1. The table takes the theme's own ink now. -->
|
|
20
|
+
<div class="table-card" style="overflow-x: auto; max-width: 100%;">
|
|
18
21
|
<v-data-table :headers="headers" :items="items" show-header :items-per-page="100"
|
|
19
|
-
hide-default-footer
|
|
22
|
+
hide-default-footer no-data-text="No entries to display">
|
|
20
23
|
|
|
21
24
|
<template v-slot:item.typeCompany="{ item }">
|
|
22
25
|
<span class="d-flex align-center ga-2" style="flex-wrap: wrap;">
|
|
@@ -77,13 +80,13 @@
|
|
|
77
80
|
<template v-slot:item.checkInOutImage="{ item }">
|
|
78
81
|
<div class="d-flex flex-column ga-2">
|
|
79
82
|
<div v-if="item?.snapshotEntryImage" class="d-flex flex-column">
|
|
80
|
-
<span class="
|
|
83
|
+
<span class="snapshot-label snapshot-label--in">Check-In</span>
|
|
81
84
|
<v-img :src="getFileUrlAnpr(`${siteId}/${item.snapshotEntryImage}`)"
|
|
82
85
|
style="max-width: clamp(60px, 10vw, 100px); max-height: clamp(60px, 10vw, 100px);"
|
|
83
86
|
class="border" />
|
|
84
87
|
</div>
|
|
85
88
|
<div v-if="item?.snapshotExitImage" class="d-flex flex-column">
|
|
86
|
-
<span class="
|
|
89
|
+
<span class="snapshot-label snapshot-label--out">Check-Out</span>
|
|
87
90
|
<v-img :src="getFileUrlAnpr(`${siteId}/${item.snapshotExitImage}`)"
|
|
88
91
|
style="max-width: clamp(60px, 10vw, 100px); max-height: clamp(60px, 10vw, 100px);"
|
|
89
92
|
class="border" />
|
|
@@ -101,7 +104,7 @@
|
|
|
101
104
|
</v-col>
|
|
102
105
|
|
|
103
106
|
</v-row>
|
|
104
|
-
</
|
|
107
|
+
</AppCard>
|
|
105
108
|
</template>
|
|
106
109
|
|
|
107
110
|
<script setup lang="ts">
|
|
@@ -311,44 +314,53 @@ onMounted(() => {
|
|
|
311
314
|
box-sizing: border-box;
|
|
312
315
|
}
|
|
313
316
|
|
|
314
|
-
|
|
315
|
-
|
|
317
|
+
/* The handoff names no type for a report's meta lines or a snapshot caption,
|
|
318
|
+
so both take the design's own secondary sizes. The captions were
|
|
319
|
+
`text-blue-darken-1` / `text-red-darken-1` - fixed Vuetify hues that do not
|
|
320
|
+
follow the theme. */
|
|
321
|
+
.report-meta {
|
|
322
|
+
font-family: var(--font-sans);
|
|
323
|
+
font-size: var(--fs-breadcrumb);
|
|
324
|
+
color: var(--text2);
|
|
316
325
|
}
|
|
317
326
|
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
font-weight:
|
|
327
|
+
.snapshot-label {
|
|
328
|
+
font-family: var(--font-sans);
|
|
329
|
+
font-size: var(--fs-chip);
|
|
330
|
+
font-weight: var(--fw-chip);
|
|
322
331
|
}
|
|
323
332
|
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
color: white !important;
|
|
327
|
-
border-right: 1px solid rgba(255, 255, 255, 0.2) !important;
|
|
328
|
-
font-size: clamp(11px, 1.2vw, 14px) !important;
|
|
329
|
-
padding: clamp(8px, 1vw, 12px) !important;
|
|
330
|
-
word-break: break-word;
|
|
333
|
+
.snapshot-label--in {
|
|
334
|
+
color: var(--info);
|
|
331
335
|
}
|
|
332
336
|
|
|
333
|
-
|
|
334
|
-
|
|
337
|
+
.snapshot-label--out {
|
|
338
|
+
color: var(--error);
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
:deep(.v-card) {
|
|
342
|
+
overflow-x: auto;
|
|
335
343
|
}
|
|
336
344
|
|
|
345
|
+
/* The header row was a fixed `#1976d2` fill with white labels and the cell
|
|
346
|
+
rules were a fixed `#e0e0e0`, none of which follows the theme and none of
|
|
347
|
+
which is in the handoff - the design's table head is 11px/800 uppercase in
|
|
348
|
+
`--muted` on `--thead`. Deleted so the shared `.table-card` rule applies;
|
|
349
|
+
only the column rule this report actually needs is kept, on `--border`. */
|
|
350
|
+
:deep(.v-data-table thead tr th),
|
|
337
351
|
:deep(.v-data-table tbody tr td) {
|
|
338
|
-
border-right: 1px solid
|
|
339
|
-
font-size: clamp(10px, 1.1vw, 13px) !important;
|
|
340
|
-
padding: clamp(6px, 0.8vw, 10px) !important;
|
|
352
|
+
border-right: 1px solid var(--border) !important;
|
|
341
353
|
word-break: break-word;
|
|
342
|
-
word-wrap: break-word;
|
|
343
354
|
overflow-wrap: break-word;
|
|
344
355
|
}
|
|
345
356
|
|
|
357
|
+
:deep(.v-data-table thead tr th:last-child),
|
|
346
358
|
:deep(.v-data-table tbody tr td:last-child) {
|
|
347
359
|
border-right: none !important;
|
|
348
360
|
}
|
|
349
361
|
|
|
350
362
|
:deep(.v-data-table tbody tr:last-child td) {
|
|
351
|
-
border-bottom: 1px solid
|
|
363
|
+
border-bottom: 1px solid var(--border) !important;
|
|
352
364
|
}
|
|
353
365
|
|
|
354
366
|
:deep(.v-img) {
|