@burdenoff/microfe-support 2026.819.2 → 2026.819.3

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.
@@ -1 +1 @@
1
- {"version":3,"file":"BulkCandidateDialogs.js","names":[],"sources":["../../../../src/support/components/careers/BulkCandidateDialogs.tsx"],"sourcesContent":["import { useEffect, useMemo, useState } from 'react';\nimport { useApolloClient } from '@apollo/client/react';\nimport { graphqlFetch } from '@burdenoff/fe-libs/shared/graphql/fetch';\nimport { print, type DocumentNode } from 'graphql';\nimport { AlertCircle, Loader2, Send, UserPlus } from 'lucide-react';\nimport {\n BulkEnsureInterviewRoundsDocument,\n BulkRandomizeAndSendAssignmentDocument,\n BulkSendRoundMessageDocument,\n useGetJobPostingQuery,\n type BulkEnsureInterviewRoundsMutation,\n type BulkEnsureInterviewRoundsMutationVariables,\n type BulkRandomizeAndSendAssignmentMutation,\n type BulkRandomizeAndSendAssignmentMutationVariables,\n type BulkSendRoundMessageMutation,\n type BulkSendRoundMessageMutationVariables,\n type GetJobPostingQuery,\n} from '../../../generated/global-operations';\nimport { InterviewRoundType } from '../../../generated/global-types';\nimport { nativeNotify } from '../../../utils/nativeBridge';\nimport {\n aggregateCandidateEmailResult,\n aggregateEnsureRoundResult,\n assertCandidateChunkMatchesCurrentScope,\n assertCandidateEmailChunkMatchesCurrentScope,\n assertCompleteCandidateEmailChunkResult,\n assertCompleteEnsureRoundChunkResult,\n CandidateChunkPreconditionError,\n createEmptyCandidateEmailAggregate,\n createEmptyEnsureRoundAggregate,\n executeSequentialCandidateChunks,\n getCandidateSelectionCount,\n getSelectedCandidateIds,\n getBulkOperationNotificationSeverity,\n hasCandidateEmailType,\n resolveExactCandidateRounds,\n type BulkCandidateTarget,\n type CandidateEmailAggregate,\n type CandidateSelectionState,\n type EnsureRoundAggregate,\n type EnsureRoundFailure,\n type SequentialExecutionProgress,\n} from '../../utils/bulkCandidateOperations';\nimport { BulkCandidateActionGuidance } from './BulkCandidateActionGuidance';\nimport {\n BulkOperationProgress,\n CandidateEmailResultDetails,\n EnsureRoundResultDetails,\n StoppedBulkOperationNotice,\n type StoppedBulkOperationDetails,\n} from './BulkOperationFeedback';\nimport {\n Button,\n Checkbox,\n Dialog,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n Label,\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n Textarea,\n} from '../ui';\n\ntype JobPostingRoundConfig = NonNullable<GetJobPostingQuery['jobPosting']>['rounds'][number];\nexport type BulkCandidateDialogMode = 'message' | 'assignment';\n\ntype AssignmentRoundConfig = Pick<JobPostingRoundConfig, 'isAssignmentRound' | 'roundType'>;\n\nexport function isAssignmentRoundConfig(round: AssignmentRoundConfig): boolean {\n return round.isAssignmentRound || round.roundType === InterviewRoundType.TakeHome;\n}\n\nconst ROUND_EMAIL_TYPE: Record<BulkCandidateDialogMode, string> = {\n message: 'ROUND_MESSAGE',\n assignment: 'ASSIGNMENT',\n};\n\ninterface SharedDialogProps {\n open: boolean;\n onClose: () => void;\n targets: ReadonlyArray<BulkCandidateTarget>;\n selection: CandidateSelectionState;\n jobPostingId: string;\n previewLoading: boolean;\n previewError: string | null;\n refreshTargets: (applicationIds: ReadonlyArray<string>) => Promise<BulkCandidateTarget[]>;\n}\n\nfunction errorMessage(error: unknown): string {\n return error instanceof Error ? error.message : 'The request failed without an error message.';\n}\n\nasync function executeNoRetryMutation<TData, TVariables extends Record<string, unknown>>(\n document: DocumentNode,\n variables: TVariables,\n operationName: string\n): Promise<TData> {\n const response = await graphqlFetch<TData>({\n gateway: 'global',\n query: print(document),\n variables,\n operationName,\n // Candidate email sends can be non-idempotent. A transport or auth failure\n // must remain ambiguous and require a new preview before a manual retry.\n skipAuthRetry: true,\n });\n if (response.errors?.length) {\n throw new Error(response.errors.map((error) => error.message).join('; '));\n }\n if (!response.data) {\n throw new Error(`${operationName} returned no data.`);\n }\n return response.data;\n}\n\nfunction selectedTargets(\n targets: ReadonlyArray<BulkCandidateTarget>,\n selection: CandidateSelectionState\n): BulkCandidateTarget[] {\n const selectedIds = getSelectedCandidateIds(selection);\n return targets.filter((target) => selectedIds.has(target.id));\n}\n\nasync function refreshTargetsBeforeMutation(\n refreshTargets: (applicationIds: ReadonlyArray<string>) => Promise<BulkCandidateTarget[]>,\n applicationIds: ReadonlyArray<string>\n): Promise<BulkCandidateTarget[]> {\n try {\n return await refreshTargets(applicationIds);\n } catch (error) {\n throw new CandidateChunkPreconditionError(\n `Candidate scope revalidation failed before this chunk: ${errorMessage(error)}`\n );\n }\n}\n\nexport function BulkCandidateSendDialog({\n mode,\n open,\n onClose,\n onOpenAddRound,\n targets,\n selection,\n jobPostingId,\n previewLoading,\n previewError,\n refreshTargets,\n}: SharedDialogProps & {\n mode: BulkCandidateDialogMode;\n onOpenAddRound: () => void;\n}) {\n const client = useApolloClient();\n const [roundConfigId, setRoundConfigId] = useState('');\n const [message, setMessage] = useState('');\n const [force, setForce] = useState(false);\n const [progress, setProgress] = useState<SequentialExecutionProgress | null>(null);\n const [result, setResult] = useState<CandidateEmailAggregate>(createEmptyCandidateEmailAggregate);\n const [stopped, setStopped] = useState<StoppedBulkOperationDetails | null>(null);\n const [attempted, setAttempted] = useState(false);\n const [submitting, setSubmitting] = useState(false);\n\n const {\n data: postingData,\n loading: postingLoading,\n error: postingError,\n } = useGetJobPostingQuery({\n variables: { id: jobPostingId },\n skip: !open || !jobPostingId,\n fetchPolicy: 'network-only',\n });\n\n useEffect(() => {\n if (!open) return;\n setRoundConfigId('');\n setMessage('');\n setForce(false);\n setProgress(null);\n setResult(createEmptyCandidateEmailAggregate());\n setStopped(null);\n setAttempted(false);\n setSubmitting(false);\n }, [open, mode]);\n\n const actionTargets = useMemo(() => selectedTargets(targets, selection), [selection, targets]);\n const intendedSelectionCount = getCandidateSelectionCount(selection);\n const selectionDataComplete = actionTargets.length === intendedSelectionCount;\n const postingRoundConfigs = postingData?.jobPosting?.rounds ?? [];\n const roundConfigs = postingRoundConfigs.filter((round: JobPostingRoundConfig) =>\n mode === 'assignment' ? isAssignmentRoundConfig(round) : true\n );\n const targetRoundConfig = postingRoundConfigs.find(\n (round: JobPostingRoundConfig) => round.id === roundConfigId\n );\n const resolution = targetRoundConfig\n ? resolveExactCandidateRounds(actionTargets, targetRoundConfig.id)\n : { pairs: [], unresolved: [] };\n const missingCount = resolution.unresolved.filter((item) => item.reason === 'MISSING').length;\n const ambiguousCount = resolution.unresolved.filter((item) => item.reason === 'AMBIGUOUS').length;\n const emailType = ROUND_EMAIL_TYPE[mode];\n const alreadySentCount = resolution.pairs.filter(({ round }) =>\n hasCandidateEmailType(round, emailType)\n ).length;\n const willSendCount = resolution.pairs.filter(\n ({ round }) => force || !hasCandidateEmailType(round, emailType)\n ).length;\n const postingMismatch = actionTargets.some((target) => target.jobPostingId !== jobPostingId);\n\n let effectivePreviewError = previewError;\n if (!effectivePreviewError && postingError) {\n effectivePreviewError = 'Could not load the posting rounds. Nothing will be sent.';\n } else if (!effectivePreviewError && !previewLoading && !selectionDataComplete) {\n effectivePreviewError =\n 'Some selected candidate details are unavailable. Refresh the selection before sending.';\n } else if (!effectivePreviewError && postingMismatch) {\n effectivePreviewError = 'Some selected candidates do not belong to the filtered posting.';\n } else if (!effectivePreviewError && roundConfigId && !postingLoading && !targetRoundConfig) {\n effectivePreviewError = 'The selected round is no longer available. Choose another round.';\n } else if (!effectivePreviewError && ambiguousCount > 0) {\n effectivePreviewError = `${ambiguousCount} selected candidate${ambiguousCount === 1 ? ' has' : 's have'} multiple concrete rounds for this configuration. Nothing will be sent until the data is corrected.`;\n }\n\n const handleSubmit = async () => {\n if (\n submitting ||\n attempted ||\n previewLoading ||\n postingLoading ||\n effectivePreviewError ||\n !selectionDataComplete ||\n !targetRoundConfig ||\n resolution.pairs.length === 0 ||\n willSendCount === 0 ||\n (mode === 'message' && !message.trim())\n ) {\n return;\n }\n\n setSubmitting(true);\n setAttempted(true);\n setStopped(null);\n setResult(createEmptyCandidateEmailAggregate());\n\n const execution = await executeSequentialCandidateChunks({\n items: resolution.pairs.map(({ applicationId, roundId }) => ({\n applicationId,\n roundId,\n })),\n initialAggregate: createEmptyCandidateEmailAggregate(),\n onProgress: setProgress,\n executeChunk: async (chunk) => {\n const currentTargets = await refreshTargetsBeforeMutation(\n refreshTargets,\n chunk.map((item) => item.applicationId)\n );\n assertCandidateEmailChunkMatchesCurrentScope(\n chunk,\n currentTargets,\n jobPostingId,\n targetRoundConfig.id\n );\n\n if (mode === 'assignment') {\n const response = await executeNoRetryMutation<\n BulkRandomizeAndSendAssignmentMutation,\n BulkRandomizeAndSendAssignmentMutationVariables\n >(\n BulkRandomizeAndSendAssignmentDocument,\n { input: { items: [...chunk], force } },\n 'BulkRandomizeAndSendAssignment'\n );\n const bulkResult = response.bulkRandomizeAndSendAssignment;\n if (!bulkResult) {\n throw new Error('The assignment request returned no result.');\n }\n const chunkResult: CandidateEmailAggregate = {\n succeeded: bulkResult.succeeded.map((item) => ({\n applicationId: item.applicationId,\n roundId: item.id,\n })),\n skipped: bulkResult.skipped.map((item) => ({\n applicationId: item.applicationId,\n roundId: item.roundId,\n reason: item.reason,\n message: item.message,\n })),\n failed: bulkResult.failed.map((item) => ({\n applicationId: item.applicationId,\n roundId: item.roundId,\n message: item.message,\n })),\n };\n assertCompleteCandidateEmailChunkResult(chunk, chunkResult);\n return chunkResult;\n }\n\n const response = await executeNoRetryMutation<\n BulkSendRoundMessageMutation,\n BulkSendRoundMessageMutationVariables\n >(\n BulkSendRoundMessageDocument,\n { input: { items: [...chunk], message: message.trim(), force } },\n 'BulkSendRoundMessage'\n );\n const bulkResult = response.bulkSendRoundMessage;\n if (!bulkResult) {\n throw new Error('The message request returned no result.');\n }\n const chunkResult: CandidateEmailAggregate = {\n succeeded: bulkResult.succeeded.map((item) => ({\n applicationId: item.applicationId,\n roundId: item.id,\n })),\n skipped: bulkResult.skipped.map((item) => ({\n applicationId: item.applicationId,\n roundId: item.roundId,\n reason: item.reason,\n message: item.message,\n })),\n failed: bulkResult.failed.map((item) => ({\n applicationId: item.applicationId,\n roundId: item.roundId,\n message: item.message,\n })),\n };\n assertCompleteCandidateEmailChunkResult(chunk, chunkResult);\n return chunkResult;\n },\n mergeResult: aggregateCandidateEmailResult,\n });\n\n setResult(execution.aggregate);\n if (execution.error) {\n setStopped({\n knownCompleted: execution.processedItems.length,\n ambiguous: execution.ambiguousItems.length,\n notStarted: execution.notStartedItems.length,\n message: errorMessage(execution.error),\n });\n }\n nativeNotify(\n getBulkOperationNotificationSeverity({\n succeeded: execution.aggregate.succeeded.length,\n skipped: execution.aggregate.skipped.length,\n failed: execution.aggregate.failed.length,\n ambiguous: !!execution.error,\n })\n );\n setSubmitting(false);\n\n void client\n .refetchQueries({\n include: ['GetJobApplications', 'GetJobApplicationInterviewRounds'],\n })\n .catch(() => undefined);\n };\n\n const previewBusy = previewLoading || postingLoading;\n const title = mode === 'assignment' ? 'Assign & Email Random Take-Home' : 'Send Message';\n\n return (\n <Dialog\n open={open}\n onOpenChange={(next) => {\n if (!next && !submitting) onClose();\n }}\n >\n <DialogContent className=\"sm:max-w-xl max-h-[90vh] overflow-y-auto\">\n <DialogHeader>\n <DialogTitle>{title}</DialogTitle>\n <DialogDescription>\n Choose one configured round for the candidates in the filtered posting.\n </DialogDescription>\n </DialogHeader>\n\n <BulkCandidateActionGuidance action={mode} unresolvedCount={missingCount} />\n\n {attempted ? (\n <div className=\"space-y-4\">\n {progress ? <BulkOperationProgress progress={progress} /> : null}\n <CandidateEmailResultDetails result={result} />\n {stopped ? <StoppedBulkOperationNotice details={stopped} /> : null}\n <DialogFooter>\n <Button onClick={onClose} disabled={submitting}>\n Done\n </Button>\n </DialogFooter>\n </div>\n ) : (\n <div className=\"space-y-4\">\n {previewBusy ? (\n <div className=\"flex items-center gap-2 text-sm text-text-secondary\">\n <Loader2 size={14} className=\"animate-spin\" />\n Refreshing candidates and configured rounds…\n </div>\n ) : null}\n\n {effectivePreviewError ? (\n <div className=\"flex items-start gap-2 text-sm text-status-error-text\" role=\"alert\">\n <AlertCircle size={14} className=\"mt-0.5 shrink-0\" />\n <span>{effectivePreviewError}</span>\n </div>\n ) : null}\n\n <div className=\"space-y-1.5\">\n <Label htmlFor=\"bulk-round-config\">Target round</Label>\n <Select\n value={roundConfigId}\n onValueChange={setRoundConfigId}\n disabled={previewBusy || !!effectivePreviewError}\n >\n <SelectTrigger id=\"bulk-round-config\">\n <SelectValue placeholder=\"Select a round\" />\n </SelectTrigger>\n <SelectContent>\n {roundConfigs.map((round: JobPostingRoundConfig) => (\n <SelectItem key={round.id} value={round.id}>\n Round {round.roundNumber} — {round.name}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n {roundConfigs.length === 0 && !previewBusy && !effectivePreviewError ? (\n <p className=\"text-xs text-status-warning-text\">\n {mode === 'assignment'\n ? 'This posting has no configured assignment round.'\n : 'This posting has no configured interview rounds.'}\n </p>\n ) : null}\n </div>\n\n {mode === 'message' ? (\n <div className=\"space-y-1.5\">\n <Label htmlFor=\"bulk-message\">Free-text message</Label>\n <Textarea\n id=\"bulk-message\"\n value={message}\n onChange={(event: React.ChangeEvent<HTMLTextAreaElement>) =>\n setMessage(event.target.value)\n }\n placeholder=\"Write the message sent to each candidate\"\n rows={5}\n />\n </div>\n ) : null}\n\n {roundConfigId && !previewBusy && !effectivePreviewError ? (\n <div className=\"space-y-2 rounded-md border border-border-seam bg-bg-sunken/30 p-3 text-xs text-text-secondary\">\n <p className=\"font-medium text-text-primary\">Preview</p>\n <p>\n Will send to <span className=\"font-semibold\">{willSendCount}</span> candidate\n {willSendCount === 1 ? '' : 's'}.\n </p>\n {alreadySentCount > 0 ? (\n <p>\n {alreadySentCount} already received this email type{' '}\n {force ? '(force will send again)' : '(the backend will skip them)'}.\n </p>\n ) : null}\n {missingCount > 0 ? (\n <Button type=\"button\" size=\"sm\" variant=\"outline\" onClick={onOpenAddRound}>\n <UserPlus size={14} />\n Add Selected to Round\n </Button>\n ) : null}\n <label className=\"flex cursor-pointer items-start gap-2 pt-1\">\n <Checkbox\n checked={force}\n onCheckedChange={(checked) => setForce(checked === true)}\n />\n <span>\n Force resend to candidates with a prior email. Force sends are non-idempotent\n and are never retried automatically.\n </span>\n </label>\n </div>\n ) : null}\n\n <DialogFooter>\n <Button variant=\"outline\" onClick={onClose} disabled={submitting}>\n Cancel\n </Button>\n <Button\n onClick={() => void handleSubmit()}\n disabled={\n submitting ||\n previewBusy ||\n !!effectivePreviewError ||\n !selectionDataComplete ||\n !roundConfigId ||\n resolution.pairs.length === 0 ||\n willSendCount === 0 ||\n (mode === 'message' && !message.trim())\n }\n >\n {submitting ? (\n <Loader2 size={16} className=\"mr-2 animate-spin\" />\n ) : (\n <Send size={16} />\n )}\n {submitting ? 'Sending…' : 'Send'}\n </Button>\n </DialogFooter>\n </div>\n )}\n </DialogContent>\n </Dialog>\n );\n}\n\nexport function AddSelectedToRoundDialog({\n open,\n onClose,\n targets,\n selection,\n jobPostingId,\n previewLoading,\n previewError,\n refreshTargets,\n}: SharedDialogProps) {\n const client = useApolloClient();\n const [roundConfigId, setRoundConfigId] = useState('');\n const [progress, setProgress] = useState<SequentialExecutionProgress | null>(null);\n const [result, setResult] = useState<EnsureRoundAggregate>(createEmptyEnsureRoundAggregate);\n const [stopped, setStopped] = useState<StoppedBulkOperationDetails | null>(null);\n const [attempted, setAttempted] = useState(false);\n const [submitting, setSubmitting] = useState(false);\n\n const {\n data: postingData,\n loading: postingLoading,\n error: postingError,\n } = useGetJobPostingQuery({\n variables: { id: jobPostingId },\n skip: !open || !jobPostingId,\n fetchPolicy: 'network-only',\n });\n useEffect(() => {\n if (!open) return;\n setRoundConfigId('');\n setProgress(null);\n setResult(createEmptyEnsureRoundAggregate());\n setStopped(null);\n setAttempted(false);\n setSubmitting(false);\n }, [open]);\n\n const actionTargets = useMemo(() => selectedTargets(targets, selection), [selection, targets]);\n const intendedSelectionCount = getCandidateSelectionCount(selection);\n const selectionDataComplete = actionTargets.length === intendedSelectionCount;\n const selectedIds = actionTargets.map((target) => target.id);\n const postingMismatch = actionTargets.some((target) => target.jobPostingId !== jobPostingId);\n const roundConfigs = postingData?.jobPosting?.rounds ?? [];\n const selectedConfig = roundConfigs.find(\n (round: JobPostingRoundConfig) => round.id === roundConfigId\n );\n\n let effectivePreviewError = previewError;\n if (!effectivePreviewError && postingError) {\n effectivePreviewError = 'Could not load the posting rounds. Nothing will be changed.';\n } else if (!effectivePreviewError && !previewLoading && !selectionDataComplete) {\n effectivePreviewError =\n 'Some selected candidate details are unavailable. Refresh the selection before adding rounds.';\n } else if (!effectivePreviewError && postingMismatch) {\n effectivePreviewError = 'Some selected candidates do not belong to the filtered posting.';\n } else if (!effectivePreviewError && roundConfigId && !postingLoading && !selectedConfig) {\n effectivePreviewError = 'The selected round is no longer available. Choose another round.';\n }\n\n const handleSubmit = async () => {\n if (\n submitting ||\n attempted ||\n previewLoading ||\n postingLoading ||\n effectivePreviewError ||\n !selectionDataComplete ||\n !selectedConfig ||\n selectedIds.length === 0\n ) {\n return;\n }\n\n setSubmitting(true);\n setAttempted(true);\n setStopped(null);\n setResult(createEmptyEnsureRoundAggregate());\n\n const execution = await executeSequentialCandidateChunks({\n items: selectedIds,\n initialAggregate: createEmptyEnsureRoundAggregate(),\n onProgress: setProgress,\n executeChunk: async (applicationIds) => {\n const currentTargets = await refreshTargetsBeforeMutation(refreshTargets, applicationIds);\n assertCandidateChunkMatchesCurrentScope(applicationIds, currentTargets, jobPostingId);\n\n const response = await executeNoRetryMutation<\n BulkEnsureInterviewRoundsMutation,\n BulkEnsureInterviewRoundsMutationVariables\n >(\n BulkEnsureInterviewRoundsDocument,\n {\n input: {\n jobPostingId,\n roundConfigId: selectedConfig.id,\n applicationIds: [...applicationIds],\n },\n },\n 'BulkEnsureInterviewRounds'\n );\n const bulkResult = response.bulkEnsureInterviewRounds;\n if (!bulkResult) {\n throw new Error('The add-to-round request returned no result.');\n }\n const chunkResult: EnsureRoundAggregate = {\n created: bulkResult.created.map((item) => ({\n id: item.round.id,\n applicationId: item.applicationId,\n })),\n alreadyPresent: bulkResult.alreadyPresent.map((item) => ({\n id: item.round.id,\n applicationId: item.applicationId,\n })),\n failed: bulkResult.failed.map((item: EnsureRoundFailure) => ({\n applicationId: item.applicationId,\n code: item.code,\n message: item.message,\n })),\n };\n assertCompleteEnsureRoundChunkResult(applicationIds, chunkResult);\n return chunkResult;\n },\n mergeResult: aggregateEnsureRoundResult,\n });\n\n setResult(execution.aggregate);\n if (execution.error) {\n setStopped({\n knownCompleted: execution.processedItems.length,\n ambiguous: execution.ambiguousItems.length,\n notStarted: execution.notStartedItems.length,\n message: errorMessage(execution.error),\n });\n }\n nativeNotify(\n getBulkOperationNotificationSeverity({\n succeeded: execution.aggregate.created.length + execution.aggregate.alreadyPresent.length,\n skipped: 0,\n failed: execution.aggregate.failed.length,\n ambiguous: !!execution.error,\n })\n );\n setSubmitting(false);\n\n void client\n .refetchQueries({\n include: ['GetJobApplications', 'GetJobApplicationInterviewRounds'],\n })\n .catch(() => undefined);\n };\n\n const previewBusy = previewLoading || postingLoading;\n\n return (\n <Dialog\n open={open}\n onOpenChange={(next) => {\n if (!next && !submitting) onClose();\n }}\n >\n <DialogContent className=\"sm:max-w-xl max-h-[90vh] overflow-y-auto\">\n <DialogHeader>\n <DialogTitle>Add Selected to Round</DialogTitle>\n <DialogDescription>\n Add every selected candidate in this posting to one configured interview round.\n </DialogDescription>\n </DialogHeader>\n\n <div className=\"rounded-md border border-border-seam bg-bg-sunken/30 p-3 text-sm text-text-secondary\">\n Candidates without this concrete round are added with status Scheduled. Existing target\n rounds are left unchanged, and all prior round history and application status remain\n unchanged.\n </div>\n\n {attempted ? (\n <div className=\"space-y-4\">\n {progress ? <BulkOperationProgress progress={progress} /> : null}\n <EnsureRoundResultDetails result={result} />\n {stopped ? <StoppedBulkOperationNotice details={stopped} /> : null}\n <DialogFooter>\n <Button onClick={onClose} disabled={submitting}>\n Done\n </Button>\n </DialogFooter>\n </div>\n ) : (\n <div className=\"space-y-4\">\n {previewBusy ? (\n <div className=\"flex items-center gap-2 text-sm text-text-secondary\">\n <Loader2 size={14} className=\"animate-spin\" />\n Refreshing candidates and configured rounds…\n </div>\n ) : null}\n\n {effectivePreviewError ? (\n <div className=\"flex items-start gap-2 text-sm text-status-error-text\" role=\"alert\">\n <AlertCircle size={14} className=\"mt-0.5 shrink-0\" />\n <span>{effectivePreviewError}</span>\n </div>\n ) : null}\n\n <div className=\"space-y-1.5\">\n <Label htmlFor=\"ensure-round-config\">Interview round</Label>\n <Select\n value={roundConfigId}\n onValueChange={setRoundConfigId}\n disabled={previewBusy || !!effectivePreviewError}\n >\n <SelectTrigger id=\"ensure-round-config\">\n <SelectValue placeholder=\"Select a round\" />\n </SelectTrigger>\n <SelectContent>\n {roundConfigs.map((round: JobPostingRoundConfig) => (\n <SelectItem key={round.id} value={round.id}>\n Round {round.roundNumber} — {round.name}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n {roundConfigs.length === 0 && !previewBusy && !effectivePreviewError ? (\n <p className=\"text-xs text-status-warning-text\">\n This posting has no configured interview rounds.\n </p>\n ) : null}\n </div>\n\n <p className=\"text-xs text-text-secondary\">\n {intendedSelectionCount} selected candidate{intendedSelectionCount === 1 ? '' : 's'}{' '}\n will be checked. Existing target rounds are reported as already present.\n </p>\n\n <DialogFooter>\n <Button variant=\"outline\" onClick={onClose} disabled={submitting}>\n Cancel\n </Button>\n <Button\n onClick={() => void handleSubmit()}\n disabled={\n submitting ||\n previewBusy ||\n !!effectivePreviewError ||\n !selectionDataComplete ||\n !roundConfigId ||\n selectedIds.length === 0\n }\n >\n {submitting ? (\n <Loader2 size={16} className=\"mr-2 animate-spin\" />\n ) : (\n <UserPlus size={16} />\n )}\n {submitting ? 'Adding…' : 'Add Selected to Round'}\n </Button>\n </DialogFooter>\n </div>\n )}\n </DialogContent>\n </Dialog>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;AA0EA,SAAgB,EAAwB,GAAu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;QAAS,MAAM;QAAI,WAAU;OAAqB,CAAA,IAElD,kBAAC,IAAD,EAAU,MAAM,GAAK,CAAA,GAEtB,IAAa,YAAY,uBACpB;MACI,CAAA,CAAA,EAAA,CAAA;KACX;;GAEM;;CACT,CAAA;AAEZ"}
1
+ {"version":3,"file":"BulkCandidateDialogs.js","names":[],"sources":["../../../../src/support/components/careers/BulkCandidateDialogs.tsx"],"sourcesContent":["import { useEffect, useMemo, useState } from 'react';\nimport { useApolloClient } from '@apollo/client/react';\nimport { graphqlFetch } from '@burdenoff/fe-libs/shared/graphql/fetch';\nimport { print, type DocumentNode } from 'graphql';\nimport { AlertCircle, Loader2, Send, UserPlus } from 'lucide-react';\nimport {\n BulkEnsureInterviewRoundsDocument,\n BulkRandomizeAndSendAssignmentDocument,\n BulkSendRoundMessageDocument,\n useGetJobPostingQuery,\n type BulkEnsureInterviewRoundsMutation,\n type BulkEnsureInterviewRoundsMutationVariables,\n type BulkRandomizeAndSendAssignmentMutation,\n type BulkRandomizeAndSendAssignmentMutationVariables,\n type BulkSendRoundMessageMutation,\n type BulkSendRoundMessageMutationVariables,\n type GetJobPostingQuery,\n} from '../../../generated/global-operations';\nimport { InterviewRoundType } from '../../../generated/global-types';\nimport { nativeNotify } from '../../../utils/nativeBridge';\nimport {\n aggregateCandidateEmailResult,\n aggregateEnsureRoundResult,\n assertCompleteCandidateEmailChunkResult,\n assertCompleteEnsureRoundChunkResult,\n createEmptyCandidateEmailAggregate,\n createEmptyEnsureRoundAggregate,\n executeSequentialCandidateChunks,\n getCandidateSelectionCount,\n getSelectedCandidateIds,\n getBulkOperationNotificationSeverity,\n hasCandidateEmailType,\n resolveExactCandidateRounds,\n type BulkCandidateTarget,\n type CandidateEmailAggregate,\n type CandidateSelectionState,\n type EnsureRoundAggregate,\n type EnsureRoundFailure,\n type SequentialExecutionProgress,\n} from '../../utils/bulkCandidateOperations';\nimport { BulkCandidateActionGuidance } from './BulkCandidateActionGuidance';\nimport {\n BulkOperationProgress,\n CandidateEmailResultDetails,\n EnsureRoundResultDetails,\n StoppedBulkOperationNotice,\n type StoppedBulkOperationDetails,\n} from './BulkOperationFeedback';\nimport {\n Button,\n Checkbox,\n Dialog,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogTitle,\n Label,\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n Textarea,\n} from '../ui';\n\ntype JobPostingRoundConfig = NonNullable<GetJobPostingQuery['jobPosting']>['rounds'][number];\nexport type BulkCandidateDialogMode = 'message' | 'assignment';\n\ntype AssignmentRoundConfig = Pick<JobPostingRoundConfig, 'isAssignmentRound' | 'roundType'>;\n\nexport function isAssignmentRoundConfig(round: AssignmentRoundConfig): boolean {\n return round.isAssignmentRound || round.roundType === InterviewRoundType.TakeHome;\n}\n\nconst ROUND_EMAIL_TYPE: Record<BulkCandidateDialogMode, string> = {\n message: 'ROUND_MESSAGE',\n assignment: 'ASSIGNMENT',\n};\n\ninterface SharedDialogProps {\n open: boolean;\n onClose: () => void;\n targets: ReadonlyArray<BulkCandidateTarget>;\n selection: CandidateSelectionState;\n jobPostingId: string;\n previewLoading: boolean;\n previewError: string | null;\n}\n\nfunction errorMessage(error: unknown): string {\n return error instanceof Error ? error.message : 'The request failed without an error message.';\n}\n\nasync function executeNoRetryMutation<TData, TVariables extends Record<string, unknown>>(\n document: DocumentNode,\n variables: TVariables,\n operationName: string\n): Promise<TData> {\n const response = await graphqlFetch<TData>({\n gateway: 'global',\n query: print(document),\n variables,\n operationName,\n // Candidate email sends can be non-idempotent. A transport or auth failure\n // must remain ambiguous and require a new preview before a manual retry.\n skipAuthRetry: true,\n });\n if (response.errors?.length) {\n throw new Error(response.errors.map((error) => error.message).join('; '));\n }\n if (!response.data) {\n throw new Error(`${operationName} returned no data.`);\n }\n return response.data;\n}\n\nfunction selectedTargets(\n targets: ReadonlyArray<BulkCandidateTarget>,\n selection: CandidateSelectionState\n): BulkCandidateTarget[] {\n const selectedIds = getSelectedCandidateIds(selection);\n return targets.filter((target) => selectedIds.has(target.id));\n}\n\nexport function BulkCandidateSendDialog({\n mode,\n open,\n onClose,\n onOpenAddRound,\n targets,\n selection,\n jobPostingId,\n previewLoading,\n previewError,\n}: SharedDialogProps & {\n mode: BulkCandidateDialogMode;\n onOpenAddRound: () => void;\n}) {\n const client = useApolloClient();\n const [roundConfigId, setRoundConfigId] = useState('');\n const [message, setMessage] = useState('');\n const [force, setForce] = useState(false);\n const [progress, setProgress] = useState<SequentialExecutionProgress | null>(null);\n const [result, setResult] = useState<CandidateEmailAggregate>(createEmptyCandidateEmailAggregate);\n const [stopped, setStopped] = useState<StoppedBulkOperationDetails | null>(null);\n const [attempted, setAttempted] = useState(false);\n const [submitting, setSubmitting] = useState(false);\n\n const {\n data: postingData,\n loading: postingLoading,\n error: postingError,\n } = useGetJobPostingQuery({\n variables: { id: jobPostingId },\n skip: !open || !jobPostingId,\n fetchPolicy: 'network-only',\n });\n\n useEffect(() => {\n if (!open) return;\n setRoundConfigId('');\n setMessage('');\n setForce(false);\n setProgress(null);\n setResult(createEmptyCandidateEmailAggregate());\n setStopped(null);\n setAttempted(false);\n setSubmitting(false);\n }, [open, mode]);\n\n const actionTargets = useMemo(() => selectedTargets(targets, selection), [selection, targets]);\n const intendedSelectionCount = getCandidateSelectionCount(selection);\n const selectionDataComplete = actionTargets.length === intendedSelectionCount;\n const postingRoundConfigs = postingData?.jobPosting?.rounds ?? [];\n const roundConfigs = postingRoundConfigs.filter((round: JobPostingRoundConfig) =>\n mode === 'assignment' ? isAssignmentRoundConfig(round) : true\n );\n const targetRoundConfig = postingRoundConfigs.find(\n (round: JobPostingRoundConfig) => round.id === roundConfigId\n );\n const resolution = targetRoundConfig\n ? resolveExactCandidateRounds(actionTargets, targetRoundConfig.id)\n : { pairs: [], unresolved: [] };\n const missingCount = resolution.unresolved.filter((item) => item.reason === 'MISSING').length;\n const ambiguousCount = resolution.unresolved.filter((item) => item.reason === 'AMBIGUOUS').length;\n const emailType = ROUND_EMAIL_TYPE[mode];\n const alreadySentCount = resolution.pairs.filter(({ round }) =>\n hasCandidateEmailType(round, emailType)\n ).length;\n const willSendCount = resolution.pairs.filter(\n ({ round }) => force || !hasCandidateEmailType(round, emailType)\n ).length;\n const postingMismatch = actionTargets.some((target) => target.jobPostingId !== jobPostingId);\n\n let effectivePreviewError = previewError;\n if (!effectivePreviewError && postingError) {\n effectivePreviewError = 'Could not load the posting rounds. Nothing will be sent.';\n } else if (!effectivePreviewError && !previewLoading && !selectionDataComplete) {\n effectivePreviewError =\n 'Some selected candidate details are unavailable. Refresh the selection before sending.';\n } else if (!effectivePreviewError && postingMismatch) {\n effectivePreviewError = 'Some selected candidates do not belong to the filtered posting.';\n } else if (!effectivePreviewError && roundConfigId && !postingLoading && !targetRoundConfig) {\n effectivePreviewError = 'The selected round is no longer available. Choose another round.';\n } else if (!effectivePreviewError && ambiguousCount > 0) {\n effectivePreviewError = `${ambiguousCount} selected candidate${ambiguousCount === 1 ? ' has' : 's have'} multiple concrete rounds for this configuration. Nothing will be sent until the data is corrected.`;\n }\n\n const handleSubmit = async () => {\n if (\n submitting ||\n attempted ||\n previewLoading ||\n postingLoading ||\n effectivePreviewError ||\n !selectionDataComplete ||\n !targetRoundConfig ||\n resolution.pairs.length === 0 ||\n willSendCount === 0 ||\n (mode === 'message' && !message.trim())\n ) {\n return;\n }\n\n setSubmitting(true);\n setAttempted(true);\n setStopped(null);\n setResult(createEmptyCandidateEmailAggregate());\n\n const execution = await executeSequentialCandidateChunks({\n items: resolution.pairs.map(({ applicationId, roundId }) => ({\n applicationId,\n roundId,\n })),\n initialAggregate: createEmptyCandidateEmailAggregate(),\n onProgress: setProgress,\n executeChunk: async (chunk) => {\n if (mode === 'assignment') {\n const response = await executeNoRetryMutation<\n BulkRandomizeAndSendAssignmentMutation,\n BulkRandomizeAndSendAssignmentMutationVariables\n >(\n BulkRandomizeAndSendAssignmentDocument,\n { input: { items: [...chunk], force } },\n 'BulkRandomizeAndSendAssignment'\n );\n const bulkResult = response.bulkRandomizeAndSendAssignment;\n if (!bulkResult) {\n throw new Error('The assignment request returned no result.');\n }\n const chunkResult: CandidateEmailAggregate = {\n succeeded: bulkResult.succeeded.map((item) => ({\n applicationId: item.applicationId,\n roundId: item.id,\n })),\n skipped: bulkResult.skipped.map((item) => ({\n applicationId: item.applicationId,\n roundId: item.roundId,\n reason: item.reason,\n message: item.message,\n })),\n failed: bulkResult.failed.map((item) => ({\n applicationId: item.applicationId,\n roundId: item.roundId,\n message: item.message,\n })),\n };\n assertCompleteCandidateEmailChunkResult(chunk, chunkResult);\n return chunkResult;\n }\n\n const response = await executeNoRetryMutation<\n BulkSendRoundMessageMutation,\n BulkSendRoundMessageMutationVariables\n >(\n BulkSendRoundMessageDocument,\n { input: { items: [...chunk], message: message.trim(), force } },\n 'BulkSendRoundMessage'\n );\n const bulkResult = response.bulkSendRoundMessage;\n if (!bulkResult) {\n throw new Error('The message request returned no result.');\n }\n const chunkResult: CandidateEmailAggregate = {\n succeeded: bulkResult.succeeded.map((item) => ({\n applicationId: item.applicationId,\n roundId: item.id,\n })),\n skipped: bulkResult.skipped.map((item) => ({\n applicationId: item.applicationId,\n roundId: item.roundId,\n reason: item.reason,\n message: item.message,\n })),\n failed: bulkResult.failed.map((item) => ({\n applicationId: item.applicationId,\n roundId: item.roundId,\n message: item.message,\n })),\n };\n assertCompleteCandidateEmailChunkResult(chunk, chunkResult);\n return chunkResult;\n },\n mergeResult: aggregateCandidateEmailResult,\n });\n\n setResult(execution.aggregate);\n if (execution.error) {\n setStopped({\n knownCompleted: execution.processedItems.length,\n ambiguous: execution.ambiguousItems.length,\n notStarted: execution.notStartedItems.length,\n message: errorMessage(execution.error),\n });\n }\n nativeNotify(\n getBulkOperationNotificationSeverity({\n succeeded: execution.aggregate.succeeded.length,\n skipped: execution.aggregate.skipped.length,\n failed: execution.aggregate.failed.length,\n ambiguous: !!execution.error,\n })\n );\n setSubmitting(false);\n\n void client\n .refetchQueries({\n include: ['GetJobApplications', 'GetJobApplicationInterviewRounds'],\n })\n .catch(() => undefined);\n };\n\n const previewBusy = previewLoading || postingLoading;\n const title = mode === 'assignment' ? 'Assign & Email Random Take-Home' : 'Send Message';\n\n return (\n <Dialog\n open={open}\n onOpenChange={(next) => {\n if (!next && !submitting) onClose();\n }}\n >\n <DialogContent className=\"sm:max-w-xl max-h-[90vh] overflow-y-auto\">\n <DialogHeader>\n <DialogTitle>{title}</DialogTitle>\n <DialogDescription>\n Choose one configured round for the candidates in the filtered posting.\n </DialogDescription>\n </DialogHeader>\n\n <BulkCandidateActionGuidance action={mode} unresolvedCount={missingCount} />\n\n {attempted ? (\n <div className=\"space-y-4\">\n {progress ? <BulkOperationProgress progress={progress} /> : null}\n <CandidateEmailResultDetails result={result} />\n {stopped ? <StoppedBulkOperationNotice details={stopped} /> : null}\n <DialogFooter>\n <Button onClick={onClose} disabled={submitting}>\n Done\n </Button>\n </DialogFooter>\n </div>\n ) : (\n <div className=\"space-y-4\">\n {previewBusy ? (\n <div className=\"flex items-center gap-2 text-sm text-text-secondary\">\n <Loader2 size={14} className=\"animate-spin\" />\n Refreshing candidates and configured rounds…\n </div>\n ) : null}\n\n {effectivePreviewError ? (\n <div className=\"flex items-start gap-2 text-sm text-status-error-text\" role=\"alert\">\n <AlertCircle size={14} className=\"mt-0.5 shrink-0\" />\n <span>{effectivePreviewError}</span>\n </div>\n ) : null}\n\n <div className=\"space-y-1.5\">\n <Label htmlFor=\"bulk-round-config\">Target round</Label>\n <Select\n value={roundConfigId}\n onValueChange={setRoundConfigId}\n disabled={previewBusy || !!effectivePreviewError}\n >\n <SelectTrigger id=\"bulk-round-config\">\n <SelectValue placeholder=\"Select a round\" />\n </SelectTrigger>\n <SelectContent>\n {roundConfigs.map((round: JobPostingRoundConfig) => (\n <SelectItem key={round.id} value={round.id}>\n Round {round.roundNumber} — {round.name}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n {roundConfigs.length === 0 && !previewBusy && !effectivePreviewError ? (\n <p className=\"text-xs text-status-warning-text\">\n {mode === 'assignment'\n ? 'This posting has no configured assignment round.'\n : 'This posting has no configured interview rounds.'}\n </p>\n ) : null}\n </div>\n\n {mode === 'message' ? (\n <div className=\"space-y-1.5\">\n <Label htmlFor=\"bulk-message\">Free-text message</Label>\n <Textarea\n id=\"bulk-message\"\n value={message}\n onChange={(event: React.ChangeEvent<HTMLTextAreaElement>) =>\n setMessage(event.target.value)\n }\n placeholder=\"Write the message sent to each candidate\"\n rows={5}\n />\n </div>\n ) : null}\n\n {roundConfigId && !previewBusy && !effectivePreviewError ? (\n <div className=\"space-y-2 rounded-md border border-border-seam bg-bg-sunken/30 p-3 text-xs text-text-secondary\">\n <p className=\"font-medium text-text-primary\">Preview</p>\n <p>\n Will send to <span className=\"font-semibold\">{willSendCount}</span> candidate\n {willSendCount === 1 ? '' : 's'}.\n </p>\n {alreadySentCount > 0 ? (\n <p>\n {alreadySentCount} already received this email type{' '}\n {force ? '(force will send again)' : '(the backend will skip them)'}.\n </p>\n ) : null}\n {missingCount > 0 ? (\n <Button type=\"button\" size=\"sm\" variant=\"outline\" onClick={onOpenAddRound}>\n <UserPlus size={14} />\n Add Selected to Round\n </Button>\n ) : null}\n <label className=\"flex cursor-pointer items-start gap-2 pt-1\">\n <Checkbox\n checked={force}\n onCheckedChange={(checked) => setForce(checked === true)}\n />\n <span>\n Force resend to candidates with a prior email. Force sends are non-idempotent\n and are never retried automatically.\n </span>\n </label>\n </div>\n ) : null}\n\n <DialogFooter>\n <Button variant=\"outline\" onClick={onClose} disabled={submitting}>\n Cancel\n </Button>\n <Button\n onClick={() => void handleSubmit()}\n disabled={\n submitting ||\n previewBusy ||\n !!effectivePreviewError ||\n !selectionDataComplete ||\n !roundConfigId ||\n resolution.pairs.length === 0 ||\n willSendCount === 0 ||\n (mode === 'message' && !message.trim())\n }\n >\n {submitting ? (\n <Loader2 size={16} className=\"mr-2 animate-spin\" />\n ) : (\n <Send size={16} />\n )}\n {submitting ? 'Sending…' : 'Send'}\n </Button>\n </DialogFooter>\n </div>\n )}\n </DialogContent>\n </Dialog>\n );\n}\n\nexport function AddSelectedToRoundDialog({\n open,\n onClose,\n targets,\n selection,\n jobPostingId,\n previewLoading,\n previewError,\n}: SharedDialogProps) {\n const client = useApolloClient();\n const [roundConfigId, setRoundConfigId] = useState('');\n const [progress, setProgress] = useState<SequentialExecutionProgress | null>(null);\n const [result, setResult] = useState<EnsureRoundAggregate>(createEmptyEnsureRoundAggregate);\n const [stopped, setStopped] = useState<StoppedBulkOperationDetails | null>(null);\n const [attempted, setAttempted] = useState(false);\n const [submitting, setSubmitting] = useState(false);\n\n const {\n data: postingData,\n loading: postingLoading,\n error: postingError,\n } = useGetJobPostingQuery({\n variables: { id: jobPostingId },\n skip: !open || !jobPostingId,\n fetchPolicy: 'network-only',\n });\n useEffect(() => {\n if (!open) return;\n setRoundConfigId('');\n setProgress(null);\n setResult(createEmptyEnsureRoundAggregate());\n setStopped(null);\n setAttempted(false);\n setSubmitting(false);\n }, [open]);\n\n const actionTargets = useMemo(() => selectedTargets(targets, selection), [selection, targets]);\n const intendedSelectionCount = getCandidateSelectionCount(selection);\n const selectionDataComplete = actionTargets.length === intendedSelectionCount;\n const selectedIds = actionTargets.map((target) => target.id);\n const postingMismatch = actionTargets.some((target) => target.jobPostingId !== jobPostingId);\n const roundConfigs = postingData?.jobPosting?.rounds ?? [];\n const selectedConfig = roundConfigs.find(\n (round: JobPostingRoundConfig) => round.id === roundConfigId\n );\n\n let effectivePreviewError = previewError;\n if (!effectivePreviewError && postingError) {\n effectivePreviewError = 'Could not load the posting rounds. Nothing will be changed.';\n } else if (!effectivePreviewError && !previewLoading && !selectionDataComplete) {\n effectivePreviewError =\n 'Some selected candidate details are unavailable. Refresh the selection before adding rounds.';\n } else if (!effectivePreviewError && postingMismatch) {\n effectivePreviewError = 'Some selected candidates do not belong to the filtered posting.';\n } else if (!effectivePreviewError && roundConfigId && !postingLoading && !selectedConfig) {\n effectivePreviewError = 'The selected round is no longer available. Choose another round.';\n }\n\n const handleSubmit = async () => {\n if (\n submitting ||\n attempted ||\n previewLoading ||\n postingLoading ||\n effectivePreviewError ||\n !selectionDataComplete ||\n !selectedConfig ||\n selectedIds.length === 0\n ) {\n return;\n }\n\n setSubmitting(true);\n setAttempted(true);\n setStopped(null);\n setResult(createEmptyEnsureRoundAggregate());\n\n const execution = await executeSequentialCandidateChunks({\n items: selectedIds,\n initialAggregate: createEmptyEnsureRoundAggregate(),\n onProgress: setProgress,\n executeChunk: async (applicationIds) => {\n const response = await executeNoRetryMutation<\n BulkEnsureInterviewRoundsMutation,\n BulkEnsureInterviewRoundsMutationVariables\n >(\n BulkEnsureInterviewRoundsDocument,\n {\n input: {\n jobPostingId,\n roundConfigId: selectedConfig.id,\n applicationIds: [...applicationIds],\n },\n },\n 'BulkEnsureInterviewRounds'\n );\n const bulkResult = response.bulkEnsureInterviewRounds;\n if (!bulkResult) {\n throw new Error('The add-to-round request returned no result.');\n }\n const chunkResult: EnsureRoundAggregate = {\n created: bulkResult.created.map((item) => ({\n id: item.round.id,\n applicationId: item.applicationId,\n })),\n alreadyPresent: bulkResult.alreadyPresent.map((item) => ({\n id: item.round.id,\n applicationId: item.applicationId,\n })),\n failed: bulkResult.failed.map((item: EnsureRoundFailure) => ({\n applicationId: item.applicationId,\n code: item.code,\n message: item.message,\n })),\n };\n assertCompleteEnsureRoundChunkResult(applicationIds, chunkResult);\n return chunkResult;\n },\n mergeResult: aggregateEnsureRoundResult,\n });\n\n setResult(execution.aggregate);\n if (execution.error) {\n setStopped({\n knownCompleted: execution.processedItems.length,\n ambiguous: execution.ambiguousItems.length,\n notStarted: execution.notStartedItems.length,\n message: errorMessage(execution.error),\n });\n }\n nativeNotify(\n getBulkOperationNotificationSeverity({\n succeeded: execution.aggregate.created.length + execution.aggregate.alreadyPresent.length,\n skipped: 0,\n failed: execution.aggregate.failed.length,\n ambiguous: !!execution.error,\n })\n );\n setSubmitting(false);\n\n void client\n .refetchQueries({\n include: ['GetJobApplications', 'GetJobApplicationInterviewRounds'],\n })\n .catch(() => undefined);\n };\n\n const previewBusy = previewLoading || postingLoading;\n\n return (\n <Dialog\n open={open}\n onOpenChange={(next) => {\n if (!next && !submitting) onClose();\n }}\n >\n <DialogContent className=\"sm:max-w-xl max-h-[90vh] overflow-y-auto\">\n <DialogHeader>\n <DialogTitle>Add Selected to Round</DialogTitle>\n <DialogDescription>\n Add every selected candidate in this posting to one configured interview round.\n </DialogDescription>\n </DialogHeader>\n\n <div className=\"rounded-md border border-border-seam bg-bg-sunken/30 p-3 text-sm text-text-secondary\">\n Candidates without this concrete round are added with status Scheduled. Existing target\n rounds are left unchanged, and all prior round history and application status remain\n unchanged.\n </div>\n\n {attempted ? (\n <div className=\"space-y-4\">\n {progress ? <BulkOperationProgress progress={progress} /> : null}\n <EnsureRoundResultDetails result={result} />\n {stopped ? <StoppedBulkOperationNotice details={stopped} /> : null}\n <DialogFooter>\n <Button onClick={onClose} disabled={submitting}>\n Done\n </Button>\n </DialogFooter>\n </div>\n ) : (\n <div className=\"space-y-4\">\n {previewBusy ? (\n <div className=\"flex items-center gap-2 text-sm text-text-secondary\">\n <Loader2 size={14} className=\"animate-spin\" />\n Refreshing candidates and configured rounds…\n </div>\n ) : null}\n\n {effectivePreviewError ? (\n <div className=\"flex items-start gap-2 text-sm text-status-error-text\" role=\"alert\">\n <AlertCircle size={14} className=\"mt-0.5 shrink-0\" />\n <span>{effectivePreviewError}</span>\n </div>\n ) : null}\n\n <div className=\"space-y-1.5\">\n <Label htmlFor=\"ensure-round-config\">Interview round</Label>\n <Select\n value={roundConfigId}\n onValueChange={setRoundConfigId}\n disabled={previewBusy || !!effectivePreviewError}\n >\n <SelectTrigger id=\"ensure-round-config\">\n <SelectValue placeholder=\"Select a round\" />\n </SelectTrigger>\n <SelectContent>\n {roundConfigs.map((round: JobPostingRoundConfig) => (\n <SelectItem key={round.id} value={round.id}>\n Round {round.roundNumber} — {round.name}\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n {roundConfigs.length === 0 && !previewBusy && !effectivePreviewError ? (\n <p className=\"text-xs text-status-warning-text\">\n This posting has no configured interview rounds.\n </p>\n ) : null}\n </div>\n\n <p className=\"text-xs text-text-secondary\">\n {intendedSelectionCount} selected candidate{intendedSelectionCount === 1 ? '' : 's'}{' '}\n will be checked. Existing target rounds are reported as already present.\n </p>\n\n <DialogFooter>\n <Button variant=\"outline\" onClick={onClose} disabled={submitting}>\n Cancel\n </Button>\n <Button\n onClick={() => void handleSubmit()}\n disabled={\n submitting ||\n previewBusy ||\n !!effectivePreviewError ||\n !selectionDataComplete ||\n !roundConfigId ||\n selectedIds.length === 0\n }\n >\n {submitting ? (\n <Loader2 size={16} className=\"mr-2 animate-spin\" />\n ) : (\n <UserPlus size={16} />\n )}\n {submitting ? 'Adding…' : 'Add Selected to Round'}\n </Button>\n </DialogFooter>\n </div>\n )}\n </DialogContent>\n </Dialog>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;AAuEA,SAAgB,EAAwB,GAAuC;CAC7E,OAAO,EAAM,qBAAqB,EAAM,cAAc,EAAmB;AAC3E;AAEA,IAAM,KAA4D;CAChE,SAAS;CACT,YAAY;AACd;AAYA,SAAS,GAAa,GAAwB;CAC5C,OAAO,aAAiB,QAAQ,EAAM,UAAU;AAClD;AAEA,eAAe,EACb,GACA,GACA,GACgB;CAChB,IAAM,IAAW,MAAM,EAAoB;EACzC,SAAS;EACT,OAAO,EAAM,CAAQ;EACrB;EACA;EAGA,eAAe;CACjB,CAAC;CACD,IAAI,EAAS,QAAQ,QACnB,MAAU,MAAM,EAAS,OAAO,KAAK,MAAU,EAAM,OAAO,CAAC,CAAC,KAAK,IAAI,CAAC;CAE1E,IAAI,CAAC,EAAS,MACZ,MAAU,MAAM,GAAG,EAAc,mBAAmB;CAEtD,OAAO,EAAS;AAClB;AAEA,SAAS,GACP,GACA,GACuB;CACvB,IAAM,IAAc,EAAwB,CAAS;CACrD,OAAO,EAAQ,QAAQ,MAAW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