@7365admin1/layer-common 4.163.3 → 4.163.4

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,11 @@
1
1
  # @iservice365/layer-common
2
2
 
3
+ ## 4.163.4
4
+
5
+ ### Patch Changes
6
+
7
+ - c170dac: CCTV Engine: screens say only what is set up is saved (Getting started, Events, Alerts).
8
+
3
9
  ## 4.163.3
4
10
 
5
11
  ### Patch Changes
@@ -3716,11 +3722,11 @@ Monthly report: a month that had patrols opens the list of that month's patrol r
3716
3722
  `utils/console-tier.ts` + `composables/useConsoleTier.ts` mirror the server's
3717
3723
  own rule from two endpoints the console already calls, unprojected:
3718
3724
 
3719
- GET /api/members/user/:user/app/admin the Seven365 staff membership
3720
- GET /api/roles/id/:role that membership's role document
3725
+ GET /api/members/user/:user/app/admin the Seven365 staff membership
3726
+ GET /api/roles/id/:role that membership's role document
3721
3727
 
3722
- owner = member.type === "admin" && role.type === "admin" && role.default === true
3723
- staff = member.type === "admin" && role.type === "admin"
3728
+ owner = member.type === "admin" && role.type === "admin" && role.default === true
3729
+ staff = member.type === "admin" && role.type === "admin"
3724
3730
 
3725
3731
  `role.default` is the marker because it is the only property of a platform
3726
3732
  staff role no API caller can set - `role.controller.ts` validates create and
@@ -9,7 +9,7 @@
9
9
  id="alerts"
10
10
  :steps="[
11
11
  'Turn on Send phone notifications. Leave the roles empty to tell everyone who can see CCTV events at this site, or choose roles to tell only them.',
12
- 'Optional: type the objects that matter (e.g. person, car, rubbish) so not everything alerts. Empty means every object.',
12
+ 'Type the objects that matter (e.g. person, car). Only these are saved in Events and raise alerts. Empty means every object.',
13
13
  'Optional: limit to zones or cameras, and set quiet hours. Then press Save alert settings.',
14
14
  ]"
15
15
  results="Alerts appear in Events marked Alert. With Send phone notifications on, people also get a notification with the picture."
@@ -2,8 +2,8 @@
2
2
  <template>
3
3
  <div>
4
4
  <p class="hero-muted mt-0 mb-2">
5
- Everything the engine noticed, newest first: people, vehicles, plates, faces and smart detections, each with a photo
6
- and the time. Use the boxes to narrow the list, then press Search. Click a row to see the photo and details.
5
+ What you set up to be saved, newest first: matching people and vehicles (see Alerts), watch-list plates, known faces and
6
+ smart detection results, each with a photo and the time. Use the boxes to narrow the list, then press Search. Click a row to see the photo and details.
7
7
  </p>
8
8
  <v-row dense>
9
9
  <v-col cols="6" sm="4" md="3"><v-text-field v-model="f.camera" label="Camera" density="comfortable" hide-details clearable /></v-col>
@@ -7,8 +7,8 @@
7
7
  <template>
8
8
  <div>
9
9
  <p class="hero-muted mt-0">
10
- Set up the steps below once. After that the engine works on its own: everything it sees is saved in
11
- <strong>Events</strong> with a photo, and the people you choose get a phone notification for alerts.
10
+ Set up the steps below once. Only what you set up is saved: it appears in <strong>Events</strong> with a photo, and the
11
+ people you choose get a phone notification. Nothing set up = nothing saved.
12
12
  </p>
13
13
 
