@7365admin1/layer-common 3.2.2-staging.116 → 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.
@@ -1,24 +1,25 @@
1
1
  <template>
2
- <v-card width="100%" :loading="processing">
3
- <v-toolbar>
4
- <v-row
5
- no-gutters
6
- class="fill-height px-6 d-flex justify-space-between align-center"
7
- align="center"
8
- >
9
- <span class="font-weight-bold text-h5 text-capitalize">
10
- Visitor Information
11
- </span>
12
- <ButtonClose @click="emit('close')" />
13
- </v-row>
14
- </v-toolbar>
15
- <v-card-text style="max-height: 100vh; overflow-y: auto" class="pa-5 my-3">
2
+ <v-card width="100%" class="screen-modal visitor-scan" :loading="processing">
3
+ <div class="visitor-scan__head">
4
+ <v-card-title>Visitor Information</v-card-title>
5
+ <AppButton
6
+ variant="icon"
7
+ icon="mdi-close"
8
+ aria-label="Close"
9
+ @click="emit('close')"
10
+ />
11
+ </div>
12
+ <div class="screen-modal__body visitor-scan__body">
16
13
  <div class="w-100 d-flex justify-space-between ga-2">
17
14
  <!-- <span v-if="withStep2 || withStep3" class="text-subtitle-2 font-weight-bold" style="text-wrap: nowrap">Step
18
15
  <span class="text-primary-button">{{ contractorStep }}</span>/{{ withStep3 ? 3 : withStep2 ? 2 : 1 }}</span> -->
19
16
  </div>
20
17
  <!-- <v-form ref="formRef" v-model="validForm" :disabled="processing" @click="errorMessage = ''"> -->
21
- <v-row no-gutters class="pt-4">
18
+ <!-- `.filter-field` is the design's input on its own (40px, 10px radius,
19
+ 13.5px). It is a DESCENDANT selector, so one class on the row gives
20
+ it to every field here - including the composed `Input/*` controls,
21
+ which are shared with other screens and are not edited. -->
22
+ <v-row no-gutters class="pt-4 filter-field">
22
23
  <v-col cols="12">
23
24
  <InputLabel class="text-capitalize" title="Full Name" />
24
25
  <v-text-field
@@ -134,22 +135,16 @@
134
135
  </v-col>
135
136
 
136
137
  <v-col v-else cols="12">
137
- <v-card elevation="4" height="100%" width="100%">
138
- <v-col cols="12" class="d-flex justify-center pb-0">
139
- <span
140
- class="text-h6 font-weight-bold d-flex text-center text-success"
141
- >
142
- {{
143
- visitorInfo.checkIn
144
- ? standardFormatDateTime(visitorInfo.checkIn)
145
- : "N/A"
146
- }}
147
- </span>
148
- </v-col>
149
- <v-col cols="12" class="d-flex justify-center">
150
- Actual Check In
151
- </v-col>
152
- </v-card>
138
+ <AppCard class="visitor-scan__checkin">
139
+ <span class="visitor-scan__checkin-time">
140
+ {{
141
+ visitorInfo.checkIn
142
+ ? standardFormatDateTime(visitorInfo.checkIn)
143
+ : "N/A"
144
+ }}
145
+ </span>
146
+ <span class="visitor-scan__checkin-label">Actual Check In</span>
147
+ </AppCard>
153
148
  </v-col>
154
149
 
155
150
  <!-- <v-col cols="12" class="mt-4">
@@ -194,41 +189,31 @@
194
189
  </v-col> -->
195
190
  </v-row>
196
191
  <!-- </v-form> -->
197
- </v-card-text>
192
+ </div>
198
193
 
199
- <v-toolbar density="compact">
200
- <v-row no-gutters>
201
- <v-col cols="6">
202
- <v-btn text="Close" block size="48" tile @click="emit('close')" />
203
- </v-col>
204
- <v-col cols="6">
205
- <v-btn
206
- v-if="!visitorInfo.checkIn && !visitorInfo.checkOut"
207
- block
208
- text="Check In"
209
- variant="flat"
210
- color="success"
211
- size="48"
212
- tile
213
- :disabled="processing"
214
- @click="emit('check-in-out', 'checkIn', visitorInfo)"
215
- :loading="processing"
216
- />
217
- <v-btn
218
- v-if="visitorInfo.checkIn && !visitorInfo.checkOut"
219
- block
220
- text="Confirm Check Out"
221
- variant="flat"
222
- color="error"
223
- size="48"
224
- tile
225
- :disabled="processing"
226
- @click="emit('check-in-out', 'checkOut', visitorInfo)"
227
- :loading="processing"
228
- />
229
- </v-col>
230
- </v-row>
231
- </v-toolbar>
194
+ <!--
195
+ Check In and Confirm Check Out are mutually exclusive - only ever one of
196
+ them is on the glass - so both are the screen's single primary action.
197
+ The handoff draws no green/red button, and inventing one only to fail
198
+ contrast is the trade that was already made and reverted once.
199
+ -->
200
+ <div class="visitor-scan__footer">
201
+ <AppButton variant="ghost" @click="emit('close')">Close</AppButton>
202
+ <AppButton
203
+ v-if="!visitorInfo.checkIn && !visitorInfo.checkOut"
204
+ :disabled="processing"
205
+ @click="emit('check-in-out', 'checkIn', visitorInfo)"
206
+ >
207
+ Check In
208
+ </AppButton>
209
+ <AppButton
210
+ v-if="visitorInfo.checkIn && !visitorInfo.checkOut"
211
+ :disabled="processing"
212
+ @click="emit('check-in-out', 'checkOut', visitorInfo)"
213
+ >
214
+ Confirm Check Out
215
+ </AppButton>
216
+ </div>
232
217
  </v-card>
