- Live attendance for stores, offices, and warehouses. Click a marker to see who's checked in and when. Powered by OpenStreetMap tiles — no proprietary mapping key required.
+ Preview of the manager attendance view. Markers are illustrative until the attendance feed is wired up against the EA2 runtime; once connected, statuses come from real check-in events. Tiles are served by OpenStreetMap.
{stats.onSite} on-site
diff --git a/src/scenes/Hub.tsx b/src/scenes/Hub.tsx
index bb1050d..f58c463 100644
--- a/src/scenes/Hub.tsx
+++ b/src/scenes/Hub.tsx
@@ -2,6 +2,7 @@ import { useEffect, useState } from "react";
import { useApp } from "../state/store";
import { api } from "../lib/api";
import { wizardApi } from "../lib/wizardApi";
+import { curatedPublishedFlows } from "../lib/flowCuration";
import { Branch, Layers, Pulse } from "../components/icons";
export type HubKey = "procurement" | "hr" | "it";
@@ -57,32 +58,18 @@ interface PublishedFlow {
name?: string;
}
-const NON_BUSINESS_SOURCE_CONTEXTS = new Set([
- "EA2_CHAT_THREAD",
- "EA2_CHAT_MSG",
- "EA2_WIZARD_STEP",
-]);
-
async function loadPublishedFlows(): Promise
{
const res = await fetch(`${api.config.baseUrl}/api/ea2/flow/processes?limit=200`, {
headers: { Authorization: `Bearer ${sessionStorage.getItem("fm.mc.token.v1")}` },
});
if (!res.ok) throw new Error(`processes ${res.status}`);
const body = await res.json();
- return ((body?.items || []) as any[])
- .filter(
- (it) =>
- it.status === "published" &&
- it.kind === "definition" &&
- it.display_name &&
- !NON_BUSINESS_SOURCE_CONTEXTS.has(it.source_context)
- )
- .map((it) => ({
- _key: it._key,
- display_name: it.display_name,
- description: it.description,
- name: it.name,
- }));
+ return curatedPublishedFlows((body?.items || []) as any[]).map((it) => ({
+ _key: it._key,
+ display_name: it.display_name!,
+ description: it.description,
+ name: it.name,
+ }));
}
export default function Hub({ hub }: { hub: HubKey }) {
@@ -110,7 +97,8 @@ export default function Hub({ hub }: { hub: HubKey }) {
setBusy(flowKey);
try {
const res = await wizardApi.startInstance(flowKey, subject);
- pushToast("ok", `Started ${label}${subject ? ` for ${subject}` : ""} — ${res.transaction_id?.slice(0, 8) || "ok"}`);
+ void res;
+ pushToast("ok", `Started ${label}${subject ? ` for ${subject}` : ""}.`);
setScene("mission");
} catch (err: any) {
pushToast("err", `Start failed: ${err.message}`);
diff --git a/src/scenes/Landing.tsx b/src/scenes/Landing.tsx
index ed2fc09..09d712b 100644
--- a/src/scenes/Landing.tsx
+++ b/src/scenes/Landing.tsx
@@ -80,7 +80,7 @@ export default function Landing() {
-
+
diff --git a/src/scenes/Wizard.tsx b/src/scenes/Wizard.tsx
index a5ac3cc..707ed34 100644
--- a/src/scenes/Wizard.tsx
+++ b/src/scenes/Wizard.tsx
@@ -403,7 +403,7 @@ export default function Wizard() {
Process Published!
-
Process definition {publishedKey} is now active in EA2.
+
Your process {draft.name || "Untitled"} is now active and ready to run.