@7365admin1/layer-common 4.35.1-staging.392 → 4.35.1-staging.393
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/components/MemberMain.vue +12 -0
- package/package.json +1 -1
- package/utils/role.ts +8 -0
|
@@ -121,8 +121,20 @@
|
|
|
121
121
|
/>
|
|
122
122
|
</template>
|
|
123
123
|
<v-list>
|
|
124
|
+
<!-- Highlighted when the row's role chip is a warning (no /
|
|
125
|
+
deleted / other org / other site role): this is the fix. -->
|
|
124
126
|
<v-list-item
|
|
125
127
|
v-if="props.assignRole"
|
|
128
|
+
:class="{
|
|
129
|
+
'text-warning font-weight-bold':
|
|
130
|
+
memberRoleChip(item)?.tone === 'warn',
|
|
131
|
+
}"
|
|
132
|
+
:prepend-icon="
|
|
133
|
+
memberRoleChip(item)?.tone === 'warn'
|
|
134
|
+
? 'mdi-alert-circle-outline'
|
|
135
|
+
: undefined
|
|
136
|
+
"
|
|
137
|
+
data-test="member-assign-role"
|
|
126
138
|
@click="
|
|
127
139
|
setMember({
|
|
128
140
|
dialog: true,
|
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.
|
|
5
|
+
"version": "4.35.1-staging.393",
|
|
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.",
|
package/utils/role.ts
CHANGED
|
@@ -39,6 +39,7 @@ export function withCurrentRole<T extends { _id?: unknown; name?: unknown }>(
|
|
|
39
39
|
export function memberRoleChip(item: {
|
|
40
40
|
roleName?: unknown;
|
|
41
41
|
roleState?: unknown;
|
|
42
|
+
roleSiteName?: unknown;
|
|
42
43
|
}): { text: string; tone: "info" | "warn" } | null {
|
|
43
44
|
const name = typeof item?.roleName === "string" ? item.roleName : "";
|
|
44
45
|
switch (item?.roleState) {
|
|
@@ -48,6 +49,13 @@ export function memberRoleChip(item: {
|
|
|
48
49
|
return { text: `${name || "Role"} (deleted) - assign a new role`, tone: "warn" };
|
|
49
50
|
case "other-org":
|
|
50
51
|
return { text: "Invalid role - assign a new role", tone: "warn" };
|
|
52
|
+
// The organisation's own role, but pinned to a different site than this
|
|
53
|
+
// membership's (owner report 2026-09-25: a Newton 200 member showed
|
|
54
|
+
// "Security", a role of The Loft).
|
|
55
|
+
case "other-site": {
|
|
56
|
+
const site = typeof item?.roleSiteName === "string" && item.roleSiteName ? item.roleSiteName : "another site";
|
|
57
|
+
return { text: `${name || "Role"} — belongs to ${site}. Assign a role for this site.`, tone: "warn" };
|
|
58
|
+
}
|
|
51
59
|
default:
|
|
52
60
|
return name ? { text: name, tone: "info" } : null;
|
|
53
61
|
}
|