diff --git a/src/renderer/components/dashboard/Dashboard.tsx b/src/renderer/components/dashboard/Dashboard.tsx index fce32c99..f6318b73 100644 --- a/src/renderer/components/dashboard/Dashboard.tsx +++ b/src/renderer/components/dashboard/Dashboard.tsx @@ -187,7 +187,7 @@ export function Dashboard(props: DashboardProps) { {activeWork.length > 0 ? (
- {activeWork.map(({ run, agent, task }, i) => ( + {activeWork.map(({ run, agent, task }) => (
- {pendingCount > 0 && ( - -
- {allCandidates - .filter(c => c.stage === "requisition" || c.stage === "pending_approval") - .map((candidate) => { - const a = candidate.approval; - const ag = candidate.agent; - return ( -
-
- -
-
-
- {ag?.name ?? t("hiring.pendingHires")} - - {stageLabelMap[candidate.stage]} - -
-
- {ag ? `${ag.role} — ${ag.title}` : a?.payloadSummary} -
- {ag?.capabilities && ( -
{ag.capabilities}
- )} -
-
- {a && a.state === "pending" && ( - <> - { - unwrap(await window.agentCompany.decideApproval({ - companyId: a.companyId, - approvalId: a.id, - state: "approved", - decisionNote: t("hiring.approvedNote"), - })); - await onRefresh(); - }} - /> - { - unwrap(await window.agentCompany.decideApproval({ - companyId: a.companyId, - approvalId: a.id, - state: "rejected", - decisionNote: t("hiring.rejectedNote"), - })); - await onRefresh(); - }} - /> - - )} -
-
- ); - })} -
-
- )} - -
- -
{t("hiring.totalAgents")}
-
{agents.filter(a => a.status !== "terminated").length}
-
- -
{t("hiring.pendingHires")}
-
{agents.filter(a => a.status === "pending_approval").length}
-
- -
{t("hiring.departments")}
-
- {new Set(agents.filter(a => a.department && a.status !== "terminated").map(a => a.department)).size} -
-
- -
{t("hiring.monthlyPayroll")}
-
- ${agents.filter(a => a.status !== "terminated" && a.status !== "pending_approval").reduce((s, a) => s + a.budgetMonthlyUsd, 0).toLocaleString()} -
-
-
- - -
- {(["executive", "engineering", "product", "design", "marketing", "sales", "hr", "finance", "legal", "customer_support", "operations", "research"] as const).map(dept => { - const deptAgents = agents.filter(a => a.department === dept && a.status !== "terminated"); - const pending = deptAgents.filter(a => a.status === "pending_approval").length; - const active = deptAgents.filter(a => a.status !== "pending_approval").length; - if (active === 0 && pending === 0) return null; - return ( -
-
{dept.replace("_", " ")}
-
- {active} - {t("hiring.active")} - {pending > 0 && ( - <> - +{pending} - {t("hiring.pendingApproval")} - - )} -
-
- ); - })} -
-
); } diff --git a/src/renderer/views/sections/OrganizationSections.tsx b/src/renderer/views/sections/OrganizationSections.tsx index 6f136747..d5100c65 100644 --- a/src/renderer/views/sections/OrganizationSections.tsx +++ b/src/renderer/views/sections/OrganizationSections.tsx @@ -117,7 +117,6 @@ export function OrganizationSections({ section }: OrganizationSectionsProps) { a.companyId === currentCompany.id)} - onRefresh={refresh} onNavigateToAgent={(id) => { setSelectedAgentId(id); setSection("agents"); }} /> ) : null}