14
14
  <v-progress-linear v-if="loading" indeterminate class="mb-3" />
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.3",
5
+ "version": "4.163.4",
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.",
@@ -493,7 +493,7 @@ export function setupSteps(input: {
493
493
  can: (perm: TCctvPermission) => boolean;
494
494
  faceEnabled: boolean;
495
495
  engines: { status?: string; name?: string }[] | null;
496
- alertSettings: { notifyRoles?: string[]; notifyGuards?: boolean; labels?: string[] } | null;
496
+ alertSettings: { notifyRoles?: string[]; notifyGuards?: boolean; labels?: string[]; zones?: string[]; cameras?: string[]; createIncident?: boolean } | null;
497
497
  classifiers: TClassifier[] | null;
498
498
  plates: number | null;
499
499
  faces: number | null;
@@ -525,19 +525,22 @@ export function setupSteps(input: {
525
525
  const a = input.alertSettings;
526
526
  // Server rule (core onAlert / NotificationService.cctvAlert): the `notifyGuards` switch turns phone notifications on;
527
527
  // they go to everyone at the site holding cctv-engine:view-events, or only to `notifyRoles` when some are chosen.
528
+ // Server rules (core keepEvent / onAlert): only objects matching what is set up here are saved; `notifyGuards`
529
+ // turns phone notifications on, for everyone with cctv-engine:view-events or only `notifyRoles` when chosen.
528
530
  const roles = a?.notifyRoles?.length ?? 0;
529
531
  const told = a?.notifyGuards === true;
530
- const who = roles ? `People in ${plural(roles, "role", "roles")}` : "Everyone who can see CCTV events";
531
- const every = told && !(a?.labels ?? []).length;
532
+ const setUp = !!(a && (a.labels?.length || a.zones?.length || a.cameras?.length || told || a.createIncident));
533
+ const what = a?.labels?.length ? a.labels.join(", ") : "every object";
534
+ const who = roles ? `people in ${plural(roles, "role", "roles")}` : "everyone who can see CCTV events";
532
535
  steps.push({
533
536
  key: "alerts",
534
- title: "Who gets alerts",
535
- what: "Choose who gets a phone notification with the picture when something important is seen.",
536
- state: a === null || !told ? "attention" : "done",
537
+ title: "What to save and who to tell",
538
+ what: "Choose which objects (e.g. person, car) are saved in Events, and who gets a phone notification with the picture.",
539
+ state: a === null || !setUp ? "attention" : told ? "done" : "attention",
537
540
  now:
538
541
  a === null ? unread
539
- : !told ? "Phone notifications are off. Everything is still saved in Events."
540
- : `${who} will get a phone notification${every ? " for every object seen (add objects to narrow it)" : ""}.`,
542
+ : !setUp ? "Nothing set up yet, so no people or vehicles are being saved."
543
+ : `Saving: ${what}. ${told ? `Phone notification to ${who}.` : "Phone notifications are off."}`,
541
544
  section: "alerts",
542
545
  action: "Set up alerts",
543
546
  });
@@ -601,7 +604,7 @@ export function setupSteps(input: {
601
604
 
602
605
  /** Where each kind of result appears. `query` pre-fills the Events filters. */
603
606
  export const RESULT_PLACES: { title: string; body: string; section: TCctvSection; query?: Record<string, string>; needs: TCctvPermission }[] = [
604
- { title: "Everything seen", body: "People, vehicles, plates, faces and smart detections, newest first, each with a photo.", section: "events", needs: CCTV_PERMISSIONS.viewEvents },
607
+ { title: "Everything saved", body: "What you set up: matching people and vehicles, watch-list plates, known faces and smart detection results, newest first, each with a photo.", section: "events", needs: CCTV_PERMISSIONS.viewEvents },
605
608
  { title: "Alerts only", body: "The events that raised an alert. With phone notifications on, people were also told on their phones.", section: "events", query: { severity: "alert" }, needs: CCTV_PERMISSIONS.viewEvents },
606
609
  { title: "Smart detection results", body: "What your smart detections saw (e.g. rubbish), with the photo and time.", section: "events", query: { kind: "classification" }, needs: CCTV_PERMISSIONS.viewEvents },
607
610
  { title: "Find a past moment", body: "Describe it in words, e.g. person in orange shirt, and pick the dates.", section: "search", needs: CCTV_PERMISSIONS.viewEvents },