@7365admin1/layer-common 4.154.1 → 4.155.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 +16 -4
- package/components/Layout/Header.vue +43 -16
- package/components/SwitchContext.vue +31 -15
- package/composables/useSecurityPermission.ts +10 -0
- package/constants/permissions.ts +13 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @iservice365/layer-common
|
|
2
2
|
|
|
3
|
+
## 4.155.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 9d1c583: Top bar, site switcher and profile menu show the full site and organisation name: long names wrap (the bar grows to fit) instead of being cut with an ellipsis.
|
|
8
|
+
|
|
9
|
+
## 4.155.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- 8bc84fd: Security Ops: two new actions in the `security-ops` resource of the security role catalogue. `manage-ops-sites` lets a role add sites that are not on iSecure365 to Security Ops, edit or deactivate them, and remove people from a site. `work-at-ops-sites` puts the holder on every Ops site of their company automatically, including sites added later. The role catalogue fixture is regenerated; core's `test/e2e/fixtures/lc-role-catalogues.json` needs the same two keys.
|
|
14
|
+
|
|
3
15
|
## 4.154.1
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -3608,11 +3620,11 @@ Monthly report: a month that had patrols opens the list of that month's patrol r
|
|
|
3608
3620
|
`utils/console-tier.ts` + `composables/useConsoleTier.ts` mirror the server's
|
|
3609
3621
|
own rule from two endpoints the console already calls, unprojected:
|
|
3610
3622
|
|
|
3611
|
-
|
|
3612
|
-
|
|
3623
|
+
GET /api/members/user/:user/app/admin the Seven365 staff membership
|
|
3624
|
+
GET /api/roles/id/:role that membership's role document
|
|
3613
3625
|
|
|
3614
|
-
|
|
3615
|
-
|
|
3626
|
+
owner = member.type === "admin" && role.type === "admin" && role.default === true
|
|
3627
|
+
staff = member.type === "admin" && role.type === "admin"
|
|
3616
3628
|
|
|
3617
3629
|
`role.default` is the marker because it is the only property of a platform
|
|
3618
3630
|
staff role no API caller can set - `role.controller.ts` validates create and
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
<!-- Seven365 staff view: persistent banner with Exit (only while one is open). -->
|
|
14
14
|
<StaffViewBanner />
|
|
15
15
|
<v-app-bar
|
|
16
|
-
:height="
|
|
16
|
+
:height="barHeight"
|
|
17
17
|
flat
|
|
18
18
|
scroll-behavior="elevate"
|
|
19
19
|
scroll-threshold="200"
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
>
|
|
22
22
|
<v-app-bar-nav-icon v-if="!props.hideNavIcon" @click="drawer = !drawer"></v-app-bar-nav-icon>
|
|
23
23
|
|
|
24
|
-
<div class="app-topbar-shell__crumb">
|
|
24
|
+
<div ref="crumbEl" class="app-topbar-shell__crumb">
|
|
25
25
|
<span v-if="siteName" class="app-topbar-shell__site">{{ siteName }}</span>
|
|
26
26
|
<span v-if="siteName && moduleName" class="app-topbar-shell__sep">/</span>
|
|
27
27
|
<span class="app-topbar-shell__module">{{ moduleName }}</span>
|
|
@@ -170,6 +170,25 @@ const siteName = computed(() =>
|
|
|
170
170
|
|
|
171
171
|
const route = useRoute();
|
|
172
172
|
|
|
173
|
+
/**
|
|
174
|
+
* The bar is the design's 58px, and grows when a long site name wraps onto
|
|
175
|
+
* more lines than fit - so the full name is always visible, never clipped.
|
|
176
|
+
*/
|
|
177
|
+
const crumbEl = ref<HTMLElement | null>(null);
|
|
178
|
+
const crumbHeight = ref(0);
|
|
179
|
+
const barHeight = computed(() => Math.max(58, crumbHeight.value));
|
|
180
|
+
let crumbObserver: ResizeObserver | null = null;
|
|
181
|
+
|
|
182
|
+
onMounted(() => {
|
|
183
|
+
if (!crumbEl.value || typeof ResizeObserver === "undefined") return;
|
|
184
|
+
crumbObserver = new ResizeObserver(() => {
|
|
185
|
+
crumbHeight.value = crumbEl.value?.offsetHeight ?? 0;
|
|
186
|
+
});
|
|
187
|
+
crumbObserver.observe(crumbEl.value);
|
|
188
|
+
});
|
|
189
|
+
|
|
190
|
+
onBeforeUnmount(() => crumbObserver?.disconnect());
|
|
191
|
+
|
|
173
192
|
/**
|
|
174
193
|
* The page's name comes off the route name, which the applications build from
|
|
175
194
|
* their own folder structure: `org-site-work-orders` is Work Orders. The rule
|
|
@@ -238,26 +257,38 @@ const { getNameInitials } = useUtils();
|
|
|
238
257
|
flex: 1 1 auto;
|
|
239
258
|
min-width: 0;
|
|
240
259
|
display: flex;
|
|
260
|
+
flex-wrap: wrap;
|
|
241
261
|
align-items: center;
|
|
242
|
-
gap: 6px;
|
|
262
|
+
column-gap: 6px;
|
|
263
|
+
padding-block: 6px;
|
|
243
264
|
font-size: var(--fs-breadcrumb);
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
white-space:
|
|
265
|
+
line-height: 1.25;
|
|
266
|
+
/* Owner 2026-10-30: the site name is shown IN FULL - it wraps, the bar grows
|
|
267
|
+
to fit (see `barHeight`), and it is never cut with an ellipsis. */
|
|
268
|
+
white-space: normal;
|
|
248
269
|
}
|
|
249
270
|
|
|
250
271
|
.app-topbar-shell__site,
|
|
251
272
|
.app-topbar-shell__sep {
|
|
252
273
|
color: var(--muted);
|
|
253
|
-
|
|
254
|
-
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.app-topbar-shell__site {
|
|
277
|
+
/* Word boundaries first; only a single unbroken word wider than the bar is
|
|
278
|
+
split, so nothing is ever hidden. */
|
|
279
|
+
overflow-wrap: break-word;
|
|
255
280
|
}
|
|
256
281
|
|
|
257
282
|
.app-topbar-shell__module {
|
|
258
283
|
color: var(--text);
|
|
259
284
|
font-weight: 700;
|
|
260
|
-
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
/* Phones: a little smaller, so a long name takes fewer lines. */
|
|
288
|
+
@media (max-width: 599px) {
|
|
289
|
+
.app-topbar-shell__crumb {
|
|
290
|
+
font-size: 12px;
|
|
291
|
+
}
|
|
261
292
|
}
|
|
262
293
|
|
|
263
294
|
/**
|
|
@@ -311,9 +342,7 @@ const { getNameInitials } = useUtils();
|
|
|
311
342
|
font-weight: 800;
|
|
312
343
|
line-height: 1.3;
|
|
313
344
|
color: var(--text);
|
|
314
|
-
overflow:
|
|
315
|
-
white-space: nowrap;
|
|
316
|
-
text-overflow: ellipsis;
|
|
345
|
+
overflow-wrap: break-word;
|
|
317
346
|
}
|
|
318
347
|
|
|
319
348
|
.app-profile-menu__site {
|
|
@@ -321,9 +350,7 @@ const { getNameInitials } = useUtils();
|
|
|
321
350
|
font-weight: 600;
|
|
322
351
|
line-height: 1.3;
|
|
323
352
|
color: var(--muted);
|
|
324
|
-
overflow:
|
|
325
|
-
white-space: nowrap;
|
|
326
|
-
text-overflow: ellipsis;
|
|
353
|
+
overflow-wrap: break-word;
|
|
327
354
|
}
|
|
328
355
|
|
|
329
356
|
.app-profile-menu__rows {
|
|
@@ -15,10 +15,9 @@
|
|
|
15
15
|
:to="props.route"
|
|
16
16
|
class="switch-context__activator"
|
|
17
17
|
>
|
|
18
|
-
<!--
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
ellipsis; the title attribute keeps the full name on hover. -->
|
|
18
|
+
<!-- Owner 2026-10-30: the organisation and site names are shown IN
|
|
19
|
+
FULL - wrapped at word boundaries onto as many lines as they
|
|
20
|
+
need, never cut with an ellipsis. -->
|
|
22
21
|
<v-list-item-title
|
|
23
22
|
class="switch-context__name"
|
|
24
23
|
:title="name || `Select ${prop.title}`"
|
|
@@ -339,18 +338,35 @@ const selectItem = (value: string) => {
|
|
|
339
338
|
background: var(--hover);
|
|
340
339
|
}
|
|
341
340
|
|
|
342
|
-
/*
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
-
|
|
349
|
-
-webkit-box-orient: vertical;
|
|
350
|
-
overflow: hidden;
|
|
341
|
+
/* Owner 2026-10-30: the full organisation/site name, wrapped at word
|
|
342
|
+
boundaries onto as many lines as it needs - never clamped or cut. Only a
|
|
343
|
+
single word wider than the rail is split. The selector carries the Vuetify
|
|
344
|
+
class so it beats `.v-list-item-title`'s nowrap + ellipsis. */
|
|
345
|
+
.v-list-item-title.switch-context__name {
|
|
346
|
+
/* A touch under the rail's 14px, so a long name takes fewer lines. */
|
|
347
|
+
font-size: 13px;
|
|
351
348
|
white-space: normal;
|
|
352
|
-
overflow
|
|
353
|
-
|
|
349
|
+
overflow: visible;
|
|
350
|
+
text-overflow: clip;
|
|
351
|
+
overflow-wrap: break-word;
|
|
354
352
|
line-height: 1.25;
|
|
355
353
|
}
|
|
354
|
+
|
|
355
|
+
/* The dropdown rows: same rule, the whole name on every row. */
|
|
356
|
+
.switch-context__row {
|
|
357
|
+
white-space: normal;
|
|
358
|
+
overflow-wrap: break-word;
|
|
359
|
+
line-height: 1.3;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
/* The icon's gap is the rail rows' 10px, not Vuetify's 32px, so a long name
|
|
363
|
+
gets the width and takes fewer lines. */
|
|
364
|
+
.switch-context__activator :deep(.v-list-item__prepend > .v-icon ~ .v-list-item__spacer) {
|
|
365
|
+
width: 10px;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
.switch-context__activator :deep(.v-list-item__content),
|
|
369
|
+
.switch-context__row :deep(.v-list-item__content) {
|
|
370
|
+
overflow: visible;
|
|
371
|
+
}
|
|
356
372
|
</style>
|
|
@@ -830,6 +830,16 @@ export default function useSecurityPermission() {
|
|
|
830
830
|
description:
|
|
831
831
|
"Allows the user to view site visits across the sites they can reach, including other executives' visits.",
|
|
832
832
|
},
|
|
833
|
+
"manage-ops-sites": {
|
|
834
|
+
check: true,
|
|
835
|
+
description:
|
|
836
|
+
"Allows the user to add sites that are not on iSecure365 to Security Ops, edit or deactivate them, and remove people from a site.",
|
|
837
|
+
},
|
|
838
|
+
"work-at-ops-sites": {
|
|
839
|
+
check: true,
|
|
840
|
+
description:
|
|
841
|
+
"Puts the user on every Ops site of the company automatically, including sites added later. They can be removed from a single site in Ops Settings.",
|
|
842
|
+
},
|
|
833
843
|
},
|
|
834
844
|
// NEW. Seeing the CCTV wall, as distinct from setting cameras up
|
|
835
845
|
// (`site-settings:manage-cctv-camera`).
|
package/constants/permissions.ts
CHANGED
|
@@ -355,7 +355,19 @@ export const PERMISSIONS = {
|
|
|
355
355
|
// administers this site, not that they run security at it - measured
|
|
356
356
|
// 2026-10-13, every wildcard holder at a live site was an org owner, a test
|
|
357
357
|
// account or a service provider's administrator.
|
|
358
|
-
|
|
358
|
+
//
|
|
359
|
+
// `manage-ops-sites` and `work-at-ops-sites` (2026-10-30): a security company
|
|
360
|
+
// adds its own sites, including ones not on iSecure365, in Security Ops, Ops
|
|
361
|
+
// Settings. The first lets a role add, edit and deactivate those sites and
|
|
362
|
+
// remove people from one; the second puts the holder on every Ops site of
|
|
363
|
+
// their company, computed by API-core's reach rule rather than copied
|
|
364
|
+
// memberships, so a later hire needs nothing per site.
|
|
365
|
+
"security-ops": [
|
|
366
|
+
"start-site-visit",
|
|
367
|
+
"see-all-site-visits",
|
|
368
|
+
"manage-ops-sites",
|
|
369
|
+
"work-at-ops-sites",
|
|
370
|
+
],
|
|
359
371
|
// Owner answer Q9, 2026-09-11: seeing the CCTV wall. Distinct from
|
|
360
372
|
// `site-settings:manage-cctv-camera`, which is camera setup.
|
|
361
373
|
"cctv-mgmt": ["see-all-cctv", "view-recordings"],
|
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.
|
|
5
|
+
"version": "4.155.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.",
|