@7365admin1/layer-common 4.163.4 → 4.163.6
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 +16 -4
- package/assets/css/primitives.css +10 -0
- package/components/Robot/BuildingMap.vue +5 -1
- package/package.json +1 -1
- package/utils/robot-display.ts +19 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @iservice365/layer-common
|
|
2
2
|
|
|
3
|
+
## 4.163.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 5f873a3: Robot building map: name tags of robots standing close together are stacked instead of printed on top of each other.
|
|
8
|
+
|
|
9
|
+
## 4.163.5
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 599cfcd: Page title row: the actions area takes the rest of the row, so search boxes and filters placed there are no longer squashed.
|
|
14
|
+
|
|
3
15
|
## 4.163.4
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -3722,11 +3734,11 @@ Monthly report: a month that had patrols opens the list of that month's patrol r
|
|
|
3722
3734
|
`utils/console-tier.ts` + `composables/useConsoleTier.ts` mirror the server's
|
|
3723
3735
|
own rule from two endpoints the console already calls, unprojected:
|
|
3724
3736
|
|
|
3725
|
-
|
|
3726
|
-
|
|
3737
|
+
GET /api/members/user/:user/app/admin the Seven365 staff membership
|
|
3738
|
+
GET /api/roles/id/:role that membership's role document
|
|
3727
3739
|
|
|
3728
|
-
|
|
3729
|
-
|
|
3740
|
+
owner = member.type === "admin" && role.type === "admin" && role.default === true
|
|
3741
|
+
staff = member.type === "admin" && role.type === "admin"
|
|
3730
3742
|
|
|
3731
3743
|
`role.default` is the marker because it is the only property of a platform
|
|
3732
3744
|
staff role no API caller can set - `role.controller.ts` validates create and
|
|
@@ -203,8 +203,18 @@
|
|
|
203
203
|
.app-page-head__actions {
|
|
204
204
|
display: flex;
|
|
205
205
|
align-items: center;
|
|
206
|
+
justify-content: flex-end;
|
|
206
207
|
gap: 10px;
|
|
207
208
|
flex-wrap: wrap;
|
|
209
|
+
/* Take the rest of the title row: screens that put a search box or filters here (often in a v-row of
|
|
210
|
+
columns) were squeezed to their minimum width, showing a magnifier and a stub select. */
|
|
211
|
+
flex: 1 1 auto;
|
|
212
|
+
min-width: 0;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
/* A v-row of columns inside the actions sizes against the full width given above. */
|
|
216
|
+
.app-page-head__actions > .v-row {
|
|
217
|
+
flex: 1 1 100%;
|
|
208
218
|
}
|
|
209
219
|
|
|
210
220
|
/* ------------------------------------------------------------------ */
|
|
@@ -176,7 +176,7 @@
|
|
|
176
176
|
type="button"
|
|
177
177
|
class="hero-bmap__name"
|
|
178
178
|
:class="{ 'hero-bmap__name--left': nameTagSide(r.left, r.top, r.name, plane.w, plane.h, BUILDING_TAG).flipX }"
|
|
179
|
-
:style="{ transform: `translateZ(${look.pinZ}px) ${unskew}` }"
|
|
179
|
+
:style="{ transform: `translateZ(${look.pinZ + (nameTagStack(f.robots)[r.id] ?? 0) * TAG_STEP}px) ${unskew}` }"
|
|
180
180
|
@click.stop="emit('open', r.id)"
|
|
181
181
|
@mousedown.stop
|
|
182
182
|
>
|
|
@@ -246,6 +246,7 @@ import { siteFloorKey, siteFloorLabel, type TSiteFloor } from "../../utils/robot
|
|
|
246
246
|
import {
|
|
247
247
|
BUILDING_TAG,
|
|
248
248
|
nameTagSide,
|
|
249
|
+
nameTagStack,
|
|
249
250
|
brandName,
|
|
250
251
|
siteFloorOf,
|
|
251
252
|
mapFloors,
|
|
@@ -287,6 +288,9 @@ import {
|
|
|
287
288
|
type TMapCamera,
|
|
288
289
|
} from "../../utils/robot-building";
|
|
289
290
|
|
|
291
|
+
// Height between stacked name tags of robots standing close together (px, along the pin).
|
|
292
|
+
const TAG_STEP = 22;
|
|
293
|
+
|
|
290
294
|
const props = withDefaults(
|
|
291
295
|
defineProps<{
|
|
292
296
|
organization: string;
|
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.163.
|
|
5
|
+
"version": "4.163.6",
|
|
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/robot-display.ts
CHANGED
|
@@ -2041,3 +2041,22 @@ export function jobOptionsLine(offered: { clean: boolean; rounds: boolean; modes
|
|
|
2041
2041
|
}
|
|
2042
2042
|
return "";
|
|
2043
2043
|
}
|
|
2044
|
+
|
|
2045
|
+
/**
|
|
2046
|
+
* Name tags of robots standing close together on one floor would print on top of each other. Each robot gets a
|
|
2047
|
+
* stack level: 0 for the first in a cluster, 1, 2... for the next ones, so their tags can be raised one above the
|
|
2048
|
+
* other. `near` is in plan percent.
|
|
2049
|
+
* ponytail: O(n^2) per floor, fine for the handful of robots a floor carries.
|
|
2050
|
+
*/
|
|
2051
|
+
export function nameTagStack(robots: { id: string; left: string; top: string }[], near = { x: 14, y: 8 }): Record<string, number> {
|
|
2052
|
+
const pct = (v: string) => Number.parseFloat(v) || 0;
|
|
2053
|
+
const out: Record<string, number> = {};
|
|
2054
|
+
robots.forEach((r, i) => {
|
|
2055
|
+
const taken = new Set(robots.slice(0, i).filter((o) => Math.abs(pct(o.left) - pct(r.left)) < near.x && Math.abs(pct(o.top) - pct(r.top)) < near.y).map((o) => out[o.id]));
|
|
2056
|
+
let level = 0;
|
|
2057
|
+
while (taken.has(level)) level++;
|
|
2058
|
+
out[r.id] = level;
|
|
2059
|
+
});
|
|
2060
|
+
return out;
|
|
2061
|
+
}
|
|
2062
|
+
|