@7365admin1/layer-common 4.2.18 → 4.2.19

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,26 @@
1
1
  # @iservice365/layer-common
2
2
 
3
+ ## 4.2.19
4
+
5
+ ### Patch Changes
6
+
7
+ - 8196fa9: Add the `service-provider-mgmt` resource to the pest-control and pool-mgmt role catalogues
8
+
9
+ Both apps have a Service Providers page (`ServiceProviderMain`, same component
10
+ landscape uses) but `usePestControlPermission` and `usePoolMaintenancePermission`
11
+ carried no `service-provider-mgmt` resource, so the Roles & Permissions editor
12
+ could never grant it to a non-`"*"` role. Landscape already had this resource;
13
+ the same entry (`serviceProviderPermissions` from `useCommonPermissions`) is now
14
+ added to both, identical spelling and actions.
15
+
16
+ Widen only — no existing permission string is removed or re-spelled. The page's
17
+ live gate (`useServiceProviderPermission`, used inside `ServiceProviderMain`)
18
+ is unchanged: it already reads `service-provider-mgmt` off the role directly and
19
+ does not depend on either app's catalogue, so behaviour for every existing role
20
+ is unaffected. Pinned by `test/shared-role-catalogues.test.mjs`
21
+ (mechanical-electrical, which has no Service Providers page, is untouched and
22
+ still pins 15 resources; pest-control and pool-mgmt now pin 16).
23
+
3
24
  ## 4.2.18
4
25
 
5
26
  ### Patch Changes
@@ -685,11 +706,11 @@
685
706
  `utils/console-tier.ts` + `composables/useConsoleTier.ts` mirror the server's
686
707
  own rule from two endpoints the console already calls, unprojected:
687
708
 
688
- GET /api/members/user/:user/app/admin the Seven365 staff membership
689
- GET /api/roles/id/:role that membership's role document
709
+ GET /api/members/user/:user/app/admin the Seven365 staff membership
710
+ GET /api/roles/id/:role that membership's role document
690
711
 
691
- owner = member.type === "admin" && role.type === "admin" && role.default === true
692
- staff = member.type === "admin" && role.type === "admin"
712
+ owner = member.type === "admin" && role.type === "admin" && role.default === true
713
+ staff = member.type === "admin" && role.type === "admin"
693
714
 
694
715
  `role.default` is the marker because it is the only property of a platform
695
716
  staff role no API caller can set - `role.controller.ts` validates create and
@@ -23,6 +23,7 @@ export default function usePestControlPermission() {
23
23
  feedbackPermissions,
24
24
  workOrderPermissions,
25
25
  bulletinBoardPermissions,
26
+ serviceProviderPermissions,
26
27
 
27
28
  } = useCommonPermissions();
28
29
  const permissions: TPermissions = {
@@ -32,6 +33,7 @@ export default function usePestControlPermission() {
32
33
  feedbacks: feedbackPermissions,
33
34
  work_orders: workOrderPermissions,
34
35
  "bulletin-board": bulletinBoardPermissions,
36
+ "service-provider-mgmt": serviceProviderPermissions,
35
37
 
36
38
  "site-settings": {
37
39
  "can-view-site-settings": {
@@ -23,7 +23,8 @@ export default function usePoolMaintenancePermission() {
23
23
  feedbackPermissions,
24
24
  workOrderPermissions,
25
25
  bulletinBoardPermissions,
26
-
26
+ serviceProviderPermissions,
27
+
27
28
  } = useCommonPermissions();
28
29
  const permissions: TPermissions = {
29
30
  members: memberPermissions,
@@ -32,7 +33,8 @@ export default function usePoolMaintenancePermission() {
32
33
  feedbacks: feedbackPermissions,
33
34
  work_orders: workOrderPermissions,
34
35
  "bulletin-board": bulletinBoardPermissions,
35
-
36
+ "service-provider-mgmt": serviceProviderPermissions,
37
+
36
38
  "site-settings": {
37
39
  "can-view-site-settings": {
38
40
  check: true,
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.18",
5
+ "version": "4.2.19",
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.",