@burdenoff/microfe-support 2026.830.2 → 2026.902.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/generated/global-operations.d.ts +85 -0
- package/dist/generated/global-operations.js +154 -127
- package/dist/generated/global-operations.js.map +1 -1
- package/dist/generated/global-types.d.ts +51 -0
- package/dist/generated/global-types.js +1 -1
- package/dist/generated/global-types.js.map +1 -1
- package/dist/support/components/careers/BulkCandidateDialogs.d.ts +2 -0
- package/dist/support/components/careers/BulkCandidateDialogs.js +486 -222
- package/dist/support/components/careers/BulkCandidateDialogs.js.map +1 -1
- package/dist/support/components/careers/BulkOperationFeedback.d.ts +7 -1
- package/dist/support/components/careers/BulkOperationFeedback.js +80 -1
- package/dist/support/components/careers/BulkOperationFeedback.js.map +1 -1
- package/dist/support/constants/pipeline.js +3 -0
- package/dist/support/constants/pipeline.js.map +1 -1
- package/dist/support/pages/JobApplicationsPage.js +543 -509
- package/dist/support/pages/JobApplicationsPage.js.map +1 -1
- package/dist/support/utils/bulkCandidateOperations.d.ts +30 -0
- package/dist/support/utils/bulkCandidateOperations.js +34 -4
- package/dist/support/utils/bulkCandidateOperations.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JobApplicationsPage.js","names":[],"sources":["../../../src/support/pages/JobApplicationsPage.tsx"],"sourcesContent":["import { useState, useEffect, useRef, useCallback, useMemo } from 'react';\nimport { useNavigate, useLocation, useSearchParams } from 'react-router';\nimport {\n Briefcase,\n Search,\n Filter,\n Loader2,\n AlertCircle,\n ChevronDown,\n Paperclip,\n Grid,\n List,\n Plus,\n UserPlus,\n Send,\n Shuffle,\n Mail,\n X,\n} from 'lucide-react';\nimport { IllustratedEmptyState, PagePurpose } from '@burdenoff/fe-libs/ui';\nimport { graphqlFetch } from '@burdenoff/fe-libs/shared/graphql/fetch';\nimport {\n useGetBulkCandidateTargetsLazyQuery,\n useGetInterviewersQuery,\n useGetJobApplicationsQuery,\n useGetJobPostingQuery,\n useGetJobPostingsQuery,\n useCreateJobApplicationMutation,\n type GetBulkCandidateTargetsQuery,\n type GetJobApplicationsQuery,\n type GetJobPostingQuery,\n type GetJobPostingsQuery,\n} from '../../generated/global-operations';\nimport {\n ConfiguredRoundState,\n JobApplicationStatus,\n JobPostingStatus,\n InterviewRoundStatus,\n} from '../../generated/global-types';\nimport type { Interviewer, JobApplicationFilterInput } from '../../generated/global-types';\nimport { nativeNotify } from '../../utils/nativeBridge';\nimport {\n statusOrder,\n statusColors,\n statusLabels,\n roundStatusOrder,\n roundStatusConfig,\n} from '../constants/pipeline';\nimport {\n Button,\n Input,\n Checkbox,\n Badge,\n Label,\n Textarea,\n Dialog,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from '../components/ui';\nimport {\n AddSelectedToRoundDialog,\n BulkCandidateSendDialog,\n NotifyDuplicateApplicantsDialog,\n type BulkCandidateDialogMode,\n} from '../components/careers/BulkCandidateDialogs';\nimport { BulkSelectionSummary } from '../components/careers/BulkSelectionSummary';\nimport { requireBulkCandidateTargetPage } from '../utils/bulkCandidateTargetQuery';\nimport {\n applyJobApplicationFilters,\n buildSupportContextKey,\n clearJobApplicationFilters,\n countActiveJobApplicationFilters,\n hasActiveJobApplicationFilters,\n isSupportContextHydration,\n mergeSearchParams,\n normalizeJobApplicationFilterText,\n parseJobApplicationFilters,\n parseJobApplicationViewMode,\n JOB_APPLICATION_FILTERS_OPEN_PARAM_KEY,\n JOB_APPLICATION_VIEW_PARAM_KEY,\n type JobApplicationFilterState,\n} from '../utils/jobApplicationFilterParams';\nimport { useDebouncedUrlText } from '../hooks/useDebouncedUrlText';\nimport { useSupport } from '../providers/SupportProvider';\nimport {\n CandidateMaterializationError,\n createEmptyCandidateSelection,\n getCandidateSelectionCount,\n getSelectedCandidateIds,\n materializeCandidateTargets,\n selectAllMaterializedCandidates,\n setVisibleCandidateSelection,\n toggleCandidateSelection,\n type BulkCandidateTarget,\n type CandidateSelectionState,\n} from '../utils/bulkCandidateOperations';\n\ntype JobApplication = GetJobApplicationsQuery['jobApplications']['items'][number];\ntype BulkTargetQueryItem = GetBulkCandidateTargetsQuery['jobApplications']['items'][number];\ntype JobPosting = GetJobPostingsQuery['jobPostings']['items'][number];\ntype PostingRoundConfig = NonNullable<GetJobPostingQuery['jobPosting']>['rounds'][number];\ntype ViewMode = 'list' | 'kanban';\n\nconst APPLICATION_PAGE_SIZE = 50;\n\nfunction toBulkCandidateTarget(\n application: JobApplication | BulkTargetQueryItem\n): BulkCandidateTarget {\n return {\n id: application.id,\n jobPostingId: application.jobPostingId ?? null,\n interviewRounds: application.interviewRounds.map((round) => ({\n id: round.id,\n roundConfigId: round.roundConfigId ?? null,\n name: round.name,\n roundType: round.roundType,\n emailLogs: round.emailLogs.map((log) => ({ emailType: log.emailType })),\n })),\n };\n}\n\nfunction freezeJobApplicationFilter(filter: JobApplicationFilterInput): JobApplicationFilterInput {\n return {\n ...filter,\n ...(filter.ids ? { ids: [...filter.ids] } : {}),\n ...(filter.statuses ? { statuses: [...filter.statuses] } : {}),\n ...(filter.roundStatuses ? { roundStatuses: [...filter.roundStatuses] } : {}),\n };\n}\n\n/** One entry in a filter dropdown, decoupled from the shape its query returns. */\ninterface FilterSelectOption {\n id: string;\n label: string;\n}\n\nfunction toggleInList<T>(values: readonly T[], value: T): T[] {\n return values.includes(value)\n ? values.filter((candidate) => candidate !== value)\n : [...values, value];\n}\n\nfunction formatDate(dateString: string): string {\n return new Date(dateString).toLocaleDateString('en-US', {\n month: 'short',\n day: 'numeric',\n year: 'numeric',\n hour: '2-digit',\n minute: '2-digit',\n });\n}\n\nfunction timeAgo(dateString: string): string {\n const diff = Date.now() - new Date(dateString).getTime();\n const minutes = Math.floor(diff / 60000);\n if (minutes < 2) return 'just now';\n if (minutes < 60) return `${minutes}m ago`;\n const hours = Math.floor(minutes / 60);\n if (hours < 24) return `${hours}h ago`;\n const days = Math.floor(hours / 24);\n if (days < 30) return `${days}d ago`;\n return formatDate(dateString);\n}\n\nconst POSTING_NONE = '__none__' as const;\n\nconst SOURCE_SUGGESTIONS = ['LinkedIn', 'Referral', 'Indeed', 'Email', 'Walk-in', 'Other'];\n\nconst RESUME_MAX_BYTES = 10 * 1024 * 1024;\nconst RESUME_ACCEPT = '.pdf,.doc,.docx';\nconst RESUME_MIME_TYPES = new Set([\n 'application/pdf',\n 'application/msword',\n 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',\n]);\n\ntype CandidateFormData = {\n name: string;\n email: string;\n phone: string;\n jobPostingId: string;\n position: string;\n source: string;\n linkedin: string;\n portfolio: string;\n coverLetter: string;\n};\n\nconst emptyCandidateForm: CandidateFormData = {\n name: '',\n email: '',\n phone: '',\n jobPostingId: POSTING_NONE,\n position: '',\n source: '',\n linkedin: '',\n portfolio: '',\n coverLetter: '',\n};\n\nfunction readFileAsBase64(file: File): Promise<string> {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.onload = () => {\n const result = reader.result;\n if (typeof result !== 'string') {\n reject(new Error('Failed to read file'));\n return;\n }\n // Strip the `data:<mime>;base64,` prefix — the backend wants raw base64.\n const commaIndex = result.indexOf(',');\n resolve(commaIndex >= 0 ? result.slice(commaIndex + 1) : result);\n };\n reader.onerror = () => reject(reader.error ?? new Error('Failed to read file'));\n reader.readAsDataURL(file);\n });\n}\n\nexport function JobApplicationsPage() {\n const navigate = useNavigate();\n const location = useLocation();\n const { organizationId, workspaceId, productId: contextProductId } = useSupport();\n\n // BOFF-7068: filters live in the query string, not in component state.\n // Opening a submission unmounts this list, so anything held in `useState`\n // would be gone by the time the reviewer comes back — and they come back once\n // per candidate. The row link and the detail page's back button both forward\n // `location.search` untouched, so the URL carries the filters across for free\n // (and survives a refresh, and can be shared as a link).\n const [searchParams, setSearchParams] = useSearchParams();\n const searchParamsKey = searchParams.toString();\n const filters = useMemo(\n () => parseJobApplicationFilters(new URLSearchParams(searchParamsKey)),\n [searchParamsKey]\n );\n\n // The address bar is the source of truth for a write, not React Router's\n // snapshot of it — see `mergeSearchParams`. Writes are `replace` so that\n // adjusting filters never buries the previous page under history entries.\n const updateSearchParams = useCallback(\n (update: (params: URLSearchParams) => URLSearchParams) => {\n setSearchParams(\n (current) =>\n update(\n mergeSearchParams(current, typeof window === 'undefined' ? '' : window.location.search)\n ),\n { replace: true }\n );\n },\n [setSearchParams]\n );\n\n const commitFilters = useCallback(\n (patch: Partial<JobApplicationFilterState>) => {\n updateSearchParams((params) =>\n applyJobApplicationFilters(params, { ...parseJobApplicationFilters(params), ...patch })\n );\n },\n [updateSearchParams]\n );\n\n const commitParam = useCallback(\n (key: string, value: string | null) => {\n updateSearchParams((params) => {\n const next = new URLSearchParams(params);\n if (value === null) next.delete(key);\n else next.set(key, value);\n return next;\n });\n },\n [updateSearchParams]\n );\n\n // Derived filter values — same names the JSX below already used, so every\n // control keeps reading one value and writing through `commitFilters`.\n const debouncedSearch = filters.search;\n const statusFilters = useMemo(() => new Set(filters.statuses), [filters.statuses]);\n const roundStatusFilters = useMemo(() => new Set(filters.roundStatuses), [filters.roundStatuses]);\n const productFilter = filters.productId;\n const jobPostingFilter = filters.jobPostingId;\n const roundConfigFilter = filters.roundConfigId;\n const configuredRoundStateFilter = filters.configuredRoundState;\n const duplicateEmailFilter = filters.duplicateEmail;\n const debouncedAssignmentOwnerFilter = filters.assignmentOwnerEmail;\n const interviewerFilter = filters.interviewerId;\n\n // Both return the canonical value they wrote, so the debounced inputs can\n // reconcile when normalization changes what was typed — see\n // `useDebouncedUrlText`.\n const commitSearch = useCallback(\n (value: string) => {\n commitFilters({ search: value });\n return normalizeJobApplicationFilterText(value);\n },\n [commitFilters]\n );\n const commitAssignmentOwner = useCallback(\n (value: string) => {\n commitFilters({ assignmentOwnerEmail: value });\n return normalizeJobApplicationFilterText(value);\n },\n [commitFilters]\n );\n // Typing stays local until the user pauses, so the URL is not rewritten on\n // every keystroke.\n const [search, setSearch, resetSearchDraft] = useDebouncedUrlText(debouncedSearch, commitSearch);\n const [assignmentOwnerFilter, setAssignmentOwnerFilter, resetAssignmentOwnerDraft] =\n useDebouncedUrlText(debouncedAssignmentOwnerFilter, commitAssignmentOwner);\n\n const clearAllFilters = useCallback(() => {\n // Drop any keystroke still inside its debounce window first. Clearing an\n // already-empty search box does not change the URL value, so the hook would\n // never notice the reset on its own and the pending write would land in the\n // URL just after the user asked for a clean slate.\n resetSearchDraft();\n resetAssignmentOwnerDraft();\n updateSearchParams(clearJobApplicationFilters);\n }, [resetSearchDraft, resetAssignmentOwnerDraft, updateSearchParams]);\n\n // Links out of this page carry the whole query string — filters included — so\n // the detail page's \"Back to Applications\" returns to the same filtered list.\n //\n // Read through `mergeSearchParams`: the shell writes the active\n // org/workspace/project with a bare `replaceState` the router never sees, and\n // a link built from the router snapshot alone could drop them.\n //\n // The two text drafts are folded in on top, because a reviewer can type and\n // open a candidate inside the 300 ms debounce window — the row they are\n // aiming at is still on screen from the previous result set. Navigating\n // unmounts `useDebouncedUrlText` and its cleanup cancels the pending write,\n // so a draft that never reached the URL would be lost for good and \"Back to\n // Applications\" would restore a filter the reviewer had already moved past.\n const mergedQueryString = applyJobApplicationFilters(\n mergeSearchParams(\n new URLSearchParams(location.search),\n typeof window === 'undefined' ? '' : window.location.search\n ),\n { ...filters, search, assignmentOwnerEmail: assignmentOwnerFilter }\n ).toString();\n const queryParams = mergedQueryString ? `?${mergedQueryString}` : '';\n\n const activeFilterCount = countActiveJobApplicationFilters(filters);\n const filtersApplied = hasActiveJobApplicationFilters(filters);\n const viewMode: ViewMode = parseJobApplicationViewMode(\n searchParams.get(JOB_APPLICATION_VIEW_PARAM_KEY)\n );\n const setViewMode = (mode: ViewMode) =>\n commitParam(JOB_APPLICATION_VIEW_PARAM_KEY, mode === 'list' ? null : mode);\n\n // The panel opens by default whenever filters are applied, so a reviewer\n // returning to a narrowed list can see why it is narrowed. An explicit toggle\n // is remembered only while it disagrees with that default, which keeps the\n // param out of the URL in the common case.\n const filtersOpenParam = searchParams.get(JOB_APPLICATION_FILTERS_OPEN_PARAM_KEY);\n const filtersOpenByDefault = activeFilterCount > 0;\n const showFilters = filtersOpenParam === null ? filtersOpenByDefault : filtersOpenParam === '1';\n const toggleFilters = () => {\n const nextOpen = !showFilters;\n commitParam(\n JOB_APPLICATION_FILTERS_OPEN_PARAM_KEY,\n nextOpen === filtersOpenByDefault ? null : nextOpen ? '1' : '0'\n );\n };\n\n const [selection, setSelection] = useState<CandidateSelectionState>(\n createEmptyCandidateSelection\n );\n const [allTargets, setAllTargets] = useState<BulkCandidateTarget[]>([]);\n const [selectionLoading, setSelectionLoading] = useState(false);\n const [selectionError, setSelectionError] = useState<string | null>(null);\n const [bulkMode, setBulkMode] = useState<\n BulkCandidateDialogMode | 'addRound' | 'duplicateNotice' | null\n >(null);\n const [bulkPreviewTargets, setBulkPreviewTargets] = useState<BulkCandidateTarget[]>([]);\n const [bulkPreviewSelection, setBulkPreviewSelection] = useState<CandidateSelectionState>(\n createEmptyCandidateSelection\n );\n const [bulkPreviewLoading, setBulkPreviewLoading] = useState(false);\n const [bulkPreviewError, setBulkPreviewError] = useState<string | null>(null);\n const [addDialogOpen, setAddDialogOpen] = useState(false);\n const [candidateForm, setCandidateForm] = useState<CandidateFormData>(emptyCandidateForm);\n const [candidateErrors, setCandidateErrors] = useState<Record<string, string>>({});\n const [resumeFile, setResumeFile] = useState<File | null>(null);\n const [resumeFileError, setResumeFileError] = useState('');\n const [submittingCandidate, setSubmittingCandidate] = useState(false);\n const [loadingMore, setLoadingMore] = useState(false);\n const [productNames, setProductNames] = useState<Record<string, string>>({});\n const nextOffsetRef = useRef(APPLICATION_PAGE_SIZE);\n // Mirror the latest map into a ref so the resolver effect can read it\n // without re-running every time we cache a freshly-resolved name.\n const productNamesRef = useRef(productNames);\n productNamesRef.current = productNames;\n\n // Switching organization / workspace / product invalidates posting, product\n // and interviewer ids, and a URL-persisted filter would otherwise outlive the\n // context it belongs to — including across a refresh. Same reset the ticket\n // filters get in `supportStore.resetForContextChange`.\n const supportContextKey = buildSupportContextKey(organizationId, workspaceId, contextProductId);\n const supportContextKeyRef = useRef(supportContextKey);\n useEffect(() => {\n const previousKey = supportContextKeyRef.current;\n supportContextKeyRef.current = supportContextKey;\n if (previousKey === supportContextKey) return;\n // Same hydration allowance as JobApplicationFilterContextGuard.\n if (isSupportContextHydration(previousKey, supportContextKey)) return;\n clearAllFilters();\n }, [supportContextKey, clearAllFilters]);\n\n const searchPending = search !== debouncedSearch;\n const filter: JobApplicationFilterInput = {\n ...(debouncedSearch ? { search: debouncedSearch } : {}),\n ...(statusFilters.size > 0 ? { statuses: Array.from(statusFilters) } : {}),\n ...(roundStatusFilters.size > 0 ? { roundStatuses: Array.from(roundStatusFilters) } : {}),\n ...(productFilter ? { productId: productFilter } : {}),\n ...(jobPostingFilter ? { jobPostingId: jobPostingFilter } : {}),\n ...(roundConfigFilter ? { roundConfigId: roundConfigFilter } : {}),\n ...(configuredRoundStateFilter ? { configuredRoundState: configuredRoundStateFilter } : {}),\n ...(duplicateEmailFilter && jobPostingFilter ? { duplicateEmail: true } : {}),\n ...(debouncedAssignmentOwnerFilter\n ? { assignmentOwnerEmail: debouncedAssignmentOwnerFilter }\n : {}),\n ...(interviewerFilter ? { interviewerId: interviewerFilter } : {}),\n };\n const queryScopeKey = JSON.stringify({\n searchInput: search,\n search: debouncedSearch,\n statuses: Array.from(statusFilters).sort(),\n roundStatuses: Array.from(roundStatusFilters).sort(),\n productId: productFilter,\n jobPostingId: jobPostingFilter,\n roundConfigId: roundConfigFilter,\n configuredRoundState: configuredRoundStateFilter,\n duplicateEmail: duplicateEmailFilter && !!jobPostingFilter,\n assignmentOwnerEmail: debouncedAssignmentOwnerFilter,\n interviewerId: interviewerFilter,\n });\n const scopeIdentityRef = useRef({ key: queryScopeKey, generation: 0 });\n if (scopeIdentityRef.current.key !== queryScopeKey) {\n scopeIdentityRef.current = {\n key: queryScopeKey,\n generation: scopeIdentityRef.current.generation + 1,\n };\n }\n const queryScopeToken = `${scopeIdentityRef.current.generation}:${queryScopeKey}`;\n const queryScopeTokenRef = useRef(queryScopeToken);\n queryScopeTokenRef.current = queryScopeToken;\n\n useEffect(() => {\n setSelection(createEmptyCandidateSelection());\n setAllTargets([]);\n setSelectionLoading(false);\n setSelectionError(null);\n setBulkMode(null);\n setBulkPreviewTargets([]);\n setBulkPreviewSelection(createEmptyCandidateSelection());\n setBulkPreviewLoading(false);\n setBulkPreviewError(null);\n setLoadingMore(false);\n nextOffsetRef.current = APPLICATION_PAGE_SIZE;\n }, [queryScopeToken]);\n\n const { data, loading, error, fetchMore } = useGetJobApplicationsQuery({\n variables: { filter, limit: APPLICATION_PAGE_SIZE, offset: 0 },\n fetchPolicy: 'cache-and-network',\n });\n const [getBulkCandidateTargets] = useGetBulkCandidateTargetsLazyQuery({\n fetchPolicy: 'network-only',\n errorPolicy: 'none',\n });\n\n const { data: postingsData, loading: postingsLoading } = useGetJobPostingsQuery({\n variables: { limit: 200, offset: 0 },\n fetchPolicy: 'cache-and-network',\n });\n const { data: selectedPostingData, loading: selectedPostingLoading } = useGetJobPostingQuery({\n variables: { id: jobPostingFilter },\n skip: !jobPostingFilter,\n fetchPolicy: 'cache-and-network',\n });\n const { data: interviewersData, loading: interviewersLoading } = useGetInterviewersQuery({\n variables: { limit: 200 },\n });\n\n const [createJobApplication] = useCreateJobApplicationMutation();\n\n const openPostings = (postingsData?.jobPostings?.items ?? []).filter(\n (posting: JobPosting) => posting.status === JobPostingStatus.Open\n );\n\n const rawApplications = data?.jobApplications?.items ?? [];\n const applicationsById = new Map<string, JobApplication>();\n for (const application of rawApplications) applicationsById.set(application.id, application);\n const applications = Array.from(applicationsById.values());\n const total = data?.jobApplications?.total ?? 0;\n const hasMore = data?.jobApplications?.hasMore ?? false;\n const visibleApplicationIds = applications.map((application) => application.id);\n const selectedIds = getSelectedCandidateIds(selection);\n const selectionCount = getCandidateSelectionCount(selection);\n const availableSelectionTargets =\n selection.mode === 'all' ? allTargets : applications.map(toBulkCandidateTarget);\n const selectedAvailableTargets = availableSelectionTargets.filter((target) =>\n selectedIds.has(target.id)\n );\n const selectionDataComplete = selectedAvailableTargets.length === selectionCount;\n const selectionPostingScoped =\n !!jobPostingFilter &&\n selectionDataComplete &&\n selectedAvailableTargets.every((target) => target.jobPostingId === jobPostingFilter);\n const selectedVisibleCount = visibleApplicationIds.filter((id) => selectedIds.has(id)).length;\n const allVisibleSelected =\n visibleApplicationIds.length > 0 && selectedVisibleCount === visibleApplicationIds.length;\n const canOpenBulkDialog =\n selectionPostingScoped &&\n selectionCount > 0 &&\n !searchPending &&\n !selectionLoading &&\n !bulkPreviewLoading;\n\n const postingsMap = (postingsData?.jobPostings?.items ?? []).reduce<Record<string, JobPosting>>(\n (map: Record<string, JobPosting>, posting: JobPosting) => {\n map[posting.id] = posting;\n return map;\n },\n {}\n );\n\n const materializeCurrentScope = async (\n requestedScope: string\n ): Promise<BulkCandidateTarget[]> => {\n const frozenFilter = freezeJobApplicationFilter(filter);\n const expectedTotal = total;\n\n return materializeCandidateTargets({\n scopeKey: requestedScope,\n expectedTotal,\n getCurrentScopeKey: () => queryScopeTokenRef.current,\n fetchPage: async (limit, offset) => {\n const response = await getBulkCandidateTargets({\n variables: { filter: frozenFilter, limit, offset },\n });\n const page = requireBulkCandidateTargetPage(response);\n return {\n items: page.items.map(toBulkCandidateTarget),\n total: page.total,\n hasMore: page.hasMore,\n };\n },\n });\n };\n\n const selectAllMatching = async () => {\n if (selectionLoading || searchPending || total === 0) return;\n const requestedScope = queryScopeToken;\n setSelectionLoading(true);\n setSelectionError(null);\n try {\n const targets = await materializeCurrentScope(requestedScope);\n if (queryScopeTokenRef.current !== requestedScope) return;\n setAllTargets(targets);\n setSelection(selectAllMaterializedCandidates(targets.map((target) => target.id)));\n } catch (selectionFailure) {\n if (\n selectionFailure instanceof CandidateMaterializationError &&\n selectionFailure.code === 'STALE_SCOPE'\n ) {\n return;\n }\n if (queryScopeTokenRef.current !== requestedScope) return;\n setSelectionError(\n selectionFailure instanceof Error\n ? selectionFailure.message\n : 'Could not load all matching applications.'\n );\n nativeNotify('error');\n } finally {\n if (queryScopeTokenRef.current === requestedScope) setSelectionLoading(false);\n }\n };\n\n const toggleStatusFilter = (status: JobApplicationStatus) => {\n commitFilters({ statuses: toggleInList(filters.statuses, status) });\n };\n\n const toggleRoundStatusFilter = (status: InterviewRoundStatus) => {\n commitFilters({ roundStatuses: toggleInList(filters.roundStatuses, status) });\n };\n\n // Changing the posting invalidates everything scoped to the previous one.\n const changeJobPostingFilter = (postingId: string) => {\n commitFilters({\n jobPostingId: postingId,\n roundConfigId: '',\n configuredRoundState: '',\n duplicateEmail: false,\n });\n };\n\n // Picking a different configured round drops the assignment state chosen for\n // the old one; \"missing this round\" then clears the round-stage chips, which\n // `parseJobApplicationFilters` normalizes for us.\n const changeRoundConfigFilter = (roundConfigId: string) => {\n commitFilters({ roundConfigId, configuredRoundState: '' });\n };\n\n const changeConfiguredRoundStateFilter = (state: ConfiguredRoundState | '') => {\n commitFilters({ configuredRoundState: state });\n };\n\n const openBulkAction = (mode: BulkCandidateDialogMode | 'addRound' | 'duplicateNotice') => {\n if (!canOpenBulkDialog || !jobPostingFilter) return;\n\n // Explicit selections are snapshots of the loaded application rows, while\n // all-matching selections were fully materialized when selected. Re-querying\n // the same IDs here only adds a failure point; each mutation performs the\n // authoritative posting, round, and deduplication checks server-side.\n setBulkMode(mode);\n setBulkPreviewTargets(selectedAvailableTargets);\n setBulkPreviewSelection(selection);\n setBulkPreviewError(null);\n setBulkPreviewLoading(false);\n };\n\n const closeBulkAction = () => {\n setBulkMode(null);\n setBulkPreviewTargets([]);\n setBulkPreviewSelection(createEmptyCandidateSelection());\n setBulkPreviewError(null);\n setBulkPreviewLoading(false);\n };\n\n // Resolve human-readable product names for the badges/filter (same one-shot\n // federated lookup the inquiries list uses).\n // The configured-round picker needs the same treatment for a different\n // reason. The posting's `rounds` IS the complete set for the selected\n // posting, so an id missing from it is not a paging artefact — the round was\n // deleted, or the URL pairs it with a posting it does not belong to. Either\n // way `normalizeJobApplicationFilters` keeps it (it only drops the round when\n // there is no posting at all), so it still reaches GraphQL while the select\n // reads \"Any configured round\".\n //\n // Preserved rather than dropped: silently rewriting the URL from query\n // results would add a second data-driven write to a page that deliberately\n // writes only from handlers and one guarded effect, and would risk the loop\n // this design avoids. Showing the id keeps the panel honest about what is\n // narrowing the list, which is what makes an empty result set legible.\n const roundConfigOptions = useMemo<FilterSelectOption[]>(() => {\n const items: FilterSelectOption[] = (selectedPostingData?.jobPosting?.rounds ?? []).map(\n (round: PostingRoundConfig) => ({\n id: round.id,\n label: `Round ${round.roundNumber} — ${round.name}`,\n })\n );\n if (!roundConfigFilter || items.some((option) => option.id === roundConfigFilter)) return items;\n return [...items, { id: roundConfigFilter, label: roundConfigFilter }];\n }, [selectedPostingData, roundConfigFilter]);\n\n // A posting or interviewer restored from the URL has to appear in its own\n // picker even when the independently-fetched option list does not contain it —\n // both lists are capped at 200 and are empty while in flight, and a controlled\n // select with no matching option renders as \"All postings\" / \"Any\n // interviewer\" while the GraphQL filter is still scoped to that id. The label\n // falls back to the raw id, the same fallback the product picker already uses.\n const postingOptions = useMemo<FilterSelectOption[]>(() => {\n const items: FilterSelectOption[] = (postingsData?.jobPostings?.items ?? []).map(\n (posting: JobPosting) => ({ id: posting.id, label: posting.title })\n );\n if (!jobPostingFilter || items.some((option) => option.id === jobPostingFilter)) return items;\n return [...items, { id: jobPostingFilter, label: jobPostingFilter }];\n }, [postingsData, jobPostingFilter]);\n\n // Reads `interviewersData` rather than the `interviewers` array above: that\n // array is rebuilt every render, so depending on it would defeat the memo.\n const interviewerOptions = useMemo<FilterSelectOption[]>(() => {\n const items: FilterSelectOption[] = (interviewersData?.interviewers?.items ?? []).map(\n (interviewer: Interviewer) => ({ id: interviewer.id, label: interviewer.name })\n );\n if (!interviewerFilter || items.some((option) => option.id === interviewerFilter)) return items;\n return [...items, { id: interviewerFilter, label: interviewerFilter }];\n }, [interviewersData, interviewerFilter]);\n\n // The product restored from the URL has to be an option in its own picker\n // even when it is not represented in the current result set — a filter that\n // narrows to zero applications would otherwise leave the controlled select\n // falling back to \"All products\" while the query is still scoped to it.\n const productIds = Array.from(\n new Set([\n ...applications.flatMap((a: JobApplication): string[] => (a.productId ? [a.productId] : [])),\n ...(productFilter ? [productFilter] : []),\n ])\n ).sort() as string[];\n const productIdsKey = productIds.join(',');\n useEffect(() => {\n const unknownIds = productIdsKey\n ? productIdsKey.split(',').filter((pid) => !productNamesRef.current[pid])\n : [];\n if (unknownIds.length === 0) return;\n unknownIds.forEach((pid) => {\n graphqlFetch<{ platformProduct?: { name?: string } }>({\n gateway: 'global',\n query: 'query($id: ID!) { platformProduct(id: $id) { name } }',\n variables: { id: pid },\n })\n .then((result) => {\n const name = result.data?.platformProduct?.name;\n if (name) setProductNames((prev) => ({ ...prev, [pid]: name }));\n })\n .catch(() => {});\n });\n }, [productIdsKey]);\n\n const loadMore = async () => {\n if (!hasMore || loadingMore) return;\n const requestedOffset = nextOffsetRef.current;\n const requestedScope = queryScopeToken;\n setLoadingMore(true);\n try {\n const result = await fetchMore({\n variables: { offset: requestedOffset },\n updateQuery: (previous, { fetchMoreResult }) => {\n if (!fetchMoreResult) return previous;\n const merged = new Map<string, JobApplication>();\n for (const application of previous.jobApplications?.items ?? []) {\n merged.set(application.id, application);\n }\n for (const application of fetchMoreResult.jobApplications?.items ?? []) {\n merged.set(application.id, application);\n }\n return {\n jobApplications: {\n ...fetchMoreResult.jobApplications,\n items: Array.from(merged.values()),\n },\n };\n },\n });\n if (queryScopeTokenRef.current === requestedScope) {\n nextOffsetRef.current =\n requestedOffset + (result.data.jobApplications?.items.length ?? APPLICATION_PAGE_SIZE);\n }\n } catch (loadError) {\n console.error('Failed to load more applications:', loadError);\n nativeNotify('error');\n } finally {\n if (queryScopeTokenRef.current === requestedScope) setLoadingMore(false);\n }\n };\n\n const resetCandidateDialog = () => {\n setCandidateForm(emptyCandidateForm);\n setCandidateErrors({});\n setResumeFile(null);\n setResumeFileError('');\n };\n\n const handleResumeFileChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n const file = e.target.files?.[0] ?? null;\n setResumeFileError('');\n if (!file) {\n setResumeFile(null);\n return;\n }\n if (file.size > RESUME_MAX_BYTES) {\n setResumeFileError('Resume must be 10 MB or smaller.');\n setResumeFile(null);\n e.target.value = '';\n return;\n }\n const extension = file.name.toLowerCase().split('.').pop() ?? '';\n if (!RESUME_MIME_TYPES.has(file.type) && !['pdf', 'doc', 'docx'].includes(extension)) {\n setResumeFileError('Resume must be a PDF, DOC, or DOCX file.');\n setResumeFile(null);\n e.target.value = '';\n return;\n }\n setResumeFile(file);\n };\n\n const validateCandidateForm = (): boolean => {\n const errors: Record<string, string> = {};\n if (!candidateForm.name.trim()) errors.name = 'Name is required';\n if (!candidateForm.email.trim()) errors.email = 'Email is required';\n else if (!/^\\S+@\\S+\\.\\S+$/.test(candidateForm.email.trim()))\n errors.email = 'Enter a valid email';\n if (!candidateForm.source.trim()) errors.source = 'Source is required';\n if (candidateForm.jobPostingId === POSTING_NONE && !candidateForm.position.trim()) {\n errors.position = 'Position is required when no job posting is selected';\n }\n setCandidateErrors(errors);\n return Object.keys(errors).length === 0;\n };\n\n const handleCreateCandidate = async (e: React.FormEvent) => {\n e.preventDefault();\n if (!validateCandidateForm()) return;\n setSubmittingCandidate(true);\n try {\n let resumeFileName: string | undefined;\n let resumeBase64: string | undefined;\n let resumeMimeType: string | undefined;\n if (resumeFile) {\n resumeBase64 = await readFileAsBase64(resumeFile);\n resumeFileName = resumeFile.name;\n resumeMimeType = resumeFile.type || undefined;\n }\n const hasPosting = candidateForm.jobPostingId !== POSTING_NONE;\n const result = await createJobApplication({\n variables: {\n input: {\n name: candidateForm.name.trim(),\n email: candidateForm.email.trim(),\n phone: candidateForm.phone.trim() || undefined,\n jobPostingId: hasPosting ? candidateForm.jobPostingId : undefined,\n // Backend derives position/department from the posting; free-text\n // position is only a fallback when no posting is selected.\n position: !hasPosting ? candidateForm.position.trim() || undefined : undefined,\n source: candidateForm.source.trim(),\n linkedin: candidateForm.linkedin.trim() || undefined,\n portfolio: candidateForm.portfolio.trim() || undefined,\n coverLetter: candidateForm.coverLetter.trim() || undefined,\n resumeFileName,\n resumeBase64,\n resumeMimeType,\n },\n },\n refetchQueries: ['GetJobApplications'],\n });\n const newId = result.data?.createJobApplication?.id;\n nativeNotify('success');\n setAddDialogOpen(false);\n resetCandidateDialog();\n if (newId) navigate(`/support/applications/${newId}${queryParams}`);\n } catch (err) {\n console.error('Failed to create candidate:', err);\n nativeNotify('error');\n } finally {\n setSubmittingCandidate(false);\n }\n };\n\n const groupedApplications = statusOrder.reduce<Record<JobApplicationStatus, JobApplication[]>>(\n (groups: Record<JobApplicationStatus, JobApplication[]>, status: JobApplicationStatus) => {\n groups[status] = applications.filter((a: JobApplication) => a.status === status);\n return groups;\n },\n {} as Record<JobApplicationStatus, JobApplication[]>\n );\n\n const renderApplicationCard = (application: JobApplication, compact = false) => {\n const postingTitle = application.jobPostingId\n ? postingsMap[application.jobPostingId]?.title\n : undefined;\n const selected = selectedIds.has(application.id);\n\n return (\n <div\n key={application.id}\n className={`w-full bg-bg-surface border rounded-lg shadow-[var(--shadow-pop)] hover:border-border-strong hover:shadow-[var(--shadow-pop-hover)] transition-[box-shadow,border-color] duration-200 group flex items-start gap-2 ${compact ? 'p-3' : 'p-4'} ${selected ? 'border-primary' : 'border-border-seam'}`}\n >\n <div className=\"pt-0.5\">\n <Checkbox\n checked={selected}\n disabled={selectionLoading || searchPending}\n onCheckedChange={() =>\n setSelection((previous) => toggleCandidateSelection(previous, application.id))\n }\n aria-label={`Select ${application.firstName} ${application.lastName}`}\n />\n </div>\n <button\n type=\"button\"\n onClick={() => navigate(`/support/applications/${application.id}${queryParams}`)}\n className=\"flex-1 min-w-0 text-left\"\n >\n <div className={`flex ${compact ? 'flex-col' : 'items-start'} justify-between gap-3`}>\n <div className=\"flex-1 min-w-0\">\n <div\n className={`flex items-center gap-2 mb-1 ${compact ? 'flex-wrap' : 'flex-wrap'}`}\n >\n <h3\n className={`font-semibold text-text-primary truncate group-hover:text-primary transition-colors ${compact ? 'text-sm' : 'text-sm'}`}\n >\n {application.firstName} {application.lastName}\n </h3>\n <Badge\n variant=\"secondary\"\n className={`${statusColors[application.status] || statusColors.NEW} ${application.status === 'NEW' ? 'motion-safe:animate-vc-glow-pulse' : ''}`}\n >\n {statusLabels[application.status] || application.status}\n </Badge>\n {postingTitle && (\n <Badge variant=\"outline\" title={`Job posting: ${postingTitle}`}>\n {postingTitle}\n </Badge>\n )}\n {application.productId && productNames[application.productId] && (\n <Badge\n variant=\"secondary\"\n className=\"bg-accent-purple-subtle text-accent-purple\"\n title={`Product: ${productNames[application.productId]}`}\n >\n {productNames[application.productId]}\n </Badge>\n )}\n {application.resumeFileName && (\n <Badge\n variant=\"secondary\"\n className=\"bg-accent-blue-subtle text-accent-blue gap-1\"\n >\n <Paperclip size={compact ? 10 : 11} />\n Resume\n </Badge>\n )}\n </div>\n <p className={`text-text-secondary mb-1 ${compact ? 'text-xs' : 'text-sm'}`}>\n <span className=\"font-medium\">{application.position}</span>\n {application.department && (\n <>\n <span className=\"mx-1.5 text-text-secondary/50\">·</span>\n <span>{application.department}</span>\n </>\n )}\n </p>\n <p className={`text-text-secondary truncate ${compact ? 'text-[11px]' : 'text-xs'}`}>\n {application.email}\n </p>\n </div>\n <div\n className={`text-text-secondary whitespace-nowrap ${compact ? 'text-[11px]' : 'text-xs'}`}\n >\n {timeAgo(application.createdAt)}\n </div>\n </div>\n </button>\n </div>\n );\n };\n\n // Loading state\n if (loading && applications.length === 0) {\n return (\n <div className=\"p-6\">\n <div className=\"flex items-center gap-3 mb-6\">\n <Briefcase size={24} className=\"text-text-primary\" />\n <h1 className=\"text-2xl font-bold text-text-primary\">Job Applications</h1>\n </div>\n <div className=\"flex flex-col items-center justify-center py-16\">\n <Loader2 size={32} className=\"animate-spin text-text-secondary mb-4\" />\n <p className=\"text-sm text-text-secondary\">Loading applications…</p>\n </div>\n </div>\n );\n }\n\n // Error state\n if (error) {\n return (\n <div className=\"p-6\">\n <div className=\"flex items-center gap-3 mb-6\">\n <Briefcase size={24} className=\"text-text-primary\" />\n <h1 className=\"text-2xl font-bold text-text-primary\">Job Applications</h1>\n </div>\n <div className=\"flex flex-col items-center justify-center py-16 text-center\">\n <div className=\"p-4 rounded-2xl bg-status-error-bg-subtle text-status-error-text mb-4\">\n <AlertCircle size={48} />\n </div>\n <h3 className=\"text-lg font-semibold text-text-primary mb-2\">\n Failed to load applications\n </h3>\n <p className=\"text-sm text-text-secondary\">{error.message}</p>\n </div>\n </div>\n );\n }\n\n return (\n <div className=\"p-6\">\n {/* Header */}\n <div className=\"flex items-center justify-between mb-6\">\n <div className=\"flex items-center gap-3\">\n <Briefcase size={24} className=\"text-text-primary\" />\n <div>\n <h1 className=\"text-2xl font-bold text-text-primary\">Job Applications</h1>\n <p className=\"text-sm text-text-secondary\">Careers form submissions</p>\n </div>\n <Badge variant=\"secondary\" className=\"ml-2\">\n {total}\n </Badge>\n </div>\n <Button onClick={() => setAddDialogOpen(true)}>\n <Plus size={18} />\n Add Candidate\n </Button>\n </div>\n\n {applications.length > 0 && (\n <div className=\"mb-4 -mt-2 space-y-2\">\n <div className=\"flex flex-wrap items-center gap-2\">\n <Checkbox\n checked={\n allVisibleSelected ? true : selectedVisibleCount > 0 ? 'indeterminate' : false\n }\n disabled={selectionLoading || searchPending}\n onCheckedChange={(checked) =>\n setSelection((previous) =>\n setVisibleCandidateSelection(previous, visibleApplicationIds, checked === true)\n )\n }\n aria-label=\"Select all visible applications\"\n />\n {selectionCount > 0 ? (\n <BulkSelectionSummary selection={selection} />\n ) : (\n <span className=\"text-xs text-text-secondary\">\n Select all {applications.length} visible applications\n </span>\n )}\n {total > 0 && (selection.mode !== 'all' || selection.excludedIds.size > 0) ? (\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n onClick={() => void selectAllMatching()}\n disabled={selectionLoading || searchPending}\n >\n {selectionLoading ? <Loader2 size={14} className=\"animate-spin\" /> : null}\n Select all {total} matching applications\n </Button>\n ) : null}\n {selectionCount > 0 ? (\n <button\n type=\"button\"\n onClick={() => {\n setSelection(createEmptyCandidateSelection());\n setAllTargets([]);\n setSelectionError(null);\n }}\n disabled={selectionLoading}\n className=\"text-xs text-text-secondary underline hover:text-text-primary disabled:cursor-not-allowed disabled:opacity-50\"\n >\n Clear\n </button>\n ) : null}\n </div>\n {selectionError ? (\n <p className=\"text-sm text-status-error-text\" role=\"alert\">\n {selectionError}\n </p>\n ) : null}\n </div>\n )}\n\n {selectionCount > 0 && (\n <div className=\"mb-4 flex flex-col justify-between gap-3 rounded-lg border border-primary/30 bg-primary/5 p-3 sm:flex-row sm:items-center\">\n <div>\n {!jobPostingFilter ? (\n <p className=\"text-xs text-text-secondary\">\n Filter to one job posting to enable bulk candidate actions.\n </p>\n ) : !selectionPostingScoped ? (\n <p className=\"text-xs text-status-error-text\">\n Some selected applications are no longer available in this posting. Clear and select\n again.\n </p>\n ) : (\n <p className=\"text-xs text-text-secondary\">\n Bulk actions run sequential requests of no more than 100 candidates each.\n </p>\n )}\n </div>\n <div className=\"flex flex-wrap items-center gap-2\">\n <Button\n variant=\"outline\"\n size=\"sm\"\n disabled={!canOpenBulkDialog}\n onClick={() => void openBulkAction('addRound')}\n className=\"gap-2\"\n >\n <UserPlus size={14} />\n Add Selected to Round\n </Button>\n <Button\n variant=\"outline\"\n size=\"sm\"\n disabled={!canOpenBulkDialog}\n onClick={() => void openBulkAction('message')}\n className=\"gap-2\"\n >\n <Send size={14} />\n Send Message\n </Button>\n <Button\n variant=\"outline\"\n size=\"sm\"\n disabled={!canOpenBulkDialog}\n onClick={() => void openBulkAction('assignment')}\n className=\"gap-2\"\n >\n <Shuffle size={14} />\n Assign & Email Random Take-Home\n </Button>\n <Button\n variant=\"outline\"\n size=\"sm\"\n disabled={!canOpenBulkDialog}\n onClick={() => void openBulkAction('duplicateNotice')}\n className=\"gap-2\"\n >\n <Mail size={14} />\n Notify Duplicate Applicants\n </Button>\n </div>\n </div>\n )}\n\n <PagePurpose className=\"mb-6\">\n Candidates who apply through your careers pages show up here. Review resumes and move\n applicants through your hiring pipeline — from new submission to screening, interview and\n hire — so promising people get a timely response. Open an application to see the full\n profile and resume.\n </PagePurpose>\n\n {/* Toolbar */}\n <div className=\"flex flex-col sm:flex-row items-stretch sm:items-center gap-4 p-4 rounded-xl border border-border-seam bg-bg-surface mb-6\">\n {/* Search */}\n <div className=\"relative flex-1\">\n <Search\n size={18}\n className=\"absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary\"\n />\n <Input\n type=\"text\"\n aria-label=\"Search applications\"\n placeholder=\"Search by name, email, or position...\"\n value={search}\n onChange={(e: React.ChangeEvent<HTMLInputElement>) => setSearch(e.target.value)}\n className=\"pl-10\"\n />\n </div>\n\n {/* View mode toggle */}\n <div className=\"flex items-center gap-1 p-1 rounded-lg border bg-bg-sunken/50\">\n <Button\n variant={viewMode === 'list' ? 'secondary' : 'ghost'}\n size=\"sm\"\n onClick={() => setViewMode('list')}\n className=\"px-3\"\n aria-label=\"Show applications as a list\"\n >\n <List size={18} />\n </Button>\n <Button\n variant={viewMode === 'kanban' ? 'secondary' : 'ghost'}\n size=\"sm\"\n onClick={() => setViewMode('kanban')}\n className=\"px-3\"\n aria-label=\"Show applications as a kanban board\"\n >\n <Grid size={18} />\n </Button>\n </div>\n\n {/* Filter toggle */}\n <Button\n variant={showFilters ? 'secondary' : 'outline'}\n size=\"sm\"\n onClick={toggleFilters}\n className=\"gap-2\"\n aria-expanded={showFilters}\n >\n <Filter size={16} />\n Filters\n {activeFilterCount > 0 ? (\n <span\n className=\"rounded-full bg-action-primary-bg px-1.5 py-0.5 text-[10px] font-semibold leading-none text-action-primary-text\"\n aria-label={`${activeFilterCount} active ${activeFilterCount === 1 ? 'filter' : 'filters'}`}\n >\n {activeFilterCount}\n </span>\n ) : null}\n <ChevronDown\n size={14}\n className={showFilters ? 'rotate-180 transition-transform' : 'transition-transform'}\n />\n </Button>\n\n {/* Filters now survive the trip into a submission and back, so there\n has to be one obvious way out of them. */}\n {filtersApplied ? (\n <Button variant=\"ghost\" size=\"sm\" onClick={clearAllFilters} className=\"gap-2\">\n <X size={16} />\n Clear all\n </Button>\n ) : null}\n </div>\n\n {/* Filters panel */}\n {showFilters && (\n <div className=\"mb-6 p-4 bg-bg-surface border border-border-seam rounded-lg space-y-4\">\n <div>\n <p className=\"block text-xs font-medium text-text-secondary mb-1.5\">\n Status <span className=\"font-normal\">(select any number)</span>\n </p>\n <div className=\"flex flex-wrap gap-1.5\">\n {statusOrder.map((s) => {\n const active = statusFilters.has(s);\n return (\n <button\n key={s}\n type=\"button\"\n onClick={() => toggleStatusFilter(s)}\n aria-pressed={active}\n className={`px-2.5 py-1 rounded-full text-xs font-medium border transition-colors ${\n active\n ? `${statusColors[s]} border-transparent`\n : 'bg-bg-surface text-text-secondary border-border-seam hover:border-border-strong'\n }`}\n >\n {statusLabels[s]}\n </button>\n );\n })}\n {statusFilters.size > 0 && (\n <button\n type=\"button\"\n onClick={() => commitFilters({ statuses: [] })}\n className=\"px-2.5 py-1 rounded-full text-xs font-medium text-text-secondary hover:text-text-primary underline\"\n >\n Clear\n </button>\n )}\n </div>\n </div>\n <div>\n <p className=\"block text-xs font-medium text-text-secondary mb-1.5\">\n Interview round stage{' '}\n <span className=\"font-normal\">\n {roundConfigFilter ? '(for the exact configured round)' : '(select any number)'}\n </span>\n </p>\n <div className=\"flex flex-wrap gap-1.5\">\n {roundStatusOrder.map((s) => {\n const active = roundStatusFilters.has(s);\n const config = roundStatusConfig[s];\n const disabled = configuredRoundStateFilter === ConfiguredRoundState.Missing;\n return (\n <button\n key={s}\n type=\"button\"\n onClick={() => toggleRoundStatusFilter(s)}\n aria-pressed={active}\n disabled={disabled}\n className={`px-2.5 py-1 rounded-full text-xs font-medium border transition-colors disabled:cursor-not-allowed disabled:opacity-50 ${\n active\n ? `${config.className} border-transparent`\n : 'bg-bg-surface text-text-secondary border-border-seam hover:border-border-strong'\n }`}\n >\n {config.label}\n </button>\n );\n })}\n {roundStatusFilters.size > 0 && (\n <button\n type=\"button\"\n onClick={() => commitFilters({ roundStatuses: [] })}\n className=\"px-2.5 py-1 rounded-full text-xs font-medium text-text-secondary hover:text-text-primary underline\"\n >\n Clear\n </button>\n )}\n </div>\n </div>\n <div className=\"grid grid-cols-1 sm:grid-cols-2 xl:grid-cols-4 gap-4\">\n <div>\n <label\n htmlFor=\"job-app-product-filter\"\n className=\"block text-xs font-medium text-text-secondary mb-1\"\n >\n Product\n </label>\n <select\n id=\"job-app-product-filter\"\n value={productFilter}\n onChange={(e) => commitFilters({ productId: e.target.value })}\n className=\"w-full px-3 py-2 bg-surface border border-default rounded-lg text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-accent/50\"\n >\n <option value=\"\">All products</option>\n {productIds.map((pid) => (\n <option key={pid} value={pid}>\n {productNames[pid] || pid}\n </option>\n ))}\n </select>\n </div>\n <div>\n <label\n htmlFor=\"job-app-posting-filter\"\n className=\"block text-xs font-medium text-text-secondary mb-1\"\n >\n Job Posting\n </label>\n <select\n id=\"job-app-posting-filter\"\n value={jobPostingFilter}\n onChange={(e) => changeJobPostingFilter(e.target.value)}\n disabled={postingsLoading}\n className=\"w-full px-3 py-2 bg-surface border border-default rounded-lg text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-accent/50 disabled:opacity-50\"\n >\n <option value=\"\">All postings</option>\n {postingOptions.map((option) => (\n <option key={option.id} value={option.id}>\n {option.label}\n </option>\n ))}\n </select>\n </div>\n <div>\n <label\n htmlFor=\"job-app-round-config-filter\"\n className=\"block text-xs font-medium text-text-secondary mb-1\"\n >\n Exact configured round\n </label>\n <select\n id=\"job-app-round-config-filter\"\n value={roundConfigFilter}\n onChange={(e) => changeRoundConfigFilter(e.target.value)}\n disabled={!jobPostingFilter || selectedPostingLoading}\n className=\"w-full px-3 py-2 bg-surface border border-default rounded-lg text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-accent/50 disabled:opacity-50\"\n >\n <option value=\"\">Any configured round</option>\n {roundConfigOptions.map((option) => (\n <option key={option.id} value={option.id}>\n {option.label}\n </option>\n ))}\n </select>\n </div>\n <div>\n <label\n htmlFor=\"job-app-configured-round-state-filter\"\n className=\"block text-xs font-medium text-text-secondary mb-1\"\n >\n Exact round assignment\n </label>\n <select\n id=\"job-app-configured-round-state-filter\"\n value={configuredRoundStateFilter}\n onChange={(e) =>\n changeConfiguredRoundStateFilter(\n Object.values(ConfiguredRoundState).find((state) => state === e.target.value) ??\n ''\n )\n }\n disabled={!roundConfigFilter}\n className=\"w-full px-3 py-2 bg-surface border border-default rounded-lg text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-accent/50 disabled:opacity-50\"\n >\n <option value=\"\">Any assignment state</option>\n <option value={ConfiguredRoundState.Missing}>Missing this round</option>\n <option value={ConfiguredRoundState.Unassigned}>Round exists, no assignment</option>\n <option value={ConfiguredRoundState.Assigned}>Assignment already attached</option>\n </select>\n </div>\n <div className=\"flex items-end\">\n <label\n htmlFor=\"job-app-duplicate-email-filter\"\n className={`flex items-center gap-2 rounded-lg border border-default bg-surface px-3 py-2 text-sm ${\n jobPostingFilter\n ? 'cursor-pointer text-text-primary'\n : 'cursor-not-allowed text-text-secondary opacity-50'\n }`}\n >\n <Checkbox\n id=\"job-app-duplicate-email-filter\"\n checked={duplicateEmailFilter}\n onCheckedChange={(checked) => commitFilters({ duplicateEmail: checked === true })}\n disabled={!jobPostingFilter}\n />\n Duplicate email only\n </label>\n </div>\n <div>\n <label\n htmlFor=\"job-app-assignment-owner-filter\"\n className=\"block text-xs font-medium text-text-secondary mb-1\"\n >\n Assignment owner email\n </label>\n <input\n id=\"job-app-assignment-owner-filter\"\n type=\"text\"\n value={assignmentOwnerFilter}\n onChange={(e) => setAssignmentOwnerFilter(e.target.value)}\n placeholder=\"owner@example.com\"\n className=\"w-full px-3 py-2 bg-surface border border-default rounded-lg text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-accent/50\"\n />\n </div>\n <div>\n <label\n htmlFor=\"job-app-interviewer-filter\"\n className=\"block text-xs font-medium text-text-secondary mb-1\"\n >\n Reviewing interviewer\n </label>\n <select\n id=\"job-app-interviewer-filter\"\n value={interviewerFilter}\n onChange={(e) => commitFilters({ interviewerId: e.target.value })}\n disabled={interviewersLoading}\n className=\"w-full px-3 py-2 bg-surface border border-default rounded-lg text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-accent/50 disabled:opacity-50\"\n >\n <option value=\"\">Any interviewer</option>\n {interviewerOptions.map((option) => (\n <option key={option.id} value={option.id}>\n {option.label}\n </option>\n ))}\n </select>\n </div>\n </div>\n {duplicateEmailFilter && jobPostingFilter ? (\n <p className=\"text-xs text-text-secondary\">\n Showing only candidates whose email matches another application for this same posting.\n Select the ones you want to reach and use <strong>Notify Duplicate Applicants</strong>{' '}\n — one notice goes out per email, not per application.\n </p>\n ) : null}\n {roundConfigFilter && configuredRoundStateFilter === ConfiguredRoundState.Unassigned ? (\n <p className=\"text-xs text-text-secondary\">\n For the next assignment batch, select <strong>Scheduled</strong> above. Successful\n sends move the exact round to <strong>Awaiting Submission</strong>, so those\n candidates leave this filtered queue after refresh.\n </p>\n ) : null}\n </div>\n )}\n {applications.length === 0 ? (\n <IllustratedEmptyState\n illustration=\"empty-people\"\n title=\"No applications yet\"\n description=\"Job applications from your careers pages will appear here.\"\n />\n ) : (\n <>\n {viewMode === 'list' ? (\n <div className=\"space-y-3\">\n {applications.map((application: JobApplication) =>\n renderApplicationCard(application)\n )}\n </div>\n ) : (\n <div className=\"flex gap-4 overflow-x-auto pb-4\">\n {statusOrder.map((status) => {\n const group = groupedApplications[status] ?? [];\n return (\n <div\n key={status}\n className=\"flex flex-col gap-3 w-[280px] flex-shrink-0 max-h-[calc(100vh-280px)]\"\n >\n <div className=\"flex items-center justify-between px-1\">\n <h3 className=\"text-sm font-semibold text-text-primary\">\n {statusLabels[status]}\n </h3>\n <Badge variant=\"secondary\" className={statusColors[status]}>\n {group.length}\n </Badge>\n </div>\n <div className=\"flex flex-col gap-3 overflow-y-auto pr-1\">\n {group.length === 0 && (\n <div className=\"text-center py-6 px-3 rounded-lg border border-dashed border-border-seam bg-bg-sunken/30\">\n <p className=\"text-xs text-text-secondary\">No applications</p>\n </div>\n )}\n {group.map((application) => renderApplicationCard(application, true))}\n </div>\n </div>\n );\n })}\n </div>\n )}\n\n {/* Load more */}\n {hasMore && (\n <div className=\"flex justify-center mt-6\">\n <Button\n variant=\"outline\"\n size=\"sm\"\n onClick={() => void loadMore()}\n disabled={loadingMore}\n className=\"gap-2\"\n >\n {loadingMore ? <Loader2 size={14} className=\"animate-spin\" /> : null}\n Load more\n </Button>\n </div>\n )}\n </>\n )}\n\n {/* Add Candidate dialog — manual entry for applications that did not come\n through a careers form (referrals, walk-ins, recruiter sourcing). */}\n <Dialog\n open={addDialogOpen}\n onOpenChange={(open) => {\n setAddDialogOpen(open);\n if (!open) resetCandidateDialog();\n }}\n >\n <DialogContent className=\"sm:max-w-2xl max-h-[90vh] overflow-y-auto\">\n <DialogHeader>\n <DialogTitle>Add Candidate</DialogTitle>\n <DialogDescription>\n Manually add a candidate to the hiring pipeline. Resumes are optional and can be\n attached as PDF, DOC, or DOCX (max 10 MB).\n </DialogDescription>\n </DialogHeader>\n\n <form id=\"add-candidate-form\" onSubmit={handleCreateCandidate} className=\"space-y-4\">\n <div className=\"grid grid-cols-1 sm:grid-cols-2 gap-4\">\n <div className=\"space-y-1.5\">\n <Label htmlFor=\"candidate-name\">\n Name <span className=\"text-status-error-text\">*</span>\n </Label>\n <Input\n id=\"candidate-name\"\n value={candidateForm.name}\n onChange={(e: React.ChangeEvent<HTMLInputElement>) =>\n setCandidateForm((prev) => ({ ...prev, name: e.target.value }))\n }\n placeholder=\"Full name\"\n aria-invalid={!!candidateErrors.name}\n />\n {candidateErrors.name && (\n <p className=\"text-xs text-status-error-text\">{candidateErrors.name}</p>\n )}\n </div>\n\n <div className=\"space-y-1.5\">\n <Label htmlFor=\"candidate-email\">\n Email <span className=\"text-status-error-text\">*</span>\n </Label>\n <Input\n id=\"candidate-email\"\n type=\"email\"\n value={candidateForm.email}\n onChange={(e: React.ChangeEvent<HTMLInputElement>) =>\n setCandidateForm((prev) => ({ ...prev, email: e.target.value }))\n }\n placeholder=\"email@example.com\"\n aria-invalid={!!candidateErrors.email}\n />\n {candidateErrors.email && (\n <p className=\"text-xs text-status-error-text\">{candidateErrors.email}</p>\n )}\n </div>\n </div>\n\n <div className=\"grid grid-cols-1 sm:grid-cols-2 gap-4\">\n <div className=\"space-y-1.5\">\n <Label htmlFor=\"candidate-phone\">Phone</Label>\n <Input\n id=\"candidate-phone\"\n value={candidateForm.phone}\n onChange={(e: React.ChangeEvent<HTMLInputElement>) =>\n setCandidateForm((prev) => ({ ...prev, phone: e.target.value }))\n }\n placeholder=\"+91 98765 43210\"\n />\n </div>\n\n <div className=\"space-y-1.5\">\n <Label htmlFor=\"candidate-source\">\n Source <span className=\"text-status-error-text\">*</span>\n </Label>\n <Input\n id=\"candidate-source\"\n list=\"candidate-source-suggestions\"\n value={candidateForm.source}\n onChange={(e: React.ChangeEvent<HTMLInputElement>) =>\n setCandidateForm((prev) => ({ ...prev, source: e.target.value }))\n }\n placeholder=\"e.g. LinkedIn\"\n aria-invalid={!!candidateErrors.source}\n />\n <datalist id=\"candidate-source-suggestions\">\n {SOURCE_SUGGESTIONS.map((suggestion) => (\n <option key={suggestion} value={suggestion} />\n ))}\n </datalist>\n {candidateErrors.source && (\n <p className=\"text-xs text-status-error-text\">{candidateErrors.source}</p>\n )}\n </div>\n </div>\n\n <div className=\"grid grid-cols-1 sm:grid-cols-2 gap-4\">\n <div className=\"space-y-1.5\">\n <Label htmlFor=\"candidate-job-posting\">Job Posting</Label>\n <Select\n value={candidateForm.jobPostingId}\n onValueChange={(value) =>\n setCandidateForm((prev) => ({ ...prev, jobPostingId: value }))\n }\n disabled={postingsLoading}\n >\n <SelectTrigger id=\"candidate-job-posting\">\n <SelectValue placeholder=\"Select an open posting\" />\n </SelectTrigger>\n <SelectContent>\n <SelectItem value={POSTING_NONE}>No posting (manual entry)</SelectItem>\n {openPostings.map((posting: JobPosting) => (\n <SelectItem key={posting.id} value={posting.id}>\n {posting.title}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n <p className=\"text-xs text-text-secondary\">\n Position and department are derived from the selected posting.\n </p>\n </div>\n\n <div className=\"space-y-1.5\">\n <Label htmlFor=\"candidate-position\">\n Position{' '}\n {candidateForm.jobPostingId === POSTING_NONE && (\n <span className=\"text-status-error-text\">*</span>\n )}\n </Label>\n <Input\n id=\"candidate-position\"\n value={candidateForm.position}\n onChange={(e: React.ChangeEvent<HTMLInputElement>) =>\n setCandidateForm((prev) => ({ ...prev, position: e.target.value }))\n }\n placeholder=\"e.g. Product Engineer\"\n disabled={candidateForm.jobPostingId !== POSTING_NONE}\n aria-invalid={!!candidateErrors.position}\n />\n {candidateErrors.position && (\n <p className=\"text-xs text-status-error-text\">{candidateErrors.position}</p>\n )}\n </div>\n </div>\n\n <div className=\"grid grid-cols-1 sm:grid-cols-2 gap-4\">\n <div className=\"space-y-1.5\">\n <Label htmlFor=\"candidate-linkedin\">LinkedIn</Label>\n <Input\n id=\"candidate-linkedin\"\n value={candidateForm.linkedin}\n onChange={(e: React.ChangeEvent<HTMLInputElement>) =>\n setCandidateForm((prev) => ({ ...prev, linkedin: e.target.value }))\n }\n placeholder=\"https://linkedin.com/in/…\"\n />\n </div>\n\n <div className=\"space-y-1.5\">\n <Label htmlFor=\"candidate-portfolio\">Portfolio</Label>\n <Input\n id=\"candidate-portfolio\"\n value={candidateForm.portfolio}\n onChange={(e: React.ChangeEvent<HTMLInputElement>) =>\n setCandidateForm((prev) => ({ ...prev, portfolio: e.target.value }))\n }\n placeholder=\"https://…\"\n />\n </div>\n </div>\n\n <div className=\"space-y-1.5\">\n <Label htmlFor=\"candidate-cover-letter\">Cover Letter</Label>\n <Textarea\n id=\"candidate-cover-letter\"\n value={candidateForm.coverLetter}\n onChange={(e: React.ChangeEvent<HTMLTextAreaElement>) =>\n setCandidateForm((prev) => ({ ...prev, coverLetter: e.target.value }))\n }\n placeholder=\"Notes or cover letter from the candidate\"\n rows={4}\n />\n </div>\n\n <div className=\"space-y-1.5\">\n <Label htmlFor=\"candidate-resume\">Resume (optional)</Label>\n <Input\n id=\"candidate-resume\"\n type=\"file\"\n accept={RESUME_ACCEPT}\n onChange={handleResumeFileChange}\n />\n <p className=\"text-xs text-text-secondary flex items-center gap-1\">\n <Paperclip size={11} />\n PDF, DOC, or DOCX up to 10 MB.\n {resumeFile ? ` Selected: ${resumeFile.name}` : ''}\n </p>\n {resumeFileError && (\n <p className=\"text-xs text-status-error-text\">{resumeFileError}</p>\n )}\n </div>\n </form>\n\n <DialogFooter>\n <Button\n type=\"button\"\n variant=\"outline\"\n onClick={() => {\n setAddDialogOpen(false);\n resetCandidateDialog();\n }}\n disabled={submittingCandidate}\n >\n Cancel\n </Button>\n <Button type=\"submit\" form=\"add-candidate-form\" disabled={submittingCandidate}>\n {submittingCandidate ? (\n <>\n <Loader2 size={16} className=\"animate-spin mr-2\" />\n Adding…\n </>\n ) : (\n <>\n <UserPlus size={16} className=\"mr-2\" />\n Add Candidate\n </>\n )}\n </Button>\n </DialogFooter>\n </DialogContent>\n </Dialog>\n\n {bulkMode === 'message' || bulkMode === 'assignment' ? (\n <BulkCandidateSendDialog\n mode={bulkMode}\n open\n onClose={closeBulkAction}\n onOpenAddRound={() => void openBulkAction('addRound')}\n targets={bulkPreviewTargets}\n selection={bulkPreviewSelection}\n jobPostingId={jobPostingFilter}\n previewLoading={bulkPreviewLoading}\n previewError={bulkPreviewError}\n />\n ) : null}\n\n {bulkMode === 'addRound' ? (\n <AddSelectedToRoundDialog\n open\n onClose={closeBulkAction}\n targets={bulkPreviewTargets}\n selection={bulkPreviewSelection}\n jobPostingId={jobPostingFilter}\n previewLoading={bulkPreviewLoading}\n previewError={bulkPreviewError}\n />\n ) : null}\n\n {bulkMode === 'duplicateNotice' ? (\n <NotifyDuplicateApplicantsDialog\n open\n onClose={closeBulkAction}\n targets={bulkPreviewTargets}\n selection={bulkPreviewSelection}\n jobPostingId={jobPostingFilter}\n previewLoading={bulkPreviewLoading}\n previewError={bulkPreviewError}\n />\n ) : null}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AA+GA,IAAM,KAAwB;AAE9B,SAAS,GACP,GACqB;CACrB,OAAO;EACL,IAAI,EAAY;EAChB,cAAc,EAAY,gBAAgB;EAC1C,iBAAiB,EAAY,gBAAgB,KAAK,OAAW;GAC3D,IAAI,EAAM;GACV,eAAe,EAAM,iBAAiB;GACtC,MAAM,EAAM;GACZ,WAAW,EAAM;GACjB,WAAW,EAAM,UAAU,KAAK,OAAS,EAAE,WAAW,EAAI,UAAU,EAAE;EACxE,EAAE;CACJ;AACF;AAEA,SAAS,GAA2B,GAA8D;CAChG,OAAO;EACL,GAAG;EACH,GAAI,EAAO,MAAM,EAAE,KAAK,CAAC,GAAG,EAAO,GAAG,EAAE,IAAI,CAAC;EAC7C,GAAI,EAAO,WAAW,EAAE,UAAU,CAAC,GAAG,EAAO,QAAQ,EAAE,IAAI,CAAC;EAC5D,GAAI,EAAO,gBAAgB,EAAE,eAAe,CAAC,GAAG,EAAO,aAAa,EAAE,IAAI,CAAC;CAC7E;AACF;AAQA,SAAS,GAAgB,GAAsB,GAAe;CAC5D,OAAO,EAAO,SAAS,CAAK,IACxB,EAAO,QAAQ,MAAc,MAAc,CAAK,IAChD,CAAC,GAAG,GAAQ,CAAK;AACvB;AAEA,SAAS,GAAW,GAA4B;CAC9C,OAAO,IAAI,KAAK,CAAU,CAAC,CAAC,mBAAmB,SAAS;EACtD,OAAO;EACP,KAAK;EACL,MAAM;EACN,MAAM;EACN,QAAQ;CACV,CAAC;AACH;AAE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"JobApplicationsPage.js","names":[],"sources":["../../../src/support/pages/JobApplicationsPage.tsx"],"sourcesContent":["import { useState, useEffect, useRef, useCallback, useMemo } from 'react';\nimport { useNavigate, useLocation, useSearchParams } from 'react-router';\nimport {\n Briefcase,\n Search,\n Filter,\n Loader2,\n AlertCircle,\n ChevronDown,\n Paperclip,\n Grid,\n List,\n Plus,\n UserPlus,\n Send,\n Shuffle,\n Mail,\n Tag,\n X,\n} from 'lucide-react';\nimport { IllustratedEmptyState, PagePurpose } from '@burdenoff/fe-libs/ui';\nimport { graphqlFetch } from '@burdenoff/fe-libs/shared/graphql/fetch';\nimport {\n useGetBulkCandidateTargetsLazyQuery,\n useGetInterviewersQuery,\n useGetJobApplicationsQuery,\n useGetJobPostingQuery,\n useGetJobPostingsQuery,\n useCreateJobApplicationMutation,\n type GetBulkCandidateTargetsQuery,\n type GetJobApplicationsQuery,\n type GetJobPostingQuery,\n type GetJobPostingsQuery,\n} from '../../generated/global-operations';\nimport {\n ConfiguredRoundState,\n JobApplicationStatus,\n JobPostingStatus,\n InterviewRoundStatus,\n} from '../../generated/global-types';\nimport type { Interviewer, JobApplicationFilterInput } from '../../generated/global-types';\nimport { nativeNotify } from '../../utils/nativeBridge';\nimport {\n statusOrder,\n statusColors,\n statusLabels,\n roundStatusOrder,\n roundStatusConfig,\n} from '../constants/pipeline';\nimport {\n Button,\n Input,\n Checkbox,\n Badge,\n Label,\n Textarea,\n Dialog,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from '../components/ui';\nimport {\n AddSelectedToRoundDialog,\n BulkCandidateSendDialog,\n BulkCustomEmailDialog,\n BulkStatusUpdateDialog,\n NotifyDuplicateApplicantsDialog,\n type BulkCandidateDialogMode,\n} from '../components/careers/BulkCandidateDialogs';\nimport { BulkSelectionSummary } from '../components/careers/BulkSelectionSummary';\nimport { requireBulkCandidateTargetPage } from '../utils/bulkCandidateTargetQuery';\nimport {\n applyJobApplicationFilters,\n buildSupportContextKey,\n clearJobApplicationFilters,\n countActiveJobApplicationFilters,\n hasActiveJobApplicationFilters,\n isSupportContextHydration,\n mergeSearchParams,\n normalizeJobApplicationFilterText,\n parseJobApplicationFilters,\n parseJobApplicationViewMode,\n JOB_APPLICATION_FILTERS_OPEN_PARAM_KEY,\n JOB_APPLICATION_VIEW_PARAM_KEY,\n type JobApplicationFilterState,\n} from '../utils/jobApplicationFilterParams';\nimport { useDebouncedUrlText } from '../hooks/useDebouncedUrlText';\nimport { useSupport } from '../providers/SupportProvider';\nimport {\n CandidateMaterializationError,\n createEmptyCandidateSelection,\n getCandidateSelectionCount,\n getSelectedCandidateIds,\n materializeCandidateTargets,\n selectAllMaterializedCandidates,\n setVisibleCandidateSelection,\n toggleCandidateSelection,\n type BulkCandidateTarget,\n type CandidateSelectionState,\n} from '../utils/bulkCandidateOperations';\n\ntype JobApplication = GetJobApplicationsQuery['jobApplications']['items'][number];\ntype BulkTargetQueryItem = GetBulkCandidateTargetsQuery['jobApplications']['items'][number];\ntype JobPosting = GetJobPostingsQuery['jobPostings']['items'][number];\ntype PostingRoundConfig = NonNullable<GetJobPostingQuery['jobPosting']>['rounds'][number];\ntype ViewMode = 'list' | 'kanban';\n\nconst APPLICATION_PAGE_SIZE = 50;\n\nfunction toBulkCandidateTarget(\n application: JobApplication | BulkTargetQueryItem\n): BulkCandidateTarget {\n return {\n id: application.id,\n jobPostingId: application.jobPostingId ?? null,\n interviewRounds: application.interviewRounds.map((round) => ({\n id: round.id,\n roundConfigId: round.roundConfigId ?? null,\n name: round.name,\n roundType: round.roundType,\n emailLogs: round.emailLogs.map((log) => ({ emailType: log.emailType })),\n })),\n };\n}\n\nfunction freezeJobApplicationFilter(filter: JobApplicationFilterInput): JobApplicationFilterInput {\n return {\n ...filter,\n ...(filter.ids ? { ids: [...filter.ids] } : {}),\n ...(filter.statuses ? { statuses: [...filter.statuses] } : {}),\n ...(filter.roundStatuses ? { roundStatuses: [...filter.roundStatuses] } : {}),\n };\n}\n\n/** One entry in a filter dropdown, decoupled from the shape its query returns. */\ninterface FilterSelectOption {\n id: string;\n label: string;\n}\n\nfunction toggleInList<T>(values: readonly T[], value: T): T[] {\n return values.includes(value)\n ? values.filter((candidate) => candidate !== value)\n : [...values, value];\n}\n\nfunction formatDate(dateString: string): string {\n return new Date(dateString).toLocaleDateString('en-US', {\n month: 'short',\n day: 'numeric',\n year: 'numeric',\n hour: '2-digit',\n minute: '2-digit',\n });\n}\n\nfunction timeAgo(dateString: string): string {\n const diff = Date.now() - new Date(dateString).getTime();\n const minutes = Math.floor(diff / 60000);\n if (minutes < 2) return 'just now';\n if (minutes < 60) return `${minutes}m ago`;\n const hours = Math.floor(minutes / 60);\n if (hours < 24) return `${hours}h ago`;\n const days = Math.floor(hours / 24);\n if (days < 30) return `${days}d ago`;\n return formatDate(dateString);\n}\n\nconst POSTING_NONE = '__none__' as const;\n\nconst SOURCE_SUGGESTIONS = ['LinkedIn', 'Referral', 'Indeed', 'Email', 'Walk-in', 'Other'];\n\nconst RESUME_MAX_BYTES = 10 * 1024 * 1024;\nconst RESUME_ACCEPT = '.pdf,.doc,.docx';\nconst RESUME_MIME_TYPES = new Set([\n 'application/pdf',\n 'application/msword',\n 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',\n]);\n\ntype CandidateFormData = {\n name: string;\n email: string;\n phone: string;\n jobPostingId: string;\n position: string;\n source: string;\n linkedin: string;\n portfolio: string;\n coverLetter: string;\n};\n\nconst emptyCandidateForm: CandidateFormData = {\n name: '',\n email: '',\n phone: '',\n jobPostingId: POSTING_NONE,\n position: '',\n source: '',\n linkedin: '',\n portfolio: '',\n coverLetter: '',\n};\n\nfunction readFileAsBase64(file: File): Promise<string> {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.onload = () => {\n const result = reader.result;\n if (typeof result !== 'string') {\n reject(new Error('Failed to read file'));\n return;\n }\n // Strip the `data:<mime>;base64,` prefix — the backend wants raw base64.\n const commaIndex = result.indexOf(',');\n resolve(commaIndex >= 0 ? result.slice(commaIndex + 1) : result);\n };\n reader.onerror = () => reject(reader.error ?? new Error('Failed to read file'));\n reader.readAsDataURL(file);\n });\n}\n\nexport function JobApplicationsPage() {\n const navigate = useNavigate();\n const location = useLocation();\n const { organizationId, workspaceId, productId: contextProductId } = useSupport();\n\n // BOFF-7068: filters live in the query string, not in component state.\n // Opening a submission unmounts this list, so anything held in `useState`\n // would be gone by the time the reviewer comes back — and they come back once\n // per candidate. The row link and the detail page's back button both forward\n // `location.search` untouched, so the URL carries the filters across for free\n // (and survives a refresh, and can be shared as a link).\n const [searchParams, setSearchParams] = useSearchParams();\n const searchParamsKey = searchParams.toString();\n const filters = useMemo(\n () => parseJobApplicationFilters(new URLSearchParams(searchParamsKey)),\n [searchParamsKey]\n );\n\n // The address bar is the source of truth for a write, not React Router's\n // snapshot of it — see `mergeSearchParams`. Writes are `replace` so that\n // adjusting filters never buries the previous page under history entries.\n const updateSearchParams = useCallback(\n (update: (params: URLSearchParams) => URLSearchParams) => {\n setSearchParams(\n (current) =>\n update(\n mergeSearchParams(current, typeof window === 'undefined' ? '' : window.location.search)\n ),\n { replace: true }\n );\n },\n [setSearchParams]\n );\n\n const commitFilters = useCallback(\n (patch: Partial<JobApplicationFilterState>) => {\n updateSearchParams((params) =>\n applyJobApplicationFilters(params, { ...parseJobApplicationFilters(params), ...patch })\n );\n },\n [updateSearchParams]\n );\n\n const commitParam = useCallback(\n (key: string, value: string | null) => {\n updateSearchParams((params) => {\n const next = new URLSearchParams(params);\n if (value === null) next.delete(key);\n else next.set(key, value);\n return next;\n });\n },\n [updateSearchParams]\n );\n\n // Derived filter values — same names the JSX below already used, so every\n // control keeps reading one value and writing through `commitFilters`.\n const debouncedSearch = filters.search;\n const statusFilters = useMemo(() => new Set(filters.statuses), [filters.statuses]);\n const roundStatusFilters = useMemo(() => new Set(filters.roundStatuses), [filters.roundStatuses]);\n const productFilter = filters.productId;\n const jobPostingFilter = filters.jobPostingId;\n const roundConfigFilter = filters.roundConfigId;\n const configuredRoundStateFilter = filters.configuredRoundState;\n const duplicateEmailFilter = filters.duplicateEmail;\n const debouncedAssignmentOwnerFilter = filters.assignmentOwnerEmail;\n const interviewerFilter = filters.interviewerId;\n\n // Both return the canonical value they wrote, so the debounced inputs can\n // reconcile when normalization changes what was typed — see\n // `useDebouncedUrlText`.\n const commitSearch = useCallback(\n (value: string) => {\n commitFilters({ search: value });\n return normalizeJobApplicationFilterText(value);\n },\n [commitFilters]\n );\n const commitAssignmentOwner = useCallback(\n (value: string) => {\n commitFilters({ assignmentOwnerEmail: value });\n return normalizeJobApplicationFilterText(value);\n },\n [commitFilters]\n );\n // Typing stays local until the user pauses, so the URL is not rewritten on\n // every keystroke.\n const [search, setSearch, resetSearchDraft] = useDebouncedUrlText(debouncedSearch, commitSearch);\n const [assignmentOwnerFilter, setAssignmentOwnerFilter, resetAssignmentOwnerDraft] =\n useDebouncedUrlText(debouncedAssignmentOwnerFilter, commitAssignmentOwner);\n\n const clearAllFilters = useCallback(() => {\n // Drop any keystroke still inside its debounce window first. Clearing an\n // already-empty search box does not change the URL value, so the hook would\n // never notice the reset on its own and the pending write would land in the\n // URL just after the user asked for a clean slate.\n resetSearchDraft();\n resetAssignmentOwnerDraft();\n updateSearchParams(clearJobApplicationFilters);\n }, [resetSearchDraft, resetAssignmentOwnerDraft, updateSearchParams]);\n\n // Links out of this page carry the whole query string — filters included — so\n // the detail page's \"Back to Applications\" returns to the same filtered list.\n //\n // Read through `mergeSearchParams`: the shell writes the active\n // org/workspace/project with a bare `replaceState` the router never sees, and\n // a link built from the router snapshot alone could drop them.\n //\n // The two text drafts are folded in on top, because a reviewer can type and\n // open a candidate inside the 300 ms debounce window — the row they are\n // aiming at is still on screen from the previous result set. Navigating\n // unmounts `useDebouncedUrlText` and its cleanup cancels the pending write,\n // so a draft that never reached the URL would be lost for good and \"Back to\n // Applications\" would restore a filter the reviewer had already moved past.\n const mergedQueryString = applyJobApplicationFilters(\n mergeSearchParams(\n new URLSearchParams(location.search),\n typeof window === 'undefined' ? '' : window.location.search\n ),\n { ...filters, search, assignmentOwnerEmail: assignmentOwnerFilter }\n ).toString();\n const queryParams = mergedQueryString ? `?${mergedQueryString}` : '';\n\n const activeFilterCount = countActiveJobApplicationFilters(filters);\n const filtersApplied = hasActiveJobApplicationFilters(filters);\n const viewMode: ViewMode = parseJobApplicationViewMode(\n searchParams.get(JOB_APPLICATION_VIEW_PARAM_KEY)\n );\n const setViewMode = (mode: ViewMode) =>\n commitParam(JOB_APPLICATION_VIEW_PARAM_KEY, mode === 'list' ? null : mode);\n\n // The panel opens by default whenever filters are applied, so a reviewer\n // returning to a narrowed list can see why it is narrowed. An explicit toggle\n // is remembered only while it disagrees with that default, which keeps the\n // param out of the URL in the common case.\n const filtersOpenParam = searchParams.get(JOB_APPLICATION_FILTERS_OPEN_PARAM_KEY);\n const filtersOpenByDefault = activeFilterCount > 0;\n const showFilters = filtersOpenParam === null ? filtersOpenByDefault : filtersOpenParam === '1';\n const toggleFilters = () => {\n const nextOpen = !showFilters;\n commitParam(\n JOB_APPLICATION_FILTERS_OPEN_PARAM_KEY,\n nextOpen === filtersOpenByDefault ? null : nextOpen ? '1' : '0'\n );\n };\n\n const [selection, setSelection] = useState<CandidateSelectionState>(\n createEmptyCandidateSelection\n );\n const [allTargets, setAllTargets] = useState<BulkCandidateTarget[]>([]);\n const [selectionLoading, setSelectionLoading] = useState(false);\n const [selectionError, setSelectionError] = useState<string | null>(null);\n const [bulkMode, setBulkMode] = useState<\n BulkCandidateDialogMode | 'addRound' | 'duplicateNotice' | 'customEmail' | 'updateStatus' | null\n >(null);\n const [bulkPreviewTargets, setBulkPreviewTargets] = useState<BulkCandidateTarget[]>([]);\n const [bulkPreviewSelection, setBulkPreviewSelection] = useState<CandidateSelectionState>(\n createEmptyCandidateSelection\n );\n const [bulkPreviewLoading, setBulkPreviewLoading] = useState(false);\n const [bulkPreviewError, setBulkPreviewError] = useState<string | null>(null);\n const [addDialogOpen, setAddDialogOpen] = useState(false);\n const [candidateForm, setCandidateForm] = useState<CandidateFormData>(emptyCandidateForm);\n const [candidateErrors, setCandidateErrors] = useState<Record<string, string>>({});\n const [resumeFile, setResumeFile] = useState<File | null>(null);\n const [resumeFileError, setResumeFileError] = useState('');\n const [submittingCandidate, setSubmittingCandidate] = useState(false);\n const [loadingMore, setLoadingMore] = useState(false);\n const [productNames, setProductNames] = useState<Record<string, string>>({});\n const nextOffsetRef = useRef(APPLICATION_PAGE_SIZE);\n // Mirror the latest map into a ref so the resolver effect can read it\n // without re-running every time we cache a freshly-resolved name.\n const productNamesRef = useRef(productNames);\n productNamesRef.current = productNames;\n\n // Switching organization / workspace / product invalidates posting, product\n // and interviewer ids, and a URL-persisted filter would otherwise outlive the\n // context it belongs to — including across a refresh. Same reset the ticket\n // filters get in `supportStore.resetForContextChange`.\n const supportContextKey = buildSupportContextKey(organizationId, workspaceId, contextProductId);\n const supportContextKeyRef = useRef(supportContextKey);\n useEffect(() => {\n const previousKey = supportContextKeyRef.current;\n supportContextKeyRef.current = supportContextKey;\n if (previousKey === supportContextKey) return;\n // Same hydration allowance as JobApplicationFilterContextGuard.\n if (isSupportContextHydration(previousKey, supportContextKey)) return;\n clearAllFilters();\n }, [supportContextKey, clearAllFilters]);\n\n const searchPending = search !== debouncedSearch;\n const filter: JobApplicationFilterInput = {\n ...(debouncedSearch ? { search: debouncedSearch } : {}),\n ...(statusFilters.size > 0 ? { statuses: Array.from(statusFilters) } : {}),\n ...(roundStatusFilters.size > 0 ? { roundStatuses: Array.from(roundStatusFilters) } : {}),\n ...(productFilter ? { productId: productFilter } : {}),\n ...(jobPostingFilter ? { jobPostingId: jobPostingFilter } : {}),\n ...(roundConfigFilter ? { roundConfigId: roundConfigFilter } : {}),\n ...(configuredRoundStateFilter ? { configuredRoundState: configuredRoundStateFilter } : {}),\n ...(duplicateEmailFilter && jobPostingFilter ? { duplicateEmail: true } : {}),\n ...(debouncedAssignmentOwnerFilter\n ? { assignmentOwnerEmail: debouncedAssignmentOwnerFilter }\n : {}),\n ...(interviewerFilter ? { interviewerId: interviewerFilter } : {}),\n };\n const queryScopeKey = JSON.stringify({\n searchInput: search,\n search: debouncedSearch,\n statuses: Array.from(statusFilters).sort(),\n roundStatuses: Array.from(roundStatusFilters).sort(),\n productId: productFilter,\n jobPostingId: jobPostingFilter,\n roundConfigId: roundConfigFilter,\n configuredRoundState: configuredRoundStateFilter,\n duplicateEmail: duplicateEmailFilter && !!jobPostingFilter,\n assignmentOwnerEmail: debouncedAssignmentOwnerFilter,\n interviewerId: interviewerFilter,\n });\n const scopeIdentityRef = useRef({ key: queryScopeKey, generation: 0 });\n if (scopeIdentityRef.current.key !== queryScopeKey) {\n scopeIdentityRef.current = {\n key: queryScopeKey,\n generation: scopeIdentityRef.current.generation + 1,\n };\n }\n const queryScopeToken = `${scopeIdentityRef.current.generation}:${queryScopeKey}`;\n const queryScopeTokenRef = useRef(queryScopeToken);\n queryScopeTokenRef.current = queryScopeToken;\n\n useEffect(() => {\n setSelection(createEmptyCandidateSelection());\n setAllTargets([]);\n setSelectionLoading(false);\n setSelectionError(null);\n setBulkMode(null);\n setBulkPreviewTargets([]);\n setBulkPreviewSelection(createEmptyCandidateSelection());\n setBulkPreviewLoading(false);\n setBulkPreviewError(null);\n setLoadingMore(false);\n nextOffsetRef.current = APPLICATION_PAGE_SIZE;\n }, [queryScopeToken]);\n\n const { data, loading, error, fetchMore } = useGetJobApplicationsQuery({\n variables: { filter, limit: APPLICATION_PAGE_SIZE, offset: 0 },\n fetchPolicy: 'cache-and-network',\n });\n const [getBulkCandidateTargets] = useGetBulkCandidateTargetsLazyQuery({\n fetchPolicy: 'network-only',\n errorPolicy: 'none',\n });\n\n const { data: postingsData, loading: postingsLoading } = useGetJobPostingsQuery({\n variables: { limit: 200, offset: 0 },\n fetchPolicy: 'cache-and-network',\n });\n const { data: selectedPostingData, loading: selectedPostingLoading } = useGetJobPostingQuery({\n variables: { id: jobPostingFilter },\n skip: !jobPostingFilter,\n fetchPolicy: 'cache-and-network',\n });\n const { data: interviewersData, loading: interviewersLoading } = useGetInterviewersQuery({\n variables: { limit: 200 },\n });\n\n const [createJobApplication] = useCreateJobApplicationMutation();\n\n const openPostings = (postingsData?.jobPostings?.items ?? []).filter(\n (posting: JobPosting) => posting.status === JobPostingStatus.Open\n );\n\n const rawApplications = data?.jobApplications?.items ?? [];\n const applicationsById = new Map<string, JobApplication>();\n for (const application of rawApplications) applicationsById.set(application.id, application);\n const applications = Array.from(applicationsById.values());\n const total = data?.jobApplications?.total ?? 0;\n const hasMore = data?.jobApplications?.hasMore ?? false;\n const visibleApplicationIds = applications.map((application) => application.id);\n const selectedIds = getSelectedCandidateIds(selection);\n const selectionCount = getCandidateSelectionCount(selection);\n const availableSelectionTargets =\n selection.mode === 'all' ? allTargets : applications.map(toBulkCandidateTarget);\n const selectedAvailableTargets = availableSelectionTargets.filter((target) =>\n selectedIds.has(target.id)\n );\n const selectionDataComplete = selectedAvailableTargets.length === selectionCount;\n const selectionPostingScoped =\n !!jobPostingFilter &&\n selectionDataComplete &&\n selectedAvailableTargets.every((target) => target.jobPostingId === jobPostingFilter);\n const selectedVisibleCount = visibleApplicationIds.filter((id) => selectedIds.has(id)).length;\n const allVisibleSelected =\n visibleApplicationIds.length > 0 && selectedVisibleCount === visibleApplicationIds.length;\n const canOpenBulkDialog =\n selectionPostingScoped &&\n selectionCount > 0 &&\n !searchPending &&\n !selectionLoading &&\n !bulkPreviewLoading;\n\n const postingsMap = (postingsData?.jobPostings?.items ?? []).reduce<Record<string, JobPosting>>(\n (map: Record<string, JobPosting>, posting: JobPosting) => {\n map[posting.id] = posting;\n return map;\n },\n {}\n );\n\n const materializeCurrentScope = async (\n requestedScope: string\n ): Promise<BulkCandidateTarget[]> => {\n const frozenFilter = freezeJobApplicationFilter(filter);\n const expectedTotal = total;\n\n return materializeCandidateTargets({\n scopeKey: requestedScope,\n expectedTotal,\n getCurrentScopeKey: () => queryScopeTokenRef.current,\n fetchPage: async (limit, offset) => {\n const response = await getBulkCandidateTargets({\n variables: { filter: frozenFilter, limit, offset },\n });\n const page = requireBulkCandidateTargetPage(response);\n return {\n items: page.items.map(toBulkCandidateTarget),\n total: page.total,\n hasMore: page.hasMore,\n };\n },\n });\n };\n\n const selectAllMatching = async () => {\n if (selectionLoading || searchPending || total === 0) return;\n const requestedScope = queryScopeToken;\n setSelectionLoading(true);\n setSelectionError(null);\n try {\n const targets = await materializeCurrentScope(requestedScope);\n if (queryScopeTokenRef.current !== requestedScope) return;\n setAllTargets(targets);\n setSelection(selectAllMaterializedCandidates(targets.map((target) => target.id)));\n } catch (selectionFailure) {\n if (\n selectionFailure instanceof CandidateMaterializationError &&\n selectionFailure.code === 'STALE_SCOPE'\n ) {\n return;\n }\n if (queryScopeTokenRef.current !== requestedScope) return;\n setSelectionError(\n selectionFailure instanceof Error\n ? selectionFailure.message\n : 'Could not load all matching applications.'\n );\n nativeNotify('error');\n } finally {\n if (queryScopeTokenRef.current === requestedScope) setSelectionLoading(false);\n }\n };\n\n const toggleStatusFilter = (status: JobApplicationStatus) => {\n commitFilters({ statuses: toggleInList(filters.statuses, status) });\n };\n\n const toggleRoundStatusFilter = (status: InterviewRoundStatus) => {\n commitFilters({ roundStatuses: toggleInList(filters.roundStatuses, status) });\n };\n\n // Changing the posting invalidates everything scoped to the previous one.\n const changeJobPostingFilter = (postingId: string) => {\n commitFilters({\n jobPostingId: postingId,\n roundConfigId: '',\n configuredRoundState: '',\n duplicateEmail: false,\n });\n };\n\n // Picking a different configured round drops the assignment state chosen for\n // the old one; \"missing this round\" then clears the round-stage chips, which\n // `parseJobApplicationFilters` normalizes for us.\n const changeRoundConfigFilter = (roundConfigId: string) => {\n commitFilters({ roundConfigId, configuredRoundState: '' });\n };\n\n const changeConfiguredRoundStateFilter = (state: ConfiguredRoundState | '') => {\n commitFilters({ configuredRoundState: state });\n };\n\n const openBulkAction = (\n mode: BulkCandidateDialogMode | 'addRound' | 'duplicateNotice' | 'customEmail' | 'updateStatus'\n ) => {\n if (!canOpenBulkDialog || !jobPostingFilter) return;\n\n // Explicit selections are snapshots of the loaded application rows, while\n // all-matching selections were fully materialized when selected. Re-querying\n // the same IDs here only adds a failure point; each mutation performs the\n // authoritative posting, round, and deduplication checks server-side.\n setBulkMode(mode);\n setBulkPreviewTargets(selectedAvailableTargets);\n setBulkPreviewSelection(selection);\n setBulkPreviewError(null);\n setBulkPreviewLoading(false);\n };\n\n const closeBulkAction = () => {\n setBulkMode(null);\n setBulkPreviewTargets([]);\n setBulkPreviewSelection(createEmptyCandidateSelection());\n setBulkPreviewError(null);\n setBulkPreviewLoading(false);\n };\n\n // Resolve human-readable product names for the badges/filter (same one-shot\n // federated lookup the inquiries list uses).\n // The configured-round picker needs the same treatment for a different\n // reason. The posting's `rounds` IS the complete set for the selected\n // posting, so an id missing from it is not a paging artefact — the round was\n // deleted, or the URL pairs it with a posting it does not belong to. Either\n // way `normalizeJobApplicationFilters` keeps it (it only drops the round when\n // there is no posting at all), so it still reaches GraphQL while the select\n // reads \"Any configured round\".\n //\n // Preserved rather than dropped: silently rewriting the URL from query\n // results would add a second data-driven write to a page that deliberately\n // writes only from handlers and one guarded effect, and would risk the loop\n // this design avoids. Showing the id keeps the panel honest about what is\n // narrowing the list, which is what makes an empty result set legible.\n const roundConfigOptions = useMemo<FilterSelectOption[]>(() => {\n const items: FilterSelectOption[] = (selectedPostingData?.jobPosting?.rounds ?? []).map(\n (round: PostingRoundConfig) => ({\n id: round.id,\n label: `Round ${round.roundNumber} — ${round.name}`,\n })\n );\n if (!roundConfigFilter || items.some((option) => option.id === roundConfigFilter)) return items;\n return [...items, { id: roundConfigFilter, label: roundConfigFilter }];\n }, [selectedPostingData, roundConfigFilter]);\n\n // A posting or interviewer restored from the URL has to appear in its own\n // picker even when the independently-fetched option list does not contain it —\n // both lists are capped at 200 and are empty while in flight, and a controlled\n // select with no matching option renders as \"All postings\" / \"Any\n // interviewer\" while the GraphQL filter is still scoped to that id. The label\n // falls back to the raw id, the same fallback the product picker already uses.\n const postingOptions = useMemo<FilterSelectOption[]>(() => {\n const items: FilterSelectOption[] = (postingsData?.jobPostings?.items ?? []).map(\n (posting: JobPosting) => ({ id: posting.id, label: posting.title })\n );\n if (!jobPostingFilter || items.some((option) => option.id === jobPostingFilter)) return items;\n return [...items, { id: jobPostingFilter, label: jobPostingFilter }];\n }, [postingsData, jobPostingFilter]);\n\n // Reads `interviewersData` rather than the `interviewers` array above: that\n // array is rebuilt every render, so depending on it would defeat the memo.\n const interviewerOptions = useMemo<FilterSelectOption[]>(() => {\n const items: FilterSelectOption[] = (interviewersData?.interviewers?.items ?? []).map(\n (interviewer: Interviewer) => ({ id: interviewer.id, label: interviewer.name })\n );\n if (!interviewerFilter || items.some((option) => option.id === interviewerFilter)) return items;\n return [...items, { id: interviewerFilter, label: interviewerFilter }];\n }, [interviewersData, interviewerFilter]);\n\n // The product restored from the URL has to be an option in its own picker\n // even when it is not represented in the current result set — a filter that\n // narrows to zero applications would otherwise leave the controlled select\n // falling back to \"All products\" while the query is still scoped to it.\n const productIds = Array.from(\n new Set([\n ...applications.flatMap((a: JobApplication): string[] => (a.productId ? [a.productId] : [])),\n ...(productFilter ? [productFilter] : []),\n ])\n ).sort() as string[];\n const productIdsKey = productIds.join(',');\n useEffect(() => {\n const unknownIds = productIdsKey\n ? productIdsKey.split(',').filter((pid) => !productNamesRef.current[pid])\n : [];\n if (unknownIds.length === 0) return;\n unknownIds.forEach((pid) => {\n graphqlFetch<{ platformProduct?: { name?: string } }>({\n gateway: 'global',\n query: 'query($id: ID!) { platformProduct(id: $id) { name } }',\n variables: { id: pid },\n })\n .then((result) => {\n const name = result.data?.platformProduct?.name;\n if (name) setProductNames((prev) => ({ ...prev, [pid]: name }));\n })\n .catch(() => {});\n });\n }, [productIdsKey]);\n\n const loadMore = async () => {\n if (!hasMore || loadingMore) return;\n const requestedOffset = nextOffsetRef.current;\n const requestedScope = queryScopeToken;\n setLoadingMore(true);\n try {\n const result = await fetchMore({\n variables: { offset: requestedOffset },\n updateQuery: (previous, { fetchMoreResult }) => {\n if (!fetchMoreResult) return previous;\n const merged = new Map<string, JobApplication>();\n for (const application of previous.jobApplications?.items ?? []) {\n merged.set(application.id, application);\n }\n for (const application of fetchMoreResult.jobApplications?.items ?? []) {\n merged.set(application.id, application);\n }\n return {\n jobApplications: {\n ...fetchMoreResult.jobApplications,\n items: Array.from(merged.values()),\n },\n };\n },\n });\n if (queryScopeTokenRef.current === requestedScope) {\n nextOffsetRef.current =\n requestedOffset + (result.data.jobApplications?.items.length ?? APPLICATION_PAGE_SIZE);\n }\n } catch (loadError) {\n console.error('Failed to load more applications:', loadError);\n nativeNotify('error');\n } finally {\n if (queryScopeTokenRef.current === requestedScope) setLoadingMore(false);\n }\n };\n\n const resetCandidateDialog = () => {\n setCandidateForm(emptyCandidateForm);\n setCandidateErrors({});\n setResumeFile(null);\n setResumeFileError('');\n };\n\n const handleResumeFileChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n const file = e.target.files?.[0] ?? null;\n setResumeFileError('');\n if (!file) {\n setResumeFile(null);\n return;\n }\n if (file.size > RESUME_MAX_BYTES) {\n setResumeFileError('Resume must be 10 MB or smaller.');\n setResumeFile(null);\n e.target.value = '';\n return;\n }\n const extension = file.name.toLowerCase().split('.').pop() ?? '';\n if (!RESUME_MIME_TYPES.has(file.type) && !['pdf', 'doc', 'docx'].includes(extension)) {\n setResumeFileError('Resume must be a PDF, DOC, or DOCX file.');\n setResumeFile(null);\n e.target.value = '';\n return;\n }\n setResumeFile(file);\n };\n\n const validateCandidateForm = (): boolean => {\n const errors: Record<string, string> = {};\n if (!candidateForm.name.trim()) errors.name = 'Name is required';\n if (!candidateForm.email.trim()) errors.email = 'Email is required';\n else if (!/^\\S+@\\S+\\.\\S+$/.test(candidateForm.email.trim()))\n errors.email = 'Enter a valid email';\n if (!candidateForm.source.trim()) errors.source = 'Source is required';\n if (candidateForm.jobPostingId === POSTING_NONE && !candidateForm.position.trim()) {\n errors.position = 'Position is required when no job posting is selected';\n }\n setCandidateErrors(errors);\n return Object.keys(errors).length === 0;\n };\n\n const handleCreateCandidate = async (e: React.FormEvent) => {\n e.preventDefault();\n if (!validateCandidateForm()) return;\n setSubmittingCandidate(true);\n try {\n let resumeFileName: string | undefined;\n let resumeBase64: string | undefined;\n let resumeMimeType: string | undefined;\n if (resumeFile) {\n resumeBase64 = await readFileAsBase64(resumeFile);\n resumeFileName = resumeFile.name;\n resumeMimeType = resumeFile.type || undefined;\n }\n const hasPosting = candidateForm.jobPostingId !== POSTING_NONE;\n const result = await createJobApplication({\n variables: {\n input: {\n name: candidateForm.name.trim(),\n email: candidateForm.email.trim(),\n phone: candidateForm.phone.trim() || undefined,\n jobPostingId: hasPosting ? candidateForm.jobPostingId : undefined,\n // Backend derives position/department from the posting; free-text\n // position is only a fallback when no posting is selected.\n position: !hasPosting ? candidateForm.position.trim() || undefined : undefined,\n source: candidateForm.source.trim(),\n linkedin: candidateForm.linkedin.trim() || undefined,\n portfolio: candidateForm.portfolio.trim() || undefined,\n coverLetter: candidateForm.coverLetter.trim() || undefined,\n resumeFileName,\n resumeBase64,\n resumeMimeType,\n },\n },\n refetchQueries: ['GetJobApplications'],\n });\n const newId = result.data?.createJobApplication?.id;\n nativeNotify('success');\n setAddDialogOpen(false);\n resetCandidateDialog();\n if (newId) navigate(`/support/applications/${newId}${queryParams}`);\n } catch (err) {\n console.error('Failed to create candidate:', err);\n nativeNotify('error');\n } finally {\n setSubmittingCandidate(false);\n }\n };\n\n const groupedApplications = statusOrder.reduce<Record<JobApplicationStatus, JobApplication[]>>(\n (groups: Record<JobApplicationStatus, JobApplication[]>, status: JobApplicationStatus) => {\n groups[status] = applications.filter((a: JobApplication) => a.status === status);\n return groups;\n },\n {} as Record<JobApplicationStatus, JobApplication[]>\n );\n\n const renderApplicationCard = (application: JobApplication, compact = false) => {\n const postingTitle = application.jobPostingId\n ? postingsMap[application.jobPostingId]?.title\n : undefined;\n const selected = selectedIds.has(application.id);\n\n return (\n <div\n key={application.id}\n className={`w-full bg-bg-surface border rounded-lg shadow-[var(--shadow-pop)] hover:border-border-strong hover:shadow-[var(--shadow-pop-hover)] transition-[box-shadow,border-color] duration-200 group flex items-start gap-2 ${compact ? 'p-3' : 'p-4'} ${selected ? 'border-primary' : 'border-border-seam'}`}\n >\n <div className=\"pt-0.5\">\n <Checkbox\n checked={selected}\n disabled={selectionLoading || searchPending}\n onCheckedChange={() =>\n setSelection((previous) => toggleCandidateSelection(previous, application.id))\n }\n aria-label={`Select ${application.firstName} ${application.lastName}`}\n />\n </div>\n <button\n type=\"button\"\n onClick={() => navigate(`/support/applications/${application.id}${queryParams}`)}\n className=\"flex-1 min-w-0 text-left\"\n >\n <div className={`flex ${compact ? 'flex-col' : 'items-start'} justify-between gap-3`}>\n <div className=\"flex-1 min-w-0\">\n <div\n className={`flex items-center gap-2 mb-1 ${compact ? 'flex-wrap' : 'flex-wrap'}`}\n >\n <h3\n className={`font-semibold text-text-primary truncate group-hover:text-primary transition-colors ${compact ? 'text-sm' : 'text-sm'}`}\n >\n {application.firstName} {application.lastName}\n </h3>\n <Badge\n variant=\"secondary\"\n className={`${statusColors[application.status] || statusColors.NEW} ${application.status === 'NEW' ? 'motion-safe:animate-vc-glow-pulse' : ''}`}\n >\n {statusLabels[application.status] || application.status}\n </Badge>\n {postingTitle && (\n <Badge variant=\"outline\" title={`Job posting: ${postingTitle}`}>\n {postingTitle}\n </Badge>\n )}\n {application.productId && productNames[application.productId] && (\n <Badge\n variant=\"secondary\"\n className=\"bg-accent-purple-subtle text-accent-purple\"\n title={`Product: ${productNames[application.productId]}`}\n >\n {productNames[application.productId]}\n </Badge>\n )}\n {application.resumeFileName && (\n <Badge\n variant=\"secondary\"\n className=\"bg-accent-blue-subtle text-accent-blue gap-1\"\n >\n <Paperclip size={compact ? 10 : 11} />\n Resume\n </Badge>\n )}\n </div>\n <p className={`text-text-secondary mb-1 ${compact ? 'text-xs' : 'text-sm'}`}>\n <span className=\"font-medium\">{application.position}</span>\n {application.department && (\n <>\n <span className=\"mx-1.5 text-text-secondary/50\">·</span>\n <span>{application.department}</span>\n </>\n )}\n </p>\n <p className={`text-text-secondary truncate ${compact ? 'text-[11px]' : 'text-xs'}`}>\n {application.email}\n </p>\n </div>\n <div\n className={`text-text-secondary whitespace-nowrap ${compact ? 'text-[11px]' : 'text-xs'}`}\n >\n {timeAgo(application.createdAt)}\n </div>\n </div>\n </button>\n </div>\n );\n };\n\n // Loading state\n if (loading && applications.length === 0) {\n return (\n <div className=\"p-6\">\n <div className=\"flex items-center gap-3 mb-6\">\n <Briefcase size={24} className=\"text-text-primary\" />\n <h1 className=\"text-2xl font-bold text-text-primary\">Job Applications</h1>\n </div>\n <div className=\"flex flex-col items-center justify-center py-16\">\n <Loader2 size={32} className=\"animate-spin text-text-secondary mb-4\" />\n <p className=\"text-sm text-text-secondary\">Loading applications…</p>\n </div>\n </div>\n );\n }\n\n // Error state\n if (error) {\n return (\n <div className=\"p-6\">\n <div className=\"flex items-center gap-3 mb-6\">\n <Briefcase size={24} className=\"text-text-primary\" />\n <h1 className=\"text-2xl font-bold text-text-primary\">Job Applications</h1>\n </div>\n <div className=\"flex flex-col items-center justify-center py-16 text-center\">\n <div className=\"p-4 rounded-2xl bg-status-error-bg-subtle text-status-error-text mb-4\">\n <AlertCircle size={48} />\n </div>\n <h3 className=\"text-lg font-semibold text-text-primary mb-2\">\n Failed to load applications\n </h3>\n <p className=\"text-sm text-text-secondary\">{error.message}</p>\n </div>\n </div>\n );\n }\n\n return (\n <div className=\"p-6\">\n {/* Header */}\n <div className=\"flex items-center justify-between mb-6\">\n <div className=\"flex items-center gap-3\">\n <Briefcase size={24} className=\"text-text-primary\" />\n <div>\n <h1 className=\"text-2xl font-bold text-text-primary\">Job Applications</h1>\n <p className=\"text-sm text-text-secondary\">Careers form submissions</p>\n </div>\n <Badge variant=\"secondary\" className=\"ml-2\">\n {total}\n </Badge>\n </div>\n <Button onClick={() => setAddDialogOpen(true)}>\n <Plus size={18} />\n Add Candidate\n </Button>\n </div>\n\n {applications.length > 0 && (\n <div className=\"mb-4 -mt-2 space-y-2\">\n <div className=\"flex flex-wrap items-center gap-2\">\n <Checkbox\n checked={\n allVisibleSelected ? true : selectedVisibleCount > 0 ? 'indeterminate' : false\n }\n disabled={selectionLoading || searchPending}\n onCheckedChange={(checked) =>\n setSelection((previous) =>\n setVisibleCandidateSelection(previous, visibleApplicationIds, checked === true)\n )\n }\n aria-label=\"Select all visible applications\"\n />\n {selectionCount > 0 ? (\n <BulkSelectionSummary selection={selection} />\n ) : (\n <span className=\"text-xs text-text-secondary\">\n Select all {applications.length} visible applications\n </span>\n )}\n {total > 0 && (selection.mode !== 'all' || selection.excludedIds.size > 0) ? (\n <Button\n type=\"button\"\n variant=\"ghost\"\n size=\"sm\"\n onClick={() => void selectAllMatching()}\n disabled={selectionLoading || searchPending}\n >\n {selectionLoading ? <Loader2 size={14} className=\"animate-spin\" /> : null}\n Select all {total} matching applications\n </Button>\n ) : null}\n {selectionCount > 0 ? (\n <button\n type=\"button\"\n onClick={() => {\n setSelection(createEmptyCandidateSelection());\n setAllTargets([]);\n setSelectionError(null);\n }}\n disabled={selectionLoading}\n className=\"text-xs text-text-secondary underline hover:text-text-primary disabled:cursor-not-allowed disabled:opacity-50\"\n >\n Clear\n </button>\n ) : null}\n </div>\n {selectionError ? (\n <p className=\"text-sm text-status-error-text\" role=\"alert\">\n {selectionError}\n </p>\n ) : null}\n </div>\n )}\n\n {selectionCount > 0 && (\n <div className=\"mb-4 flex flex-col justify-between gap-3 rounded-lg border border-primary/30 bg-primary/5 p-3 sm:flex-row sm:items-center\">\n <div>\n {!jobPostingFilter ? (\n <p className=\"text-xs text-text-secondary\">\n Filter to one job posting to enable bulk candidate actions.\n </p>\n ) : !selectionPostingScoped ? (\n <p className=\"text-xs text-status-error-text\">\n Some selected applications are no longer available in this posting. Clear and select\n again.\n </p>\n ) : (\n <p className=\"text-xs text-text-secondary\">\n Bulk actions run sequential requests of no more than 100 candidates each.\n </p>\n )}\n </div>\n <div className=\"flex flex-wrap items-center gap-2\">\n <Button\n variant=\"outline\"\n size=\"sm\"\n disabled={!canOpenBulkDialog}\n onClick={() => void openBulkAction('addRound')}\n className=\"gap-2\"\n >\n <UserPlus size={14} />\n Add Selected to Round\n </Button>\n <Button\n variant=\"outline\"\n size=\"sm\"\n disabled={!canOpenBulkDialog}\n onClick={() => void openBulkAction('message')}\n className=\"gap-2\"\n >\n <Send size={14} />\n Send Message\n </Button>\n <Button\n variant=\"outline\"\n size=\"sm\"\n disabled={!canOpenBulkDialog}\n onClick={() => void openBulkAction('assignment')}\n className=\"gap-2\"\n >\n <Shuffle size={14} />\n Assign & Email Random Take-Home\n </Button>\n <Button\n variant=\"outline\"\n size=\"sm\"\n disabled={!canOpenBulkDialog}\n onClick={() => void openBulkAction('duplicateNotice')}\n className=\"gap-2\"\n >\n <Mail size={14} />\n Notify Duplicate Applicants\n </Button>\n <Button\n variant=\"outline\"\n size=\"sm\"\n disabled={!canOpenBulkDialog}\n onClick={() => void openBulkAction('customEmail')}\n className=\"gap-2\"\n >\n <Mail size={14} />\n Send Custom Email\n </Button>\n <Button\n variant=\"outline\"\n size=\"sm\"\n disabled={!canOpenBulkDialog}\n onClick={() => void openBulkAction('updateStatus')}\n className=\"gap-2\"\n >\n <Tag size={14} />\n Update Status\n </Button>\n </div>\n </div>\n )}\n\n <PagePurpose className=\"mb-6\">\n Candidates who apply through your careers pages show up here. Review resumes and move\n applicants through your hiring pipeline — from new submission to screening, interview and\n hire — so promising people get a timely response. Open an application to see the full\n profile and resume.\n </PagePurpose>\n\n {/* Toolbar */}\n <div className=\"flex flex-col sm:flex-row items-stretch sm:items-center gap-4 p-4 rounded-xl border border-border-seam bg-bg-surface mb-6\">\n {/* Search */}\n <div className=\"relative flex-1\">\n <Search\n size={18}\n className=\"absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary\"\n />\n <Input\n type=\"text\"\n aria-label=\"Search applications\"\n placeholder=\"Search by name, email, or position...\"\n value={search}\n onChange={(e: React.ChangeEvent<HTMLInputElement>) => setSearch(e.target.value)}\n className=\"pl-10\"\n />\n </div>\n\n {/* View mode toggle */}\n <div className=\"flex items-center gap-1 p-1 rounded-lg border bg-bg-sunken/50\">\n <Button\n variant={viewMode === 'list' ? 'secondary' : 'ghost'}\n size=\"sm\"\n onClick={() => setViewMode('list')}\n className=\"px-3\"\n aria-label=\"Show applications as a list\"\n >\n <List size={18} />\n </Button>\n <Button\n variant={viewMode === 'kanban' ? 'secondary' : 'ghost'}\n size=\"sm\"\n onClick={() => setViewMode('kanban')}\n className=\"px-3\"\n aria-label=\"Show applications as a kanban board\"\n >\n <Grid size={18} />\n </Button>\n </div>\n\n {/* Filter toggle */}\n <Button\n variant={showFilters ? 'secondary' : 'outline'}\n size=\"sm\"\n onClick={toggleFilters}\n className=\"gap-2\"\n aria-expanded={showFilters}\n >\n <Filter size={16} />\n Filters\n {activeFilterCount > 0 ? (\n <span\n className=\"rounded-full bg-action-primary-bg px-1.5 py-0.5 text-[10px] font-semibold leading-none text-action-primary-text\"\n aria-label={`${activeFilterCount} active ${activeFilterCount === 1 ? 'filter' : 'filters'}`}\n >\n {activeFilterCount}\n </span>\n ) : null}\n <ChevronDown\n size={14}\n className={showFilters ? 'rotate-180 transition-transform' : 'transition-transform'}\n />\n </Button>\n\n {/* Filters now survive the trip into a submission and back, so there\n has to be one obvious way out of them. */}\n {filtersApplied ? (\n <Button variant=\"ghost\" size=\"sm\" onClick={clearAllFilters} className=\"gap-2\">\n <X size={16} />\n Clear all\n </Button>\n ) : null}\n </div>\n\n {/* Filters panel */}\n {showFilters && (\n <div className=\"mb-6 p-4 bg-bg-surface border border-border-seam rounded-lg space-y-4\">\n <div>\n <p className=\"block text-xs font-medium text-text-secondary mb-1.5\">\n Status <span className=\"font-normal\">(select any number)</span>\n </p>\n <div className=\"flex flex-wrap gap-1.5\">\n {statusOrder.map((s) => {\n const active = statusFilters.has(s);\n return (\n <button\n key={s}\n type=\"button\"\n onClick={() => toggleStatusFilter(s)}\n aria-pressed={active}\n className={`px-2.5 py-1 rounded-full text-xs font-medium border transition-colors ${\n active\n ? `${statusColors[s]} border-transparent`\n : 'bg-bg-surface text-text-secondary border-border-seam hover:border-border-strong'\n }`}\n >\n {statusLabels[s]}\n </button>\n );\n })}\n {statusFilters.size > 0 && (\n <button\n type=\"button\"\n onClick={() => commitFilters({ statuses: [] })}\n className=\"px-2.5 py-1 rounded-full text-xs font-medium text-text-secondary hover:text-text-primary underline\"\n >\n Clear\n </button>\n )}\n </div>\n </div>\n <div>\n <p className=\"block text-xs font-medium text-text-secondary mb-1.5\">\n Interview round stage{' '}\n <span className=\"font-normal\">\n {roundConfigFilter ? '(for the exact configured round)' : '(select any number)'}\n </span>\n </p>\n <div className=\"flex flex-wrap gap-1.5\">\n {roundStatusOrder.map((s) => {\n const active = roundStatusFilters.has(s);\n const config = roundStatusConfig[s];\n const disabled = configuredRoundStateFilter === ConfiguredRoundState.Missing;\n return (\n <button\n key={s}\n type=\"button\"\n onClick={() => toggleRoundStatusFilter(s)}\n aria-pressed={active}\n disabled={disabled}\n className={`px-2.5 py-1 rounded-full text-xs font-medium border transition-colors disabled:cursor-not-allowed disabled:opacity-50 ${\n active\n ? `${config.className} border-transparent`\n : 'bg-bg-surface text-text-secondary border-border-seam hover:border-border-strong'\n }`}\n >\n {config.label}\n </button>\n );\n })}\n {roundStatusFilters.size > 0 && (\n <button\n type=\"button\"\n onClick={() => commitFilters({ roundStatuses: [] })}\n className=\"px-2.5 py-1 rounded-full text-xs font-medium text-text-secondary hover:text-text-primary underline\"\n >\n Clear\n </button>\n )}\n </div>\n </div>\n <div className=\"grid grid-cols-1 sm:grid-cols-2 xl:grid-cols-4 gap-4\">\n <div>\n <label\n htmlFor=\"job-app-product-filter\"\n className=\"block text-xs font-medium text-text-secondary mb-1\"\n >\n Product\n </label>\n <select\n id=\"job-app-product-filter\"\n value={productFilter}\n onChange={(e) => commitFilters({ productId: e.target.value })}\n className=\"w-full px-3 py-2 bg-surface border border-default rounded-lg text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-accent/50\"\n >\n <option value=\"\">All products</option>\n {productIds.map((pid) => (\n <option key={pid} value={pid}>\n {productNames[pid] || pid}\n </option>\n ))}\n </select>\n </div>\n <div>\n <label\n htmlFor=\"job-app-posting-filter\"\n className=\"block text-xs font-medium text-text-secondary mb-1\"\n >\n Job Posting\n </label>\n <select\n id=\"job-app-posting-filter\"\n value={jobPostingFilter}\n onChange={(e) => changeJobPostingFilter(e.target.value)}\n disabled={postingsLoading}\n className=\"w-full px-3 py-2 bg-surface border border-default rounded-lg text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-accent/50 disabled:opacity-50\"\n >\n <option value=\"\">All postings</option>\n {postingOptions.map((option) => (\n <option key={option.id} value={option.id}>\n {option.label}\n </option>\n ))}\n </select>\n </div>\n <div>\n <label\n htmlFor=\"job-app-round-config-filter\"\n className=\"block text-xs font-medium text-text-secondary mb-1\"\n >\n Exact configured round\n </label>\n <select\n id=\"job-app-round-config-filter\"\n value={roundConfigFilter}\n onChange={(e) => changeRoundConfigFilter(e.target.value)}\n disabled={!jobPostingFilter || selectedPostingLoading}\n className=\"w-full px-3 py-2 bg-surface border border-default rounded-lg text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-accent/50 disabled:opacity-50\"\n >\n <option value=\"\">Any configured round</option>\n {roundConfigOptions.map((option) => (\n <option key={option.id} value={option.id}>\n {option.label}\n </option>\n ))}\n </select>\n </div>\n <div>\n <label\n htmlFor=\"job-app-configured-round-state-filter\"\n className=\"block text-xs font-medium text-text-secondary mb-1\"\n >\n Exact round assignment\n </label>\n <select\n id=\"job-app-configured-round-state-filter\"\n value={configuredRoundStateFilter}\n onChange={(e) =>\n changeConfiguredRoundStateFilter(\n Object.values(ConfiguredRoundState).find((state) => state === e.target.value) ??\n ''\n )\n }\n disabled={!roundConfigFilter}\n className=\"w-full px-3 py-2 bg-surface border border-default rounded-lg text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-accent/50 disabled:opacity-50\"\n >\n <option value=\"\">Any assignment state</option>\n <option value={ConfiguredRoundState.Missing}>Missing this round</option>\n <option value={ConfiguredRoundState.Unassigned}>Round exists, no assignment</option>\n <option value={ConfiguredRoundState.Assigned}>Assignment already attached</option>\n </select>\n </div>\n <div className=\"flex items-end\">\n <label\n htmlFor=\"job-app-duplicate-email-filter\"\n className={`flex items-center gap-2 rounded-lg border border-default bg-surface px-3 py-2 text-sm ${\n jobPostingFilter\n ? 'cursor-pointer text-text-primary'\n : 'cursor-not-allowed text-text-secondary opacity-50'\n }`}\n >\n <Checkbox\n id=\"job-app-duplicate-email-filter\"\n checked={duplicateEmailFilter}\n onCheckedChange={(checked) => commitFilters({ duplicateEmail: checked === true })}\n disabled={!jobPostingFilter}\n />\n Duplicate email only\n </label>\n </div>\n <div>\n <label\n htmlFor=\"job-app-assignment-owner-filter\"\n className=\"block text-xs font-medium text-text-secondary mb-1\"\n >\n Assignment owner email\n </label>\n <input\n id=\"job-app-assignment-owner-filter\"\n type=\"text\"\n value={assignmentOwnerFilter}\n onChange={(e) => setAssignmentOwnerFilter(e.target.value)}\n placeholder=\"owner@example.com\"\n className=\"w-full px-3 py-2 bg-surface border border-default rounded-lg text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-accent/50\"\n />\n </div>\n <div>\n <label\n htmlFor=\"job-app-interviewer-filter\"\n className=\"block text-xs font-medium text-text-secondary mb-1\"\n >\n Reviewing interviewer\n </label>\n <select\n id=\"job-app-interviewer-filter\"\n value={interviewerFilter}\n onChange={(e) => commitFilters({ interviewerId: e.target.value })}\n disabled={interviewersLoading}\n className=\"w-full px-3 py-2 bg-surface border border-default rounded-lg text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-accent/50 disabled:opacity-50\"\n >\n <option value=\"\">Any interviewer</option>\n {interviewerOptions.map((option) => (\n <option key={option.id} value={option.id}>\n {option.label}\n </option>\n ))}\n </select>\n </div>\n </div>\n {duplicateEmailFilter && jobPostingFilter ? (\n <p className=\"text-xs text-text-secondary\">\n Showing only candidates whose email matches another application for this same posting.\n Select the ones you want to reach and use <strong>Notify Duplicate Applicants</strong>{' '}\n — one notice goes out per email, not per application.\n </p>\n ) : null}\n {roundConfigFilter && configuredRoundStateFilter === ConfiguredRoundState.Unassigned ? (\n <p className=\"text-xs text-text-secondary\">\n For the next assignment batch, select <strong>Scheduled</strong> above. Successful\n sends move the exact round to <strong>Awaiting Submission</strong>, so those\n candidates leave this filtered queue after refresh.\n </p>\n ) : null}\n </div>\n )}\n {applications.length === 0 ? (\n <IllustratedEmptyState\n illustration=\"empty-people\"\n title=\"No applications yet\"\n description=\"Job applications from your careers pages will appear here.\"\n />\n ) : (\n <>\n {viewMode === 'list' ? (\n <div className=\"space-y-3\">\n {applications.map((application: JobApplication) =>\n renderApplicationCard(application)\n )}\n </div>\n ) : (\n <div className=\"flex gap-4 overflow-x-auto pb-4\">\n {statusOrder.map((status) => {\n const group = groupedApplications[status] ?? [];\n return (\n <div\n key={status}\n className=\"flex flex-col gap-3 w-[280px] flex-shrink-0 max-h-[calc(100vh-280px)]\"\n >\n <div className=\"flex items-center justify-between px-1\">\n <h3 className=\"text-sm font-semibold text-text-primary\">\n {statusLabels[status]}\n </h3>\n <Badge variant=\"secondary\" className={statusColors[status]}>\n {group.length}\n </Badge>\n </div>\n <div className=\"flex flex-col gap-3 overflow-y-auto pr-1\">\n {group.length === 0 && (\n <div className=\"text-center py-6 px-3 rounded-lg border border-dashed border-border-seam bg-bg-sunken/30\">\n <p className=\"text-xs text-text-secondary\">No applications</p>\n </div>\n )}\n {group.map((application) => renderApplicationCard(application, true))}\n </div>\n </div>\n );\n })}\n </div>\n )}\n\n {/* Load more */}\n {hasMore && (\n <div className=\"flex justify-center mt-6\">\n <Button\n variant=\"outline\"\n size=\"sm\"\n onClick={() => void loadMore()}\n disabled={loadingMore}\n className=\"gap-2\"\n >\n {loadingMore ? <Loader2 size={14} className=\"animate-spin\" /> : null}\n Load more\n </Button>\n </div>\n )}\n </>\n )}\n\n {/* Add Candidate dialog — manual entry for applications that did not come\n through a careers form (referrals, walk-ins, recruiter sourcing). */}\n <Dialog\n open={addDialogOpen}\n onOpenChange={(open) => {\n setAddDialogOpen(open);\n if (!open) resetCandidateDialog();\n }}\n >\n <DialogContent className=\"sm:max-w-2xl max-h-[90vh] overflow-y-auto\">\n <DialogHeader>\n <DialogTitle>Add Candidate</DialogTitle>\n <DialogDescription>\n Manually add a candidate to the hiring pipeline. Resumes are optional and can be\n attached as PDF, DOC, or DOCX (max 10 MB).\n </DialogDescription>\n </DialogHeader>\n\n <form id=\"add-candidate-form\" onSubmit={handleCreateCandidate} className=\"space-y-4\">\n <div className=\"grid grid-cols-1 sm:grid-cols-2 gap-4\">\n <div className=\"space-y-1.5\">\n <Label htmlFor=\"candidate-name\">\n Name <span className=\"text-status-error-text\">*</span>\n </Label>\n <Input\n id=\"candidate-name\"\n value={candidateForm.name}\n onChange={(e: React.ChangeEvent<HTMLInputElement>) =>\n setCandidateForm((prev) => ({ ...prev, name: e.target.value }))\n }\n placeholder=\"Full name\"\n aria-invalid={!!candidateErrors.name}\n />\n {candidateErrors.name && (\n <p className=\"text-xs text-status-error-text\">{candidateErrors.name}</p>\n )}\n </div>\n\n <div className=\"space-y-1.5\">\n <Label htmlFor=\"candidate-email\">\n Email <span className=\"text-status-error-text\">*</span>\n </Label>\n <Input\n id=\"candidate-email\"\n type=\"email\"\n value={candidateForm.email}\n onChange={(e: React.ChangeEvent<HTMLInputElement>) =>\n setCandidateForm((prev) => ({ ...prev, email: e.target.value }))\n }\n placeholder=\"email@example.com\"\n aria-invalid={!!candidateErrors.email}\n />\n {candidateErrors.email && (\n <p className=\"text-xs text-status-error-text\">{candidateErrors.email}</p>\n )}\n </div>\n </div>\n\n <div className=\"grid grid-cols-1 sm:grid-cols-2 gap-4\">\n <div className=\"space-y-1.5\">\n <Label htmlFor=\"candidate-phone\">Phone</Label>\n <Input\n id=\"candidate-phone\"\n value={candidateForm.phone}\n onChange={(e: React.ChangeEvent<HTMLInputElement>) =>\n setCandidateForm((prev) => ({ ...prev, phone: e.target.value }))\n }\n placeholder=\"+91 98765 43210\"\n />\n </div>\n\n <div className=\"space-y-1.5\">\n <Label htmlFor=\"candidate-source\">\n Source <span className=\"text-status-error-text\">*</span>\n </Label>\n <Input\n id=\"candidate-source\"\n list=\"candidate-source-suggestions\"\n value={candidateForm.source}\n onChange={(e: React.ChangeEvent<HTMLInputElement>) =>\n setCandidateForm((prev) => ({ ...prev, source: e.target.value }))\n }\n placeholder=\"e.g. LinkedIn\"\n aria-invalid={!!candidateErrors.source}\n />\n <datalist id=\"candidate-source-suggestions\">\n {SOURCE_SUGGESTIONS.map((suggestion) => (\n <option key={suggestion} value={suggestion} />\n ))}\n </datalist>\n {candidateErrors.source && (\n <p className=\"text-xs text-status-error-text\">{candidateErrors.source}</p>\n )}\n </div>\n </div>\n\n <div className=\"grid grid-cols-1 sm:grid-cols-2 gap-4\">\n <div className=\"space-y-1.5\">\n <Label htmlFor=\"candidate-job-posting\">Job Posting</Label>\n <Select\n value={candidateForm.jobPostingId}\n onValueChange={(value) =>\n setCandidateForm((prev) => ({ ...prev, jobPostingId: value }))\n }\n disabled={postingsLoading}\n >\n <SelectTrigger id=\"candidate-job-posting\">\n <SelectValue placeholder=\"Select an open posting\" />\n </SelectTrigger>\n <SelectContent>\n <SelectItem value={POSTING_NONE}>No posting (manual entry)</SelectItem>\n {openPostings.map((posting: JobPosting) => (\n <SelectItem key={posting.id} value={posting.id}>\n {posting.title}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n <p className=\"text-xs text-text-secondary\">\n Position and department are derived from the selected posting.\n </p>\n </div>\n\n <div className=\"space-y-1.5\">\n <Label htmlFor=\"candidate-position\">\n Position{' '}\n {candidateForm.jobPostingId === POSTING_NONE && (\n <span className=\"text-status-error-text\">*</span>\n )}\n </Label>\n <Input\n id=\"candidate-position\"\n value={candidateForm.position}\n onChange={(e: React.ChangeEvent<HTMLInputElement>) =>\n setCandidateForm((prev) => ({ ...prev, position: e.target.value }))\n }\n placeholder=\"e.g. Product Engineer\"\n disabled={candidateForm.jobPostingId !== POSTING_NONE}\n aria-invalid={!!candidateErrors.position}\n />\n {candidateErrors.position && (\n <p className=\"text-xs text-status-error-text\">{candidateErrors.position}</p>\n )}\n </div>\n </div>\n\n <div className=\"grid grid-cols-1 sm:grid-cols-2 gap-4\">\n <div className=\"space-y-1.5\">\n <Label htmlFor=\"candidate-linkedin\">LinkedIn</Label>\n <Input\n id=\"candidate-linkedin\"\n value={candidateForm.linkedin}\n onChange={(e: React.ChangeEvent<HTMLInputElement>) =>\n setCandidateForm((prev) => ({ ...prev, linkedin: e.target.value }))\n }\n placeholder=\"https://linkedin.com/in/…\"\n />\n </div>\n\n <div className=\"space-y-1.5\">\n <Label htmlFor=\"candidate-portfolio\">Portfolio</Label>\n <Input\n id=\"candidate-portfolio\"\n value={candidateForm.portfolio}\n onChange={(e: React.ChangeEvent<HTMLInputElement>) =>\n setCandidateForm((prev) => ({ ...prev, portfolio: e.target.value }))\n }\n placeholder=\"https://…\"\n />\n </div>\n </div>\n\n <div className=\"space-y-1.5\">\n <Label htmlFor=\"candidate-cover-letter\">Cover Letter</Label>\n <Textarea\n id=\"candidate-cover-letter\"\n value={candidateForm.coverLetter}\n onChange={(e: React.ChangeEvent<HTMLTextAreaElement>) =>\n setCandidateForm((prev) => ({ ...prev, coverLetter: e.target.value }))\n }\n placeholder=\"Notes or cover letter from the candidate\"\n rows={4}\n />\n </div>\n\n <div className=\"space-y-1.5\">\n <Label htmlFor=\"candidate-resume\">Resume (optional)</Label>\n <Input\n id=\"candidate-resume\"\n type=\"file\"\n accept={RESUME_ACCEPT}\n onChange={handleResumeFileChange}\n />\n <p className=\"text-xs text-text-secondary flex items-center gap-1\">\n <Paperclip size={11} />\n PDF, DOC, or DOCX up to 10 MB.\n {resumeFile ? ` Selected: ${resumeFile.name}` : ''}\n </p>\n {resumeFileError && (\n <p className=\"text-xs text-status-error-text\">{resumeFileError}</p>\n )}\n </div>\n </form>\n\n <DialogFooter>\n <Button\n type=\"button\"\n variant=\"outline\"\n onClick={() => {\n setAddDialogOpen(false);\n resetCandidateDialog();\n }}\n disabled={submittingCandidate}\n >\n Cancel\n </Button>\n <Button type=\"submit\" form=\"add-candidate-form\" disabled={submittingCandidate}>\n {submittingCandidate ? (\n <>\n <Loader2 size={16} className=\"animate-spin mr-2\" />\n Adding…\n </>\n ) : (\n <>\n <UserPlus size={16} className=\"mr-2\" />\n Add Candidate\n </>\n )}\n </Button>\n </DialogFooter>\n </DialogContent>\n </Dialog>\n\n {bulkMode === 'message' || bulkMode === 'assignment' ? (\n <BulkCandidateSendDialog\n mode={bulkMode}\n open\n onClose={closeBulkAction}\n onOpenAddRound={() => void openBulkAction('addRound')}\n targets={bulkPreviewTargets}\n selection={bulkPreviewSelection}\n jobPostingId={jobPostingFilter}\n previewLoading={bulkPreviewLoading}\n previewError={bulkPreviewError}\n />\n ) : null}\n\n {bulkMode === 'addRound' ? (\n <AddSelectedToRoundDialog\n open\n onClose={closeBulkAction}\n targets={bulkPreviewTargets}\n selection={bulkPreviewSelection}\n jobPostingId={jobPostingFilter}\n previewLoading={bulkPreviewLoading}\n previewError={bulkPreviewError}\n />\n ) : null}\n\n {bulkMode === 'duplicateNotice' ? (\n <NotifyDuplicateApplicantsDialog\n open\n onClose={closeBulkAction}\n targets={bulkPreviewTargets}\n selection={bulkPreviewSelection}\n jobPostingId={jobPostingFilter}\n previewLoading={bulkPreviewLoading}\n previewError={bulkPreviewError}\n />\n ) : null}\n\n {bulkMode === 'customEmail' ? (\n <BulkCustomEmailDialog\n open\n onClose={closeBulkAction}\n targets={bulkPreviewTargets}\n selection={bulkPreviewSelection}\n jobPostingId={jobPostingFilter}\n previewLoading={bulkPreviewLoading}\n previewError={bulkPreviewError}\n />\n ) : null}\n\n {bulkMode === 'updateStatus' ? (\n <BulkStatusUpdateDialog\n open\n onClose={closeBulkAction}\n targets={bulkPreviewTargets}\n selection={bulkPreviewSelection}\n jobPostingId={jobPostingFilter}\n previewLoading={bulkPreviewLoading}\n previewError={bulkPreviewError}\n />\n ) : null}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAkHA,IAAM,KAAwB;AAE9B,SAAS,GACP,GACqB;CACrB,OAAO;EACL,IAAI,EAAY;EAChB,cAAc,EAAY,gBAAgB;EAC1C,iBAAiB,EAAY,gBAAgB,KAAK,OAAW;GAC3D,IAAI,EAAM;GACV,eAAe,EAAM,iBAAiB;GACtC,MAAM,EAAM;GACZ,WAAW,EAAM;GACjB,WAAW,EAAM,UAAU,KAAK,OAAS,EAAE,WAAW,EAAI,UAAU,EAAE;EACxE,EAAE;CACJ;AACF;AAEA,SAAS,GAA2B,GAA8D;CAChG,OAAO;EACL,GAAG;EACH,GAAI,EAAO,MAAM,EAAE,KAAK,CAAC,GAAG,EAAO,GAAG,EAAE,IAAI,CAAC;EAC7C,GAAI,EAAO,WAAW,EAAE,UAAU,CAAC,GAAG,EAAO,QAAQ,EAAE,IAAI,CAAC;EAC5D,GAAI,EAAO,gBAAgB,EAAE,eAAe,CAAC,GAAG,EAAO,aAAa,EAAE,IAAI,CAAC;CAC7E;AACF;AAQA,SAAS,GAAgB,GAAsB,GAAe;CAC5D,OAAO,EAAO,SAAS,CAAK,IACxB,EAAO,QAAQ,MAAc,MAAc,CAAK,IAChD,CAAC,GAAG,GAAQ,CAAK;AACvB;AAEA,SAAS,GAAW,GAA4B;CAC9C,OAAO,IAAI,KAAK,CAAU,CAAC,CAAC,mBAAmB,SAAS;EACtD,OAAO;EACP,KAAK;EACL,MAAM;EACN,MAAM;EACN,QAAQ;CACV,CAAC;AACH;AAEA,SAAS,GAAQ,GAA4B;CAC3C,IAAM,IAAO,KAAK,IAAI,IAAI,IAAI,KAAK,CAAU,CAAC,CAAC,QAAQ,GACjD,IAAU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T,WAAW;IACX,cAAc;IACd,gBAAgB;IAChB,cAAc;GACf,CAAA,IACC;GAEH,MAAa,oBACZ,kBAAC,IAAD;IACE,MAAA;IACA,SAAS;IACT,SAAS;IACT,WAAW;IACX,cAAc;IACd,gBAAgB;IAChB,cAAc;GACf,CAAA,IACC;GAEH,MAAa,gBACZ,kBAAC,IAAD;IACE,MAAA;IACA,SAAS;IACT,SAAS;IACT,WAAW;IACX,cAAc;IACd,gBAAgB;IAChB,cAAc;GACf,CAAA,IACC;GAEH,MAAa,iBACZ,kBAAC,IAAD;IACE,MAAA;IACA,SAAS;IACT,SAAS;IACT,WAAW;IACX,cAAc;IACd,gBAAgB;IAChB,cAAc;GACf,CAAA,IACC;EACD;;AAET"}
|
|
@@ -170,6 +170,36 @@ export interface EnsureRoundAggregate {
|
|
|
170
170
|
export declare function createEmptyEnsureRoundAggregate(): EnsureRoundAggregate;
|
|
171
171
|
export declare function assertCompleteEnsureRoundChunkResult(requestedApplicationIds: ReadonlyArray<string>, result: EnsureRoundAggregate): void;
|
|
172
172
|
export declare function aggregateEnsureRoundResult(aggregate: EnsureRoundAggregate, result: EnsureRoundAggregate): EnsureRoundAggregate;
|
|
173
|
+
export interface BulkCustomEmailSuccess {
|
|
174
|
+
applicationId: string;
|
|
175
|
+
email: string;
|
|
176
|
+
}
|
|
177
|
+
export interface BulkCustomEmailFailureItem {
|
|
178
|
+
applicationId: string;
|
|
179
|
+
message: string;
|
|
180
|
+
}
|
|
181
|
+
export interface BulkCustomEmailAggregate {
|
|
182
|
+
succeeded: BulkCustomEmailSuccess[];
|
|
183
|
+
failed: BulkCustomEmailFailureItem[];
|
|
184
|
+
}
|
|
185
|
+
export declare function createEmptyBulkCustomEmailAggregate(): BulkCustomEmailAggregate;
|
|
186
|
+
export declare function assertCompleteBulkCustomEmailChunkResult(requestedApplicationIds: ReadonlyArray<string>, result: BulkCustomEmailAggregate): void;
|
|
187
|
+
export declare function aggregateBulkCustomEmailResult(aggregate: BulkCustomEmailAggregate, result: BulkCustomEmailAggregate): BulkCustomEmailAggregate;
|
|
188
|
+
export interface BulkStatusUpdateSuccess {
|
|
189
|
+
applicationId: string;
|
|
190
|
+
status: string;
|
|
191
|
+
}
|
|
192
|
+
export interface BulkStatusUpdateFailureItem {
|
|
193
|
+
applicationId: string;
|
|
194
|
+
message: string;
|
|
195
|
+
}
|
|
196
|
+
export interface BulkStatusUpdateAggregate {
|
|
197
|
+
succeeded: BulkStatusUpdateSuccess[];
|
|
198
|
+
failed: BulkStatusUpdateFailureItem[];
|
|
199
|
+
}
|
|
200
|
+
export declare function createEmptyBulkStatusUpdateAggregate(): BulkStatusUpdateAggregate;
|
|
201
|
+
export declare function assertCompleteBulkStatusUpdateChunkResult(requestedApplicationIds: ReadonlyArray<string>, result: BulkStatusUpdateAggregate): void;
|
|
202
|
+
export declare function aggregateBulkStatusUpdateResult(aggregate: BulkStatusUpdateAggregate, result: BulkStatusUpdateAggregate): BulkStatusUpdateAggregate;
|
|
173
203
|
export declare function hasCandidateEmailType(round: CandidateRoundPreview, emailType: string): boolean;
|
|
174
204
|
export interface DuplicateNoticeSuccess {
|
|
175
205
|
email: string;
|