@7365admin1/layer-common 4.64.3 → 4.64.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.64.4
4
+
5
+ ### Patch Changes
6
+
7
+ - d47f886: Invite member: when the Role list cannot be loaded (for example no access to the organisation's roles), it says so instead of "No roles have been created for this site yet".
8
+
3
9
  ## 4.64.3
4
10
 
5
11
  ### Patch Changes
@@ -1715,11 +1721,11 @@
1715
1721
  `utils/console-tier.ts` + `composables/useConsoleTier.ts` mirror the server's
1716
1722
  own rule from two endpoints the console already calls, unprojected:
1717
1723
 
1718
- GET /api/members/user/:user/app/admin the Seven365 staff membership
1719
- GET /api/roles/id/:role that membership's role document
1724
+ GET /api/members/user/:user/app/admin the Seven365 staff membership
1725
+ GET /api/roles/id/:role that membership's role document
1720
1726
 
1721
- owner = member.type === "admin" && role.type === "admin" && role.default === true
1722
- staff = member.type === "admin" && role.type === "admin"
1727
+ owner = member.type === "admin" && role.type === "admin" && role.default === true
1728
+ staff = member.type === "admin" && role.type === "admin"
1723
1729
 
1724
1730
  `role.default` is the marker because it is the only property of a platform
1725
1731
  staff role no API caller can set - `role.controller.ts` validates create and
@@ -59,7 +59,7 @@
59
59
  <v-list-item-title class="text-wrap">
60
60
  {{ noRolesText }}
61
61
  </v-list-item-title>
62
- <NuxtLink v-if="rolesPageLink" :to="rolesPageLink">
62
+ <NuxtLink v-if="rolesPageLink && !rolesError" :to="rolesPageLink">
63
63
  Open Roles &amp; Permissions
64
64
  </NuxtLink>
65
65
  </v-list-item>
@@ -474,7 +474,7 @@ const { getInvitableRoles } = useRole();
474
474
  * templates are gone from any invitation that names an organisation - the
475
475
  * server refuses them there (`core roleInvitable`).
476
476
  */
477
- const { data: RolesData, refresh: refreshRoles } = await useLazyAsyncData(
477
+ const { data: RolesData, refresh: refreshRoles, error: rolesError } = await useLazyAsyncData(
478
478
  "get-roles-by-type-" + props.org + "-" + props.app + "-" + fixedSite.value,
479
479
  () =>
480
480
  getInvitableRoles({
@@ -502,7 +502,9 @@ watchEffect(() => {
502
502
  const roleOptions = computed(() => inviteRoleOptions(roles.value));
503
503
 
504
504
  const noRolesText = computed(() =>
505
- fixedSite.value
505
+ rolesError?.value
506
+ ? "The roles could not be loaded. You may not have access to this organisation's roles; refresh, or sign in again."
507
+ : fixedSite.value
506
508
  ? "No roles have been created for this site yet. Create one in Roles & Permissions first."
507
509
  : "No roles have been created yet. Create one in Roles & Permissions first."
508
510
  );
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.64.3",
5
+ "version": "4.64.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.",