@7365admin1/layer-common 4.125.0 → 4.125.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.125.1
4
+
5
+ ### Patch Changes
6
+
7
+ - b2e5424: Robotics setup: fix the Setup view staying blank (floor names state was read before it was declared).
8
+
3
9
  ## 4.125.0
4
10
 
5
11
  ### Minor Changes
@@ -3288,11 +3294,11 @@ Monthly report: a month that had patrols opens the list of that month's patrol r
3288
3294
  `utils/console-tier.ts` + `composables/useConsoleTier.ts` mirror the server's
3289
3295
  own rule from two endpoints the console already calls, unprojected:
3290
3296
 
3291
- GET /api/members/user/:user/app/admin the Seven365 staff membership
3292
- GET /api/roles/id/:role that membership's role document
3297
+ GET /api/members/user/:user/app/admin the Seven365 staff membership
3298
+ GET /api/roles/id/:role that membership's role document
3293
3299
 
3294
- owner = member.type === "admin" && role.type === "admin" && role.default === true
3295
- staff = member.type === "admin" && role.type === "admin"
3300
+ owner = member.type === "admin" && role.type === "admin" && role.default === true
3301
+ staff = member.type === "admin" && role.type === "admin"
3296
3302
 
3297
3303
  `role.default` is the marker because it is the only property of a platform
3298
3304
  staff role no API caller can set - `role.controller.ts` validates create and
@@ -143,6 +143,18 @@ async function refresh() {
143
143
  await loadLifts();
144
144
  }
145
145
 
146
+ // Declared BEFORE `steps`: the progress watch below runs at once and reads it (a later `const` is a TDZ error).
147
+ // Floor names: the list the panel loaded or saved; a save re-reads the robots so the checklist shows the new floors.
148
+ const floorsEl = ref<HTMLElement | null>(null);
149
+ const siteFloors = ref<Array<{ key: number; name: string }>>([]);
150
+ const mapFloors = computed(() => [...new Set<number>(((saved.value?.levels ?? []) as any[]).map((l) => Number(l?.floorNo)).filter(Number.isInteger))]);
151
+ let firstFloors = true;
152
+ function floorsSaved(list: Array<{ key: number; name: string }>) {
153
+ siteFloors.value = list;
154
+ if (firstFloors) return void (firstFloors = false);
155
+ void refresh();
156
+ }
157
+
146
158
  const steps = computed(() =>
147
159
  robotSetupSteps({
148
160
  orgModules: orgModules.value,
@@ -165,16 +177,6 @@ function go(target: TSetupTarget) {
165
177
  if (target) emit("go", target);
166
178
  }
167
179
 
168
- // Floor names: the list the panel loaded or saved; a save re-reads the robots so the checklist shows the new floors.
169
- const floorsEl = ref<HTMLElement | null>(null);
170
- const siteFloors = ref<Array<{ key: number; name: string }>>([]);
171
- const mapFloors = computed(() => [...new Set<number>(((saved.value?.levels ?? []) as any[]).map((l) => Number(l?.floorNo)).filter(Number.isInteger))]);
172
- let firstFloors = true;
173
- function floorsSaved(list: Array<{ key: number; name: string }>) {
174
- siteFloors.value = list;
175
- if (firstFloors) return void (firstFloors = false);
176
- void refresh();
177
- }
178
180
  </script>
179
181
 
180
182
  <style scoped>
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.125.0",
5
+ "version": "4.125.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.",