@7365admin1/layer-common 3.2.1 → 3.2.2-staging.77

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.
Files changed (55) hide show
  1. package/.changeset/camera-wall-gated-endpoint.md +47 -0
  2. package/.changeset/camera-wall-plain-english.md +60 -0
  3. package/.changeset/camera-wall-selection-and-guidance.md +65 -0
  4. package/.changeset/dark-primary-contrast.md +39 -0
  5. package/.changeset/dashboard-dark-theme-contrast.md +15 -0
  6. package/.changeset/service-provider-invitation-actions.md +28 -0
  7. package/components/CameraWall.vue +1034 -0
  8. package/components/CameraWallTile.vue +818 -0
  9. package/components/DashboardMain.vue +84 -88
  10. package/components/DashboardPanel.vue +1 -1
  11. package/components/EntryPassInformation.vue +4 -4
  12. package/components/FeedbackMain.vue +7 -7
  13. package/components/HidAccessLogDashboard.vue +119 -44
  14. package/components/HidCameraCaptureDialog.vue +199 -0
  15. package/components/HidIntercomManagement.vue +808 -201
  16. package/components/HidQrCodeConfiguration.vue +907 -95
  17. package/components/HidServiceSettingsPanel.vue +20 -1
  18. package/components/HidUserEnrollment.vue +392 -81
  19. package/components/Layout/NavigationDrawer.vue +43 -2
  20. package/components/NavigationItem.vue +9 -0
  21. package/components/Nfc/NFCPatrolRouteMain.vue +52 -7
  22. package/components/OnlineFormConfigurationForm.vue +620 -224
  23. package/components/OnlineFormFill.vue +36 -8
  24. package/components/OnlineFormsConfiguration.vue +6 -2
  25. package/components/QrTemplate/CreditCardLandscape.vue +19 -12
  26. package/components/QrTemplate/PrintDialog.vue +209 -196
  27. package/components/ServiceProviderInvitationPrompt.vue +150 -0
  28. package/components/ServiceProviderMain.vue +258 -14
  29. package/components/SiteSettings.vue +4 -2
  30. package/components/VisitorForm.vue +201 -78
  31. package/components/VisitorManagement.vue +2 -3
  32. package/components/VisitorSocketPopUp.vue +56 -2
  33. package/composables/useComment.ts +3 -3
  34. package/composables/useHidAmico.ts +127 -0
  35. package/composables/useHidNavigation.ts +0 -7
  36. package/composables/useLocalAuth.ts +9 -36
  37. package/composables/useOnlineFormPages.ts +2 -0
  38. package/composables/useServiceProviderInvitation.ts +145 -0
  39. package/composables/useSipWebPhone.ts +311 -0
  40. package/composables/useSiteSettings.ts +50 -0
  41. package/composables/useVisitorSocket.ts +26 -0
  42. package/composables/useWebUsb.ts +127 -37
  43. package/package.json +3 -1
  44. package/pages/[org]/[site]/access-mgmt/intercom/index.vue +1 -1
  45. package/plugins/secure-member.client.ts +21 -56
  46. package/plugins/vuetify.ts +37 -9
  47. package/test/visitor-socket.test.mjs +36 -0
  48. package/types/site.d.ts +71 -0
  49. package/utils/camera-wall.test.ts +571 -0
  50. package/utils/camera-wall.ts +926 -0
  51. package/utils/theme.test.ts +216 -0
  52. package/utils/theme.ts +163 -0
  53. package/components/HidIdentityMapping.vue +0 -975
  54. package/middleware/member.ts +0 -4
  55. package/pages/[org]/[site]/access-mgmt/identity-mapping/index.vue +0 -23
