⭐️⭐️⭐️ Open-source, self-hosted alternative to Linear and Plane. Project management and issue tracking where teams and AI agents work side by side to plan and ship products.
TypeScript agenticagileai-agentsbug-reportingbug-trackerganttissue-trackerjirajira-alternativekanbanlinearlinear-alternativeopen-sourceproduct-managementproject-managementroadmapself-hostedsprint-planningteam-collaborationtrello-alternative
import { useTranslations } from 'next-intl';
import type { WidgetConfig } from '@/utils/dashboardWidgets';
import {
Select,
SelectContent,
SelectItem,
SelectTrigger,
SelectValue,
} from '@/components/ui/select';
const WEEK_OPTIONS = [4, 8, 12, 26];
// The number of weeks the chart covers.
export default function ThroughputWidgetSettings({
config,
onConfigChange,
}: {
config: WidgetConfig;
onConfigChange: (config: WidgetConfig) => void;
}) {
const t = useTranslations('dashboards.throughput');
const weeks = config.weeks ?? 12;
return (
<Select value={String(weeks)} onValueChange={(v) => onConfigChange({ weeks: Number(v) })}>
<SelectTrigger size="sm" className="w-[130px]">
<SelectValue />
</SelectTrigger>
<SelectContent>
{WEEK_OPTIONS.map((w) => (
<SelectItem key={w} value={String(w)}>
{t('lastWeeks', { weeks: w })}
</SelectItem>
))}
</SelectContent>
</Select>
);
}