@i4e/invest4edu-access-core 0.35.0 → 0.36.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/package.json +1 -1
- package/src/report-audience.js +38 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@i4e/invest4edu-access-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.36.0",
|
|
4
4
|
"description": "Shared access-control primitives for NeoFindesk: tenant keystone, role capabilities, reportee tree, entity/role vocabulary, feature flags, and the unified access engine (registry schema, snapshot resolver, visibleWhen).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
package/src/report-audience.js
CHANGED
|
@@ -58,6 +58,17 @@ export const AUDIENCE = Object.freeze({
|
|
|
58
58
|
*/
|
|
59
59
|
export const SECTION_KEYS = Object.freeze([
|
|
60
60
|
"actions", // the 3-step action plan / recommendations
|
|
61
|
+
/*
|
|
62
|
+
* The per-holding VERDICT — a fund's Buy/Hold/Watch/Exit chip and a stock's signal.
|
|
63
|
+
*
|
|
64
|
+
* Separate from `actions` because they are withheld for the same reason but live in different
|
|
65
|
+
* places: `actions` is one panel, this is a chip on every fund row and every stock row across
|
|
66
|
+
* several tabs. A client who cannot see the action plan but can see "EXIT" against a fund has
|
|
67
|
+
* been given the recommendation anyway, just without the reasoning.
|
|
68
|
+
*
|
|
69
|
+
* Covers BOTH vocabularies — funds carry `action`, stocks carry `signal`.
|
|
70
|
+
*/
|
|
71
|
+
"fundActions",
|
|
61
72
|
"phc", // portfolio health-check detail body
|
|
62
73
|
"chat", // AI chat
|
|
63
74
|
"performance", // performance / gains
|
|
@@ -70,6 +81,7 @@ export const SECTION_KEYS = Object.freeze([
|
|
|
70
81
|
/** Everything on. The answer whenever we cannot prove a narrower one is correct. */
|
|
71
82
|
export const ALL_VISIBLE = Object.freeze({
|
|
72
83
|
actions: true,
|
|
84
|
+
fundActions: true,
|
|
73
85
|
phc: true,
|
|
74
86
|
chat: true,
|
|
75
87
|
performance: true,
|
|
@@ -81,17 +93,36 @@ export const ALL_VISIBLE = Object.freeze({
|
|
|
81
93
|
tone: "adviser",
|
|
82
94
|
});
|
|
83
95
|
|
|
84
|
-
/**
|
|
96
|
+
/**
|
|
97
|
+
* The reduced view — REVISED 21 Sep 2026.
|
|
98
|
+
*
|
|
99
|
+
* It used to withhold almost the whole report. It now withholds exactly the RECOMMENDATION and
|
|
100
|
+
* nothing else, because the reason for withholding was never "this client should see less": it is
|
|
101
|
+
* that an employee services them and that conversation belongs to the RM. Everything the client
|
|
102
|
+
* can read for themselves — the health detail, performance, fund analysis, the score breakdown,
|
|
103
|
+
* per-fund detail — tells them where they stand without telling them what to do.
|
|
104
|
+
*
|
|
105
|
+
* Two keys carry it, and both are needed: the action plan is one panel, but the per-holding
|
|
106
|
+
* verdict is a chip on every fund and stock row. Withholding the panel alone would hand over the
|
|
107
|
+
* recommendation anyway, minus the reasoning.
|
|
108
|
+
*
|
|
109
|
+
* `chat` stays locked for the same reason, and it is the subtle one: a client can simply ASK the
|
|
110
|
+
* chat whether to sell a fund. Leaving it open would route around both keys above.
|
|
111
|
+
*
|
|
112
|
+
* `tone: b2c` stays: the narrative still speaks to a client rather than an adviser, and it must
|
|
113
|
+
* keep describing rather than prescribing now that it is the main thing they read.
|
|
114
|
+
*/
|
|
85
115
|
const REDUCED = Object.freeze({
|
|
86
116
|
actions: false,
|
|
87
|
-
|
|
117
|
+
fundActions: false,
|
|
88
118
|
chat: false,
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
119
|
+
phc: true,
|
|
120
|
+
performance: true,
|
|
121
|
+
keyInsights: true,
|
|
122
|
+
fundAnalysis: true,
|
|
123
|
+
scoreBreakdownFunds: true,
|
|
93
124
|
advisorCta: false,
|
|
94
|
-
fundDetail: "
|
|
125
|
+
fundDetail: "full",
|
|
95
126
|
tone: "b2c",
|
|
96
127
|
});
|
|
97
128
|
|