@7365admin1/layer-common 4.34.1-staging.369 → 4.35.1-staging.370
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 +43 -0
- package/composables/usePropertyPermission.ts +17 -0
- package/composables/useSecurityPermission.ts +19 -0
- package/package.json +1 -1
- package/plugins/API.ts +11 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,48 @@
|
|
|
1
1
|
# @iservice365/layer-common
|
|
2
2
|
|
|
3
|
+
## 4.35.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 1d1bcb0: Notification bell: clicking a row now goes to what it is about, not just marks it read. Marketplace orders sent to a vendor's staff (`marketplace-vendor-order`) open that sub-order in the organization app's order queue; the row's id is carried in `params.id` by `iservice365-API-core`'s senders. Marking read no longer blocks the navigation and no longer swallows the click on a row that was already read. Apps without an order queue are unaffected — the bell checks its own router for the route before pushing. New `utils/notification-target.ts` holds the decision, with unit tests.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- a71f983: Robot (HERO) screens: the robot header no longer slides under the app's top bar - `.hero-page` and `.hero-screen` drop their `margin: -24px` (the apps pad 8-16px, so the page was pulled above its content box). The HERO fault-count bell is removed from the shared robot header (`RobotSiteHeader`), and `RobotBell` is deleted, so the app's own top-bar bell is the only bell. `RobotSiteHeader` loses its `faults` prop and `bell` emit, and `RobotSiteScreen` its `bell` emit and 30 s fault poll; a page still passing them keeps working (they fall through unused). Open faults stay on the Faults summary, Needs attention and Alerts.
|
|
12
|
+
|
|
13
|
+
## 4.34.0
|
|
14
|
+
|
|
15
|
+
### Minor Changes
|
|
16
|
+
|
|
17
|
+
- b45cddc: Security roles and permissions for vehicles, work orders and feedback (DV-0396).
|
|
18
|
+
|
|
19
|
+
- When the backend refuses a request (401/403 "You do not have permission…"), the app re-reads the user's role so buttons update without logging in again (`utils/permission-refusal.ts`, `plugins/API.ts`).
|
|
20
|
+
- Vehicle Management:
|
|
21
|
+
- An action the backend refused is faded straight away and shows the reason when clicked, without sending the request again.
|
|
22
|
+
- The Preview plate list shows every plate.
|
|
23
|
+
- Restore wording includes the ANPR camera counts.
|
|
24
|
+
- History shows each change on its own line as "from X to Y".
|
|
25
|
+
- Clicking a row without See Vehicle Details shows a message.
|
|
26
|
+
- A list the backend refused shows why in the empty table.
|
|
27
|
+
- Vehicle Form:
|
|
28
|
+
- After a refusal, Submit/Update stays faded and repeats the message.
|
|
29
|
+
- Closing the matching-records dialog without picking one unlocks NRIC and Name.
|
|
30
|
+
- `ReusablePrompt` / `DeleteConfirmation`: new `noPermission` option; ReusablePrompt also gets `messageError` to show its message in red.
|
|
31
|
+
- Vehicle actions: Restore needs Approve Vehicle, and a deleted blocklist plate only offers Restore.
|
|
32
|
+
- Delete Work Order and Delete Feedback are now offered only in the Property Management permissions. They're removed from Security and the trade apps (Cleaning, Landscaping, M&E, Pest Control, Pool Maintenance).
|
|
33
|
+
|
|
34
|
+
## 4.33.1
|
|
35
|
+
|
|
36
|
+
### Patch Changes
|
|
37
|
+
|
|
38
|
+
- 498481c: HERO robot rules for the mobile apps: `scripts/sync-robot-rules.mjs` writes a generated, hash-stamped copy of `utils/robot-display.ts` (+ lift-queue rows, HERO_PALETTE) and shared test vectors into iClean365, iMA365 and iSecure365. Repo tooling only; nothing a consuming app loads changes.
|
|
39
|
+
|
|
40
|
+
## 4.33.0
|
|
41
|
+
|
|
42
|
+
### Minor Changes
|
|
43
|
+
|
|
44
|
+
- 8fc0212: HERO robots phase e: site Alerts (`RobotSiteAlerts`) and Activity log (`RobotActivityLog`, site or network) as RobotSiteScreen views `alerts` / `log`; the header bell shows the site's open faults on every view; the Add / edit robot dialog rebuilt to the handoff (520px, type-filtered brands with capability, replace-only credentials) and the Remove dialog's wording; the building map reads the site's map whichever robot type saved it; mini-map name tags stay inside the plan.
|
|
45
|
+
|
|
3
46
|
## 4.32.0
|
|
4
47
|
|
|
5
48
|
### Minor Changes
|
|
@@ -579,6 +579,23 @@ export default function usePropertyPermission() {
|
|
|
579
579
|
description:
|
|
580
580
|
"Allows the user to view the list of all passes and keys on mobile. Checked by the iMA365 mobile app.",
|
|
581
581
|
},
|
|
582
|
+
// DV-0396: the same three writes Security offers, enforced by API-core on
|
|
583
|
+
// /api/keys and /api/qr-code-templates for every app that calls them.
|
|
584
|
+
"add-passes-and-keys": {
|
|
585
|
+
check: true,
|
|
586
|
+
description:
|
|
587
|
+
"Allows the user to add pass templates and to create or generate passes and keys.",
|
|
588
|
+
},
|
|
589
|
+
"update-passes-and-keys": {
|
|
590
|
+
check: true,
|
|
591
|
+
description:
|
|
592
|
+
"Allows the user to edit pass templates, passes and keys, restore them, and change a pass or key back to Available.",
|
|
593
|
+
},
|
|
594
|
+
"delete-passes-and-keys": {
|
|
595
|
+
check: true,
|
|
596
|
+
description:
|
|
597
|
+
"Allows the user to delete pass templates, passes and keys.",
|
|
598
|
+
},
|
|
582
599
|
},
|
|
583
600
|
"online-forms": {
|
|
584
601
|
"see-all-online-forms": {
|
|
@@ -669,12 +669,31 @@ export default function useSecurityPermission() {
|
|
|
669
669
|
},
|
|
670
670
|
// Property's descriptions minus its "Checked by the iMA365 mobile app."
|
|
671
671
|
// sentence, which is not true of this application.
|
|
672
|
+
// Add / update / delete (DV-0396), also offered by Property Management and
|
|
673
|
+
// enforced by API-core on /api/keys and /api/qr-code-templates. The security web app's
|
|
674
|
+
// Templates and Passes & Keys pages and the guard app's pass & key screen
|
|
675
|
+
// read them. See All is also what shows those two web pages.
|
|
672
676
|
"passes-and-keys-mgmt": {
|
|
673
677
|
"see-all-passes-and-keys": {
|
|
674
678
|
check: true,
|
|
675
679
|
description:
|
|
676
680
|
"Allows the user to view the list of all passes and keys on mobile.",
|
|
677
681
|
},
|
|
682
|
+
"add-passes-and-keys": {
|
|
683
|
+
check: true,
|
|
684
|
+
description:
|
|
685
|
+
"Allows the user to add pass templates and to create or generate passes and keys.",
|
|
686
|
+
},
|
|
687
|
+
"update-passes-and-keys": {
|
|
688
|
+
check: true,
|
|
689
|
+
description:
|
|
690
|
+
"Allows the user to edit pass templates, passes and keys, restore them, and change a pass or key back to Available.",
|
|
691
|
+
},
|
|
692
|
+
"delete-passes-and-keys": {
|
|
693
|
+
check: true,
|
|
694
|
+
description:
|
|
695
|
+
"Allows the user to delete pass templates, passes and keys.",
|
|
696
|
+
},
|
|
678
697
|
},
|
|
679
698
|
"resident-transactions": {
|
|
680
699
|
"see-all-resident-transactions": {
|
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.35.1-staging.370",
|
|
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.",
|
package/plugins/API.ts
CHANGED
|
@@ -11,6 +11,17 @@ export default defineNuxtPlugin((nuxtApp) => {
|
|
|
11
11
|
onRequest({ options }) {
|
|
12
12
|
const sid = useCookie("sid", cookieConfig).value ?? "";
|
|
13
13
|
options.headers.set("Authorization", sid);
|
|
14
|
+
// Which of the user's memberships this screen is working in (DV-0396):
|
|
15
|
+
// this app's member type and the organisation in the address. With
|
|
16
|
+
// several memberships pinned to one site, the server then checks the
|
|
17
|
+
// same role the screen was drawn from (core `requireSiteReach`). Only
|
|
18
|
+
// chooses among the user's own memberships; it grants nothing.
|
|
19
|
+
const app = useRuntimeConfig().public.APP;
|
|
20
|
+
if (app) options.headers.set("X-App", String(app));
|
|
21
|
+
const org = (nuxtApp as any).$router?.currentRoute?.value?.params?.org;
|
|
22
|
+
if (typeof org === "string" && /^[0-9a-f]{24}$/i.test(org)) {
|
|
23
|
+
options.headers.set("X-Org", org);
|
|
24
|
+
}
|
|
14
25
|
},
|
|
15
26
|
// "You do not have permission to ..." - the role changed since the page
|
|
16
27
|
// read it. Re-read it in the background (plugins/secure-member.client.ts)
|