@7365admin1/layer-common 4.2.2-staging.267 → 4.2.3

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 (2) hide show
  1. package/CHANGELOG.md +57 -4
  2. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,58 @@
1
1
  # @iservice365/layer-common
2
2
 
3
+ ## 4.2.3
4
+
5
+ ### Patch Changes
6
+
7
+ - b2d7f77: Render a plain sentence when a request fails without reaching the API.
8
+
9
+ `errorConverter` — the app-wide error mapper used by 29 call sites in this layer — only understood a JSON API error. A gateway 502, a 503/504, an nginx or Cloudflare HTML error page, a timeout or a dropped connection fell through it, so `ofetch`'s own developer string reached the screen: `[PUT] "/api/vehicles/6a9691f25648d7633171c9e3": 502`. It now maps those to a sentence chosen from the status, never renders HTML, a JSON dump or a raw object, and still returns our own API's message unchanged whenever there is one.
10
+
11
+ The vehicle dialogs had their own local copy of that logic (`readServerMessage`), which fell back to `error.message` and was where the leak was seen. It is gone; delete, restore, update-type, approve and the add/edit form all use the shared mapper.
12
+
13
+ ## 4.2.2
14
+
15
+ ### Patch Changes
16
+
17
+ - 329b7e8: Self-service onboarding: a member can give an email, and every row can ask for its pass again (DV-0080).
18
+
19
+ `ContractorRegistrationForm` now requires an email per member in the Members dialog, so a member is
20
+ sent their OWN pass link rather than having to be handed it by the lead contractor. Both email
21
+ fields (the lead's, still optional, and each member's) validate their format inline — the API
22
+ validates them with Joi and would otherwise reject the whole submission over a field the visitor
23
+ could not see.
24
+
25
+ `VisitorQrCodeLinksCard` gains a Resend button on every row. A row that already has an address just
26
+ sends; a row with none opens an inline field, and what is typed there is saved onto that
27
+ registration and used. The lead row and the member rows were the same three-button row written
28
+ twice and are now one `v-for`.
29
+
30
+ The server's refusals are shown on the row in its own words — the 60-second per-record cooldown says
31
+ how many seconds are left, and a rejected address says so.
32
+
33
+ New `utils/self-service-links.ts` holds the pure part: building a pass link, deciding whether a row
34
+ still needs an address, and the loose format check that mirrors the API's own.
35
+
36
+ - 6ae8d37: A snackbar no longer swallows clicks meant for the dialog underneath it
37
+
38
+ Every snackbar in the layer is drawn far above Vuetify's dialog stack, and its wrapper is a solid box that takes clicks. The realtime "New plate detected" toast landed over the Add Vehicle dialog's Submit button and made the button unclickable, so on a busy gate a vehicle could not be added at all. The shared `Snackbar.vue` is mounted by 57 screens, so any toast that fired while any dialog was open could do the same.
39
+
40
+ Toasts stay above dialogs — a camera-fault warning still has to be seen — but only their own buttons and links take clicks now. Everything else passes through to what is underneath.
41
+
42
+ - 1945d95: Vehicle Management: complete row actions, per-plate targeting, readable camera errors and a form that says why it will not save
43
+
44
+ - The row menu now offers the correct action set for every status — Approve for pending, Unblock for a blocked vehicle, Block/Unblock, Edit and Delete — decided by one function shared with the Preview dialog, so a kebab can no longer open an empty menu.
45
+ - A row that groups several plates lists each plate under its own number instead of silently acting on the first one.
46
+ - Approve, Restore and Block failures are shown in the still-open dialog rather than a five-second toast.
47
+ - The add/edit form reports what the server says happened instead of a hardcoded "added successfully", and the Update button is no longer disabled without saying which fields are missing.
48
+ - Removed the debug logging that shipped with the vehicle form.
49
+
50
+ - a0bd471: Vehicle Management: surface Edit and Delete on the table row, and stop a refused delete from failing silently.
51
+
52
+ Edit and Delete were already built and already shipping, but only reachable two clicks deep — click a row, then the kebab on the nested plate table inside the read-only Preview dialog. The main table now carries the same row kebab every other table in this package draws, calling the same handlers, so there is one code path per operation.
53
+
54
+ Also: `canApproveVehicle` was shadowed by a local `computed(() => true)`, so the Approve action rendered for every role regardless of permission; the Edit and Block/Unblock actions now check `canUpdateVehicle`, matching the `vehicle-mgmt:update-vehicle` the server enforces; and a delete the server refuses (the ANPR revoke could not be confirmed on every camera) now shows the reason in the dialog instead of setting a message string that was never displayed.
55
+
3
56
  ## 4.2.1
4
57
 
5
58
  ### Patch Changes
@@ -415,11 +468,11 @@
415
468
  `utils/console-tier.ts` + `composables/useConsoleTier.ts` mirror the server's
416
469
  own rule from two endpoints the console already calls, unprojected:
417
470
 
418
- GET /api/members/user/:user/app/admin the Seven365 staff membership
419
- GET /api/roles/id/:role that membership's role document
471
+ GET /api/members/user/:user/app/admin the Seven365 staff membership
472
+ GET /api/roles/id/:role that membership's role document
420
473
 
421
- owner = member.type === "admin" && role.type === "admin" && role.default === true
422
- staff = member.type === "admin" && role.type === "admin"
474
+ owner = member.type === "admin" && role.type === "admin" && role.default === true
475
+ staff = member.type === "admin" && role.type === "admin"
423
476
 
424
477
  `role.default` is the marker because it is the only property of a platform
425
478
  staff role no API caller can set - `role.controller.ts` validates create and
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.2.2-staging.267",
5
+ "version": "4.2.3",
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.",