@7365admin1/layer-common 4.35.1-staging.385 → 4.35.1-staging.386

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.
@@ -28,7 +28,17 @@
28
28
  <v-expansion-panel-text>
29
29
  <v-row no-gutters class="d-flex justify-center py-10">
30
30
  <v-form class="w-100">
31
- <v-row>
31
+ <!--
32
+ Owner decision 2026-09-25: a site's details are its owning
33
+ client's. A provider that serves the site sees them read-only;
34
+ the server refuses the save too. Blocks and guard posts below
35
+ stay editable - they are the provider's operational settings.
36
+ -->
37
+ <v-alert v-if="siteDetailsLocked" type="info" variant="tonal" density="compact" class="mb-4"
38
+ data-test="site-info-owner-only">
39
+ {{ siteOwnerNote }}
40
+ </v-alert>
41
+ <v-row :inert="siteDetailsLocked" :class="{ 'opacity-60': siteDetailsLocked }">
32
42
  <!-- Cover Photo + Preview -->
33
43
  <v-col cols="12" lg="5" class="pt-0">
34
44
  <InputLabel title="Cover Photo (displayed in resident app)" class="d-block mb-2" />
@@ -58,10 +68,12 @@
58
68
  </v-col>
59
69
 
60
70
  <!-- Submit -->
61
- <v-col cols="12" class="pt-0 d-flex justify-end">
71
+ <v-col v-if="!siteDetailsLocked" cols="12" class="pt-0 d-flex justify-end">
62
72
  <v-btn color="primary-button" class="text-none" size="large" variant="flat" text="Save"
63
73
  :loading="savingSiteInfo" @click="saveSiteInfo" />
64
74
  </v-col>
75
+ </v-row>
76
+ <v-row>
65
77
 
66
78
  <!-- Divider -->
67
79
  <v-col cols="12" class="my-2">
@@ -290,6 +302,13 @@ const orgId = computed(
290
302
  () => props.orgId || String((siteData.value as TSite | null)?.orgId ?? "")
291
303
  );
292
304
 
305
+ // The site read says whether this caller may change the site's details (core
306
+ // 3.103). Absent on an older API = unknown, so nothing is locked here.
307
+ const siteDetailsLocked = computed(
308
+ () => (siteData.value as any)?.detailsEditable === false
309
+ );
310
+ const siteOwnerNote = computed(() => siteOwnerOnlyNote((siteData.value as any)?.ownerOrgName));
311
+
293
312
  watch(
294
313
  siteData,
295
314
  (val: TSite) => {
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.35.1-staging.385",
5
+ "version": "4.35.1-staging.386",
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.",
@@ -0,0 +1,9 @@
1
+ /**
2
+ * What a service provider is told on a site it serves but does not own
3
+ * (owner decision 2026-09-25: only the owning client changes a site's
4
+ * details). Same words as the server's refusal.
5
+ */
6
+ export function siteOwnerOnlyNote(ownerName?: string | null): string {
7
+ const name = String(ownerName ?? "").trim() || "another organisation";
8
+ return `This site belongs to ${name}. Only they can change its details.`;
9
+ }