diff --git a/components/jobs/jobs-column.tsx b/components/jobs/jobs-column.tsx index ffde6c5..b4b53d7 100644 --- a/components/jobs/jobs-column.tsx +++ b/components/jobs/jobs-column.tsx @@ -6,6 +6,7 @@ import { Button } from '@/components/ui/button' import { Popover, PopoverTrigger, PopoverContent } from '@/components/ui/popover' import JobCard from './job-card' import { JOB_STATUS_LABELS } from '@/components/shared/job-status' +import { MultiFilterPills } from '@/components/shared/backlog-filter-popover' import { jobStatusToApi, type ClaudeJobStatusApi } from '@/lib/job-status' import { useUserSettingsStore } from '@/stores/user-settings/store' import { isWithinTimeWindow, DEFAULT_JOBS_TIME_FILTER } from '@/lib/jobs-time-filter' @@ -34,59 +35,6 @@ const KIND_OPTIONS: Array<{ value: ClaudeJobKind; label: string }> = [ const KIND_VALUES = new Set(KIND_OPTIONS.map((o) => o.value)) -function MultiFilterPills({ - label, - options, - selected, - onToggle, - onClear, -}: { - label: string - options: Array<{ value: T; label: string }> - selected: Set - onToggle: (v: T) => void - onClear: () => void -}) { - const allActive = selected.size === 0 - return ( -
-

{label}

-
- - {options.map((opt) => { - const active = selected.has(opt.value) - return ( - - ) - })} -
-
- ) -} - interface JobsColumnProps { title: string jobs: JobWithRelations[] diff --git a/components/shared/backlog-filter-popover.tsx b/components/shared/backlog-filter-popover.tsx index 07af358..8658a16 100644 --- a/components/shared/backlog-filter-popover.tsx +++ b/components/shared/backlog-filter-popover.tsx @@ -58,6 +58,59 @@ export function FilterPills({ ) } +export function MultiFilterPills({ + label, + options, + selected, + onToggle, + onClear, +}: { + label: string + options: Array<{ value: T; label: string }> + selected: Set + onToggle: (v: T) => void + onClear: () => void +}) { + const allActive = selected.size === 0 + return ( +
+

{label}

+
+ + {options.map((opt) => { + const active = selected.has(opt.value) + return ( + + ) + })} +
+
+ ) +} + interface BacklogFilterPopoverProps { open: boolean onOpenChange: (open: boolean) => void