@7365admin1/layer-common 4.151.0 → 4.151.1
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/CHANGELOG.md +10 -4
- package/components/Robot/Form.vue +2 -1
- package/package.json +1 -1
- package/utils/robot-credential-form.ts +9 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @iservice365/layer-common
|
|
2
2
|
|
|
3
|
+
## 4.151.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 4462388: Robots: the VIGGO "Robot VIN numbers" field's hint asks for the VINs, separated by commas, instead of "Paste from the brand portal".
|
|
8
|
+
|
|
3
9
|
## 4.151.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
|
@@ -3560,11 +3566,11 @@ Monthly report: a month that had patrols opens the list of that month's patrol r
|
|
|
3560
3566
|
`utils/console-tier.ts` + `composables/useConsoleTier.ts` mirror the server's
|
|
3561
3567
|
own rule from two endpoints the console already calls, unprojected:
|
|
3562
3568
|
|
|
3563
|
-
|
|
3564
|
-
|
|
3569
|
+
GET /api/members/user/:user/app/admin the Seven365 staff membership
|
|
3570
|
+
GET /api/roles/id/:role that membership's role document
|
|
3565
3571
|
|
|
3566
|
-
|
|
3567
|
-
|
|
3572
|
+
owner = member.type === "admin" && role.type === "admin" && role.default === true
|
|
3573
|
+
staff = member.type === "admin" && role.type === "admin"
|
|
3568
3574
|
|
|
3569
3575
|
`role.default` is the marker because it is the only property of a platform
|
|
3570
3576
|
staff role no API caller can set - `role.controller.ts` validates create and
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
:type="tokenSecret ? 'password' : 'text'"
|
|
71
71
|
autocomplete="new-password"
|
|
72
72
|
spellcheck="false"
|
|
73
|
-
:placeholder="credentialPlaceholder(editing)"
|
|
73
|
+
:placeholder="credentialTokenPlaceholder(brand, editing) ?? credentialPlaceholder(editing)"
|
|
74
74
|
:disabled="saving"
|
|
75
75
|
/>
|
|
76
76
|
</div>
|
|
@@ -111,6 +111,7 @@ import { credentialsNote } from "../../utils/robot-floorplan";
|
|
|
111
111
|
import {
|
|
112
112
|
credentialDiscoverable,
|
|
113
113
|
credentialLabels,
|
|
114
|
+
credentialTokenPlaceholder,
|
|
114
115
|
credentialMissingMessage,
|
|
115
116
|
credentialTokenDefault,
|
|
116
117
|
credentialTokenIsSecret,
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@7365admin1/layer-common",
|
|
3
3
|
"license": "MIT",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"version": "4.151.
|
|
5
|
+
"version": "4.151.1",
|
|
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.",
|
|
@@ -34,6 +34,15 @@ export function credentialTokenIsSecret(brand: unknown): boolean {
|
|
|
34
34
|
return brand !== "oneway" && brand !== "viggo";
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
+
/**
|
|
38
|
+
* The second field's hint when it is not a credential to paste (VIGGO: the
|
|
39
|
+
* robots' VINs); null = the usual write-only hint. Once saved it is never shown
|
|
40
|
+
* back, so editing keeps the usual "Saved · hidden" hint.
|
|
41
|
+
*/
|
|
42
|
+
export function credentialTokenPlaceholder(brand: unknown, saved: unknown): string | null {
|
|
43
|
+
return brand === "viggo" && saved !== true ? "Type each robot's VIN, separated by commas" : null;
|
|
44
|
+
}
|
|
45
|
+
|
|
37
46
|
/** Brands whose one company credential lists its robots, so Add robot picks the serial (Find robots). */
|
|
38
47
|
export function credentialDiscoverable(brand: unknown): boolean {
|
|
39
48
|
return brand === "ounitech" || brand === "padbot" || brand === "oneway" || brand === "viggo";
|