@7365admin1/layer-common 3.2.2-staging.153 → 3.2.2-staging.154
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,14 +1,31 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
The gate that stands in for a whole screen when HID is not enabled for a site.
|
|
3
|
+
|
|
4
|
+
What it was: a raw `v-alert type="info" variant="tonal"` — Vuetify's own tonal
|
|
5
|
+
slab, at Vuetify's 4px radius, in Vuetify's font, on a Vuetify blue the theme
|
|
6
|
+
does not control. It is a full-screen state, not an inline warning.
|
|
7
|
+
|
|
8
|
+
DESIGN GAP, STATED: the handoff draws no "service not enabled" page. So this
|
|
9
|
+
is assembled from the established primitive rather than invented, exactly as
|
|
10
|
+
`PlaceholderComponent` was — `.screen-empty` (`assets/css/screens.css:149`) is
|
|
11
|
+
the design's centred, muted, 52px-padded block for "there is nothing to show
|
|
12
|
+
here", and the heading takes the `--fs-card-title` / `--fw-card-title` type
|
|
13
|
+
the design uses for every panel heading.
|
|
14
|
+
|
|
15
|
+
`.tone-info` sets `--tone-bg`; the icon's soft disc is the only thing that
|
|
16
|
+
paints with it, so the block keeps the informational colour without becoming
|
|
17
|
+
a coloured slab. Icons are translated centrally — no hand-mapping here.
|
|
18
|
+
-->
|
|
1
19
|
<template>
|
|
2
20
|
<slot v-if="hidEnabled" />
|
|
3
21
|
|
|
4
|
-
<v-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
class="
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
/>
|
|
22
|
+
<div v-else class="screen-empty hid-gate">
|
|
23
|
+
<span class="hid-gate__icon tone-info">
|
|
24
|
+
<v-icon icon="mdi-information-outline" size="24" />
|
|
25
|
+
</span>
|
|
26
|
+
<h2 class="hid-gate__title">HID service is not enabled</h2>
|
|
27
|
+
<p class="hid-gate__body">{{ message }}</p>
|
|
28
|
+
</div>
|
|
12
29
|
</template>
|
|
13
30
|
|
|
14
31
|
<script setup lang="ts">
|
|
@@ -49,3 +66,40 @@ watchEffect(() => {
|
|
|
49
66
|
);
|
|
50
67
|
});
|
|
51
68
|
</script>
|
|
69
|
+
|
|
70
|
+
<style scoped>
|
|
71
|
+
/* It replaces a screen's whole body, so it holds the viewport rather than
|
|
72
|
+
collapsing to the height of three lines. Same reason as PlaceholderComponent. */
|
|
73
|
+
.hid-gate {
|
|
74
|
+
min-height: 40vh;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.hid-gate__icon {
|
|
78
|
+
display: inline-flex;
|
|
79
|
+
align-items: center;
|
|
80
|
+
justify-content: center;
|
|
81
|
+
width: 44px;
|
|
82
|
+
height: 44px;
|
|
83
|
+
border-radius: 50%;
|
|
84
|
+
background: var(--tone-bg);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/* `.screen-empty .v-icon` paints `--muted`; inside the tone scope the icon is
|
|
88
|
+
the informational colour, so it has to win that one-class rule. */
|
|
89
|
+
.hid-gate .hid-gate__icon .v-icon {
|
|
90
|
+
color: var(--info);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.hid-gate__title {
|
|
94
|
+
margin: 0;
|
|
95
|
+
font-size: var(--fs-card-title);
|
|
96
|
+
font-weight: var(--fw-card-title);
|
|
97
|
+
color: var(--text);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.hid-gate__body {
|
|
101
|
+
max-width: 46ch;
|
|
102
|
+
margin: 0;
|
|
103
|
+
font-weight: var(--fw-cell);
|
|
104
|
+
}
|
|
105
|
+
</style>
|
|
@@ -51,9 +51,9 @@ export default function useFeedback() {
|
|
|
51
51
|
|
|
52
52
|
const feedback = useState("feedback", () => new MFeedback());
|
|
53
53
|
const feedbacks = useState("feedbacks", (): TFeedback[] => []);
|
|
54
|
-
const page = useState("
|
|
55
|
-
const pages = useState("
|
|
56
|
-
const pageRange = useState("
|
|
54
|
+
const page = useState("feedbackPage", () => 1);
|
|
55
|
+
const pages = useState("feedbackPages", () => 0);
|
|
56
|
+
const pageRange = useState("feedbackPageRange", () => "-- - -- of --");
|
|
57
57
|
|
|
58
58
|
function setFeedback(data?: TFeedback) {
|
|
59
59
|
feedback.value = data || new MFeedback();
|
package/composables/useMember.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export default function useMember() {
|
|
2
2
|
const members = useState<Array<TMember>>("members", () => []);
|
|
3
|
-
const page = useState("
|
|
4
|
-
const pages = useState("
|
|
5
|
-
const pageRange = useState("
|
|
3
|
+
const page = useState("memberPage", () => 1);
|
|
4
|
+
const pages = useState("memberPages", () => 0);
|
|
5
|
+
const pageRange = useState("memberPageRange", () => "-- - -- of --");
|
|
6
6
|
|
|
7
7
|
const member = useState<TMember>("member", () => ({
|
|
8
8
|
_id: "",
|
|
@@ -8,9 +8,9 @@ export default function useServiceProvider() {
|
|
|
8
8
|
() => []
|
|
9
9
|
);
|
|
10
10
|
|
|
11
|
-
const page = useState("
|
|
12
|
-
const pages = useState("
|
|
13
|
-
const pageRange = useState("
|
|
11
|
+
const page = useState("serviceProviderPage", () => 1);
|
|
12
|
+
const pages = useState("serviceProviderPages", () => 0);
|
|
13
|
+
const pageRange = useState("serviceProviderPageRange", () => "-- - -- of --");
|
|
14
14
|
|
|
15
15
|
const serviceProvider = useState(
|
|
16
16
|
"serviceProvider",
|
|
@@ -57,9 +57,23 @@ export default function useWorkOrder() {
|
|
|
57
57
|
|
|
58
58
|
const workOrder = useState("workOrder", () => new MWorkOrder());
|
|
59
59
|
const workOrders = useState<Array<TWorkOrder>>("workOrders", () => []);
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
60
|
+
/*
|
|
61
|
+
* Namespaced, like every other composable in this folder (`facilityPage`,
|
|
62
|
+
* `commentPage`, `unit-billPage`). These three were registered on the bare
|
|
63
|
+
* keys "page" / "pages" / "pageRange", which `useState` treats as ONE
|
|
64
|
+
* app-global cell per key - so `useFeedback`, `useMember` and
|
|
65
|
+
* `useServiceProvider`, which register the same bare keys, were handed the
|
|
66
|
+
* very same refs. Two of those screens open at once and they share one page
|
|
67
|
+
* counter.
|
|
68
|
+
*
|
|
69
|
+
* Nothing depended on the collision: these three are never assigned anywhere
|
|
70
|
+
* in this composable, and `WorkOrder/ListView.vue` is the only file in the
|
|
71
|
+
* layer or in any of the 11 web apps that destructures them - every real
|
|
72
|
+
* work-order page keeps its own local `ref(1)`.
|
|
73
|
+
*/
|
|
74
|
+
const page = useState("workOrderPage", () => 1);
|
|
75
|
+
const pages = useState("workOrderPages", () => 0);
|
|
76
|
+
const pageRange = useState("workOrderPageRange", () => "-- - -- of --");
|
|
63
77
|
|
|
64
78
|
function setWorkOrder(data?: TWorkOrder) {
|
|
65
79
|
workOrder.value = data || new MWorkOrder();
|
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.154",
|
|
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.",
|