@@ -0,0 +1,47 @@
1
+ ---
2
+ "@7365admin1/layer-common": patch
3
+ ---
4
+
5
+ Draw the camera wall from the gated wall endpoint, and show the server's own
6
+ reason on a tile.
7
+
8
+ `CameraWall` fetched its cameras from `GET /api/site-cameras` - the Settings
9
+ panel's paginated CRUD list, which took its site from an optional query
10
+ parameter and checked nothing about the caller. Any signed-in user from any
11
+ organisation could read every camera in the estate through it, `host` and
12
+ `username` included.
13
+
14
+ It now calls `GET /api/site-cameras/site/:siteId/wall`, which already exists,
15
+ which the React Native monitoring app was built against, and which is
16
+ authorised server-side: the caller must be a member of the site, of its owning
17
+ organisation, or work for an organisation actively engaged to serve it. That
18
+ endpoint also returns `type: "ip"` cameras only and each camera's capability
19
+ descriptor, so a wall cannot be handed an ANPR unit and a tile can explain
20
+ itself.
21
+
22
+ Two consequences worth stating:
23
+
24
+ - **The pager is gone.** The wall endpoint returns the site's cameras in one
25
+ answer. Paging a video wall was an artefact of borrowing the CRUD list.
26
+ - **A tile now prefers the server's `unavailableReason`** over the reason it
27
+ used to work out itself. The server knows things the browser cannot - chiefly
28
+ "No recorder is configured for this camera's relay", which is the true answer
29
+ for every camera in the estate until the API host is configured, and which the
30
+ wall used to replace with its own guess. Offline still beats everything, since
31
+ it explains every tile at once.
32
+
33
+ No permission gate was invented here. Each application still gates its own menu
34
+ entry; this component draws what it is given, and the server decides.
35
+
36
+ Two smaller things in the same area:
37
+
38
+ - **A refused wall now says so.** The catch-all message told every failure to
39
+ "check your connection", which sends somebody who simply may not see that
40
+ site off to debug their wifi. A 401/403/404 now reads "You do not have access
41
+ to this site's cameras." The server answers "not yours" and "does not exist"
42
+ identically, so this wording does not distinguish them either.
43
+ - **`middleware/member.ts` is removed.** It read a cookie into an unused
44
+ variable and did nothing else - a file named like a membership gate that was
45
+ not one. No page in any of the eleven web apps referenced it. The real check
46
+ is `plugins/secure-member.client.ts`, driven by `memberOnly` page meta, which
47
+ is untouched.
@@ -0,0 +1,60 @@
1
+ ---
2
+ "@7365admin1/layer-common": patch
3
+ ---
4
+
5
+ Rewrite the camera wall's detail panel for the people who read it, and stop
6
+ repeating the same sentence four times.
7
+
8
+ The panel under the tiles was written for a developer. On the live wall it
9
+ read:
10
+
11
+ > BBQ AREA
12
+ > The video page loaded, but this browser cannot confirm a picture is arriving.
13
+ > The player belongs to the video service and a browser cannot look inside it.
14
+ > Judge the tile by what you can see, and report a blank or frozen picture.
15
+ > ● Recorder responding Last picture this server received: none yet
16
+ > Firmware and device clock are not available: this recorder is reachable over
17
+ > video only.
18
+
19
+ Every one of those statements is true, and the screen was still wrong: it
20
+ explained cross-origin isolation to a guard, repeated the camera's name the
21
+ tile already showed, put a green light beside the words "none yet", and printed
22
+ the same reason on four capability cards in a row.
23
+
24
+ Changes, all copy and layout — **no behaviour, no capability gating and no
25
+ permission check is touched**:
26
+
27
+ - **The badge reads "Not confirmed"**, not "Not verified". "Not verified"
28
+ describes a check we failed to make; "Not confirmed" describes the picture,
29
+ which is the thing the reader cares about. Same claim, and the wall still
30
+ refuses to say "Live" until the video service reports a decoded frame.
31
+ - **The sentence behind it is now an instruction**: "This page cannot confirm
32
+ the picture is arriving, so check the tile yourself. If it is blank or frozen,
33
+ report the camera." Why the software cannot confirm it is our problem, and it
34
+ has been removed from the product.
35
+ - **The camera's name is no longer a heading of its own.** It is the subject of
36
+ the status line — "BBQ AREA · Recorder responding" — so a reader on a 3x3 wall
37
+ still knows which tile the panel describes, without a second caption under the
38
+ first one.
39
+ - **"Last picture" is drawn only when there has been one.** A green "Recorder
40
+ responding" beside "none yet" read as a contradiction. They were never in
41
+ conflict, but a screen that has to be explained is wrong. The tile's own
42
+ health line has always behaved this way; the panel now matches it.
43
+ - **The firmware-and-device-clock sentence is gone**, from the panel and from
44
+ the tile's tooltip. This screen never showed either value, so explaining their
45
+ absence gave the reader nothing to do. The server still sends
46
+ `detailUnavailableReason`; nothing draws it.
47
+ - **One reason for the group instead of four copies.** When every switched-off
48
+ control is off for the same reason, that reason and its next step are stated
49
+ once above the row and each card keeps only its title and its state. When the
50
+ reasons differ — "the recorder is unreachable" and "this camera cannot move"
51
+ are two problems with two different people to ask — the group note is refused
52
+ and each card carries its own again. New rule 7, in `camera-wall.ts`, with
53
+ four tests.
54
+ - Shorter next-step and no-signal wording, and a subject on the recorder's
55
+ status labels ("Recorder not checked yet" rather than "Health not checked
56
+ yet").
57
+
58
+ Rules 3 and 6 are intact: the server's own sentence is still shown verbatim and
59
+ never rewritten, and the recorder's state is still a separate fact from the
60
+ tile's badge.
@@ -0,0 +1,65 @@
1
+ ---
2
+ "@7365admin1/layer-common": patch
3
+ ---
4
+
5
+ Mark the selected camera on the wall, and stop telling the reader to raise a
6
+ ticket without saying what for.
7
+
8
+ Two things the owner found on the live wall after the last copy pass. Both are
9
+ copy and presentation only — **no behaviour, no capability gating, no permission
10
+ check and no request is changed.**
11
+
12
+ **1. The camera's name was still printed twice.**
13
+
14
+ The tile said `BBQ AREA` and the panel underneath said it again. The last pass
15
+ merged the panel's heading into its status line, which changed the layout and
16
+ left the repetition exactly where it was.
17
+
18
+ The name was there to answer "which of these nine tiles is this panel about?".
19
+ That is a real question and a name is the wrong answer to it — it makes the
20
+ reader scan the wall for a matching caption. So:
21
+
22
+ - **the selected tile is now visibly selected**: a 3 px accent ring with a scrim
23
+ hairline inside it, so the ring holds against a bright picture as well as a
24
+ dark one, plus the accent underline on the name chip that the toolbar already
25
+ uses to mark a selected tool. Both read at 1x1, 2x2 and 3x3;
26
+ - **the camera's name is removed from the panel entirely**. The panel opens on
27
+ the recorder's state — "● Recorder responding";
28
+ - `aria-current` marks the same tile for anyone not looking at the ring.
29
+
30
+ The highlight had never worked in the most common case, which is why the name
31
+ was load-bearing: it was bound to the raw clicked id, and before anyone clicks —
32
+ or after paging — nothing on the wall was marked while the panel was already
33
+ describing the first tile. It is now bound to the tile the panel actually
34
+ resolves to, so the two can never disagree.
35
+
36
+ **The panel can never be about a tile that is off screen**, so it never needs to
37
+ name one: the focused camera is resolved out of the current PAGE, so paging away
38
+ from a selection re-resolves to the first tile of the page in front of you and
39
+ the ring follows. Paging back restores the original selection. Extracted as
40
+ `focusedCamera()` in `camera-wall.ts` with four tests, including the 5-cameras
41
+ -across-2-pages case.
42
+
43
+ **2. "Ask your Seven365 administrator" was a dead end.**
44
+
45
+ It was the whole of the advice under every switched-off control, and it tells
46
+ the administrator nothing and a property manager only to go and wait. The screen
47
+ never said what the request should ask for.
48
+
49
+ The advice now names the two changes that are actually missing, because they are
50
+ two different jobs for two different people: **the site's network has to let our
51
+ server reach the camera recorder**, and **that recorder then has to be added to
52
+ the server's configuration**. Both are stated in plain words, with who arranges
53
+ them, and with the fact that neither is switchable from this page.
54
+
55
+ No environment variable name appears in any of it — those belong in
56
+ `iservice365-core/docs/camera-integration-config.md`, not on a property
57
+ manager's screen — and there is a test that keeps it that way. The other reason
58
+ codes (`device-http-disabled`, `device-http-unreachable`, `device-http-locked-out`,
59
+ `control-not-enabled`, `no-recorder-configured`, and the unknown-code fallback)
60
+ get the same treatment; the Site Settings ones already said what to do and are
61
+ unchanged.
62
+
63
+ The truthful-status rules are untouched: the wall still refuses to say "Live"
64
+ until the video service reports a decoded frame, and the recorder's state is
65
+ still a separate fact from the tile's badge.
@@ -0,0 +1,39 @@
1
+ ---
2
+ "@7365admin1/layer-common": patch
3
+ ---
4
+
5
+ Split the dark theme's `primary` into a foreground colour and a fill, so text
6
+ using it is readable again.
7
+
8
+ Dark `primary` was set to the brand navy `#17506F` so the navigation drawer
9
+ would read as a surface. That is the right value for a fill — a white label on
10
+ it measures 8.70:1 — but Vuetify emits `.text-primary` from the same token, so
11
+ every `class="text-primary"` sentence and every `color="primary"` icon, spinner
12
+ and text button rendered navy on a dark background:
13
+
14
+ | | before | now |
15
+ |---|---|---|
16
+ | `primary` as text on the dark page `#0E1319` | 2.14:1 | **6.40:1** |
17
+ | `primary` as text on a dark card `#1B242F` | 1.80:1 | **5.38:1** |
18
+ | `primary` as text on `surface-bright` `#26313E`| 1.52:1 | **4.53:1** |
19
+
20
+ Dark `primary` is now `#5B9BE0`. That is not a new colour: it is the blue the
21
+ camera wall already draws its accents in (`--vms-accent`), so the two dark
22
+ surfaces in this product agree on one blue.
23
+
24
+ The navigation drawer no longer depends on `primary`. Both themes gain a
25
+ `brand-surface` colour — `#042134` light (identical to light `primary`, so
26
+ light mode renders exactly as before) and `#17506F` dark — and
27
+ `Layout/NavigationDrawer.vue` is painted with it. Its white label still reads
28
+ 16.51:1 light and 8.70:1 dark. `floating` was dropped from the drawer so it
29
+ draws its own edge: the fill is 2.14:1 against the dark page, under the 3:1 a
30
+ boundary wants, and the border at `border-opacity` 0.35 is 3.22:1.
31
+
32
+ Where `primary` is still used as a fill, Vuetify derives `on-primary` from it
33
+ and picks black, which reads at 7.21:1. What a light `primary` cannot carry is
34
+ a hardcoded white label, and a handful of app-side sites still set one — see
35
+ the pull request for the list.
36
+
37
+ The light theme is unchanged. The colours moved to `utils/theme.ts` and
38
+ `utils/theme.test.ts` now measures them, so a token cannot be moved for one use
39
+ and quietly broken for the other again.
@@ -0,0 +1,15 @@
1
+ ---
2
+ "@7365admin1/layer-common": patch
3
+ ---
4
+
5
+ Dashboard and filled-primary surfaces now follow the theme in dark mode.
6
+
7
+ - `DashboardMain` painted its panels, list rows and text with fixed hex values,
8
+ so the ACTIVE PATROL / STAFF STATUS / Feedbacks cards rendered white on the
9
+ dark page and the heading and KPI figures were dark grey on near-black
10
+ (1.19:1). They now use the theme's surface and foreground tokens.
11
+ - `DARK_THEME` had no `on-primary`, so Vuetify derived white for every filled
12
+ `primary` button, chip, alert, tab bar and snackbar - 2.91:1. It is now set
13
+ explicitly and measures 6.40:1.
14
+
15
+ The print / PDF / Word export styles are unchanged and stay ink-on-white.
@@ -0,0 +1,28 @@
1
+ ---
2
+ "@7365admin1/layer-common": minor
3
+ ---
4
+
5
+ Make the Pending tab's invitation actions reachable, and say which state an invitation is really in
6
+
7
+ The row menu in the service-provider list was drawn only for provider rows, so a
8
+ pending invitation offered no actions at all — including the cancel that was
9
+ already wired up behind it. Invitation rows now carry Cancel, Resend and Delete,
10
+ each behind a confirmation that names the company and the site, and Resend is
11
+ disabled with the reason while Seven365 has not approved the invitation yet.
12
+
13
+ Every invitation also used to read "Pending" whatever had happened to it. Rows
14
+ now show the state they are actually in — Waiting for Seven365, Waiting for the
15
+ provider, Not approved, Declined, Cancelled, Expired — in those words, with
16
+ Seven365's reason shown underneath a rejected one.
17
+
18
+ Also here: a new ServiceProviderInvitationPrompt, which is how an existing
19
+ provider answers an invitation from inside the app they already use, with no
20
+ sign-up and no one-time code.
21
+
22
+ Three contrast fixes found while rendering these screens: the list's tab strip
23
+ was a hardcoded light grey that turned into a white slab in dark mode and took
24
+ the tab labels with it; the service type column read the raw stored slug
25
+ ("security_agency") instead of "Security"; and `on-warning`, `on-info` and
26
+ dark's `on-error` are now set explicitly, because Vuetify derives white for them
27
+ and that measures 2.37:1, 3.12:1 and 3.60:1 on those fills — every filled
28
+ warning, info and error chip, alert and button in the product.