233
218
  </template>
234
219
  <script setup lang="ts">
@@ -315,3 +300,43 @@ const location = computed({
315
300
  set: () => {}, // readonly, do nothing on set
316
301
  });
317
302
  </script>
303
+
304
+ <style scoped>
305
+ .visitor-scan__head {
306
+ display: flex;
307
+ align-items: center;
308
+ justify-content: space-between;
309
+ padding-right: 12px;
310
+ }
311
+
312
+ .visitor-scan__body {
313
+ padding: 4px 20px 0;
314
+ }
315
+
316
+ .visitor-scan__footer {
317
+ display: flex;
318
+ justify-content: flex-end;
319
+ gap: 8px;
320
+ padding: 16px 20px 20px;
321
+ }
322
+
323
+ /* The check-in stamp, on the card primitive instead of a 4dp Vuetify sheet. */
324
+ .visitor-scan__checkin {
325
+ display: flex;
326
+ flex-direction: column;
327
+ align-items: center;
328
+ gap: 4px;
329
+ padding: 16px;
330
+ }
331
+
332
+ .visitor-scan__checkin-time {
333
+ font-size: 18px;
334
+ font-weight: 800;
335
+ color: var(--ok);
336
+ }
337
+
338
+ .visitor-scan__checkin-label {
339
+ font-size: var(--fs-cell);
340
+ color: var(--text2);
341
+ }
342
+ </style>
@@ -1,46 +1,23 @@
1
1
  <template>
2
- <v-card width="100%">
3
- <v-toolbar>
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
- <v-card-text style="max-height: 100vh; overflow-y: auto" class="pa-5 my-5">
12
- <span class="text-subtitle-2 w-100 font-weight-medium d-flex justify-center mb-3">Please Select Visitor Type</span>
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
- <v-btn
8
+ <AppButton
15
9
  v-if="showSelection(item)"
16
- color="primary-button"
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
- class="my-2 text-capitalize text-subtitle-2"
24
- />
12
+ >
13
+ {{ item.label }}
14
+ </AppButton>
25
15
  </template>
26
- </v-card-text>
16
+ </div>
27
17
 
28
- <v-toolbar density="compact">
29
- <v-row no-gutters>
30
- <v-col cols="12">
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 elevation="2" class="d-flex flex-column align-center pa-2 w-100 h-100">
7
- <v-toolbar>
8
- <v-card-title class="text-h5"> Scan QR Code </v-card-title>
9
- <v-spacer />
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
- <!-- Show Error Messages -->
19
- <div v-if="showNotFoundMessage" class="text-error mt-8">
20
- <p>{{ errorMessage }}</p>
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 class="text-h6">Notice</v-card-title>
95
- <v-card-text>{{ permanentMessageDialog.text }}</v-card-text>
96
- <v-card-actions>
97
- <v-spacer />
98
- <v-btn
99
- color="primary"
100
- variant="elevated"
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
- <v-card height="100%" width="100%" flat class="pa-2 pa-sm-5">
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="text-subtitle-1 font-weight-bold" style="word-break: break-word;">Visitor
8
+ <span class="screen-card-title" style="word-break: break-word;">Visitor
9
9
  Management - Visitor ({{ items.length }} visitors)</span>
10
- <span style="font-size: clamp(11px, 1.1vw, 13px); word-break: break-word;">Date Range: {{
10
+ <span class="report-meta" style="word-break: break-word;">Date Range: {{
11
11
  formatDateDDMMYYYY(dateFrom) }} - {{ formatDateDDMMYYYY(dateTo) ?? "" }}</span>
12
- <span class="text-subtitle-1" style="word-break: break-word;">Site Name: {{ activeSiteName
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
- <div style="overflow-x: auto; max-width: 100%;">
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 class="text-black" no-data-text="No entries to display">
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="text-caption font-weight-bold text-blue-darken-1">Check-In</span>
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="text-caption font-weight-bold text-red-darken-1">Check-Out</span>
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
- </v-card>
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
- :deep(.v-card) {
315
- overflow-x: auto;
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
- :deep(.v-data-table-header__content) {
319
- background-color: #1976d2 !important;
320
- color: white !important;
321
- font-weight: bold;
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
- :deep(.v-data-table thead tr th) {
325
- background-color: #1976d2 !important;
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
- :deep(.v-data-table thead tr th:last-child) {
334
- border-right: none !important;
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 #e0e0e0 !important;
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 #e0e0e0 !important;
363
+ border-bottom: 1px solid var(--border) !important;
352
364
  }
353
365
 
354
366
  :deep(.v-img) {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@7365admin1/layer-common",
3
3
  "license": "MIT",
4
4
  "type": "module",
5
- "version": "3.2.2-staging.116",
5
+ "version": "3.2.2-staging.120",
6
6
  "author": "7365admin1",
7
7
  "main": "./nuxt.config.ts",
8
8
  "publishConfig": {