- ui/src/App.tsx: Create/first company titles and descriptions → VOCAB.company
- ui/src/components/OnboardingWizard.tsx: 3 company display strings → VOCAB
- ui/src/components/Sidebar.tsx: 'Select company' fallback → VOCAB
- ui/src/pages/CliAuth.tsx: 'Requested company' label → VOCAB
- ui/src/pages/AgentDetail.tsx: company library string → VOCAB
- server/src/services/company-portability.ts: 'Imported Company' x2 → 'Imported Workspace'
- cli/src/commands/client/{issue,approval,agent,dashboard,activity}.ts: option descriptions → VOCAB
- cli/src/commands/worktree.ts: error message and option description → VOCAB
- server/src/index.ts: comment cleanup (actual value already 'Owner')
- server/src/services/company-export-readme.ts: comment cleanup (value already 'Project Manager')
35 lines
1.1 KiB
TypeScript
35 lines
1.1 KiB
TypeScript
import { Command } from "commander";
|
|
import { VOCAB } from "@paperclipai/branding";
|
|
import type { DashboardSummary } from "@paperclipai/shared";
|
|
import {
|
|
addCommonClientOptions,
|
|
handleCommandError,
|
|
printOutput,
|
|
resolveCommandContext,
|
|
type BaseClientOptions,
|
|
} from "./common.js";
|
|
|
|
interface DashboardGetOptions extends BaseClientOptions {
|
|
companyId?: string;
|
|
}
|
|
|
|
export function registerDashboardCommands(program: Command): void {
|
|
const dashboard = program.command("dashboard").description("Dashboard summary operations");
|
|
|
|
addCommonClientOptions(
|
|
dashboard
|
|
.command("get")
|
|
.description(`Get dashboard summary for a ${VOCAB.company.toLowerCase()}`)
|
|
.requiredOption("-C, --company-id <id>", `${VOCAB.company} ID`)
|
|
.action(async (opts: DashboardGetOptions) => {
|
|
try {
|
|
const ctx = resolveCommandContext(opts, { requireCompany: true });
|
|
const row = await ctx.api.get<DashboardSummary>(`/api/companies/${ctx.companyId}/dashboard`);
|
|
printOutput(row, { json: ctx.json });
|
|
} catch (err) {
|
|
handleCommandError(err);
|
|
}
|
|
}),
|
|
{ includeCompany: false },
|
|
);
|
|
}
|