@burdenoff/microfe-support 2026.1029.2 → 2026.1031.1
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.js +1 -2
- package/dist/generated/global-operations.js.map +1 -1
- package/dist/generated/global-types.js +1 -2
- package/dist/generated/global-types.js.map +1 -1
- package/dist/node_modules/@tiptap/core/dist/index.js +701 -712
- package/dist/node_modules/@tiptap/core/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js +1 -2
- package/dist/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js.map +1 -1
- package/dist/node_modules/@tiptap/core/dist/rolldown-runtime-D7D4PA-g.js +1 -2
- package/dist/node_modules/@tiptap/core/dist/rolldown-runtime-D7D4PA-g.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-blockquote/dist/index.js +15 -16
- package/dist/node_modules/@tiptap/extension-blockquote/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-bold/dist/index.js +1 -2
- package/dist/node_modules/@tiptap/extension-bold/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-code/dist/index.js +1 -2
- package/dist/node_modules/@tiptap/extension-code/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-code-block/dist/index.js +25 -26
- package/dist/node_modules/@tiptap/extension-code-block/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-document/dist/index.js +1 -2
- package/dist/node_modules/@tiptap/extension-document/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-hard-break/dist/index.js +1 -2
- package/dist/node_modules/@tiptap/extension-hard-break/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-heading/dist/index.js +1 -2
- package/dist/node_modules/@tiptap/extension-heading/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-horizontal-rule/dist/index.js +16 -17
- package/dist/node_modules/@tiptap/extension-horizontal-rule/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-italic/dist/index.js +1 -2
- package/dist/node_modules/@tiptap/extension-italic/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-link/dist/index.js +71 -80
- package/dist/node_modules/@tiptap/extension-link/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-list/dist/index.js +77 -90
- package/dist/node_modules/@tiptap/extension-list/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-paragraph/dist/index.js +1 -2
- package/dist/node_modules/@tiptap/extension-paragraph/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-placeholder/dist/index.js +1 -2
- package/dist/node_modules/@tiptap/extension-placeholder/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-strike/dist/index.js +1 -2
- package/dist/node_modules/@tiptap/extension-strike/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-text/dist/index.js +1 -2
- package/dist/node_modules/@tiptap/extension-text/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extension-underline/dist/index.js +1 -2
- package/dist/node_modules/@tiptap/extension-underline/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/extensions/dist/index.js +112 -113
- package/dist/node_modules/@tiptap/extensions/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/react/dist/index.js +5 -10
- package/dist/node_modules/@tiptap/react/dist/index.js.map +1 -1
- package/dist/node_modules/@tiptap/starter-kit/dist/index.js +1 -2
- package/dist/node_modules/@tiptap/starter-kit/dist/index.js.map +1 -1
- package/dist/node_modules/clsx/dist/clsx.js +1 -2
- package/dist/node_modules/clsx/dist/clsx.js.map +1 -1
- package/dist/node_modules/dompurify/dist/purify.es.js +357 -347
- package/dist/node_modules/dompurify/dist/purify.es.js.map +1 -1
- package/dist/node_modules/fast-equals/dist/es/index.js +1 -2
- package/dist/node_modules/fast-equals/dist/es/index.js.map +1 -1
- package/dist/node_modules/linkifyjs/dist/linkify.js +1 -2
- package/dist/node_modules/linkifyjs/dist/linkify.js.map +1 -1
- package/dist/node_modules/marked/lib/marked.esm.js +10 -70
- package/dist/node_modules/marked/lib/marked.esm.js.map +1 -1
- package/dist/node_modules/orderedmap/dist/index.js +1 -2
- package/dist/node_modules/orderedmap/dist/index.js.map +1 -1
- package/dist/node_modules/prosemirror-commands/dist/index.js +107 -108
- package/dist/node_modules/prosemirror-commands/dist/index.js.map +1 -1
- package/dist/node_modules/prosemirror-dropcursor/dist/index.js +12 -13
- package/dist/node_modules/prosemirror-dropcursor/dist/index.js.map +1 -1
- package/dist/node_modules/prosemirror-gapcursor/dist/index.js +42 -47
- package/dist/node_modules/prosemirror-gapcursor/dist/index.js.map +1 -1
- package/dist/node_modules/prosemirror-history/dist/index.js +47 -49
- package/dist/node_modules/prosemirror-history/dist/index.js.map +1 -1
- package/dist/node_modules/prosemirror-keymap/dist/index.js +15 -16
- package/dist/node_modules/prosemirror-keymap/dist/index.js.map +1 -1
- package/dist/node_modules/prosemirror-model/dist/index.js +37 -41
- package/dist/node_modules/prosemirror-model/dist/index.js.map +1 -1
- package/dist/node_modules/prosemirror-schema-list/dist/index.js +36 -37
- package/dist/node_modules/prosemirror-schema-list/dist/index.js.map +1 -1
- package/dist/node_modules/prosemirror-state/dist/index.js +1 -2
- package/dist/node_modules/prosemirror-state/dist/index.js.map +1 -1
- package/dist/node_modules/prosemirror-transform/dist/index.js +1 -2
- package/dist/node_modules/prosemirror-transform/dist/index.js.map +1 -1
- package/dist/node_modules/prosemirror-view/dist/index.js +302 -304
- package/dist/node_modules/prosemirror-view/dist/index.js.map +1 -1
- package/dist/node_modules/rope-sequence/dist/index.js +1 -2
- package/dist/node_modules/rope-sequence/dist/index.js.map +1 -1
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +4 -21
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -1
- package/dist/node_modules/w3c-keyname/index.js +0 -1
- package/dist/node_modules/w3c-keyname/index.js.map +1 -1
- package/dist/support/SupportAdminRoot.js +14 -15
- package/dist/support/SupportAdminRoot.js.map +1 -1
- package/dist/support/SupportAdminRoutes.js +5 -6
- package/dist/support/SupportAdminRoutes.js.map +1 -1
- package/dist/support/SupportUserRoot.js +10 -11
- package/dist/support/SupportUserRoot.js.map +1 -1
- package/dist/support/SupportUserRoutes.js +1 -2
- package/dist/support/SupportUserRoutes.js.map +1 -1
- package/dist/support/components/NotificationToast.js +1 -2
- package/dist/support/components/NotificationToast.js.map +1 -1
- package/dist/support/components/PageLayout.js +15 -16
- package/dist/support/components/PageLayout.js.map +1 -1
- package/dist/support/components/RouteHelpers.js +1 -2
- package/dist/support/components/RouteHelpers.js.map +1 -1
- package/dist/support/components/analytics/CategoryBreakdown.js +9 -10
- package/dist/support/components/analytics/CategoryBreakdown.js.map +1 -1
- package/dist/support/components/analytics/MetricCard.js +1 -2
- package/dist/support/components/analytics/MetricCard.js.map +1 -1
- package/dist/support/components/analytics/PriorityBreakdown.js +9 -10
- package/dist/support/components/analytics/PriorityBreakdown.js.map +1 -1
- package/dist/support/components/analytics/SLAReport.js +5 -6
- package/dist/support/components/analytics/SLAReport.js.map +1 -1
- package/dist/support/components/analytics/SatisfactionDistribution.js +5 -6
- package/dist/support/components/analytics/SatisfactionDistribution.js.map +1 -1
- package/dist/support/components/analytics/TopAgents.js +5 -6
- package/dist/support/components/analytics/TopAgents.js.map +1 -1
- package/dist/support/components/analytics/TrendChart.js +5 -6
- package/dist/support/components/analytics/TrendChart.js.map +1 -1
- package/dist/support/components/careers/BulkCandidateActionGuidance.js +1 -2
- package/dist/support/components/careers/BulkCandidateActionGuidance.js.map +1 -1
- package/dist/support/components/careers/BulkCandidateDialogs.js +321 -322
- package/dist/support/components/careers/BulkCandidateDialogs.js.map +1 -1
- package/dist/support/components/careers/BulkOperationFeedback.js +1 -2
- package/dist/support/components/careers/BulkOperationFeedback.js.map +1 -1
- package/dist/support/components/careers/BulkSelectionSummary.js +1 -2
- package/dist/support/components/careers/BulkSelectionSummary.js.map +1 -1
- package/dist/support/components/careers/JobApplicationFilterContextGuard.js +1 -2
- package/dist/support/components/careers/JobApplicationFilterContextGuard.js.map +1 -1
- package/dist/support/components/careers/RichTextEditor.js +17 -18
- package/dist/support/components/careers/RichTextEditor.js.map +1 -1
- package/dist/support/components/kb/ArticleForm.js +10 -11
- package/dist/support/components/kb/ArticleForm.js.map +1 -1
- package/dist/support/components/settings/CannedResponsesSettings.js +2 -3
- package/dist/support/components/settings/CannedResponsesSettings.js.map +1 -1
- package/dist/support/components/settings/SLAPoliciesSettings.js +1 -2
- package/dist/support/components/settings/SLAPoliciesSettings.js.map +1 -1
- package/dist/support/components/settings/TicketCategoriesSettings.js +3 -8
- package/dist/support/components/settings/TicketCategoriesSettings.js.map +1 -1
- package/dist/support/components/tickets/AttachmentList.js +4 -5
- package/dist/support/components/tickets/AttachmentList.js.map +1 -1
- package/dist/support/components/tickets/MarkdownContent.js +1 -2
- package/dist/support/components/tickets/MarkdownContent.js.map +1 -1
- package/dist/support/components/tickets/MessageComposer.js +1 -2
- package/dist/support/components/tickets/MessageComposer.js.map +1 -1
- package/dist/support/components/tickets/MessageThread.js +13 -14
- package/dist/support/components/tickets/MessageThread.js.map +1 -1
- package/dist/support/components/tickets/TicketDetailHeader.js +13 -14
- package/dist/support/components/tickets/TicketDetailHeader.js.map +1 -1
- package/dist/support/components/tickets/TicketHeader.js +1 -2
- package/dist/support/components/tickets/TicketHeader.js.map +1 -1
- package/dist/support/components/tickets/TicketSidebar.js +6 -7
- package/dist/support/components/tickets/TicketSidebar.js.map +1 -1
- package/dist/support/components/tickets/TriagePanel.js +25 -26
- package/dist/support/components/tickets/TriagePanel.js.map +1 -1
- package/dist/support/components/ui.js +1 -2
- package/dist/support/constants/pipeline.js +1 -2
- package/dist/support/constants/pipeline.js.map +1 -1
- package/dist/support/constants.js +1 -2
- package/dist/support/constants.js.map +1 -1
- package/dist/support/events/rybbit.js +1 -2
- package/dist/support/events/rybbit.js.map +1 -1
- package/dist/support/hooks/index.js +6 -6
- package/dist/support/hooks/useAnalyticsOperations.js +1 -2
- package/dist/support/hooks/useAnalyticsOperations.js.map +1 -1
- package/dist/support/hooks/useAttachmentsFailedToast.js +1 -2
- package/dist/support/hooks/useAttachmentsFailedToast.js.map +1 -1
- package/dist/support/hooks/useChatOperations.js +14 -15
- package/dist/support/hooks/useChatOperations.js.map +1 -1
- package/dist/support/hooks/useDebouncedUrlText.js +1 -2
- package/dist/support/hooks/useDebouncedUrlText.js.map +1 -1
- package/dist/support/hooks/useKnowledgeBaseOperations.js +62 -63
- package/dist/support/hooks/useKnowledgeBaseOperations.js.map +1 -1
- package/dist/support/hooks/useNotification.js +1 -2
- package/dist/support/hooks/useNotification.js.map +1 -1
- package/dist/support/hooks/useRegisterFooter.js +1 -2
- package/dist/support/hooks/useRegisterFooter.js.map +1 -1
- package/dist/support/hooks/useSettingsOperations.js +1 -2
- package/dist/support/hooks/useSettingsOperations.js.map +1 -1
- package/dist/support/hooks/useSupportAttachments.js +1 -2
- package/dist/support/hooks/useSupportAttachments.js.map +1 -1
- package/dist/support/hooks/useTicketListOperations.js +9 -10
- package/dist/support/hooks/useTicketListOperations.js.map +1 -1
- package/dist/support/hooks/useTicketOperations.d.ts +8 -0
- package/dist/support/hooks/useTicketOperations.js +92 -93
- package/dist/support/hooks/useTicketOperations.js.map +1 -1
- package/dist/support/hooks/useTr.js +1 -2
- package/dist/support/hooks/useTr.js.map +1 -1
- package/dist/support/index.js +4 -4
- package/dist/support/pages/AnalyticsPage.js +34 -35
- package/dist/support/pages/AnalyticsPage.js.map +1 -1
- package/dist/support/pages/ArticleDetailAdminPage.js +33 -38
- package/dist/support/pages/ArticleDetailAdminPage.js.map +1 -1
- package/dist/support/pages/ArticleDetailUserPage.js +22 -23
- package/dist/support/pages/ArticleDetailUserPage.js.map +1 -1
- package/dist/support/pages/ContactInquiriesPage.js +5 -6
- package/dist/support/pages/ContactInquiriesPage.js.map +1 -1
- package/dist/support/pages/ContactInquiryDetailPage.js +13 -14
- package/dist/support/pages/ContactInquiryDetailPage.js.map +1 -1
- package/dist/support/pages/CreateArticlePage.js +15 -16
- package/dist/support/pages/CreateArticlePage.js.map +1 -1
- package/dist/support/pages/CreateTicketPage.js +37 -44
- package/dist/support/pages/CreateTicketPage.js.map +1 -1
- package/dist/support/pages/EditArticlePage.js +20 -21
- package/dist/support/pages/EditArticlePage.js.map +1 -1
- package/dist/support/pages/InterviewersPage.js +121 -122
- package/dist/support/pages/InterviewersPage.js.map +1 -1
- package/dist/support/pages/JobApplicationDetailPage.js +322 -332
- package/dist/support/pages/JobApplicationDetailPage.js.map +1 -1
- package/dist/support/pages/JobApplicationsPage.js +556 -561
- package/dist/support/pages/JobApplicationsPage.js.map +1 -1
- package/dist/support/pages/JobPostingDetailPage.js +489 -490
- package/dist/support/pages/JobPostingDetailPage.js.map +1 -1
- package/dist/support/pages/JobPostingsPage.js +279 -280
- package/dist/support/pages/JobPostingsPage.js.map +1 -1
- package/dist/support/pages/KnowledgeBaseAdminPage.js +26 -27
- package/dist/support/pages/KnowledgeBaseAdminPage.js.map +1 -1
- package/dist/support/pages/KnowledgeBaseUserPage.js +23 -24
- package/dist/support/pages/KnowledgeBaseUserPage.js.map +1 -1
- package/dist/support/pages/SettingsPage.js +43 -44
- package/dist/support/pages/SettingsPage.js.map +1 -1
- package/dist/support/pages/TicketDetailAdminPage.js +54 -55
- package/dist/support/pages/TicketDetailAdminPage.js.map +1 -1
- package/dist/support/pages/TicketDetailUserPage.js +61 -62
- package/dist/support/pages/TicketDetailUserPage.js.map +1 -1
- package/dist/support/pages/TicketListPage.js +77 -78
- package/dist/support/pages/TicketListPage.js.map +1 -1
- package/dist/support/providers/SupportProvider.js +1 -2
- package/dist/support/providers/SupportProvider.js.map +1 -1
- package/dist/support/store/supportStore.js +1 -2
- package/dist/support/store/supportStore.js.map +1 -1
- package/dist/support/translations/en.js +1 -2
- package/dist/support/translations/en.js.map +1 -1
- package/dist/support/utils/attachments.js +1 -2
- package/dist/support/utils/attachments.js.map +1 -1
- package/dist/support/utils/breadcrumbRegistry.js +3 -4
- package/dist/support/utils/breadcrumbRegistry.js.map +1 -1
- package/dist/support/utils/bulkCandidateOperations.js +0 -1
- package/dist/support/utils/bulkCandidateOperations.js.map +1 -1
- package/dist/support/utils/bulkCandidateTargetQuery.js +1 -2
- package/dist/support/utils/bulkCandidateTargetQuery.js.map +1 -1
- package/dist/support/utils/categoryColors.js +1 -2
- package/dist/support/utils/categoryColors.js.map +1 -1
- package/dist/support/utils/cn.js +1 -2
- package/dist/support/utils/cn.js.map +1 -1
- package/dist/support/utils/context.js +3 -4
- package/dist/support/utils/context.js.map +1 -1
- package/dist/support/utils/errors.js +1 -2
- package/dist/support/utils/errors.js.map +1 -1
- package/dist/support/utils/i18n.js +1 -2
- package/dist/support/utils/i18n.js.map +1 -1
- package/dist/support/utils/index.js +1 -2
- package/dist/support/utils/index.js.map +1 -1
- package/dist/support/utils/jobApplicationFilterParams.js +1 -2
- package/dist/support/utils/jobApplicationFilterParams.js.map +1 -1
- package/dist/support/utils/markdown.js +1 -2
- package/dist/support/utils/markdown.js.map +1 -1
- package/dist/support/utils/supportFiles.js +2 -11
- package/dist/support/utils/supportFiles.js.map +1 -1
- package/dist/support/utils/ticketFilters.js +1 -2
- package/dist/support/utils/ticketFilters.js.map +1 -1
- package/dist/support/utils/uiTokens.js +1 -2
- package/dist/support/utils/uiTokens.js.map +1 -1
- package/dist/utils/nativeBridge.js +1 -2
- package/package.json +21 -14
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { statusLabels as
|
|
5
|
-
import {
|
|
6
|
-
import { RichTextEditor as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { useEffect as
|
|
11
|
-
import { AlertCircle as
|
|
1
|
+
import { BulkEnsureInterviewRoundsDocument as e, BulkRandomizeAndSendAssignmentDocument as t, BulkSendCustomEmailDocument as n, BulkSendRoundMessageDocument as r, BulkUpdateApplicationStatusDocument as i, NotifyDuplicateApplicantsDocument as a, useGetJobPostingQuery as o } from "../../../generated/global-operations.js";
|
|
2
|
+
import { InterviewRoundType as s } from "../../../generated/global-types.js";
|
|
3
|
+
import { nativeNotify as ee } from "../../../utils/nativeBridge.js";
|
|
4
|
+
import { statusLabels as c, statusOrder as l } from "../../constants/pipeline.js";
|
|
5
|
+
import { aggregateBulkCustomEmailResult as u, aggregateBulkStatusUpdateResult as d, aggregateCandidateEmailResult as f, aggregateDuplicateNoticeResult as p, aggregateEnsureRoundResult as m, assertCompleteBulkCustomEmailChunkResult as h, assertCompleteBulkStatusUpdateChunkResult as g, assertCompleteCandidateEmailChunkResult as _, assertCompleteEnsureRoundChunkResult as v, createEmptyBulkCustomEmailAggregate as y, createEmptyBulkStatusUpdateAggregate as b, createEmptyCandidateEmailAggregate as x, createEmptyDuplicateNoticeAggregate as S, createEmptyEnsureRoundAggregate as C, executeSequentialCandidateChunks as te, getBulkOperationNotificationSeverity as ne, getCandidateSelectionCount as re, getSelectedCandidateIds as w, hasCandidateEmailType as T, resolveExactCandidateRounds as E } from "../../utils/bulkCandidateOperations.js";
|
|
6
|
+
import { RichTextEditor as D } from "./RichTextEditor.js";
|
|
7
|
+
import { BulkCandidateActionGuidance as O } from "./BulkCandidateActionGuidance.js";
|
|
8
|
+
import { BulkCustomEmailResultDetails as k, BulkOperationProgress as A, BulkStatusUpdateResultDetails as j, CandidateEmailResultDetails as M, DuplicateNoticeResultDetails as N, EnsureRoundResultDetails as P, StoppedBulkOperationNotice as F } from "./BulkOperationFeedback.js";
|
|
9
|
+
import { Button as I, Checkbox as L, Dialog as ie, DialogContent as ae, DialogDescription as R, DialogFooter as z, DialogHeader as oe, DialogTitle as se, Label as B, Select as ce, SelectContent as le, SelectItem as ue, SelectTrigger as de, SelectValue as fe, Textarea as pe } from "../ui.js";
|
|
10
|
+
import { useEffect as V, useMemo as H, useState as U } from "react";
|
|
11
|
+
import { AlertCircle as W, Loader2 as G, Mail as K, Send as me, Tag as q, UserPlus as he } from "lucide-react";
|
|
12
12
|
import { graphqlFetch as ge } from "@burdenoff/fe-libs/shared/graphql/fetch";
|
|
13
13
|
import { jsx as J, jsxs as Y } from "react/jsx-runtime";
|
|
14
14
|
import { useApolloClient as _e } from "@apollo/client/react";
|
|
15
15
|
import { print as ve } from "graphql";
|
|
16
|
-
|
|
16
|
+
// src/support/components/careers/BulkCandidateDialogs.tsx
|
|
17
17
|
function ye(e) {
|
|
18
|
-
return e.isAssignmentRound || e.roundType ===
|
|
18
|
+
return e.isAssignmentRound || e.roundType === s.TakeHome;
|
|
19
19
|
}
|
|
20
20
|
var be = {
|
|
21
21
|
message: "ROUND_MESSAGE",
|
|
@@ -37,119 +37,119 @@ async function X(e, t, n) {
|
|
|
37
37
|
return r.data;
|
|
38
38
|
}
|
|
39
39
|
function Se(e, t) {
|
|
40
|
-
let n =
|
|
40
|
+
let n = w(t);
|
|
41
41
|
return e.filter((e) => n.has(e.id));
|
|
42
42
|
}
|
|
43
|
-
function Ce({ mode:
|
|
44
|
-
let
|
|
45
|
-
variables: { id:
|
|
46
|
-
skip: !
|
|
43
|
+
function Ce({ mode: e, open: n, onClose: i, onOpenAddRound: a, targets: s, selection: c, jobPostingId: l, previewLoading: u, previewError: d }) {
|
|
44
|
+
let p = _e(), [m, h] = U(""), [g, v] = U(""), [y, b] = U(!1), [S, C] = U(null), [w, D] = U(x), [k, j] = U(null), [N, P] = U(!1), [K, q] = U(!1), { data: ge, loading: ve, error: Ce } = o({
|
|
45
|
+
variables: { id: l },
|
|
46
|
+
skip: !n || !l,
|
|
47
47
|
fetchPolicy: "network-only"
|
|
48
48
|
});
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}, [
|
|
52
|
-
let we =
|
|
49
|
+
V(() => {
|
|
50
|
+
n && (h(""), v(""), b(!1), C(null), D(x()), j(null), P(!1), q(!1));
|
|
51
|
+
}, [n, e]);
|
|
52
|
+
let we = H(() => Se(s, c), [c, s]), Te = re(c), Ee = we.length === Te, De = ge?.jobPosting?.rounds ?? [], Oe = De.filter((t) => e !== "assignment" || ye(t)), ke = De.find((e) => e.id === m), Z = ke ? E(we, ke.id) : {
|
|
53
53
|
pairs: [],
|
|
54
54
|
unresolved: []
|
|
55
|
-
}, Ae = Z.unresolved.filter((e) => e.reason === "MISSING").length, je = Z.unresolved.filter((e) => e.reason === "AMBIGUOUS").length, Me = be[
|
|
56
|
-
!Q && Ce ? Q = "Could not load the posting rounds. Nothing will be sent." : !Q && !
|
|
55
|
+
}, Ae = Z.unresolved.filter((e) => e.reason === "MISSING").length, je = Z.unresolved.filter((e) => e.reason === "AMBIGUOUS").length, Me = be[e], Ne = Z.pairs.filter(({ round: e }) => T(e, Me)).length, Pe = Z.pairs.filter(({ round: e }) => y || !T(e, Me)).length, Fe = we.some((e) => e.jobPostingId !== l), Q = d;
|
|
56
|
+
!Q && Ce ? Q = "Could not load the posting rounds. Nothing will be sent." : !Q && !u && !Ee ? Q = "Some selected candidate details are unavailable. Refresh the selection before sending." : !Q && Fe ? Q = "Some selected candidates do not belong to the filtered posting." : !Q && m && !ve && !ke ? Q = "The selected round is no longer available. Choose another round." : !Q && je > 0 && (Q = `${je} selected candidate${je === 1 ? " has" : "s have"} multiple concrete rounds for this configuration. Nothing will be sent until the data is corrected.`);
|
|
57
57
|
let Ie = async () => {
|
|
58
|
-
if (K ||
|
|
59
|
-
q(!0),
|
|
60
|
-
let
|
|
58
|
+
if (K || N || u || ve || Q || !Ee || !ke || Z.pairs.length === 0 || Pe === 0 || e === "message" && !g.trim()) return;
|
|
59
|
+
q(!0), P(!0), j(null), D(x());
|
|
60
|
+
let n = await te({
|
|
61
61
|
items: Z.pairs.map(({ applicationId: e, roundId: t }) => ({
|
|
62
62
|
applicationId: e,
|
|
63
63
|
roundId: t
|
|
64
64
|
})),
|
|
65
|
-
initialAggregate:
|
|
66
|
-
onProgress:
|
|
67
|
-
executeChunk: async (
|
|
68
|
-
if (
|
|
69
|
-
let
|
|
70
|
-
items: [...
|
|
71
|
-
force:
|
|
65
|
+
initialAggregate: x(),
|
|
66
|
+
onProgress: C,
|
|
67
|
+
executeChunk: async (n) => {
|
|
68
|
+
if (e === "assignment") {
|
|
69
|
+
let e = (await X(t, { input: {
|
|
70
|
+
items: [...n],
|
|
71
|
+
force: y
|
|
72
72
|
} }, "BulkRandomizeAndSendAssignment")).bulkRandomizeAndSendAssignment;
|
|
73
|
-
if (!
|
|
74
|
-
let
|
|
75
|
-
succeeded:
|
|
73
|
+
if (!e) throw Error("The assignment request returned no result.");
|
|
74
|
+
let r = {
|
|
75
|
+
succeeded: e.succeeded.map((e) => ({
|
|
76
76
|
applicationId: e.applicationId,
|
|
77
77
|
roundId: e.id
|
|
78
78
|
})),
|
|
79
|
-
skipped:
|
|
79
|
+
skipped: e.skipped.map((e) => ({
|
|
80
80
|
applicationId: e.applicationId,
|
|
81
81
|
roundId: e.roundId,
|
|
82
82
|
reason: e.reason,
|
|
83
83
|
message: e.message
|
|
84
84
|
})),
|
|
85
|
-
failed:
|
|
85
|
+
failed: e.failed.map((e) => ({
|
|
86
86
|
applicationId: e.applicationId,
|
|
87
87
|
roundId: e.roundId,
|
|
88
88
|
message: e.message
|
|
89
89
|
}))
|
|
90
90
|
};
|
|
91
|
-
return
|
|
91
|
+
return _(n, r), r;
|
|
92
92
|
}
|
|
93
|
-
let
|
|
94
|
-
items: [...
|
|
95
|
-
message:
|
|
96
|
-
force:
|
|
93
|
+
let i = (await X(r, { input: {
|
|
94
|
+
items: [...n],
|
|
95
|
+
message: g.trim(),
|
|
96
|
+
force: y
|
|
97
97
|
} }, "BulkSendRoundMessage")).bulkSendRoundMessage;
|
|
98
|
-
if (!
|
|
99
|
-
let
|
|
100
|
-
succeeded:
|
|
98
|
+
if (!i) throw Error("The message request returned no result.");
|
|
99
|
+
let a = {
|
|
100
|
+
succeeded: i.succeeded.map((e) => ({
|
|
101
101
|
applicationId: e.applicationId,
|
|
102
102
|
roundId: e.id
|
|
103
103
|
})),
|
|
104
|
-
skipped:
|
|
104
|
+
skipped: i.skipped.map((e) => ({
|
|
105
105
|
applicationId: e.applicationId,
|
|
106
106
|
roundId: e.roundId,
|
|
107
107
|
reason: e.reason,
|
|
108
108
|
message: e.message
|
|
109
109
|
})),
|
|
110
|
-
failed:
|
|
110
|
+
failed: i.failed.map((e) => ({
|
|
111
111
|
applicationId: e.applicationId,
|
|
112
112
|
roundId: e.roundId,
|
|
113
113
|
message: e.message
|
|
114
114
|
}))
|
|
115
115
|
};
|
|
116
|
-
return
|
|
116
|
+
return _(n, a), a;
|
|
117
117
|
},
|
|
118
|
-
mergeResult:
|
|
118
|
+
mergeResult: f
|
|
119
119
|
});
|
|
120
|
-
|
|
121
|
-
knownCompleted:
|
|
122
|
-
ambiguous:
|
|
123
|
-
notStarted:
|
|
124
|
-
message: xe(
|
|
125
|
-
}),
|
|
126
|
-
succeeded:
|
|
127
|
-
skipped:
|
|
128
|
-
failed:
|
|
129
|
-
ambiguous: !!
|
|
130
|
-
})), q(!1),
|
|
131
|
-
}, $ =
|
|
132
|
-
return /* @__PURE__ */ J(
|
|
133
|
-
open:
|
|
120
|
+
D(n.aggregate), n.error && j({
|
|
121
|
+
knownCompleted: n.processedItems.length,
|
|
122
|
+
ambiguous: n.ambiguousItems.length,
|
|
123
|
+
notStarted: n.notStartedItems.length,
|
|
124
|
+
message: xe(n.error)
|
|
125
|
+
}), ee(ne({
|
|
126
|
+
succeeded: n.aggregate.succeeded.length,
|
|
127
|
+
skipped: n.aggregate.skipped.length,
|
|
128
|
+
failed: n.aggregate.failed.length,
|
|
129
|
+
ambiguous: !!n.error
|
|
130
|
+
})), q(!1), p.refetchQueries({ include: ["GetJobApplications", "GetJobApplicationInterviewRounds"] }).catch(() => void 0);
|
|
131
|
+
}, $ = u || ve;
|
|
132
|
+
return /* @__PURE__ */ J(ie, {
|
|
133
|
+
open: n,
|
|
134
134
|
onOpenChange: (e) => {
|
|
135
|
-
!e && !K &&
|
|
135
|
+
!e && !K && i();
|
|
136
136
|
},
|
|
137
|
-
children: /* @__PURE__ */ Y(
|
|
137
|
+
children: /* @__PURE__ */ Y(ae, {
|
|
138
138
|
className: "sm:max-w-xl max-h-[90vh] overflow-y-auto",
|
|
139
139
|
children: [
|
|
140
|
-
/* @__PURE__ */ Y(
|
|
141
|
-
/* @__PURE__ */ J(
|
|
142
|
-
action:
|
|
140
|
+
/* @__PURE__ */ Y(oe, { children: [/* @__PURE__ */ J(se, { children: e === "assignment" ? "Assign & Email Random Take-Home" : "Send Message" }), /* @__PURE__ */ J(R, { children: "Choose one configured round for the candidates in the filtered posting." })] }),
|
|
141
|
+
/* @__PURE__ */ J(O, {
|
|
142
|
+
action: e,
|
|
143
143
|
unresolvedCount: Ae
|
|
144
144
|
}),
|
|
145
|
-
|
|
145
|
+
N ? /* @__PURE__ */ Y("div", {
|
|
146
146
|
className: "space-y-4",
|
|
147
147
|
children: [
|
|
148
|
-
|
|
149
|
-
/* @__PURE__ */ J(
|
|
150
|
-
|
|
151
|
-
/* @__PURE__ */ J(
|
|
152
|
-
onClick:
|
|
148
|
+
S ? /* @__PURE__ */ J(A, { progress: S }) : null,
|
|
149
|
+
/* @__PURE__ */ J(M, { result: w }),
|
|
150
|
+
k ? /* @__PURE__ */ J(F, { details: k }) : null,
|
|
151
|
+
/* @__PURE__ */ J(z, { children: /* @__PURE__ */ J(I, {
|
|
152
|
+
onClick: i,
|
|
153
153
|
disabled: K,
|
|
154
154
|
children: "Done"
|
|
155
155
|
}) })
|
|
@@ -167,7 +167,7 @@ function Ce({ mode: f, open: m, onClose: g, onOpenAddRound: _, targets: y, selec
|
|
|
167
167
|
Q ? /* @__PURE__ */ Y("div", {
|
|
168
168
|
className: "flex items-start gap-2 text-sm text-status-error-text",
|
|
169
169
|
role: "alert",
|
|
170
|
-
children: [/* @__PURE__ */ J(
|
|
170
|
+
children: [/* @__PURE__ */ J(W, {
|
|
171
171
|
size: 14,
|
|
172
172
|
className: "mt-0.5 shrink-0"
|
|
173
173
|
}), /* @__PURE__ */ J("span", { children: Q })]
|
|
@@ -175,18 +175,18 @@ function Ce({ mode: f, open: m, onClose: g, onOpenAddRound: _, targets: y, selec
|
|
|
175
175
|
/* @__PURE__ */ Y("div", {
|
|
176
176
|
className: "space-y-1.5",
|
|
177
177
|
children: [
|
|
178
|
-
/* @__PURE__ */ J(
|
|
178
|
+
/* @__PURE__ */ J(B, {
|
|
179
179
|
htmlFor: "bulk-round-config",
|
|
180
180
|
children: "Target round"
|
|
181
181
|
}),
|
|
182
|
-
/* @__PURE__ */ Y(
|
|
183
|
-
value:
|
|
184
|
-
onValueChange:
|
|
182
|
+
/* @__PURE__ */ Y(ce, {
|
|
183
|
+
value: m,
|
|
184
|
+
onValueChange: h,
|
|
185
185
|
disabled: $ || !!Q,
|
|
186
|
-
children: [/* @__PURE__ */ J(
|
|
186
|
+
children: [/* @__PURE__ */ J(de, {
|
|
187
187
|
id: "bulk-round-config",
|
|
188
|
-
children: /* @__PURE__ */ J(
|
|
189
|
-
}), /* @__PURE__ */ J(
|
|
188
|
+
children: /* @__PURE__ */ J(fe, { placeholder: "Select a round" })
|
|
189
|
+
}), /* @__PURE__ */ J(le, { children: Oe.map((e) => /* @__PURE__ */ Y(ue, {
|
|
190
190
|
value: e.id,
|
|
191
191
|
children: [
|
|
192
192
|
"Round ",
|
|
@@ -198,24 +198,24 @@ function Ce({ mode: f, open: m, onClose: g, onOpenAddRound: _, targets: y, selec
|
|
|
198
198
|
}),
|
|
199
199
|
Oe.length === 0 && !$ && !Q ? /* @__PURE__ */ J("p", {
|
|
200
200
|
className: "text-xs text-status-warning-text",
|
|
201
|
-
children:
|
|
201
|
+
children: e === "assignment" ? "This posting has no configured assignment round." : "This posting has no configured interview rounds."
|
|
202
202
|
}) : null
|
|
203
203
|
]
|
|
204
204
|
}),
|
|
205
|
-
|
|
205
|
+
e === "message" ? /* @__PURE__ */ Y("div", {
|
|
206
206
|
className: "space-y-1.5",
|
|
207
|
-
children: [/* @__PURE__ */ J(
|
|
207
|
+
children: [/* @__PURE__ */ J(B, {
|
|
208
208
|
htmlFor: "bulk-message",
|
|
209
209
|
children: "Free-text message"
|
|
210
|
-
}), /* @__PURE__ */ J(
|
|
210
|
+
}), /* @__PURE__ */ J(pe, {
|
|
211
211
|
id: "bulk-message",
|
|
212
|
-
value:
|
|
213
|
-
onChange: (e) =>
|
|
212
|
+
value: g,
|
|
213
|
+
onChange: (e) => v(e.target.value),
|
|
214
214
|
placeholder: "Write the message sent to each candidate",
|
|
215
215
|
rows: 5
|
|
216
216
|
})]
|
|
217
217
|
}) : null,
|
|
218
|
-
|
|
218
|
+
m && !$ && !Q ? /* @__PURE__ */ Y("div", {
|
|
219
219
|
className: "space-y-2 rounded-md border border-border-seam bg-bg-sunken/30 p-3 text-xs text-text-secondary",
|
|
220
220
|
children: [
|
|
221
221
|
/* @__PURE__ */ J("p", {
|
|
@@ -236,33 +236,33 @@ function Ce({ mode: f, open: m, onClose: g, onOpenAddRound: _, targets: y, selec
|
|
|
236
236
|
Ne,
|
|
237
237
|
" already received this email type",
|
|
238
238
|
" ",
|
|
239
|
-
|
|
239
|
+
y ? "(force will send again)" : "(the backend will skip them)",
|
|
240
240
|
"."
|
|
241
241
|
] }) : null,
|
|
242
|
-
Ae > 0 ? /* @__PURE__ */ Y(
|
|
242
|
+
Ae > 0 ? /* @__PURE__ */ Y(I, {
|
|
243
243
|
type: "button",
|
|
244
244
|
size: "sm",
|
|
245
245
|
variant: "outline",
|
|
246
|
-
onClick:
|
|
246
|
+
onClick: a,
|
|
247
247
|
children: [/* @__PURE__ */ J(he, { size: 14 }), "Add Selected to Round"]
|
|
248
248
|
}) : null,
|
|
249
249
|
/* @__PURE__ */ Y("label", {
|
|
250
250
|
className: "flex cursor-pointer items-start gap-2 pt-1",
|
|
251
|
-
children: [/* @__PURE__ */ J(
|
|
252
|
-
checked:
|
|
253
|
-
onCheckedChange: (e) =>
|
|
251
|
+
children: [/* @__PURE__ */ J(L, {
|
|
252
|
+
checked: y,
|
|
253
|
+
onCheckedChange: (e) => b(e === !0)
|
|
254
254
|
}), /* @__PURE__ */ J("span", { children: "Force resend to candidates with a prior email. Force sends are non-idempotent and are never retried automatically." })]
|
|
255
255
|
})
|
|
256
256
|
]
|
|
257
257
|
}) : null,
|
|
258
|
-
/* @__PURE__ */ Y(
|
|
258
|
+
/* @__PURE__ */ Y(z, { children: [/* @__PURE__ */ J(I, {
|
|
259
259
|
variant: "outline",
|
|
260
|
-
onClick:
|
|
260
|
+
onClick: i,
|
|
261
261
|
disabled: K,
|
|
262
262
|
children: "Cancel"
|
|
263
|
-
}), /* @__PURE__ */ Y(
|
|
263
|
+
}), /* @__PURE__ */ Y(I, {
|
|
264
264
|
onClick: () => void Ie(),
|
|
265
|
-
disabled: K || $ || !!Q || !Ee || !
|
|
265
|
+
disabled: K || $ || !!Q || !Ee || !m || Z.pairs.length === 0 || Pe === 0 || e === "message" && !g.trim(),
|
|
266
266
|
children: [K ? /* @__PURE__ */ J(G, {
|
|
267
267
|
size: 16,
|
|
268
268
|
className: "mr-2 animate-spin"
|
|
@@ -274,84 +274,84 @@ function Ce({ mode: f, open: m, onClose: g, onOpenAddRound: _, targets: y, selec
|
|
|
274
274
|
})
|
|
275
275
|
});
|
|
276
276
|
}
|
|
277
|
-
function we({ open: t, onClose:
|
|
278
|
-
let
|
|
279
|
-
variables: { id:
|
|
280
|
-
skip: !t || !
|
|
277
|
+
function we({ open: t, onClose: n, targets: r, selection: i, jobPostingId: a, previewLoading: s, previewError: c }) {
|
|
278
|
+
let l = _e(), [u, d] = U(""), [f, p] = U(null), [h, g] = U(C), [_, y] = U(null), [b, x] = U(!1), [S, w] = U(!1), { data: T, loading: E, error: D } = o({
|
|
279
|
+
variables: { id: a },
|
|
280
|
+
skip: !t || !a,
|
|
281
281
|
fetchPolicy: "network-only"
|
|
282
282
|
});
|
|
283
|
-
|
|
284
|
-
t && (
|
|
283
|
+
V(() => {
|
|
284
|
+
t && (d(""), p(null), g(C()), y(null), x(!1), w(!1));
|
|
285
285
|
}, [t]);
|
|
286
|
-
let
|
|
287
|
-
!K &&
|
|
286
|
+
let O = H(() => Se(r, i), [i, r]), k = re(i), j = O.length === k, M = O.map((e) => e.id), N = O.some((e) => e.jobPostingId !== a), L = T?.jobPosting?.rounds ?? [], pe = L.find((e) => e.id === u), K = c;
|
|
287
|
+
!K && D ? K = "Could not load the posting rounds. Nothing will be changed." : !K && !s && !j ? K = "Some selected candidate details are unavailable. Refresh the selection before adding rounds." : !K && N ? K = "Some selected candidates do not belong to the filtered posting." : !K && u && !E && !pe && (K = "The selected round is no longer available. Choose another round.");
|
|
288
288
|
let me = async () => {
|
|
289
|
-
if (
|
|
290
|
-
|
|
291
|
-
let
|
|
292
|
-
items:
|
|
293
|
-
initialAggregate:
|
|
294
|
-
onProgress:
|
|
295
|
-
executeChunk: async (
|
|
296
|
-
let
|
|
297
|
-
jobPostingId:
|
|
298
|
-
roundConfigId:
|
|
299
|
-
applicationIds: [...
|
|
289
|
+
if (S || b || s || E || K || !j || !pe || M.length === 0) return;
|
|
290
|
+
w(!0), x(!0), y(null), g(C());
|
|
291
|
+
let t = await te({
|
|
292
|
+
items: M,
|
|
293
|
+
initialAggregate: C(),
|
|
294
|
+
onProgress: p,
|
|
295
|
+
executeChunk: async (t) => {
|
|
296
|
+
let n = (await X(e, { input: {
|
|
297
|
+
jobPostingId: a,
|
|
298
|
+
roundConfigId: pe.id,
|
|
299
|
+
applicationIds: [...t]
|
|
300
300
|
} }, "BulkEnsureInterviewRounds")).bulkEnsureInterviewRounds;
|
|
301
|
-
if (!
|
|
302
|
-
let
|
|
303
|
-
created:
|
|
301
|
+
if (!n) throw Error("The add-to-round request returned no result.");
|
|
302
|
+
let r = {
|
|
303
|
+
created: n.created.map((e) => ({
|
|
304
304
|
id: e.round.id,
|
|
305
305
|
applicationId: e.applicationId
|
|
306
306
|
})),
|
|
307
|
-
alreadyPresent:
|
|
307
|
+
alreadyPresent: n.alreadyPresent.map((e) => ({
|
|
308
308
|
id: e.round.id,
|
|
309
309
|
applicationId: e.applicationId
|
|
310
310
|
})),
|
|
311
|
-
failed:
|
|
311
|
+
failed: n.failed.map((e) => ({
|
|
312
312
|
applicationId: e.applicationId,
|
|
313
313
|
code: e.code,
|
|
314
314
|
message: e.message
|
|
315
315
|
}))
|
|
316
316
|
};
|
|
317
|
-
return
|
|
317
|
+
return v(t, r), r;
|
|
318
318
|
},
|
|
319
|
-
mergeResult:
|
|
319
|
+
mergeResult: m
|
|
320
320
|
});
|
|
321
|
-
|
|
322
|
-
knownCompleted:
|
|
323
|
-
ambiguous:
|
|
324
|
-
notStarted:
|
|
325
|
-
message: xe(
|
|
326
|
-
}),
|
|
327
|
-
succeeded:
|
|
321
|
+
g(t.aggregate), t.error && y({
|
|
322
|
+
knownCompleted: t.processedItems.length,
|
|
323
|
+
ambiguous: t.ambiguousItems.length,
|
|
324
|
+
notStarted: t.notStartedItems.length,
|
|
325
|
+
message: xe(t.error)
|
|
326
|
+
}), ee(ne({
|
|
327
|
+
succeeded: t.aggregate.created.length + t.aggregate.alreadyPresent.length,
|
|
328
328
|
skipped: 0,
|
|
329
|
-
failed:
|
|
330
|
-
ambiguous: !!
|
|
331
|
-
})),
|
|
332
|
-
}, q =
|
|
333
|
-
return /* @__PURE__ */ J(
|
|
329
|
+
failed: t.aggregate.failed.length,
|
|
330
|
+
ambiguous: !!t.error
|
|
331
|
+
})), w(!1), l.refetchQueries({ include: ["GetJobApplications", "GetJobApplicationInterviewRounds"] }).catch(() => void 0);
|
|
332
|
+
}, q = s || E;
|
|
333
|
+
return /* @__PURE__ */ J(ie, {
|
|
334
334
|
open: t,
|
|
335
335
|
onOpenChange: (e) => {
|
|
336
|
-
!e && !
|
|
336
|
+
!e && !S && n();
|
|
337
337
|
},
|
|
338
|
-
children: /* @__PURE__ */ Y(
|
|
338
|
+
children: /* @__PURE__ */ Y(ae, {
|
|
339
339
|
className: "sm:max-w-xl max-h-[90vh] overflow-y-auto",
|
|
340
340
|
children: [
|
|
341
|
-
/* @__PURE__ */ Y(
|
|
341
|
+
/* @__PURE__ */ Y(oe, { children: [/* @__PURE__ */ J(se, { children: "Add Selected to Round" }), /* @__PURE__ */ J(R, { children: "Add every selected candidate in this posting to one configured interview round." })] }),
|
|
342
342
|
/* @__PURE__ */ J("div", {
|
|
343
343
|
className: "rounded-md border border-border-seam bg-bg-sunken/30 p-3 text-sm text-text-secondary",
|
|
344
344
|
children: "Candidates without this concrete round are added with status Scheduled. Existing target rounds are left unchanged, and all prior round history and application status remain unchanged."
|
|
345
345
|
}),
|
|
346
|
-
|
|
346
|
+
b ? /* @__PURE__ */ Y("div", {
|
|
347
347
|
className: "space-y-4",
|
|
348
348
|
children: [
|
|
349
|
-
|
|
350
|
-
/* @__PURE__ */ J(
|
|
351
|
-
|
|
352
|
-
/* @__PURE__ */ J(
|
|
353
|
-
onClick:
|
|
354
|
-
disabled:
|
|
349
|
+
f ? /* @__PURE__ */ J(A, { progress: f }) : null,
|
|
350
|
+
/* @__PURE__ */ J(P, { result: h }),
|
|
351
|
+
_ ? /* @__PURE__ */ J(F, { details: _ }) : null,
|
|
352
|
+
/* @__PURE__ */ J(z, { children: /* @__PURE__ */ J(I, {
|
|
353
|
+
onClick: n,
|
|
354
|
+
disabled: S,
|
|
355
355
|
children: "Done"
|
|
356
356
|
}) })
|
|
357
357
|
]
|
|
@@ -368,7 +368,7 @@ function we({ open: t, onClose: d, targets: p, selection: m, jobPostingId: h, pr
|
|
|
368
368
|
K ? /* @__PURE__ */ Y("div", {
|
|
369
369
|
className: "flex items-start gap-2 text-sm text-status-error-text",
|
|
370
370
|
role: "alert",
|
|
371
|
-
children: [/* @__PURE__ */ J(
|
|
371
|
+
children: [/* @__PURE__ */ J(W, {
|
|
372
372
|
size: 14,
|
|
373
373
|
className: "mt-0.5 shrink-0"
|
|
374
374
|
}), /* @__PURE__ */ J("span", { children: K })]
|
|
@@ -376,18 +376,18 @@ function we({ open: t, onClose: d, targets: p, selection: m, jobPostingId: h, pr
|
|
|
376
376
|
/* @__PURE__ */ Y("div", {
|
|
377
377
|
className: "space-y-1.5",
|
|
378
378
|
children: [
|
|
379
|
-
/* @__PURE__ */ J(
|
|
379
|
+
/* @__PURE__ */ J(B, {
|
|
380
380
|
htmlFor: "ensure-round-config",
|
|
381
381
|
children: "Interview round"
|
|
382
382
|
}),
|
|
383
|
-
/* @__PURE__ */ Y(
|
|
384
|
-
value:
|
|
385
|
-
onValueChange:
|
|
383
|
+
/* @__PURE__ */ Y(ce, {
|
|
384
|
+
value: u,
|
|
385
|
+
onValueChange: d,
|
|
386
386
|
disabled: q || !!K,
|
|
387
|
-
children: [/* @__PURE__ */ J(
|
|
387
|
+
children: [/* @__PURE__ */ J(de, {
|
|
388
388
|
id: "ensure-round-config",
|
|
389
|
-
children: /* @__PURE__ */ J(
|
|
390
|
-
}), /* @__PURE__ */ J(
|
|
389
|
+
children: /* @__PURE__ */ J(fe, { placeholder: "Select a round" })
|
|
390
|
+
}), /* @__PURE__ */ J(le, { children: L.map((e) => /* @__PURE__ */ Y(ue, {
|
|
391
391
|
value: e.id,
|
|
392
392
|
children: [
|
|
393
393
|
"Round ",
|
|
@@ -397,7 +397,7 @@ function we({ open: t, onClose: d, targets: p, selection: m, jobPostingId: h, pr
|
|
|
397
397
|
]
|
|
398
398
|
}, e.id)) })]
|
|
399
399
|
}),
|
|
400
|
-
|
|
400
|
+
L.length === 0 && !q && !K ? /* @__PURE__ */ J("p", {
|
|
401
401
|
className: "text-xs text-status-warning-text",
|
|
402
402
|
children: "This posting has no configured interview rounds."
|
|
403
403
|
}) : null
|
|
@@ -406,25 +406,25 @@ function we({ open: t, onClose: d, targets: p, selection: m, jobPostingId: h, pr
|
|
|
406
406
|
/* @__PURE__ */ Y("p", {
|
|
407
407
|
className: "text-xs text-text-secondary",
|
|
408
408
|
children: [
|
|
409
|
-
|
|
409
|
+
k,
|
|
410
410
|
" selected candidate",
|
|
411
|
-
|
|
411
|
+
k === 1 ? "" : "s",
|
|
412
412
|
" ",
|
|
413
413
|
"will be checked. Existing target rounds are reported as already present."
|
|
414
414
|
]
|
|
415
415
|
}),
|
|
416
|
-
/* @__PURE__ */ Y(
|
|
416
|
+
/* @__PURE__ */ Y(z, { children: [/* @__PURE__ */ J(I, {
|
|
417
417
|
variant: "outline",
|
|
418
|
-
onClick:
|
|
419
|
-
disabled:
|
|
418
|
+
onClick: n,
|
|
419
|
+
disabled: S,
|
|
420
420
|
children: "Cancel"
|
|
421
|
-
}), /* @__PURE__ */ Y(
|
|
421
|
+
}), /* @__PURE__ */ Y(I, {
|
|
422
422
|
onClick: () => void me(),
|
|
423
|
-
disabled:
|
|
424
|
-
children: [
|
|
423
|
+
disabled: S || q || !!K || !j || !u || M.length === 0,
|
|
424
|
+
children: [S ? /* @__PURE__ */ J(G, {
|
|
425
425
|
size: 16,
|
|
426
426
|
className: "mr-2 animate-spin"
|
|
427
|
-
}) : /* @__PURE__ */ J(he, { size: 16 }),
|
|
427
|
+
}) : /* @__PURE__ */ J(he, { size: 16 }), S ? "Adding…" : "Add Selected to Round"]
|
|
428
428
|
})] })
|
|
429
429
|
]
|
|
430
430
|
})
|
|
@@ -432,22 +432,22 @@ function we({ open: t, onClose: d, targets: p, selection: m, jobPostingId: h, pr
|
|
|
432
432
|
})
|
|
433
433
|
});
|
|
434
434
|
}
|
|
435
|
-
function Te({ open:
|
|
436
|
-
let
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
}, [
|
|
440
|
-
let
|
|
441
|
-
!
|
|
442
|
-
let
|
|
443
|
-
if (
|
|
444
|
-
|
|
445
|
-
let e = await
|
|
446
|
-
items:
|
|
447
|
-
initialAggregate:
|
|
448
|
-
onProgress:
|
|
435
|
+
function Te({ open: e, onClose: t, targets: n, selection: r, jobPostingId: i, previewLoading: o, previewError: s }) {
|
|
436
|
+
let c = _e(), [l, u] = U(null), [d, f] = U(S), [m, h] = U(null), [g, _] = U(!1), [v, y] = U(!1);
|
|
437
|
+
V(() => {
|
|
438
|
+
e && (u(null), f(S()), h(null), _(!1), y(!1));
|
|
439
|
+
}, [e]);
|
|
440
|
+
let b = H(() => Se(n, r), [r, n]), x = re(r), C = b.length === x, w = b.map((e) => e.id), T = b.some((e) => e.jobPostingId !== i), E = s;
|
|
441
|
+
!E && !o && !C ? E = "Some selected candidate details are unavailable. Refresh the selection before notifying." : !E && T && (E = "Some selected candidates do not belong to the filtered posting.");
|
|
442
|
+
let D = async () => {
|
|
443
|
+
if (v || g || o || E || !C || w.length === 0) return;
|
|
444
|
+
y(!0), _(!0), h(null), f(S());
|
|
445
|
+
let e = await te({
|
|
446
|
+
items: w,
|
|
447
|
+
initialAggregate: S(),
|
|
448
|
+
onProgress: u,
|
|
449
449
|
executeChunk: async (e) => {
|
|
450
|
-
let t = (await X(
|
|
450
|
+
let t = (await X(a, { input: { applicationIds: [...e] } }, "NotifyDuplicateApplicants")).notifyDuplicateApplicants;
|
|
451
451
|
if (!t) throw Error("The duplicate-notice request returned no result.");
|
|
452
452
|
return {
|
|
453
453
|
succeeded: t.succeeded.map((e) => ({ email: e.email })),
|
|
@@ -462,85 +462,85 @@ function Te({ open: t, onClose: o, targets: s, selection: c, jobPostingId: l, pr
|
|
|
462
462
|
}))
|
|
463
463
|
};
|
|
464
464
|
},
|
|
465
|
-
mergeResult:
|
|
465
|
+
mergeResult: p
|
|
466
466
|
});
|
|
467
|
-
|
|
467
|
+
f(e.aggregate), e.error && h({
|
|
468
468
|
knownCompleted: e.processedItems.length,
|
|
469
469
|
ambiguous: e.ambiguousItems.length,
|
|
470
470
|
notStarted: e.notStartedItems.length,
|
|
471
471
|
message: xe(e.error)
|
|
472
|
-
}),
|
|
472
|
+
}), ee(ne({
|
|
473
473
|
succeeded: e.aggregate.succeeded.length,
|
|
474
474
|
skipped: e.aggregate.skipped.length,
|
|
475
475
|
failed: e.aggregate.failed.length,
|
|
476
476
|
ambiguous: !!e.error
|
|
477
|
-
})),
|
|
477
|
+
})), y(!1), c.refetchQueries({ include: ["GetJobApplications"] }).catch(() => void 0);
|
|
478
478
|
};
|
|
479
|
-
return /* @__PURE__ */ J(
|
|
480
|
-
open:
|
|
479
|
+
return /* @__PURE__ */ J(ie, {
|
|
480
|
+
open: e,
|
|
481
481
|
onOpenChange: (e) => {
|
|
482
|
-
!e && !
|
|
482
|
+
!e && !v && t();
|
|
483
483
|
},
|
|
484
|
-
children: /* @__PURE__ */ Y(
|
|
484
|
+
children: /* @__PURE__ */ Y(ae, {
|
|
485
485
|
className: "sm:max-w-xl max-h-[90vh] overflow-y-auto",
|
|
486
486
|
children: [
|
|
487
|
-
/* @__PURE__ */ Y(
|
|
487
|
+
/* @__PURE__ */ Y(oe, { children: [/* @__PURE__ */ J(se, { children: "Notify Duplicate Applicants" }), /* @__PURE__ */ J(R, { children: "Let candidates with more than one application know they only need to complete one take-home assignment." })] }),
|
|
488
488
|
/* @__PURE__ */ J("div", {
|
|
489
489
|
className: "rounded-md border border-border-seam bg-bg-sunken/30 p-3 text-sm text-text-secondary",
|
|
490
490
|
children: "Selected applications are grouped by email address — exactly one notice goes out per unique candidate, even if you select several of their duplicate applications. An email that only appears once among your selection is skipped (it isn't a duplicate), and an email already notified before is skipped automatically."
|
|
491
491
|
}),
|
|
492
|
-
|
|
492
|
+
g ? /* @__PURE__ */ Y("div", {
|
|
493
493
|
className: "space-y-4",
|
|
494
494
|
children: [
|
|
495
|
-
|
|
496
|
-
/* @__PURE__ */ J(
|
|
497
|
-
|
|
498
|
-
/* @__PURE__ */ J(
|
|
499
|
-
onClick:
|
|
500
|
-
disabled:
|
|
495
|
+
l ? /* @__PURE__ */ J(A, { progress: l }) : null,
|
|
496
|
+
/* @__PURE__ */ J(N, { result: d }),
|
|
497
|
+
m ? /* @__PURE__ */ J(F, { details: m }) : null,
|
|
498
|
+
/* @__PURE__ */ J(z, { children: /* @__PURE__ */ J(I, {
|
|
499
|
+
onClick: t,
|
|
500
|
+
disabled: v,
|
|
501
501
|
children: "Done"
|
|
502
502
|
}) })
|
|
503
503
|
]
|
|
504
504
|
}) : /* @__PURE__ */ Y("div", {
|
|
505
505
|
className: "space-y-4",
|
|
506
506
|
children: [
|
|
507
|
-
|
|
507
|
+
o ? /* @__PURE__ */ Y("div", {
|
|
508
508
|
className: "flex items-center gap-2 text-sm text-text-secondary",
|
|
509
509
|
children: [/* @__PURE__ */ J(G, {
|
|
510
510
|
size: 14,
|
|
511
511
|
className: "animate-spin"
|
|
512
512
|
}), "Refreshing candidates…"]
|
|
513
513
|
}) : null,
|
|
514
|
-
|
|
514
|
+
E ? /* @__PURE__ */ Y("div", {
|
|
515
515
|
className: "flex items-start gap-2 text-sm text-status-error-text",
|
|
516
516
|
role: "alert",
|
|
517
|
-
children: [/* @__PURE__ */ J(
|
|
517
|
+
children: [/* @__PURE__ */ J(W, {
|
|
518
518
|
size: 14,
|
|
519
519
|
className: "mt-0.5 shrink-0"
|
|
520
|
-
}), /* @__PURE__ */ J("span", { children:
|
|
520
|
+
}), /* @__PURE__ */ J("span", { children: E })]
|
|
521
521
|
}) : null,
|
|
522
522
|
/* @__PURE__ */ Y("p", {
|
|
523
523
|
className: "text-xs text-text-secondary",
|
|
524
524
|
children: [
|
|
525
|
-
|
|
525
|
+
x,
|
|
526
526
|
" selected application",
|
|
527
|
-
|
|
527
|
+
x === 1 ? "" : "s",
|
|
528
528
|
" ",
|
|
529
529
|
"will be checked and grouped by email."
|
|
530
530
|
]
|
|
531
531
|
}),
|
|
532
|
-
/* @__PURE__ */ Y(
|
|
532
|
+
/* @__PURE__ */ Y(z, { children: [/* @__PURE__ */ J(I, {
|
|
533
533
|
variant: "outline",
|
|
534
|
-
onClick:
|
|
535
|
-
disabled:
|
|
534
|
+
onClick: t,
|
|
535
|
+
disabled: v,
|
|
536
536
|
children: "Cancel"
|
|
537
|
-
}), /* @__PURE__ */ Y(
|
|
538
|
-
onClick: () => void
|
|
539
|
-
disabled:
|
|
540
|
-
children: [
|
|
537
|
+
}), /* @__PURE__ */ Y(I, {
|
|
538
|
+
onClick: () => void D(),
|
|
539
|
+
disabled: v || o || !!E || !C || w.length === 0,
|
|
540
|
+
children: [v ? /* @__PURE__ */ J(G, {
|
|
541
541
|
size: 16,
|
|
542
542
|
className: "mr-2 animate-spin"
|
|
543
|
-
}) : /* @__PURE__ */ J(K, { size: 16 }),
|
|
543
|
+
}) : /* @__PURE__ */ J(K, { size: 16 }), v ? "Notifying…" : "Notify Duplicate Applicants"]
|
|
544
544
|
})] })
|
|
545
545
|
]
|
|
546
546
|
})
|
|
@@ -548,28 +548,28 @@ function Te({ open: t, onClose: o, targets: s, selection: c, jobPostingId: l, pr
|
|
|
548
548
|
})
|
|
549
549
|
});
|
|
550
550
|
}
|
|
551
|
-
function Ee({ open:
|
|
552
|
-
let
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
}, [
|
|
556
|
-
let
|
|
557
|
-
|
|
558
|
-
let
|
|
559
|
-
if (!
|
|
560
|
-
|
|
561
|
-
let e = await
|
|
562
|
-
items:
|
|
563
|
-
initialAggregate:
|
|
564
|
-
onProgress:
|
|
551
|
+
function Ee({ open: e, onClose: t, targets: r, selection: i, previewLoading: a, previewError: o }) {
|
|
552
|
+
let s = _e(), [c, l] = U(""), [d, f] = U(""), [p, m] = U(null), [g, _] = U(y), [v, b] = U(null), [x, S] = U(!1), [C, w] = U(!1);
|
|
553
|
+
V(() => {
|
|
554
|
+
e && (l(""), f(""), m(null), _(y()), b(null), S(!1), w(!1));
|
|
555
|
+
}, [e]);
|
|
556
|
+
let T = H(() => Se(r, i), [i, r]), E = re(i), O = T.length === E, j = T.map((e) => e.id), M = c.trim().length > 0, N = d.trim().length > 0, P = o;
|
|
557
|
+
P || a || O || (P = "Some selected candidate details are unavailable. Refresh the selection before sending.");
|
|
558
|
+
let L = !C && !x && !a && !P && O && j.length > 0 && M && N, ce = async () => {
|
|
559
|
+
if (!L) return;
|
|
560
|
+
w(!0), S(!0), b(null), _(y());
|
|
561
|
+
let e = await te({
|
|
562
|
+
items: j,
|
|
563
|
+
initialAggregate: y(),
|
|
564
|
+
onProgress: m,
|
|
565
565
|
executeChunk: async (e) => {
|
|
566
|
-
let t = (await X(
|
|
566
|
+
let t = (await X(n, { input: {
|
|
567
567
|
applicationIds: [...e],
|
|
568
|
-
subject:
|
|
569
|
-
message:
|
|
568
|
+
subject: c.trim(),
|
|
569
|
+
message: d
|
|
570
570
|
} }, "BulkSendCustomEmail")).bulkSendCustomEmail;
|
|
571
571
|
if (!t) throw Error("The bulk email request returned no result.");
|
|
572
|
-
let
|
|
572
|
+
let r = {
|
|
573
573
|
succeeded: t.succeeded.map((e) => ({
|
|
574
574
|
applicationId: e.id,
|
|
575
575
|
email: e.email
|
|
@@ -579,79 +579,79 @@ function Ee({ open: t, onClose: s, targets: c, selection: l, previewLoading: u,
|
|
|
579
579
|
message: e.message
|
|
580
580
|
}))
|
|
581
581
|
};
|
|
582
|
-
return
|
|
582
|
+
return h([...e], r), r;
|
|
583
583
|
},
|
|
584
|
-
mergeResult:
|
|
584
|
+
mergeResult: u
|
|
585
585
|
});
|
|
586
|
-
|
|
586
|
+
_(e.aggregate), e.error && b({
|
|
587
587
|
knownCompleted: e.processedItems.length,
|
|
588
588
|
ambiguous: e.ambiguousItems.length,
|
|
589
589
|
notStarted: e.notStartedItems.length,
|
|
590
590
|
message: xe(e.error)
|
|
591
|
-
}),
|
|
591
|
+
}), ee(ne({
|
|
592
592
|
succeeded: e.aggregate.succeeded.length,
|
|
593
593
|
skipped: 0,
|
|
594
594
|
failed: e.aggregate.failed.length,
|
|
595
595
|
ambiguous: !!e.error
|
|
596
|
-
})),
|
|
596
|
+
})), w(!1), s.refetchQueries({ include: ["GetJobApplications"] }).catch(() => void 0);
|
|
597
597
|
};
|
|
598
|
-
return /* @__PURE__ */ J(
|
|
599
|
-
open:
|
|
598
|
+
return /* @__PURE__ */ J(ie, {
|
|
599
|
+
open: e,
|
|
600
600
|
onOpenChange: (e) => {
|
|
601
|
-
!e && !
|
|
601
|
+
!e && !C && t();
|
|
602
602
|
},
|
|
603
|
-
children: /* @__PURE__ */ Y(
|
|
603
|
+
children: /* @__PURE__ */ Y(ae, {
|
|
604
604
|
className: "sm:max-w-xl max-h-[90vh] overflow-y-auto",
|
|
605
|
-
children: [/* @__PURE__ */ Y(
|
|
605
|
+
children: [/* @__PURE__ */ Y(oe, { children: [/* @__PURE__ */ J(se, { children: "Send Custom Email" }), /* @__PURE__ */ J(R, { children: "Send the same branded email — your own subject and message — to every selected candidate, regardless of their stage or round. Useful for progress updates or a closing note to candidates who won't move forward." })] }), x ? /* @__PURE__ */ Y("div", {
|
|
606
606
|
className: "space-y-4",
|
|
607
607
|
children: [
|
|
608
|
-
|
|
609
|
-
/* @__PURE__ */ J(
|
|
610
|
-
|
|
611
|
-
/* @__PURE__ */ J(
|
|
612
|
-
onClick:
|
|
613
|
-
disabled:
|
|
608
|
+
p ? /* @__PURE__ */ J(A, { progress: p }) : null,
|
|
609
|
+
/* @__PURE__ */ J(k, { result: g }),
|
|
610
|
+
v ? /* @__PURE__ */ J(F, { details: v }) : null,
|
|
611
|
+
/* @__PURE__ */ J(z, { children: /* @__PURE__ */ J(I, {
|
|
612
|
+
onClick: t,
|
|
613
|
+
disabled: C,
|
|
614
614
|
children: "Done"
|
|
615
615
|
}) })
|
|
616
616
|
]
|
|
617
617
|
}) : /* @__PURE__ */ Y("div", {
|
|
618
618
|
className: "space-y-4",
|
|
619
619
|
children: [
|
|
620
|
-
|
|
620
|
+
a ? /* @__PURE__ */ Y("div", {
|
|
621
621
|
className: "flex items-center gap-2 text-sm text-text-secondary",
|
|
622
622
|
children: [/* @__PURE__ */ J(G, {
|
|
623
623
|
size: 14,
|
|
624
624
|
className: "animate-spin"
|
|
625
625
|
}), "Refreshing candidates…"]
|
|
626
626
|
}) : null,
|
|
627
|
-
|
|
627
|
+
P ? /* @__PURE__ */ Y("div", {
|
|
628
628
|
className: "flex items-start gap-2 text-sm text-status-error-text",
|
|
629
629
|
role: "alert",
|
|
630
|
-
children: [/* @__PURE__ */ J(
|
|
630
|
+
children: [/* @__PURE__ */ J(W, {
|
|
631
631
|
size: 14,
|
|
632
632
|
className: "mt-0.5 shrink-0"
|
|
633
|
-
}), /* @__PURE__ */ J("span", { children:
|
|
633
|
+
}), /* @__PURE__ */ J("span", { children: P })]
|
|
634
634
|
}) : null,
|
|
635
|
-
/* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J(
|
|
635
|
+
/* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J(B, {
|
|
636
636
|
htmlFor: "bulk-custom-email-subject",
|
|
637
637
|
children: "Subject"
|
|
638
638
|
}), /* @__PURE__ */ J("input", {
|
|
639
639
|
id: "bulk-custom-email-subject",
|
|
640
640
|
type: "text",
|
|
641
|
-
value:
|
|
642
|
-
onChange: (e) =>
|
|
641
|
+
value: c,
|
|
642
|
+
onChange: (e) => l(e.target.value),
|
|
643
643
|
placeholder: "e.g. An update on your application",
|
|
644
644
|
className: "mt-1.5 w-full rounded-lg border border-border-default bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-primary/30"
|
|
645
645
|
})] }),
|
|
646
|
-
/* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J(
|
|
646
|
+
/* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J(B, {
|
|
647
647
|
htmlFor: "bulk-custom-email-message",
|
|
648
648
|
children: "Message"
|
|
649
649
|
}), /* @__PURE__ */ J("div", {
|
|
650
650
|
className: "mt-1.5",
|
|
651
|
-
children: /* @__PURE__ */ J(
|
|
651
|
+
children: /* @__PURE__ */ J(D, {
|
|
652
652
|
id: "bulk-custom-email-message",
|
|
653
|
-
value:
|
|
654
|
-
onChange:
|
|
653
|
+
value: d,
|
|
654
|
+
onChange: f,
|
|
655
655
|
placeholder: "Type your message… This will be sent as a branded email to every selected candidate.",
|
|
656
656
|
"aria-required": !0
|
|
657
657
|
})
|
|
@@ -659,49 +659,49 @@ function Ee({ open: t, onClose: s, targets: c, selection: l, previewLoading: u,
|
|
|
659
659
|
/* @__PURE__ */ Y("p", {
|
|
660
660
|
className: "text-xs text-text-secondary",
|
|
661
661
|
children: [
|
|
662
|
-
|
|
662
|
+
E,
|
|
663
663
|
" selected candidate",
|
|
664
|
-
|
|
664
|
+
E === 1 ? "" : "s",
|
|
665
665
|
" ",
|
|
666
666
|
"will each receive their own copy of this email."
|
|
667
667
|
]
|
|
668
668
|
}),
|
|
669
|
-
/* @__PURE__ */ Y(
|
|
669
|
+
/* @__PURE__ */ Y(z, { children: [/* @__PURE__ */ J(I, {
|
|
670
670
|
variant: "outline",
|
|
671
|
-
onClick:
|
|
672
|
-
disabled:
|
|
671
|
+
onClick: t,
|
|
672
|
+
disabled: C,
|
|
673
673
|
children: "Cancel"
|
|
674
|
-
}), /* @__PURE__ */ Y(
|
|
675
|
-
onClick: () => void
|
|
676
|
-
disabled: !
|
|
677
|
-
children: [
|
|
674
|
+
}), /* @__PURE__ */ Y(I, {
|
|
675
|
+
onClick: () => void ce(),
|
|
676
|
+
disabled: !L,
|
|
677
|
+
children: [C ? /* @__PURE__ */ J(G, {
|
|
678
678
|
size: 16,
|
|
679
679
|
className: "mr-2 animate-spin"
|
|
680
|
-
}) : /* @__PURE__ */ J(K, { size: 16 }),
|
|
680
|
+
}) : /* @__PURE__ */ J(K, { size: 16 }), C ? "Sending…" : "Send Email"]
|
|
681
681
|
})] })
|
|
682
682
|
]
|
|
683
683
|
})]
|
|
684
684
|
})
|
|
685
685
|
});
|
|
686
686
|
}
|
|
687
|
-
function De({ open:
|
|
688
|
-
let
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
}, [
|
|
692
|
-
let
|
|
693
|
-
|
|
694
|
-
let
|
|
695
|
-
if (!
|
|
696
|
-
|
|
697
|
-
let e = await
|
|
698
|
-
items:
|
|
699
|
-
initialAggregate:
|
|
700
|
-
onProgress:
|
|
687
|
+
function De({ open: e, onClose: t, targets: n, selection: r, previewLoading: a, previewError: o }) {
|
|
688
|
+
let s = _e(), [u, f] = U(null), [p, m] = U(null), [h, _] = U(b), [v, y] = U(null), [x, S] = U(!1), [C, w] = U(!1);
|
|
689
|
+
V(() => {
|
|
690
|
+
e && (f(null), m(null), _(b()), y(null), S(!1), w(!1));
|
|
691
|
+
}, [e]);
|
|
692
|
+
let T = H(() => Se(n, r), [r, n]), E = re(r), D = T.length === E, O = T.map((e) => e.id), k = o;
|
|
693
|
+
k || a || D || (k = "Some selected candidate details are unavailable. Refresh the selection before updating.");
|
|
694
|
+
let M = !C && !x && !a && !k && D && O.length > 0 && u !== null, N = async () => {
|
|
695
|
+
if (!M || u === null) return;
|
|
696
|
+
w(!0), S(!0), y(null), _(b());
|
|
697
|
+
let e = await te({
|
|
698
|
+
items: O,
|
|
699
|
+
initialAggregate: b(),
|
|
700
|
+
onProgress: m,
|
|
701
701
|
executeChunk: async (e) => {
|
|
702
|
-
let t = (await X(
|
|
702
|
+
let t = (await X(i, { input: {
|
|
703
703
|
applicationIds: [...e],
|
|
704
|
-
status:
|
|
704
|
+
status: u
|
|
705
705
|
} }, "BulkUpdateApplicationStatus")).bulkUpdateApplicationStatus;
|
|
706
706
|
if (!t) throw Error("The bulk status update request returned no result.");
|
|
707
707
|
let n = {
|
|
@@ -714,103 +714,102 @@ function De({ open: t, onClose: d, targets: f, selection: p, previewLoading: m,
|
|
|
714
714
|
message: e.message
|
|
715
715
|
}))
|
|
716
716
|
};
|
|
717
|
-
return
|
|
717
|
+
return g([...e], n), n;
|
|
718
718
|
},
|
|
719
|
-
mergeResult:
|
|
719
|
+
mergeResult: d
|
|
720
720
|
});
|
|
721
|
-
|
|
721
|
+
_(e.aggregate), e.error && y({
|
|
722
722
|
knownCompleted: e.processedItems.length,
|
|
723
723
|
ambiguous: e.ambiguousItems.length,
|
|
724
724
|
notStarted: e.notStartedItems.length,
|
|
725
725
|
message: xe(e.error)
|
|
726
|
-
}),
|
|
726
|
+
}), ee(ne({
|
|
727
727
|
succeeded: e.aggregate.succeeded.length,
|
|
728
728
|
skipped: 0,
|
|
729
729
|
failed: e.aggregate.failed.length,
|
|
730
730
|
ambiguous: !!e.error
|
|
731
|
-
})),
|
|
731
|
+
})), w(!1), s.refetchQueries({ include: ["GetJobApplications"] }).catch(() => void 0);
|
|
732
732
|
};
|
|
733
|
-
return /* @__PURE__ */ J(
|
|
734
|
-
open:
|
|
733
|
+
return /* @__PURE__ */ J(ie, {
|
|
734
|
+
open: e,
|
|
735
735
|
onOpenChange: (e) => {
|
|
736
|
-
!e && !
|
|
736
|
+
!e && !C && t();
|
|
737
737
|
},
|
|
738
|
-
children: /* @__PURE__ */ Y(
|
|
738
|
+
children: /* @__PURE__ */ Y(ae, {
|
|
739
739
|
className: "sm:max-w-md",
|
|
740
|
-
children: [/* @__PURE__ */ Y(
|
|
740
|
+
children: [/* @__PURE__ */ Y(oe, { children: [/* @__PURE__ */ J(se, { children: "Update Status" }), /* @__PURE__ */ J(R, { children: "Set the same status on every selected candidate — e.g. mark everyone you just sent a bulk email as \"Email Sent\" so a later send doesn't reach them twice, then move them back to their real stage once you decide the outcome." })] }), x ? /* @__PURE__ */ Y("div", {
|
|
741
741
|
className: "space-y-4",
|
|
742
742
|
children: [
|
|
743
|
-
|
|
744
|
-
/* @__PURE__ */ J(
|
|
745
|
-
|
|
746
|
-
/* @__PURE__ */ J(
|
|
747
|
-
onClick:
|
|
748
|
-
disabled:
|
|
743
|
+
p ? /* @__PURE__ */ J(A, { progress: p }) : null,
|
|
744
|
+
/* @__PURE__ */ J(j, { result: h }),
|
|
745
|
+
v ? /* @__PURE__ */ J(F, { details: v }) : null,
|
|
746
|
+
/* @__PURE__ */ J(z, { children: /* @__PURE__ */ J(I, {
|
|
747
|
+
onClick: t,
|
|
748
|
+
disabled: C,
|
|
749
749
|
children: "Done"
|
|
750
750
|
}) })
|
|
751
751
|
]
|
|
752
752
|
}) : /* @__PURE__ */ Y("div", {
|
|
753
753
|
className: "space-y-4",
|
|
754
754
|
children: [
|
|
755
|
-
|
|
755
|
+
a ? /* @__PURE__ */ Y("div", {
|
|
756
756
|
className: "flex items-center gap-2 text-sm text-text-secondary",
|
|
757
757
|
children: [/* @__PURE__ */ J(G, {
|
|
758
758
|
size: 14,
|
|
759
759
|
className: "animate-spin"
|
|
760
760
|
}), "Refreshing candidates…"]
|
|
761
761
|
}) : null,
|
|
762
|
-
|
|
762
|
+
k ? /* @__PURE__ */ Y("div", {
|
|
763
763
|
className: "flex items-start gap-2 text-sm text-status-error-text",
|
|
764
764
|
role: "alert",
|
|
765
|
-
children: [/* @__PURE__ */ J(
|
|
765
|
+
children: [/* @__PURE__ */ J(W, {
|
|
766
766
|
size: 14,
|
|
767
767
|
className: "mt-0.5 shrink-0"
|
|
768
|
-
}), /* @__PURE__ */ J("span", { children:
|
|
768
|
+
}), /* @__PURE__ */ J("span", { children: k })]
|
|
769
769
|
}) : null,
|
|
770
|
-
/* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J(
|
|
770
|
+
/* @__PURE__ */ Y("div", { children: [/* @__PURE__ */ J(B, {
|
|
771
771
|
htmlFor: "bulk-status-update-status",
|
|
772
772
|
children: "New status"
|
|
773
|
-
}), /* @__PURE__ */ Y(
|
|
774
|
-
value:
|
|
775
|
-
onValueChange: (e) =>
|
|
776
|
-
children: [/* @__PURE__ */ J(
|
|
773
|
+
}), /* @__PURE__ */ Y(ce, {
|
|
774
|
+
value: u ?? "",
|
|
775
|
+
onValueChange: (e) => f(e),
|
|
776
|
+
children: [/* @__PURE__ */ J(de, {
|
|
777
777
|
id: "bulk-status-update-status",
|
|
778
778
|
className: "mt-1.5",
|
|
779
|
-
children: /* @__PURE__ */ J(
|
|
780
|
-
}), /* @__PURE__ */ J(
|
|
779
|
+
children: /* @__PURE__ */ J(fe, { placeholder: "Select a status" })
|
|
780
|
+
}), /* @__PURE__ */ J(le, { children: l.map((e) => /* @__PURE__ */ J(ue, {
|
|
781
781
|
value: e,
|
|
782
|
-
children:
|
|
782
|
+
children: c[e] || e
|
|
783
783
|
}, e)) })]
|
|
784
784
|
})] }),
|
|
785
785
|
/* @__PURE__ */ Y("p", {
|
|
786
786
|
className: "text-xs text-text-secondary",
|
|
787
787
|
children: [
|
|
788
|
-
|
|
788
|
+
E,
|
|
789
789
|
" selected candidate",
|
|
790
|
-
|
|
790
|
+
E === 1 ? "" : "s",
|
|
791
791
|
" ",
|
|
792
792
|
"will be moved to this status."
|
|
793
793
|
]
|
|
794
794
|
}),
|
|
795
|
-
/* @__PURE__ */ Y(
|
|
795
|
+
/* @__PURE__ */ Y(z, { children: [/* @__PURE__ */ J(I, {
|
|
796
796
|
variant: "outline",
|
|
797
|
-
onClick:
|
|
798
|
-
disabled:
|
|
797
|
+
onClick: t,
|
|
798
|
+
disabled: C,
|
|
799
799
|
children: "Cancel"
|
|
800
|
-
}), /* @__PURE__ */ Y(
|
|
801
|
-
onClick: () => void
|
|
802
|
-
disabled: !
|
|
803
|
-
children: [
|
|
800
|
+
}), /* @__PURE__ */ Y(I, {
|
|
801
|
+
onClick: () => void N(),
|
|
802
|
+
disabled: !M,
|
|
803
|
+
children: [C ? /* @__PURE__ */ J(G, {
|
|
804
804
|
size: 16,
|
|
805
805
|
className: "mr-2 animate-spin"
|
|
806
|
-
}) : /* @__PURE__ */ J(q, { size: 16 }),
|
|
806
|
+
}) : /* @__PURE__ */ J(q, { size: 16 }), C ? "Updating…" : "Update Status"]
|
|
807
807
|
})] })
|
|
808
808
|
]
|
|
809
809
|
})]
|
|
810
810
|
})
|
|
811
811
|
});
|
|
812
812
|
}
|
|
813
|
-
//#endregion
|
|
814
813
|
export { we as AddSelectedToRoundDialog, Ce as BulkCandidateSendDialog, Ee as BulkCustomEmailDialog, De as BulkStatusUpdateDialog, Te as NotifyDuplicateApplicantsDialog, ye as isAssignmentRoundConfig };
|
|
815
814
|
|
|
816
815
|
//# sourceMappingURL=BulkCandidateDialogs.js.map
|