@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.
- package/components/AddPassKeyToVisitor.vue +95 -73
- package/components/BulletinBoardView.vue +9 -6
- package/components/CameraMain.vue +35 -47
- package/components/DeliveryCompany.vue +34 -20
- package/components/IncidentReport/Authorities.vue +30 -18
- package/components/MemberInformation.vue +23 -16
- package/components/NotificationSettings.vue +66 -54
- package/components/OnlineFormsConfiguration.vue +41 -42
- package/components/OvernightParkingAvailability.vue +49 -26
- package/components/ScanVisitorQRCode.vue +64 -28
- package/components/SearchVehicleNumberUser.vue +39 -37
- package/components/SiteSettings.vue +4 -1
- 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
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
<v-row no-gutters class="pa-8" justify="center">
|
|
3
3
|
<v-col cols="12" md="10">
|
|
4
4
|
<v-row no-gutters>
|
|
5
|
-
<v-col cols="12"
|
|
5
|
+
<v-col cols="12">
|
|
6
|
+
<PageHeader title="Notifications" />
|
|
7
|
+
</v-col>
|
|
6
8
|
|
|
7
|
-
<v-col cols="12" md="8" class="
|
|
9
|
+
<v-col cols="12" md="8" class="screen-hint intro-copy">
|
|
8
10
|
Choose what you want to hear about, and how. These settings are yours
|
|
9
11
|
alone and apply everywhere you use iService — on this site and on your
|
|
10
12
|
phone.
|
|
@@ -33,81 +35,69 @@
|
|
|
33
35
|
<template v-else>
|
|
34
36
|
<!-- everything, at once -->
|
|
35
37
|
<v-col cols="12" class="mt-8">
|
|
36
|
-
<
|
|
37
|
-
width="100%"
|
|
38
|
-
border="grey-darken-3 sm"
|
|
39
|
-
variant="outlined"
|
|
40
|
-
rounded="lg"
|
|
41
|
-
>
|
|
38
|
+
<AppCard>
|
|
42
39
|
<v-row no-gutters align="center" class="pa-6">
|
|
43
40
|
<v-col cols="12" sm="8">
|
|
44
|
-
<div class="
|
|
45
|
-
<div class="
|
|
41
|
+
<div class="screen-card-title">Everything</div>
|
|
42
|
+
<div class="screen-hint summary-line mt-1">
|
|
46
43
|
{{ everythingSummary }}
|
|
47
44
|
</div>
|
|
48
45
|
</v-col>
|
|
49
46
|
<v-col cols="12" sm="4" class="d-flex justify-sm-end mt-3 mt-sm-0">
|
|
50
|
-
<
|
|
51
|
-
variant="
|
|
52
|
-
rounded="xl"
|
|
53
|
-
class="text-none"
|
|
47
|
+
<AppButton
|
|
48
|
+
variant="ghost"
|
|
54
49
|
:disabled="saving"
|
|
55
50
|
@click="setAll(!allOn)"
|
|
56
51
|
>
|
|
57
52
|
{{ allOn ? "Turn everything off" : "Turn everything on" }}
|
|
58
|
-
</
|
|
53
|
+
</AppButton>
|
|
59
54
|
</v-col>
|
|
60
55
|
</v-row>
|
|
61
|
-
</
|
|
56
|
+
</AppCard>
|
|
62
57
|
</v-col>
|
|
63
58
|
|
|
64
59
|
<!-- one panel per module, collapsed by default so a person with many
|
|
65
60
|
modules gets a short list rather than a wall of switches -->
|
|
66
61
|
<v-col cols="12" class="mt-4">
|
|
67
|
-
<v-expansion-panels variant="accordion" multiple>
|
|
62
|
+
<v-expansion-panels variant="accordion" multiple class="screen-accordion">
|
|
68
63
|
<v-expansion-panel
|
|
69
64
|
v-for="category in categories"
|
|
70
65
|
:key="category.key"
|
|
71
66
|
:value="category.key"
|
|
72
67
|
elevation="0"
|
|
73
|
-
class="border-sm rounded-lg mb-2"
|
|
74
68
|
>
|
|
75
69
|
<v-expansion-panel-title>
|
|
76
70
|
<v-row no-gutters align="center">
|
|
77
71
|
<v-col cols="12" sm="6">
|
|
78
|
-
<span
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
72
|
+
<span>{{ category.label }}</span>
|
|
73
|
+
<!-- "Safety" is a TAG, not a status word, so it takes
|
|
74
|
+
the handoff's tag chip - "small 7px-radius label" -
|
|
75
|
+
which is the dotless shape, on the `info` tone the
|
|
76
|
+
handoff assigns to "Role & info tags". A leading dot
|
|
77
|
+
here would draw it as a status the screen does not
|
|
78
|
+
have. -->
|
|
79
|
+
<StatusChip
|
|
82
80
|
v-if="category.safety"
|
|
83
|
-
|
|
81
|
+
tone="info"
|
|
82
|
+
label="Safety"
|
|
83
|
+
:dot="false"
|
|
84
84
|
class="ml-2"
|
|
85
|
-
|
|
86
|
-
color="info"
|
|
87
|
-
>
|
|
88
|
-
Safety
|
|
89
|
-
</v-chip>
|
|
85
|
+
/>
|
|
90
86
|
</v-col>
|
|
91
|
-
<v-col
|
|
92
|
-
cols="12"
|
|
93
|
-
sm="6"
|
|
94
|
-
class="text-body-2 text-medium-emphasis"
|
|
95
|
-
>
|
|
87
|
+
<v-col cols="12" sm="6" class="screen-hint summary-line">
|
|
96
88
|
{{ summaryFor(category) }}
|
|
97
89
|
</v-col>
|
|
98
90
|
</v-row>
|
|
99
91
|
</v-expansion-panel-title>
|
|
100
92
|
|
|
101
93
|
<v-expansion-panel-text>
|
|
102
|
-
<div class="
|
|
94
|
+
<div class="screen-hint summary-line mb-4">
|
|
103
95
|
{{ category.description }}
|
|
104
96
|
</div>
|
|
105
97
|
|
|
106
|
-
<
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
rounded="xl"
|
|
110
|
-
class="text-none mb-4"
|
|
98
|
+
<AppButton
|
|
99
|
+
variant="ghost"
|
|
100
|
+
class="mb-4"
|
|
111
101
|
:disabled="saving || !switchableIn(category).length"
|
|
112
102
|
@click="setCategory(category, !categoryAllOn(category))"
|
|
113
103
|
>
|
|
@@ -116,7 +106,7 @@
|
|
|
116
106
|
? "Turn all off for " + category.label
|
|
117
107
|
: "Turn all on for " + category.label
|
|
118
108
|
}}
|
|
119
|
-
</
|
|
109
|
+
</AppButton>
|
|
120
110
|
|
|
121
111
|
<!-- one channel per row: a switch must never sit beside the
|
|
122
112
|
NEXT channel's label, which is what a three-up grid does -->
|
|
@@ -132,8 +122,8 @@
|
|
|
132
122
|
:class="{ 'channel-unavailable': !channel.supported }"
|
|
133
123
|
>
|
|
134
124
|
<div class="pr-4">
|
|
135
|
-
<div class="
|
|
136
|
-
<div v-if="!channel.supported" class="
|
|
125
|
+
<div class="channel-label">{{ channel.label }}</div>
|
|
126
|
+
<div v-if="!channel.supported" class="channel-note mt-1">
|
|
137
127
|
{{ channel.note }}
|
|
138
128
|
</div>
|
|
139
129
|
</div>
|
|
@@ -162,21 +152,18 @@
|
|
|
162
152
|
|
|
163
153
|
<!-- switching a safety alert off: say plainly what stops arriving -->
|
|
164
154
|
<v-dialog v-model="confirmOpen" max-width="460" persistent>
|
|
165
|
-
<v-card
|
|
166
|
-
<v-card-title
|
|
167
|
-
<v-card-text class="
|
|
155
|
+
<v-card class="screen-modal pa-2">
|
|
156
|
+
<v-card-title>{{ confirmText.title }}</v-card-title>
|
|
157
|
+
<v-card-text class="screen-modal__body">
|
|
158
|
+
{{ confirmText.body }}
|
|
159
|
+
</v-card-text>
|
|
168
160
|
<v-card-actions class="justify-end">
|
|
169
|
-
<
|
|
161
|
+
<AppButton variant="ghost" @click="cancelConfirm">
|
|
170
162
|
{{ confirmText.cancel }}
|
|
171
|
-
</
|
|
172
|
-
<
|
|
173
|
-
color="primary"
|
|
174
|
-
variant="tonal"
|
|
175
|
-
class="text-none"
|
|
176
|
-
@click="acceptConfirm"
|
|
177
|
-
>
|
|
163
|
+
</AppButton>
|
|
164
|
+
<AppButton @click="acceptConfirm">
|
|
178
165
|
{{ confirmText.confirm }}
|
|
179
|
-
</
|
|
166
|
+
</AppButton>
|
|
180
167
|
</v-card-actions>
|
|
181
168
|
</v-card>
|
|
182
169
|
</v-dialog>
|
|
@@ -346,6 +333,31 @@ onMounted(load);
|
|
|
346
333
|
</script>
|
|
347
334
|
|
|
348
335
|
<style scoped>
|
|
336
|
+
/* The handoff names no type for long-form intro copy or a summary line, so
|
|
337
|
+
both take the design's own secondary sizes rather than Vuetify's `text-h6`
|
|
338
|
+
/ `text-body-2` scale. */
|
|
339
|
+
.intro-copy {
|
|
340
|
+
font-size: var(--fs-cell);
|
|
341
|
+
margin-top: 6px;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
.summary-line {
|
|
345
|
+
font-size: var(--fs-breadcrumb);
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
.channel-label {
|
|
349
|
+
font-family: var(--font-sans);
|
|
350
|
+
font-size: var(--fs-cell);
|
|
351
|
+
font-weight: var(--fw-cell);
|
|
352
|
+
color: var(--text);
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
.channel-note {
|
|
356
|
+
font-family: var(--font-sans);
|
|
357
|
+
font-size: var(--fs-breadcrumb);
|
|
358
|
+
color: var(--text2);
|
|
359
|
+
}
|
|
360
|
+
|
|
349
361
|
/* Unavailable channels are shown and explained, never hidden.
|
|
350
362
|
*
|
|
351
363
|
* They are NOT faded. The disabled switch already says the control cannot be
|
|
@@ -1,29 +1,27 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<v-row no-gutters>
|
|
3
|
-
<v-col cols="12"
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
3
|
+
<v-col cols="12">
|
|
4
|
+
<!--
|
|
5
|
+
The screen's name and its one primary action on the same line, which is
|
|
6
|
+
how the design opens every screen. "Configuration" is the app's own nav
|
|
7
|
+
label (Online Forms > Configuration), not invented copy. The page that
|
|
8
|
+
mounts this is a bare mount with no heading of its own.
|
|
9
|
+
-->
|
|
10
|
+
<PageHeader title="Configuration">
|
|
11
|
+
<template #actions>
|
|
12
|
+
<AppButton
|
|
13
|
+
v-if="canCreate && canCreateOnlineFormConfiguration"
|
|
14
|
+
@click="setOnlineForm()"
|
|
15
|
+
>
|
|
16
|
+
Add Online Form
|
|
17
|
+
</AppButton>
|
|
18
|
+
</template>
|
|
19
|
+
</PageHeader>
|
|
16
20
|
</v-col>
|
|
17
21
|
<v-col cols="12">
|
|
18
|
-
<
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
border="thin"
|
|
22
|
-
rounded="lg"
|
|
23
|
-
:loading="loading"
|
|
24
|
-
>
|
|
25
|
-
<v-toolbar density="compact" class="px-3 border-b-sm" color="transparent">
|
|
26
|
-
<template #prepend>
|
|
22
|
+
<AppCard class="table-card">
|
|
23
|
+
<CardToolbar :count="pageRange">
|
|
24
|
+
<template #left>
|
|
27
25
|
<v-btn
|
|
28
26
|
fab
|
|
29
27
|
icon
|
|
@@ -42,32 +40,25 @@
|
|
|
42
40
|
>
|
|
43
41
|
<v-icon>mdi-sort-alphabetical-ascending</v-icon>
|
|
44
42
|
</v-btn>
|
|
45
|
-
<
|
|
43
|
+
<AppField
|
|
46
44
|
v-model="search"
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
search
|
|
46
|
+
compact
|
|
49
47
|
placeholder="Search..."
|
|
50
|
-
|
|
51
|
-
clearable
|
|
52
|
-
hide-details
|
|
53
|
-
style="width: 220px; margin-left: 12px;"
|
|
48
|
+
klass="online-forms-config__search"
|
|
54
49
|
/>
|
|
55
50
|
</template>
|
|
56
51
|
|
|
57
|
-
<template #
|
|
58
|
-
<
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
v-model="page"
|
|
64
|
-
:length="pages"
|
|
65
|
-
@update:value="getOnlineFormConfigurations"
|
|
66
|
-
/>
|
|
67
|
-
</v-row>
|
|
52
|
+
<template #right>
|
|
53
|
+
<local-pagination
|
|
54
|
+
v-model="page"
|
|
55
|
+
:length="pages"
|
|
56
|
+
@update:value="getOnlineFormConfigurations"
|
|
57
|
+
/>
|
|
68
58
|
</template>
|
|
69
|
-
</
|
|
59
|
+
</CardToolbar>
|
|
70
60
|
<v-data-table
|
|
61
|
+
:loading="loading"
|
|
71
62
|
:headers="headers"
|
|
72
63
|
:items="sortedItems"
|
|
73
64
|
item-value="_id"
|
|
@@ -84,7 +75,7 @@
|
|
|
84
75
|
{{ item.status ? item.status.charAt(0).toUpperCase() + item.status.slice(1) : "N/A" }}
|
|
85
76
|
</template></v-data-table
|
|
86
77
|
>
|
|
87
|
-
</
|
|
78
|
+
</AppCard></v-col
|
|
88
79
|
>
|
|
89
80
|
|
|
90
81
|
<!-- Create Dialog -->
|
|
@@ -435,3 +426,11 @@ function successUpdate() {
|
|
|
435
426
|
}
|
|
436
427
|
|
|
437
428
|
</script>
|
|
429
|
+
|
|
430
|
+
<style scoped>
|
|
431
|
+
/* Same 240px cap the other in-toolbar search fields use, so the field does not
|
|
432
|
+
eat the toolbar's whole left side. */
|
|
433
|
+
.online-forms-config__search {
|
|
434
|
+
max-width: 240px;
|
|
435
|
+
}
|
|
436
|
+
</style>
|
|
@@ -35,8 +35,7 @@
|
|
|
35
35
|
/>
|
|
36
36
|
</span>
|
|
37
37
|
</v-row>
|
|
38
|
-
<
|
|
39
|
-
<v-card-text>
|
|
38
|
+
<AppCard class="mt-2 pa-4">
|
|
40
39
|
<template
|
|
41
40
|
v-for="(slot, index) in overnightParkingSlotsArray"
|
|
42
41
|
:key="slot.day"
|
|
@@ -44,9 +43,12 @@
|
|
|
44
43
|
<v-row no-gutters class="mb-4">
|
|
45
44
|
<v-col
|
|
46
45
|
cols="12"
|
|
47
|
-
class="text-capitalize mb-2
|
|
46
|
+
class="text-capitalize mb-2 d-flex align-center justify-space-between"
|
|
48
47
|
>
|
|
49
|
-
<span class="
|
|
48
|
+
<span class="screen-card-title">{{ slot.day }}</span>
|
|
49
|
+
<!-- `black-lighten-1` is a literal black: on the dark theme
|
|
50
|
+
the off state was a black tick on a #1c1e24 card. Both
|
|
51
|
+
states take a token now. -->
|
|
50
52
|
<v-icon
|
|
51
53
|
:icon="
|
|
52
54
|
slot?.isEnabled
|
|
@@ -54,10 +56,10 @@
|
|
|
54
56
|
: 'mdi-check-circle-outline'
|
|
55
57
|
"
|
|
56
58
|
size="20"
|
|
57
|
-
:class="
|
|
58
|
-
|
|
59
|
-
slot.isEnabled ? '
|
|
60
|
-
"
|
|
59
|
+
:class="[
|
|
60
|
+
{ 'cursor-pointer': !viewMode },
|
|
61
|
+
slot.isEnabled ? 'day-tick--on' : 'day-tick--off',
|
|
62
|
+
]"
|
|
61
63
|
@click="!viewMode && toggleEnabled(slot.day)"
|
|
62
64
|
/>
|
|
63
65
|
</v-col>
|
|
@@ -91,7 +93,7 @@
|
|
|
91
93
|
|
|
92
94
|
<v-col v-if="!viewMode" cols="12" class="mt-1">
|
|
93
95
|
<div
|
|
94
|
-
class="d-flex align-center ga-1 cursor-pointer
|
|
96
|
+
class="d-flex align-center ga-1 cursor-pointer screen-hint apply-link"
|
|
95
97
|
@click="applyToOtherDays(slot.day)"
|
|
96
98
|
>
|
|
97
99
|
<v-icon icon="mdi-content-copy" size="14" />
|
|
@@ -107,10 +109,10 @@
|
|
|
107
109
|
</template>
|
|
108
110
|
|
|
109
111
|
<v-col cols="12" align="end">
|
|
112
|
+
<!-- Stays a `v-btn`: `:loading` is the only in-flight signal on
|
|
113
|
+
this form and AppButton has none. Tokenised instead. -->
|
|
110
114
|
<v-btn
|
|
111
|
-
|
|
112
|
-
class="text-none mt-2"
|
|
113
|
-
size="large"
|
|
115
|
+
class="screen-btn-primary mt-2"
|
|
114
116
|
:loading="loading.updating"
|
|
115
117
|
variant="flat"
|
|
116
118
|
text="Save"
|
|
@@ -118,8 +120,7 @@
|
|
|
118
120
|
@click="handleSave('save')"
|
|
119
121
|
/>
|
|
120
122
|
</v-col>
|
|
121
|
-
|
|
122
|
-
</v-card>
|
|
123
|
+
</AppCard>
|
|
123
124
|
</v-col>
|
|
124
125
|
</v-row>
|
|
125
126
|
</v-form>
|
|
@@ -132,12 +133,10 @@
|
|
|
132
133
|
/>
|
|
133
134
|
|
|
134
135
|
<v-dialog v-model="applyDialog.open" max-width="360" persistent>
|
|
135
|
-
<v-card>
|
|
136
|
-
<v-card-title class="
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
<v-card-text class="px-4 pb-2">
|
|
140
|
-
<p class="text-caption text-medium-emphasis mb-3">
|
|
136
|
+
<v-card class="screen-modal">
|
|
137
|
+
<v-card-title class="pt-4 px-4">Apply to days</v-card-title>
|
|
138
|
+
<v-card-text class="screen-modal__body px-4 pb-2">
|
|
139
|
+
<p class="screen-hint apply-link mb-3">
|
|
141
140
|
Select the days to apply
|
|
142
141
|
<span class="font-weight-bold text-capitalize">{{
|
|
143
142
|
applyDialog.sourceDay
|
|
@@ -154,21 +153,45 @@
|
|
|
154
153
|
class="text-capitalize"
|
|
155
154
|
/>
|
|
156
155
|
</v-card-text>
|
|
157
|
-
|
|
156
|
+
<!-- `ga-2`: v-card-actions only spaces `.v-btn` children, and these are
|
|
157
|
+
the design's own buttons - without it Cancel and Apply touch. -->
|
|
158
|
+
<v-card-actions class="px-4 pb-4 ga-2">
|
|
158
159
|
<v-spacer />
|
|
159
|
-
<
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
160
|
+
<AppButton variant="ghost" @click="applyDialog.open = false">
|
|
161
|
+
Cancel
|
|
162
|
+
</AppButton>
|
|
163
|
+
<AppButton
|
|
163
164
|
:disabled="!applyDialog.targetDays.some((d) => d.selected)"
|
|
164
165
|
@click="confirmApply"
|
|
165
|
-
>Apply</v-btn
|
|
166
166
|
>
|
|
167
|
+
Apply
|
|
168
|
+
</AppButton>
|
|
167
169
|
</v-card-actions>
|
|
168
170
|
</v-card>
|
|
169
171
|
</v-dialog>
|
|
170
172
|
</template>
|
|
171
173
|
|
|
174
|
+
<style scoped>
|
|
175
|
+
/* The prototype names no colour for a per-day enable tick, so it takes the
|
|
176
|
+
design's own success / muted semantics rather than two literal Vuetify
|
|
177
|
+
greys - the off state was `black-lighten-1`, which stayed black on the dark
|
|
178
|
+
theme's card. */
|
|
179
|
+
.day-tick--on {
|
|
180
|
+
/* `--ok`, not `--success`: the token is named for the design's tone, and an
|
|
181
|
+
undefined custom property makes the whole declaration invalid, so the tick
|
|
182
|
+
silently inherited `--text` instead. */
|
|
183
|
+
color: var(--ok);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.day-tick--off {
|
|
187
|
+
color: var(--muted);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.apply-link {
|
|
191
|
+
font-size: var(--fs-breadcrumb);
|
|
192
|
+
}
|
|
193
|
+
</style>
|
|
194
|
+
|
|
172
195
|
<script setup lang="ts">
|
|
173
196
|
const props = defineProps({
|
|
174
197
|
viewMode: {
|
|
@@ -9,36 +9,27 @@
|
|
|
9
9
|
>
|
|
10
10
|
<v-container class="d-flex justify-center" max-height="90vh">
|
|
11
11
|
<!-- QR code reader container -->
|
|
12
|
-
<v-card
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
<v-toolbar>
|
|
17
|
-
<v-card-title class="text-h5"> Scan QR Code </v-card-title>
|
|
18
|
-
<v-spacer />
|
|
19
|
-
<v-btn
|
|
20
|
-
color="grey-darken-1"
|
|
21
|
-
icon="mdi-close"
|
|
22
|
-
@click="closeDialog()"
|
|
23
|
-
/>
|
|
24
|
-
</v-toolbar>
|
|
25
|
-
|
|
26
|
-
<div
|
|
27
|
-
id="reader"
|
|
28
|
-
class="d-flex justify-center align-center w-100 h-100"
|
|
29
|
-
style="height: calc(100vh - 64px)"
|
|
30
|
-
>
|
|
31
|
-
<!-- The QR code scanner box -->
|
|
32
|
-
<!-- This is where the QR code scanner will be displayed -->
|
|
12
|
+
<v-card class="screen-modal qr-scanner">
|
|
13
|
+
<div class="qr-scanner__head">
|
|
14
|
+
<v-card-title>Scan QR Code</v-card-title>
|
|
15
|
+
<AppButton variant="icon" icon="mdi-close" @click="closeDialog()" />
|
|
33
16
|
</div>
|
|
34
|
-
|
|
35
|
-
<div
|
|
36
|
-
<
|
|
17
|
+
|
|
18
|
+
<div class="screen-modal__body qr-scanner__body">
|
|
19
|
+
<div id="reader" class="qr-scanner__reader">
|
|
20
|
+
<!-- The QR code scanner box -->
|
|
21
|
+
<!-- This is where the QR code scanner will be displayed -->
|
|
22
|
+
</div>
|
|
23
|
+
<!-- Show Error Messages -->
|
|
24
|
+
<p v-if="showNotFoundMessage" class="qr-scanner__error">{{ errorMessage }}</p>
|
|
25
|
+
<!-- Switch camera button inside the reader box -->
|
|
26
|
+
<AppButton
|
|
27
|
+
icon="mdi-camera-switch"
|
|
28
|
+
class="qr-scanner__switch"
|
|
29
|
+
aria-label="Switch camera"
|
|
30
|
+
@click="switchCamera()"
|
|
31
|
+
/>
|
|
37
32
|
</div>
|
|
38
|
-
<!-- Switch camera button inside the reader box -->
|
|
39
|
-
<v-btn color="primary" icon class="mt-4" @click="switchCamera()">
|
|
40
|
-
<v-icon icon="mdi-camera-switch" large />
|
|
41
|
-
</v-btn>
|
|
42
33
|
</v-card>
|
|
43
34
|
</v-container>
|
|
44
35
|
</v-dialog>
|
|
@@ -225,3 +216,48 @@ const stopScanner = () => {
|
|
|
225
216
|
});
|
|
226
217
|
};
|
|
227
218
|
</script>
|
|
219
|
+
|
|
220
|
+
<style scoped>
|
|
221
|
+
/* Same scanner frame as the pass-key scanner: the card used to be `w-100`
|
|
222
|
+
inside the centring container, so keep that width. */
|
|
223
|
+
.qr-scanner {
|
|
224
|
+
width: 100%;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.qr-scanner__head {
|
|
228
|
+
display: flex;
|
|
229
|
+
align-items: center;
|
|
230
|
+
justify-content: space-between;
|
|
231
|
+
padding-right: 12px;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.qr-scanner__body {
|
|
235
|
+
display: flex;
|
|
236
|
+
flex-direction: column;
|
|
237
|
+
align-items: center;
|
|
238
|
+
gap: 16px;
|
|
239
|
+
padding: 4px 20px 20px;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.qr-scanner__reader {
|
|
243
|
+
display: flex;
|
|
244
|
+
align-items: center;
|
|
245
|
+
justify-content: center;
|
|
246
|
+
width: 100%;
|
|
247
|
+
min-height: 320px;
|
|
248
|
+
border: 1px solid var(--border);
|
|
249
|
+
border-radius: var(--r-inner);
|
|
250
|
+
background: var(--thead);
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.qr-scanner__error {
|
|
254
|
+
margin: 0;
|
|
255
|
+
font-size: var(--fs-cell);
|
|
256
|
+
color: var(--err);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
.qr-scanner__switch {
|
|
260
|
+
width: var(--btn-h);
|
|
261
|
+
padding: 0;
|
|
262
|
+
}
|
|
263
|
+
</style>
|
|
@@ -1,44 +1,35 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<v-card width="100%">
|
|
3
|
-
<v-
|
|
4
|
-
<v-row no-gutters>
|
|
5
|
-
<v-col cols="12" class="text-h6 font-weight-bold px-3">Vehicle Number ({{ vehicleNumber }})</v-col>
|
|
6
|
-
</v-row>
|
|
7
|
-
</v-toolbar>
|
|
2
|
+
<v-card width="100%" class="screen-modal search-vehicle-user">
|
|
3
|
+
<v-card-title>Vehicle Number ({{ vehicleNumber }})</v-card-title>
|
|
8
4
|
|
|
9
|
-
<
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
5
|
+
<div class="screen-modal__body search-vehicle-user__body">
|
|
6
|
+
<!-- `table-card` is the shared table card's own class, so the header
|
|
7
|
+
type, the cell padding and the row rule are the design's - without
|
|
8
|
+
TableMain's page toolbar, which a two-row picker inside a dialog
|
|
9
|
+
has nothing to put in. -->
|
|
10
|
+
<AppCard class="table-card">
|
|
11
|
+
<v-data-table :items="prop.vehicleNumberUsersList" hide-default-footer :headers="headers" density="comfortable"
|
|
12
|
+
item-key="_id ">
|
|
13
|
+
<template #item.name="{ item }">
|
|
14
|
+
<span class="d-flex align-center ga-2">
|
|
15
|
+
<span>
|
|
16
|
+
<AvatarMain :name="item?.name" :size="20" :id="item?._id" />
|
|
17
|
+
</span>
|
|
18
|
+
<span class="text-capitalize">{{ item?.name }}</span>
|
|
16
19
|
</span>
|
|
17
|
-
|
|
18
|
-
</span>
|
|
19
|
-
</template>
|
|
20
|
+
</template>
|
|
20
21
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
<template #item.actions="{ item }">
|
|
23
|
+
<AppButton variant="ghost" @click="handleSelectUser(item)">Select</AppButton>
|
|
24
|
+
</template>
|
|
25
|
+
</v-data-table>
|
|
26
|
+
</AppCard>
|
|
27
|
+
</div>
|
|
26
28
|
|
|
27
|
-
<
|
|
28
|
-
<
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
Close
|
|
32
|
-
</v-btn>
|
|
33
|
-
</v-col>
|
|
34
|
-
|
|
35
|
-
<v-col cols="6" class="pa-0">
|
|
36
|
-
<v-btn block variant="flat" color="black" class="text-none" height="48" tile @click="emit('close')">
|
|
37
|
-
Add Different User
|
|
38
|
-
</v-btn>
|
|
39
|
-
</v-col>
|
|
40
|
-
</v-row>
|
|
41
|
-
</v-toolbar>
|
|
29
|
+
<div class="search-vehicle-user__footer">
|
|
30
|
+
<AppButton variant="ghost" @click="emit('close')">Close</AppButton>
|
|
31
|
+
<AppButton @click="emit('close')">Add Different User</AppButton>
|
|
32
|
+
</div>
|
|
42
33
|
<v-dialog v-model="confirmAction" persistent max-width="450">
|
|
43
34
|
<DialogReplaceAutofillPrompt @close="confirmAction = false" @proceed="handleUpdateUserDetails"/>
|
|
44
35
|
</v-dialog>
|
|
@@ -89,4 +80,15 @@ onMounted(() => {
|
|
|
89
80
|
})
|
|
90
81
|
</script>
|
|
91
82
|
|
|
92
|
-
<style scoped
|
|
83
|
+
<style scoped>
|
|
84
|
+
.search-vehicle-user__body {
|
|
85
|
+
padding: 4px 20px 0;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.search-vehicle-user__footer {
|
|
89
|
+
display: flex;
|
|
90
|
+
justify-content: flex-end;
|
|
91
|
+
gap: 8px;
|
|
92
|
+
padding: 16px 20px 20px;
|
|
93
|
+
}
|
|
94
|
+
</style>
|
|
@@ -152,7 +152,10 @@
|
|
|
152
152
|
Delivery Companies
|
|
153
153
|
</v-expansion-panel-title>
|
|
154
154
|
<v-expansion-panel-text class="">
|
|
155
|
-
|
|
155
|
+
<!-- The panel above already names this section, and the component
|
|
156
|
+
prints its own name unless told not to - so without hide-title
|
|
157
|
+
the words "Delivery Companies" appear twice on the open panel. -->
|
|
158
|
+
<DeliveryCompany :site="siteId" hide-title v-model:initial="deliveryCompanies" @refresh-site="refreshSiteData"
|
|
156
159
|
@update:companiesValue="handleUpdateCompanies" :read-only="!canManageSiteSettings" />
|
|
157
160
|
</v-expansion-panel-text>
|
|
158
161
|
</v-expansion-panel>
|