@7365admin1/layer-common 3.2.2-staging.158 → 3.2.2-staging.160
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/AccessCardAddForm.vue +42 -42
- package/components/AccessCardPreviewDialog.vue +58 -84
- package/components/ClientDetailForm.vue +81 -56
- package/components/EntryPassInformation.vue +8 -6
- package/components/HidReaderForm.vue +17 -50
- package/components/IncidentReport/IncidentInformation.vue +10 -10
- package/components/OnlineFormConfigurationForm.vue +96 -73
- package/components/OnlineFormFill.vue +165 -96
- package/components/OnlineFormRenderPreview.vue +25 -30
- package/components/OnlineFormsConfiguration.vue +66 -65
- package/package.json +1 -1
- package/utils/status.ts +5 -0
|
@@ -5,25 +5,25 @@
|
|
|
5
5
|
width="560"
|
|
6
6
|
persistent
|
|
7
7
|
>
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
</v-
|
|
8
|
+
<!-- The title row was a `grey-darken-3` v-toolbar: the same hardcoded grey
|
|
9
|
+
slab on both themes, with white text sitting on it. A `v-card-title` on
|
|
10
|
+
`.screen-modal` is the same row on the card's own surface, so it
|
|
11
|
+
follows the theme. -->
|
|
12
|
+
<v-card class="screen-modal d-flex flex-column">
|
|
13
|
+
<v-card-title class="flex-grow-0">{{ form?.formType }}</v-card-title>
|
|
14
14
|
|
|
15
|
-
<v-card-subtitle class="px-6
|
|
15
|
+
<v-card-subtitle class="screen-hint px-6 pb-0 flex-grow-0">
|
|
16
16
|
Form preview — fields are read-only
|
|
17
17
|
</v-card-subtitle>
|
|
18
18
|
|
|
19
|
-
<v-card-text class="px-6 py-4 flex-grow-1"
|
|
19
|
+
<v-card-text class="screen-modal__body px-6 py-4 flex-grow-1">
|
|
20
20
|
<template v-for="(input, index) in form?.inputs" :key="index">
|
|
21
21
|
<v-text-field
|
|
22
22
|
v-if="input.dataType === 'Text Input'"
|
|
23
23
|
:label="input.label"
|
|
24
24
|
density="comfortable"
|
|
25
25
|
variant="outlined"
|
|
26
|
-
class="mb-1"
|
|
26
|
+
class="filter-field mb-1"
|
|
27
27
|
:hint="input.required ? 'Required' : ''"
|
|
28
28
|
persistent-hint
|
|
29
29
|
readonly
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
density="comfortable"
|
|
35
35
|
variant="outlined"
|
|
36
36
|
rows="3"
|
|
37
|
-
class="mb-1"
|
|
37
|
+
class="filter-field mb-1"
|
|
38
38
|
:hint="input.required ? 'Required' : ''"
|
|
39
39
|
persistent-hint
|
|
40
40
|
readonly
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
type="date"
|
|
46
46
|
density="comfortable"
|
|
47
47
|
variant="outlined"
|
|
48
|
-
class="mb-1"
|
|
48
|
+
class="filter-field mb-1"
|
|
49
49
|
:hint="input.required ? 'Required' : ''"
|
|
50
50
|
persistent-hint
|
|
51
51
|
readonly
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
:items="input.options || []"
|
|
57
57
|
density="comfortable"
|
|
58
58
|
variant="outlined"
|
|
59
|
-
class="mb-1"
|
|
59
|
+
class="filter-field mb-1"
|
|
60
60
|
:hint="input.required ? 'Required' : ''"
|
|
61
61
|
persistent-hint
|
|
62
62
|
readonly
|
|
@@ -65,29 +65,24 @@
|
|
|
65
65
|
v-else-if="input.dataType === 'Checkbox'"
|
|
66
66
|
:label="input.label"
|
|
67
67
|
density="comfortable"
|
|
68
|
-
class="mb-1"
|
|
68
|
+
class="filter-field mb-1"
|
|
69
69
|
readonly
|
|
70
70
|
/>
|
|
71
71
|
</template>
|
|
72
72
|
</v-card-text>
|
|
73
73
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
Close Preview
|
|
87
|
-
</v-btn>
|
|
88
|
-
</v-col>
|
|
89
|
-
</v-row>
|
|
90
|
-
</v-toolbar>
|
|
74
|
+
<!-- The design's modal footer. The Close button was a `color="black"`
|
|
75
|
+
square-cornered block fill - the same black on both themes, and the
|
|
76
|
+
shape of a primary action for what is only a dismiss. -->
|
|
77
|
+
<div class="screen-modal__footer flex-grow-0">
|
|
78
|
+
<v-btn
|
|
79
|
+
variant="outlined"
|
|
80
|
+
class="screen-btn-ghost"
|
|
81
|
+
@click="$emit('update:modelValue', false)"
|
|
82
|
+
>
|
|
83
|
+
Close Preview
|
|
84
|
+
</v-btn>
|
|
85
|
+
</div>
|
|
91
86
|
</v-card>
|
|
92
87
|
</v-dialog>
|
|
93
88
|
</template>
|
|
@@ -22,24 +22,23 @@
|
|
|
22
22
|
<AppCard class="table-card">
|
|
23
23
|
<CardToolbar :count="pageRange">
|
|
24
24
|
<template #left>
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
<!-- The design's 32px icon button, the same one every other
|
|
26
|
+
converted table toolbar uses, instead of Vuetify's tinted
|
|
27
|
+
fab. -->
|
|
28
|
+
<AppButton
|
|
29
|
+
variant="icon"
|
|
30
|
+
icon="mdi-refresh"
|
|
31
|
+
aria-label="Refresh"
|
|
29
32
|
@click="getOnlineFormConfigurations"
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
density="comfortable"
|
|
37
|
-
:color="sortAlpha ? 'primary' : undefined"
|
|
33
|
+
/>
|
|
34
|
+
<AppButton
|
|
35
|
+
variant="icon"
|
|
36
|
+
icon="mdi-sort-alphabetical-ascending"
|
|
37
|
+
class="online-forms-config__sort"
|
|
38
|
+
:class="{ 'online-forms-config__sort--on': sortAlpha }"
|
|
38
39
|
:title="sortAlpha ? 'Sorted A–Z' : 'Sort A–Z'"
|
|
39
40
|
@click="sortAlpha = !sortAlpha"
|
|
40
|
-
|
|
41
|
-
<v-icon>mdi-sort-alphabetical-ascending</v-icon>
|
|
42
|
-
</v-btn>
|
|
41
|
+
/>
|
|
43
42
|
<AppField
|
|
44
43
|
v-model="search"
|
|
45
44
|
search
|
|
@@ -109,12 +108,15 @@
|
|
|
109
108
|
@cancel="previewDialog = false"
|
|
110
109
|
>
|
|
111
110
|
<template #title-actions>
|
|
111
|
+
<!-- `color="white"` was correct only while the fill's title bar was a
|
|
112
|
+
hardcoded dark slab. The bar now paints from `--card`, so the
|
|
113
|
+
pencil takes the card's own ink; `error` is a theme colour and
|
|
114
|
+
follows both themes. -->
|
|
112
115
|
<v-btn
|
|
113
116
|
v-if="canUpdate && canUpdateOnlineFormConfiguration"
|
|
114
117
|
icon
|
|
115
118
|
size="small"
|
|
116
119
|
variant="text"
|
|
117
|
-
color="white"
|
|
118
120
|
@click="openEditDialog()"
|
|
119
121
|
>
|
|
120
122
|
<v-icon>mdi-pencil</v-icon>
|
|
@@ -133,34 +135,38 @@
|
|
|
133
135
|
</OnlineFormFill>
|
|
134
136
|
|
|
135
137
|
<!-- Fallback: no block definition found for this form type -->
|
|
136
|
-
<v-card v-else width="100%">
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
</
|
|
143
|
-
<
|
|
144
|
-
<v-btn
|
|
138
|
+
<v-card v-else class="screen-modal" width="100%">
|
|
139
|
+
<!-- The design's empty block, the same one every other "nothing to
|
|
140
|
+
show here" surface in the layer draws. -->
|
|
141
|
+
<div class="screen-empty">
|
|
142
|
+
<v-icon size="48">mdi-file-question-outline</v-icon>
|
|
143
|
+
<div>No preview available for "{{ selectedFormType }}".</div>
|
|
144
|
+
</div>
|
|
145
|
+
<div class="screen-modal__footer">
|
|
146
|
+
<v-btn variant="outlined" class="screen-btn-ghost" @click="previewDialog = false">
|
|
145
147
|
Close
|
|
146
148
|
</v-btn>
|
|
147
|
-
</
|
|
149
|
+
</div>
|
|
148
150
|
</v-card>
|
|
149
151
|
</v-dialog>
|
|
150
152
|
|
|
151
153
|
<!-- Delete Dialog -->
|
|
154
|
+
<!-- 520px is the handoff's `--modal-w`. The two `v-toolbar`s this drew for
|
|
155
|
+
its title row and its footer were Vuetify `surface` slabs - a visible
|
|
156
|
+
grey bar on the dark card; a `v-card-title` and the shared
|
|
157
|
+
`.screen-modal__footer` are the same rows on the card's own surface.
|
|
158
|
+
The confirming button was a hardcoded `color="black"` fill, the same
|
|
159
|
+
black on both themes. -->
|
|
152
160
|
<v-dialog
|
|
153
161
|
v-model="confirmDialog"
|
|
154
162
|
:loading="deleteLoading"
|
|
155
|
-
width="
|
|
163
|
+
width="520"
|
|
156
164
|
persistent
|
|
157
165
|
>
|
|
158
|
-
<v-card width="100%">
|
|
159
|
-
<v-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
<v-card-text>
|
|
163
|
-
<p class="text-subtitle-2 text-center">
|
|
166
|
+
<v-card class="screen-modal" width="100%">
|
|
167
|
+
<v-card-title>Delete Online Form</v-card-title>
|
|
168
|
+
<v-card-text class="screen-modal__body">
|
|
169
|
+
<p class="text-center">
|
|
164
170
|
Are you sure you want to delete this online form? This action cannot
|
|
165
171
|
be undone.
|
|
166
172
|
</p>
|
|
@@ -171,38 +177,25 @@
|
|
|
171
177
|
</span>
|
|
172
178
|
</v-row>
|
|
173
179
|
</v-card-text>
|
|
174
|
-
<
|
|
175
|
-
<v-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
size="48"
|
|
194
|
-
color="black"
|
|
195
|
-
variant="flat"
|
|
196
|
-
class="text-none"
|
|
197
|
-
:loading="deleteLoading"
|
|
198
|
-
:disabled="deleteLoading"
|
|
199
|
-
@click="handleDeleteOnlineFormConfiguration()"
|
|
200
|
-
>
|
|
201
|
-
Delete Online Form
|
|
202
|
-
</v-btn>
|
|
203
|
-
</v-col>
|
|
204
|
-
</v-row>
|
|
205
|
-
</v-toolbar>
|
|
180
|
+
<div class="screen-modal__footer">
|
|
181
|
+
<v-btn
|
|
182
|
+
variant="outlined"
|
|
183
|
+
class="screen-btn-ghost"
|
|
184
|
+
:disabled="deleteLoading"
|
|
185
|
+
@click="confirmDialog = false"
|
|
186
|
+
>
|
|
187
|
+
Close
|
|
188
|
+
</v-btn>
|
|
189
|
+
<v-btn
|
|
190
|
+
variant="flat"
|
|
191
|
+
class="screen-btn-primary"
|
|
192
|
+
:loading="deleteLoading"
|
|
193
|
+
:disabled="deleteLoading"
|
|
194
|
+
@click="handleDeleteOnlineFormConfiguration()"
|
|
195
|
+
>
|
|
196
|
+
Delete Online Form
|
|
197
|
+
</v-btn>
|
|
198
|
+
</div>
|
|
206
199
|
</v-card>
|
|
207
200
|
</v-dialog>
|
|
208
201
|
|
|
@@ -433,4 +426,12 @@ function successUpdate() {
|
|
|
433
426
|
.online-forms-config__search {
|
|
434
427
|
max-width: 240px;
|
|
435
428
|
}
|
|
429
|
+
|
|
430
|
+
/* The sort toggle is the only control on this toolbar with an on/off state.
|
|
431
|
+
`--accent-strong` is the design's own accent; the icon button has no
|
|
432
|
+
"selected" variant, so the state is one declaration rather than a variant
|
|
433
|
+
nothing else would use. */
|
|
434
|
+
.online-forms-config__sort--on {
|
|
435
|
+
color: var(--accent-strong);
|
|
436
|
+
}
|
|
436
437
|
</style>
|
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.
|
|
5
|
+
"version": "3.2.2-staging.160",
|
|
6
6
|
"author": "7365admin1",
|
|
7
7
|
"main": "./nuxt.config.ts",
|
|
8
8
|
"//files": "What a consumer extending this layer actually loads. Without this npm ships the whole working tree - the changesets, the CI workflows, the render harness in tools/ and any scratch directory that happened to exist at publish time. Nuxt resolves a layer by directory, so every runtime directory below has to stay listed; adding a new top-level runtime directory means adding it here too.",
|
package/utils/status.ts
CHANGED
|
@@ -58,6 +58,11 @@ const TONES: Record<string, TStatusTone> = {
|
|
|
58
58
|
resolved: "ok", // was #4CAF50, green
|
|
59
59
|
active: "ok", // was `success`
|
|
60
60
|
|
|
61
|
+
// An online-form submission sent back to the resident to correct and send
|
|
62
|
+
// again. Unlisted it would come out neutral, which would make "needs your
|
|
63
|
+
// attention" look the same as "nothing is happening".
|
|
64
|
+
resubmission: "warn",
|
|
65
|
+
|
|
61
66
|
assigned: "info", // was `primary`, on the access-card details dialog
|
|
62
67
|
replaced: "warn", // was `orange`, same screen
|
|
63
68
|
returned: "warn", // was `orange`, same screen - the card came back
|