@7365admin1/layer-common 3.2.4 → 3.2.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 CHANGED
@@ -1,5 +1,209 @@
1
1
  # @iservice365/layer-common
2
2
 
3
+ ## 3.2.6
4
+
5
+ ### Patch Changes
6
+
7
+ - 2a4f61d: 08142026 Release new version
8
+
9
+ ## 3.2.5
10
+
11
+ ### Patch Changes
12
+
13
+ - 1d6b57b: Draw the camera wall from the gated wall endpoint, and show the server's own
14
+ reason on a tile.
15
+
16
+ `CameraWall` fetched its cameras from `GET /api/site-cameras` - the Settings
17
+ panel's paginated CRUD list, which took its site from an optional query
18
+ parameter and checked nothing about the caller. Any signed-in user from any
19
+ organisation could read every camera in the estate through it, `host` and
20
+ `username` included.
21
+
22
+ It now calls `GET /api/site-cameras/site/:siteId/wall`, which already exists,
23
+ which the React Native monitoring app was built against, and which is
24
+ authorised server-side: the caller must be a member of the site, of its owning
25
+ organisation, or work for an organisation actively engaged to serve it. That
26
+ endpoint also returns `type: "ip"` cameras only and each camera's capability
27
+ descriptor, so a wall cannot be handed an ANPR unit and a tile can explain
28
+ itself.
29
+
30
+ Two consequences worth stating:
31
+
32
+ - **The pager is gone.** The wall endpoint returns the site's cameras in one
33
+ answer. Paging a video wall was an artefact of borrowing the CRUD list.
34
+ - **A tile now prefers the server's `unavailableReason`** over the reason it
35
+ used to work out itself. The server knows things the browser cannot - chiefly
36
+ "No recorder is configured for this camera's relay", which is the true answer
37
+ for every camera in the estate until the API host is configured, and which the
38
+ wall used to replace with its own guess. Offline still beats everything, since
39
+ it explains every tile at once.
40
+
41
+ No permission gate was invented here. Each application still gates its own menu
42
+ entry; this component draws what it is given, and the server decides.
43
+
44
+ Two smaller things in the same area:
45
+
46
+ - **A refused wall now says so.** The catch-all message told every failure to
47
+ "check your connection", which sends somebody who simply may not see that
48
+ site off to debug their wifi. A 401/403/404 now reads "You do not have access
49
+ to this site's cameras." The server answers "not yours" and "does not exist"
50
+ identically, so this wording does not distinguish them either.
51
+ - **`middleware/member.ts` is removed.** It read a cookie into an unused
52
+ variable and did nothing else - a file named like a membership gate that was
53
+ not one. No page in any of the eleven web apps referenced it. The real check
54
+ is `plugins/secure-member.client.ts`, driven by `memberOnly` page meta, which
55
+ is untouched.
56
+
57
+ - e3b3cd7: Rewrite the camera wall's detail panel for the people who read it, and stop
58
+ repeating the same sentence four times.
59
+
60
+ The panel under the tiles was written for a developer. On the live wall it
61
+ read:
62
+
63
+ > BBQ AREA
64
+ > The video page loaded, but this browser cannot confirm a picture is arriving.
65
+ > The player belongs to the video service and a browser cannot look inside it.
66
+ > Judge the tile by what you can see, and report a blank or frozen picture.
67
+ > ● Recorder responding Last picture this server received: none yet
68
+ > Firmware and device clock are not available: this recorder is reachable over
69
+ > video only.
70
+
71
+ Every one of those statements is true, and the screen was still wrong: it
72
+ explained cross-origin isolation to a guard, repeated the camera's name the
73
+ tile already showed, put a green light beside the words "none yet", and printed
74
+ the same reason on four capability cards in a row.
75
+
76
+ Changes, all copy and layout — **no behaviour, no capability gating and no
77
+ permission check is touched**:
78
+
79
+ - **The badge reads "Not confirmed"**, not "Not verified". "Not verified"
80
+ describes a check we failed to make; "Not confirmed" describes the picture,
81
+ which is the thing the reader cares about. Same claim, and the wall still
82
+ refuses to say "Live" until the video service reports a decoded frame.
83
+ - **The sentence behind it is now an instruction**: "This page cannot confirm
84
+ the picture is arriving, so check the tile yourself. If it is blank or frozen,
85
+ report the camera." Why the software cannot confirm it is our problem, and it
86
+ has been removed from the product.
87
+ - **The camera's name is no longer a heading of its own.** It is the subject of
88
+ the status line — "BBQ AREA · Recorder responding" — so a reader on a 3x3 wall
89
+ still knows which tile the panel describes, without a second caption under the
90
+ first one.
91
+ - **"Last picture" is drawn only when there has been one.** A green "Recorder
92
+ responding" beside "none yet" read as a contradiction. They were never in
93
+ conflict, but a screen that has to be explained is wrong. The tile's own
94
+ health line has always behaved this way; the panel now matches it.
95
+ - **The firmware-and-device-clock sentence is gone**, from the panel and from
96
+ the tile's tooltip. This screen never showed either value, so explaining their
97
+ absence gave the reader nothing to do. The server still sends
98
+ `detailUnavailableReason`; nothing draws it.
99
+ - **One reason for the group instead of four copies.** When every switched-off
100
+ control is off for the same reason, that reason and its next step are stated
101
+ once above the row and each card keeps only its title and its state. When the
102
+ reasons differ — "the recorder is unreachable" and "this camera cannot move"
103
+ are two problems with two different people to ask — the group note is refused
104
+ and each card carries its own again. New rule 7, in `camera-wall.ts`, with
105
+ four tests.
106
+ - Shorter next-step and no-signal wording, and a subject on the recorder's
107
+ status labels ("Recorder not checked yet" rather than "Health not checked
108
+ yet").
109
+
110
+ Rules 3 and 6 are intact: the server's own sentence is still shown verbatim and
111
+ never rewritten, and the recorder's state is still a separate fact from the
112
+ tile's badge.
113
+
114
+ - a02619c: Mark the selected camera on the wall, and stop telling the reader to raise a
115
+ ticket without saying what for.
116
+
117
+ Two things the owner found on the live wall after the last copy pass. Both are
118
+ copy and presentation only — **no behaviour, no capability gating, no permission
119
+ check and no request is changed.**
120
+
121
+ **1. The camera's name was still printed twice.**
122
+
123
+ The tile said `BBQ AREA` and the panel underneath said it again. The last pass
124
+ merged the panel's heading into its status line, which changed the layout and
125
+ left the repetition exactly where it was.
126
+
127
+ The name was there to answer "which of these nine tiles is this panel about?".
128
+ That is a real question and a name is the wrong answer to it — it makes the
129
+ reader scan the wall for a matching caption. So:
130
+
131
+ - **the selected tile is now visibly selected**: a 3 px accent ring with a scrim
132
+ hairline inside it, so the ring holds against a bright picture as well as a
133
+ dark one, plus the accent underline on the name chip that the toolbar already
134
+ uses to mark a selected tool. Both read at 1x1, 2x2 and 3x3;
135
+ - **the camera's name is removed from the panel entirely**. The panel opens on
136
+ the recorder's state — "● Recorder responding";
137
+ - `aria-current` marks the same tile for anyone not looking at the ring.
138
+
139
+ The highlight had never worked in the most common case, which is why the name
140
+ was load-bearing: it was bound to the raw clicked id, and before anyone clicks —
141
+ or after paging — nothing on the wall was marked while the panel was already
142
+ describing the first tile. It is now bound to the tile the panel actually
143
+ resolves to, so the two can never disagree.
144
+
145
+ **The panel can never be about a tile that is off screen**, so it never needs to
146
+ name one: the focused camera is resolved out of the current PAGE, so paging away
147
+ from a selection re-resolves to the first tile of the page in front of you and
148
+ the ring follows. Paging back restores the original selection. Extracted as
149
+ `focusedCamera()` in `camera-wall.ts` with four tests, including the 5-cameras
150
+ -across-2-pages case.
151
+
152
+ **2. "Ask your Seven365 administrator" was a dead end.**
153
+
154
+ It was the whole of the advice under every switched-off control, and it tells
155
+ the administrator nothing and a property manager only to go and wait. The screen
156
+ never said what the request should ask for.
157
+
158
+ The advice now names the two changes that are actually missing, because they are
159
+ two different jobs for two different people: **the site's network has to let our
160
+ server reach the camera recorder**, and **that recorder then has to be added to
161
+ the server's configuration**. Both are stated in plain words, with who arranges
162
+ them, and with the fact that neither is switchable from this page.
163
+
164
+ No environment variable name appears in any of it — those belong in
165
+ `iservice365-core/docs/camera-integration-config.md`, not on a property
166
+ manager's screen — and there is a test that keeps it that way. The other reason
167
+ codes (`device-http-disabled`, `device-http-unreachable`, `device-http-locked-out`,
168
+ `control-not-enabled`, `no-recorder-configured`, and the unknown-code fallback)
169
+ get the same treatment; the Site Settings ones already said what to do and are
170
+ unchanged.
171
+
172
+ The truthful-status rules are untouched: the wall still refuses to say "Live"
173
+ until the video service reports a decoded frame, and the recorder's state is
174
+ still a separate fact from the tile's badge.
175
+
176
+ - 9fdc87b: A shared CCTV camera wall for the web apps
177
+
178
+ `CameraWall.vue` and `CameraWallTile.vue` draw a site's cameras as a monitoring
179
+ wall, with the layout, tile state and refresh behaviour in `utils/camera-wall.ts`
180
+ so it can be measured by a test rather than only seen.
181
+
182
+ The wall is drawn from the site-scoped camera endpoint, so it shows the cameras
183
+ of the site the operator is actually on and nothing else. Property Management
184
+ and Security both mount the same component instead of each growing their own.
185
+
186
+ Also removes `middleware/member.ts`, a route middleware that read a cookie into
187
+ an unused variable and did nothing else. Nothing in this layer or in either
188
+ consuming app referenced it.
189
+
190
+ - 9fdc87b: Camera wall status made honest, plus zoom, health and paging
191
+
192
+ **A tile that used to say "Live" may now say "Not confirmed", and that is the
193
+ point.** The badge was never measured — it said "Live" because a tile had been
194
+ rendered, not because anything had confirmed the camera was answering. A camera
195
+ that had been down for a week still read as Live. Status is now reported from
196
+ what was actually observed, so a tile only claims Live when the health check
197
+ says so, and says "Not confirmed" when nothing has come back yet.
198
+
199
+ **Tell QA before this ships.** The honest badge reads as a regression if you are
200
+ not expecting it: the wall will look like it has _lost_ status on cameras that
201
+ previously appeared healthy, when in fact those tiles were never measuring
202
+ anything.
203
+
204
+ Also adds zoom on a tile, per-camera health, and paging for sites with more
205
+ cameras than fit a screen.
206
+
3
207
  ## 3.2.4
4
208
 
5
209
  ### Patch Changes
@@ -363,14 +363,18 @@ function setBuildingUnit() {
363
363
  buildingUnit.value.companyRegistrationNumber = "";
364
364
  buildingUnit.value.leaseStart = "";
365
365
  buildingUnit.value.leaseEnd = "";
366
+ unitLabels.value = ["Unit 1"];
366
367
  }
367
368
 
368
369
  async function submit() {
369
370
  disable.value = true;
370
371
  const { buildingUnitFiles, companyName, companyRegistrationNumber, leaseStart, leaseEnd, ...rest } = buildingUnit.value;
372
+ const labels = unitLabels.value.map((label) => label.trim());
373
+ rest.name = labels[0] || rest.name;
374
+
371
375
  try {
372
376
  await add({
373
- labels: unitLabels.value,
377
+ labels,
374
378
  unit: rest,
375
379
  qty: buildingUnitQty.value,
376
380
  });