autosolutions-os 0.4.13 → 0.4.15
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 +30 -0
- package/README.md +8 -2
- package/dist/coreView.d.ts +2 -0
- package/dist/coreView.js +5 -4
- package/dist/frame.js +4 -2
- package/dist/nav.d.ts +52 -6
- package/dist/nav.js +68 -13
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.4.15 - 2026-11-13
|
|
4
|
+
|
|
5
|
+
One menu in every app (Didac, 13 November 2026: the same rows and states in e-Sales and every
|
|
6
|
+
other app as in the Hub, for each person).
|
|
7
|
+
|
|
8
|
+
- al.ive > Commercial > Reporting > Sales by channel is open in every app, not only in the Hub,
|
|
9
|
+
for someone acting in al.ive who holds Finance > Gross margin by channel there. It opens the
|
|
10
|
+
Hub's temporary al.ive sales view (`/os/commercial/sales`). Until now the Hub alone did this
|
|
11
|
+
(Hub PR #112, its own `tools`), so e-Sales and the other apps showed the row greyed (Ops Hub's
|
|
12
|
+
row; al.ive has no Ops Hub). New: `OS_COMPANY_HUB_ROWS` (TEMP-ALIVE-SALES), `companyHubRows()`,
|
|
13
|
+
osFrame's `hubRows`; OsWorkspaceFrame and useCoreFrame pass them, so apps change nothing but
|
|
14
|
+
the version.
|
|
15
|
+
- The Hub panel has no Configuration row, and Overview no "/comms" match (Didac, 13 November
|
|
16
|
+
2026: "it's enough having it only on the left side"). The Hub dropped both on its own in Hub
|
|
17
|
+
PR #119; now every app shows the same seven Smart Comms rows. The rail's Settings opens
|
|
18
|
+
`/comms/settings` in every app, as before.
|
|
19
|
+
- `hubPanelLocks(items, tenantSlug)`: outside Frank Body a locked Signature Generator says "Only
|
|
20
|
+
available for Frank Body", as the Hub says (`OS_HUB_ROW_COMPANY`). Without a slug, as before.
|
|
21
|
+
- Apps on 0.4.12 also get 0.4.13 and 0.4.14: Month-end close and Financial Analyst read
|
|
22
|
+
"(Incomplete)" instead of "(*)", as in the Hub.
|
|
23
|
+
|
|
24
|
+
## 0.4.14 - 2026-11-11
|
|
25
|
+
|
|
26
|
+
Finance release 7: open purchase orders and customer emails from NetSuite (Didac, 10 November
|
|
27
|
+
2026: "Add the NetSuite data", then "Yes, ship all").
|
|
28
|
+
|
|
29
|
+
- `OS_TOOL_DATA` words only: Cash & forecast's 13-week forecast holds open purchase orders,
|
|
30
|
+
Working capital's 13-week forecast is real (run rates and open POs), Collections drafts carry
|
|
31
|
+
the customer's email. Near expiry: NetSuite does not track lots or expiry dates.
|
|
32
|
+
|
|
3
33
|
## 0.4.13 - 2026-11-10
|
|
4
34
|
|
|
5
35
|
Finance release 6: the last Finance parts that today's access can fill read real
|
package/README.md
CHANGED
|
@@ -277,11 +277,17 @@ why).
|
|
|
277
277
|
Commercial > Customers and Operations > Customer OTIF its Customers and
|
|
278
278
|
Order OTIF pages (0.3.12), and Operations > Forecast accuracy its Forecast
|
|
279
279
|
accuracy page (0.3.14).
|
|
280
|
+
- A company can open a row in the Hub whatever its app says (0.4.15,
|
|
281
|
+
`OS_COMPANY_HUB_ROWS`, `companyHubRows()`, osFrame's `hubRows`): in al.ive,
|
|
282
|
+
Commercial > Sales by channel opens the Hub's temporary al.ive sales view
|
|
283
|
+
for someone who holds Finance > Gross margin by channel there
|
|
284
|
+
(TEMP-ALIVE-SALES). OsWorkspaceFrame and useCoreFrame pass it, so the row
|
|
285
|
+
is the same in every app.
|
|
280
286
|
- Admin appears when `my_admin_scope()` says the person manages something; pass
|
|
281
287
|
`admin` to decide it yourself.
|
|
282
288
|
- Every app shows the Hub panel (0.3.0, `OS_HUB_MENU`, the design's): Smart
|
|
283
|
-
Comms Hub (Overview, Inbox, Calendar, Tasks, Slack, Monday, Accounts
|
|
284
|
-
Configuration) and Tools (Unmarked Agent, Signature Generator; the group was
|
|
289
|
+
Comms Hub (Overview, Inbox, Calendar, Tasks, Slack, Monday, Accounts; no
|
|
290
|
+
Configuration row since 0.4.15, the rail's Settings opens it) and Tools (Unmarked Agent, Signature Generator; the group was
|
|
285
291
|
Assistants before 0.3.9, and Brand Voice Capture left it in 0.4.10). The rail's Hub opens it, as any function does, and
|
|
286
292
|
each row is a link into the Hub with `?tenant=`; Admin goes to the Hub. Pass
|
|
287
293
|
`hubItems` to draw other rows (the Hub passes its own, to lock what it
|
package/dist/coreView.d.ts
CHANGED
|
@@ -76,6 +76,8 @@ export type CoreFrameOptionsForOsFrame = {
|
|
|
76
76
|
locked: Record<string, string>;
|
|
77
77
|
/** The default Hub panel's rows the person may not open (0.3.13). */
|
|
78
78
|
hubLocked: Record<string, string>;
|
|
79
|
+
/** The rows the acting company opens in the Hub (companyHubRows, 0.4.15). */
|
|
80
|
+
hubRows: string[];
|
|
79
81
|
admin: boolean;
|
|
80
82
|
tenantSlug: string | null;
|
|
81
83
|
};
|
package/dist/coreView.js
CHANGED
|
@@ -34,7 +34,7 @@ import { followOsPerson } from "./contextCache.js";
|
|
|
34
34
|
import { createCoreViewClient, hubSession } from "./coreReader.js";
|
|
35
35
|
import { OsFeedbackButton } from "./feedback.js";
|
|
36
36
|
import { myAdminScope } from "./identity.js";
|
|
37
|
-
import { catalogueLinks, hubPanelLocks, staticLinks, withItemLocks } from "./nav.js";
|
|
37
|
+
import { catalogueLinks, companyHubRows, hubPanelLocks, staticLinks, withItemLocks } from "./nav.js";
|
|
38
38
|
import { useOsPlate } from "./plate.js";
|
|
39
39
|
export { CORE_VIEW_FUNCTIONS, createCoreViewClient, hubSession, } from "./coreReader.js";
|
|
40
40
|
/** How often a page that stays open looks at the shared cookie again, besides focus and coming back into view. */
|
|
@@ -128,15 +128,16 @@ export function useCoreFrame({ appKey, email, fallback, companySwitch = "os", fe
|
|
|
128
128
|
const slug = current?.slug ?? null;
|
|
129
129
|
const frameOptions = useMemo(() => {
|
|
130
130
|
if (source === "static") {
|
|
131
|
-
return { links: staticLinks(fallback.tenantSlug), locked: {}, hubLocked: {}, admin: false, tenantSlug: fallback.tenantSlug };
|
|
131
|
+
return { links: staticLinks(fallback.tenantSlug), locked: {}, hubLocked: {}, hubRows: [], admin: false, tenantSlug: fallback.tenantSlug };
|
|
132
132
|
}
|
|
133
133
|
/* "checking": apps is null, so nothing is linked and other apps' rows read as being checked.
|
|
134
134
|
The core's items then lock every row the person may not open (0.3.13). */
|
|
135
135
|
const items = source === "core" ? context?.items : undefined;
|
|
136
136
|
const { links, locked } = withItemLocks(catalogueLinks(source === "core" ? apps ?? null : null, source === "core" ? slug : null), items);
|
|
137
|
+
const tenantSlug = source === "core" ? slug : null;
|
|
137
138
|
return {
|
|
138
|
-
links, locked, hubLocked: hubPanelLocks(items),
|
|
139
|
-
admin: source === "core" && manages, tenantSlug
|
|
139
|
+
links, locked, hubLocked: hubPanelLocks(items, tenantSlug), hubRows: companyHubRows(tenantSlug, items),
|
|
140
|
+
admin: source === "core" && manages, tenantSlug,
|
|
140
141
|
};
|
|
141
142
|
}, [source, apps, context?.items, slug, manages, fallback.tenantSlug]);
|
|
142
143
|
const staticPlate = useMemo(() => ({
|
package/dist/frame.js
CHANGED
|
@@ -32,7 +32,7 @@ import { osAccessToken } from "./client.js";
|
|
|
32
32
|
import { retryOsContext, watchOsAuth } from "./context.js";
|
|
33
33
|
import { OsFeedbackButton } from "./feedback.js";
|
|
34
34
|
import { myAdminScope } from "./identity.js";
|
|
35
|
-
import { catalogueLinks, hubPanelLocks, osFrame, withItemLocks } from "./nav.js";
|
|
35
|
+
import { catalogueLinks, companyHubRows, hubPanelLocks, osFrame, withItemLocks } from "./nav.js";
|
|
36
36
|
import { useOsPlate } from "./plate.js";
|
|
37
37
|
import { useMenuSearch } from "./search.js";
|
|
38
38
|
/* This app's own rows and tabs as links to their paths. Rows for other apps
|
|
@@ -107,8 +107,10 @@ export function OsWorkspaceFrame({ os, auth, appKey, tools, hubItems, location,
|
|
|
107
107
|
const { links, locked } = withItemLocks(catalogueLinks(apps ?? null, slug), items);
|
|
108
108
|
return osFrame({
|
|
109
109
|
appKey, links, locked, admin: admin ?? manages, tenantSlug: slug,
|
|
110
|
+
/* The rows the acting company opens in the Hub (0.4.15), the same in every app. */
|
|
111
|
+
hubRows: companyHubRows(slug, items),
|
|
110
112
|
...(tools ? { tools } : {}),
|
|
111
|
-
...(hubItems ? { hubItems } : { hubLocked: hubPanelLocks(items) }),
|
|
113
|
+
...(hubItems ? { hubItems } : { hubLocked: hubPanelLocks(items, slug) }),
|
|
112
114
|
...(homePath ? { homePath } : {}),
|
|
113
115
|
});
|
|
114
116
|
}, [appKey, apps, items, admin, manages, slug, tools, hubItems, homePath]);
|
package/dist/nav.d.ts
CHANGED
|
@@ -391,19 +391,52 @@ export declare function withItemLocks(base: {
|
|
|
391
391
|
links: Record<string, string>;
|
|
392
392
|
locked: Record<string, string>;
|
|
393
393
|
};
|
|
394
|
+
/**
|
|
395
|
+
* Rows that one company opens in the Hub, whatever their app says (0.4.15),
|
|
396
|
+
* and the item a person needs there for it: company slug, then row id, then
|
|
397
|
+
* item. Every frame applies them alike (OsWorkspaceFrame and useCoreFrame
|
|
398
|
+
* pass `hubRows`), so a row is open or locked the same way in every app.
|
|
399
|
+
*
|
|
400
|
+
* TEMP-ALIVE-SALES (Didac, 12 November 2026): al.ive has no Ops Hub and no
|
|
401
|
+
* NetSuite yet, so Commercial > Reporting > Sales by channel (Ops Hub's row)
|
|
402
|
+
* opens the Hub's temporary al.ive sales view (/os/commercial/sales) for
|
|
403
|
+
* someone acting in al.ive who holds Finance > Gross margin by channel there.
|
|
404
|
+
* The core checks the same item before it answers (alive_temp_read). Until
|
|
405
|
+
* 0.4.15 only the Hub did this (Hub PR #112, its own `tools`), so in every
|
|
406
|
+
* other app the row stayed greyed. Remove the entry with the rest of
|
|
407
|
+
* TEMP-ALIVE-SALES (core RUNBOOK, "al.ive sales by channel, temporary").
|
|
408
|
+
*/
|
|
409
|
+
export declare const OS_COMPANY_HUB_ROWS: Readonly<Record<string, Readonly<Record<string, string>>>>;
|
|
410
|
+
/**
|
|
411
|
+
* The rows that open their page in the Hub for this person in this company
|
|
412
|
+
* (OS_COMPANY_HUB_ROWS), for osFrame's `hubRows`. None until the core has
|
|
413
|
+
* answered with the person's items, and none for an item they do not hold.
|
|
414
|
+
*/
|
|
415
|
+
export declare function companyHubRows(tenantSlug: string | null | undefined, items: Readonly<Record<string, string>> | null | undefined): string[];
|
|
394
416
|
/**
|
|
395
417
|
* The Hub panel's rows and the item each needs (0.3.13): the seven Smart Comms
|
|
396
|
-
* views share Smart Comms Hub
|
|
397
|
-
* (everyone's settings) needs none.
|
|
418
|
+
* views share Smart Comms Hub and each tool has its own.
|
|
398
419
|
*/
|
|
399
420
|
export declare const OS_HUB_ROW_ITEMS: Readonly<Record<string, string>>;
|
|
421
|
+
/**
|
|
422
|
+
* Hub panel rows that serve one company only, and what a locked row says
|
|
423
|
+
* elsewhere (0.4.15): the Signature Generator builds the Frank Body
|
|
424
|
+
* letterhead, so outside Frank Body its lock reads "Only available for Frank
|
|
425
|
+
* Body", as it does in the Hub, not "Ask an AutoSolutions OS admin...".
|
|
426
|
+
*/
|
|
427
|
+
export declare const OS_HUB_ROW_COMPANY: Readonly<Record<string, {
|
|
428
|
+
company: string;
|
|
429
|
+
hint: string;
|
|
430
|
+
}>>;
|
|
400
431
|
/**
|
|
401
432
|
* The rows of the default Hub panel (OS_HUB_MENU) a person may not open, by
|
|
402
433
|
* row id (0.3.13), for osFrame's `hubLocked`. As itemLocks: nothing while
|
|
403
|
-
* the core has not answered or has no items.
|
|
404
|
-
* (
|
|
434
|
+
* the core has not answered or has no items. Given the acting company's slug
|
|
435
|
+
* (0.4.15), a one-company row (OS_HUB_ROW_COMPANY) outside that company says
|
|
436
|
+
* so. The Hub passes its own panel (`hubItems`) and decides these itself, by
|
|
437
|
+
* the same rule.
|
|
405
438
|
*/
|
|
406
|
-
export declare function hubPanelLocks(items: Readonly<Record<string, string>> | null | undefined): Record<string, string>;
|
|
439
|
+
export declare function hubPanelLocks(items: Readonly<Record<string, string>> | null | undefined, tenantSlug?: string | null): Record<string, string>;
|
|
407
440
|
/** A route inside this app. `path` may carry a query, e.g. "/launcher?section=signature". */
|
|
408
441
|
export type OsRoute = {
|
|
409
442
|
/** Where a click goes. */
|
|
@@ -453,11 +486,18 @@ export type OsHubSection = {
|
|
|
453
486
|
items: OsHubItem[];
|
|
454
487
|
};
|
|
455
488
|
/**
|
|
456
|
-
* The Hub's panel (0.3.0), the design's: Smart Comms Hub, its
|
|
489
|
+
* The Hub's panel (0.3.0), the design's: Smart Comms Hub, its seven views,
|
|
457
490
|
* then Tools (the owner's name since 0.3.9; Assistants before). Every app
|
|
458
491
|
* shows it when the rail's Hub is selected, each row a link to its page in
|
|
459
492
|
* the Hub (in the Hub, its own route). The Hub may pass rows of its own
|
|
460
493
|
* instead (`hubItems`), to lock the tools it gates.
|
|
494
|
+
*
|
|
495
|
+
* Since 0.4.15 (Didac, 13 November 2026: "it's enough having it only on the
|
|
496
|
+
* left side") there is no Configuration row: the rail's Settings opens
|
|
497
|
+
* /comms/settings in every app. Overview has no "/comms" match either, so in
|
|
498
|
+
* the Hub the Settings page sits on the Hub with the menu closed, like Admin.
|
|
499
|
+
* The Hub had dropped both on its own (Hub PR #119); now every app shows the
|
|
500
|
+
* same panel.
|
|
461
501
|
*/
|
|
462
502
|
export declare const OS_HUB_MENU: OsHubSection[];
|
|
463
503
|
/** A menu row as osFrame hands it to WorkspaceFrame. */
|
|
@@ -523,6 +563,12 @@ export type OsFrameOptions = {
|
|
|
523
563
|
links?: Record<string, string>;
|
|
524
564
|
/** Tool id to the reason its row is off (catalogueLinks): wins over the tool's page in the Hub. */
|
|
525
565
|
locked?: Record<string, string>;
|
|
566
|
+
/**
|
|
567
|
+
* Tool ids whose row opens its page in the Hub whatever `links` and
|
|
568
|
+
* `locked` say (companyHubRows, 0.4.15): in the Hub its own route, elsewhere
|
|
569
|
+
* a link to the Hub. This app's own tools still come first.
|
|
570
|
+
*/
|
|
571
|
+
hubRows?: readonly string[];
|
|
526
572
|
/** Show Admin in the footer. */
|
|
527
573
|
admin?: boolean;
|
|
528
574
|
/**
|
package/dist/nav.js
CHANGED
|
@@ -393,7 +393,7 @@ export const OS_TOOL_DATA = {
|
|
|
393
393
|
hourly NetSuite copy. Release 6 (0.4.13): Collections too (chase drafts by fixed rules). */
|
|
394
394
|
"debtors-creditors": {
|
|
395
395
|
data: "incomplete",
|
|
396
|
-
missing: "Frank Body's NetSuite companies only: al.ive body and Strength Lab (Xero) and the other UMG companies are not connected. DSO and DPO against last year start after the November 2026 close. Disputed invoices have no source yet. Collections drafts are written by fixed rules for a person to check and send
|
|
396
|
+
missing: "Frank Body's NetSuite companies only: al.ive body and Strength Lab (Xero) and the other UMG companies are not connected. DSO and DPO against last year start after the November 2026 close. Disputed invoices have no source yet. Collections drafts are written by fixed rules, addressed to the customer's email in NetSuite, for a person to check and send.",
|
|
397
397
|
},
|
|
398
398
|
/* Finance Step 3, releases 2 to 4 (0.4.11): P&L vs LY, Cash & forecast's Actual v LY, the Balance
|
|
399
399
|
sheet, Gross margin by channel and Working capital read the core's hourly NetSuite copy (posting
|
|
@@ -404,7 +404,7 @@ export const OS_TOOL_DATA = {
|
|
|
404
404
|
},
|
|
405
405
|
"cash-forecast": {
|
|
406
406
|
data: "incomplete",
|
|
407
|
-
missing: "Bank balances from Frank Body's NetSuite companies only: al.ive body and Strength Lab (Xero) and the other UMG companies are not connected. LY starts with the November 2026 close. The 13-week forecast holds open invoices and bills by due date and the manual flows
|
|
407
|
+
missing: "Bank balances from Frank Body's NetSuite companies only: al.ive body and Strength Lab (Xero) and the other UMG companies are not connected. LY starts with the November 2026 close. The 13-week forecast holds open invoices and bills by due date, open purchase orders not billed yet (paid at expected receipt plus terms) and the manual flows: no sales forecast, payroll or tax. Forecast accuracy starts a week after the first Monday snapshot.",
|
|
408
408
|
},
|
|
409
409
|
"balance-sheet": {
|
|
410
410
|
data: "incomplete",
|
|
@@ -416,7 +416,7 @@ export const OS_TOOL_DATA = {
|
|
|
416
416
|
},
|
|
417
417
|
"working-capital": {
|
|
418
418
|
data: "incomplete",
|
|
419
|
-
missing: "Frank Body's NetSuite companies only: al.ive body and Strength Lab (Xero) and the other UMG companies are not connected. The weekly history starts with the first weekly snapshot, and last year a year after it. The 13-week forecast
|
|
419
|
+
missing: "Frank Body's NetSuite companies only: al.ive body and Strength Lab (Xero) and the other UMG companies are not connected. The weekly history starts with the first weekly snapshot, and last year a year after it. The 13-week forecast uses run rates of sales (with GST for the Australian companies) and Cost of Goods Sold (no sales forecast yet) and open purchase orders from NetSuite; bills not on a PO are held at today's level. Aged & slow stock shows no near expiry: NetSuite does not track lots or expiry dates.",
|
|
420
420
|
},
|
|
421
421
|
/* Finance release 5 (0.4.12): the Finance Overview and Sales ratio assessments read the core's
|
|
422
422
|
hourly NetSuite copy (the six page functions and finance_page_ratios). The Overview's weekly
|
|
@@ -617,10 +617,40 @@ export function withItemLocks(base, items) {
|
|
|
617
617
|
}
|
|
618
618
|
return { links, locked };
|
|
619
619
|
}
|
|
620
|
+
/**
|
|
621
|
+
* Rows that one company opens in the Hub, whatever their app says (0.4.15),
|
|
622
|
+
* and the item a person needs there for it: company slug, then row id, then
|
|
623
|
+
* item. Every frame applies them alike (OsWorkspaceFrame and useCoreFrame
|
|
624
|
+
* pass `hubRows`), so a row is open or locked the same way in every app.
|
|
625
|
+
*
|
|
626
|
+
* TEMP-ALIVE-SALES (Didac, 12 November 2026): al.ive has no Ops Hub and no
|
|
627
|
+
* NetSuite yet, so Commercial > Reporting > Sales by channel (Ops Hub's row)
|
|
628
|
+
* opens the Hub's temporary al.ive sales view (/os/commercial/sales) for
|
|
629
|
+
* someone acting in al.ive who holds Finance > Gross margin by channel there.
|
|
630
|
+
* The core checks the same item before it answers (alive_temp_read). Until
|
|
631
|
+
* 0.4.15 only the Hub did this (Hub PR #112, its own `tools`), so in every
|
|
632
|
+
* other app the row stayed greyed. Remove the entry with the rest of
|
|
633
|
+
* TEMP-ALIVE-SALES (core RUNBOOK, "al.ive sales by channel, temporary").
|
|
634
|
+
*/
|
|
635
|
+
export const OS_COMPANY_HUB_ROWS = {
|
|
636
|
+
alive: { sales: "margin-by-channel" }, // TEMP-ALIVE-SALES
|
|
637
|
+
};
|
|
638
|
+
/**
|
|
639
|
+
* The rows that open their page in the Hub for this person in this company
|
|
640
|
+
* (OS_COMPANY_HUB_ROWS), for osFrame's `hubRows`. None until the core has
|
|
641
|
+
* answered with the person's items, and none for an item they do not hold.
|
|
642
|
+
*/
|
|
643
|
+
export function companyHubRows(tenantSlug, items) {
|
|
644
|
+
if (!tenantSlug || !items)
|
|
645
|
+
return [];
|
|
646
|
+
const rows = Object.prototype.hasOwnProperty.call(OS_COMPANY_HUB_ROWS, tenantSlug) ? OS_COMPANY_HUB_ROWS[tenantSlug] : {};
|
|
647
|
+
return Object.entries(rows)
|
|
648
|
+
.filter(([, item]) => Object.prototype.hasOwnProperty.call(items, item))
|
|
649
|
+
.map(([row]) => row);
|
|
650
|
+
}
|
|
620
651
|
/**
|
|
621
652
|
* The Hub panel's rows and the item each needs (0.3.13): the seven Smart Comms
|
|
622
|
-
* views share Smart Comms Hub
|
|
623
|
-
* (everyone's settings) needs none.
|
|
653
|
+
* views share Smart Comms Hub and each tool has its own.
|
|
624
654
|
*/
|
|
625
655
|
export const OS_HUB_ROW_ITEMS = {
|
|
626
656
|
overview: "hub-comms",
|
|
@@ -633,39 +663,58 @@ export const OS_HUB_ROW_ITEMS = {
|
|
|
633
663
|
agent: "hub-agent",
|
|
634
664
|
signature: "hub-signature",
|
|
635
665
|
};
|
|
666
|
+
/**
|
|
667
|
+
* Hub panel rows that serve one company only, and what a locked row says
|
|
668
|
+
* elsewhere (0.4.15): the Signature Generator builds the Frank Body
|
|
669
|
+
* letterhead, so outside Frank Body its lock reads "Only available for Frank
|
|
670
|
+
* Body", as it does in the Hub, not "Ask an AutoSolutions OS admin...".
|
|
671
|
+
*/
|
|
672
|
+
export const OS_HUB_ROW_COMPANY = {
|
|
673
|
+
signature: { company: "frank-body", hint: "Only available for Frank Body" },
|
|
674
|
+
};
|
|
636
675
|
/**
|
|
637
676
|
* The rows of the default Hub panel (OS_HUB_MENU) a person may not open, by
|
|
638
677
|
* row id (0.3.13), for osFrame's `hubLocked`. As itemLocks: nothing while
|
|
639
|
-
* the core has not answered or has no items.
|
|
640
|
-
* (
|
|
678
|
+
* the core has not answered or has no items. Given the acting company's slug
|
|
679
|
+
* (0.4.15), a one-company row (OS_HUB_ROW_COMPANY) outside that company says
|
|
680
|
+
* so. The Hub passes its own panel (`hubItems`) and decides these itself, by
|
|
681
|
+
* the same rule.
|
|
641
682
|
*/
|
|
642
|
-
export function hubPanelLocks(items) {
|
|
683
|
+
export function hubPanelLocks(items, tenantSlug) {
|
|
643
684
|
const out = {};
|
|
644
685
|
if (!items)
|
|
645
686
|
return out;
|
|
646
687
|
for (const [row, item] of Object.entries(OS_HUB_ROW_ITEMS)) {
|
|
647
|
-
if (
|
|
648
|
-
|
|
688
|
+
if (Object.prototype.hasOwnProperty.call(items, item))
|
|
689
|
+
continue;
|
|
690
|
+
const only = Object.prototype.hasOwnProperty.call(OS_HUB_ROW_COMPANY, row) ? OS_HUB_ROW_COMPANY[row] : undefined;
|
|
691
|
+
out[row] = only && tenantSlug && tenantSlug !== only.company ? only.hint : HINTS.locked;
|
|
649
692
|
}
|
|
650
693
|
return out;
|
|
651
694
|
}
|
|
652
695
|
/**
|
|
653
|
-
* The Hub's panel (0.3.0), the design's: Smart Comms Hub, its
|
|
696
|
+
* The Hub's panel (0.3.0), the design's: Smart Comms Hub, its seven views,
|
|
654
697
|
* then Tools (the owner's name since 0.3.9; Assistants before). Every app
|
|
655
698
|
* shows it when the rail's Hub is selected, each row a link to its page in
|
|
656
699
|
* the Hub (in the Hub, its own route). The Hub may pass rows of its own
|
|
657
700
|
* instead (`hubItems`), to lock the tools it gates.
|
|
701
|
+
*
|
|
702
|
+
* Since 0.4.15 (Didac, 13 November 2026: "it's enough having it only on the
|
|
703
|
+
* left side") there is no Configuration row: the rail's Settings opens
|
|
704
|
+
* /comms/settings in every app. Overview has no "/comms" match either, so in
|
|
705
|
+
* the Hub the Settings page sits on the Hub with the menu closed, like Admin.
|
|
706
|
+
* The Hub had dropped both on its own (Hub PR #119); now every app shows the
|
|
707
|
+
* same panel.
|
|
658
708
|
*/
|
|
659
709
|
export const OS_HUB_MENU = [
|
|
660
710
|
{ title: "Smart Comms Hub", items: [
|
|
661
|
-
{ id: "overview", label: "Overview", icon: "hub-overview", path: "/comms/overview"
|
|
711
|
+
{ id: "overview", label: "Overview", icon: "hub-overview", path: "/comms/overview" },
|
|
662
712
|
{ id: "inbox", label: "Inbox", icon: "hub-inbox", path: "/comms/inbox" },
|
|
663
713
|
{ id: "calendar", label: "Calendar", icon: "hub-calendar", path: "/comms/calendar" },
|
|
664
714
|
{ id: "tasks", label: "Tasks", icon: "hub-tasks", path: "/comms/tasks" },
|
|
665
715
|
{ id: "slack", label: "Slack", icon: "hub-slack", path: "/comms/slack" },
|
|
666
716
|
{ id: "monday", label: "Monday", icon: "hub-monday", path: "/comms/monday" },
|
|
667
717
|
{ id: "accounts", label: "Accounts", icon: "hub-accounts", path: "/comms/accounts" },
|
|
668
|
-
{ id: "configuration", label: "Configuration", icon: "hub-configuration", path: "/comms/settings" },
|
|
669
718
|
] },
|
|
670
719
|
{ title: "Tools", items: [
|
|
671
720
|
{ id: "agent", label: "Unmarked Agent", icon: "agent", path: "/comms/agent" },
|
|
@@ -746,6 +795,7 @@ function best(routes, location, exact = false) {
|
|
|
746
795
|
*/
|
|
747
796
|
export function osFrame(options) {
|
|
748
797
|
const { appKey, tools = [], hubItems, hubLocked = {}, admin = false, hubUrl = HUB_URL, tenantSlug = null, } = options;
|
|
798
|
+
const hubRows = new Set((options.hubRows ?? []).map(osToolId));
|
|
749
799
|
const links = underMenuIds(options.links ?? {});
|
|
750
800
|
const locked = underMenuIds(options.locked ?? {});
|
|
751
801
|
const isHub = appKey === "hub";
|
|
@@ -787,6 +837,11 @@ export function osFrame(options) {
|
|
|
787
837
|
/* Its page in the Hub, which in the Hub also places a location there
|
|
788
838
|
on this row when the row itself opens an app. */
|
|
789
839
|
const page = osHubPath(fn, entry.overview ? null : entry.id);
|
|
840
|
+
/* A row the acting company opens in the Hub (0.4.15, companyHubRows):
|
|
841
|
+
its page there, before links and locks, with the mark of a page
|
|
842
|
+
that serves the tool (the Hub's own page for it, not a sample). */
|
|
843
|
+
if (hubRows.has(entry.id))
|
|
844
|
+
return marked(inHub(base, page), entry.id, osDataStatus(entry.id, "app"));
|
|
790
845
|
/* A link or a reason from the catalogue comes first: the catalogue
|
|
791
846
|
knows what this person holds. */
|
|
792
847
|
const href = links[entry.id];
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** This package's version, sent with each feedback message. A test keeps it equal to package.json. */
|
|
2
|
-
export declare const OS_VERSION = "0.4.
|
|
2
|
+
export declare const OS_VERSION = "0.4.15";
|
package/dist/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** This package's version, sent with each feedback message. A test keeps it equal to package.json. */
|
|
2
|
-
export const OS_VERSION = "0.4.
|
|
2
|
+
export const OS_VERSION = "0.4.15";
|
package/package.json
CHANGED