@7365admin1/layer-common 4.103.0 → 4.104.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,17 @@
|
|
|
1
1
|
# @iservice365/layer-common
|
|
2
2
|
|
|
3
|
+
## 4.104.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 0112ec7: Service Providers: an unknown staff count (older row with no linked company) shows "-" instead of 0; View Members lists the company's active people on this site (same as Members > Service Providers) instead of one person's memberships.
|
|
8
|
+
|
|
9
|
+
## 4.104.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- d7b2152: A site's Roles & Permissions screen lists only the roles made for that site (needs core with `scope=site`); organisation-wide roles are managed in the Organization app. An empty site list says so.
|
|
14
|
+
|
|
3
15
|
## 4.103.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
|
@@ -436,7 +436,9 @@ const {
|
|
|
436
436
|
type: props.listType ?? props.type,
|
|
437
437
|
org: props.orgId,
|
|
438
438
|
site: props.siteId,
|
|
439
|
-
|
|
439
|
+
// A site's screen lists only the roles made for that site (owner,
|
|
440
|
+
// 2026-10-06); organisation-wide roles live in the Organization app.
|
|
441
|
+
scope: props.scope || (props.siteId ? "site" : ""),
|
|
440
442
|
}),
|
|
441
443
|
{
|
|
442
444
|
watch: [page, headerSearch],
|
|
@@ -473,6 +475,9 @@ const emptyText = computed(() => {
|
|
|
473
475
|
if (getRoleReqError.value) {
|
|
474
476
|
return "Could not load roles. Please refresh to try again.";
|
|
475
477
|
}
|
|
478
|
+
if (props.siteId) {
|
|
479
|
+
return "No roles have been made for this site yet. Organisation-wide roles are managed in the Organization app.";
|
|
480
|
+
}
|
|
476
481
|
return "No roles have been created yet.";
|
|
477
482
|
});
|
|
478
483
|
|
|
@@ -320,7 +320,7 @@
|
|
|
320
320
|
|
|
321
321
|
<v-dialog v-model="viewDialog" max-width="514">
|
|
322
322
|
<v-card class="screen-modal">
|
|
323
|
-
<v-card-title>Members ({{ memberDialogCount }})</v-card-title>
|
|
323
|
+
<v-card-title>Members ({{ viewRow?.serviceProviderOrgId ? memberDialogCount : "-" }})</v-card-title>
|
|
324
324
|
|
|
325
325
|
<div class="screen-modal__body sp-members-scroll">
|
|
326
326
|
<v-table class="sp-members-table">
|
|
@@ -336,6 +336,11 @@
|
|
|
336
336
|
Loading...
|
|
337
337
|
</td>
|
|
338
338
|
</tr>
|
|
339
|
+
<tr v-else-if="!viewRow?.serviceProviderOrgId">
|
|
340
|
+
<td colspan="2" class="text-center sp-members-note">
|
|
341
|
+
This provider was added without a linked company account, so its staff cannot be listed.
|
|
342
|
+
</td>
|
|
343
|
+
</tr>
|
|
339
344
|
<tr v-else-if="!serviceProviderMembers.length">
|
|
340
345
|
<td colspan="2" class="text-center sp-members-note">
|
|
341
346
|
No members found.
|
|
@@ -1006,6 +1011,7 @@ const {
|
|
|
1006
1011
|
createServiceProviderInvite,
|
|
1007
1012
|
updateStatus: updateServiceProviderStatus,
|
|
1008
1013
|
invite,
|
|
1014
|
+
getSiteMembers,
|
|
1009
1015
|
} = useServiceProvider();
|
|
1010
1016
|
const { getAll: getAllMembers, getAllByUserId } = useMember();
|
|
1011
1017
|
|
|
@@ -1377,7 +1383,8 @@ function setInviteSiteName(siteId: string) {
|
|
|
1377
1383
|
}
|
|
1378
1384
|
|
|
1379
1385
|
function formatMembersCell(value: unknown): string {
|
|
1380
|
-
|
|
1386
|
+
// null = an older row with no company recorded: unknown, not 0.
|
|
1387
|
+
if (value == null || value === "") return "-";
|
|
1381
1388
|
const n = Number(value);
|
|
1382
1389
|
if (!Number.isFinite(n)) return "0";
|
|
1383
1390
|
return String(n);
|
|
@@ -1522,13 +1529,17 @@ async function openView(row: TableRow) {
|
|
|
1522
1529
|
|
|
1523
1530
|
loadingMembers.value = true;
|
|
1524
1531
|
try {
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
+
// The company's people on THIS site - the same list as Members > Service
|
|
1533
|
+
// Providers. It used to read one person's memberships (`row.userId`),
|
|
1534
|
+
// which a stored provider row does not even carry (owner report 2026-10-06).
|
|
1535
|
+
const data = await getSiteMembers(props.siteId);
|
|
1536
|
+
serviceProviderMembers.value = (data.items ?? [])
|
|
1537
|
+
.filter((member) => member.companyId === row.serviceProviderOrgId && member.status === "active")
|
|
1538
|
+
.map((member) => ({
|
|
1539
|
+
_id: String(member._id),
|
|
1540
|
+
name: member.name || member.email || "-",
|
|
1541
|
+
role: member.role || "-",
|
|
1542
|
+
}));
|
|
1532
1543
|
} catch (error: any) {
|
|
1533
1544
|
showMessage(errorConverter(error), "error");
|
|
1534
1545
|
} finally {
|
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.
|
|
5
|
+
"version": "4.104.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.",
|