@7365admin1/layer-common 4.64.0 → 4.64.1

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.1
4
+
5
+ ### Patch Changes
6
+
7
+ - bcc3b37: useSite().getSites lists an organisation's sites from GET /api/sites?org= (the old /api/sites/organization/:org route does not exist and returned 404), so Inventory's "Properties this store supplies" and the set-up form offer every property of the organisation again.
8
+
3
9
  ## 4.64.0
4
10
 
5
11
  ### Minor Changes
@@ -1697,11 +1703,11 @@
1697
1703
  `utils/console-tier.ts` + `composables/useConsoleTier.ts` mirror the server's
1698
1704
  own rule from two endpoints the console already calls, unprojected:
1699
1705
 
1700
- GET /api/members/user/:user/app/admin the Seven365 staff membership
1701
- GET /api/roles/id/:role that membership's role document
1706
+ GET /api/members/user/:user/app/admin the Seven365 staff membership
1707
+ GET /api/roles/id/:role that membership's role document
1702
1708
 
1703
- owner = member.type === "admin" && role.type === "admin" && role.default === true
1704
- staff = member.type === "admin" && role.type === "admin"
1709
+ owner = member.type === "admin" && role.type === "admin" && role.default === true
1710
+ staff = member.type === "admin" && role.type === "admin"
1705
1711
 
1706
1712
  `role.default` is the marker because it is the only property of a platform
1707
1713
  staff role no API caller can set - `role.controller.ts` validates create and
@@ -41,13 +41,13 @@ export default function useSite() {
41
41
  try {
42
42
  const organizationId = orgId || currentUser.value?.defaultOrg;
43
43
 
44
- const response = await useNuxtApp().$api<Record<string, any>>(
45
- `/api/sites/organization/${organizationId}`,
46
- {
47
- method: "GET",
48
- query: { page: requestPage, search: searchQuery, limit, sort, order },
49
- }
50
- );
44
+ // API-core lists an organisation's sites at GET /api/sites?org= (core
45
+ // `getSites`); there is no /api/sites/organization/:org route, so the old
46
+ // path 404'd and Inventory never offered a second property to supply.
47
+ const response = await useNuxtApp().$api<Record<string, any>>(`/api/sites`, {
48
+ method: "GET",
49
+ query: { org: organizationId, page: requestPage, search: searchQuery, limit, sort, order },
50
+ });
51
51
 
52
52
  sites.value = response.items;
53
53
  page.value = requestPage;
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.0",
5
+ "version": "4.64.1",
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.",
@@ -36,7 +36,7 @@
36
36
  "build": "nuxt build .playground",
37
37
  "generate": "nuxt generate .playground",
38
38
  "preview": "nuxt preview .playground",
39
- "test": "esbuild composables/useANPRSettings.ts --format=esm --outfile=test/.build/useANPRSettings.mjs --log-level=error && esbuild composables/useVisitorSocket.ts --format=esm --outfile=test/.build/useVisitorSocket.mjs --log-level=error && esbuild composables/usePlateToastWindow.ts --format=esm --outfile=test/.build/usePlateToastWindow.mjs --log-level=error && esbuild utils/client-invite-modules.ts --bundle --platform=node --format=esm --outfile=test/.build/client-invite-modules.mjs --log-level=error && esbuild utils/robot-display.ts --bundle --platform=node --format=esm --outfile=test/.build/robot-display.mjs --log-level=error && esbuild utils/building-map.ts --bundle --platform=node --format=esm --outfile=test/.build/building-map.mjs --log-level=error && esbuild utils/robot-building.ts --bundle --platform=node --format=esm --outfile=test/.build/robot-building.mjs --log-level=error && esbuild utils/robot-fleet-core.ts --bundle --platform=node --format=esm --outfile=test/.build/robot-fleet-core.mjs --log-level=error && esbuild utils/rmf-editor.ts --bundle --platform=node --format=esm --outfile=test/.build/rmf-editor.mjs --log-level=error && node --experimental-strip-types --test \"test/*.test.mjs\" && yarn test:units",
39
+ "test": "esbuild composables/useANPRSettings.ts --format=esm --outfile=test/.build/useANPRSettings.mjs --log-level=error && esbuild composables/useSite.ts --format=esm --outfile=test/.build/useSite.mjs --log-level=error && esbuild composables/useVisitorSocket.ts --format=esm --outfile=test/.build/useVisitorSocket.mjs --log-level=error && esbuild composables/usePlateToastWindow.ts --format=esm --outfile=test/.build/usePlateToastWindow.mjs --log-level=error && esbuild utils/client-invite-modules.ts --bundle --platform=node --format=esm --outfile=test/.build/client-invite-modules.mjs --log-level=error && esbuild utils/robot-display.ts --bundle --platform=node --format=esm --outfile=test/.build/robot-display.mjs --log-level=error && esbuild utils/building-map.ts --bundle --platform=node --format=esm --outfile=test/.build/building-map.mjs --log-level=error && esbuild utils/robot-building.ts --bundle --platform=node --format=esm --outfile=test/.build/robot-building.mjs --log-level=error && esbuild utils/robot-fleet-core.ts --bundle --platform=node --format=esm --outfile=test/.build/robot-fleet-core.mjs --log-level=error && esbuild utils/rmf-editor.ts --bundle --platform=node --format=esm --outfile=test/.build/rmf-editor.mjs --log-level=error && node --experimental-strip-types --test \"test/*.test.mjs\" && yarn test:units",
40
40
  "test:units": "node --experimental-strip-types --test \"utils/*.test.ts\"",
41
41
  "release": "yarn run build && changeset publish"
42
42
  },