@7365admin1/layer-common 4.101.0 → 4.102.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,11 @@
1
1
  # @iservice365/layer-common
2
2
 
3
+ ## 4.102.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 77be2c0: Change site owner: the button shows for Seven365 staff only; the new-owner list is searchable and shows each company's type; no "invite first" step.
8
+
3
9
  ## 4.101.0
4
10
 
5
11
  ### Minor Changes
@@ -18,8 +18,8 @@
18
18
  <p class="spc-intro">
19
19
  <template v-if="kind === 'owner'">
20
20
  {{ siteName || "This site" }} moves to a new owner, who takes charge of all of its records.
21
- Every service provider at the site keeps working as it is. Only the new owner must already be working at the site
22
- (invite them first; Seven365 can pick any company).
21
+ Every service provider at the site keeps working as it is, and the new owner needs no invitation. Only Seven365
22
+ can do this.
23
23
  </template>
24
24
  <template v-else>
25
25
  Only {{ preview?.service || "this service" }} at {{ siteName || "this site" }} changes. Other services at the site,
@@ -28,7 +28,7 @@
28
28
  </p>
29
29
 
30
30
  <label class="spc-label" for="spc-to">{{ kind === "owner" ? "New owner" : "New company (optional)" }}</label>
31
- <v-select
31
+ <v-autocomplete
32
32
  id="spc-to"
33
33
  v-model="to"
34
34
  :items="toItems"
@@ -38,7 +38,7 @@
38
38
  variant="outlined"
39
39
  class="filter-field"
40
40
  :disabled="saving"
41
- :no-data-text="kind === 'owner' ? 'Invite the new owner to the site first.' : 'Invite the new company to the site first.'"
41
+ :no-data-text="kind === 'owner' ? 'No company found.' : 'Invite the new company to the site first.'"
42
42
  data-test="spc-to"
43
43
  @update:model-value="refresh"
44
44
  />
@@ -96,7 +96,7 @@
96
96
  Provider changes at {{ siteName || "this site" }}
97
97
  <v-spacer />
98
98
  <v-btn
99
- v-if="ownerOrgId"
99
+ v-if="ownerOrgId && isStaff"
100
100
  variant="outlined"
101
101
  class="screen-btn-ghost mr-2"
102
102
  data-test="spc-change-owner"
@@ -186,11 +186,24 @@ const snackText = ref("");
186
186
  const snackColor = ref("success");
187
187
 
188
188
  const tomorrow = computed(() => new Date(Date.now() + 864e5).toISOString().slice(0, 10));
189
- const replacements = ref<Array<{ org: string; name: string }>>([]);
189
+ const replacements = ref<Array<{ org: string; name: string; nature?: string }>>([]);
190
+ const OWNER_KIND: Record<string, string> = {
191
+ property_management_agency: "Property management",
192
+ real_estate_developer: "Developer",
193
+ property_owner: "Owner",
194
+ };
190
195
  const toItems = computed(() => [
191
196
  ...(kind.value === "provider" ? [{ title: "No new company yet - just end", value: null }] : []),
192
- ...replacements.value.map((r) => ({ title: r.name, value: r.org })),
197
+ ...replacements.value.map((r) => ({
198
+ title: kind.value === "owner" && OWNER_KIND[r.nature ?? ""] ? `${r.name} - ${OWNER_KIND[r.nature ?? ""]}` : r.name,
199
+ value: r.org,
200
+ })),
193
201
  ]);
202
+
203
+ // Changing the site's owner is Seven365's job only (owner, 2026-10-06): a
204
+ // property manager must never see which other property managers use the system.
205
+ const { isStaff, load: loadTier } = useConsoleTier();
206
+ onMounted(() => loadTier());
194
207
  const canConfirm = computed(
195
208
  () =>
196
209
  !loading.value &&
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.101.0",
5
+ "version": "4.102.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.",