diff --git a/modules/rnetwork/components/folk-crm-view.ts b/modules/rnetwork/components/folk-crm-view.ts index 4693e88..216035b 100644 --- a/modules/rnetwork/components/folk-crm-view.ts +++ b/modules/rnetwork/components/folk-crm-view.ts @@ -321,33 +321,33 @@ class FolkCrmView extends HTMLElement { this.shadow.innerHTML = ` - ${this.error ? `
${this.esc(this.error)}
` : ""} + ${this.error ? `
${this.esc(this.error)}
` : ""}
Network Graph${this.space === "demo" ? 'Demo' : ""} @@ -553,7 +553,7 @@ class FolkGraphViewer extends HTMLElement {

🕸️

Community Relationship Graph

Connect the force-directed layout engine to visualize your network.

-

Automerge CRDT sync + d3-force layout

+

Automerge CRDT sync + d3-force layout

`} @@ -563,12 +563,12 @@ class FolkGraphViewer extends HTMLElement {
People
Organizations
-
Works at
+
Works at
Point of contact
${this.workspaces.length > 0 ? ` -
${this.space === "demo" ? "Organizations" : "Workspaces"}
+
${this.space === "demo" ? "Organizations" : "Workspaces"}
${this.workspaces.map(ws => `
diff --git a/modules/rnetwork/mod.ts b/modules/rnetwork/mod.ts index f9472e1..1cfaa2d 100644 --- a/modules/rnetwork/mod.ts +++ b/modules/rnetwork/mod.ts @@ -158,6 +158,7 @@ routes.get("/api/graph", async (c) => { id name { firstName lastName } email { primaryEmail } + city company { id name { firstName lastName } } } } @@ -169,6 +170,7 @@ routes.get("/api/graph", async (c) => { name domainName { primaryLinkUrl } employees + address { addressCity addressCountry } } } } @@ -196,7 +198,7 @@ routes.get("/api/graph", async (c) => { // People → nodes for (const { node: p } of d.people?.edges || []) { const label = [p.name?.firstName, p.name?.lastName].filter(Boolean).join(" ") || "Unknown"; - nodes.push({ id: p.id, label, type: "person", data: { email: p.email?.primaryEmail } }); + nodes.push({ id: p.id, label, type: "person", data: { email: p.email?.primaryEmail, location: p.city } }); nodeIds.add(p.id); // Person → Company edge @@ -207,7 +209,7 @@ routes.get("/api/graph", async (c) => { // Companies → nodes for (const { node: co } of d.companies?.edges || []) { - nodes.push({ id: co.id, label: co.name || "Unknown", type: "company", data: { domain: co.domainName?.primaryLinkUrl, employees: co.employees } }); + nodes.push({ id: co.id, label: co.name || "Unknown", type: "company", data: { domain: co.domainName?.primaryLinkUrl, employees: co.employees, location: co.address?.addressCity } }); nodeIds.add(co.id); } @@ -275,7 +277,6 @@ routes.get("/crm", (c) => { moduleId: "rnetwork", spaceSlug: space, modules: getModuleInfoList(), - theme: "dark", body: ``, scripts: ``, styles: ``, @@ -293,7 +294,6 @@ routes.get("/", (c) => { moduleId: "rnetwork", spaceSlug: space, modules: getModuleInfoList(), - theme: "dark", body: ``, scripts: ``, styles: ``, @@ -305,10 +305,9 @@ routes.get("/", (c) => { moduleId: "rnetwork", spaceSlug: space, modules: getModuleInfoList(), - theme: "dark", body: ` `, - scripts: ``, + scripts: ``, styles: ``, })); });