@7365admin1/layer-common 3.2.2-staging.100 → 3.2.2-staging.101
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/AppField.vue
CHANGED
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
:value="model"
|
|
25
25
|
:placeholder="placeholder"
|
|
26
26
|
:disabled="disabled"
|
|
27
|
+
:readonly="readonly"
|
|
27
28
|
@input="model = ($event.target as HTMLInputElement).value"
|
|
28
29
|
/>
|
|
29
30
|
</label>
|
|
@@ -41,6 +42,10 @@ defineProps({
|
|
|
41
42
|
search: { type: Boolean, default: false },
|
|
42
43
|
compact: { type: Boolean, default: false },
|
|
43
44
|
disabled: { type: Boolean, default: false },
|
|
45
|
+
/** A field that prints a derived value - a preview, a computed reference -
|
|
46
|
+
and is not typed into. Kept distinct from `disabled`, which also greys
|
|
47
|
+
the box and takes it out of the tab order. */
|
|
48
|
+
readonly: { type: Boolean, default: false },
|
|
44
49
|
klass: { type: String, default: "" },
|
|
45
50
|
});
|
|
46
51
|
</script>
|
|
@@ -1,28 +1,27 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<v-row no-gutters align="center" justify="center">
|
|
3
3
|
<v-col cols="12">
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
>
|
|
10
|
-
<
|
|
11
|
-
|
|
12
|
-
</
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
<v-card-text class="pa-0">
|
|
4
|
+
<!-- The screen's name and its Back move out of the `grey-lighten-4` bar -
|
|
5
|
+
a slab that stayed white in dark mode - onto the design's title row.
|
|
6
|
+
All five service apps mount this component bare, so the layer is the
|
|
7
|
+
only place the page name can come from. -->
|
|
8
|
+
<PageHeader title="Area Checklist">
|
|
9
|
+
<template #actions>
|
|
10
|
+
<AppButton variant="ghost" icon="mdi-chevron-left" @click="back()">
|
|
11
|
+
Back
|
|
12
|
+
</AppButton>
|
|
13
|
+
</template>
|
|
14
|
+
</PageHeader>
|
|
15
|
+
|
|
16
|
+
<AppCard>
|
|
17
|
+
<div class="pa-0">
|
|
19
18
|
<v-row no-gutters>
|
|
20
19
|
<v-col
|
|
21
20
|
cols="12"
|
|
22
21
|
md="6"
|
|
23
22
|
lg="5"
|
|
24
23
|
xl="4"
|
|
25
|
-
|
|
24
|
+
class="checklist-detail__split"
|
|
26
25
|
>
|
|
27
26
|
<v-row no-gutters class="pa-6">
|
|
28
27
|
<v-col cols="12" class="mb-4">
|
|
@@ -47,11 +46,11 @@
|
|
|
47
46
|
|
|
48
47
|
<v-col cols="12" class="mb-3">
|
|
49
48
|
<div class="text-body-2 mb-1">Status:</div>
|
|
50
|
-
<
|
|
51
|
-
class="text-capitalize
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
49
|
+
<StatusChip
|
|
50
|
+
class="text-capitalize"
|
|
51
|
+
:status="status"
|
|
52
|
+
:label="status || 'N/A'"
|
|
53
|
+
/>
|
|
55
54
|
</v-col>
|
|
56
55
|
</v-row>
|
|
57
56
|
</v-col>
|
|
@@ -119,15 +118,15 @@
|
|
|
119
118
|
class="text-subtitle-2 font-weight-bold px-0"
|
|
120
119
|
>
|
|
121
120
|
Set {{ checklistSet.set }}
|
|
122
|
-
<
|
|
121
|
+
<StatusChip
|
|
123
122
|
v-if="checklistSet.isScheduleTask"
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
class="
|
|
123
|
+
tone="info"
|
|
124
|
+
:dot="false"
|
|
125
|
+
pill
|
|
126
|
+
class="ml-2"
|
|
128
127
|
>
|
|
129
128
|
Schedule Task
|
|
130
|
-
</
|
|
129
|
+
</StatusChip>
|
|
131
130
|
</v-list-subheader>
|
|
132
131
|
|
|
133
132
|
<v-list-item
|
|
@@ -161,22 +160,14 @@
|
|
|
161
160
|
</div>
|
|
162
161
|
</v-col>
|
|
163
162
|
<v-col cols="12" sm="2" class="text-right">
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
: 'grey'
|
|
169
|
-
"
|
|
170
|
-
:variant="
|
|
171
|
-
unit.status?.toLowerCase() === 'completed'
|
|
172
|
-
? 'flat'
|
|
173
|
-
: 'outlined'
|
|
174
|
-
"
|
|
175
|
-
size="small"
|
|
163
|
+
<!-- Same word decides the colour, only now through the
|
|
164
|
+
shared status map, so "Completed" here is the same
|
|
165
|
+
green as on every other screen. -->
|
|
166
|
+
<StatusChip
|
|
176
167
|
class="text-capitalize"
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
168
|
+
:status="unit.status || 'Open'"
|
|
169
|
+
:label="unit.status || 'Open'"
|
|
170
|
+
/>
|
|
180
171
|
</v-col>
|
|
181
172
|
</v-row>
|
|
182
173
|
</v-list-item>
|
|
@@ -191,8 +182,8 @@
|
|
|
191
182
|
</v-row>
|
|
192
183
|
</v-col>
|
|
193
184
|
</v-row>
|
|
194
|
-
</
|
|
195
|
-
</
|
|
185
|
+
</div>
|
|
186
|
+
</AppCard>
|
|
196
187
|
</v-col>
|
|
197
188
|
</v-row>
|
|
198
189
|
</template>
|
|
@@ -242,3 +233,19 @@ const timeOut = ref<string>("N/A");
|
|
|
242
233
|
const status = ref<string>("N/A");
|
|
243
234
|
const signatureUrl = ref<string>("");
|
|
244
235
|
</script>
|
|
236
|
+
|
|
237
|
+
<style scoped>
|
|
238
|
+
/* Was an inline `rgba(0,0,0,.12)`, which is the same near-black rule in dark
|
|
239
|
+
mode. The token follows the theme. At `md` and below the two halves stack, so
|
|
240
|
+
the rule moves under the first one. */
|
|
241
|
+
.checklist-detail__split {
|
|
242
|
+
border-bottom: 1px solid var(--border);
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
@media (min-width: 960px) {
|
|
246
|
+
.checklist-detail__split {
|
|
247
|
+
border-bottom: none;
|
|
248
|
+
border-right: 1px solid var(--border);
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
</style>
|
|
@@ -1,33 +1,53 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
2
|
+
<div>
|
|
3
|
+
<!-- The page had no heading of its own: the five service apps mount this
|
|
4
|
+
component bare on `[org]/[site]/settings`, so the name only ever
|
|
5
|
+
appeared in the navigation rail. "Settings" is that rail's own label. -->
|
|
6
|
+
<PageHeader title="Settings" />
|
|
7
|
+
|
|
8
|
+
<v-row no-gutters>
|
|
9
|
+
<!--
|
|
10
|
+
`multiple` and which panel opens first are BEHAVIOUR, so they are
|
|
11
|
+
left exactly as they were - `.screen-accordion` only changes the
|
|
12
|
+
drawing, the same way `SiteSettings` already does it.
|
|
13
|
+
-->
|
|
14
|
+
<v-expansion-panels multiple v-model="openPanels" class="screen-accordion">
|
|
15
|
+
|
|
16
|
+
<!-- Work Order Settings -->
|
|
17
|
+
<v-expansion-panel>
|
|
18
|
+
<v-expansion-panel-title>
|
|
19
|
+
<v-icon class="mr-2">mdi-format-list-numbered</v-icon>
|
|
20
|
+
Work Order Settings
|
|
21
|
+
</v-expansion-panel-title>
|
|
22
|
+
|
|
23
|
+
<v-expansion-panel-text>
|
|
24
|
+
<div class="wo-settings__fields">
|
|
25
|
+
<AppField v-model="prefix" label="Prefix"
|
|
26
|
+
:disabled="isLoading || !canManageSiteSettings" @input="handleInput" />
|
|
27
|
+
|
|
28
|
+
<!-- `return-object` keeps the emitted value a NUMBER, which is
|
|
29
|
+
what `createWorkOrderSettings` puts on the wire today. -->
|
|
30
|
+
<AppSelect v-model="noOfDigits" return-object
|
|
31
|
+
:items="[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]" label="No. of Digits"
|
|
32
|
+
:disabled="isLoading || !canManageSiteSettings" />
|
|
33
|
+
|
|
34
|
+
<AppField :model-value="orderNumberPreview" label="Preview" readonly />
|
|
35
|
+
</div>
|
|
36
|
+
|
|
37
|
+
<!-- Still a `v-btn`: `AppButton` has no loading state, and the
|
|
38
|
+
spinner on save is feedback, not decoration. -->
|
|
39
|
+
<v-btn v-if="canManageSiteSettings" class="screen-btn-primary text-none mt-4"
|
|
40
|
+
variant="flat" :loading="isLoading" @click="save">
|
|
41
|
+
Save
|
|
42
|
+
</v-btn>
|
|
43
|
+
</v-expansion-panel-text>
|
|
44
|
+
</v-expansion-panel>
|
|
45
|
+
|
|
46
|
+
</v-expansion-panels>
|
|
47
|
+
|
|
48
|
+
<Snackbar v-model="toast.show" :text="toast.message" :color="toast.color" />
|
|
49
|
+
</v-row>
|
|
50
|
+
</div>
|
|
31
51
|
</template>
|
|
32
52
|
|
|
33
53
|
<script setup lang="ts">
|
|
@@ -173,4 +193,15 @@ function show(message: string, color: string) {
|
|
|
173
193
|
toast.message = message
|
|
174
194
|
toast.color = color
|
|
175
195
|
}
|
|
176
|
-
</script>
|
|
196
|
+
</script>
|
|
197
|
+
|
|
198
|
+
<style scoped>
|
|
199
|
+
/* The design stacks a settings form's fields on one gap, rather than leaning on
|
|
200
|
+
each Vuetify field's own 22px of hint space. */
|
|
201
|
+
.wo-settings__fields {
|
|
202
|
+
display: flex;
|
|
203
|
+
flex-direction: column;
|
|
204
|
+
gap: 16px;
|
|
205
|
+
max-width: 420px;
|
|
206
|
+
}
|
|
207
|
+
</style>
|
package/components/StockCard.vue
CHANGED
|
@@ -5,15 +5,18 @@
|
|
|
5
5
|
color="page-background-color fill-height header-row"
|
|
6
6
|
>
|
|
7
7
|
<v-col cols="12" sm="12" md="11" lg="12" xl="12">
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
<!-- The loose Back link above the card becomes the design's title row -
|
|
9
|
+
the page name on the left, its action right-aligned on the same line.
|
|
10
|
+
`title` was already declared here and never drawn. -->
|
|
11
|
+
<PageHeader :title="title">
|
|
12
|
+
<template #actions>
|
|
13
|
+
<AppButton variant="ghost" icon="mdi-arrow-left" @click="back">
|
|
12
14
|
Back
|
|
13
|
-
</
|
|
14
|
-
</
|
|
15
|
-
</
|
|
16
|
-
|
|
15
|
+
</AppButton>
|
|
16
|
+
</template>
|
|
17
|
+
</PageHeader>
|
|
18
|
+
|
|
19
|
+
<AppCard class="pa-5 position-relative">
|
|
17
20
|
<!-- Stock Information -->
|
|
18
21
|
<v-row class="pt-2">
|
|
19
22
|
<v-col cols="12">
|
|
@@ -104,7 +107,7 @@
|
|
|
104
107
|
</TableMain>
|
|
105
108
|
</v-col>
|
|
106
109
|
</v-row>
|
|
107
|
-
</
|
|
110
|
+
</AppCard>
|
|
108
111
|
</v-col>
|
|
109
112
|
</v-row>
|
|
110
113
|
</template>
|
|
@@ -181,9 +184,11 @@ watchEffect(() => {
|
|
|
181
184
|
</script>
|
|
182
185
|
|
|
183
186
|
<style scoped>
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
+
/* The scoped `.text-fontgray { color: #7e7e7e }` that used to sit here is gone.
|
|
188
|
+
It out-specified the layer's tokenised rule in `assets/css/screens.css`, which
|
|
189
|
+
is why these four field labels were the estate's one measured 4.06:1 - the
|
|
190
|
+
same fixed grey in both themes. The surface under them is `AppCard`, which is
|
|
191
|
+
itself tokenised, so the ink can safely follow the theme. */
|
|
187
192
|
|
|
188
193
|
:deep() .v-table .v-table__wrapper > table > thead > tr > th:not(:last-child) {
|
|
189
194
|
border-right: thin solid rgba(var(--v-border-color), var(--v-border-opacity));
|