@7365admin1/layer-common 4.8.1 → 4.9.0

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,30 @@
1
1
  # @iservice365/layer-common
2
2
 
3
+ ## 4.9.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 0769803: Offer the module permissions no role editor could grant yet (owner answers Q5,
8
+ Q9 and Q10). Catalogue-only: role editors offer more, no gate changes, and
9
+ nobody is granted anything.
10
+
11
+ - `useMechanicalElectricalPermission`, `usePestControlPermission` and
12
+ `usePoolMaintenancePermission` now offer `emergency-contact` with the seven
13
+ actions Cleaning and Landscape already offer (`see-all`, `see-details`,
14
+ `add-/update-/delete-emergency-contact`,
15
+ `add-/delete-emergency-contact-category`).
16
+ - `useSecurityPermission` now offers `emergency-contact` (the same seven),
17
+ `facility-booking-mgmt` (Property's five actions),
18
+ `passes-and-keys-mgmt:see-all-passes-and-keys`,
19
+ `resident-transactions:see-all-resident-transactions`,
20
+ `nfc-patrol:see-all-nfc-patrol`, `incident-reports:review-incident-report`,
21
+ and two new strings: `nfc-patrol:start-nfc-patrol` and `cctv-mgmt:see-all-cctv`.
22
+ - `usePropertyPermission` now offers `cctv-mgmt:see-all-cctv`.
23
+ - `constants/permissions.ts` records the two new strings as canonical.
24
+ - Bulletin was already offered by all five fleet catalogues as `bulletin-board`;
25
+ unchanged.
26
+ - Module counts: Security 30, Property 33, Pest 17, Pool 17, M&E 16.
27
+
3
28
  ## 4.8.1
4
29
 
5
30
  ### Patch Changes
@@ -1006,11 +1031,11 @@
1006
1031
  `utils/console-tier.ts` + `composables/useConsoleTier.ts` mirror the server's
1007
1032
  own rule from two endpoints the console already calls, unprojected:
1008
1033
 
1009
- GET /api/members/user/:user/app/admin the Seven365 staff membership
1010
- GET /api/roles/id/:role that membership's role document
1034
+ GET /api/members/user/:user/app/admin the Seven365 staff membership
1035
+ GET /api/roles/id/:role that membership's role document
1011
1036
 
1012
- owner = member.type === "admin" && role.type === "admin" && role.default === true
1013
- staff = member.type === "admin" && role.type === "admin"
1037
+ owner = member.type === "admin" && role.type === "admin" && role.default === true
1038
+ staff = member.type === "admin" && role.type === "admin"
1014
1039
 
1015
1040
  `role.default` is the marker because it is the only property of a platform
1016
1041
  staff role no API caller can set - `role.controller.ts` validates create and
@@ -55,7 +55,11 @@ export default function useMechanicalElectricalPermission() {
55
55
  "my-attendance": schedulePermissions["my-attendance"],
56
56
  "supply-mgmt": schedulePermissions["supply-mgmt"],
57
57
  "checkout-item-mgmt": schedulePermissions["checkout-item-mgmt"],
58
-
58
+ // Owner answer Q5, 2026-09-11: Emergency Contacts is offered here too. The
59
+ // same seven actions Cleaning offers (decision 3A) -- taken from it, like
60
+ // the keys above, so the two cannot drift. Catalogue-only: grants nothing.
61
+ "emergency-contact": schedulePermissions["emergency-contact"],
62
+
59
63
  };
60
64
 
61
65
  return {
@@ -39,6 +39,45 @@ export default function usePestControlPermission() {
39
39
  work_orders: workOrderPermissions,
40
40
  "bulletin-board": bulletinBoardPermissions,
41
41
  "service-provider-mgmt": serviceProviderPermissions,
42
+ // Owner answer Q5, 2026-09-11: Emergency Contacts is offered in the Pest
43
+ // control role editor. Exactly the seven actions `constants/permissions.ts`
44
+ // defines, copied from `useCleaningPermission` (decision 3A). The long
45
+ // spelling `see-all-emergency-contacts` is deliberately NOT added.
46
+ // Catalogue-only: an unticked action stays refused.
47
+ "emergency-contact": {
48
+ "see-all": {
49
+ check: true,
50
+ description: "Allows the user to view the list of all emergency contacts.",
51
+ },
52
+ "see-details": {
53
+ check: true,
54
+ description:
55
+ "Allows the user to view the details of a specific emergency contact.",
56
+ },
57
+ "add-emergency-contact": {
58
+ check: true,
59
+ description: "Allows the user to add a new emergency contact to the system.",
60
+ },
61
+ "update-emergency-contact": {
62
+ check: true,
63
+ description: "Allows the user to update emergency contact details.",
64
+ },
65
+ "delete-emergency-contact": {
66
+ check: true,
67
+ description:
68
+ "Allows the user to remove an emergency contact from the system permanently.",
69
+ },
70
+ "add-emergency-contact-category": {
71
+ check: true,
72
+ description:
73
+ "Allows the user to add a new emergency contact category to the system.",
74
+ },
75
+ "delete-emergency-contact-category": {
76
+ check: true,
77
+ description:
78
+ "Allows the user to delete an emergency contact category from the system.",
79
+ },
80
+ },
42
81
 
43
82
  "site-settings": {
44
83
  "can-view-site-settings": {
@@ -39,6 +39,45 @@ export default function usePoolMaintenancePermission() {
39
39
  work_orders: workOrderPermissions,
40
40
  "bulletin-board": bulletinBoardPermissions,
41
41
  "service-provider-mgmt": serviceProviderPermissions,
42
+ // Owner answer Q5, 2026-09-11: Emergency Contacts is offered in the Pool
43
+ // maintenance role editor. Exactly the seven actions
44
+ // `constants/permissions.ts` defines, copied from `useCleaningPermission`
45
+ // (decision 3A). The long spelling `see-all-emergency-contacts` is
46
+ // deliberately NOT added. Catalogue-only: an unticked action stays refused.
47
+ "emergency-contact": {
48
+ "see-all": {
49
+ check: true,
50
+ description: "Allows the user to view the list of all emergency contacts.",
51
+ },
52
+ "see-details": {
53
+ check: true,
54
+ description:
55
+ "Allows the user to view the details of a specific emergency contact.",
56
+ },
57
+ "add-emergency-contact": {
58
+ check: true,
59
+ description: "Allows the user to add a new emergency contact to the system.",
60
+ },
61
+ "update-emergency-contact": {
62
+ check: true,
63
+ description: "Allows the user to update emergency contact details.",
64
+ },
65
+ "delete-emergency-contact": {
66
+ check: true,
67
+ description:
68
+ "Allows the user to remove an emergency contact from the system permanently.",
69
+ },
70
+ "add-emergency-contact-category": {
71
+ check: true,
72
+ description:
73
+ "Allows the user to add a new emergency contact category to the system.",
74
+ },
75
+ "delete-emergency-contact-category": {
76
+ check: true,
77
+ description:
78
+ "Allows the user to delete an emergency contact category from the system.",
79
+ },
80
+ },
42
81
 
43
82
  "site-settings": {
44
83
  "can-view-site-settings": {
@@ -511,6 +511,15 @@ export default function usePropertyPermission() {
511
511
  "Allows the user to view the site's cameras. (Legacy name — this is the camera wall.)",
512
512
  },
513
513
  },
514
+ // NEW, owner answer Q9, 2026-09-11 — the iMA365 CCTV tile's own right.
515
+ // Same string and description as `useSecurityPermission`. Catalogue-only:
516
+ // nothing reads it yet, and the four `virtual-patrol:` strings above stay.
517
+ "cctv-mgmt": {
518
+ "see-all-cctv": {
519
+ check: true,
520
+ description: "Allows the user to view the site's CCTV cameras.",
521
+ },
522
+ },
514
523
  "nfc-patrol": {
515
524
  "see-all-nfc-patrol": {
516
525
  check: true,
@@ -427,6 +427,12 @@ export default function useSecurityPermission() {
427
427
  description:
428
428
  "Allows the user to view the details of a specific incident report.",
429
429
  },
430
+ // Owner answer Q10, 2026-09-11. Property's spelling and description,
431
+ // verbatim; the iSecure365 mobile app already accepts this string.
432
+ "review-incident-report": {
433
+ check: true,
434
+ description: "Allows the user to approve or reject incident report.",
435
+ },
430
436
  "delete-incident-report": {
431
437
  check: true,
432
438
  description:
@@ -590,6 +596,118 @@ export default function useSecurityPermission() {
590
596
  "Allows the user to open the notification feed on the iSecure365 mobile app.",
591
597
  },
592
598
  },
599
+
600
+ /*
601
+ * THE GUARD APP'S TILES THAT NO ROLE COULD BE GRANTED — owner answers Q5,
602
+ * Q9 and Q10, 2026-09-11: "tiles with no permission: build them".
603
+ *
604
+ * Every string below already exists verbatim in another application's
605
+ * catalogue (Property, or Cleaning for the 3A emergency set) and is copied
606
+ * from there, spelling and description. Two are new, and only two:
607
+ * `nfc-patrol:start-nfc-patrol` (mirrors `start-virtual-patrol-route`) and
608
+ * `cctv-mgmt:see-all-cctv` (today only `site-settings:manage-cctv-camera`,
609
+ * a setup action, exists). Pinned by `test/no-duplicate-spelling.test.mjs`.
610
+ *
611
+ * Catalogue-only: this widens what the role editor may OFFER and grants
612
+ * nobody anything. No gate reads these here yet.
613
+ */
614
+ "emergency-contact": {
615
+ "see-all": {
616
+ check: true,
617
+ description: "Allows the user to view the list of all emergency contacts.",
618
+ },
619
+ "see-details": {
620
+ check: true,
621
+ description:
622
+ "Allows the user to view the details of a specific emergency contact.",
623
+ },
624
+ "add-emergency-contact": {
625
+ check: true,
626
+ description: "Allows the user to add a new emergency contact to the system.",
627
+ },
628
+ "update-emergency-contact": {
629
+ check: true,
630
+ description: "Allows the user to update emergency contact details.",
631
+ },
632
+ "delete-emergency-contact": {
633
+ check: true,
634
+ description:
635
+ "Allows the user to remove an emergency contact from the system permanently.",
636
+ },
637
+ "add-emergency-contact-category": {
638
+ check: true,
639
+ description:
640
+ "Allows the user to add a new emergency contact category to the system.",
641
+ },
642
+ "delete-emergency-contact-category": {
643
+ check: true,
644
+ description:
645
+ "Allows the user to delete an emergency contact category from the system.",
646
+ },
647
+ },
648
+ "facility-booking-mgmt": {
649
+ "add-facility-booking": {
650
+ check: true,
651
+ description:
652
+ "Allows the user to add a new facility-booking to the system.",
653
+ },
654
+ "see-all-facility-booking": {
655
+ check: true,
656
+ description: "Allows the user to view the list of all facilities.",
657
+ },
658
+ "see-facility-booking-details": {
659
+ check: true,
660
+ description:
661
+ "Allows the user to view the details of a specific facility-booking.",
662
+ },
663
+ "update-facility-booking": {
664
+ check: true,
665
+ description: "Allows the user to update facility-booking details.",
666
+ },
667
+ "delete-facility-booking": {
668
+ check: true,
669
+ description:
670
+ "Allows the user to remove a facility-booking from the system permanently.",
671
+ },
672
+ },
673
+ // Property's descriptions minus its "Checked by the iMA365 mobile app."
674
+ // sentence, which is not true of this application.
675
+ "passes-and-keys-mgmt": {
676
+ "see-all-passes-and-keys": {
677
+ check: true,
678
+ description:
679
+ "Allows the user to view the list of all passes and keys on mobile.",
680
+ },
681
+ },
682
+ "resident-transactions": {
683
+ "see-all-resident-transactions": {
684
+ check: true,
685
+ description:
686
+ "Allows the user to view the list of all resident transactions on mobile.",
687
+ },
688
+ },
689
+ "nfc-patrol": {
690
+ "see-all-nfc-patrol": {
691
+ check: true,
692
+ description:
693
+ "Allows the user to view created routes and patrol logs.",
694
+ },
695
+ // NEW. Mirrors `virtual-patrol:start-virtual-patrol-route`.
696
+ "start-nfc-patrol": {
697
+ check: true,
698
+ description:
699
+ "Allows the user to start NFC patrolling on a specific route.",
700
+ },
701
+ },
702
+ // NEW. Seeing the CCTV wall, as distinct from setting cameras up
703
+ // (`site-settings:manage-cctv-camera`).
704
+ "cctv-mgmt": {
705
+ "see-all-cctv": {
706
+ check: true,
707
+ description: "Allows the user to view the site's CCTV cameras.",
708
+ },
709
+ },
710
+
593
711
  members: memberPermissions,
594
712
  invitations: invitationPermissions,
595
713
  roles: rolePermissions,
@@ -327,7 +327,12 @@ export const PERMISSIONS = {
327
327
  "add-nfc-patrol",
328
328
  "update-nfc-patrol",
329
329
  "delete-nfc-patrol",
330
+ // Owner answer Q10, 2026-09-11. Mirrors `start-virtual-patrol-route`.
331
+ "start-nfc-patrol",
330
332
  ],
333
+ // Owner answer Q9, 2026-09-11: seeing the CCTV wall. Distinct from
334
+ // `site-settings:manage-cctv-camera`, which is camera setup.
335
+ "cctv-mgmt": ["see-all-cctv"],
331
336
  "billing-mgmt": [
332
337
  "see-all-billing-summary",
333
338
  "see-all-billing-items",
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.8.1",
5
+ "version": "4.9.0",
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.",