@nivaro/react 0.3.139 → 0.3.141
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/components/InlineGridField.js +95 -92
- package/dist/full.css +1 -1
- package/dist/hooks/useSessionRecorder.js +1 -1
- package/dist/index.d.ts +39 -2
- package/dist/shared/components/AudienceConfirmPanel.js +19 -19
- package/dist/shared/components/BroadcastView.js +213 -211
- package/dist/shared/components/CollectionBrowserView.js +2702 -2671
- package/dist/shared/components/ConfigHistory.js +45 -45
- package/dist/shared/components/ConformanceView.js +110 -110
- package/dist/shared/components/DataTable.js +51 -51
- package/dist/shared/components/FilePreviewLightbox.js +26 -25
- package/dist/shared/components/ItemEditForm.js +3475 -3458
- package/dist/shared/components/LiveCount.js +27 -23
- package/dist/shared/components/LiveTraceView.js +62 -61
- package/dist/shared/components/PageRenderer.js +422 -410
- package/dist/shared/components/ProfileView.js +199 -199
- package/dist/shared/components/QualityRulesView.js +70 -70
- package/dist/shared/components/QueryTable.js +131 -130
- package/dist/shared/components/RecordGraph.js +98 -98
- package/dist/shared/components/RecordReadView.js +287 -288
- package/dist/shared/components/ReportView.js +1279 -1259
- package/dist/shared/components/RowPresence.js +83 -76
- package/dist/shared/components/SlaRulesView.js +73 -74
- package/dist/shared/components/UnseenDot.js +183 -22
- package/dist/shared/components/WidgetSlot.js +73 -73
- package/dist/shared/components/ai/AiChart.js +36 -32
- package/dist/shared/components/ai/AiMarkdown.js +136 -129
- package/dist/shared/components/ai/TaskDo.js +87 -87
- package/dist/shared/components/ai/answer-formats.js +37 -30
- package/dist/shared/components/ai/call-log/format.js +17 -16
- package/dist/shared/components/bulk/BulkActionButtons.js +66 -66
- package/dist/shared/components/bulk/BulkFieldUpdate.js +59 -59
- package/dist/shared/components/bulk/BulkSelectionNotices.js +34 -34
- package/dist/shared/components/bulk/MessageStakeholders.js +31 -29
- package/dist/shared/components/bulk/PushBulkButtons.js +83 -82
- package/dist/shared/components/bulk/bulk-field-options.js +10 -10
- package/dist/shared/components/cbv/column-totals.js +53 -51
- package/dist/shared/components/chat/ChatAnalyticsView.js +87 -87
- package/dist/shared/components/collections-directory/CollectionsToolbar.js +18 -18
- package/dist/shared/components/command-center/announce.js +7 -6
- package/dist/shared/components/command-center/panels/AttentionPanel.js +32 -31
- package/dist/shared/components/command-center/panels/FlowPanel.js +29 -28
- package/dist/shared/components/command-center/panels/PeoplePanel.js +39 -39
- package/dist/shared/components/delegation/DelegationConsoleView.js +27 -27
- package/dist/shared/components/delivery-analytics/drill.js +32 -32
- package/dist/shared/components/imports/RunDetailSheet.js +1 -1
- package/dist/shared/components/integrations/IntegrationObligationsView.js +119 -119
- package/dist/shared/components/integrations/console/EventsView.js +35 -35
- package/dist/shared/components/integrations/console/FirefightView.js +15 -14
- package/dist/shared/components/integrations/console/PartnerDetail.js +78 -78
- package/dist/shared/components/integrations/console/ReadyToSendView.js +103 -103
- package/dist/shared/components/integrations/console/SignalCard.js +67 -67
- package/dist/shared/components/item-edit/CatalogPickerField.js +536 -527
- package/dist/shared/components/item-edit/ChangesTray.js +88 -74
- package/dist/shared/components/item-edit/FilePickerField.js +123 -123
- package/dist/shared/components/item-edit/GroupSection.js +301 -292
- package/dist/shared/components/item-edit/HeaderSummaryChip.js +54 -54
- package/dist/shared/components/item-edit/InlineGridField.js +45 -36
- package/dist/shared/components/item-edit/InlineTableField.js +1390 -1376
- package/dist/shared/components/item-edit/NestedRelationEditor.js +106 -99
- package/dist/shared/components/item-edit/RecordChatMentionsChip.js +11 -11
- package/dist/shared/components/item-edit/RecordRecapChanges.js +116 -74
- package/dist/shared/components/item-edit/RecordRecapStrip.js +148 -160
- package/dist/shared/components/item-edit/summary-layout-request.js +15 -0
- package/dist/shared/components/layout-editor/ai-forms/SlimPanel.js +43 -44
- package/dist/shared/components/layout-editor/parity-keys.json.js +1 -1
- package/dist/shared/components/layout-editor/settings/ResolveSettings.js +226 -157
- package/dist/shared/components/layout-editor/settings/WhoSection.js +53 -52
- package/dist/shared/components/layout-editor/settings/controls.js +98 -90
- package/dist/shared/components/layout-editor/settings/settings-registry.js +8 -0
- package/dist/shared/components/monitoring/ApiRequestLog.js +35 -35
- package/dist/shared/components/notifications/NotificationCenterView.js +268 -268
- package/dist/shared/components/ops-report/format.js +37 -36
- package/dist/shared/components/panels/ReferencedByPanel.js +21 -20
- package/dist/shared/components/panels/RevisionsPanel.js +306 -305
- package/dist/shared/components/pipeline/OwnerMatrixVersionsCard.js +12 -12
- package/dist/shared/components/pipeline/PipelineEditorView.js +483 -482
- package/dist/shared/components/pipeline/PipelineHealthCards.js +33 -32
- package/dist/shared/components/pipeline/TeamsView.js +189 -130
- package/dist/shared/components/profile/AgentsPanel.js +6 -6
- package/dist/shared/components/profile/DelegationCard.js +13 -12
- package/dist/shared/components/profile/PersonActivity.js +48 -48
- package/dist/shared/components/profile/PersonExtras.js +107 -107
- package/dist/shared/components/profile/PersonWeek.js +9 -9
- package/dist/shared/components/queue/QueueBulkBar.js +19 -18
- package/dist/shared/components/queue/QueueBulkMove.js +21 -20
- package/dist/shared/components/queue/QueueItemSheet.js +136 -131
- package/dist/shared/components/queue/QueueWorklist.js +884 -872
- package/dist/shared/components/queue/worklist-helpers.js +36 -21
- package/dist/shared/components/support/RequestList.js +123 -123
- package/dist/shared/components/support/SupportAnalytics.js +29 -29
- package/dist/shared/lib/activity-sentence.js +251 -229
- package/dist/shared/lib/format-value.js +5 -4
- package/dist/shared/lib/layout-resolve.js +64 -48
- package/dist/shared/lib/number-format.js +87 -0
- package/dist/shared/lib/number-kind.js +133 -0
- package/dist/shared/lib/utils.js +24 -20
- package/dist/shared/lib/watch-list.js +1 -1
- package/dist/shared/lib/widget-value-format.js +26 -12
- package/package.json +1 -1
|
@@ -1,115 +1,115 @@
|
|
|
1
1
|
import { jsxs as d, Fragment as Ce, jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import { useSensors as
|
|
3
|
-
import { SortableContext as
|
|
4
|
-
import { CSS as
|
|
5
|
-
import { useQueryClient as
|
|
6
|
-
import { AlertTriangle as
|
|
7
|
-
import { useState as N, useRef as
|
|
2
|
+
import { useSensors as Js, useSensor as Ys, PointerSensor as zs, DndContext as Xs, closestCenter as Zs } from "@dnd-kit/core";
|
|
3
|
+
import { SortableContext as ei, verticalListSortingStrategy as ti, arrayMove as ni, useSortable as ri } from "@dnd-kit/sortable";
|
|
4
|
+
import { CSS as ai } from "@dnd-kit/utilities";
|
|
5
|
+
import { useQueryClient as oi, useQuery as re, useMutation as je, useQueries as nt } from "@tanstack/react-query";
|
|
6
|
+
import { AlertTriangle as li, RefreshCw as si, Plus as qn, ChevronDown as Vo, FileDiff as ii, Group as ci, Check as Ar, Flame as di, Rows3 as ui, Sparkles as mi, Loader2 as Go, Download as pi, BarChart3 as fi, SlidersHorizontal as bi, ListChecks as hi, Rows4 as yi, Rows2 as gi, Play as xi, Star as ki, Pin as vi, Save as wi, Bell as _i, Inbox as Ni, GripVertical as Si } from "lucide-react";
|
|
7
|
+
import { useState as N, useRef as L, useMemo as W, useEffect as K } from "react";
|
|
8
8
|
import { createPortal as Wo } from "react-dom";
|
|
9
|
-
import { toast as
|
|
10
|
-
import { useNivaroClient as
|
|
11
|
-
import { useDebounced as
|
|
12
|
-
import { useElapsedLoading as
|
|
9
|
+
import { toast as P } from "sonner";
|
|
10
|
+
import { useNivaroClient as ul, useItemEditAuth as Ho, useItemNavigation as Ci, useNavigation as $i, useOverlayState as Ri } from "../../context.js";
|
|
11
|
+
import { useDebounced as Ti } from "../../hooks/useDebounced.js";
|
|
12
|
+
import { useElapsedLoading as Oi } from "../../hooks/useElapsedLoading.js";
|
|
13
13
|
import { useSlowReason as Li } from "../../hooks/useSlowReason.js";
|
|
14
|
-
import { useBulkProgressFeed as
|
|
15
|
-
import { get as D, post as ge, patch as Io, del as
|
|
16
|
-
import { useConfigUpdateRefresh as
|
|
17
|
-
import { useDeadlineNow as
|
|
18
|
-
import { deepenForLightSurface as
|
|
19
|
-
import { evaluateExpression as
|
|
20
|
-
import { clauseFromControlValue as
|
|
21
|
-
import { releaseLiveOwner as ji, deliverLive as
|
|
14
|
+
import { useBulkProgressFeed as Fi } from "../../lib/bulk-progress.js";
|
|
15
|
+
import { get as D, post as ge, patch as Io, del as qr, put as Ai } from "../../lib/commands.js";
|
|
16
|
+
import { useConfigUpdateRefresh as qi } from "../../lib/config-update-refresh.js";
|
|
17
|
+
import { useDeadlineNow as Ei, liveDeadlineStatus as Ki, dueInText as Pi } from "../../lib/deadline-ticker.js";
|
|
18
|
+
import { deepenForLightSurface as Di } from "../../lib/display-prefs.js";
|
|
19
|
+
import { evaluateExpression as Mi } from "../../lib/expression.js";
|
|
20
|
+
import { clauseFromControlValue as Bi, filterSentence as Qi } from "../../lib/filter-sentence.js";
|
|
21
|
+
import { releaseLiveOwner as ji, deliverLive as Ui } from "../../lib/focus-mode.js";
|
|
22
22
|
import { formatMultiValue as rt } from "../../lib/format-value.js";
|
|
23
|
-
import { QUEUE_IN_STEP_COLUMN as
|
|
24
|
-
import { createCursorBook as
|
|
25
|
-
import { normalizeInlineEdit as
|
|
26
|
-
import { sanitizeQueueLinkState as
|
|
27
|
-
import { arrivedByListReturn as
|
|
28
|
-
import { peekListAway as
|
|
29
|
-
import { useLiveEvent as
|
|
30
|
-
import { useSteadyGroups as
|
|
31
|
-
import { useRowChanges as
|
|
32
|
-
import { useLiveBurst as
|
|
33
|
-
import { listTrailDetail as
|
|
34
|
-
import { OPEN_IN_TABS_CAP as
|
|
35
|
-
import { isOwnWrite as
|
|
36
|
-
import { usePrefetchIntent as
|
|
37
|
-
import { useRowPresence as
|
|
23
|
+
import { QUEUE_IN_STEP_COLUMN as Er, queueServerSort as Kr } from "../../lib/in-step.js";
|
|
24
|
+
import { createCursorBook as Vi, pageRequest as Gi, noteNextCursor as Wi } from "../../lib/keyset-pager.js";
|
|
25
|
+
import { normalizeInlineEdit as Hi, inlineM2oTarget as Ii, inlineChoices as Ji, inlineEditFor as Yi, nextInlineKey as zi } from "../../lib/list-inline-edit.js";
|
|
26
|
+
import { sanitizeQueueLinkState as Xi, readListLinkFromLocation as Zi, dropListLinkParam as ec, encodeListLink as tc, replaceListLinkParam as nc } from "../../lib/list-link.js";
|
|
27
|
+
import { arrivedByListReturn as rc, historyKey as ac, ensureHistoryKey as Jo } from "../../lib/list-page-memory.js";
|
|
28
|
+
import { peekListAway as oc, planListReturn as Yo, takeListAway as lc, standbyListAway as sc, returnRowFor as ic, markReturnRow as cc, noteListOpen as dc } from "../../lib/list-return.js";
|
|
29
|
+
import { useLiveEvent as uc, expandCoalesced as mc, LIVE_ASPECTS as at } from "../../lib/live.js";
|
|
30
|
+
import { useSteadyGroups as pc, useRowGlide as fc, movingRowTitle as bc } from "../../lib/live-groups.js";
|
|
31
|
+
import { useRowChanges as hc, useRowLocksByCollection as zo, lockLabel as yc } from "../../lib/live-list.js";
|
|
32
|
+
import { useLiveBurst as gc, useLivePause as xc, useSteadyRows as kc, GONE_ROW_CLASS as vc, GONE_ROW_TITLE as wc, resumeAsRefetch as _c } from "../../lib/live-list-flow.js";
|
|
33
|
+
import { listTrailDetail as Nc, setTrailDetail as Sc } from "../../lib/nav-trail.js";
|
|
34
|
+
import { OPEN_IN_TABS_CAP as Cc, openInTabs as $c, openInTabsMessage as Xo } from "../../lib/open-in-tabs.js";
|
|
35
|
+
import { isOwnWrite as Rc } from "../../lib/own-writes.js";
|
|
36
|
+
import { usePrefetchIntent as Tc } from "../../lib/prefetch.js";
|
|
37
|
+
import { useRowPresence as Oc, rowPresenceKey as Zo } from "../../lib/presence-hooks.js";
|
|
38
38
|
import { queryKeys as Lc } from "../../lib/query-keys.js";
|
|
39
|
-
import { buildGroups as
|
|
40
|
-
import { cascadeFilter as
|
|
41
|
-
import { useOptionalRealtime as
|
|
39
|
+
import { buildGroups as Fc } from "../../lib/queue-grouping.js";
|
|
40
|
+
import { cascadeFilter as Ac, fetchCascadeRelations as qc } from "../../lib/quick-filter-cascade.js";
|
|
41
|
+
import { useOptionalRealtime as Ec } from "../../lib/realtime.js";
|
|
42
42
|
import { copyIdText as el } from "../../lib/record-ref.js";
|
|
43
|
-
import { rowHighlightTextClass as
|
|
44
|
-
import { userErrorMessage as
|
|
45
|
-
import { useSelectionPicks as
|
|
46
|
-
import { listViewInput as
|
|
47
|
-
import { useTableDensity as
|
|
48
|
-
import { useMyScopes as
|
|
49
|
-
import { useNewItemLayouts as
|
|
50
|
-
import { formatNumber as
|
|
51
|
-
import { usePublishAskContext as
|
|
52
|
-
import { useBuiltinGate as
|
|
53
|
-
import { BulkCompareButton as
|
|
54
|
-
import { BulkFieldUpdateButton as
|
|
55
|
-
import { BulkRowMark as
|
|
56
|
-
import { BulkSelectionNotices as
|
|
57
|
-
import { BulkMessageButton as
|
|
58
|
-
import { compareCell as
|
|
59
|
-
import { ColumnHeaderMenu as
|
|
60
|
-
import { loadTotalOverridesAt as nl, shownTotals as
|
|
61
|
-
import { DataTable as
|
|
62
|
-
import { EmptyState as
|
|
63
|
-
import { FocusModeToggle as
|
|
64
|
-
import { FulfilmentPill as
|
|
65
|
-
import { InStepCell as
|
|
66
|
-
import { ImportFromFileButton as
|
|
67
|
-
import { IntegrationDots as
|
|
68
|
-
import { IntegrationsFilterPill as
|
|
69
|
-
import { readQueueReturn as
|
|
70
|
-
import { ListLoadError as
|
|
71
|
-
import { LiveCount as
|
|
72
|
-
import { LivePauseButton as
|
|
73
|
-
import { LiveRowMark as
|
|
74
|
-
import { CopyListLinkButton as
|
|
75
|
-
import { useInlineEdit as
|
|
43
|
+
import { rowHighlightTextClass as Kc, rowHighlightClass as Pc } from "../../lib/row-highlight.js";
|
|
44
|
+
import { userErrorMessage as $t } from "../../lib/safe-error.js";
|
|
45
|
+
import { useSelectionPicks as Dc, splitSelKey as Pr, useSelectionLiveMarks as Mc, useSelectionChanges as Bc, useSelectedRowMemory as Qc, selectionSums as jc } from "../../lib/selection-watch.js";
|
|
46
|
+
import { listViewInput as Uc } from "../../lib/send-view.js";
|
|
47
|
+
import { useTableDensity as Vc } from "../../lib/table-density.js";
|
|
48
|
+
import { useMyScopes as Gc, matchScopeDimension as Wc } from "../../lib/use-my-scopes.js";
|
|
49
|
+
import { useNewItemLayouts as Hc } from "../../lib/use-new-item-layouts.js";
|
|
50
|
+
import { formatNumber as ne, cn as F, formatDateTime as tl, titleCase as Dr, humanHours as Ic, formatRelative as Jc, formatDate as Yc } from "../../lib/utils.js";
|
|
51
|
+
import { usePublishAskContext as zc, useAskRecordDrag as Xc } from "../ai/ask-context.js";
|
|
52
|
+
import { useBuiltinGate as Zc, BulkActionButtons as ed } from "../bulk/BulkActionButtons.js";
|
|
53
|
+
import { BulkCompareButton as td } from "../bulk/BulkCompareButton.js";
|
|
54
|
+
import { BulkFieldUpdateButton as nd } from "../bulk/BulkFieldUpdateButton.js";
|
|
55
|
+
import { BulkRowMark as rd } from "../bulk/BulkRowMark.js";
|
|
56
|
+
import { BulkSelectionNotices as ad, SelectionFigures as od } from "../bulk/BulkSelectionNotices.js";
|
|
57
|
+
import { BulkMessageButton as ld } from "../bulk/MessageStakeholders.js";
|
|
58
|
+
import { compareCell as sd, RowActionsMenu as id, roleMayUpdate as cd } from "../CollectionBrowserView.js";
|
|
59
|
+
import { ColumnHeaderMenu as dd } from "../cbv/ColumnHeaderMenu.js";
|
|
60
|
+
import { loadTotalOverridesAt as nl, shownTotals as ud, overridesAfterSave as md, rememberTotalOverridesAt as rl, formatTotal as al, isTotalFn as pd, setOverride as fd } from "../cbv/column-totals.js";
|
|
61
|
+
import { DataTable as bd } from "../DataTable.js";
|
|
62
|
+
import { EmptyState as hd } from "../EmptyState.js";
|
|
63
|
+
import { FocusModeToggle as yd } from "../FocusModeToggle.js";
|
|
64
|
+
import { FulfilmentPill as gd, FULFILMENT_FILTER_OPTIONS as xd } from "../FulfilmentPill.js";
|
|
65
|
+
import { InStepCell as kd } from "../InStep.js";
|
|
66
|
+
import { ImportFromFileButton as vd } from "../import/ImportFromFileButton.js";
|
|
67
|
+
import { IntegrationDots as wd, INTEGRATIONS_FILTER_OPTIONS as _d } from "../integrations/IntegrationDots.js";
|
|
68
|
+
import { IntegrationsFilterPill as Nd } from "../integrations/IntegrationsFilterPill.js";
|
|
69
|
+
import { readQueueReturn as Sd, queueReturnApplies as Cd, writeQueueReturn as ol } from "../item-edit/QueueReturnChip.js";
|
|
70
|
+
import { ListLoadError as $d } from "../ListLoadError.js";
|
|
71
|
+
import { LiveCount as Mr } from "../LiveCount.js";
|
|
72
|
+
import { LivePauseButton as Rd, LiveBurstPill as Td } from "../LiveListControls.js";
|
|
73
|
+
import { LiveRowMark as Od, MovingRowChip as Ld } from "../LiveRowMark.js";
|
|
74
|
+
import { CopyListLinkButton as Fd } from "../list/CopyListLinkButton.js";
|
|
75
|
+
import { useInlineEdit as Ad, InlineEditCell as qd } from "../list/InlineEdit.js";
|
|
76
76
|
import { ListViewers as ll } from "../list/ListViewers.js";
|
|
77
|
-
import { OverflowRail as
|
|
78
|
-
import { usePickerExcludedRows as
|
|
79
|
-
import { RealtimeStaleMark as
|
|
80
|
-
import { RecordDrilldownSheet as
|
|
81
|
-
import { RowHighlightLegend as
|
|
77
|
+
import { OverflowRail as Ed } from "../OverflowRail.js";
|
|
78
|
+
import { usePickerExcludedRows as Kd, PICKER_EXCLUDED_ROW_CLASS as Pd, PICKER_EXCLUDED_TITLE as Dd } from "../PickerExcludedRows.js";
|
|
79
|
+
import { RealtimeStaleMark as Md } from "../RealtimeStatusBanner.js";
|
|
80
|
+
import { RecordDrilldownSheet as Bd } from "../RecordDrilldownSheet.js";
|
|
81
|
+
import { RowHighlightLegend as Qd } from "../RowHighlightLegend.js";
|
|
82
82
|
import { RowPresence as jd } from "../RowPresence.js";
|
|
83
|
-
import { SendViewButton as
|
|
84
|
-
import { UnseenDot as
|
|
85
|
-
import { Badge as
|
|
83
|
+
import { SendViewButton as Ud } from "../send-view/SendViewButton.js";
|
|
84
|
+
import { UnseenDot as Vd } from "../UnseenDot.js";
|
|
85
|
+
import { Badge as Gd } from "../ui/badge.js";
|
|
86
86
|
import { Checkbox as Ur } from "../ui/checkbox.js";
|
|
87
|
-
import { Command as sl, CommandInput as
|
|
88
|
-
import { Label as
|
|
89
|
-
import { Popover as
|
|
90
|
-
import { Skeleton as
|
|
91
|
-
import { dedupeChooserKeys as
|
|
92
|
-
import { groupSumPathsFor as
|
|
93
|
-
import { offscreenPill as
|
|
94
|
-
import { OwnerAvatars as
|
|
95
|
-
import { pathHeader as
|
|
96
|
-
import { QueueBulkBar as
|
|
97
|
-
import { QueueBulkMove as
|
|
98
|
-
import { QueueItemSheet as
|
|
99
|
-
import { QueueKanbanBoard as
|
|
100
|
-
import { QueueQuickFilters as
|
|
101
|
-
import { QueueTeamStrip as
|
|
102
|
-
import { QueueWorkloadView as
|
|
103
|
-
import { queueTotalColumns as
|
|
104
|
-
import { useTransitionNote as
|
|
105
|
-
import { worklistCsv as
|
|
106
|
-
import {
|
|
107
|
-
function
|
|
87
|
+
import { Command as sl, CommandInput as Wd, CommandList as il, CommandEmpty as Hd, CommandItem as sn } from "../ui/command.js";
|
|
88
|
+
import { Label as Id } from "../ui/label.js";
|
|
89
|
+
import { Popover as Rt, PopoverTrigger as Tt, PopoverContent as Ot } from "../ui/popover.js";
|
|
90
|
+
import { Skeleton as ml } from "../ui/skeleton.js";
|
|
91
|
+
import { dedupeChooserKeys as Jd } from "./column-chooser.js";
|
|
92
|
+
import { groupSumPathsFor as Yd } from "./group-sums.js";
|
|
93
|
+
import { offscreenPill as zd, statsOutrunRows as Xd, stateAspectEffect as Zd } from "./live-state-aspect.js";
|
|
94
|
+
import { OwnerAvatars as eu } from "./OwnerAvatars.js";
|
|
95
|
+
import { pathHeader as tu } from "./path-label.js";
|
|
96
|
+
import { QueueBulkBar as nu } from "./QueueBulkBar.js";
|
|
97
|
+
import { QueueBulkMove as ru } from "./QueueBulkMove.js";
|
|
98
|
+
import { QueueItemSheet as au } from "./QueueItemSheet.js";
|
|
99
|
+
import { QueueKanbanBoard as ou } from "./QueueKanbanBoard.js";
|
|
100
|
+
import { QueueQuickFilters as lu } from "./QueueQuickFilters.js";
|
|
101
|
+
import { QueueTeamStrip as su } from "./QueueTeamStrip.js";
|
|
102
|
+
import { QueueWorkloadView as iu } from "./QueueWorkloadView.js";
|
|
103
|
+
import { queueTotalColumns as cu, queueTotalPaths as du, queueTotalValue as uu, formulaTotalFormat as mu, queueTotalTip as pu, queueTotalsEligibleKey as Br, queueTotalsStoreKey as En, queueTotalsSupport as fu } from "./queue-totals.js";
|
|
104
|
+
import { useTransitionNote as bu, needsTransitionNote as hu } from "./transition-note.js";
|
|
105
|
+
import { worklistCsv as yu, worklistCsvName as gu } from "./worklist-csv.js";
|
|
106
|
+
import { extraValueText as cl, formulaColumnKeys as xu, extraChoiceText as Qr, atRiskBreakdown as dl, queuePinKeepRank as ku, worklistKeyTarget as vu } from "./worklist-helpers.js";
|
|
107
|
+
function wu({ summary: l }) {
|
|
108
108
|
if (!l || l.count === 0)
|
|
109
109
|
return /* @__PURE__ */ a("span", { className: "text-slate-300 dark:text-muted-foreground", children: "—" });
|
|
110
110
|
const S = [l.last_from, l.last_to].filter(Boolean).join(" → "), q = [
|
|
111
111
|
S ? `Last: ${S}` : null,
|
|
112
|
-
l.last_at ?
|
|
112
|
+
l.last_at ? Jc(l.last_at) : null,
|
|
113
113
|
l.last_reason ? `“${l.last_reason}”` : "no reason given"
|
|
114
114
|
].filter(Boolean).join(" · ");
|
|
115
115
|
return /* @__PURE__ */ d(
|
|
@@ -131,13 +131,13 @@ function vu({ summary: l }) {
|
|
|
131
131
|
}
|
|
132
132
|
);
|
|
133
133
|
}
|
|
134
|
-
const
|
|
134
|
+
const _u = 50, Nu = [], ot = "nivaro_addendums", jr = [
|
|
135
135
|
{ value: "mine", label: "My Items" },
|
|
136
136
|
{ value: "unowned", label: "No Owners" },
|
|
137
137
|
{ value: "claimed", label: "Claimed by me" },
|
|
138
138
|
{ value: "all", label: "All Items" }
|
|
139
139
|
];
|
|
140
|
-
function
|
|
140
|
+
function Su({ summary: l }) {
|
|
141
141
|
if (!l || l.total === 0) return /* @__PURE__ */ a("span", { className: "text-slate-300", children: "—" });
|
|
142
142
|
const S = l.active > 0, q = l.latest_status === "review" ? "in review" : l.latest_status ?? "active", M = l.cost_impact, I = M != null && M !== 0 ? `${M > 0 ? "+" : "−"}$${Math.abs(M).toLocaleString(void 0, { minimumFractionDigits: 2, maximumFractionDigits: 2 })}` : null;
|
|
143
143
|
return /* @__PURE__ */ d(
|
|
@@ -168,17 +168,17 @@ function Nu({ summary: l }) {
|
|
|
168
168
|
}
|
|
169
169
|
);
|
|
170
170
|
}
|
|
171
|
-
function
|
|
172
|
-
return
|
|
171
|
+
function Cu(l) {
|
|
172
|
+
return Ic(l);
|
|
173
173
|
}
|
|
174
|
-
function
|
|
174
|
+
function $u({
|
|
175
175
|
status: l,
|
|
176
176
|
warningAt: S,
|
|
177
177
|
dueAt: q
|
|
178
178
|
}) {
|
|
179
|
-
const M = { warning_at: S ?? null, due_at: q ?? null }, I = !!l && !!q, B =
|
|
179
|
+
const M = { warning_at: S ?? null, due_at: q ?? null }, I = !!l && !!q, B = Ei(I), y = I ? Ki(M, B) : null, f = y ? y === "on_track" ? "ok" : y : l;
|
|
180
180
|
if (!f) return /* @__PURE__ */ a("span", { className: "text-slate-300", children: "—" });
|
|
181
|
-
const z = I ? Pi(M, B) : null,
|
|
181
|
+
const z = I ? Pi(M, B) : null, j = f === "breached" ? "bg-red-50 text-red-600 dark:bg-red-500/10 dark:text-red-400" : f === "warning" ? "bg-amber-50 text-amber-600 dark:bg-amber-500/10 dark:text-amber-400" : "bg-emerald-50 text-emerald-600 dark:bg-emerald-500/10 dark:text-emerald-400";
|
|
182
182
|
return /* @__PURE__ */ a(
|
|
183
183
|
"span",
|
|
184
184
|
{
|
|
@@ -186,16 +186,16 @@ function Cu({
|
|
|
186
186
|
"data-tip": z ? `SLA ${f === "ok" ? "on track" : f}` : void 0,
|
|
187
187
|
className: F(
|
|
188
188
|
"whitespace-nowrap rounded px-1.5 py-0.5 text-[11px] font-medium tabular-nums transition-colors duration-500",
|
|
189
|
-
|
|
189
|
+
j
|
|
190
190
|
),
|
|
191
191
|
children: z ?? f
|
|
192
192
|
}
|
|
193
193
|
);
|
|
194
194
|
}
|
|
195
|
-
function
|
|
195
|
+
function Ru({ points: l, inline: S = !1 }) {
|
|
196
196
|
if (l.length < 2) return null;
|
|
197
197
|
const q = S ? 40 : 64, M = S ? 14 : 18, I = Math.max(...l), B = Math.min(...l), y = I - B || 1, f = q / (l.length - 1), z = l.map(
|
|
198
|
-
(
|
|
198
|
+
(j, $e) => `${$e === 0 ? "M" : "L"}${($e * f).toFixed(1)},${(M - 2 - (j - B) / y * (M - 4)).toFixed(1)}`
|
|
199
199
|
).join(" ");
|
|
200
200
|
return /* @__PURE__ */ a(
|
|
201
201
|
"svg",
|
|
@@ -208,7 +208,7 @@ function $u({ points: l, inline: S = !1 }) {
|
|
|
208
208
|
}
|
|
209
209
|
);
|
|
210
210
|
}
|
|
211
|
-
function
|
|
211
|
+
function cn({
|
|
212
212
|
label: l,
|
|
213
213
|
count: S,
|
|
214
214
|
filteredCount: q,
|
|
@@ -218,7 +218,7 @@ function dn({
|
|
|
218
218
|
trend: y,
|
|
219
219
|
delta: f,
|
|
220
220
|
deltaBadIsUp: z,
|
|
221
|
-
breakdown:
|
|
221
|
+
breakdown: j,
|
|
222
222
|
onClick: $e
|
|
223
223
|
}) {
|
|
224
224
|
return /* @__PURE__ */ a(
|
|
@@ -228,9 +228,9 @@ function dn({
|
|
|
228
228
|
onClick: $e,
|
|
229
229
|
"aria-pressed": M,
|
|
230
230
|
"aria-label": [
|
|
231
|
-
q != null ? `${
|
|
232
|
-
|
|
233
|
-
f != null && f !== 0 ? `${f > 0 ? "up" : "down"} ${
|
|
231
|
+
q != null ? `${ne(q)} of ${ne(S)} ${l}` : `${ne(S)} ${l}`,
|
|
232
|
+
j || null,
|
|
233
|
+
f != null && f !== 0 ? `${f > 0 ? "up" : "down"} ${ne(Math.abs(f))} since the last daily count` : null
|
|
234
234
|
].filter(Boolean).join(", "),
|
|
235
235
|
className: F(
|
|
236
236
|
"nvr-section-enter flex items-center gap-1.5 bg-white px-3 py-2 text-left transition-colors hover:bg-slate-50 dark:bg-card dark:hover:bg-card/80",
|
|
@@ -238,7 +238,7 @@ function dn({
|
|
|
238
238
|
"grow justify-center sm:justify-start",
|
|
239
239
|
M && "bg-nvr-cyan/5 ring-1 ring-inset ring-nvr-cyan dark:bg-nvr-cyan/10"
|
|
240
240
|
),
|
|
241
|
-
children: I ? /* @__PURE__ */ a(
|
|
241
|
+
children: I ? /* @__PURE__ */ a(ml, { className: "h-5 w-16 rounded" }) : /* @__PURE__ */ d(Ce, { children: [
|
|
242
242
|
/* @__PURE__ */ a(
|
|
243
243
|
"span",
|
|
244
244
|
{
|
|
@@ -247,12 +247,12 @@ function dn({
|
|
|
247
247
|
S === 0 && !M ? "text-slate-500 dark:text-slate-400" : "text-slate-900 dark:text-foreground"
|
|
248
248
|
),
|
|
249
249
|
children: q != null ? /* @__PURE__ */ d(Ce, { children: [
|
|
250
|
-
/* @__PURE__ */ a("span", { className: "text-nvr-navy dark:text-nvr-cyan", children: /* @__PURE__ */ a(
|
|
250
|
+
/* @__PURE__ */ a("span", { className: "text-nvr-navy dark:text-nvr-cyan", children: /* @__PURE__ */ a(Mr, { value: q, format: (b) => ne(Number(b)) }) }),
|
|
251
251
|
/* @__PURE__ */ d("span", { className: "text-[11px] font-medium text-slate-500 dark:text-slate-400", children: [
|
|
252
252
|
"/ ",
|
|
253
|
-
/* @__PURE__ */ a(
|
|
253
|
+
/* @__PURE__ */ a(Mr, { value: S, format: (b) => ne(Number(b)) })
|
|
254
254
|
] })
|
|
255
|
-
] }) : /* @__PURE__ */ a(
|
|
255
|
+
] }) : /* @__PURE__ */ a(Mr, { value: S, format: (b) => ne(Number(b)) })
|
|
256
256
|
}
|
|
257
257
|
),
|
|
258
258
|
/* @__PURE__ */ a(
|
|
@@ -265,12 +265,12 @@ function dn({
|
|
|
265
265
|
children: l
|
|
266
266
|
}
|
|
267
267
|
),
|
|
268
|
-
|
|
268
|
+
j && /* @__PURE__ */ a(
|
|
269
269
|
"span",
|
|
270
270
|
{
|
|
271
271
|
"data-stat-breakdown": !0,
|
|
272
272
|
className: "whitespace-nowrap text-[11px] leading-none text-slate-600 dark:text-slate-300",
|
|
273
|
-
children:
|
|
273
|
+
children: j
|
|
274
274
|
}
|
|
275
275
|
),
|
|
276
276
|
f != null && f !== 0 && /* @__PURE__ */ d(
|
|
@@ -282,16 +282,16 @@ function dn({
|
|
|
282
282
|
),
|
|
283
283
|
children: [
|
|
284
284
|
f > 0 ? "↑" : "↓",
|
|
285
|
-
|
|
285
|
+
ne(Math.abs(f))
|
|
286
286
|
]
|
|
287
287
|
}
|
|
288
288
|
),
|
|
289
|
-
y && S > 0 && /* @__PURE__ */ a(
|
|
289
|
+
y && S > 0 && /* @__PURE__ */ a(Ru, { points: y, inline: !0 })
|
|
290
290
|
] })
|
|
291
291
|
}
|
|
292
292
|
);
|
|
293
293
|
}
|
|
294
|
-
function
|
|
294
|
+
function Tu({
|
|
295
295
|
label: l,
|
|
296
296
|
count: S,
|
|
297
297
|
filteredCount: q,
|
|
@@ -318,29 +318,29 @@ function Ru({
|
|
|
318
318
|
),
|
|
319
319
|
l,
|
|
320
320
|
/* @__PURE__ */ a("span", { className: "font-semibold tabular-nums text-slate-900 dark:text-foreground", children: q != null ? /* @__PURE__ */ d(Ce, { children: [
|
|
321
|
-
/* @__PURE__ */ a("span", { className: "text-nvr-navy dark:text-nvr-cyan", children:
|
|
321
|
+
/* @__PURE__ */ a("span", { className: "text-nvr-navy dark:text-nvr-cyan", children: ne(q) }),
|
|
322
322
|
/* @__PURE__ */ d("span", { className: "font-normal text-slate-400", children: [
|
|
323
323
|
" / ",
|
|
324
|
-
|
|
324
|
+
ne(S)
|
|
325
325
|
] })
|
|
326
|
-
] }) :
|
|
326
|
+
] }) : ne(S) })
|
|
327
327
|
]
|
|
328
328
|
}
|
|
329
329
|
);
|
|
330
330
|
}
|
|
331
|
-
const Ue =
|
|
332
|
-
function
|
|
331
|
+
const Ue = tu;
|
|
332
|
+
function Ou({
|
|
333
333
|
id: l,
|
|
334
334
|
label: S,
|
|
335
335
|
checked: q,
|
|
336
336
|
onCheckedChange: M
|
|
337
337
|
}) {
|
|
338
|
-
const { attributes: I, listeners: B, setNodeRef: y, transform: f, transition: z, isDragging:
|
|
338
|
+
const { attributes: I, listeners: B, setNodeRef: y, transform: f, transition: z, isDragging: j } = ri({
|
|
339
339
|
id: l
|
|
340
340
|
}), $e = {
|
|
341
|
-
transform:
|
|
341
|
+
transform: ai.Transform.toString(f),
|
|
342
342
|
transition: z,
|
|
343
|
-
opacity:
|
|
343
|
+
opacity: j ? 0.4 : 1
|
|
344
344
|
}, b = `col-toggle-${l}`;
|
|
345
345
|
return /* @__PURE__ */ d("div", { ref: y, style: $e, className: "flex items-center gap-2 text-[12px]", children: [
|
|
346
346
|
/* @__PURE__ */ a(
|
|
@@ -349,14 +349,14 @@ function Tu({
|
|
|
349
349
|
...I,
|
|
350
350
|
...B,
|
|
351
351
|
className: "cursor-grab text-slate-300 hover:text-slate-500 dark:text-muted-foreground",
|
|
352
|
-
children: /* @__PURE__ */ a(
|
|
352
|
+
children: /* @__PURE__ */ a(Si, { className: "h-3.5 w-3.5" })
|
|
353
353
|
}
|
|
354
354
|
),
|
|
355
355
|
/* @__PURE__ */ a(Ur, { id: b, checked: q, onCheckedChange: M }),
|
|
356
|
-
/* @__PURE__ */ a(
|
|
356
|
+
/* @__PURE__ */ a(Id, { htmlFor: b, className: "cursor-pointer text-[12px] font-normal", children: S })
|
|
357
357
|
] });
|
|
358
358
|
}
|
|
359
|
-
function
|
|
359
|
+
function qp({
|
|
360
360
|
queueId: l,
|
|
361
361
|
realtime: S,
|
|
362
362
|
renderError: q,
|
|
@@ -364,44 +364,44 @@ function Ap({
|
|
|
364
364
|
viewersInHeader: I = !1,
|
|
365
365
|
onAsk: B
|
|
366
366
|
}) {
|
|
367
|
-
var No, So, Co, $o, Ro, To,
|
|
368
|
-
const y =
|
|
369
|
-
() => nl(En(l),
|
|
370
|
-
), Ir =
|
|
371
|
-
Ir.current !== l && (Ir.current = l, Mn(nl(En(l),
|
|
372
|
-
const
|
|
373
|
-
() =>
|
|
367
|
+
var No, So, Co, $o, Ro, To, Oo, Lo, Fo, Ao, qo, Eo, Ko, Po, Do, Mo, Bo, Qo, jo, Uo;
|
|
368
|
+
const y = oi(), f = ul(), { userId: z } = Ho(), j = Ci(), { navigate: $e } = $i(), [b, me] = N("all"), [se, Q] = N(1), Vr = L(Vi()), [Lt, pl] = Vc(), [C, lt] = N("table"), [U, st] = N(""), [x, V] = N({}), [Ft, Gr] = N(() => /* @__PURE__ */ new Set()), [R, At] = N(null), [xe, Kn] = N(/* @__PURE__ */ new Set()), [qt, Pn] = N(null), [it, Dn] = N(null), [Wr, dn] = N({}), [Hr, Mn] = N(
|
|
369
|
+
() => nl(En(l), Br)
|
|
370
|
+
), Ir = L(l);
|
|
371
|
+
Ir.current !== l && (Ir.current = l, Mn(nl(En(l), Br)), dn({}));
|
|
372
|
+
const ct = W(
|
|
373
|
+
() => ud(Wr, Hr),
|
|
374
374
|
[Wr, Hr]
|
|
375
|
-
),
|
|
376
|
-
const r =
|
|
375
|
+
), fl = (e, t) => Mn((n) => {
|
|
376
|
+
const r = fd(n, e, t);
|
|
377
377
|
return rl(En(l), r), r;
|
|
378
|
-
}), [Bn,
|
|
378
|
+
}), [Bn, un] = N(0), Qn = L(0), be = hc(), dt = Ec(), jn = L({}).current, Jr = L(/* @__PURE__ */ new Set()), [Yr, bl] = N(0), [zr, hl] = N(0), he = L(!1), Et = L(null), Kt = L([]), Xr = L(null), Un = L(!1), Vn = L(0), Gn = L("table");
|
|
379
379
|
Gn.current = C;
|
|
380
|
-
const Wn =
|
|
380
|
+
const Wn = L(!1);
|
|
381
381
|
Wn.current = C === "table" && !!R;
|
|
382
|
-
const
|
|
383
|
-
Dt.current =
|
|
384
|
-
const
|
|
385
|
-
if (!
|
|
382
|
+
const Pt = gc(), Dt = L(Pt);
|
|
383
|
+
Dt.current = Pt;
|
|
384
|
+
const mn = L(null), Pe = xc(l ? `queue:${l}` : null, (e) => {
|
|
385
|
+
if (!_c(e) && mn.current) return mn.current(e);
|
|
386
386
|
Ta();
|
|
387
|
-
}), Hn =
|
|
387
|
+
}), Hn = Pe.gate, pn = 25, { data: s, error: fn } = re({
|
|
388
388
|
queryKey: ["queue-meta", l],
|
|
389
389
|
queryFn: () => f.request(D(`/queues/${l}`)).then((e) => e.data),
|
|
390
390
|
enabled: !!l
|
|
391
391
|
});
|
|
392
|
-
|
|
392
|
+
qi(
|
|
393
393
|
((s == null ? void 0 : s.sources) ?? []).map((e) => e.collection),
|
|
394
394
|
[["queue-meta", l]],
|
|
395
395
|
{ enabled: !!l }
|
|
396
396
|
);
|
|
397
|
-
const { scopes:
|
|
398
|
-
|
|
397
|
+
const { scopes: bn, ready: Zr } = Gc(), ea = L(!1), [ta, na] = N(!1), [Re, yl] = N({}), ke = L({});
|
|
398
|
+
K(() => {
|
|
399
399
|
if (ea.current || !Zr || !s) return;
|
|
400
400
|
ea.current = !0;
|
|
401
401
|
const e = (s.extra_field_meta ?? []).filter(
|
|
402
402
|
(t) => t.kind === "relation" && t.target_collection && t.display_field
|
|
403
403
|
);
|
|
404
|
-
if (e.length === 0 || !
|
|
404
|
+
if (e.length === 0 || !bn) {
|
|
405
405
|
na(!0);
|
|
406
406
|
return;
|
|
407
407
|
}
|
|
@@ -421,11 +421,11 @@ function Ap({
|
|
|
421
421
|
];
|
|
422
422
|
};
|
|
423
423
|
for (const o of e) {
|
|
424
|
-
const c =
|
|
424
|
+
const c = Wc(bn, { collection: o.target_collection });
|
|
425
425
|
if (!c) continue;
|
|
426
426
|
const u = `extra.${o.path}`;
|
|
427
427
|
try {
|
|
428
|
-
const m =
|
|
428
|
+
const m = bn.restricted[c.name] ?? [];
|
|
429
429
|
if (m.length > 0) {
|
|
430
430
|
const h = await r(o, m);
|
|
431
431
|
h.length > 0 && (n[u.slice(6)] = h);
|
|
@@ -433,25 +433,25 @@ function Ap({
|
|
|
433
433
|
} catch {
|
|
434
434
|
}
|
|
435
435
|
}
|
|
436
|
-
Object.keys(n).length > 0 &&
|
|
436
|
+
Object.keys(n).length > 0 && yl(n), Object.keys(t).length > 0 && (ke.current = t, V((o) => ({ ...o, ...t }))), na(!0);
|
|
437
437
|
})();
|
|
438
|
-
}, [Zr,
|
|
439
|
-
const
|
|
440
|
-
queryKey: ["queue-browser-quick-filters",
|
|
441
|
-
queryFn: () => f.request(D(`/collections/${
|
|
438
|
+
}, [Zr, bn, s]);
|
|
439
|
+
const ut = ((So = (No = s == null ? void 0 : s.sources) == null ? void 0 : No.find((e) => e.type === "collection")) == null ? void 0 : So.collection) ?? null, { data: ra = [] } = re({
|
|
440
|
+
queryKey: ["queue-browser-quick-filters", ut],
|
|
441
|
+
queryFn: () => f.request(D(`/collections/${ut}`)).then((e) => {
|
|
442
442
|
var t, n;
|
|
443
443
|
return ((n = (t = e.data) == null ? void 0 : t.browser_config) == null ? void 0 : n.quick_filters) ?? [];
|
|
444
444
|
}).catch(() => []),
|
|
445
|
-
enabled: !!
|
|
445
|
+
enabled: !!ut,
|
|
446
446
|
staleTime: 3e5
|
|
447
447
|
}), pe = W(() => {
|
|
448
448
|
const e = /* @__PURE__ */ new Set(), t = [];
|
|
449
449
|
for (const n of (s == null ? void 0 : s.sources) ?? [])
|
|
450
450
|
n.type !== "collection" || !n.collection || e.has(n.collection) || (e.add(n.collection), t.push(n.collection));
|
|
451
451
|
return t;
|
|
452
|
-
}, [s == null ? void 0 : s.sources]),
|
|
452
|
+
}, [s == null ? void 0 : s.sources]), hn = Hc(
|
|
453
453
|
pe.length === 1 ? pe[0] : null
|
|
454
|
-
), In = M === !0 || Array.isArray(M) && pe.length > 0 && pe.every((e) => M.includes(e)), Te = (s == null ? void 0 : s.claims_enabled) !== !1, p = s == null ? void 0 : s.display_config, Ve = (p == null ? void 0 : p.views) ?? ["table", "kanban", "workload"],
|
|
454
|
+
), In = M === !0 || Array.isArray(M) && pe.length > 0 && pe.every((e) => M.includes(e)), Te = (s == null ? void 0 : s.claims_enabled) !== !1, p = s == null ? void 0 : s.display_config, Ve = (p == null ? void 0 : p.views) ?? ["table", "kanban", "workload"], gl = (p == null ? void 0 : p.work_next) !== !1, yn = (p == null ? void 0 : p.bulk_actions) !== !1, Ge = Zc(
|
|
455
455
|
[
|
|
456
456
|
...new Set(
|
|
457
457
|
((s == null ? void 0 : s.sources) ?? []).filter((e) => e.type === "collection" && e.collection).map((e) => e.collection)
|
|
@@ -461,16 +461,16 @@ function Ap({
|
|
|
461
461
|
), A = (e, t) => {
|
|
462
462
|
var n, r;
|
|
463
463
|
return ((r = (n = s == null ? void 0 : s.column_aliases) == null ? void 0 : n[e]) == null ? void 0 : r.trim()) || t;
|
|
464
|
-
}, aa =
|
|
465
|
-
|
|
466
|
-
!s || aa.current || (aa.current = !0,
|
|
464
|
+
}, aa = L(!1);
|
|
465
|
+
K(() => {
|
|
466
|
+
!s || aa.current || (aa.current = !0, st("-priority"));
|
|
467
467
|
}, [s]);
|
|
468
|
-
const [G,
|
|
469
|
-
|
|
470
|
-
s != null && s.display_config && !Ve.includes(C) &&
|
|
471
|
-
}, [s, C, Ve]),
|
|
468
|
+
const [G, xl] = N(!1);
|
|
469
|
+
K(() => {
|
|
470
|
+
s != null && s.display_config && !Ve.includes(C) && lt(Ve[0]);
|
|
471
|
+
}, [s, C, Ve]), K(() => {
|
|
472
472
|
if (!(s != null && s.sources)) return;
|
|
473
|
-
const e =
|
|
473
|
+
const e = dt ? ($, w) => dt.subscribeCollections($, w) : S == null ? void 0 : S.subscribe;
|
|
474
474
|
if (!e) return;
|
|
475
475
|
const t = [
|
|
476
476
|
...new Set(
|
|
@@ -482,12 +482,12 @@ function Ap({
|
|
|
482
482
|
let r = null, o = null, c = null;
|
|
483
483
|
const u = () => {
|
|
484
484
|
c || (c = setTimeout(() => {
|
|
485
|
-
c = null,
|
|
485
|
+
c = null, hl(($) => $ + 1);
|
|
486
486
|
}, 2500));
|
|
487
487
|
}, m = () => {
|
|
488
488
|
o || (o = setTimeout(() => {
|
|
489
489
|
if (o = null, Vn.current > 0 || Un.current) {
|
|
490
|
-
|
|
490
|
+
Kt.current = [], un(($) => $ + 1);
|
|
491
491
|
return;
|
|
492
492
|
}
|
|
493
493
|
he.current = !0, y.invalidateQueries({ queryKey: ["queue-items", l] }), y.invalidateQueries({ queryKey: ["queue-workload", l] });
|
|
@@ -497,45 +497,45 @@ function Ap({
|
|
|
497
497
|
const h = ($) => {
|
|
498
498
|
let w = !1, Z = 0, de = !1;
|
|
499
499
|
const Se = $.flatMap(
|
|
500
|
-
(_) => _ ?
|
|
500
|
+
(_) => _ ? mc(_) : [_]
|
|
501
501
|
), ue = (_) => {
|
|
502
502
|
var le;
|
|
503
|
-
return !!_ && !_.action && !!((le = _.changed_fields) != null && le.length) && _.changed_fields.every((
|
|
503
|
+
return !!_ && !_.action && !!((le = _.changed_fields) != null && le.length) && _.changed_fields.every((Ct) => Ct.startsWith("$"));
|
|
504
504
|
}, te = Se.filter((_) => _ && !ue(_)).map((_) => ({
|
|
505
505
|
..._,
|
|
506
506
|
item: String((_ == null ? void 0 : _.item) ?? "*") === "*" ? "*" : `${_ == null ? void 0 : _.collection}:${String(_ == null ? void 0 : _.item)}`
|
|
507
507
|
})), An = te.length > 0 && Dt.current.tracker.push(te);
|
|
508
508
|
An && Dt.current.publish();
|
|
509
509
|
for (const _ of Se) {
|
|
510
|
-
const le = _ == null ? void 0 : _.changed_fields,
|
|
510
|
+
const le = _ == null ? void 0 : _.changed_fields, Ct = (_ == null ? void 0 : _.collection) != null ? `${_.collection}:${String(_.item)}` : null, Fr = Ct != null && Jr.current.has(Ct);
|
|
511
511
|
if (An && !ue(_)) continue;
|
|
512
|
-
if (_ && !_.action && (le != null && le.length) && le.every((
|
|
513
|
-
if (le.includes(at.tasks) && n.add("queue-task-counts"), le.includes(at.integrations) && n.add("queue-integrations-summary"), le.includes(at.addendums) && n.add("queue-collection-addendums"), le.includes(at.lock) &&
|
|
514
|
-
const
|
|
515
|
-
|
|
512
|
+
if (_ && !_.action && (le != null && le.length) && le.every((Qe) => Qe.startsWith("$"))) {
|
|
513
|
+
if (le.includes(at.tasks) && n.add("queue-task-counts"), le.includes(at.integrations) && n.add("queue-integrations-summary"), le.includes(at.addendums) && n.add("queue-collection-addendums"), le.includes(at.lock) && bl((Qe) => Qe + 1), le.includes(at.sla) && (de = !0), le.includes(at.owners) && Fr && (w = !0), le.includes(at.state)) {
|
|
514
|
+
const Qe = Zd(
|
|
515
|
+
Fr,
|
|
516
516
|
Gn.current === "kanban" || Wn.current
|
|
517
517
|
);
|
|
518
|
-
de = !0,
|
|
518
|
+
de = !0, Qe.refresh && (w = !0), Z += Qe.pill;
|
|
519
519
|
}
|
|
520
520
|
r || (r = setTimeout(() => {
|
|
521
521
|
r = null;
|
|
522
|
-
for (const
|
|
522
|
+
for (const Qe of n) y.invalidateQueries({ queryKey: [Qe] });
|
|
523
523
|
n.clear();
|
|
524
524
|
}, 300));
|
|
525
525
|
continue;
|
|
526
526
|
}
|
|
527
527
|
de = !0;
|
|
528
|
-
const
|
|
529
|
-
|
|
528
|
+
const Is = (_ == null ? void 0 : _.collection) != null && Rc(_.collection, _.item);
|
|
529
|
+
Ct && (Fr || (_ == null ? void 0 : _.action) === "create" || Gn.current === "kanban" || Wn.current) ? (w = !0, Is || Kt.current.push({ key: Ct, by: null })) : Z += 1;
|
|
530
530
|
}
|
|
531
|
-
Z > 0 && (
|
|
532
|
-
}, T = ($) =>
|
|
533
|
-
|
|
531
|
+
Z > 0 && (Qn.current += Z), w && m(), de && u();
|
|
532
|
+
}, T = ($) => Ui(jn, $, h);
|
|
533
|
+
mn.current = T;
|
|
534
534
|
const v = e(t, ($) => Hn([$ ?? {}], T));
|
|
535
535
|
return () => {
|
|
536
|
-
Et.current = null, v(),
|
|
536
|
+
Et.current = null, v(), mn.current = null, ji(jn), r && clearTimeout(r), o && clearTimeout(o), c && clearTimeout(c);
|
|
537
537
|
};
|
|
538
|
-
}, [
|
|
538
|
+
}, [dt, S, s == null ? void 0 : s.sources, y, l, z, jn, Hn]), uc(
|
|
539
539
|
"owners:changed",
|
|
540
540
|
(e) => {
|
|
541
541
|
var t;
|
|
@@ -545,7 +545,7 @@ function Ap({
|
|
|
545
545
|
},
|
|
546
546
|
{ debounceMs: 600 }
|
|
547
547
|
);
|
|
548
|
-
const ve =
|
|
548
|
+
const ve = Ti(x, 350), kl = JSON.stringify(ve) === JSON.stringify(x), Jn = L(!1), ie = C === "table" && !!R, oa = Yd(s), vl = W(
|
|
549
549
|
() => {
|
|
550
550
|
var e;
|
|
551
551
|
return {
|
|
@@ -559,7 +559,7 @@ function Ap({
|
|
|
559
559
|
};
|
|
560
560
|
},
|
|
561
561
|
[s]
|
|
562
|
-
), Mt = (e) =>
|
|
562
|
+
), Mt = (e) => fu(e, vl), mt = cu(ct, Mt), la = C === "table" && !ie && mt.length > 0, Bt = la ? du(mt, Mt) : [], Oe = (() => {
|
|
563
563
|
const e = {};
|
|
564
564
|
for (const [t, n] of Object.entries(ve))
|
|
565
565
|
if (n) {
|
|
@@ -576,54 +576,54 @@ function Ap({
|
|
|
576
576
|
}
|
|
577
577
|
return e;
|
|
578
578
|
})();
|
|
579
|
-
function
|
|
580
|
-
V((n) => ({ ...n, [e]: n[e] === t ? "" : t })),
|
|
579
|
+
function pt(e, t) {
|
|
580
|
+
V((n) => ({ ...n, [e]: n[e] === t ? "" : t })), Q(1);
|
|
581
581
|
}
|
|
582
|
-
function
|
|
582
|
+
function wl(e) {
|
|
583
583
|
V((t) => {
|
|
584
584
|
const n = t.state, r = Array.isArray(n) ? n : n ? [n] : [], o = r.includes(e) ? r.filter((c) => c !== e) : [...r, e];
|
|
585
585
|
return { ...t, state: o };
|
|
586
|
-
}),
|
|
586
|
+
}), Q(1);
|
|
587
587
|
}
|
|
588
|
-
const
|
|
589
|
-
function
|
|
590
|
-
V({ ...ke.current }), me("all"),
|
|
588
|
+
const _l = Array.isArray(x.state) ? x.state : x.state ? [x.state] : [], Nl = (e) => !e || Array.isArray(e) && e.length === 0;
|
|
589
|
+
function Sl() {
|
|
590
|
+
V({ ...ke.current }), me("all"), Q(1);
|
|
591
591
|
}
|
|
592
|
-
const [We,
|
|
592
|
+
const [We, Cl] = N(() => {
|
|
593
593
|
try {
|
|
594
594
|
return localStorage.getItem("nvr_queue_insights_open") === "1";
|
|
595
595
|
} catch {
|
|
596
596
|
return !1;
|
|
597
597
|
}
|
|
598
598
|
});
|
|
599
|
-
|
|
599
|
+
K(() => {
|
|
600
600
|
try {
|
|
601
601
|
localStorage.setItem("nvr_queue_insights_open", We ? "1" : "0");
|
|
602
602
|
} catch {
|
|
603
603
|
}
|
|
604
604
|
}, [We]);
|
|
605
|
-
const { data:
|
|
605
|
+
const { data: $l = [] } = re({
|
|
606
606
|
queryKey: ["queue-view-subs", l],
|
|
607
607
|
queryFn: () => f.request(D("/notification-subscriptions")).then((e) => (e.data ?? []).filter((t) => t.queue_id === l)).catch(() => []),
|
|
608
608
|
staleTime: 3e4
|
|
609
|
-
}),
|
|
610
|
-
const t =
|
|
611
|
-
(t ? f.request(
|
|
609
|
+
}), gn = (e) => $l.find((t) => t.queue_view_id === e), Rl = (e) => {
|
|
610
|
+
const t = gn(e);
|
|
611
|
+
(t ? f.request(qr(`/notification-subscriptions/${t.id}`)) : f.request(
|
|
612
612
|
ge("/notification-subscriptions", {
|
|
613
613
|
queue_id: l,
|
|
614
614
|
queue_view_id: e,
|
|
615
615
|
digest_frequency: "instant"
|
|
616
616
|
})
|
|
617
617
|
)).then(() => {
|
|
618
|
-
|
|
618
|
+
P.success(
|
|
619
619
|
t ? "Unsubscribed" : "Subscribed — new arrivals in this view notify you"
|
|
620
620
|
), y.invalidateQueries({ queryKey: ["queue-view-subs", l] });
|
|
621
|
-
}).catch((r) =>
|
|
621
|
+
}).catch((r) => P.error($t(r, "Failed")));
|
|
622
622
|
}, [sa, Yn] = N(null), zn = [
|
|
623
623
|
...new Set(
|
|
624
624
|
((s == null ? void 0 : s.sources) ?? []).filter((e) => e.type === "collection" && e.collection).map((e) => e.collection)
|
|
625
625
|
)
|
|
626
|
-
], { data:
|
|
626
|
+
], { data: Tl = {} } = re({
|
|
627
627
|
queryKey: ["queue-custom-actions", l, zn.join(",")],
|
|
628
628
|
queryFn: async () => {
|
|
629
629
|
const e = {};
|
|
@@ -640,14 +640,14 @@ function Ap({
|
|
|
640
640
|
},
|
|
641
641
|
enabled: zn.length > 0,
|
|
642
642
|
staleTime: 6e4
|
|
643
|
-
}),
|
|
643
|
+
}), Ol = (e) => Tl[e] ?? [], Ll = (e, t) => {
|
|
644
644
|
f.request(ge(`/custom-actions/${e.id}/execute`, { item: t.item_id })).then(() => {
|
|
645
|
-
|
|
645
|
+
P.success(`${e.label} ran`), y.invalidateQueries({ queryKey: ["queue-items", l] });
|
|
646
646
|
}).catch((n) => {
|
|
647
647
|
const r = n.response;
|
|
648
|
-
|
|
648
|
+
P.error((r == null ? void 0 : r.error) ?? $t(n, `${e.label} failed`));
|
|
649
649
|
});
|
|
650
|
-
}, { data: Xn = [] } =
|
|
650
|
+
}, { data: Xn = [] } = re({
|
|
651
651
|
queryKey: ["queue-triage-labels", l],
|
|
652
652
|
queryFn: () => f.request(D(`/queues/${l}/triage-labels`)).then((e) => e.data ?? []).catch(() => []),
|
|
653
653
|
staleTime: 3e4
|
|
@@ -660,19 +660,19 @@ function Ap({
|
|
|
660
660
|
})
|
|
661
661
|
).then(() => {
|
|
662
662
|
y.invalidateQueries({ queryKey: ["queue-items", l] }), y.invalidateQueries({ queryKey: ["queue-triage-labels", l] });
|
|
663
|
-
}).catch((n) =>
|
|
664
|
-
}, [
|
|
665
|
-
() => Yo(
|
|
663
|
+
}).catch((n) => P.error($t(n, "Label failed")));
|
|
664
|
+
}, [Fl] = N(() => oc(`queue:${l}`)), [Al, ql] = N(
|
|
665
|
+
() => Yo(Fl) !== "fresh"
|
|
666
666
|
), {
|
|
667
667
|
data: i,
|
|
668
668
|
isLoading: ca,
|
|
669
|
-
isFetching:
|
|
669
|
+
isFetching: Qt,
|
|
670
670
|
isPlaceholderData: Zn,
|
|
671
671
|
dataUpdatedAt: ce,
|
|
672
672
|
isError: da,
|
|
673
|
-
error:
|
|
674
|
-
refetch:
|
|
675
|
-
} =
|
|
673
|
+
error: El,
|
|
674
|
+
refetch: Kl
|
|
675
|
+
} = re({
|
|
676
676
|
queryKey: [
|
|
677
677
|
"queue-items",
|
|
678
678
|
l,
|
|
@@ -684,23 +684,23 @@ function Ap({
|
|
|
684
684
|
Bt.join(",")
|
|
685
685
|
],
|
|
686
686
|
queryFn: async () => {
|
|
687
|
-
const e = !ie && C === "table", t = JSON.stringify([l, b, U,
|
|
687
|
+
const e = !ie && C === "table", t = JSON.stringify([l, b, U, Oe, pn]), n = e ? Gi(Vr.current, t, se, "").after : void 0, r = await f.request(
|
|
688
688
|
D(`/queues/${l}/items`, {
|
|
689
689
|
scope: b,
|
|
690
690
|
// Last State Change is Aging read the other way round: the newest
|
|
691
691
|
// move is the least aged.
|
|
692
692
|
sort: Kr(U),
|
|
693
|
-
filters: JSON.stringify(
|
|
693
|
+
filters: JSON.stringify(Oe),
|
|
694
694
|
// Table + group: headers only (rows load per group on expand, #741).
|
|
695
695
|
// Kanban renders the full matching set, grouped client-side.
|
|
696
696
|
...ie ? {
|
|
697
697
|
group_by: R,
|
|
698
698
|
...oa.length ? { group_sums: oa.join(",") } : {}
|
|
699
|
-
} : C === "table" ? { page: se, limit:
|
|
699
|
+
} : C === "table" ? { page: se, limit: pn, ...n ? { after: n } : {} } : {},
|
|
700
700
|
...Bt.length ? { totals: Bt.join(",") } : {}
|
|
701
701
|
})
|
|
702
702
|
);
|
|
703
|
-
return n &&
|
|
703
|
+
return n && Wi(Vr.current, t, se, r.next_cursor), r;
|
|
704
704
|
},
|
|
705
705
|
// Wait for display_config AND scope seeding so the first fetch uses the
|
|
706
706
|
// configured defaults and already carries the viewer's restricted filters.
|
|
@@ -709,24 +709,24 @@ function Ap({
|
|
|
709
709
|
// first fetch went out WITHOUT the seeded scope and refired ~350ms later
|
|
710
710
|
// with it (3.3s + 8.7s of work for one page). The first fetch now also
|
|
711
711
|
// waits for the debounced copy to settle; later typing still debounces.
|
|
712
|
-
enabled: !!l && G && ta && (Jn.current ||
|
|
712
|
+
enabled: !!l && G && ta && (Jn.current || kl),
|
|
713
713
|
// Keep the previous page rendered while a sort/filter/page change refetches —
|
|
714
714
|
// swapping to skeletons collapsed the table height and jittered the page.
|
|
715
715
|
placeholderData: (e) => e,
|
|
716
716
|
gcTime: 20 * 6e4,
|
|
717
|
-
...
|
|
717
|
+
...Al ? { staleTime: Number.POSITIVE_INFINITY } : {}
|
|
718
718
|
});
|
|
719
719
|
i && !Jn.current && (Jn.current = !0);
|
|
720
|
-
const
|
|
720
|
+
const ft = Object.entries(ke.current).filter(
|
|
721
721
|
([e, t]) => {
|
|
722
722
|
var n;
|
|
723
|
-
return !((n = Re[e.slice(6)]) != null && n.length) && JSON.stringify(
|
|
723
|
+
return !((n = Re[e.slice(6)]) != null && n.length) && JSON.stringify(Oe[e] ?? null) === JSON.stringify(t);
|
|
724
724
|
}
|
|
725
|
-
).map(([e]) => e), ua =
|
|
726
|
-
Object.entries(
|
|
727
|
-
), { data: Pl } =
|
|
725
|
+
).map(([e]) => e), ua = ft.length > 0 && Object.keys(Oe).every((e) => ft.includes(e)), ma = Object.fromEntries(
|
|
726
|
+
Object.entries(Oe).filter(([e]) => !ft.includes(e))
|
|
727
|
+
), { data: Pl } = re({
|
|
728
728
|
queryKey: ["queue-default-hidden", l, b, ma],
|
|
729
|
-
enabled: !!l && !!i && !
|
|
729
|
+
enabled: !!l && !!i && !Qt && i.total === 0 && ((Co = i.empty) == null ? void 0 : Co.reason) === "filters" && ft.length > 0 && !ua,
|
|
730
730
|
staleTime: 3e4,
|
|
731
731
|
retry: !1,
|
|
732
732
|
queryFn: () => f.request(
|
|
@@ -737,14 +737,14 @@ function Ap({
|
|
|
737
737
|
limit: 1
|
|
738
738
|
})
|
|
739
739
|
).then((e) => Number(e.total ?? 0))
|
|
740
|
-
}),
|
|
740
|
+
}), Le = ua ? Math.max(0, ((($o = i == null ? void 0 : i.stats) == null ? void 0 : $o.total) ?? 0) - ((i == null ? void 0 : i.total) ?? 0)) : Pl ?? 0, pa = (e) => ft.map(e).join(" and "), fa = () => {
|
|
741
741
|
V((e) => {
|
|
742
742
|
const t = { ...e };
|
|
743
|
-
for (const n of
|
|
743
|
+
for (const n of ft) delete t[n];
|
|
744
744
|
return t;
|
|
745
|
-
}),
|
|
745
|
+
}), Q(1);
|
|
746
746
|
};
|
|
747
|
-
|
|
747
|
+
K(() => {
|
|
748
748
|
if (typeof window > "u" || !ce) return;
|
|
749
749
|
const e = window;
|
|
750
750
|
e.__nvrQueueTrace || (e.__nvrQueueTrace = []);
|
|
@@ -758,17 +758,17 @@ function Ap({
|
|
|
758
758
|
}, r = t.find((o) => o.queue === l);
|
|
759
759
|
t.push(n), t.length > 50 && t.shift(), r && r !== n && ce - Number(r.at) < 2e3 && t.filter((o) => o.queue === l).length === 2 && console.warn("[queue] duplicate first fetch", { first: r, second: n });
|
|
760
760
|
}, [ce]);
|
|
761
|
-
const
|
|
761
|
+
const bt = ca && !i || !G || !ta && !i, ba = (Qt && !ca || Zn && Qt) && !he.current, [ee, De] = N([]), [X, ha] = N(!1), Dl = W(() => {
|
|
762
762
|
const e = (ie ? [] : (i == null ? void 0 : i.data) ?? []).slice(0, 100).map((r) => `${r.collection}:${r.item_id}`), t = new Set(e), n = X ? ee.filter((r) => !t.has(r)).slice(0, 100) : [];
|
|
763
763
|
return [...e, ...n].map((r) => {
|
|
764
764
|
const o = r.indexOf(":");
|
|
765
765
|
return { collection: r.slice(0, o), item: r.slice(o + 1) };
|
|
766
766
|
});
|
|
767
|
-
}, [ie, i == null ? void 0 : i.data, X, ee]), ya =
|
|
768
|
-
pending:
|
|
767
|
+
}, [ie, i == null ? void 0 : i.data, X, ee]), ya = Oc(Dl), xn = bu(), ga = Oi(Qt && !he.current), Ml = Li({
|
|
768
|
+
pending: Qt && !he.current,
|
|
769
769
|
request: l != null ? { method: "GET", url: `/queues/${l}/items` } : null,
|
|
770
770
|
noun: "items"
|
|
771
|
-
}),
|
|
771
|
+
}), Bl = Tc();
|
|
772
772
|
async function xa(e, t) {
|
|
773
773
|
var m;
|
|
774
774
|
const r = (await f.request(D(`/pipelines/instance/${e.collection}/${e.item_id}`))).data;
|
|
@@ -781,7 +781,7 @@ function Ap({
|
|
|
781
781
|
);
|
|
782
782
|
if (!c) throw new Error("No transition available to move this item here");
|
|
783
783
|
let u = null;
|
|
784
|
-
if (
|
|
784
|
+
if (hu(c) && (u = await xn.ask(((m = c.label) == null ? void 0 : m.trim()) || "Move"), !u))
|
|
785
785
|
throw new Error("Not moved — this move needs a note");
|
|
786
786
|
await f.request(
|
|
787
787
|
ge(`/pipelines/instance/${e.collection}/${e.item_id}/transition`, {
|
|
@@ -790,7 +790,7 @@ function Ap({
|
|
|
790
790
|
})
|
|
791
791
|
);
|
|
792
792
|
}
|
|
793
|
-
const
|
|
793
|
+
const Ql = je({
|
|
794
794
|
mutationFn: async ({ item: e, targetState: t }) => {
|
|
795
795
|
await xa(e, t);
|
|
796
796
|
},
|
|
@@ -798,9 +798,9 @@ function Ap({
|
|
|
798
798
|
y.invalidateQueries({ queryKey: ["queue-items", l, b] });
|
|
799
799
|
},
|
|
800
800
|
onError: (e) => {
|
|
801
|
-
|
|
801
|
+
P.error($t(e, "Failed to move item")), y.invalidateQueries({ queryKey: ["queue-items", l, b] });
|
|
802
802
|
}
|
|
803
|
-
}), He =
|
|
803
|
+
}), He = je({
|
|
804
804
|
mutationFn: (e) => f.request(
|
|
805
805
|
ge(`/queues/${l}/claim`, {
|
|
806
806
|
source_collection: e.collection,
|
|
@@ -808,8 +808,8 @@ function Ap({
|
|
|
808
808
|
})
|
|
809
809
|
),
|
|
810
810
|
onSuccess: () => y.invalidateQueries({ queryKey: ["queue-items", l, b] }),
|
|
811
|
-
onError: () =>
|
|
812
|
-
}),
|
|
811
|
+
onError: () => P.error("Failed to claim item")
|
|
812
|
+
}), ht = je({
|
|
813
813
|
mutationFn: (e) => f.request(
|
|
814
814
|
ge(`/queues/${l}/release`, {
|
|
815
815
|
source_collection: e.collection,
|
|
@@ -817,19 +817,19 @@ function Ap({
|
|
|
817
817
|
})
|
|
818
818
|
),
|
|
819
819
|
onSuccess: () => y.invalidateQueries({ queryKey: ["queue-items", l, b] }),
|
|
820
|
-
onError: () =>
|
|
821
|
-
}), { data:
|
|
820
|
+
onError: () => P.error("Failed to release item")
|
|
821
|
+
}), { data: yt } = re({
|
|
822
822
|
queryKey: ["queue-column-prefs", l],
|
|
823
823
|
queryFn: () => f.request(D(`/queues/${l}/column-prefs`)),
|
|
824
824
|
enabled: !!l
|
|
825
|
-
}), [
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
}, [
|
|
829
|
-
const [ka, va] = N({}), Fe = ie ? (i == null ? void 0 : i.groups) ?? null : null,
|
|
825
|
+
}), [jt, kn] = N(null), [gt, er] = N(null);
|
|
826
|
+
K(() => {
|
|
827
|
+
yt && er(yt.data.default_view_id);
|
|
828
|
+
}, [yt]);
|
|
829
|
+
const [ka, va] = N({}), Fe = ie ? (i == null ? void 0 : i.groups) ?? null : null, vn = (Fe ?? []).filter((e) => !xe.has(e.key)).map((e) => e.key).flatMap(
|
|
830
830
|
(e) => Array.from({ length: ka[e] ?? 1 }, (t, n) => ({ key: e, page: n + 1 }))
|
|
831
|
-
),
|
|
832
|
-
queries:
|
|
831
|
+
), wn = nt({
|
|
832
|
+
queries: vn.map(({ key: e, page: t }) => ({
|
|
833
833
|
queryKey: [
|
|
834
834
|
"queue-items",
|
|
835
835
|
l,
|
|
@@ -845,47 +845,47 @@ function Ap({
|
|
|
845
845
|
D(`/queues/${l}/items`, {
|
|
846
846
|
scope: b,
|
|
847
847
|
sort: Kr(U),
|
|
848
|
-
filters: JSON.stringify(
|
|
848
|
+
filters: JSON.stringify(Oe),
|
|
849
849
|
group_by: R,
|
|
850
850
|
group_key: e,
|
|
851
851
|
page: t,
|
|
852
|
-
limit:
|
|
852
|
+
limit: _u
|
|
853
853
|
})
|
|
854
854
|
).then((n) => ({ key: e, rows: n.data })),
|
|
855
855
|
enabled: !!i && ie,
|
|
856
856
|
placeholderData: (n) => n
|
|
857
857
|
}))
|
|
858
|
-
}), jl =
|
|
859
|
-
(!jl || !tr.current) && (tr.current =
|
|
860
|
-
const
|
|
858
|
+
}), jl = wn.some((e) => e.isFetching), tr = L("");
|
|
859
|
+
(!jl || !tr.current) && (tr.current = wn.map((e) => e.dataUpdatedAt).join(","));
|
|
860
|
+
const Ul = tr.current, nr = W(() => {
|
|
861
861
|
const e = /* @__PURE__ */ new Map();
|
|
862
|
-
return
|
|
862
|
+
return wn.forEach((t, n) => {
|
|
863
863
|
if (!t.data) return;
|
|
864
|
-
const r =
|
|
864
|
+
const r = vn[n].key;
|
|
865
865
|
e.set(r, [...e.get(r) ?? [], ...t.data.rows]);
|
|
866
866
|
}), e;
|
|
867
|
-
}, [
|
|
868
|
-
|
|
869
|
-
),
|
|
870
|
-
|
|
867
|
+
}, [Ul, vn.map((e) => `${e.key}\0${e.page}`).join("")]), Vl = new Set(
|
|
868
|
+
wn.flatMap((e, t) => e.isFetching ? [vn[t].key] : [])
|
|
869
|
+
), O = Fe ? [...nr.values()].flat() : (i == null ? void 0 : i.data) ?? [];
|
|
870
|
+
zc(
|
|
871
871
|
l ? {
|
|
872
872
|
queue: {
|
|
873
873
|
id: l,
|
|
874
874
|
label: s == null ? void 0 : s.name,
|
|
875
875
|
scope: b,
|
|
876
|
-
filters: JSON.stringify(
|
|
877
|
-
items:
|
|
876
|
+
filters: JSON.stringify(Oe),
|
|
877
|
+
items: O.slice(0, 100).map((e) => ({ collection: e.collection, id: e.item_id }))
|
|
878
878
|
}
|
|
879
879
|
} : null
|
|
880
880
|
);
|
|
881
|
-
const
|
|
881
|
+
const Gl = Xc(), Ut = O.some((e) => e.fulfilment !== void 0), Vt = O.some((e) => e.send_backs !== void 0), { data: ae, dataUpdatedAt: wa } = re({
|
|
882
882
|
queryKey: ["queue-live-stats", l, b, ve, zr],
|
|
883
883
|
// The totals row ticks with the tiles (#13): the same read totals the whole result as the
|
|
884
884
|
// viewer (it reads every row for the stats already), coalesced by the stats tick.
|
|
885
885
|
queryFn: () => f.request(
|
|
886
886
|
D(`/queues/${l}/items`, {
|
|
887
887
|
scope: b,
|
|
888
|
-
filters: JSON.stringify(
|
|
888
|
+
filters: JSON.stringify(Oe),
|
|
889
889
|
page: 1,
|
|
890
890
|
limit: 1,
|
|
891
891
|
...Bt.length ? { totals: Bt.join(",") } : {}
|
|
@@ -895,18 +895,18 @@ function Ap({
|
|
|
895
895
|
staleTime: Number.POSITIVE_INFINITY,
|
|
896
896
|
placeholderData: (e) => e,
|
|
897
897
|
retry: !1
|
|
898
|
-
}), Gt = !!
|
|
899
|
-
|
|
898
|
+
}), Gt = !!ae && wa > ce, g = Gt ? ae.stats : i == null ? void 0 : i.stats, J = Gt ? ae.filtered_stats ?? null : (i == null ? void 0 : i.filtered_stats) ?? null, _a = Gt ? ae.state_counts : i == null ? void 0 : i.state_counts;
|
|
899
|
+
K(() => {
|
|
900
900
|
if (!Gt) return;
|
|
901
|
-
const e = Vn.current > 0 || Un.current, t =
|
|
902
|
-
pending:
|
|
903
|
-
liveTotal:
|
|
901
|
+
const e = Vn.current > 0 || Un.current, t = zd({
|
|
902
|
+
pending: Qn.current,
|
|
903
|
+
liveTotal: ae.total,
|
|
904
904
|
rowsTotal: i == null ? void 0 : i.total,
|
|
905
905
|
// Only a table re-reads its rows quietly; the other views keep the pill.
|
|
906
906
|
busy: e || C !== "table"
|
|
907
907
|
});
|
|
908
|
-
|
|
909
|
-
liveTotal:
|
|
908
|
+
Qn.current = 0, t > 0 && un((r) => r + t), Xd({
|
|
909
|
+
liveTotal: ae.total,
|
|
910
910
|
rowsTotal: i == null ? void 0 : i.total,
|
|
911
911
|
// Grouped tables too (army 8 b08-N6): their headers count the whole set, and
|
|
912
912
|
// nothing else re-read them — "37 of 38" with the strip at 38 for minutes.
|
|
@@ -918,28 +918,28 @@ function Ap({
|
|
|
918
918
|
he.current = !1;
|
|
919
919
|
}));
|
|
920
920
|
}, [wa]);
|
|
921
|
-
const rr = (Ro = J ?? g) == null ? void 0 : Ro.aging, Na =
|
|
921
|
+
const rr = (Ro = J ?? g) == null ? void 0 : Ro.aging, Na = L(void 0);
|
|
922
922
|
!x.aging_hours && rr && (Na.current = rr);
|
|
923
923
|
const Wt = x.aging_hours ? Na.current ?? (g == null ? void 0 : g.aging) : rr ?? (g == null ? void 0 : g.aging);
|
|
924
|
-
Jr.current = new Set(
|
|
924
|
+
Jr.current = new Set(O.map((e) => `${e.collection}:${e.item_id}`));
|
|
925
925
|
const Ht = zo(
|
|
926
|
-
|
|
926
|
+
O.map((e) => ({ collection: e.collection, id: e.item_id })),
|
|
927
927
|
Yr
|
|
928
|
-
), Sa =
|
|
929
|
-
|
|
928
|
+
), Sa = kc(
|
|
929
|
+
O,
|
|
930
930
|
(e) => `${e.collection}:${e.item_id}`,
|
|
931
931
|
be.rootRef,
|
|
932
932
|
{
|
|
933
933
|
enabled: C === "table" && !ie,
|
|
934
934
|
resetKey: JSON.stringify([l, b, se, U, ve])
|
|
935
935
|
}
|
|
936
|
-
), Ca =
|
|
937
|
-
!he.current && ce !== $a.current && (Ca.current = ce),
|
|
938
|
-
const e = new Set(
|
|
936
|
+
), Ca = L(ce), $a = L(0);
|
|
937
|
+
!he.current && ce !== $a.current && (Ca.current = ce), K(() => {
|
|
938
|
+
const e = new Set(O.map((t) => `${t.collection}:${t.item_id}`));
|
|
939
939
|
if (he.current) {
|
|
940
940
|
he.current = !1, $a.current = ce;
|
|
941
|
-
const t =
|
|
942
|
-
|
|
941
|
+
const t = Kt.current;
|
|
942
|
+
Kt.current = [];
|
|
943
943
|
const n = Xr.current, r = /* @__PURE__ */ new Set();
|
|
944
944
|
for (const o of t)
|
|
945
945
|
!e.has(o.key) || r.has(o.key) || (r.add(o.key), be.note([o.key], o.by, n && !n.has(o.key) ? "create" : "update"));
|
|
@@ -950,30 +950,30 @@ function Ap({
|
|
|
950
950
|
}
|
|
951
951
|
Xr.current = e;
|
|
952
952
|
}, [ce]);
|
|
953
|
-
const ar =
|
|
953
|
+
const ar = L(null), It = [
|
|
954
954
|
...new Set(
|
|
955
955
|
((s == null ? void 0 : s.sources) ?? []).filter((e) => e.type === "collection" && e.collection).map((e) => e.collection)
|
|
956
956
|
)
|
|
957
957
|
].join(",");
|
|
958
|
-
|
|
958
|
+
K(() => {
|
|
959
959
|
if (!It) return;
|
|
960
|
-
const e =
|
|
961
|
-
return e && !ar.current && (ar.current = e),
|
|
962
|
-
}, [
|
|
963
|
-
|
|
960
|
+
const e = lc(`queue:${l}`);
|
|
961
|
+
return e && !ar.current && (ar.current = e), sc(dt, `queue:${l}`, It.split(","));
|
|
962
|
+
}, [dt, l, It]), K(() => {
|
|
963
|
+
un(0), Dt.current.clear();
|
|
964
964
|
}, [ce]);
|
|
965
965
|
function Ra() {
|
|
966
|
-
y.invalidateQueries({ queryKey: ["queue-items", l] }), y.invalidateQueries({ queryKey: ["queue-workload", l] }),
|
|
966
|
+
y.invalidateQueries({ queryKey: ["queue-items", l] }), y.invalidateQueries({ queryKey: ["queue-workload", l] }), un(0);
|
|
967
967
|
}
|
|
968
968
|
function Ta() {
|
|
969
|
-
Dt.current.clear(),
|
|
969
|
+
Dt.current.clear(), Pe.dropHeld(), Ra();
|
|
970
970
|
}
|
|
971
|
-
const { data: Ae } =
|
|
971
|
+
const { data: Ae } = re({
|
|
972
972
|
queryKey: ["queue-trends", l],
|
|
973
973
|
queryFn: () => f.request(D(`/queues/${l}/trends`, { days: 14 })),
|
|
974
974
|
enabled: !!l,
|
|
975
975
|
staleTime: 300 * 1e3
|
|
976
|
-
}), { data: qe } =
|
|
976
|
+
}), { data: qe } = re({
|
|
977
977
|
queryKey: ["queue-trends", l, "mine"],
|
|
978
978
|
queryFn: () => f.request(D(`/queues/${l}/trends`, { days: 14, scope: "mine" })),
|
|
979
979
|
enabled: !!l && b === "mine",
|
|
@@ -1000,11 +1000,11 @@ function Ap({
|
|
|
1000
1000
|
)
|
|
1001
1001
|
],
|
|
1002
1002
|
[s == null ? void 0 : s.sources]
|
|
1003
|
-
), { data:
|
|
1003
|
+
), { data: Wl } = re({
|
|
1004
1004
|
queryKey: Lc.collections(),
|
|
1005
1005
|
queryFn: () => f.request(D("/collections")).then((e) => e.data),
|
|
1006
1006
|
staleTime: 300 * 1e3
|
|
1007
|
-
}),
|
|
1007
|
+
}), xt = nt({
|
|
1008
1008
|
queries: Yt.map((e) => ({
|
|
1009
1009
|
queryKey: ["queue-collection-addendums", e],
|
|
1010
1010
|
queryFn: () => f.request(
|
|
@@ -1015,7 +1015,7 @@ function Ap({
|
|
|
1015
1015
|
}).catch(() => !1),
|
|
1016
1016
|
staleTime: 300 * 1e3
|
|
1017
1017
|
}))
|
|
1018
|
-
}).some((e) => e.data === !0), { data: or = [] } =
|
|
1018
|
+
}).some((e) => e.data === !0), { data: or = [] } = re({
|
|
1019
1019
|
queryKey: ["queue-integrations-collections"],
|
|
1020
1020
|
queryFn: () => f.request(D("/integration-obligations/collections")).then((e) => e.data ?? []).catch(() => []),
|
|
1021
1021
|
staleTime: 300 * 1e3
|
|
@@ -1023,14 +1023,14 @@ function Ap({
|
|
|
1023
1023
|
var t;
|
|
1024
1024
|
const e = {};
|
|
1025
1025
|
if (!Me) return e;
|
|
1026
|
-
for (const n of
|
|
1026
|
+
for (const n of O) {
|
|
1027
1027
|
if (!or.includes(n.collection)) continue;
|
|
1028
1028
|
const r = e[t = n.collection] ?? (e[t] = []);
|
|
1029
1029
|
r.length < 500 && r.push(n.item_id);
|
|
1030
1030
|
}
|
|
1031
1031
|
return e;
|
|
1032
|
-
}, [
|
|
1033
|
-
queries:
|
|
1032
|
+
}, [O, or, Me]), Oa = Object.keys(lr), La = nt({
|
|
1033
|
+
queries: Oa.map((e) => ({
|
|
1034
1034
|
queryKey: ["queue-integrations-summary", e, lr[e].join(",")],
|
|
1035
1035
|
queryFn: () => f.request(
|
|
1036
1036
|
ge("/integration-obligations/summary", {
|
|
@@ -1040,24 +1040,24 @@ function Ap({
|
|
|
1040
1040
|
).then((t) => t.data ?? {}).catch(() => ({})),
|
|
1041
1041
|
staleTime: 3e4
|
|
1042
1042
|
}))
|
|
1043
|
-
}),
|
|
1043
|
+
}), Hl = La.map((e) => e.dataUpdatedAt).join(","), Il = W(() => {
|
|
1044
1044
|
const e = {};
|
|
1045
|
-
return
|
|
1045
|
+
return Oa.forEach((t, n) => {
|
|
1046
1046
|
var o;
|
|
1047
|
-
const r = ((o =
|
|
1047
|
+
const r = ((o = La[n]) == null ? void 0 : o.data) ?? {};
|
|
1048
1048
|
for (const [c, u] of Object.entries(r)) e[`${t}:${c}`] = u;
|
|
1049
1049
|
}), e;
|
|
1050
|
-
}, [
|
|
1050
|
+
}, [Hl]), sr = W(() => {
|
|
1051
1051
|
var t;
|
|
1052
1052
|
const e = {};
|
|
1053
|
-
for (const n of
|
|
1053
|
+
for (const n of O) {
|
|
1054
1054
|
if (!n.collection || n.collection === "tasks" || n.collection.startsWith("nivaro_"))
|
|
1055
1055
|
continue;
|
|
1056
1056
|
const r = e[t = n.collection] ?? (e[t] = []);
|
|
1057
1057
|
r.length < 500 && r.push(n.item_id);
|
|
1058
1058
|
}
|
|
1059
1059
|
return e;
|
|
1060
|
-
}, [
|
|
1060
|
+
}, [O]), ir = Object.keys(sr), Fa = nt({
|
|
1061
1061
|
queries: ir.map((e) => ({
|
|
1062
1062
|
queryKey: ["queue-task-counts", e, sr[e].join(",")],
|
|
1063
1063
|
queryFn: () => f.request(
|
|
@@ -1065,13 +1065,13 @@ function Ap({
|
|
|
1065
1065
|
).then((t) => t.data ?? {}).catch(() => ({})),
|
|
1066
1066
|
staleTime: 3e4
|
|
1067
1067
|
}))
|
|
1068
|
-
}),
|
|
1068
|
+
}), Jl = Fa.map((e) => e.dataUpdatedAt).join(","), Yl = W(() => {
|
|
1069
1069
|
const e = {};
|
|
1070
1070
|
return ir.forEach((t, n) => {
|
|
1071
1071
|
var r;
|
|
1072
1072
|
for (const [o, c] of Object.entries(((r = Fa[n]) == null ? void 0 : r.data) ?? {})) e[`${t}:${o}`] = c;
|
|
1073
1073
|
}), e;
|
|
1074
|
-
}, [
|
|
1074
|
+
}, [Jl]), Aa = ir.length > 0, qa = nt({
|
|
1075
1075
|
queries: Yt.map((e) => ({
|
|
1076
1076
|
queryKey: ["queue-collection-risk-rules", e],
|
|
1077
1077
|
queryFn: () => f.request(
|
|
@@ -1079,7 +1079,7 @@ function Ap({
|
|
|
1079
1079
|
).then((t) => t.data ?? []).catch(() => []),
|
|
1080
1080
|
staleTime: 300 * 1e3
|
|
1081
1081
|
}))
|
|
1082
|
-
}),
|
|
1082
|
+
}), zl = qa.map((e) => e.dataUpdatedAt).join(","), Ea = W(() => {
|
|
1083
1083
|
const e = /* @__PURE__ */ new Map();
|
|
1084
1084
|
for (const t of qa)
|
|
1085
1085
|
for (const n of t.data ?? []) {
|
|
@@ -1090,7 +1090,7 @@ function Ap({
|
|
|
1090
1090
|
});
|
|
1091
1091
|
}
|
|
1092
1092
|
return [...e.values()];
|
|
1093
|
-
}, [
|
|
1093
|
+
}, [zl]), Ka = nt({
|
|
1094
1094
|
queries: Yt.map((e) => ({
|
|
1095
1095
|
queryKey: ["queue-collection-states", e],
|
|
1096
1096
|
queryFn: () => f.request(
|
|
@@ -1098,14 +1098,14 @@ function Ap({
|
|
|
1098
1098
|
).then((t) => t.data),
|
|
1099
1099
|
staleTime: 300 * 1e3
|
|
1100
1100
|
}))
|
|
1101
|
-
}),
|
|
1101
|
+
}), Pa = (e) => e.replace(/_/g, " ").replace(/\b\w/g, (t) => t.toUpperCase()), Be = W(() => {
|
|
1102
1102
|
const e = {};
|
|
1103
|
-
for (const t of
|
|
1103
|
+
for (const t of Ka)
|
|
1104
1104
|
(t.data ?? []).forEach((n, r) => {
|
|
1105
1105
|
e[n.key] = { label: n.label, color: n.color, sort: r };
|
|
1106
1106
|
});
|
|
1107
1107
|
return e;
|
|
1108
|
-
}, [
|
|
1108
|
+
}, [Ka.map((e) => e.data)]), Da = g ? Object.entries(g.by_state).sort(
|
|
1109
1109
|
(e, t) => {
|
|
1110
1110
|
var n, r;
|
|
1111
1111
|
return (((n = Be[e[0]]) == null ? void 0 : n.sort) ?? Number.MAX_SAFE_INTEGER) - (((r = Be[t[0]]) == null ? void 0 : r.sort) ?? Number.MAX_SAFE_INTEGER);
|
|
@@ -1119,10 +1119,10 @@ function Ap({
|
|
|
1119
1119
|
const e = {};
|
|
1120
1120
|
for (const [t, n] of Object.entries(Be)) e[t] = n.label;
|
|
1121
1121
|
return e;
|
|
1122
|
-
}, [Be]),
|
|
1123
|
-
if (e ===
|
|
1124
|
-
const t = (
|
|
1125
|
-
return (t == null ? void 0 : t.display_name) || (t == null ? void 0 : t.plural) ||
|
|
1122
|
+
}, [Be]), Ke = (e) => e ? e === "none" ? "No State" : cr[e] ?? Pa(e) : "—", Ie = (e) => {
|
|
1123
|
+
if (e === ot) return "Addendums";
|
|
1124
|
+
const t = (Wl ?? []).find((n) => n.collection === e);
|
|
1125
|
+
return (t == null ? void 0 : t.display_name) || (t == null ? void 0 : t.plural) || Pa(e);
|
|
1126
1126
|
}, we = W(() => R ? Fe ? Fe.map((e) => ({
|
|
1127
1127
|
key: e.key,
|
|
1128
1128
|
rows: nr.get(e.key) ?? [],
|
|
@@ -1130,8 +1130,8 @@ function Ap({
|
|
|
1130
1130
|
atRisk: e.at_risk,
|
|
1131
1131
|
count: e.count,
|
|
1132
1132
|
sums: e.sums ?? {}
|
|
1133
|
-
})) :
|
|
1134
|
-
|
|
1133
|
+
})) : Fc(O, R).map((e) => ({ ...e, count: e.rows.length, sums: {} })) : null, [O, R, Fe, nr]), dr = L(null);
|
|
1134
|
+
K(() => {
|
|
1135
1135
|
if (!R || !we) {
|
|
1136
1136
|
dr.current = null;
|
|
1137
1137
|
return;
|
|
@@ -1139,16 +1139,16 @@ function Ap({
|
|
|
1139
1139
|
if (ie && !Fe || dr.current === R) return;
|
|
1140
1140
|
dr.current = R;
|
|
1141
1141
|
const e = we.reduce((t, n) => t + n.count, 0);
|
|
1142
|
-
|
|
1142
|
+
Kn(e > 200 ? new Set(we.map((t) => t.key)) : /* @__PURE__ */ new Set()), va({});
|
|
1143
1143
|
}, [R, Fe]);
|
|
1144
|
-
function
|
|
1145
|
-
|
|
1144
|
+
function Xl(e) {
|
|
1145
|
+
Kn((t) => {
|
|
1146
1146
|
const n = new Set(t);
|
|
1147
1147
|
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
1148
1148
|
});
|
|
1149
1149
|
}
|
|
1150
|
-
const _e = W(() => we ? we.filter((e) => !xe.has(e.key)).flatMap((e) => e.rows) :
|
|
1151
|
-
if (e.collection ===
|
|
1150
|
+
const _e = W(() => we ? we.filter((e) => !xe.has(e.key)).flatMap((e) => e.rows) : O, [we, O, xe]), k = (e) => `${e.collection}:${e.item_id}`, [Je, Ye] = N(null), [Zl, ur] = N(!1), [zt, Xt] = N(null), mr = L(null), pr = (e) => {
|
|
1151
|
+
if (e.collection === ot && e.url) {
|
|
1152
1152
|
const t = e.url.match(/^\/collections\/([^/?]+)\/([^/?]+)(?:\?(.*))?$/);
|
|
1153
1153
|
if (t) {
|
|
1154
1154
|
const n = {};
|
|
@@ -1170,14 +1170,14 @@ function Ap({
|
|
|
1170
1170
|
var t;
|
|
1171
1171
|
if (s) {
|
|
1172
1172
|
if (e) {
|
|
1173
|
-
const n = C === "table" && !ie, r = !
|
|
1174
|
-
|
|
1173
|
+
const n = C === "table" && !ie, r = !O.some((o) => o.collection === ot);
|
|
1174
|
+
dc({
|
|
1175
1175
|
list: `queue:${l}`,
|
|
1176
1176
|
label: s.name,
|
|
1177
|
-
rows:
|
|
1177
|
+
rows: O.filter((o) => o.collection !== ot).map((o) => ({ collection: o.collection, id: String(o.item_id) })),
|
|
1178
1178
|
opened: e,
|
|
1179
1179
|
entry: Jo(),
|
|
1180
|
-
...n && r && typeof (i == null ? void 0 : i.total) == "number" ? { total: i.total, offset: (se - 1) *
|
|
1180
|
+
...n && r && typeof (i == null ? void 0 : i.total) == "number" ? { total: i.total, offset: (se - 1) * pn } : {}
|
|
1181
1181
|
});
|
|
1182
1182
|
}
|
|
1183
1183
|
ol({
|
|
@@ -1190,12 +1190,12 @@ function Ap({
|
|
|
1190
1190
|
entry: Jo()
|
|
1191
1191
|
});
|
|
1192
1192
|
}
|
|
1193
|
-
},
|
|
1194
|
-
Ba({ collection: e.collection, id: String(e.item_id) }),
|
|
1195
|
-
},
|
|
1193
|
+
}, kt = (e) => {
|
|
1194
|
+
Ba({ collection: e.collection, id: String(e.item_id) }), j.open(pr(e));
|
|
1195
|
+
}, es = (e) => {
|
|
1196
1196
|
Ba({ collection: e.collection, id: String(e.itemId) });
|
|
1197
1197
|
const t = Y == null ? void 0 : Y[0], n = !!t && t.collection === e.collection && String(t.itemId) === e.itemId;
|
|
1198
|
-
|
|
1198
|
+
j.open({
|
|
1199
1199
|
collection: e.collection,
|
|
1200
1200
|
itemId: e.itemId,
|
|
1201
1201
|
layoutSlug: n ? (p == null ? void 0 : p.item_layout) ?? null : null
|
|
@@ -1203,18 +1203,18 @@ function Ap({
|
|
|
1203
1203
|
}, [H, Zt] = N(
|
|
1204
1204
|
null
|
|
1205
1205
|
);
|
|
1206
|
-
|
|
1206
|
+
K(() => {
|
|
1207
1207
|
if (!H) return;
|
|
1208
1208
|
const e = () => Zt(null);
|
|
1209
1209
|
return window.addEventListener("mousedown", e), window.addEventListener("scroll", e, !0), () => {
|
|
1210
1210
|
window.removeEventListener("mousedown", e), window.removeEventListener("scroll", e, !0);
|
|
1211
1211
|
};
|
|
1212
1212
|
}, [H]);
|
|
1213
|
-
const
|
|
1213
|
+
const _n = (e) => {
|
|
1214
1214
|
Xt(k(e));
|
|
1215
1215
|
const t = (p == null ? void 0 : p.row_click) ?? "preview";
|
|
1216
|
-
if (t === "full" || e.collection ===
|
|
1217
|
-
|
|
1216
|
+
if (t === "full" || e.collection === ot) {
|
|
1217
|
+
kt(e);
|
|
1218
1218
|
return;
|
|
1219
1219
|
}
|
|
1220
1220
|
if (t === "layout") {
|
|
@@ -1229,29 +1229,29 @@ function Ap({
|
|
|
1229
1229
|
}
|
|
1230
1230
|
Ye(e);
|
|
1231
1231
|
};
|
|
1232
|
-
|
|
1232
|
+
K(() => {
|
|
1233
1233
|
if (!Je) return;
|
|
1234
|
-
const e =
|
|
1234
|
+
const e = O.find((t) => k(t) === k(Je));
|
|
1235
1235
|
e && e !== Je && Ye(e);
|
|
1236
|
-
}, [
|
|
1237
|
-
const
|
|
1238
|
-
function
|
|
1239
|
-
const t = e ? _e.findIndex((r) => k(r) === k(e)) + 1 : 0, n = _e.slice(t).find(
|
|
1236
|
+
}, [O]);
|
|
1237
|
+
const ts = (e) => !e.claimed_by || e.claimed_by.id === z;
|
|
1238
|
+
function Qa(e) {
|
|
1239
|
+
const t = e ? _e.findIndex((r) => k(r) === k(e)) + 1 : 0, n = _e.slice(t).find(ts);
|
|
1240
1240
|
if (!n) {
|
|
1241
|
-
ur(!1), Ye(null),
|
|
1241
|
+
ur(!1), Ye(null), P.info("Nothing left to work on — queue clear!");
|
|
1242
1242
|
return;
|
|
1243
1243
|
}
|
|
1244
1244
|
if (Xt(k(n)), Te && !n.claimed_by && He.mutate(n), (p == null ? void 0 : p.row_click) === "full") {
|
|
1245
|
-
|
|
1245
|
+
kt(n);
|
|
1246
1246
|
return;
|
|
1247
1247
|
}
|
|
1248
1248
|
ur(!0), Ye(n);
|
|
1249
1249
|
}
|
|
1250
|
-
|
|
1250
|
+
K(() => {
|
|
1251
1251
|
if (C !== "table") return;
|
|
1252
1252
|
function e(t) {
|
|
1253
1253
|
var o;
|
|
1254
|
-
if (t.metaKey || t.ctrlKey || t.altKey || !
|
|
1254
|
+
if (t.metaKey || t.ctrlKey || t.altKey || !vu(t.target)) return;
|
|
1255
1255
|
const n = zt ? _e.findIndex((c) => k(c) === zt) : -1, r = (c) => {
|
|
1256
1256
|
Xt(k(c));
|
|
1257
1257
|
const u = k(c), m = [...document.querySelectorAll("tr[data-row-key]")].find(
|
|
@@ -1270,75 +1270,75 @@ function Ap({
|
|
|
1270
1270
|
} else if (t.key === "c" && n >= 0 && Te) {
|
|
1271
1271
|
t.preventDefault();
|
|
1272
1272
|
const c = _e[n];
|
|
1273
|
-
((o = c.claimed_by) == null ? void 0 : o.id) === z ?
|
|
1274
|
-
} else t.key === "o" && n >= 0 && (t.preventDefault(),
|
|
1273
|
+
((o = c.claimed_by) == null ? void 0 : o.id) === z ? ht.mutate(c) : He.mutate(c);
|
|
1274
|
+
} else t.key === "o" && n >= 0 && (t.preventDefault(), kt(_e[n]));
|
|
1275
1275
|
}
|
|
1276
1276
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
1277
|
-
}, [C, _e, zt, Je, z, He,
|
|
1278
|
-
const { data: E } =
|
|
1277
|
+
}, [C, _e, zt, Je, z, He, ht, Te]);
|
|
1278
|
+
const { data: E } = re({
|
|
1279
1279
|
queryKey: ["queue-views", l],
|
|
1280
1280
|
queryFn: () => f.request(D(`/queues/${l}/views`)),
|
|
1281
1281
|
enabled: !!l
|
|
1282
|
-
}), [fe, ze] = N(null), [
|
|
1282
|
+
}), [fe, ze] = N(null), [ns, fr] = N(!1), [Nn, ja] = N(""), [Ua, Va] = N(!1), [vt, Ga] = N(!1);
|
|
1283
1283
|
function en(e) {
|
|
1284
1284
|
var n;
|
|
1285
1285
|
const t = e.state ?? {};
|
|
1286
|
-
e.is_default ? (me(((n = s == null ? void 0 : s.display_config) == null ? void 0 : n.default_scope) ?? "all"), V({ ...ke.current })) : (me(t.scope ?? "all"), V({ ...ke.current, ...t.filters ?? {} })),
|
|
1286
|
+
e.is_default ? (me(((n = s == null ? void 0 : s.display_config) == null ? void 0 : n.default_scope) ?? "all"), V({ ...ke.current })) : (me(t.scope ?? "all"), V({ ...ke.current, ...t.filters ?? {} })), st(t.sort ?? ""), At(t.group_by ?? null), kn(t.columns ?? null), Dn(t.pins ?? null), dn(
|
|
1287
1287
|
Object.fromEntries(
|
|
1288
1288
|
Object.entries(t.totals ?? {}).filter(
|
|
1289
|
-
([r, o]) =>
|
|
1289
|
+
([r, o]) => Br(r) && pd(o)
|
|
1290
1290
|
)
|
|
1291
1291
|
)
|
|
1292
|
-
), t.view &&
|
|
1292
|
+
), t.view && lt(Ve.includes(t.view) ? t.view : Ve[0]), Q(1), ze(e.id);
|
|
1293
1293
|
}
|
|
1294
|
-
function
|
|
1294
|
+
function rs() {
|
|
1295
1295
|
var t, n;
|
|
1296
1296
|
const e = E == null ? void 0 : E.data.find((r) => r.is_default);
|
|
1297
1297
|
if (e) {
|
|
1298
1298
|
en(e);
|
|
1299
1299
|
return;
|
|
1300
1300
|
}
|
|
1301
|
-
me(((t = s == null ? void 0 : s.display_config) == null ? void 0 : t.default_scope) ?? "all"), V({ ...ke.current }),
|
|
1301
|
+
me(((t = s == null ? void 0 : s.display_config) == null ? void 0 : t.default_scope) ?? "all"), V({ ...ke.current }), st(""), At(null), kn(null), Dn(null), dn({}), (n = s == null ? void 0 : s.display_config) != null && n.default_view && lt(s.display_config.default_view), Q(1), ze(null);
|
|
1302
1302
|
}
|
|
1303
|
-
|
|
1304
|
-
if (G || !(s != null && s.display_config) ||
|
|
1305
|
-
const e =
|
|
1306
|
-
t ? en(t) : n ? en(n) : (
|
|
1307
|
-
}, [s,
|
|
1308
|
-
const Sn =
|
|
1309
|
-
|
|
1303
|
+
K(() => {
|
|
1304
|
+
if (G || !(s != null && s.display_config) || yt === void 0 || E === void 0) return;
|
|
1305
|
+
const e = yt.data.default_view_id, t = e != null ? E.data.find((r) => r.id === e) : void 0, n = E.data.find((r) => r.is_default);
|
|
1306
|
+
t ? en(t) : n ? en(n) : (lt(s.display_config.default_view), me(s.display_config.default_scope)), xl(!0);
|
|
1307
|
+
}, [s, yt, E, G]);
|
|
1308
|
+
const Sn = L(null), Cn = L(null);
|
|
1309
|
+
K(() => {
|
|
1310
1310
|
if (!G) return;
|
|
1311
|
-
const e =
|
|
1312
|
-
if (!e || !
|
|
1311
|
+
const e = Sd();
|
|
1312
|
+
if (!e || !Cd(e, l, ac(), rc())) return;
|
|
1313
1313
|
ol({ ...e, restore: !1 });
|
|
1314
1314
|
const t = e.state ?? {};
|
|
1315
|
-
t.scope && me(t.scope), t.filters && V({ ...ke.current, ...t.filters }), t.sort != null &&
|
|
1316
|
-
const n =
|
|
1315
|
+
t.scope && me(t.scope), t.filters && V({ ...ke.current, ...t.filters }), t.sort != null && st(t.sort), At(t.group_by ?? null), t.view && lt(t.view), t.page && Q(t.page), Cn.current = e.scroll ?? 0;
|
|
1316
|
+
const n = ic(`queue:${l}`);
|
|
1317
1317
|
if (n) {
|
|
1318
1318
|
const r = `${n.collection}:${n.id}`;
|
|
1319
1319
|
Xt(r), mr.current = r;
|
|
1320
1320
|
}
|
|
1321
|
-
Y && Y.length > 0 &&
|
|
1321
|
+
Y && Y.length > 0 && Nt.back(Y.length);
|
|
1322
1322
|
}, [G, l]);
|
|
1323
|
-
const Wa =
|
|
1324
|
-
|
|
1323
|
+
const Wa = L(!1), [Ha, as] = N(0);
|
|
1324
|
+
K(() => {
|
|
1325
1325
|
if (Wa.current || !G || !It) return;
|
|
1326
1326
|
if (Ha === 0) {
|
|
1327
|
-
|
|
1327
|
+
as(1);
|
|
1328
1328
|
return;
|
|
1329
1329
|
}
|
|
1330
1330
|
if (!i || Zn) return;
|
|
1331
1331
|
Wa.current = !0;
|
|
1332
1332
|
const e = ar.current, n = !!e && ce > 0 && ce <= e.leftAt ? Yo(e) : "fresh";
|
|
1333
|
-
n === "replay" && e &&
|
|
1334
|
-
}) : (n === "replay" || n === "refetch") && (
|
|
1333
|
+
n === "replay" && e && Pe.paused ? Hn(e.events.filter((o) => !o.own), () => {
|
|
1334
|
+
}) : (n === "replay" || n === "refetch") && (Kt.current = ((e == null ? void 0 : e.events) ?? []).filter((o) => !o.own).map((o) => ({ key: `${o.collection}:${String(o.item)}`, by: null })), he.current = !0, y.invalidateQueries({
|
|
1335
1335
|
queryKey: ie ? ["queue-items", l] : ["queue-items", l, b]
|
|
1336
1336
|
}).finally(() => {
|
|
1337
1337
|
he.current = !1;
|
|
1338
|
-
})),
|
|
1338
|
+
})), ql(!1);
|
|
1339
1339
|
const r = mr.current;
|
|
1340
|
-
mr.current = null, r && setTimeout(() =>
|
|
1341
|
-
}, [i, Zn, G, It, Ha]),
|
|
1340
|
+
mr.current = null, r && setTimeout(() => cc(be.rootRef.current, r), 260);
|
|
1341
|
+
}, [i, Zn, G, It, Ha]), K(() => {
|
|
1342
1342
|
var c;
|
|
1343
1343
|
if (!G || typeof window > "u") return;
|
|
1344
1344
|
const e = new URLSearchParams(window.location.search), t = e.get("scope"), n = ((c = e.get("state")) == null ? void 0 : c.trim()) || null, r = t === "all" || t === "mine";
|
|
@@ -1349,8 +1349,8 @@ function Ap({
|
|
|
1349
1349
|
window.history.state,
|
|
1350
1350
|
"",
|
|
1351
1351
|
`${window.location.pathname}${o ? `?${o}` : ""}${window.location.hash}`
|
|
1352
|
-
), r && me(t), n && V((u) => ({ ...u, state: [n] })),
|
|
1353
|
-
}, [G]),
|
|
1352
|
+
), r && me(t), n && V((u) => ({ ...u, state: [n] })), Q(1);
|
|
1353
|
+
}, [G]), K(() => {
|
|
1354
1354
|
if (!G || typeof window > "u") return;
|
|
1355
1355
|
const e = new URLSearchParams(window.location.search), t = e.get("owner");
|
|
1356
1356
|
if (!t) return;
|
|
@@ -1360,82 +1360,82 @@ function Ap({
|
|
|
1360
1360
|
window.history.state,
|
|
1361
1361
|
"",
|
|
1362
1362
|
`${window.location.pathname}${n ? `?${n}` : ""}${window.location.hash}`
|
|
1363
|
-
), me("all"), V((r) => ({ ...r, owners: [t] })), ze(null),
|
|
1363
|
+
), me("all"), V((r) => ({ ...r, owners: [t] })), ze(null), Q(1);
|
|
1364
1364
|
}, [G]);
|
|
1365
|
-
const
|
|
1366
|
-
|
|
1365
|
+
const br = L(null);
|
|
1366
|
+
K(() => {
|
|
1367
1367
|
if (!G) return;
|
|
1368
|
-
const e =
|
|
1369
|
-
e && (
|
|
1368
|
+
const e = Xi(Zi(`queue:${l}`));
|
|
1369
|
+
e && (ec(), en({
|
|
1370
1370
|
id: -1,
|
|
1371
1371
|
// Saved views type filters loosely as strings; multi-selects ride as arrays there too.
|
|
1372
1372
|
state: e
|
|
1373
|
-
}), ze(null), e.page &&
|
|
1374
|
-
}, [G]),
|
|
1375
|
-
const e =
|
|
1376
|
-
e == null || !(E != null && E.data) || (
|
|
1373
|
+
}), ze(null), e.page && Q(e.page), e.view_id && (br.current = e.view_id));
|
|
1374
|
+
}, [G]), K(() => {
|
|
1375
|
+
const e = br.current;
|
|
1376
|
+
e == null || !(E != null && E.data) || (br.current = null, E.data.some((t) => t.id === e) && ze(e));
|
|
1377
1377
|
}, [E, G]);
|
|
1378
1378
|
const Ia = () => {
|
|
1379
1379
|
var r;
|
|
1380
|
-
const e = [], t = (r =
|
|
1380
|
+
const e = [], t = (r = jr.find((o) => o.value === b)) == null ? void 0 : r.label;
|
|
1381
1381
|
t && e.push(t);
|
|
1382
1382
|
const n = Object.values(x).filter(
|
|
1383
1383
|
(o) => Array.isArray(o) ? o.length > 0 : o !== "" && o != null
|
|
1384
1384
|
).length;
|
|
1385
1385
|
return n > 0 && e.push(`${n} filter${n === 1 ? "" : "s"}`), e.length ? e.join(", ") : null;
|
|
1386
|
-
},
|
|
1386
|
+
}, hr = () => ({
|
|
1387
1387
|
scope: b,
|
|
1388
1388
|
filters: x,
|
|
1389
1389
|
sort: U,
|
|
1390
1390
|
group_by: R,
|
|
1391
1391
|
view: C,
|
|
1392
|
-
columns:
|
|
1393
|
-
pins:
|
|
1394
|
-
...
|
|
1392
|
+
columns: jt,
|
|
1393
|
+
pins: it,
|
|
1394
|
+
...mt.length ? { totals: on() } : {},
|
|
1395
1395
|
...se > 1 ? { page: se } : {},
|
|
1396
1396
|
...fe != null && fe > 0 ? { view_id: fe } : {}
|
|
1397
1397
|
});
|
|
1398
|
-
|
|
1399
|
-
Cn.current == null ||
|
|
1400
|
-
}, [
|
|
1401
|
-
const { isAdmin: Xe } = Ho(),
|
|
1402
|
-
() =>
|
|
1403
|
-
[
|
|
1404
|
-
), Ja =
|
|
1398
|
+
K(() => {
|
|
1399
|
+
Cn.current == null || O.length === 0 || !Sn.current || (Sn.current.scrollTop = Cn.current, Cn.current = null);
|
|
1400
|
+
}, [O]);
|
|
1401
|
+
const { isAdmin: Xe } = Ho(), os = O.map((e) => `${e.collection}|${e.item_id}`).join(","), ls = W(
|
|
1402
|
+
() => O.map((e) => ({ collection: e.collection, id: e.item_id })),
|
|
1403
|
+
[os]
|
|
1404
|
+
), Ja = Kd(ls, Xe), ss = (e) => zt === k(e) ? (
|
|
1405
1405
|
// Pinned sticky cells use bg-inherit — the highlight must be
|
|
1406
1406
|
// OPAQUE (nvr-cyan/5-over-white equivalents) or horizontally
|
|
1407
1407
|
// scrolled content bleeds through the pinned columns. Same
|
|
1408
1408
|
// pair DataTable uses for selected rows when pins are active.
|
|
1409
1409
|
"bg-[#f2fdff] dark:bg-[#20303a]"
|
|
1410
|
-
) : e.at_risk ? Pc(e.at_risk_color ?? "red") : void 0, tn = Xe || (s == null ? void 0 : s.owner) != null && s.owner === z,
|
|
1410
|
+
) : e.at_risk ? Pc(e.at_risk_color ?? "red") : void 0, tn = Xe || (s == null ? void 0 : s.owner) != null && s.owner === z, is = je({
|
|
1411
1411
|
mutationFn: ({ viewId: e, on: t }) => f.request(Io(`/queues/views/${e}`, { is_default: t })),
|
|
1412
1412
|
onSuccess: () => {
|
|
1413
|
-
y.invalidateQueries({ queryKey: ["queue-views", l] }),
|
|
1413
|
+
y.invalidateQueries({ queryKey: ["queue-views", l] }), P.success("Queue default view updated");
|
|
1414
1414
|
},
|
|
1415
|
-
onError: () =>
|
|
1416
|
-
}), $n =
|
|
1415
|
+
onError: () => P.error("Could not update the queue default view")
|
|
1416
|
+
}), $n = je({
|
|
1417
1417
|
mutationFn: () => f.request(
|
|
1418
1418
|
ge(`/queues/${l}/views`, {
|
|
1419
1419
|
name: Nn.trim(),
|
|
1420
|
-
is_shared: tn && (Ua ||
|
|
1421
|
-
is_default:
|
|
1420
|
+
is_shared: tn && (Ua || vt),
|
|
1421
|
+
is_default: vt,
|
|
1422
1422
|
state: {
|
|
1423
1423
|
scope: b,
|
|
1424
1424
|
filters: x,
|
|
1425
1425
|
sort: U,
|
|
1426
1426
|
group_by: R,
|
|
1427
1427
|
view: C,
|
|
1428
|
-
columns:
|
|
1429
|
-
pins:
|
|
1428
|
+
columns: jt,
|
|
1429
|
+
pins: it,
|
|
1430
1430
|
totals: on()
|
|
1431
1431
|
}
|
|
1432
1432
|
})
|
|
1433
1433
|
),
|
|
1434
1434
|
onSuccess: (e) => {
|
|
1435
|
-
xo(on()),
|
|
1435
|
+
xo(on()), fr(!1), ja(""), Va(!1), Ga(!1), ze(e.data.id), y.invalidateQueries({ queryKey: ["queue-views", l] }), P.success("View saved");
|
|
1436
1436
|
},
|
|
1437
|
-
onError: () =>
|
|
1438
|
-
}), [Ya, za] = N(null), Ze =
|
|
1437
|
+
onError: () => P.error("Failed to save view")
|
|
1438
|
+
}), [Ya, za] = N(null), Ze = je({
|
|
1439
1439
|
mutationFn: (e) => f.request(
|
|
1440
1440
|
Io(`/queues/views/${e.id}`, {
|
|
1441
1441
|
state: {
|
|
@@ -1444,55 +1444,55 @@ function Ap({
|
|
|
1444
1444
|
sort: U,
|
|
1445
1445
|
group_by: R,
|
|
1446
1446
|
view: C,
|
|
1447
|
-
columns:
|
|
1448
|
-
pins:
|
|
1447
|
+
columns: jt,
|
|
1448
|
+
pins: it,
|
|
1449
1449
|
totals: on()
|
|
1450
1450
|
}
|
|
1451
1451
|
})
|
|
1452
1452
|
),
|
|
1453
1453
|
onSuccess: (e, t) => {
|
|
1454
|
-
t.id === fe && xo(on()), y.invalidateQueries({ queryKey: ["queue-views", l] }), za(t.id), setTimeout(() => za((n) => n === t.id ? null : n), 2e3),
|
|
1454
|
+
t.id === fe && xo(on()), y.invalidateQueries({ queryKey: ["queue-views", l] }), za(t.id), setTimeout(() => za((n) => n === t.id ? null : n), 2e3), P.success(
|
|
1455
1455
|
t.is_default ? `Saved "${t.name}" with the current columns, sort and totals. Filters stay each person's own.` : `Saved "${t.name}" with the current filters, scope and sort`
|
|
1456
1456
|
);
|
|
1457
1457
|
},
|
|
1458
|
-
onError: () =>
|
|
1459
|
-
}), [
|
|
1460
|
-
|
|
1461
|
-
if (
|
|
1458
|
+
onError: () => P.error("Failed to update view")
|
|
1459
|
+
}), [yr, Rn] = N(null);
|
|
1460
|
+
K(() => {
|
|
1461
|
+
if (yr == null) return;
|
|
1462
1462
|
const e = setTimeout(() => Rn(null), 5e3);
|
|
1463
1463
|
return () => clearTimeout(e);
|
|
1464
|
-
}, [
|
|
1465
|
-
const Xa =
|
|
1466
|
-
mutationFn: (e) => f.request(
|
|
1464
|
+
}, [yr]);
|
|
1465
|
+
const Xa = je({
|
|
1466
|
+
mutationFn: (e) => f.request(qr(`/queues/views/${e}`)),
|
|
1467
1467
|
onSuccess: (e, t) => {
|
|
1468
|
-
Rn(null), y.invalidateQueries({ queryKey: ["queue-views", l] }), ze(null),
|
|
1468
|
+
Rn(null), y.invalidateQueries({ queryKey: ["queue-views", l] }), ze(null), gt === t && er(null);
|
|
1469
1469
|
},
|
|
1470
|
-
onError: () =>
|
|
1471
|
-
}),
|
|
1472
|
-
mutationFn: (e) => f.request(
|
|
1470
|
+
onError: () => P.error("Failed to delete view")
|
|
1471
|
+
}), cs = je({
|
|
1472
|
+
mutationFn: (e) => f.request(Ai(`/queues/${l}/default-view`, { view_id: e })),
|
|
1473
1473
|
onMutate: (e) => er(e),
|
|
1474
1474
|
onSuccess: (e, t) => {
|
|
1475
|
-
y.invalidateQueries({ queryKey: ["queue-column-prefs", l] }),
|
|
1475
|
+
y.invalidateQueries({ queryKey: ["queue-column-prefs", l] }), P.success(
|
|
1476
1476
|
t === null ? "Reverted to the general default" : "Set as your default view"
|
|
1477
1477
|
);
|
|
1478
1478
|
},
|
|
1479
1479
|
onError: () => {
|
|
1480
|
-
y.invalidateQueries({ queryKey: ["queue-column-prefs", l] }),
|
|
1480
|
+
y.invalidateQueries({ queryKey: ["queue-column-prefs", l] }), P.error("Failed to update default view");
|
|
1481
1481
|
}
|
|
1482
|
-
}),
|
|
1482
|
+
}), ds = () => {
|
|
1483
1483
|
X && De([]), ha(!X);
|
|
1484
1484
|
};
|
|
1485
|
-
|
|
1485
|
+
K(() => {
|
|
1486
1486
|
C !== "table" && X && (ha(!1), De([]));
|
|
1487
|
-
}, [C, X]),
|
|
1488
|
-
const [
|
|
1489
|
-
async function
|
|
1490
|
-
const n =
|
|
1491
|
-
Za(!0),
|
|
1487
|
+
}, [C, X]), Fi(), Vn.current = ee.length;
|
|
1488
|
+
const [wt, Za] = N(!1);
|
|
1489
|
+
async function gr(e, t) {
|
|
1490
|
+
const n = O.filter((u) => ee.includes(k(u)));
|
|
1491
|
+
Za(!0), xn.beginBatch();
|
|
1492
1492
|
const r = await Promise.allSettled(n.map(t));
|
|
1493
|
-
|
|
1493
|
+
xn.endBatch();
|
|
1494
1494
|
const o = r.filter((u) => u.status === "fulfilled").length, c = r.length - o;
|
|
1495
|
-
Za(!1), De([]), y.invalidateQueries({ queryKey: ["queue-items", l] }), c ?
|
|
1495
|
+
Za(!1), De([]), y.invalidateQueries({ queryKey: ["queue-items", l] }), c ? P.warning(`${e}: ${o} succeeded, ${c} failed`) : P.success(`${e}: ${o} succeeded`);
|
|
1496
1496
|
}
|
|
1497
1497
|
const ye = (e) => {
|
|
1498
1498
|
var t;
|
|
@@ -1501,56 +1501,56 @@ function Ap({
|
|
|
1501
1501
|
if (r) return r;
|
|
1502
1502
|
}
|
|
1503
1503
|
return null;
|
|
1504
|
-
}, Ne = X ? ee :
|
|
1505
|
-
() => [...new Set(Ne.map((e) =>
|
|
1504
|
+
}, Ne = X ? ee : Nu, Tn = Dc(Ne), us = W(
|
|
1505
|
+
() => [...new Set(Ne.map((e) => Pr(e).collection))],
|
|
1506
1506
|
[Ne]
|
|
1507
|
-
),
|
|
1508
|
-
|
|
1509
|
-
const
|
|
1510
|
-
() =>
|
|
1511
|
-
[
|
|
1512
|
-
),
|
|
1507
|
+
), xr = Mc(us, Tn.picks), [kr, eo] = N(!1);
|
|
1508
|
+
kr && Ne.length === 0 && eo(!1);
|
|
1509
|
+
const ms = W(
|
|
1510
|
+
() => kr ? Ne : Ne.filter((e) => xr.marked.has(e)),
|
|
1511
|
+
[kr, Ne, xr.marked]
|
|
1512
|
+
), ps = Bc(ms, Tn.picks).rows.filter((e) => Tn.picks.has(e.key)), fs = zo(
|
|
1513
1513
|
Ne.map((e) => {
|
|
1514
|
-
const { collection: t, id: n } =
|
|
1514
|
+
const { collection: t, id: n } = Pr(e);
|
|
1515
1515
|
return { collection: t, id: n };
|
|
1516
1516
|
}),
|
|
1517
1517
|
Yr
|
|
1518
|
-
),
|
|
1519
|
-
const { collection: t, id: n } =
|
|
1518
|
+
), bs = Ne.map((e) => {
|
|
1519
|
+
const { collection: t, id: n } = Pr(e), r = ya[Zo(t, n)], o = fs.get(e);
|
|
1520
1520
|
return {
|
|
1521
1521
|
key: e,
|
|
1522
1522
|
viewerIds: (r == null ? void 0 : r.ids) ?? [],
|
|
1523
1523
|
viewerCount: (r == null ? void 0 : r.count) ?? 0,
|
|
1524
1524
|
lockName: o && !o.is_mine ? o.locked_by_name ?? "someone" : null
|
|
1525
1525
|
};
|
|
1526
|
-
}).filter((e) => e.viewerCount > 0 || !!e.lockName),
|
|
1527
|
-
|
|
1526
|
+
}).filter((e) => e.viewerCount > 0 || !!e.lockName), hs = Qc(
|
|
1527
|
+
O,
|
|
1528
1528
|
(e) => `${e.collection}:${e.item_id}`,
|
|
1529
1529
|
Ne
|
|
1530
|
-
),
|
|
1530
|
+
), ys = mt.filter(
|
|
1531
1531
|
(e) => {
|
|
1532
1532
|
var t;
|
|
1533
|
-
return
|
|
1533
|
+
return ct[e] === "sum" && ((t = Mt(e)) == null ? void 0 : t.kind) === "server" && e.startsWith("extra.");
|
|
1534
1534
|
}
|
|
1535
1535
|
), to = jc(
|
|
1536
|
-
bs,
|
|
1537
1536
|
hs,
|
|
1537
|
+
ys,
|
|
1538
1538
|
(e, t) => {
|
|
1539
1539
|
var n;
|
|
1540
1540
|
return (n = e.extra) == null ? void 0 : n[t.slice(6)];
|
|
1541
1541
|
}
|
|
1542
1542
|
), no = (e) => {
|
|
1543
|
-
if (R === "state") return e === "No state" ? e :
|
|
1543
|
+
if (R === "state") return e === "No state" ? e : Ke(e);
|
|
1544
1544
|
if (R === "collection") return Ie(e);
|
|
1545
1545
|
if (R != null && R.startsWith("extra.") && e !== "—") {
|
|
1546
1546
|
const t = R.slice(6), n = ye(t);
|
|
1547
|
-
return n ? rt(e, n) :
|
|
1547
|
+
return n ? rt(e, n) : cl(
|
|
1548
1548
|
((s == null ? void 0 : s.extra_field_meta) ?? []).find((r) => r.path === t),
|
|
1549
1549
|
e
|
|
1550
1550
|
);
|
|
1551
1551
|
}
|
|
1552
1552
|
return e;
|
|
1553
|
-
}, nn =
|
|
1553
|
+
}, nn = pc(
|
|
1554
1554
|
(we ?? []).map((e) => ({ ...e, rows: xe.has(e.key) ? [] : e.rows })),
|
|
1555
1555
|
k,
|
|
1556
1556
|
be.rootRef,
|
|
@@ -1567,7 +1567,7 @@ function Ap({
|
|
|
1567
1567
|
])
|
|
1568
1568
|
}
|
|
1569
1569
|
);
|
|
1570
|
-
|
|
1570
|
+
fc(
|
|
1571
1571
|
be.rootRef,
|
|
1572
1572
|
nn.groups.map((e) => `§${e.key}${e.rows.map(k).join("")}`).join(""),
|
|
1573
1573
|
{
|
|
@@ -1575,19 +1575,19 @@ function Ap({
|
|
|
1575
1575
|
resetKey: JSON.stringify([l, b, U, ve, R])
|
|
1576
1576
|
}
|
|
1577
1577
|
);
|
|
1578
|
-
const
|
|
1578
|
+
const On = (e) => Sa.isGone(e) || nn.isGone(e), _t = (e) => {
|
|
1579
1579
|
const t = nn.movingTo(e);
|
|
1580
1580
|
return t == null ? null : no(t);
|
|
1581
|
-
},
|
|
1581
|
+
}, gs = new Map(nn.groups.map((e) => [e.key, e.rows])), vr = we ? nn.groups.map(
|
|
1582
1582
|
(e) => e.group ?? { key: e.key, rows: [], breached: 0, atRisk: 0, count: 0, sums: {} }
|
|
1583
|
-
) : null,
|
|
1583
|
+
) : null, xs = vr == null ? void 0 : vr.map((e) => ({
|
|
1584
1584
|
key: e.key,
|
|
1585
|
-
rows:
|
|
1585
|
+
rows: gs.get(e.key) ?? [],
|
|
1586
1586
|
header: /* @__PURE__ */ d(Ce, { children: [
|
|
1587
1587
|
/* @__PURE__ */ a("span", { children: no(e.key) }),
|
|
1588
1588
|
/* @__PURE__ */ d("span", { className: "font-normal text-slate-400", children: [
|
|
1589
1589
|
"(",
|
|
1590
|
-
|
|
1590
|
+
ne(e.count),
|
|
1591
1591
|
")"
|
|
1592
1592
|
] }),
|
|
1593
1593
|
Object.entries(e.sums).map(([t, n]) => {
|
|
@@ -1601,13 +1601,13 @@ function Ap({
|
|
|
1601
1601
|
A(`extra.${t}`, Ue(t)),
|
|
1602
1602
|
":",
|
|
1603
1603
|
" ",
|
|
1604
|
-
r ? rt(String(n), r) :
|
|
1604
|
+
r ? rt(String(n), r) : ne(n)
|
|
1605
1605
|
]
|
|
1606
1606
|
},
|
|
1607
1607
|
t
|
|
1608
1608
|
);
|
|
1609
1609
|
}),
|
|
1610
|
-
Fe && !xe.has(e.key) &&
|
|
1610
|
+
Fe && !xe.has(e.key) && Vl.has(e.key) && /* @__PURE__ */ a("span", { className: "font-normal text-slate-400", children: "loading…" }),
|
|
1611
1611
|
Fe && !xe.has(e.key) && e.rows.length > 0 && e.rows.length < e.count && /* @__PURE__ */ d(
|
|
1612
1612
|
"button",
|
|
1613
1613
|
{
|
|
@@ -1619,9 +1619,9 @@ function Ap({
|
|
|
1619
1619
|
className: "rounded px-1.5 py-0.5 text-[11px] font-medium text-nvr-navy hover:bg-nvr-cyan/10 dark:text-nvr-cyan",
|
|
1620
1620
|
children: [
|
|
1621
1621
|
"Showing ",
|
|
1622
|
-
|
|
1622
|
+
ne(e.rows.length),
|
|
1623
1623
|
" of ",
|
|
1624
|
-
|
|
1624
|
+
ne(e.count),
|
|
1625
1625
|
" · Show more"
|
|
1626
1626
|
]
|
|
1627
1627
|
}
|
|
@@ -1635,13 +1635,13 @@ function Ap({
|
|
|
1635
1635
|
" at risk"
|
|
1636
1636
|
] })
|
|
1637
1637
|
] })
|
|
1638
|
-
})),
|
|
1639
|
-
...
|
|
1638
|
+
})), wr = (((To = i == null ? void 0 : i.available_values.collection) == null ? void 0 : To.length) ?? 0) > 1, ro = O.some((e) => !!e.unseen) || Ht.size > 0 || O.some((e) => be.isNew(k(e))), ao = [
|
|
1639
|
+
...wr ? [
|
|
1640
1640
|
{
|
|
1641
1641
|
key: "collection",
|
|
1642
1642
|
header: A("collection", "Collection"),
|
|
1643
1643
|
sortable: !0,
|
|
1644
|
-
render: (e) => /* @__PURE__ */ a(
|
|
1644
|
+
render: (e) => /* @__PURE__ */ a(Gd, { variant: "outline", children: Ie(e.collection) })
|
|
1645
1645
|
}
|
|
1646
1646
|
] : [],
|
|
1647
1647
|
{
|
|
@@ -1656,17 +1656,28 @@ function Ap({
|
|
|
1656
1656
|
// a whole, but nothing on it said so — an underline is the one
|
|
1657
1657
|
// convention people already read as "this goes somewhere".
|
|
1658
1658
|
/* @__PURE__ */ d("span", { className: "flex items-center gap-1.5", children: [
|
|
1659
|
-
Ht.get(k(e)) || be.isNew(k(e)) ||
|
|
1660
|
-
|
|
1659
|
+
Ht.get(k(e)) || be.isNew(k(e)) || On(k(e)) || _t(k(e)) != null ? /* @__PURE__ */ a(
|
|
1660
|
+
Od,
|
|
1661
1661
|
{
|
|
1662
1662
|
lock: Ht.get(k(e)),
|
|
1663
1663
|
isNew: be.isNew(k(e)),
|
|
1664
|
-
gone:
|
|
1665
|
-
movingTo:
|
|
1664
|
+
gone: On(k(e)),
|
|
1665
|
+
movingTo: _t(k(e)),
|
|
1666
1666
|
dataAttr: "data-queue-live-mark",
|
|
1667
1667
|
hang: !0
|
|
1668
1668
|
}
|
|
1669
|
-
) : /* @__PURE__ */ a(
|
|
1669
|
+
) : /* @__PURE__ */ a(
|
|
1670
|
+
Vd,
|
|
1671
|
+
{
|
|
1672
|
+
change: e.unseen,
|
|
1673
|
+
dataAttr: "data-queue-unseen",
|
|
1674
|
+
hang: !0,
|
|
1675
|
+
collection: e.collection === ot ? void 0 : e.collection,
|
|
1676
|
+
itemId: e.item_id,
|
|
1677
|
+
onOpen: () => _n(e),
|
|
1678
|
+
onSeen: () => void y.invalidateQueries({ queryKey: ["queue-items", l] })
|
|
1679
|
+
}
|
|
1680
|
+
),
|
|
1670
1681
|
/* @__PURE__ */ a(
|
|
1671
1682
|
"span",
|
|
1672
1683
|
{
|
|
@@ -1675,7 +1686,7 @@ function Ap({
|
|
|
1675
1686
|
children: e.label
|
|
1676
1687
|
}
|
|
1677
1688
|
),
|
|
1678
|
-
|
|
1689
|
+
_t(k(e)) != null && /* @__PURE__ */ a(Ld, { to: _t(k(e)) }),
|
|
1679
1690
|
(e.labels ?? []).slice(0, 3).map((t) => /* @__PURE__ */ a(
|
|
1680
1691
|
"span",
|
|
1681
1692
|
{
|
|
@@ -1708,12 +1719,12 @@ function Ap({
|
|
|
1708
1719
|
),
|
|
1709
1720
|
style: e.state_color ? {
|
|
1710
1721
|
backgroundColor: `${e.state_color}1a`,
|
|
1711
|
-
"--nvr-state-ink":
|
|
1722
|
+
"--nvr-state-ink": Di(e.state_color),
|
|
1712
1723
|
"--nvr-state-ink-dark": e.state_color
|
|
1713
1724
|
} : void 0,
|
|
1714
|
-
title: e.via_addendum ? `Addendum "${e.via_addendum.title ?? ""}" — ${
|
|
1725
|
+
title: e.via_addendum ? `Addendum "${e.via_addendum.title ?? ""}" — ${Ke(e.state)}` : Ke(e.state),
|
|
1715
1726
|
children: [
|
|
1716
|
-
|
|
1727
|
+
Ke(e.state),
|
|
1717
1728
|
e.via_addendum && /* @__PURE__ */ a("span", { className: "ml-1 rounded-sm bg-amber-500/15 px-1 text-[9px] font-bold uppercase tracking-wide text-amber-700 dark:text-amber-300", children: "Addendum" })
|
|
1718
1729
|
]
|
|
1719
1730
|
}
|
|
@@ -1723,26 +1734,26 @@ function Ap({
|
|
|
1723
1734
|
key: "owners",
|
|
1724
1735
|
header: A("owners", "Owners"),
|
|
1725
1736
|
sortable: !0,
|
|
1726
|
-
render: (e) => /* @__PURE__ */ a(
|
|
1737
|
+
render: (e) => /* @__PURE__ */ a(eu, { owners: e.owners })
|
|
1727
1738
|
},
|
|
1728
1739
|
{
|
|
1729
1740
|
key: "aging_hours",
|
|
1730
1741
|
header: A("aging_hours", "Aging"),
|
|
1731
1742
|
sortable: !0,
|
|
1732
|
-
render: (e) =>
|
|
1743
|
+
render: (e) => Cu(e.aging_hours)
|
|
1733
1744
|
},
|
|
1734
1745
|
{
|
|
1735
1746
|
// rt8 — the step and how long it has been there, ticking on the page clock; sorts on
|
|
1736
1747
|
// the server as Aging. Off unless the viewer adds it.
|
|
1737
|
-
key:
|
|
1738
|
-
header: A(
|
|
1748
|
+
key: Er,
|
|
1749
|
+
header: A(Er, "In step"),
|
|
1739
1750
|
sortable: !0,
|
|
1740
1751
|
// A bounded box: the table sizes columns to their content, so without a max width the
|
|
1741
1752
|
// step name ran on under the pinned State column instead of ending in "…".
|
|
1742
1753
|
render: (e) => /* @__PURE__ */ a("div", { className: "min-w-0 max-w-[240px]", children: /* @__PURE__ */ a(
|
|
1743
|
-
|
|
1754
|
+
kd,
|
|
1744
1755
|
{
|
|
1745
|
-
stepLabel: e.state ?
|
|
1756
|
+
stepLabel: e.state ? Ke(e.state) : null,
|
|
1746
1757
|
enteredAt: e.state_entered_at
|
|
1747
1758
|
}
|
|
1748
1759
|
) })
|
|
@@ -1759,7 +1770,7 @@ function Ap({
|
|
|
1759
1770
|
key: "sla_status",
|
|
1760
1771
|
header: A("sla_status", "SLA"),
|
|
1761
1772
|
sortable: !0,
|
|
1762
|
-
render: (e) => /* @__PURE__ */ a(
|
|
1773
|
+
render: (e) => /* @__PURE__ */ a($u, { status: e.sla_status, warningAt: e.sla_warning_at, dueAt: e.sla_due_at })
|
|
1763
1774
|
},
|
|
1764
1775
|
{
|
|
1765
1776
|
key: "at_risk",
|
|
@@ -1767,18 +1778,18 @@ function Ap({
|
|
|
1767
1778
|
sortable: !0,
|
|
1768
1779
|
render: (e) => {
|
|
1769
1780
|
var t;
|
|
1770
|
-
return e.at_risk ? /* @__PURE__ */ d("span", { className:
|
|
1781
|
+
return e.at_risk ? /* @__PURE__ */ d("span", { className: Kc(e.at_risk_color ?? "red"), children: [
|
|
1771
1782
|
"⚑ ",
|
|
1772
1783
|
((t = e.at_risk_rule) == null ? void 0 : t.name) ?? "At risk"
|
|
1773
1784
|
] }) : e.predicted_risk ? /* @__PURE__ */ a("span", { className: "text-amber-500", title: e.predicted_note ?? void 0, children: "⚑ Predicted" }) : null;
|
|
1774
1785
|
}
|
|
1775
1786
|
},
|
|
1776
|
-
...
|
|
1787
|
+
...xt ? [
|
|
1777
1788
|
{
|
|
1778
1789
|
key: "addendums",
|
|
1779
1790
|
header: A("addendums", "Addendums"),
|
|
1780
1791
|
sortable: !1,
|
|
1781
|
-
render: (e) => /* @__PURE__ */ a(
|
|
1792
|
+
render: (e) => /* @__PURE__ */ a(Su, { summary: e.addendums })
|
|
1782
1793
|
}
|
|
1783
1794
|
] : [],
|
|
1784
1795
|
...Ut ? [
|
|
@@ -1787,7 +1798,7 @@ function Ap({
|
|
|
1787
1798
|
header: A("fulfilment", "Shipped"),
|
|
1788
1799
|
sortable: !0,
|
|
1789
1800
|
render: (e) => /* @__PURE__ */ a(
|
|
1790
|
-
|
|
1801
|
+
gd,
|
|
1791
1802
|
{
|
|
1792
1803
|
collection: e.collection,
|
|
1793
1804
|
itemId: e.item_id,
|
|
@@ -1801,7 +1812,7 @@ function Ap({
|
|
|
1801
1812
|
key: "integrations",
|
|
1802
1813
|
header: A("integrations", "Integrations"),
|
|
1803
1814
|
sortable: !1,
|
|
1804
|
-
render: (e) => /* @__PURE__ */ a(
|
|
1815
|
+
render: (e) => /* @__PURE__ */ a(wd, { rows: Il[`${e.collection}:${e.item_id}`] })
|
|
1805
1816
|
}
|
|
1806
1817
|
] : [],
|
|
1807
1818
|
...Aa ? [
|
|
@@ -1810,7 +1821,7 @@ function Ap({
|
|
|
1810
1821
|
header: A("tasks", "Tasks"),
|
|
1811
1822
|
sortable: !1,
|
|
1812
1823
|
render: (e) => {
|
|
1813
|
-
const t =
|
|
1824
|
+
const t = Yl[`${e.collection}:${e.item_id}`];
|
|
1814
1825
|
return !t || t.open === 0 ? /* @__PURE__ */ a("span", { className: "text-[11px] text-slate-400", children: "—" }) : /* @__PURE__ */ d(
|
|
1815
1826
|
"span",
|
|
1816
1827
|
{
|
|
@@ -1830,10 +1841,10 @@ function Ap({
|
|
|
1830
1841
|
key: "send_backs",
|
|
1831
1842
|
header: A("send_backs", "Sent back"),
|
|
1832
1843
|
sortable: !0,
|
|
1833
|
-
render: (e) => /* @__PURE__ */ a(
|
|
1844
|
+
render: (e) => /* @__PURE__ */ a(wu, { summary: e.send_backs })
|
|
1834
1845
|
}
|
|
1835
1846
|
] : []
|
|
1836
|
-
],
|
|
1847
|
+
], ks = {
|
|
1837
1848
|
key: "claim",
|
|
1838
1849
|
header: "",
|
|
1839
1850
|
render: (e) => e.claimed_by ? /* @__PURE__ */ a(
|
|
@@ -1841,7 +1852,7 @@ function Ap({
|
|
|
1841
1852
|
{
|
|
1842
1853
|
type: "button",
|
|
1843
1854
|
onClick: (t) => {
|
|
1844
|
-
t.stopPropagation(),
|
|
1855
|
+
t.stopPropagation(), ht.mutate(e);
|
|
1845
1856
|
},
|
|
1846
1857
|
className: "text-[11px] text-slate-400 underline hover:text-slate-600",
|
|
1847
1858
|
children: "Release"
|
|
@@ -1857,16 +1868,16 @@ function Ap({
|
|
|
1857
1868
|
children: "Claim"
|
|
1858
1869
|
}
|
|
1859
1870
|
)
|
|
1860
|
-
}, rn = (s == null ? void 0 : s.available_extra_fields) ?? [],
|
|
1861
|
-
|
|
1871
|
+
}, rn = (s == null ? void 0 : s.available_extra_fields) ?? [], Nt = Ri("drill.queue"), Y = Nt.value, oo = (e) => Nt.push([e]), _r = L(null);
|
|
1872
|
+
K(() => {
|
|
1862
1873
|
var r;
|
|
1863
1874
|
if (!G || !l) return;
|
|
1864
|
-
const e = `queue:${l}`, t =
|
|
1865
|
-
if (((r =
|
|
1866
|
-
|
|
1875
|
+
const e = `queue:${l}`, t = hr(), n = tc(e, t);
|
|
1876
|
+
if (((r = _r.current) == null ? void 0 : r.queue) !== l) {
|
|
1877
|
+
_r.current = { queue: l, enc: n };
|
|
1867
1878
|
return;
|
|
1868
1879
|
}
|
|
1869
|
-
|
|
1880
|
+
nc(e, n === _r.current.enc ? null : t);
|
|
1870
1881
|
}, [
|
|
1871
1882
|
G,
|
|
1872
1883
|
l,
|
|
@@ -1875,23 +1886,23 @@ function Ap({
|
|
|
1875
1886
|
U,
|
|
1876
1887
|
R,
|
|
1877
1888
|
C,
|
|
1878
|
-
|
|
1879
|
-
|
|
1889
|
+
jt,
|
|
1890
|
+
it,
|
|
1880
1891
|
se,
|
|
1881
1892
|
fe,
|
|
1882
1893
|
Y
|
|
1883
1894
|
]);
|
|
1884
|
-
const
|
|
1885
|
-
view:
|
|
1895
|
+
const vs = ((Lo = (Oo = E == null ? void 0 : E.data) == null ? void 0 : Oo.find((e) => e.id === fe)) == null ? void 0 : Lo.name) ?? null, lo = Nc({
|
|
1896
|
+
view: vs ?? (b !== "all" ? ((Fo = jr.find((e) => e.value === b)) == null ? void 0 : Fo.label) ?? null : null),
|
|
1886
1897
|
filters: Object.values(x).filter(
|
|
1887
1898
|
(e) => Array.isArray(e) ? e.length > 0 : String(e ?? "").trim() !== ""
|
|
1888
1899
|
).length,
|
|
1889
1900
|
page: se
|
|
1890
1901
|
});
|
|
1891
|
-
|
|
1892
|
-
G && l &&
|
|
1902
|
+
K(() => {
|
|
1903
|
+
G && l && Sc(lo);
|
|
1893
1904
|
}, [G, l, lo]);
|
|
1894
|
-
const
|
|
1905
|
+
const ws = (e) => {
|
|
1895
1906
|
var t;
|
|
1896
1907
|
for (const n of (s == null ? void 0 : s.sources) ?? []) {
|
|
1897
1908
|
const r = (t = n.drilldown) == null ? void 0 : t[e];
|
|
@@ -1903,69 +1914,69 @@ function Ap({
|
|
|
1903
1914
|
};
|
|
1904
1915
|
}
|
|
1905
1916
|
return { enabled: !0, layout_id: null, width: null };
|
|
1906
|
-
},
|
|
1917
|
+
}, _s = W(() => {
|
|
1907
1918
|
const e = {};
|
|
1908
1919
|
for (const t of (s == null ? void 0 : s.sources) ?? [])
|
|
1909
1920
|
for (const [n, r] of Object.entries(t.column_formats ?? {}))
|
|
1910
1921
|
n in e || (e[n] = r);
|
|
1911
1922
|
return e;
|
|
1912
|
-
}, [s == null ? void 0 : s.sources]),
|
|
1913
|
-
function
|
|
1914
|
-
if (
|
|
1915
|
-
if (
|
|
1923
|
+
}, [s == null ? void 0 : s.sources]), Ns = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Ss = /^\d{4}-\d{2}-\d{2}T\d{2}:/;
|
|
1924
|
+
function Cs(e) {
|
|
1925
|
+
if (Ns.test(e)) return { text: e.split("@")[0], title: e };
|
|
1926
|
+
if (Ss.test(e)) {
|
|
1916
1927
|
const t = new Date(e);
|
|
1917
1928
|
if (!Number.isNaN(t.getTime()))
|
|
1918
1929
|
return {
|
|
1919
1930
|
// The one read-only date style (army 11), the full stamp on hover.
|
|
1920
|
-
text:
|
|
1931
|
+
text: Yc(t),
|
|
1921
1932
|
title: tl(t)
|
|
1922
1933
|
};
|
|
1923
1934
|
}
|
|
1924
1935
|
return { text: e, title: e };
|
|
1925
1936
|
}
|
|
1926
|
-
const
|
|
1937
|
+
const Nr = Hi(p == null ? void 0 : p.inline_edit), so = Nr.enabled ? [
|
|
1927
1938
|
...new Set(
|
|
1928
1939
|
((s == null ? void 0 : s.sources) ?? []).filter((e) => e.type === "collection" && e.collection).map((e) => e.collection)
|
|
1929
1940
|
)
|
|
1930
|
-
] : [],
|
|
1941
|
+
] : [], $s = nt({
|
|
1931
1942
|
queries: so.map((e) => ({
|
|
1932
1943
|
queryKey: ["cbv-collection-meta", e],
|
|
1933
1944
|
queryFn: () => f.request(D(`/collections/${e}`)).then((t) => t.data),
|
|
1934
1945
|
staleTime: 10 * 6e4,
|
|
1935
1946
|
retry: !1
|
|
1936
1947
|
}))
|
|
1937
|
-
}),
|
|
1948
|
+
}), Sr = /* @__PURE__ */ new Map();
|
|
1938
1949
|
so.forEach((e, t) => {
|
|
1939
1950
|
var r;
|
|
1940
|
-
const n = (r =
|
|
1941
|
-
n &&
|
|
1951
|
+
const n = (r = $s[t]) == null ? void 0 : r.data;
|
|
1952
|
+
n && Sr.set(e, {
|
|
1942
1953
|
fields: new Map((n.fields ?? []).map((o) => [o.field, o])),
|
|
1943
1954
|
relations: n.relations ?? []
|
|
1944
1955
|
});
|
|
1945
1956
|
});
|
|
1946
|
-
const { data:
|
|
1957
|
+
const { data: Rs } = re({
|
|
1947
1958
|
queryKey: ["my-permissions"],
|
|
1948
1959
|
queryFn: () => f.request(D("/security/my/permissions")).then((e) => e.data),
|
|
1949
|
-
enabled:
|
|
1960
|
+
enabled: Nr.enabled && !Xe,
|
|
1950
1961
|
staleTime: 5 * 6e4
|
|
1951
|
-
}), io =
|
|
1962
|
+
}), io = Ad(), co = (e, t) => {
|
|
1952
1963
|
if (t.includes(".")) return null;
|
|
1953
|
-
const n =
|
|
1964
|
+
const n = Sr.get(e.collection);
|
|
1954
1965
|
if (!n) return null;
|
|
1955
1966
|
const r = Ht.get(k(e));
|
|
1956
|
-
return r && !r.is_mine ? null :
|
|
1957
|
-
config:
|
|
1967
|
+
return r && !r.is_mine ? null : Yi({
|
|
1968
|
+
config: Nr,
|
|
1958
1969
|
key: t,
|
|
1959
1970
|
field: n.fields.get(t),
|
|
1960
1971
|
collection: e.collection,
|
|
1961
1972
|
relations: n.relations,
|
|
1962
|
-
mayUpdate: Xe ||
|
|
1973
|
+
mayUpdate: Xe || cd(Rs, e.collection)
|
|
1963
1974
|
});
|
|
1964
1975
|
}, uo = (e, t, n) => {
|
|
1965
1976
|
var r, o, c;
|
|
1966
1977
|
return n === "m2o" ? ((o = (r = e.extra_ids) == null ? void 0 : r[t]) == null ? void 0 : o[0]) ?? null : ((c = e.extra) == null ? void 0 : c[t]) ?? null;
|
|
1967
|
-
},
|
|
1968
|
-
const c = (v) => `${k(e)}|${v}`, u = [...oe].filter((v) => v.startsWith("extra.")).map((v) => v.slice(6)).filter((v) => !!co(e, v)), m = o === 0 ? null :
|
|
1978
|
+
}, Ts = (e, t, n, r, o) => {
|
|
1979
|
+
const c = (v) => `${k(e)}|${v}`, u = [...oe].filter((v) => v.startsWith("extra.")).map((v) => v.slice(6)).filter((v) => !!co(e, v)), m = o === 0 ? null : zi(u, t, o), h = (v) => v.collection === e.collection && v.item_id === e.item_id, T = (v) => h(v) ? n === "m2o" ? {
|
|
1969
1980
|
...v,
|
|
1970
1981
|
extra_ids: { ...v.extra_ids ?? {}, [t]: r == null ? [] : [String(r)] }
|
|
1971
1982
|
} : { ...v, extra: { ...v.extra ?? {}, [t]: r } } : v;
|
|
@@ -1990,24 +2001,24 @@ function Ap({
|
|
|
1990
2001
|
// Labels, rollups and the row's place in the queue follow the server.
|
|
1991
2002
|
onSaved: () => void y.invalidateQueries({ queryKey: ["queue-items", l] })
|
|
1992
2003
|
});
|
|
1993
|
-
},
|
|
2004
|
+
}, Os = (e, t, n) => {
|
|
1994
2005
|
const r = co(e, t);
|
|
1995
2006
|
if (!r) return n;
|
|
1996
|
-
const o =
|
|
2007
|
+
const o = Sr.get(e.collection), c = o == null ? void 0 : o.fields.get(t);
|
|
1997
2008
|
return /* @__PURE__ */ a(
|
|
1998
|
-
|
|
2009
|
+
qd,
|
|
1999
2010
|
{
|
|
2000
2011
|
controller: io,
|
|
2001
2012
|
cellKey: `${k(e)}|${t}`,
|
|
2002
2013
|
kind: r,
|
|
2003
2014
|
value: uo(e, t, r),
|
|
2004
2015
|
label: A(`extra.${t}`, Ue(t)),
|
|
2005
|
-
choices: c ?
|
|
2006
|
-
target: r === "m2o" && o ?
|
|
2016
|
+
choices: c ? Ji(c) : void 0,
|
|
2017
|
+
target: r === "m2o" && o ? Ii(o.relations, e.collection, t) : null,
|
|
2007
2018
|
collection: e.collection,
|
|
2008
2019
|
itemId: e.item_id,
|
|
2009
2020
|
field: t,
|
|
2010
|
-
onCommit: (u, m) =>
|
|
2021
|
+
onCommit: (u, m) => Ts(e, t, r, u, m),
|
|
2011
2022
|
children: n
|
|
2012
2023
|
}
|
|
2013
2024
|
);
|
|
@@ -2015,14 +2026,14 @@ function Ap({
|
|
|
2015
2026
|
key: `extra.${e}`,
|
|
2016
2027
|
header: A(`extra.${e}`, Ue(e)),
|
|
2017
2028
|
sortable: !0,
|
|
2018
|
-
render: (t) =>
|
|
2029
|
+
render: (t) => Os(t, e, Fs(t, e))
|
|
2019
2030
|
}));
|
|
2020
|
-
function
|
|
2031
|
+
function Fs(e, t) {
|
|
2021
2032
|
var n, r;
|
|
2022
2033
|
{
|
|
2023
2034
|
const o = (n = e.extra) == null ? void 0 : n[t];
|
|
2024
2035
|
if (o == null || o === "") return /* @__PURE__ */ a("span", { className: "text-slate-300", children: "—" });
|
|
2025
|
-
const c = ye(t), u = ((s == null ? void 0 : s.extra_field_meta) ?? []).find((w) => w.path === t), m = c ? rt(String(o), c) :
|
|
2036
|
+
const c = ye(t), u = ((s == null ? void 0 : s.extra_field_meta) ?? []).find((w) => w.path === t), m = c ? rt(String(o), c) : cl(u, String(o)), { text: h, title: T } = Cs(m), v = ((r = e.extra_ids) == null ? void 0 : r[t]) ?? [], $ = ws(t);
|
|
2026
2037
|
return (u == null ? void 0 : u.kind) === "relation" && u.target_collection && v.length > 0 && $.enabled && !u.aggregate ? /* @__PURE__ */ a(
|
|
2027
2038
|
"button",
|
|
2028
2039
|
{
|
|
@@ -2054,16 +2065,16 @@ function Ap({
|
|
|
2054
2065
|
) : /* @__PURE__ */ a("span", { className: "block max-w-[200px] truncate text-[12px]", title: T, children: h });
|
|
2055
2066
|
}
|
|
2056
2067
|
}
|
|
2057
|
-
const mo =
|
|
2058
|
-
...
|
|
2068
|
+
const mo = xu(p == null ? void 0 : p.formula_columns), po = [
|
|
2069
|
+
...wr ? ["collection"] : [],
|
|
2059
2070
|
"state",
|
|
2060
2071
|
"owners",
|
|
2061
2072
|
"aging_hours",
|
|
2062
2073
|
"state_entered",
|
|
2063
|
-
|
|
2074
|
+
Er,
|
|
2064
2075
|
"sla_status",
|
|
2065
2076
|
"at_risk",
|
|
2066
|
-
...
|
|
2077
|
+
...xt ? ["addendums"] : [],
|
|
2067
2078
|
...Ut ? ["fulfilment"] : [],
|
|
2068
2079
|
...Me ? ["integrations"] : [],
|
|
2069
2080
|
...Vt ? ["send_backs"] : [],
|
|
@@ -2072,11 +2083,11 @@ function Ap({
|
|
|
2072
2083
|
// Formula columns (#133) were built but never offered here, so no one could show them
|
|
2073
2084
|
// (found 2026-11-14 with the queue totals row).
|
|
2074
2085
|
...mo
|
|
2075
|
-
],
|
|
2076
|
-
...
|
|
2086
|
+
], As = [
|
|
2087
|
+
...wr ? ["collection"] : [],
|
|
2077
2088
|
"state",
|
|
2078
2089
|
"owners",
|
|
2079
|
-
...
|
|
2090
|
+
...xt ? ["addendums"] : [],
|
|
2080
2091
|
...Ut ? ["fulfilment"] : [],
|
|
2081
2092
|
...Me ? ["integrations"] : [],
|
|
2082
2093
|
...Vt ? ["send_backs"] : [],
|
|
@@ -2084,30 +2095,30 @@ function Ap({
|
|
|
2084
2095
|
"sla_status",
|
|
2085
2096
|
"at_risk",
|
|
2086
2097
|
...rn.slice(0, 2).map((e) => `extra.${e}`)
|
|
2087
|
-
],
|
|
2088
|
-
|
|
2098
|
+
], qs = (p == null ? void 0 : p.default_columns) ?? null, Cr = jt ?? qs, oe = new Set(Cr ?? As);
|
|
2099
|
+
xt && !Ft.has("addendums") && oe.add("addendums"), Ut && !Ft.has("fulfilment") && oe.add("fulfilment"), Me && !Ft.has("integrations") && oe.add("integrations"), Vt && !Ft.has("send_backs") && oe.add("send_backs");
|
|
2089
2100
|
for (const e of mo) Ft.has(e) || oe.add(e);
|
|
2090
|
-
const
|
|
2091
|
-
for (const e of
|
|
2101
|
+
const Es = new Set(Xe ? [] : (p == null ? void 0 : p.admin_only_columns) ?? []);
|
|
2102
|
+
for (const e of Es) oe.delete(e);
|
|
2092
2103
|
const an = [
|
|
2093
|
-
...(
|
|
2094
|
-
...po.filter((e) => !(
|
|
2095
|
-
],
|
|
2104
|
+
...(Cr ?? []).filter((e) => po.includes(e)),
|
|
2105
|
+
...po.filter((e) => !(Cr ?? []).includes(e))
|
|
2106
|
+
], Ks = Js(Ys(zs, { activationConstraint: { distance: 4 } }));
|
|
2096
2107
|
function Ps(e) {
|
|
2097
2108
|
const { active: t, over: n } = e;
|
|
2098
2109
|
if (!n || t.id === n.id) return;
|
|
2099
2110
|
const r = an.indexOf(String(t.id)), o = an.indexOf(String(n.id));
|
|
2100
|
-
r === -1 || o === -1 ||
|
|
2101
|
-
|
|
2111
|
+
r === -1 || o === -1 || kn(
|
|
2112
|
+
ni(an, r, o).filter((c) => oe.has(c))
|
|
2102
2113
|
);
|
|
2103
2114
|
}
|
|
2104
|
-
const fo = ao.find((e) => e.key === "label"),
|
|
2115
|
+
const fo = ao.find((e) => e.key === "label"), Ds = {
|
|
2105
2116
|
...fo,
|
|
2106
2117
|
render: (e, ...t) => /* @__PURE__ */ d("span", { className: "inline-flex min-w-0 items-center gap-1.5", children: [
|
|
2107
|
-
/* @__PURE__ */ a(
|
|
2118
|
+
/* @__PURE__ */ a(rd, { rowId: e.item_id }),
|
|
2108
2119
|
fo.render(e, ...t)
|
|
2109
2120
|
] })
|
|
2110
|
-
},
|
|
2121
|
+
}, Ms = ((p == null ? void 0 : p.formula_columns) ?? []).map(
|
|
2111
2122
|
(e) => ({
|
|
2112
2123
|
key: `formula.${e.key}`,
|
|
2113
2124
|
header: e.label,
|
|
@@ -2115,7 +2126,7 @@ function Ap({
|
|
|
2115
2126
|
const n = {
|
|
2116
2127
|
...t,
|
|
2117
2128
|
...t.extra ? Object.fromEntries(Object.entries(t.extra).map(([c, u]) => [`extra.${c}`, u])) : {}
|
|
2118
|
-
}, r =
|
|
2129
|
+
}, r = Mi(e.formula, (c) => {
|
|
2119
2130
|
const u = n[c] ?? (t.extra ? t.extra[c] : void 0), m = Number(u);
|
|
2120
2131
|
return Number.isFinite(m) ? m : u ?? null;
|
|
2121
2132
|
});
|
|
@@ -2124,74 +2135,74 @@ function Ap({
|
|
|
2124
2135
|
return Number.isFinite(o) ? /* @__PURE__ */ a("span", { className: "tabular-nums", children: e.format === "currency" ? o.toLocaleString(void 0, { style: "currency", currency: "USD" }) : o.toLocaleString() }) : /* @__PURE__ */ a("span", { children: String(r) });
|
|
2125
2136
|
}
|
|
2126
2137
|
})
|
|
2127
|
-
),
|
|
2138
|
+
), $r = [...ao, ...Ls, ...Ms], bo = Jd(
|
|
2128
2139
|
an,
|
|
2129
2140
|
(e) => {
|
|
2130
2141
|
var n;
|
|
2131
|
-
const t = (n =
|
|
2142
|
+
const t = (n = $r.find((r) => r.key === e)) == null ? void 0 : n.header;
|
|
2132
2143
|
return typeof t == "string" ? t : e;
|
|
2133
2144
|
},
|
|
2134
2145
|
oe
|
|
2135
|
-
),
|
|
2146
|
+
), Bs = {
|
|
2136
2147
|
key: "__actions__",
|
|
2137
2148
|
header: "",
|
|
2138
|
-
render: (e) => e.collection === "tasks" || e.collection ===
|
|
2139
|
-
|
|
2149
|
+
render: (e) => e.collection === "tasks" || e.collection === ot ? null : /* @__PURE__ */ a("span", { onClick: (t) => t.stopPropagation(), children: /* @__PURE__ */ a(
|
|
2150
|
+
id,
|
|
2140
2151
|
{
|
|
2141
2152
|
collection: e.collection,
|
|
2142
2153
|
id: e.item_id,
|
|
2143
2154
|
label: e.label,
|
|
2144
2155
|
hasPipeline: e.state != null,
|
|
2145
|
-
onOpen: () =>
|
|
2156
|
+
onOpen: () => kt(e),
|
|
2146
2157
|
onPeek: () => Ye(e),
|
|
2147
|
-
urlFor:
|
|
2158
|
+
urlFor: j.urlFor,
|
|
2148
2159
|
onDeleted: () => {
|
|
2149
|
-
f.request(
|
|
2150
|
-
|
|
2151
|
-
}).catch((t) =>
|
|
2160
|
+
f.request(qr(`/items/${e.collection}/${e.item_id}`)).then(() => {
|
|
2161
|
+
P.success("Moved to trash"), y.invalidateQueries({ queryKey: ["queue-items", l] });
|
|
2162
|
+
}).catch((t) => P.error($t(t, "Delete failed")));
|
|
2152
2163
|
},
|
|
2153
2164
|
onAfterTransition: () => void y.invalidateQueries({ queryKey: ["queue-items", l] }),
|
|
2154
2165
|
bulkEnabledKeys: (p == null ? void 0 : p.bulk_action_keys) ?? null,
|
|
2155
2166
|
disabled: X
|
|
2156
2167
|
}
|
|
2157
2168
|
) })
|
|
2158
|
-
},
|
|
2169
|
+
}, Rr = (e) => typeof e.header == "string" ? e.header : e.key, ho = (e) => e.map((t, n) => {
|
|
2159
2170
|
const r = A(`extra.${t.field}`, Ue(t.field));
|
|
2160
2171
|
return `${n === 0 ? t.sign < 0 ? "− " : "" : t.sign < 0 ? " − " : " + "}${r}`;
|
|
2161
|
-
}).join(""),
|
|
2172
|
+
}).join(""), Qs = (e) => {
|
|
2162
2173
|
if (C !== "table" || ie) return e;
|
|
2163
2174
|
const t = Mt(e.key);
|
|
2164
2175
|
if (!t) return e;
|
|
2165
|
-
const n = (o) =>
|
|
2166
|
-
fn:
|
|
2176
|
+
const n = (o) => fl(e.key, o), r = t.kind === "none" ? { fn: null, onChange: n, unavailable: t.why } : t.kind === "derived" ? {
|
|
2177
|
+
fn: ct[e.key] === "sum" ? "sum" : null,
|
|
2167
2178
|
onChange: n,
|
|
2168
2179
|
only: ["sum"],
|
|
2169
2180
|
note: `Sum only: worked out as ${ho(t.terms)}.`
|
|
2170
|
-
} : { fn:
|
|
2181
|
+
} : { fn: ct[e.key] ?? null, onChange: n };
|
|
2171
2182
|
return {
|
|
2172
2183
|
...e,
|
|
2173
|
-
headerMenu: /* @__PURE__ */ a(
|
|
2184
|
+
headerMenu: /* @__PURE__ */ a(dd, { label: Rr(e), selectedCount: 0, totals: r })
|
|
2174
2185
|
};
|
|
2175
2186
|
}, et = [
|
|
2176
|
-
|
|
2177
|
-
...an.filter((e) => oe.has(e)).map((e) =>
|
|
2178
|
-
...Te ? [
|
|
2179
|
-
|
|
2180
|
-
], yo = Gt && !!(
|
|
2187
|
+
Ds,
|
|
2188
|
+
...an.filter((e) => oe.has(e)).map((e) => $r.find((t) => t.key === e)).filter((e) => e !== void 0).map(Qs),
|
|
2189
|
+
...Te ? [ks] : [],
|
|
2190
|
+
Bs
|
|
2191
|
+
], yo = Gt && !!(ae != null && ae.totals), Ln = yo ? { ...i == null ? void 0 : i.totals, ...ae == null ? void 0 : ae.totals } : i == null ? void 0 : i.totals, go = yo ? (ae == null ? void 0 : ae.totals_partial) === !0 : (i == null ? void 0 : i.totals_partial) === !0, js = (() => {
|
|
2181
2192
|
var n;
|
|
2182
2193
|
if (!la) return;
|
|
2183
2194
|
const e = {};
|
|
2184
2195
|
let t = !1;
|
|
2185
2196
|
for (const r of et) {
|
|
2186
|
-
if (!
|
|
2187
|
-
const o = Mt(r.key), c =
|
|
2197
|
+
if (!mt.includes(r.key)) continue;
|
|
2198
|
+
const o = Mt(r.key), c = ct[r.key];
|
|
2188
2199
|
if (!o || o.kind === "none" || !c) continue;
|
|
2189
2200
|
t = !0;
|
|
2190
|
-
const u =
|
|
2201
|
+
const u = uu(Ln, o, c), m = r.key.startsWith("formula.") ? ((p == null ? void 0 : p.formula_columns) ?? []).find((Z) => `formula.${Z.key}` === r.key) : null, h = m ? mu(m.format) : ye(r.key.slice(6)), T = (Z) => al(Z, c, (h == null ? void 0 : h.type) === "number" ? h : null), v = { sum: "Sum", avg: "Avg", min: "Min", max: "Max", count: "Count" }[c], $ = u === void 0, w = $ ? void 0 : pu({
|
|
2191
2202
|
fn: c,
|
|
2192
|
-
label:
|
|
2203
|
+
label: Rr(r),
|
|
2193
2204
|
rows: (i == null ? void 0 : i.total) ?? null,
|
|
2194
|
-
byCollection: o.kind === "server" ? (n =
|
|
2205
|
+
byCollection: o.kind === "server" ? (n = Ln == null ? void 0 : Ln[o.path]) == null ? void 0 : n.by_collection : void 0,
|
|
2195
2206
|
collectionLabel: Ie,
|
|
2196
2207
|
format: T,
|
|
2197
2208
|
partial: go,
|
|
@@ -2199,7 +2210,7 @@ function Ap({
|
|
|
2199
2210
|
});
|
|
2200
2211
|
e[r.key] = /* @__PURE__ */ d("span", { className: "inline-flex items-baseline gap-1.5", "data-tip": w, "data-queue-total": c, children: [
|
|
2201
2212
|
/* @__PURE__ */ a("span", { className: "text-[10px] font-semibold uppercase tracking-wide text-slate-400 dark:text-slate-500", children: v }),
|
|
2202
|
-
$ ? /* @__PURE__ */ a(
|
|
2213
|
+
$ ? /* @__PURE__ */ a(ml, { className: "inline-block h-3 w-12 align-middle" }) : /* @__PURE__ */ d("span", { className: "text-slate-700 dark:text-slate-200", children: [
|
|
2203
2214
|
u == null ? "—" : T(u),
|
|
2204
2215
|
go ? "*" : ""
|
|
2205
2216
|
] })
|
|
@@ -2210,14 +2221,14 @@ function Ap({
|
|
|
2210
2221
|
cells: e,
|
|
2211
2222
|
label: /* @__PURE__ */ a("span", { className: "text-[10.5px] font-semibold uppercase tracking-wide text-slate-400 dark:text-slate-500", children: "Σ totals" })
|
|
2212
2223
|
};
|
|
2213
|
-
})(), on = () => Object.fromEntries(
|
|
2214
|
-
|
|
2215
|
-
const n =
|
|
2224
|
+
})(), on = () => Object.fromEntries(mt.map((e) => [e, ct[e]])), xo = (e) => {
|
|
2225
|
+
dn(e), Mn((t) => {
|
|
2226
|
+
const n = md(t, e);
|
|
2216
2227
|
return rl(En(l), n), n;
|
|
2217
2228
|
});
|
|
2218
|
-
}, [
|
|
2219
|
-
async function
|
|
2220
|
-
if (!(!s ||
|
|
2229
|
+
}, [St, ko] = N(!1);
|
|
2230
|
+
async function Us() {
|
|
2231
|
+
if (!(!s || St)) {
|
|
2221
2232
|
ko(!0);
|
|
2222
2233
|
try {
|
|
2223
2234
|
const t = [];
|
|
@@ -2226,25 +2237,25 @@ function Ap({
|
|
|
2226
2237
|
D(`/queues/${l}/items`, {
|
|
2227
2238
|
scope: b,
|
|
2228
2239
|
sort: Kr(U),
|
|
2229
|
-
filters: JSON.stringify(
|
|
2240
|
+
filters: JSON.stringify(Oe),
|
|
2230
2241
|
page: m,
|
|
2231
2242
|
limit: 100
|
|
2232
2243
|
})
|
|
2233
2244
|
), T = h.data ?? [];
|
|
2234
2245
|
if (t.push(...T), T.length < 100 || t.length >= (h.total ?? 0)) break;
|
|
2235
2246
|
}
|
|
2236
|
-
const n = (m) => (s.extra_field_meta ?? []).find((h) => h.path === m), r =
|
|
2247
|
+
const n = (m) => (s.extra_field_meta ?? []).find((h) => h.path === m), r = yu(
|
|
2237
2248
|
t.slice(0, 1e4),
|
|
2238
2249
|
et.map((m) => ({
|
|
2239
2250
|
key: m.key,
|
|
2240
2251
|
header: typeof m.header == "string" ? m.header : m.key === "label" ? "Item" : ""
|
|
2241
2252
|
})),
|
|
2242
2253
|
{
|
|
2243
|
-
stateLabel:
|
|
2254
|
+
stateLabel: Ke,
|
|
2244
2255
|
collectionLabel: Ie,
|
|
2245
2256
|
extraText: (m, h) => {
|
|
2246
2257
|
const T = ye(m);
|
|
2247
|
-
return T && T.type !== "number" ? rt(h, T) :
|
|
2258
|
+
return T && T.type !== "number" ? rt(h, T) : Qr(n(m), h);
|
|
2248
2259
|
},
|
|
2249
2260
|
extraIsNumber: (m) => {
|
|
2250
2261
|
var h;
|
|
@@ -2252,11 +2263,11 @@ function Ap({
|
|
|
2252
2263
|
}
|
|
2253
2264
|
}
|
|
2254
2265
|
), o = new Blob([r], { type: "text/csv;charset=utf-8" }), c = URL.createObjectURL(o), u = document.createElement("a");
|
|
2255
|
-
u.href = c, u.download =
|
|
2266
|
+
u.href = c, u.download = gu(s.name), document.body.appendChild(u), u.click(), u.remove(), setTimeout(() => URL.revokeObjectURL(c), 1e3), P.success(
|
|
2256
2267
|
t.length >= 1e4 ? `Exported the first ${1e4.toLocaleString("en-US")} rows` : `Exported ${t.length.toLocaleString("en-US")} ${t.length === 1 ? "row" : "rows"}`
|
|
2257
2268
|
);
|
|
2258
2269
|
} catch (e) {
|
|
2259
|
-
|
|
2270
|
+
P.error($t(e, "Could not export this worklist"));
|
|
2260
2271
|
} finally {
|
|
2261
2272
|
ko(!1);
|
|
2262
2273
|
}
|
|
@@ -2264,9 +2275,9 @@ function Ap({
|
|
|
2264
2275
|
}
|
|
2265
2276
|
const vo = W(() => {
|
|
2266
2277
|
var r;
|
|
2267
|
-
const e = p == null ? void 0 : p.default_pins, t =
|
|
2278
|
+
const e = p == null ? void 0 : p.default_pins, t = it ?? (e && Object.keys(e).length > 0 ? e : { [((r = et[0]) == null ? void 0 : r.key) ?? "label"]: "left" }), n = new Set(et.map((o) => o.key));
|
|
2268
2279
|
return Object.fromEntries(Object.entries(t).filter(([o]) => n.has(o)));
|
|
2269
|
-
}, [
|
|
2280
|
+
}, [it, p == null ? void 0 : p.default_pins, et.map((e) => e.key).join("|")]), wo = [
|
|
2270
2281
|
{ value: "state", label: "State" },
|
|
2271
2282
|
{ value: "collection", label: "Collection" },
|
|
2272
2283
|
{ value: "sla_status", label: "SLA status" },
|
|
@@ -2287,9 +2298,9 @@ function Ap({
|
|
|
2287
2298
|
const te = Fn.get(Se);
|
|
2288
2299
|
!(te != null && te.target_collection) || !te.display_field || o.some((An) => An.collection === te.target_collection) || c.push({ collection: te.target_collection, field: te.display_field, values: ue });
|
|
2289
2300
|
}
|
|
2290
|
-
const u = [...o, ...c], m = u.length ?
|
|
2301
|
+
const u = [...o, ...c], m = u.length ? Ac(
|
|
2291
2302
|
e.target_collection,
|
|
2292
|
-
await
|
|
2303
|
+
await qc(f, y, e.target_collection),
|
|
2293
2304
|
u
|
|
2294
2305
|
) : null, h = [
|
|
2295
2306
|
...t.trim() ? [{ [e.display_field]: { _contains: t.trim() } }] : [],
|
|
@@ -2329,7 +2340,7 @@ function Ap({
|
|
|
2329
2340
|
).map((e) => {
|
|
2330
2341
|
var t;
|
|
2331
2342
|
return {
|
|
2332
|
-
label:
|
|
2343
|
+
label: Ke(e),
|
|
2333
2344
|
value: e,
|
|
2334
2345
|
// How many rows sit in it under the other active filters (the State
|
|
2335
2346
|
// filter itself left out, or every other state would read 0).
|
|
@@ -2370,7 +2381,7 @@ function Ap({
|
|
|
2370
2381
|
type: "range",
|
|
2371
2382
|
range_unit: "h"
|
|
2372
2383
|
},
|
|
2373
|
-
...
|
|
2384
|
+
...xt ? [
|
|
2374
2385
|
{
|
|
2375
2386
|
key: "addendums",
|
|
2376
2387
|
placeholder: "Addendums",
|
|
@@ -2388,7 +2399,7 @@ function Ap({
|
|
|
2388
2399
|
key: "integrations",
|
|
2389
2400
|
placeholder: A("integrations", "Integrations"),
|
|
2390
2401
|
type: "select",
|
|
2391
|
-
options:
|
|
2402
|
+
options: _d.map((e) => ({ label: e.label, value: e.value }))
|
|
2392
2403
|
}
|
|
2393
2404
|
] : [],
|
|
2394
2405
|
...Ut ? [
|
|
@@ -2396,7 +2407,7 @@ function Ap({
|
|
|
2396
2407
|
key: "fulfilment",
|
|
2397
2408
|
placeholder: "Shipped",
|
|
2398
2409
|
type: "select",
|
|
2399
|
-
options:
|
|
2410
|
+
options: xd
|
|
2400
2411
|
}
|
|
2401
2412
|
] : [],
|
|
2402
2413
|
...Vt ? [
|
|
@@ -2463,7 +2474,7 @@ function Ap({
|
|
|
2463
2474
|
// not only on an empty one (army 11 Q2-1).
|
|
2464
2475
|
restricted: !!((m = Re[e]) != null && m.length),
|
|
2465
2476
|
options: c.map((T) => ({
|
|
2466
|
-
label: o ? rt(T, o) :
|
|
2477
|
+
label: o ? rt(T, o) : Qr(t, T),
|
|
2467
2478
|
value: T
|
|
2468
2479
|
}))
|
|
2469
2480
|
} : (t == null ? void 0 : t.kind) === "relation" ? {
|
|
@@ -2474,17 +2485,17 @@ function Ap({
|
|
|
2474
2485
|
loadOptions: _o(t)
|
|
2475
2486
|
} : { ...r, placeholder: `Search ${n}…`, type: "text" };
|
|
2476
2487
|
})
|
|
2477
|
-
],
|
|
2488
|
+
], Tr = tt.filter(
|
|
2478
2489
|
(e) => oe.has(e.key) || e.key === "label" || e.key === "owners"
|
|
2479
2490
|
), Or = (e) => {
|
|
2480
2491
|
var t;
|
|
2481
2492
|
return (((t = tt.find((n) => n.key === e)) == null ? void 0 : t.placeholder) ?? e).replace(/^Search\s+/, "").replace(/…$/, "");
|
|
2482
|
-
},
|
|
2493
|
+
}, Lr = (() => {
|
|
2483
2494
|
var n, r;
|
|
2484
2495
|
const e = [];
|
|
2485
2496
|
for (const [o, c] of Object.entries(ve)) {
|
|
2486
2497
|
if (!c || Array.isArray(c) && c.length === 0) continue;
|
|
2487
|
-
const u = tt.find((v) => v.key === o), m = o.startsWith("extra.") ? o.slice(6) : null, h = m ? ye(m) : null, T =
|
|
2498
|
+
const u = tt.find((v) => v.key === o), m = o.startsWith("extra.") ? o.slice(6) : null, h = m ? ye(m) : null, T = Bi({
|
|
2488
2499
|
field: Or(o),
|
|
2489
2500
|
type: (u == null ? void 0 : u.type) ?? "select",
|
|
2490
2501
|
value: c,
|
|
@@ -2498,7 +2509,7 @@ function Ap({
|
|
|
2498
2509
|
T && e.push(T);
|
|
2499
2510
|
}
|
|
2500
2511
|
const t = i == null ? void 0 : i.total;
|
|
2501
|
-
return
|
|
2512
|
+
return Qi({
|
|
2502
2513
|
noun: "items",
|
|
2503
2514
|
scope: b === "mine" ? "you own" : b === "unowned" ? "with no owners" : b === "claimed" ? "you claimed" : null,
|
|
2504
2515
|
viewName: ((r = (n = E == null ? void 0 : E.data) == null ? void 0 : n.find((o) => o.id === fe)) == null ? void 0 : r.name) ?? null,
|
|
@@ -2506,7 +2517,7 @@ function Ap({
|
|
|
2506
2517
|
shown: typeof t == "number" ? t : null,
|
|
2507
2518
|
of: (g == null ? void 0 : g.total) ?? null
|
|
2508
2519
|
});
|
|
2509
|
-
})(), ln = new Set(Object.keys(ke.current)),
|
|
2520
|
+
})(), ln = new Set(Object.keys(ke.current)), Vs = ((e) => {
|
|
2510
2521
|
var n;
|
|
2511
2522
|
if (e.some((r) => r.key === "state")) return e;
|
|
2512
2523
|
const t = tt.find((r) => r.key === "state");
|
|
@@ -2529,7 +2540,7 @@ function Ap({
|
|
|
2529
2540
|
cascade: w,
|
|
2530
2541
|
restricted: !!((de = Re[u]) != null && de.length),
|
|
2531
2542
|
options: v.map((ue) => ({
|
|
2532
|
-
label: T && T.type !== "number" ? rt(ue, T) :
|
|
2543
|
+
label: T && T.type !== "number" ? rt(ue, T) : Qr(m, ue),
|
|
2533
2544
|
value: ue
|
|
2534
2545
|
}))
|
|
2535
2546
|
} : (m == null ? void 0 : m.kind) === "relation" ? {
|
|
@@ -2564,13 +2575,13 @@ function Ap({
|
|
|
2564
2575
|
m && !u.has(m.key) && (ln.has(m.key) || m.restricted) && c.push(m);
|
|
2565
2576
|
if (c.length > 0) return c;
|
|
2566
2577
|
}
|
|
2567
|
-
const t =
|
|
2578
|
+
const t = Tr.map(e).filter((c) => c !== null), r = [
|
|
2568
2579
|
...t.filter((c) => ln.has(c.key) || c.restricted),
|
|
2569
2580
|
...t.filter((c) => !ln.has(c.key) && !c.restricted)
|
|
2570
2581
|
].slice(0, 6);
|
|
2571
|
-
return r.length > 0 ? r :
|
|
2582
|
+
return r.length > 0 ? r : Tr.filter((c) => c.key === "state" || c.key === "owners");
|
|
2572
2583
|
})()
|
|
2573
|
-
),
|
|
2584
|
+
), Gs = (g == null ? void 0 : g.sla_tracked) !== 0 || x.sla_status === "warning" || x.sla_status === "breached", Ws = (() => {
|
|
2574
2585
|
if (!g) return null;
|
|
2575
2586
|
const e = J ?? g, t = [
|
|
2576
2587
|
{
|
|
@@ -2579,7 +2590,7 @@ function Ap({
|
|
|
2579
2590
|
label: "past SLA",
|
|
2580
2591
|
tone: "text-red-600 dark:text-red-400",
|
|
2581
2592
|
on: x.sla_status === "breached",
|
|
2582
|
-
toggle: () =>
|
|
2593
|
+
toggle: () => pt("sla_status", "breached")
|
|
2583
2594
|
},
|
|
2584
2595
|
{
|
|
2585
2596
|
key: "warning",
|
|
@@ -2587,7 +2598,7 @@ function Ap({
|
|
|
2587
2598
|
label: "SLA soon",
|
|
2588
2599
|
tone: "text-amber-700 dark:text-amber-400",
|
|
2589
2600
|
on: x.sla_status === "warning",
|
|
2590
|
-
toggle: () =>
|
|
2601
|
+
toggle: () => pt("sla_status", "warning")
|
|
2591
2602
|
},
|
|
2592
2603
|
{
|
|
2593
2604
|
key: "at_risk",
|
|
@@ -2595,7 +2606,7 @@ function Ap({
|
|
|
2595
2606
|
label: "at risk",
|
|
2596
2607
|
tone: "text-red-600 dark:text-red-400",
|
|
2597
2608
|
on: x.at_risk === "yes",
|
|
2598
|
-
toggle: () =>
|
|
2609
|
+
toggle: () => pt("at_risk", "yes")
|
|
2599
2610
|
},
|
|
2600
2611
|
{
|
|
2601
2612
|
key: "unowned",
|
|
@@ -2604,7 +2615,7 @@ function Ap({
|
|
|
2604
2615
|
tone: "text-slate-600 dark:text-slate-300",
|
|
2605
2616
|
on: b === "unowned",
|
|
2606
2617
|
toggle: () => {
|
|
2607
|
-
me(b === "unowned" ? "all" : "unowned"),
|
|
2618
|
+
me(b === "unowned" ? "all" : "unowned"), Q(1);
|
|
2608
2619
|
}
|
|
2609
2620
|
}
|
|
2610
2621
|
].filter((n) => n.n > 0 || n.on);
|
|
@@ -2642,17 +2653,17 @@ function Ap({
|
|
|
2642
2653
|
}
|
|
2643
2654
|
);
|
|
2644
2655
|
})();
|
|
2645
|
-
function
|
|
2656
|
+
function Hs(e) {
|
|
2646
2657
|
const t = new Set(oe);
|
|
2647
2658
|
t.has(e) ? (t.delete(e), (e === "addendums" || e === "integrations") && Gr((n) => new Set(n).add(e))) : (t.add(e), (e === "addendums" || e === "integrations") && Gr((n) => {
|
|
2648
2659
|
const r = new Set(n);
|
|
2649
2660
|
return r.delete(e), r;
|
|
2650
|
-
})),
|
|
2661
|
+
})), kn([...t]);
|
|
2651
2662
|
}
|
|
2652
|
-
return
|
|
2663
|
+
return fn ? (q == null ? void 0 : q((fn == null ? void 0 : fn.status) ?? 500)) ?? null : /* @__PURE__ */ d("div", { className: "flex flex-1 min-h-0 flex-col", children: [
|
|
2653
2664
|
/* @__PURE__ */ d("div", { className: "shrink-0", children: [
|
|
2654
2665
|
(i == null ? void 0 : i.truncated) && /* @__PURE__ */ d("div", { className: "mx-4 mt-3 flex items-center gap-2 rounded-lg border border-amber-200 bg-amber-50 px-4 py-3 text-[12px] text-amber-800 dark:border-amber-900 dark:bg-amber-950/40 dark:text-amber-300", children: [
|
|
2655
|
-
/* @__PURE__ */ a(
|
|
2666
|
+
/* @__PURE__ */ a(li, { className: "h-4 w-4 shrink-0" }),
|
|
2656
2667
|
/* @__PURE__ */ a("span", { children: "This view hit the row safety limit — the table below may not include every matching item, but the totals above are exact. Narrow the filters (or clear the priority sort on a large queue) to browse everything." })
|
|
2657
2668
|
] }),
|
|
2658
2669
|
/* @__PURE__ */ d(
|
|
@@ -2661,13 +2672,13 @@ function Ap({
|
|
|
2661
2672
|
className: "flex flex-wrap items-center gap-2 border-b border-slate-200 bg-white px-4 py-2.5 dark:border-slate-700 dark:bg-slate-900",
|
|
2662
2673
|
"data-queue-toolbar": !0,
|
|
2663
2674
|
children: [
|
|
2664
|
-
G ? /* @__PURE__ */ a("div", { className: "flex overflow-hidden rounded-md border border-slate-200 dark:border-border", children:
|
|
2675
|
+
G ? /* @__PURE__ */ a("div", { className: "flex overflow-hidden rounded-md border border-slate-200 dark:border-border", children: jr.filter((e) => Te || e.value !== "claimed").map(
|
|
2665
2676
|
(e, t) => /* @__PURE__ */ a(
|
|
2666
2677
|
"button",
|
|
2667
2678
|
{
|
|
2668
2679
|
type: "button",
|
|
2669
2680
|
onClick: () => {
|
|
2670
|
-
me(e.value),
|
|
2681
|
+
me(e.value), Q(1);
|
|
2671
2682
|
},
|
|
2672
2683
|
className: F(
|
|
2673
2684
|
"flex h-8 items-center px-3 text-[12px] font-medium transition-colors",
|
|
@@ -2689,7 +2700,7 @@ function Ap({
|
|
|
2689
2700
|
"button",
|
|
2690
2701
|
{
|
|
2691
2702
|
type: "button",
|
|
2692
|
-
onClick: () =>
|
|
2703
|
+
onClick: () => lt(e.value),
|
|
2693
2704
|
className: F(
|
|
2694
2705
|
"flex h-8 items-center px-3 text-[12px] font-medium transition-colors",
|
|
2695
2706
|
t > 0 && "border-l border-slate-200 dark:border-border",
|
|
@@ -2700,16 +2711,16 @@ function Ap({
|
|
|
2700
2711
|
e.value
|
|
2701
2712
|
)) })
|
|
2702
2713
|
) : /* @__PURE__ */ a("div", { className: "h-8 w-40 animate-pulse rounded-md bg-slate-100 dark:bg-[hsl(var(--nvr-skeleton))]" }),
|
|
2703
|
-
/* @__PURE__ */ a(
|
|
2704
|
-
Bn > 0 && !
|
|
2714
|
+
/* @__PURE__ */ a(Md, { className: "h-8" }),
|
|
2715
|
+
Bn > 0 && !Pt.label && /* @__PURE__ */ d(
|
|
2705
2716
|
"button",
|
|
2706
2717
|
{
|
|
2707
2718
|
type: "button",
|
|
2708
2719
|
onClick: Ra,
|
|
2709
2720
|
className: "nvr-pop-in flex h-8 items-center gap-1 rounded-full border border-nvr-cyan/40 bg-nvr-cyan/[0.08] px-2.5 text-[12px] font-medium transition-colors text-nvr-navy hover:bg-nvr-cyan/20 dark:text-nvr-cyan",
|
|
2710
2721
|
children: [
|
|
2711
|
-
/* @__PURE__ */ a(
|
|
2712
|
-
Bn,
|
|
2722
|
+
/* @__PURE__ */ a(si, { className: "h-3 w-3" }),
|
|
2723
|
+
ne(Bn),
|
|
2713
2724
|
" update",
|
|
2714
2725
|
Bn === 1 ? "" : "s",
|
|
2715
2726
|
" · Refresh"
|
|
@@ -2717,7 +2728,7 @@ function Ap({
|
|
|
2717
2728
|
}
|
|
2718
2729
|
),
|
|
2719
2730
|
/* @__PURE__ */ a(
|
|
2720
|
-
|
|
2731
|
+
Ed,
|
|
2721
2732
|
{
|
|
2722
2733
|
leadMinWidth: "siblings",
|
|
2723
2734
|
moreLabel: "More queue actions",
|
|
@@ -2747,7 +2758,7 @@ function Ap({
|
|
|
2747
2758
|
}
|
|
2748
2759
|
)
|
|
2749
2760
|
},
|
|
2750
|
-
...
|
|
2761
|
+
...xt ? [
|
|
2751
2762
|
{
|
|
2752
2763
|
key: "addendums",
|
|
2753
2764
|
kind: "filter",
|
|
@@ -2765,7 +2776,7 @@ function Ap({
|
|
|
2765
2776
|
}),
|
|
2766
2777
|
className: `flex h-8 items-center gap-1.5 rounded-full border px-2.5 text-[12px] font-medium transition-colors ${x.addendums === "active" ? "border-amber-400 bg-amber-50 text-amber-800 dark:border-amber-500/60 dark:bg-amber-500/10 dark:text-amber-300" : "border-slate-200 bg-white text-slate-600 hover:border-slate-300 dark:border-border dark:bg-card dark:text-slate-300"}`,
|
|
2767
2778
|
children: [
|
|
2768
|
-
/* @__PURE__ */ a(
|
|
2779
|
+
/* @__PURE__ */ a(ii, { className: "h-3.5 w-3.5" }),
|
|
2769
2780
|
"Active addendums"
|
|
2770
2781
|
]
|
|
2771
2782
|
}
|
|
@@ -2779,7 +2790,7 @@ function Ap({
|
|
|
2779
2790
|
priority: x.integrations ? 90 : 38,
|
|
2780
2791
|
active: !!x.integrations,
|
|
2781
2792
|
node: /* @__PURE__ */ a(
|
|
2782
|
-
|
|
2793
|
+
Nd,
|
|
2783
2794
|
{
|
|
2784
2795
|
label: A("integrations", "Integrations"),
|
|
2785
2796
|
value: x.integrations,
|
|
@@ -2791,18 +2802,18 @@ function Ap({
|
|
|
2791
2802
|
)
|
|
2792
2803
|
}
|
|
2793
2804
|
] : [],
|
|
2794
|
-
{ key: "focus", priority: 30, label: "Focus mode", node: /* @__PURE__ */ a(
|
|
2795
|
-
...(
|
|
2805
|
+
{ key: "focus", priority: 30, label: "Focus mode", node: /* @__PURE__ */ a(yd, {}) },
|
|
2806
|
+
...(dt || S) && l ? [
|
|
2796
2807
|
{
|
|
2797
2808
|
key: "live-pause",
|
|
2798
|
-
priority:
|
|
2799
|
-
active:
|
|
2809
|
+
priority: Pe.paused ? 90 : 45,
|
|
2810
|
+
active: Pe.paused,
|
|
2800
2811
|
node: /* @__PURE__ */ a(
|
|
2801
|
-
|
|
2812
|
+
Rd,
|
|
2802
2813
|
{
|
|
2803
|
-
paused:
|
|
2804
|
-
held:
|
|
2805
|
-
onToggle:
|
|
2814
|
+
paused: Pe.paused,
|
|
2815
|
+
held: Pe.held,
|
|
2816
|
+
onToggle: Pe.toggle
|
|
2806
2817
|
}
|
|
2807
2818
|
)
|
|
2808
2819
|
}
|
|
@@ -2812,8 +2823,8 @@ function Ap({
|
|
|
2812
2823
|
key: "group",
|
|
2813
2824
|
priority: R ? 80 : 52,
|
|
2814
2825
|
active: !!R,
|
|
2815
|
-
node: /* @__PURE__ */ d(
|
|
2816
|
-
/* @__PURE__ */ a(
|
|
2826
|
+
node: /* @__PURE__ */ d(Rt, { children: [
|
|
2827
|
+
/* @__PURE__ */ a(Tt, { asChild: !0, children: /* @__PURE__ */ d(
|
|
2817
2828
|
"button",
|
|
2818
2829
|
{
|
|
2819
2830
|
type: "button",
|
|
@@ -2822,18 +2833,18 @@ function Ap({
|
|
|
2822
2833
|
R ? "border-nvr-cyan/40 bg-nvr-cyan/10 text-slate-900 dark:text-white" : "border-slate-200 text-slate-600 hover:bg-slate-50 dark:border-slate-700 dark:text-slate-300 dark:hover:bg-slate-800"
|
|
2823
2834
|
),
|
|
2824
2835
|
children: [
|
|
2825
|
-
/* @__PURE__ */ a(
|
|
2836
|
+
/* @__PURE__ */ a(ci, { className: "h-3.5 w-3.5" }),
|
|
2826
2837
|
R ? `Group: ${((Ao = wo.find((e) => e.value === R)) == null ? void 0 : Ao.label) ?? R}` : "Group"
|
|
2827
2838
|
]
|
|
2828
2839
|
}
|
|
2829
2840
|
) }),
|
|
2830
|
-
/* @__PURE__ */ a(
|
|
2831
|
-
/* @__PURE__ */ a(
|
|
2841
|
+
/* @__PURE__ */ a(Ot, { className: "w-[200px] p-0", align: "start", children: /* @__PURE__ */ d(sl, { children: [
|
|
2842
|
+
/* @__PURE__ */ a(Wd, { placeholder: "Group by…", className: "h-8 text-[12px]" }),
|
|
2832
2843
|
/* @__PURE__ */ d(il, { children: [
|
|
2833
|
-
/* @__PURE__ */ a(
|
|
2844
|
+
/* @__PURE__ */ a(Hd, { children: "No attribute found." }),
|
|
2834
2845
|
/* @__PURE__ */ d(sn, { value: "__none__", onSelect: () => At(null), children: [
|
|
2835
2846
|
/* @__PURE__ */ a(
|
|
2836
|
-
|
|
2847
|
+
Ar,
|
|
2837
2848
|
{
|
|
2838
2849
|
"aria-hidden": !0,
|
|
2839
2850
|
className: F(
|
|
@@ -2851,7 +2862,7 @@ function Ap({
|
|
|
2851
2862
|
onSelect: () => At(e.value),
|
|
2852
2863
|
children: [
|
|
2853
2864
|
/* @__PURE__ */ a(
|
|
2854
|
-
|
|
2865
|
+
Ar,
|
|
2855
2866
|
{
|
|
2856
2867
|
"aria-hidden": !0,
|
|
2857
2868
|
className: F(
|
|
@@ -2880,7 +2891,7 @@ function Ap({
|
|
|
2880
2891
|
{
|
|
2881
2892
|
type: "button",
|
|
2882
2893
|
onClick: () => {
|
|
2883
|
-
|
|
2894
|
+
st(U === "-priority" ? "" : "-priority"), Q(1);
|
|
2884
2895
|
},
|
|
2885
2896
|
"aria-pressed": U === "-priority",
|
|
2886
2897
|
className: F(
|
|
@@ -2888,7 +2899,7 @@ function Ap({
|
|
|
2888
2899
|
U === "-priority" ? "border-nvr-cyan/40 bg-nvr-cyan/10 text-slate-900 dark:text-white" : "border-slate-200 text-slate-600 hover:bg-slate-50 dark:border-slate-700 dark:text-slate-300 dark:hover:bg-slate-800"
|
|
2889
2900
|
),
|
|
2890
2901
|
children: [
|
|
2891
|
-
/* @__PURE__ */ a(
|
|
2902
|
+
/* @__PURE__ */ a(di, { className: "h-3.5 w-3.5" }),
|
|
2892
2903
|
"Priority"
|
|
2893
2904
|
]
|
|
2894
2905
|
}
|
|
@@ -2903,7 +2914,7 @@ function Ap({
|
|
|
2903
2914
|
"button",
|
|
2904
2915
|
{
|
|
2905
2916
|
type: "button",
|
|
2906
|
-
onClick: () =>
|
|
2917
|
+
onClick: () => Kn(
|
|
2907
2918
|
xe.size > 0 ? /* @__PURE__ */ new Set() : new Set(we.map((e) => e.key))
|
|
2908
2919
|
),
|
|
2909
2920
|
className: "flex h-8 items-center rounded-md px-2 text-[12px] text-slate-500 hover:text-slate-700 dark:text-slate-400 dark:hover:text-slate-200",
|
|
@@ -2916,8 +2927,8 @@ function Ap({
|
|
|
2916
2927
|
{
|
|
2917
2928
|
key: "lanes",
|
|
2918
2929
|
priority: 60,
|
|
2919
|
-
node: /* @__PURE__ */ d(
|
|
2920
|
-
/* @__PURE__ */ a(
|
|
2930
|
+
node: /* @__PURE__ */ d(Rt, { children: [
|
|
2931
|
+
/* @__PURE__ */ a(Tt, { asChild: !0, children: /* @__PURE__ */ d(
|
|
2921
2932
|
"button",
|
|
2922
2933
|
{
|
|
2923
2934
|
type: "button",
|
|
@@ -2926,22 +2937,22 @@ function Ap({
|
|
|
2926
2937
|
qt ? "border-nvr-cyan/40 bg-nvr-cyan/10 text-slate-900 dark:text-white" : "border-slate-200 text-slate-600 hover:bg-slate-50 dark:border-slate-700 dark:text-slate-300 dark:hover:bg-slate-800"
|
|
2927
2938
|
),
|
|
2928
2939
|
children: [
|
|
2929
|
-
/* @__PURE__ */ a(
|
|
2940
|
+
/* @__PURE__ */ a(ui, { className: "h-3.5 w-3.5" }),
|
|
2930
2941
|
qt ? `Lanes: ${qt === "collection" ? "Collection" : "Owner"}` : "Lanes"
|
|
2931
2942
|
]
|
|
2932
2943
|
}
|
|
2933
2944
|
) }),
|
|
2934
|
-
/* @__PURE__ */ a(
|
|
2935
|
-
/* @__PURE__ */ a(sn, { value: "none", onSelect: () =>
|
|
2945
|
+
/* @__PURE__ */ a(Ot, { className: "w-[180px] p-0", align: "start", children: /* @__PURE__ */ a(sl, { children: /* @__PURE__ */ d(il, { children: [
|
|
2946
|
+
/* @__PURE__ */ a(sn, { value: "none", onSelect: () => Pn(null), children: "None" }),
|
|
2936
2947
|
/* @__PURE__ */ a(
|
|
2937
2948
|
sn,
|
|
2938
2949
|
{
|
|
2939
2950
|
value: "collection",
|
|
2940
|
-
onSelect: () =>
|
|
2951
|
+
onSelect: () => Pn("collection"),
|
|
2941
2952
|
children: "Collection"
|
|
2942
2953
|
}
|
|
2943
2954
|
),
|
|
2944
|
-
/* @__PURE__ */ a(sn, { value: "owner", onSelect: () =>
|
|
2955
|
+
/* @__PURE__ */ a(sn, { value: "owner", onSelect: () => Pn("owners"), children: "Owner" })
|
|
2945
2956
|
] }) }) })
|
|
2946
2957
|
] })
|
|
2947
2958
|
}
|
|
@@ -2959,7 +2970,7 @@ function Ap({
|
|
|
2959
2970
|
className: "flex h-8 items-center gap-1 rounded-md border border-slate-200 px-2.5 text-[12px] font-medium text-slate-600 hover:bg-slate-50 dark:border-slate-700 dark:text-slate-300 dark:hover:bg-slate-800",
|
|
2960
2971
|
"data-queue-ask": !0,
|
|
2961
2972
|
children: [
|
|
2962
|
-
/* @__PURE__ */ a(
|
|
2973
|
+
/* @__PURE__ */ a(mi, { className: "h-3.5 w-3.5 text-nvr-cyan" }),
|
|
2963
2974
|
"Ask about this queue"
|
|
2964
2975
|
]
|
|
2965
2976
|
}
|
|
@@ -2970,20 +2981,20 @@ function Ap({
|
|
|
2970
2981
|
key: "copy-link",
|
|
2971
2982
|
priority: 25,
|
|
2972
2983
|
label: "Copy link",
|
|
2973
|
-
node: /* @__PURE__ */ a(
|
|
2984
|
+
node: /* @__PURE__ */ a(Fd, { listKey: `queue:${l}`, getState: hr })
|
|
2974
2985
|
},
|
|
2975
2986
|
{
|
|
2976
2987
|
key: "send-view",
|
|
2977
2988
|
priority: 20,
|
|
2978
2989
|
label: "Send this view",
|
|
2979
2990
|
node: /* @__PURE__ */ a(
|
|
2980
|
-
|
|
2991
|
+
Ud,
|
|
2981
2992
|
{
|
|
2982
|
-
getView: () =>
|
|
2993
|
+
getView: () => Uc(
|
|
2983
2994
|
"queue",
|
|
2984
2995
|
l,
|
|
2985
2996
|
`queue:${l}`,
|
|
2986
|
-
|
|
2997
|
+
hr(),
|
|
2987
2998
|
Ia()
|
|
2988
2999
|
),
|
|
2989
3000
|
describe: () => {
|
|
@@ -2997,20 +3008,20 @@ function Ap({
|
|
|
2997
3008
|
{
|
|
2998
3009
|
key: "export",
|
|
2999
3010
|
priority: 65,
|
|
3000
|
-
active:
|
|
3011
|
+
active: St,
|
|
3001
3012
|
node: /* @__PURE__ */ d(
|
|
3002
3013
|
"button",
|
|
3003
3014
|
{
|
|
3004
3015
|
type: "button",
|
|
3005
|
-
onClick: () => void
|
|
3006
|
-
disabled:
|
|
3016
|
+
onClick: () => void Us(),
|
|
3017
|
+
disabled: St || !i || (i.total ?? 0) === 0,
|
|
3007
3018
|
"data-tip": "Download the rows on this tab, with these filters and columns, as a spreadsheet (CSV)",
|
|
3008
|
-
"aria-label":
|
|
3009
|
-
"aria-busy":
|
|
3019
|
+
"aria-label": St ? "Exporting to CSV" : "Export to CSV",
|
|
3020
|
+
"aria-busy": St || void 0,
|
|
3010
3021
|
className: "flex h-8 items-center gap-1 rounded-md border border-slate-200 px-2.5 text-[12px] font-medium text-slate-600 hover:bg-slate-50 disabled:cursor-not-allowed disabled:opacity-50 dark:border-slate-700 dark:text-slate-300 dark:hover:bg-slate-800",
|
|
3011
3022
|
"data-queue-export": !0,
|
|
3012
3023
|
children: [
|
|
3013
|
-
|
|
3024
|
+
St ? /* @__PURE__ */ a(Go, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ a(pi, { className: "h-3.5 w-3.5" }),
|
|
3014
3025
|
"Export"
|
|
3015
3026
|
]
|
|
3016
3027
|
}
|
|
@@ -3025,7 +3036,7 @@ function Ap({
|
|
|
3025
3036
|
"button",
|
|
3026
3037
|
{
|
|
3027
3038
|
type: "button",
|
|
3028
|
-
onClick: () =>
|
|
3039
|
+
onClick: () => Cl((e) => !e),
|
|
3029
3040
|
"aria-expanded": We,
|
|
3030
3041
|
title: "Trends, aging, pace and states",
|
|
3031
3042
|
className: F(
|
|
@@ -3034,7 +3045,7 @@ function Ap({
|
|
|
3034
3045
|
),
|
|
3035
3046
|
"data-queue-insights-toggle": !0,
|
|
3036
3047
|
children: [
|
|
3037
|
-
/* @__PURE__ */ a(
|
|
3048
|
+
/* @__PURE__ */ a(fi, { className: "h-3.5 w-3.5" }),
|
|
3038
3049
|
"Insights"
|
|
3039
3050
|
]
|
|
3040
3051
|
}
|
|
@@ -3044,45 +3055,45 @@ function Ap({
|
|
|
3044
3055
|
{
|
|
3045
3056
|
key: "columns",
|
|
3046
3057
|
priority: 62,
|
|
3047
|
-
node: /* @__PURE__ */ d(
|
|
3048
|
-
/* @__PURE__ */ a(
|
|
3058
|
+
node: /* @__PURE__ */ d(Rt, { children: [
|
|
3059
|
+
/* @__PURE__ */ a(Tt, { asChild: !0, children: /* @__PURE__ */ d(
|
|
3049
3060
|
"button",
|
|
3050
3061
|
{
|
|
3051
3062
|
type: "button",
|
|
3052
3063
|
className: "flex h-8 items-center gap-1 rounded-md border border-slate-200 px-2.5 text-[12px] font-medium text-slate-600 hover:bg-slate-50 dark:border-slate-700 dark:text-slate-300 dark:hover:bg-slate-800",
|
|
3053
3064
|
children: [
|
|
3054
|
-
/* @__PURE__ */ a(
|
|
3065
|
+
/* @__PURE__ */ a(bi, { className: "h-3.5 w-3.5" }),
|
|
3055
3066
|
"Columns"
|
|
3056
3067
|
]
|
|
3057
3068
|
}
|
|
3058
3069
|
) }),
|
|
3059
3070
|
/* @__PURE__ */ a(
|
|
3060
|
-
|
|
3071
|
+
Ot,
|
|
3061
3072
|
{
|
|
3062
3073
|
className: "max-h-[var(--radix-popover-content-available-height)] w-[min(240px,calc(100vw-2rem))] overflow-y-auto overscroll-contain p-2",
|
|
3063
3074
|
align: "end",
|
|
3064
3075
|
collisionPadding: 16,
|
|
3065
3076
|
"data-queue-columns-chooser": "",
|
|
3066
3077
|
children: /* @__PURE__ */ a(
|
|
3067
|
-
|
|
3078
|
+
Xs,
|
|
3068
3079
|
{
|
|
3069
|
-
sensors:
|
|
3070
|
-
collisionDetection:
|
|
3080
|
+
sensors: Ks,
|
|
3081
|
+
collisionDetection: Zs,
|
|
3071
3082
|
onDragEnd: Ps,
|
|
3072
3083
|
children: /* @__PURE__ */ a(
|
|
3073
|
-
|
|
3084
|
+
ei,
|
|
3074
3085
|
{
|
|
3075
3086
|
items: bo,
|
|
3076
|
-
strategy:
|
|
3087
|
+
strategy: ti,
|
|
3077
3088
|
children: /* @__PURE__ */ a("div", { className: "space-y-1.5", children: bo.map((e) => {
|
|
3078
|
-
const t =
|
|
3089
|
+
const t = $r.find((n) => n.key === e);
|
|
3079
3090
|
return /* @__PURE__ */ a(
|
|
3080
|
-
|
|
3091
|
+
Ou,
|
|
3081
3092
|
{
|
|
3082
3093
|
id: e,
|
|
3083
3094
|
label: typeof (t == null ? void 0 : t.header) == "string" ? t.header : e,
|
|
3084
3095
|
checked: oe.has(e),
|
|
3085
|
-
onCheckedChange: () =>
|
|
3096
|
+
onCheckedChange: () => Hs(e)
|
|
3086
3097
|
},
|
|
3087
3098
|
e
|
|
3088
3099
|
);
|
|
@@ -3096,7 +3107,7 @@ function Ap({
|
|
|
3096
3107
|
] })
|
|
3097
3108
|
}
|
|
3098
3109
|
] : [],
|
|
3099
|
-
...C === "table" &&
|
|
3110
|
+
...C === "table" && yn ? [
|
|
3100
3111
|
{
|
|
3101
3112
|
key: "bulk",
|
|
3102
3113
|
priority: X ? 95 : 58,
|
|
@@ -3105,13 +3116,13 @@ function Ap({
|
|
|
3105
3116
|
"button",
|
|
3106
3117
|
{
|
|
3107
3118
|
type: "button",
|
|
3108
|
-
onClick:
|
|
3119
|
+
onClick: ds,
|
|
3109
3120
|
"aria-pressed": X,
|
|
3110
3121
|
"data-queue-bulk-mode": X ? "on" : "off",
|
|
3111
3122
|
"data-tip": X ? "Leave bulk mode — clears the selection and turns row actions back on" : "Select rows to act on several at once",
|
|
3112
3123
|
className: `flex h-8 items-center gap-1.5 rounded-md border px-2.5 text-[12px] font-medium shadow-sm ${X ? "border-nvr-cyan bg-nvr-cyan/10 text-slate-800 dark:text-slate-100" : "border-slate-200 bg-white text-slate-500 hover:bg-slate-50 hover:text-slate-700 dark:border-border dark:bg-card dark:text-slate-400 dark:hover:bg-muted"}`,
|
|
3113
3124
|
children: [
|
|
3114
|
-
/* @__PURE__ */ a(
|
|
3125
|
+
/* @__PURE__ */ a(hi, { className: "h-3.5 w-3.5" }),
|
|
3115
3126
|
X ? "Done" : "Bulk select"
|
|
3116
3127
|
]
|
|
3117
3128
|
}
|
|
@@ -3122,23 +3133,23 @@ function Ap({
|
|
|
3122
3133
|
{
|
|
3123
3134
|
key: "density",
|
|
3124
3135
|
priority: 22,
|
|
3125
|
-
label:
|
|
3136
|
+
label: Lt === "compact" ? "Comfortable rows" : "Compact rows",
|
|
3126
3137
|
node: /* @__PURE__ */ a(
|
|
3127
3138
|
"button",
|
|
3128
3139
|
{
|
|
3129
3140
|
type: "button",
|
|
3130
3141
|
onClick: () => {
|
|
3131
|
-
|
|
3142
|
+
pl(Lt === "compact" ? "comfortable" : "compact");
|
|
3132
3143
|
},
|
|
3133
3144
|
"aria-label": "Row density",
|
|
3134
|
-
title:
|
|
3145
|
+
title: Lt === "compact" ? "Switch to comfortable rows" : "Switch to compact rows",
|
|
3135
3146
|
className: "flex h-8 w-8 items-center justify-center rounded-md border border-slate-200 bg-white text-slate-500 shadow-sm hover:bg-slate-50 hover:text-slate-700 dark:border-border dark:bg-card dark:text-slate-400 dark:hover:bg-muted",
|
|
3136
|
-
children:
|
|
3147
|
+
children: Lt === "compact" ? /* @__PURE__ */ a(yi, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ a(gi, { className: "h-3.5 w-3.5" })
|
|
3137
3148
|
}
|
|
3138
3149
|
)
|
|
3139
3150
|
}
|
|
3140
3151
|
] : [],
|
|
3141
|
-
...C === "table" &&
|
|
3152
|
+
...C === "table" && gl && _e.length > 0 ? [
|
|
3142
3153
|
{
|
|
3143
3154
|
key: "work-next",
|
|
3144
3155
|
priority: 70,
|
|
@@ -3146,10 +3157,10 @@ function Ap({
|
|
|
3146
3157
|
"button",
|
|
3147
3158
|
{
|
|
3148
3159
|
type: "button",
|
|
3149
|
-
onClick: () =>
|
|
3160
|
+
onClick: () => Qa(),
|
|
3150
3161
|
className: "flex h-8 items-center gap-1.5 rounded-md bg-nvr-cyan px-3 text-[12px] font-semibold text-white hover:brightness-110",
|
|
3151
3162
|
children: [
|
|
3152
|
-
/* @__PURE__ */ a(
|
|
3163
|
+
/* @__PURE__ */ a(xi, { className: "h-3 w-3 fill-current" }),
|
|
3153
3164
|
"Work Next"
|
|
3154
3165
|
]
|
|
3155
3166
|
}
|
|
@@ -3158,8 +3169,8 @@ function Ap({
|
|
|
3158
3169
|
] : []
|
|
3159
3170
|
],
|
|
3160
3171
|
trail: /* @__PURE__ */ d(Ce, { children: [
|
|
3161
|
-
!In && pe.length === 1 && (
|
|
3162
|
-
/* @__PURE__ */ a(
|
|
3172
|
+
!In && pe.length === 1 && (hn ? /* @__PURE__ */ d(Rt, { children: [
|
|
3173
|
+
/* @__PURE__ */ a(Tt, { asChild: !0, children: /* @__PURE__ */ d(
|
|
3163
3174
|
"button",
|
|
3164
3175
|
{
|
|
3165
3176
|
type: "button",
|
|
@@ -3167,17 +3178,17 @@ function Ap({
|
|
|
3167
3178
|
children: [
|
|
3168
3179
|
/* @__PURE__ */ a(qn, { className: "h-3.5 w-3.5" }),
|
|
3169
3180
|
"New ",
|
|
3170
|
-
|
|
3181
|
+
Dr(pe[0]),
|
|
3171
3182
|
/* @__PURE__ */ a(Vo, { className: "h-3 w-3 opacity-60" })
|
|
3172
3183
|
]
|
|
3173
3184
|
}
|
|
3174
3185
|
) }),
|
|
3175
|
-
/* @__PURE__ */ d(
|
|
3186
|
+
/* @__PURE__ */ d(Ot, { align: "end", className: "w-60 p-1", children: [
|
|
3176
3187
|
/* @__PURE__ */ d(
|
|
3177
3188
|
"button",
|
|
3178
3189
|
{
|
|
3179
3190
|
type: "button",
|
|
3180
|
-
onClick: () =>
|
|
3191
|
+
onClick: () => j.open({
|
|
3181
3192
|
collection: pe[0],
|
|
3182
3193
|
itemId: "new",
|
|
3183
3194
|
// Same layout the queue opens existing records with.
|
|
@@ -3185,16 +3196,16 @@ function Ap({
|
|
|
3185
3196
|
}),
|
|
3186
3197
|
className: "flex w-full items-center rounded px-2 py-1.5 text-left text-[12px] text-slate-700 hover:bg-slate-100 dark:text-slate-200 dark:hover:bg-muted",
|
|
3187
3198
|
children: [
|
|
3188
|
-
((qo =
|
|
3199
|
+
((qo = hn.active) == null ? void 0 : qo.create_label) ?? ((Eo = hn.active) == null ? void 0 : Eo.name) ?? "Default layout",
|
|
3189
3200
|
/* @__PURE__ */ a("span", { className: "ml-auto pl-3 text-[10px] text-slate-400 dark:text-slate-500", children: "default" })
|
|
3190
3201
|
]
|
|
3191
3202
|
}
|
|
3192
3203
|
),
|
|
3193
|
-
|
|
3204
|
+
hn.options.map((e) => /* @__PURE__ */ a(
|
|
3194
3205
|
"button",
|
|
3195
3206
|
{
|
|
3196
3207
|
type: "button",
|
|
3197
|
-
onClick: () =>
|
|
3208
|
+
onClick: () => j.open({
|
|
3198
3209
|
collection: pe[0],
|
|
3199
3210
|
itemId: "new",
|
|
3200
3211
|
layoutSlug: e.slug
|
|
@@ -3209,7 +3220,7 @@ function Ap({
|
|
|
3209
3220
|
"button",
|
|
3210
3221
|
{
|
|
3211
3222
|
type: "button",
|
|
3212
|
-
onClick: () =>
|
|
3223
|
+
onClick: () => j.open({
|
|
3213
3224
|
collection: pe[0],
|
|
3214
3225
|
itemId: "new",
|
|
3215
3226
|
// Open a new record on the same layout the queue opens
|
|
@@ -3220,12 +3231,12 @@ function Ap({
|
|
|
3220
3231
|
children: [
|
|
3221
3232
|
/* @__PURE__ */ a(qn, { className: "h-3.5 w-3.5" }),
|
|
3222
3233
|
"New ",
|
|
3223
|
-
|
|
3234
|
+
Dr(pe[0])
|
|
3224
3235
|
]
|
|
3225
3236
|
}
|
|
3226
3237
|
)),
|
|
3227
|
-
!In && pe.length > 1 && /* @__PURE__ */ d(
|
|
3228
|
-
/* @__PURE__ */ a(
|
|
3238
|
+
!In && pe.length > 1 && /* @__PURE__ */ d(Rt, { children: [
|
|
3239
|
+
/* @__PURE__ */ a(Tt, { asChild: !0, children: /* @__PURE__ */ d(
|
|
3229
3240
|
"button",
|
|
3230
3241
|
{
|
|
3231
3242
|
type: "button",
|
|
@@ -3237,11 +3248,11 @@ function Ap({
|
|
|
3237
3248
|
]
|
|
3238
3249
|
}
|
|
3239
3250
|
) }),
|
|
3240
|
-
/* @__PURE__ */ a(
|
|
3251
|
+
/* @__PURE__ */ a(Ot, { align: "end", className: "w-56 p-1", children: pe.map((e) => /* @__PURE__ */ d(
|
|
3241
3252
|
"button",
|
|
3242
3253
|
{
|
|
3243
3254
|
type: "button",
|
|
3244
|
-
onClick: () =>
|
|
3255
|
+
onClick: () => j.open({
|
|
3245
3256
|
collection: e,
|
|
3246
3257
|
itemId: "new",
|
|
3247
3258
|
layoutSlug: (p == null ? void 0 : p.item_layout) ?? null
|
|
@@ -3249,17 +3260,17 @@ function Ap({
|
|
|
3249
3260
|
className: "flex w-full items-center gap-2 rounded px-2 py-1.5 text-left text-[12px] text-slate-700 hover:bg-slate-100 dark:text-slate-200 dark:hover:bg-muted",
|
|
3250
3261
|
children: [
|
|
3251
3262
|
/* @__PURE__ */ a(qn, { className: "h-3 w-3 opacity-60" }),
|
|
3252
|
-
|
|
3263
|
+
Dr(e)
|
|
3253
3264
|
]
|
|
3254
3265
|
},
|
|
3255
3266
|
e
|
|
3256
3267
|
)) })
|
|
3257
3268
|
] }),
|
|
3258
|
-
!In &&
|
|
3259
|
-
|
|
3269
|
+
!In && ut && $e && /* @__PURE__ */ a(
|
|
3270
|
+
vd,
|
|
3260
3271
|
{
|
|
3261
|
-
collection:
|
|
3262
|
-
onParsed: (e, t) => $e(`/collections/${
|
|
3272
|
+
collection: ut,
|
|
3273
|
+
onParsed: (e, t) => $e(`/collections/${ut}/new`, {
|
|
3263
3274
|
state: { importResult: e, importTemplateId: t.id }
|
|
3264
3275
|
})
|
|
3265
3276
|
}
|
|
@@ -3278,74 +3289,74 @@ function Ap({
|
|
|
3278
3289
|
children: [
|
|
3279
3290
|
/* @__PURE__ */ d("div", { className: "nvr-stagger-direct flex max-w-full flex-wrap gap-px overflow-hidden rounded-lg border border-slate-200 bg-slate-200 dark:border-border dark:bg-border", children: [
|
|
3280
3291
|
/* @__PURE__ */ a(
|
|
3281
|
-
|
|
3292
|
+
cn,
|
|
3282
3293
|
{
|
|
3283
3294
|
label: "Total",
|
|
3284
3295
|
count: (g == null ? void 0 : g.total) ?? 0,
|
|
3285
3296
|
filteredCount: J ? J.total : null,
|
|
3286
|
-
active: Object.values(x).every(
|
|
3287
|
-
isLoading:
|
|
3297
|
+
active: Object.values(x).every(Nl) && b === "all",
|
|
3298
|
+
isLoading: bt,
|
|
3288
3299
|
...Jt("total"),
|
|
3289
|
-
onClick:
|
|
3300
|
+
onClick: Sl
|
|
3290
3301
|
}
|
|
3291
3302
|
),
|
|
3292
|
-
|
|
3303
|
+
Gs && /* @__PURE__ */ d(Ce, { children: [
|
|
3293
3304
|
/* @__PURE__ */ a(
|
|
3294
|
-
|
|
3305
|
+
cn,
|
|
3295
3306
|
{
|
|
3296
3307
|
label: "Warning",
|
|
3297
3308
|
count: (g == null ? void 0 : g.sla_warning) ?? 0,
|
|
3298
3309
|
filteredCount: J ? J.sla_warning : null,
|
|
3299
3310
|
tone: "amber",
|
|
3300
3311
|
active: x.sla_status === "warning",
|
|
3301
|
-
isLoading:
|
|
3312
|
+
isLoading: bt,
|
|
3302
3313
|
deltaBadIsUp: !0,
|
|
3303
3314
|
...Jt("sla_warning"),
|
|
3304
|
-
onClick: () =>
|
|
3315
|
+
onClick: () => pt("sla_status", "warning")
|
|
3305
3316
|
}
|
|
3306
3317
|
),
|
|
3307
3318
|
/* @__PURE__ */ a(
|
|
3308
|
-
|
|
3319
|
+
cn,
|
|
3309
3320
|
{
|
|
3310
3321
|
label: "Breached",
|
|
3311
3322
|
count: (g == null ? void 0 : g.sla_breached) ?? 0,
|
|
3312
3323
|
filteredCount: J ? J.sla_breached : null,
|
|
3313
3324
|
tone: "red",
|
|
3314
3325
|
active: x.sla_status === "breached",
|
|
3315
|
-
isLoading:
|
|
3326
|
+
isLoading: bt,
|
|
3316
3327
|
deltaBadIsUp: !0,
|
|
3317
3328
|
...Jt("sla_breached"),
|
|
3318
|
-
onClick: () =>
|
|
3329
|
+
onClick: () => pt("sla_status", "breached")
|
|
3319
3330
|
}
|
|
3320
3331
|
)
|
|
3321
3332
|
] }),
|
|
3322
3333
|
/* @__PURE__ */ a(
|
|
3323
|
-
|
|
3334
|
+
cn,
|
|
3324
3335
|
{
|
|
3325
3336
|
label: "At Risk",
|
|
3326
|
-
breakdown: J ?
|
|
3337
|
+
breakdown: J ? dl(J.at_risk_by_rule) : dl(g == null ? void 0 : g.at_risk_by_rule),
|
|
3327
3338
|
count: (g == null ? void 0 : g.at_risk) ?? 0,
|
|
3328
3339
|
filteredCount: J ? J.at_risk : null,
|
|
3329
3340
|
tone: "red",
|
|
3330
3341
|
active: x.at_risk === "yes",
|
|
3331
|
-
isLoading:
|
|
3342
|
+
isLoading: bt,
|
|
3332
3343
|
deltaBadIsUp: !0,
|
|
3333
3344
|
...Jt("at_risk"),
|
|
3334
|
-
onClick: () =>
|
|
3345
|
+
onClick: () => pt("at_risk", "yes")
|
|
3335
3346
|
}
|
|
3336
3347
|
),
|
|
3337
3348
|
/* @__PURE__ */ a(
|
|
3338
|
-
|
|
3349
|
+
cn,
|
|
3339
3350
|
{
|
|
3340
3351
|
label: "Unowned",
|
|
3341
3352
|
count: (g == null ? void 0 : g.unowned) ?? 0,
|
|
3342
3353
|
filteredCount: J ? J.unowned : null,
|
|
3343
3354
|
active: b === "unowned",
|
|
3344
|
-
isLoading:
|
|
3355
|
+
isLoading: bt,
|
|
3345
3356
|
deltaBadIsUp: !0,
|
|
3346
3357
|
...Jt("unowned"),
|
|
3347
3358
|
onClick: () => {
|
|
3348
|
-
me(b === "unowned" ? "all" : "unowned"),
|
|
3359
|
+
me(b === "unowned" ? "all" : "unowned"), Q(1);
|
|
3349
3360
|
}
|
|
3350
3361
|
}
|
|
3351
3362
|
)
|
|
@@ -3363,7 +3374,7 @@ function Ap({
|
|
|
3363
3374
|
V((r) => ({
|
|
3364
3375
|
...r,
|
|
3365
3376
|
aging_hours: r.aging_hours === t ? "" : t
|
|
3366
|
-
})),
|
|
3377
|
+
})), Q(1);
|
|
3367
3378
|
},
|
|
3368
3379
|
className: F(
|
|
3369
3380
|
"rounded-md border px-2 py-1 tabular-nums transition-colors",
|
|
@@ -3373,7 +3384,7 @@ function Ap({
|
|
|
3373
3384
|
children: [
|
|
3374
3385
|
e,
|
|
3375
3386
|
" · ",
|
|
3376
|
-
n
|
|
3387
|
+
ne(n)
|
|
3377
3388
|
]
|
|
3378
3389
|
},
|
|
3379
3390
|
e
|
|
@@ -3402,14 +3413,14 @@ function Ap({
|
|
|
3402
3413
|
Da.length > 0 && /* @__PURE__ */ a("div", { className: "flex min-w-0 flex-wrap items-center gap-1.5", children: Da.map(([e, t]) => {
|
|
3403
3414
|
var n;
|
|
3404
3415
|
return /* @__PURE__ */ a(
|
|
3405
|
-
|
|
3416
|
+
Tu,
|
|
3406
3417
|
{
|
|
3407
|
-
label:
|
|
3418
|
+
label: Ke(e),
|
|
3408
3419
|
count: t,
|
|
3409
3420
|
filteredCount: J ? J.by_state[e] ?? 0 : null,
|
|
3410
3421
|
color: ((n = Be[e]) == null ? void 0 : n.color) ?? null,
|
|
3411
|
-
active:
|
|
3412
|
-
onClick: () =>
|
|
3422
|
+
active: _l.includes(e),
|
|
3423
|
+
onClick: () => wl(e)
|
|
3413
3424
|
},
|
|
3414
3425
|
e
|
|
3415
3426
|
);
|
|
@@ -3418,25 +3429,25 @@ function Ap({
|
|
|
3418
3429
|
}
|
|
3419
3430
|
),
|
|
3420
3431
|
C !== "workload" && /* @__PURE__ */ a(
|
|
3421
|
-
|
|
3432
|
+
su,
|
|
3422
3433
|
{
|
|
3423
3434
|
queueId: l,
|
|
3424
3435
|
right: I ? void 0 : /* @__PURE__ */ a(ll, { kind: "queue", id: l, variant: "header" })
|
|
3425
3436
|
}
|
|
3426
3437
|
),
|
|
3427
3438
|
C !== "workload" && /* @__PURE__ */ a(
|
|
3428
|
-
|
|
3439
|
+
lu,
|
|
3429
3440
|
{
|
|
3430
|
-
defs:
|
|
3441
|
+
defs: Vs,
|
|
3431
3442
|
values: x,
|
|
3432
3443
|
seededKeys: ln,
|
|
3433
3444
|
onApply: (e) => {
|
|
3434
|
-
V((t) => ({ ...t, ...e })),
|
|
3445
|
+
V((t) => ({ ...t, ...e })), Q(1);
|
|
3435
3446
|
},
|
|
3436
3447
|
onClear: () => {
|
|
3437
|
-
V({ ...ke.current }),
|
|
3448
|
+
V({ ...ke.current }), Q(1);
|
|
3438
3449
|
},
|
|
3439
|
-
right:
|
|
3450
|
+
right: Ws
|
|
3440
3451
|
}
|
|
3441
3452
|
),
|
|
3442
3453
|
/* @__PURE__ */ d(
|
|
@@ -3445,19 +3456,19 @@ function Ap({
|
|
|
3445
3456
|
className: "flex shrink-0 flex-wrap items-center gap-1.5 border-b border-slate-100 bg-white px-4 py-1.5 dark:border-slate-800 dark:bg-slate-900",
|
|
3446
3457
|
"data-queue-saved-views": !0,
|
|
3447
3458
|
children: [
|
|
3448
|
-
((i == null ? void 0 : i.total) ?? 0) > 0 &&
|
|
3459
|
+
((i == null ? void 0 : i.total) ?? 0) > 0 && Le > 0 && /* @__PURE__ */ d(
|
|
3449
3460
|
"span",
|
|
3450
3461
|
{
|
|
3451
|
-
"data-queue-default-hiding":
|
|
3462
|
+
"data-queue-default-hiding": Le,
|
|
3452
3463
|
className: "inline-flex h-6 items-center gap-1 rounded-full border border-nvr-cyan/40 bg-nvr-cyan/[0.06] px-2.5 text-[12px] text-slate-700 dark:text-slate-200",
|
|
3453
3464
|
children: [
|
|
3454
3465
|
"Your default ",
|
|
3455
3466
|
pa(Or),
|
|
3456
3467
|
" filter is hiding",
|
|
3457
3468
|
" ",
|
|
3458
|
-
|
|
3469
|
+
Le.toLocaleString("en-US"),
|
|
3459
3470
|
" item",
|
|
3460
|
-
|
|
3471
|
+
Le === 1 ? "" : "s",
|
|
3461
3472
|
" ·",
|
|
3462
3473
|
/* @__PURE__ */ a(
|
|
3463
3474
|
"button",
|
|
@@ -3497,7 +3508,7 @@ function Ap({
|
|
|
3497
3508
|
V((e) => {
|
|
3498
3509
|
const { owners: t, ...n } = e;
|
|
3499
3510
|
return n;
|
|
3500
|
-
}),
|
|
3511
|
+
}), Q(1);
|
|
3501
3512
|
},
|
|
3502
3513
|
className: "flex h-4 w-4 items-center justify-center rounded-full text-[10px] hover:bg-black/10 dark:hover:bg-white/10",
|
|
3503
3514
|
children: "✕"
|
|
@@ -3510,7 +3521,7 @@ function Ap({
|
|
|
3510
3521
|
"button",
|
|
3511
3522
|
{
|
|
3512
3523
|
type: "button",
|
|
3513
|
-
onClick:
|
|
3524
|
+
onClick: rs,
|
|
3514
3525
|
title: "Revert to the queue default (filters, columns and sort cleared)",
|
|
3515
3526
|
className: F(
|
|
3516
3527
|
"inline-flex h-6 items-center rounded-full border px-2.5 text-[12px] transition-colors",
|
|
@@ -3533,17 +3544,17 @@ function Ap({
|
|
|
3533
3544
|
"button",
|
|
3534
3545
|
{
|
|
3535
3546
|
type: "button",
|
|
3536
|
-
title:
|
|
3537
|
-
onClick: () =>
|
|
3547
|
+
title: gt === e.id ? "Your default view — click to revert to the general default" : "Set as your default view",
|
|
3548
|
+
onClick: () => cs.mutate(gt === e.id ? null : e.id),
|
|
3538
3549
|
className: F(
|
|
3539
3550
|
"shrink-0",
|
|
3540
|
-
|
|
3551
|
+
gt === e.id ? "text-amber-400" : "text-slate-300 hover:text-amber-400 dark:text-slate-600"
|
|
3541
3552
|
),
|
|
3542
3553
|
children: /* @__PURE__ */ a(
|
|
3543
|
-
|
|
3554
|
+
ki,
|
|
3544
3555
|
{
|
|
3545
|
-
className: F("h-3 w-3",
|
|
3546
|
-
"aria-label":
|
|
3556
|
+
className: F("h-3 w-3", gt === e.id && "fill-current"),
|
|
3557
|
+
"aria-label": gt === e.id ? "Default view" : "Set as default"
|
|
3547
3558
|
}
|
|
3548
3559
|
)
|
|
3549
3560
|
}
|
|
@@ -3556,14 +3567,14 @@ function Ap({
|
|
|
3556
3567
|
"button",
|
|
3557
3568
|
{
|
|
3558
3569
|
type: "button",
|
|
3559
|
-
onClick: () =>
|
|
3570
|
+
onClick: () => is.mutate({ viewId: e.id, on: !e.is_default }),
|
|
3560
3571
|
title: e.is_default ? "Queue default — click to unset" : "Set as the default view for everyone on this queue",
|
|
3561
3572
|
className: F(
|
|
3562
3573
|
"shrink-0",
|
|
3563
3574
|
e.is_default ? "text-nvr-cyan" : "invisible text-slate-300 hover:text-nvr-cyan group-hover:visible dark:text-slate-600"
|
|
3564
3575
|
),
|
|
3565
3576
|
"aria-label": e.is_default ? "Unset queue default" : "Set queue default",
|
|
3566
|
-
children: /* @__PURE__ */ a(
|
|
3577
|
+
children: /* @__PURE__ */ a(vi, { className: F("h-3 w-3", e.is_default && "fill-current") })
|
|
3567
3578
|
}
|
|
3568
3579
|
),
|
|
3569
3580
|
(e.user === z || Xe) && fe === e.id && /* @__PURE__ */ a(
|
|
@@ -3577,29 +3588,29 @@ function Ap({
|
|
|
3577
3588
|
"aria-label": `Update view ${e.name}`,
|
|
3578
3589
|
"data-view-update-state": Ze.isPending ? "saving" : Ya === e.id ? "saved" : "idle",
|
|
3579
3590
|
children: Ze.isPending && ((t = Ze.variables) == null ? void 0 : t.id) === e.id ? /* @__PURE__ */ a(Go, { className: "h-3 w-3 animate-spin" }) : Ya === e.id ? /* @__PURE__ */ a(
|
|
3580
|
-
|
|
3591
|
+
Ar,
|
|
3581
3592
|
{
|
|
3582
3593
|
className: "h-3 w-3 text-emerald-600 dark:text-emerald-400",
|
|
3583
3594
|
strokeWidth: 3
|
|
3584
3595
|
}
|
|
3585
|
-
) : /* @__PURE__ */ a(
|
|
3596
|
+
) : /* @__PURE__ */ a(wi, { className: "h-3 w-3" })
|
|
3586
3597
|
}
|
|
3587
3598
|
),
|
|
3588
3599
|
fe === e.id && /* @__PURE__ */ a(
|
|
3589
3600
|
"button",
|
|
3590
3601
|
{
|
|
3591
3602
|
type: "button",
|
|
3592
|
-
onClick: () =>
|
|
3593
|
-
title:
|
|
3603
|
+
onClick: () => Rl(e.id),
|
|
3604
|
+
title: gn(e.id) ? "Subscribed to new arrivals in this view — click to unsubscribe" : "Notify me when items enter this view (checked every 5 min)",
|
|
3594
3605
|
className: F(
|
|
3595
3606
|
"shrink-0",
|
|
3596
|
-
|
|
3607
|
+
gn(e.id) ? "text-nvr-cyan" : "invisible text-slate-300 hover:text-nvr-cyan group-hover:visible dark:text-slate-600"
|
|
3597
3608
|
),
|
|
3598
3609
|
"aria-label": `Subscribe to view ${e.name}`,
|
|
3599
|
-
children: /* @__PURE__ */ a(
|
|
3610
|
+
children: /* @__PURE__ */ a(_i, { className: F("h-3 w-3", gn(e.id) && "fill-current") })
|
|
3600
3611
|
}
|
|
3601
3612
|
),
|
|
3602
|
-
e.user === z && (
|
|
3613
|
+
e.user === z && (yr === e.id ? /* @__PURE__ */ d(
|
|
3603
3614
|
"span",
|
|
3604
3615
|
{
|
|
3605
3616
|
className: "flex shrink-0 items-center gap-1",
|
|
@@ -3644,8 +3655,8 @@ function Ap({
|
|
|
3644
3655
|
e.id
|
|
3645
3656
|
);
|
|
3646
3657
|
}),
|
|
3647
|
-
/* @__PURE__ */ d(
|
|
3648
|
-
/* @__PURE__ */ a(
|
|
3658
|
+
/* @__PURE__ */ d(Rt, { open: ns, onOpenChange: fr, children: [
|
|
3659
|
+
/* @__PURE__ */ a(Tt, { asChild: !0, children: /* @__PURE__ */ a(
|
|
3649
3660
|
"button",
|
|
3650
3661
|
{
|
|
3651
3662
|
type: "button",
|
|
@@ -3654,7 +3665,7 @@ function Ap({
|
|
|
3654
3665
|
children: "☆ Save view"
|
|
3655
3666
|
}
|
|
3656
3667
|
) }),
|
|
3657
|
-
/* @__PURE__ */ d(
|
|
3668
|
+
/* @__PURE__ */ d(Ot, { className: "w-[240px] p-3", align: "end", children: [
|
|
3658
3669
|
(() => {
|
|
3659
3670
|
const e = E == null ? void 0 : E.data.find((t) => t.id === fe);
|
|
3660
3671
|
return !e || e.user !== z && !Xe ? null : /* @__PURE__ */ d(
|
|
@@ -3663,7 +3674,7 @@ function Ap({
|
|
|
3663
3674
|
type: "button",
|
|
3664
3675
|
disabled: Ze.isPending,
|
|
3665
3676
|
onClick: () => {
|
|
3666
|
-
Ze.mutate(e),
|
|
3677
|
+
Ze.mutate(e), fr(!1);
|
|
3667
3678
|
},
|
|
3668
3679
|
className: "mb-2 w-full rounded-md border border-nvr-cyan/40 bg-nvr-cyan/5 px-2 py-1.5 text-[12px] font-medium text-nvr-navy hover:bg-nvr-cyan/10 disabled:opacity-50 dark:text-nvr-cyan",
|
|
3669
3680
|
children: [
|
|
@@ -3678,7 +3689,7 @@ function Ap({
|
|
|
3678
3689
|
"input",
|
|
3679
3690
|
{
|
|
3680
3691
|
value: Nn,
|
|
3681
|
-
onChange: (e) =>
|
|
3692
|
+
onChange: (e) => ja(e.target.value),
|
|
3682
3693
|
onKeyDown: (e) => {
|
|
3683
3694
|
e.key !== "Enter" || e.nativeEvent.isComposing || (e.preventDefault(), Nn.trim() && !$n.isPending && $n.mutate());
|
|
3684
3695
|
},
|
|
@@ -3691,8 +3702,8 @@ function Ap({
|
|
|
3691
3702
|
/* @__PURE__ */ a(
|
|
3692
3703
|
Ur,
|
|
3693
3704
|
{
|
|
3694
|
-
checked: Ua ||
|
|
3695
|
-
disabled:
|
|
3705
|
+
checked: Ua || vt,
|
|
3706
|
+
disabled: vt,
|
|
3696
3707
|
onCheckedChange: (e) => Va(e === !0)
|
|
3697
3708
|
}
|
|
3698
3709
|
),
|
|
@@ -3702,13 +3713,13 @@ function Ap({
|
|
|
3702
3713
|
/* @__PURE__ */ a(
|
|
3703
3714
|
Ur,
|
|
3704
3715
|
{
|
|
3705
|
-
checked:
|
|
3716
|
+
checked: vt,
|
|
3706
3717
|
onCheckedChange: (e) => Ga(e === !0)
|
|
3707
3718
|
}
|
|
3708
3719
|
),
|
|
3709
3720
|
"Set as queue default (everyone starts here)"
|
|
3710
3721
|
] }),
|
|
3711
|
-
tn &&
|
|
3722
|
+
tn && vt && /* @__PURE__ */ a("p", { className: "-mt-1 mb-2 pl-6 text-[11px] text-slate-500 dark:text-slate-400", children: "Saves columns, sort and totals. Filters stay each person's own." }),
|
|
3712
3723
|
/* @__PURE__ */ a(
|
|
3713
3724
|
"button",
|
|
3714
3725
|
{
|
|
@@ -3726,15 +3737,15 @@ function Ap({
|
|
|
3726
3737
|
)
|
|
3727
3738
|
] }),
|
|
3728
3739
|
/* @__PURE__ */ d("div", { ref: Sn, className: "flex min-h-0 flex-1 flex-col overflow-y-auto px-4 pb-4 pt-3", children: [
|
|
3729
|
-
da && /* @__PURE__ */ a(
|
|
3730
|
-
|
|
3740
|
+
da && /* @__PURE__ */ a($d, { error: El, onRetry: () => void Kl(), className: "mb-3" }),
|
|
3741
|
+
Lr && /* @__PURE__ */ a(
|
|
3731
3742
|
"p",
|
|
3732
3743
|
{
|
|
3733
3744
|
"data-filter-sentence": !0,
|
|
3734
|
-
"data-tip":
|
|
3745
|
+
"data-tip": Lr,
|
|
3735
3746
|
"aria-live": "polite",
|
|
3736
3747
|
className: "mb-1.5 shrink-0 truncate px-0.5 text-[11.5px] text-slate-500 dark:text-slate-400",
|
|
3737
|
-
children:
|
|
3748
|
+
children: Lr
|
|
3738
3749
|
}
|
|
3739
3750
|
),
|
|
3740
3751
|
C === "table" ? /* @__PURE__ */ a(Ce, { children: /* @__PURE__ */ a("div", { className: "flex min-h-0 flex-1", children: /* @__PURE__ */ d(
|
|
@@ -3747,63 +3758,63 @@ function Ap({
|
|
|
3747
3758
|
),
|
|
3748
3759
|
"aria-busy": ba || void 0,
|
|
3749
3760
|
children: [
|
|
3750
|
-
|
|
3751
|
-
|
|
3761
|
+
Pt.label && /* @__PURE__ */ a(
|
|
3762
|
+
Td,
|
|
3752
3763
|
{
|
|
3753
|
-
label:
|
|
3764
|
+
label: Pt.label,
|
|
3754
3765
|
onShow: Ta,
|
|
3755
3766
|
className: "bottom-28"
|
|
3756
3767
|
}
|
|
3757
3768
|
),
|
|
3758
3769
|
ga != null && /* @__PURE__ */ d("span", { className: "nvr-slide-up-centered absolute left-1/2 top-6 z-[6] -translate-x-1/2 rounded-full border border-slate-200 bg-white px-3 py-1.5 text-[12px] font-medium text-slate-600 shadow-lg dark:border-border dark:bg-card dark:text-slate-300", children: [
|
|
3759
|
-
|
|
3770
|
+
Ml.text ?? "Still working",
|
|
3760
3771
|
" — ",
|
|
3761
3772
|
ga,
|
|
3762
3773
|
"s"
|
|
3763
3774
|
] }),
|
|
3764
3775
|
/* @__PURE__ */ a(
|
|
3765
|
-
|
|
3776
|
+
bd,
|
|
3766
3777
|
{
|
|
3767
3778
|
fillHeight: !0,
|
|
3768
3779
|
enterKey: Ca.current,
|
|
3769
|
-
density:
|
|
3780
|
+
density: Lt,
|
|
3770
3781
|
minBodyHeight: 360,
|
|
3771
3782
|
columns: et,
|
|
3772
3783
|
rows: Sa.rows,
|
|
3773
3784
|
rowKey: (e) => `${e.collection}:${e.item_id}`,
|
|
3774
3785
|
total: (i == null ? void 0 : i.total) ?? 0,
|
|
3775
3786
|
page: se,
|
|
3776
|
-
limit:
|
|
3777
|
-
isLoading:
|
|
3778
|
-
onPageChange:
|
|
3779
|
-
onRowClick: (e) =>
|
|
3787
|
+
limit: pn,
|
|
3788
|
+
isLoading: bt,
|
|
3789
|
+
onPageChange: Q,
|
|
3790
|
+
onRowClick: (e) => _n(e),
|
|
3780
3791
|
onRowFocus: (e) => Xt(k(e)),
|
|
3781
3792
|
activeRowKey: zt,
|
|
3782
3793
|
rowAriaLabel: (e) => e.label || void 0,
|
|
3783
3794
|
rowDragProps: (e) => ({
|
|
3784
|
-
...
|
|
3785
|
-
...
|
|
3795
|
+
...Gl({ collection: e.collection, id: e.item_id }),
|
|
3796
|
+
...Bl.record(e.collection, e.item_id)
|
|
3786
3797
|
}),
|
|
3787
3798
|
onRowContextMenu: (e, t) => {
|
|
3788
3799
|
t.preventDefault(), Zt({ x: t.clientX, y: t.clientY, row: e });
|
|
3789
3800
|
},
|
|
3790
3801
|
rowTitle: (e) => {
|
|
3791
3802
|
const t = Ht.get(k(e));
|
|
3792
|
-
return (
|
|
3803
|
+
return (On(k(e)) ? wc : void 0) ?? (_t(k(e)) != null ? bc(_t(k(e))) : void 0) ?? be.titleFor(k(e)) ?? (t && !t.is_mine ? yc(t) : void 0) ?? (Ja(e.collection, e.item_id) ? Dd : void 0);
|
|
3793
3804
|
},
|
|
3794
3805
|
rowClassName: (e) => F(
|
|
3795
|
-
|
|
3806
|
+
ss(e),
|
|
3796
3807
|
Ja(e.collection, e.item_id) && Pd,
|
|
3797
|
-
|
|
3808
|
+
On(k(e)) && vc
|
|
3798
3809
|
),
|
|
3799
3810
|
emptyMessage: da ? /* @__PURE__ */ a("span", { className: "sr-only", children: "The list did not load." }) : /* @__PURE__ */ a(
|
|
3800
|
-
|
|
3811
|
+
hd,
|
|
3801
3812
|
{
|
|
3802
|
-
icon:
|
|
3803
|
-
title: ((
|
|
3804
|
-
detail: ((Mo = i == null ? void 0 : i.empty) == null ? void 0 : Mo.reason) === "filters" &&
|
|
3805
|
-
action: ((
|
|
3806
|
-
|
|
3813
|
+
icon: Ni,
|
|
3814
|
+
title: ((Ko = i == null ? void 0 : i.empty) == null ? void 0 : Ko.reason) === "not_permitted" ? "You cannot read this queue’s records" : ((Po = i == null ? void 0 : i.empty) == null ? void 0 : Po.reason) === "scope_mine" ? "Nothing waiting on you" : ((Do = i == null ? void 0 : i.empty) == null ? void 0 : Do.reason) === "filters" ? "No records match these filters" : "Nothing in this queue",
|
|
3815
|
+
detail: ((Mo = i == null ? void 0 : i.empty) == null ? void 0 : Mo.reason) === "filters" && Le > 0 ? `Your default ${pa(Or)} filter is hiding ${Le.toLocaleString("en-US")} item${Le === 1 ? "" : "s"} here.` : ((Bo = i == null ? void 0 : i.empty) == null ? void 0 : Bo.reason) === "filters" ? b !== "all" ? "Your filters and the current tab leave nothing to show. Widen a filter or look across all items." : "Widen or clear a filter to see more of the queue." : ((Qo = i == null ? void 0 : i.empty) == null ? void 0 : Qo.message) ?? "Records land here when they match the queue sources — a state change or new record can appear at any moment.",
|
|
3816
|
+
action: ((jo = i == null ? void 0 : i.empty) == null ? void 0 : jo.reason) === "filters" ? /* @__PURE__ */ d("div", { className: "flex items-center justify-center gap-2", children: [
|
|
3817
|
+
Le > 0 && /* @__PURE__ */ d(
|
|
3807
3818
|
"button",
|
|
3808
3819
|
{
|
|
3809
3820
|
type: "button",
|
|
@@ -3812,7 +3823,7 @@ function Ap({
|
|
|
3812
3823
|
"data-queue-empty-defaults": !0,
|
|
3813
3824
|
children: [
|
|
3814
3825
|
"Show all ",
|
|
3815
|
-
|
|
3826
|
+
Le.toLocaleString("en-US")
|
|
3816
3827
|
]
|
|
3817
3828
|
}
|
|
3818
3829
|
),
|
|
@@ -3825,7 +3836,7 @@ function Ap({
|
|
|
3825
3836
|
const e = {};
|
|
3826
3837
|
for (const [n, r] of Object.entries(ke.current))
|
|
3827
3838
|
(t = Re[n.slice(6)]) != null && t.length && (e[n] = r);
|
|
3828
|
-
V(e),
|
|
3839
|
+
V(e), Q(1);
|
|
3829
3840
|
},
|
|
3830
3841
|
className: "h-7 rounded-md border border-slate-200 bg-white px-2.5 text-[12px] font-medium text-slate-700 hover:bg-slate-50 dark:border-slate-700 dark:bg-slate-900 dark:text-slate-200 dark:hover:bg-slate-800",
|
|
3831
3842
|
"data-queue-empty-clear": !0,
|
|
@@ -3837,7 +3848,7 @@ function Ap({
|
|
|
3837
3848
|
{
|
|
3838
3849
|
type: "button",
|
|
3839
3850
|
onClick: () => {
|
|
3840
|
-
me("all"),
|
|
3851
|
+
me("all"), Q(1);
|
|
3841
3852
|
},
|
|
3842
3853
|
className: "h-7 rounded-md border border-slate-200 bg-white px-2.5 text-[12px] font-medium text-slate-700 hover:bg-slate-50 dark:border-slate-700 dark:bg-slate-900 dark:text-slate-200 dark:hover:bg-slate-800",
|
|
3843
3854
|
"data-queue-empty-all": !0,
|
|
@@ -3849,22 +3860,22 @@ function Ap({
|
|
|
3849
3860
|
),
|
|
3850
3861
|
sort: U,
|
|
3851
3862
|
onSortChange: (e) => {
|
|
3852
|
-
|
|
3863
|
+
st(e), Q(1);
|
|
3853
3864
|
},
|
|
3854
|
-
filterDefs:
|
|
3865
|
+
filterDefs: Tr,
|
|
3855
3866
|
filterValues: x,
|
|
3856
3867
|
onFilterChange: (e, t) => {
|
|
3857
|
-
V((n) => ({ ...n, [e]: t })),
|
|
3868
|
+
V((n) => ({ ...n, [e]: t })), Q(1);
|
|
3858
3869
|
},
|
|
3859
|
-
rowGroups:
|
|
3870
|
+
rowGroups: xs ?? void 0,
|
|
3860
3871
|
collapsedGroups: xe,
|
|
3861
|
-
onToggleGroup:
|
|
3862
|
-
selectedIds:
|
|
3863
|
-
onSelectionChange:
|
|
3872
|
+
onToggleGroup: Xl,
|
|
3873
|
+
selectedIds: yn && X ? ee : void 0,
|
|
3874
|
+
onSelectionChange: yn && X ? De : void 0,
|
|
3864
3875
|
hideFilterRow: !0,
|
|
3865
3876
|
nowrapCells: !0,
|
|
3866
3877
|
columnPins: vo,
|
|
3867
|
-
pinKeepRank:
|
|
3878
|
+
pinKeepRank: ku,
|
|
3868
3879
|
pinRightShare: 0.45,
|
|
3869
3880
|
onColumnPinChange: (e, t) => {
|
|
3870
3881
|
Dn((n) => {
|
|
@@ -3876,7 +3887,7 @@ function Ap({
|
|
|
3876
3887
|
hScrollProxy: !0,
|
|
3877
3888
|
totalsRow: js,
|
|
3878
3889
|
footer: /* @__PURE__ */ a(
|
|
3879
|
-
|
|
3890
|
+
Qd,
|
|
3880
3891
|
{
|
|
3881
3892
|
collections: Yt,
|
|
3882
3893
|
selectedIds: String(x.at_risk_rule ?? "").split(",").map((e) => Number(e)).filter((e) => Number.isFinite(e) && e > 0),
|
|
@@ -3885,7 +3896,7 @@ function Ap({
|
|
|
3885
3896
|
V((n) => ({
|
|
3886
3897
|
...n,
|
|
3887
3898
|
at_risk_rule: n.at_risk_rule === t ? "" : t
|
|
3888
|
-
})),
|
|
3899
|
+
})), Q(1);
|
|
3889
3900
|
},
|
|
3890
3901
|
className: "shrink-0 border-t border-slate-100 bg-white px-3 py-1.5 dark:border-slate-800 dark:bg-slate-900"
|
|
3891
3902
|
}
|
|
@@ -3895,13 +3906,13 @@ function Ap({
|
|
|
3895
3906
|
]
|
|
3896
3907
|
}
|
|
3897
3908
|
) }) }) : C === "kanban" ? /* @__PURE__ */ a(
|
|
3898
|
-
|
|
3909
|
+
ou,
|
|
3899
3910
|
{
|
|
3900
|
-
items:
|
|
3901
|
-
onCardClick: (e) =>
|
|
3902
|
-
onDrop: (e, t) =>
|
|
3911
|
+
items: O,
|
|
3912
|
+
onCardClick: (e) => _n(e),
|
|
3913
|
+
onDrop: (e, t) => Ql.mutate({ item: e, targetState: t }),
|
|
3903
3914
|
onClaim: (e) => He.mutate(e),
|
|
3904
|
-
onRelease: (e) =>
|
|
3915
|
+
onRelease: (e) => ht.mutate(e),
|
|
3905
3916
|
swimlaneBy: qt,
|
|
3906
3917
|
stateLabels: cr,
|
|
3907
3918
|
laneLabel: qt === "collection" ? Ie : void 0,
|
|
@@ -3910,10 +3921,10 @@ function Ap({
|
|
|
3910
3921
|
Un.current = e;
|
|
3911
3922
|
}
|
|
3912
3923
|
}
|
|
3913
|
-
) : /* @__PURE__ */ a(
|
|
3924
|
+
) : /* @__PURE__ */ a(iu, { queueId: l })
|
|
3914
3925
|
] }),
|
|
3915
|
-
|
|
3916
|
-
|
|
3926
|
+
yn && X && /* @__PURE__ */ d(
|
|
3927
|
+
nu,
|
|
3917
3928
|
{
|
|
3918
3929
|
count: ee.length,
|
|
3919
3930
|
claimsEnabled: Te,
|
|
@@ -3922,10 +3933,10 @@ function Ap({
|
|
|
3922
3933
|
showTransition: Ge("transition"),
|
|
3923
3934
|
states: Ma((i == null ? void 0 : i.available_values.state) ?? []).map((e) => ({
|
|
3924
3935
|
value: e,
|
|
3925
|
-
label:
|
|
3936
|
+
label: Ke(e)
|
|
3926
3937
|
})),
|
|
3927
|
-
busy:
|
|
3928
|
-
onClaim: () =>
|
|
3938
|
+
busy: wt,
|
|
3939
|
+
onClaim: () => gr(
|
|
3929
3940
|
"Claim",
|
|
3930
3941
|
(e) => f.request(
|
|
3931
3942
|
ge(`/queues/${l}/claim`, {
|
|
@@ -3934,7 +3945,7 @@ function Ap({
|
|
|
3934
3945
|
})
|
|
3935
3946
|
)
|
|
3936
3947
|
),
|
|
3937
|
-
onRelease: () =>
|
|
3948
|
+
onRelease: () => gr(
|
|
3938
3949
|
"Release",
|
|
3939
3950
|
(e) => f.request(
|
|
3940
3951
|
ge(`/queues/${l}/release`, {
|
|
@@ -3943,11 +3954,11 @@ function Ap({
|
|
|
3943
3954
|
})
|
|
3944
3955
|
)
|
|
3945
3956
|
),
|
|
3946
|
-
onTransition: (e) =>
|
|
3957
|
+
onTransition: (e) => gr("Transition", (t) => xa(t, e)),
|
|
3947
3958
|
onClear: () => De([]),
|
|
3948
3959
|
onActionIntent: () => eo(!0),
|
|
3949
3960
|
figures: /* @__PURE__ */ a(
|
|
3950
|
-
|
|
3961
|
+
od,
|
|
3951
3962
|
{
|
|
3952
3963
|
tone: "light",
|
|
3953
3964
|
total: ee.length,
|
|
@@ -3956,7 +3967,7 @@ function Ap({
|
|
|
3956
3967
|
noun: "row",
|
|
3957
3968
|
labelOf: (e) => {
|
|
3958
3969
|
const t = et.find((n) => n.key === e);
|
|
3959
|
-
return t ?
|
|
3970
|
+
return t ? Rr(t) : e;
|
|
3960
3971
|
},
|
|
3961
3972
|
format: (e, t) => {
|
|
3962
3973
|
const n = ye(e.slice(6));
|
|
@@ -3965,22 +3976,22 @@ function Ap({
|
|
|
3965
3976
|
}
|
|
3966
3977
|
),
|
|
3967
3978
|
notices: /* @__PURE__ */ a(
|
|
3968
|
-
|
|
3979
|
+
ad,
|
|
3969
3980
|
{
|
|
3970
3981
|
tone: "light",
|
|
3971
3982
|
framed: !0,
|
|
3972
3983
|
total: ee.length,
|
|
3973
|
-
open:
|
|
3974
|
-
changed:
|
|
3984
|
+
open: bs,
|
|
3985
|
+
changed: ps,
|
|
3975
3986
|
labelOf: (e) => {
|
|
3976
3987
|
var t;
|
|
3977
|
-
return ((t =
|
|
3988
|
+
return ((t = O.find((n) => k(n) === e)) == null ? void 0 : t.label) ?? null;
|
|
3978
3989
|
},
|
|
3979
3990
|
onSkip: (e) => De((t) => t.filter((n) => !e.includes(n))),
|
|
3980
3991
|
onAcknowledgeChanged: (e) => {
|
|
3981
|
-
Tn.restamp(e),
|
|
3992
|
+
Tn.restamp(e), xr.clear(e);
|
|
3982
3993
|
},
|
|
3983
|
-
onOpenRecord: ({ collection: e, id: t }) => window.open(
|
|
3994
|
+
onOpenRecord: ({ collection: e, id: t }) => window.open(j.urlFor({ collection: e, itemId: t }), "_blank", "noopener")
|
|
3984
3995
|
}
|
|
3985
3996
|
),
|
|
3986
3997
|
children: [
|
|
@@ -3989,27 +4000,27 @@ function Ap({
|
|
|
3989
4000
|
{
|
|
3990
4001
|
type: "button",
|
|
3991
4002
|
onClick: () => {
|
|
3992
|
-
const e =
|
|
3993
|
-
|
|
4003
|
+
const e = $c(
|
|
4004
|
+
O.filter((t) => ee.includes(k(t)) && t.collection !== "tasks").map((t) => j.urlFor(pr(t)))
|
|
3994
4005
|
);
|
|
3995
|
-
e.blocked > 0 || e.capped > 0 ?
|
|
4006
|
+
e.blocked > 0 || e.capped > 0 ? P.warning(Xo(e)) : P.success(Xo(e));
|
|
3996
4007
|
},
|
|
3997
4008
|
"data-bulk-open-tabs": !0,
|
|
3998
|
-
title: `Open the selected records in new tabs (up to ${
|
|
4009
|
+
title: `Open the selected records in new tabs (up to ${Cc})`,
|
|
3999
4010
|
className: "h-8 rounded-md border border-white/20 px-3 text-[12.5px] font-medium hover:bg-white/10 dark:border-border dark:hover:bg-muted",
|
|
4000
4011
|
children: "Open in tabs"
|
|
4001
4012
|
}
|
|
4002
4013
|
),
|
|
4003
4014
|
Ge("transition") && (() => {
|
|
4004
|
-
const e =
|
|
4015
|
+
const e = O.filter(
|
|
4005
4016
|
(n) => ee.includes(k(n)) && n.collection !== "tasks"
|
|
4006
4017
|
), t = [...new Set(e.map((n) => n.collection))];
|
|
4007
4018
|
return e.length > 0 ? /* @__PURE__ */ a(
|
|
4008
|
-
|
|
4019
|
+
ru,
|
|
4009
4020
|
{
|
|
4010
4021
|
collection: t.length === 1 ? t[0] : null,
|
|
4011
4022
|
ids: e.map((n) => n.item_id),
|
|
4012
|
-
disabled:
|
|
4023
|
+
disabled: wt,
|
|
4013
4024
|
onDone: () => {
|
|
4014
4025
|
De([]), y.invalidateQueries({ queryKey: ["queue-items", l] });
|
|
4015
4026
|
}
|
|
@@ -4017,49 +4028,49 @@ function Ap({
|
|
|
4017
4028
|
) : null;
|
|
4018
4029
|
})(),
|
|
4019
4030
|
/* @__PURE__ */ a(
|
|
4020
|
-
|
|
4031
|
+
ed,
|
|
4021
4032
|
{
|
|
4022
|
-
targets:
|
|
4033
|
+
targets: O.filter((e) => ee.includes(k(e)) && e.collection !== "tasks").map((e) => ({ collection: e.collection, id: e.item_id, label: e.label })),
|
|
4023
4034
|
enabledKeys: (p == null ? void 0 : p.bulk_action_keys) ?? null,
|
|
4024
4035
|
tone: "light",
|
|
4025
|
-
disabled:
|
|
4036
|
+
disabled: wt,
|
|
4026
4037
|
onDone: (e) => {
|
|
4027
4038
|
e.failed === 0 && De([]), y.invalidateQueries({ queryKey: ["queue-items", l] });
|
|
4028
4039
|
}
|
|
4029
4040
|
}
|
|
4030
4041
|
),
|
|
4031
4042
|
Ge("update-field") && /* @__PURE__ */ a(
|
|
4032
|
-
|
|
4043
|
+
nd,
|
|
4033
4044
|
{
|
|
4034
|
-
targets:
|
|
4035
|
-
disabled:
|
|
4045
|
+
targets: O.filter((e) => ee.includes(k(e)) && e.collection !== "tasks").map((e) => ({ collection: e.collection, id: e.item_id })),
|
|
4046
|
+
disabled: wt,
|
|
4036
4047
|
onDone: () => void y.invalidateQueries({ queryKey: ["queue-items", l] }),
|
|
4037
4048
|
className: "rounded-md px-2.5 py-1 text-[12px] font-medium text-slate-600 hover:bg-slate-100 disabled:opacity-50 dark:text-slate-300 dark:hover:bg-muted"
|
|
4038
4049
|
}
|
|
4039
4050
|
),
|
|
4040
4051
|
Ge("compare") && /* @__PURE__ */ a(
|
|
4041
|
-
|
|
4052
|
+
td,
|
|
4042
4053
|
{
|
|
4043
|
-
targets:
|
|
4054
|
+
targets: O.filter((e) => ee.includes(k(e)) && e.collection !== "tasks").map((e) => ({ collection: e.collection, id: e.item_id })),
|
|
4044
4055
|
renderValue: (e, t, n, r) => {
|
|
4045
4056
|
var o;
|
|
4046
|
-
return
|
|
4047
|
-
((o =
|
|
4057
|
+
return sd(
|
|
4058
|
+
((o = O.find((c) => ee.includes(k(c)))) == null ? void 0 : o.collection) ?? "",
|
|
4048
4059
|
e,
|
|
4049
4060
|
t,
|
|
4050
4061
|
n,
|
|
4051
4062
|
r
|
|
4052
4063
|
);
|
|
4053
4064
|
},
|
|
4054
|
-
disabled:
|
|
4065
|
+
disabled: wt,
|
|
4055
4066
|
className: "rounded-md px-2.5 py-1 text-[12px] font-medium text-slate-600 hover:bg-slate-100 disabled:opacity-50 dark:text-slate-300 dark:hover:bg-muted"
|
|
4056
4067
|
}
|
|
4057
4068
|
),
|
|
4058
4069
|
Ge("message") && /* @__PURE__ */ a(
|
|
4059
|
-
|
|
4070
|
+
ld,
|
|
4060
4071
|
{
|
|
4061
|
-
targets:
|
|
4062
|
-
disabled:
|
|
4072
|
+
targets: O.filter((e) => ee.includes(k(e)) && e.collection !== "tasks").map((e) => ({ collection: e.collection, id: e.item_id })),
|
|
4073
|
+
disabled: wt,
|
|
4063
4074
|
className: "rounded-md px-2.5 py-1 text-[12px] font-medium text-slate-600 hover:bg-slate-100 disabled:opacity-50 dark:text-slate-300 dark:hover:bg-muted"
|
|
4064
4075
|
}
|
|
4065
4076
|
)
|
|
@@ -4067,7 +4078,7 @@ function Ap({
|
|
|
4067
4078
|
}
|
|
4068
4079
|
),
|
|
4069
4080
|
Y != null && Y.length ? /* @__PURE__ */ a(
|
|
4070
|
-
|
|
4081
|
+
Bd,
|
|
4071
4082
|
{
|
|
4072
4083
|
collection: Y[0].collection,
|
|
4073
4084
|
itemId: Y[0].itemId,
|
|
@@ -4076,10 +4087,10 @@ function Ap({
|
|
|
4076
4087
|
width: Y[0].width,
|
|
4077
4088
|
title: Y[0].title,
|
|
4078
4089
|
stack: Y,
|
|
4079
|
-
onPush: (e) =>
|
|
4080
|
-
onPop: () =>
|
|
4081
|
-
onClose: () =>
|
|
4082
|
-
onOpenRecord:
|
|
4090
|
+
onPush: (e) => Nt.push([...Y, e]),
|
|
4091
|
+
onPop: () => Nt.back(),
|
|
4092
|
+
onClose: () => Nt.back(Y.length),
|
|
4093
|
+
onOpenRecord: es
|
|
4083
4094
|
}
|
|
4084
4095
|
) : null,
|
|
4085
4096
|
H && Wo(
|
|
@@ -4097,14 +4108,14 @@ function Ap({
|
|
|
4097
4108
|
"data-queue-row-menu": !0,
|
|
4098
4109
|
children: [
|
|
4099
4110
|
[
|
|
4100
|
-
{ label: "Open", run: () =>
|
|
4111
|
+
{ label: "Open", run: () => _n(H.row) },
|
|
4101
4112
|
{
|
|
4102
4113
|
label: "Open full record",
|
|
4103
|
-
run: () =>
|
|
4114
|
+
run: () => kt(H.row)
|
|
4104
4115
|
},
|
|
4105
4116
|
{ label: "Peek", run: () => Ye(H.row) },
|
|
4106
4117
|
...Te ? [
|
|
4107
|
-
((Uo = H.row.claimed_by) == null ? void 0 : Uo.id) === z ? { label: "Release claim", run: () =>
|
|
4118
|
+
((Uo = H.row.claimed_by) == null ? void 0 : Uo.id) === z ? { label: "Release claim", run: () => ht.mutate(H.row) } : { label: "Claim", run: () => He.mutate(H.row) }
|
|
4108
4119
|
] : [],
|
|
4109
4120
|
// The friendly id (PW26-76166), never the row id (army 6 M52);
|
|
4110
4121
|
// a record with no number has nothing to copy.
|
|
@@ -4122,12 +4133,12 @@ function Ap({
|
|
|
4122
4133
|
run: () => {
|
|
4123
4134
|
var e;
|
|
4124
4135
|
return void ((e = navigator.clipboard) == null ? void 0 : e.writeText(
|
|
4125
|
-
`${window.location.origin}${
|
|
4136
|
+
`${window.location.origin}${j.urlFor(pr(H.row))}`
|
|
4126
4137
|
));
|
|
4127
4138
|
}
|
|
4128
4139
|
},
|
|
4129
4140
|
// Custom actions (#125): the record's registered actions, right here.
|
|
4130
|
-
...
|
|
4141
|
+
...Ol(H.row.collection).map((e) => ({
|
|
4131
4142
|
label: e.label,
|
|
4132
4143
|
run: () => Ll(e, H.row)
|
|
4133
4144
|
}))
|
|
@@ -4205,35 +4216,36 @@ function Ap({
|
|
|
4205
4216
|
drill: sa,
|
|
4206
4217
|
onClose: () => Yn(null),
|
|
4207
4218
|
onOpenRecord: (e, t) => {
|
|
4208
|
-
Yn(null),
|
|
4219
|
+
Yn(null), j.open({ collection: e, itemId: t, layoutSlug: null });
|
|
4209
4220
|
}
|
|
4210
4221
|
}
|
|
4211
4222
|
),
|
|
4212
4223
|
document.body
|
|
4213
4224
|
),
|
|
4214
4225
|
/* @__PURE__ */ a(
|
|
4215
|
-
|
|
4226
|
+
au,
|
|
4216
4227
|
{
|
|
4217
4228
|
item: Je,
|
|
4218
4229
|
stateLabels: cr,
|
|
4219
4230
|
collectionLabel: Ie,
|
|
4220
4231
|
claimsEnabled: Te,
|
|
4221
|
-
columnFormats:
|
|
4232
|
+
columnFormats: _s,
|
|
4233
|
+
extraMeta: s == null ? void 0 : s.extra_field_meta,
|
|
4222
4234
|
fieldLabel: (e) => A(`extra.${e}`, Ue(e)),
|
|
4223
4235
|
width: p == null ? void 0 : p.sheet_width,
|
|
4224
4236
|
itemLayout: p == null ? void 0 : p.item_layout,
|
|
4225
|
-
onOpenRecord: (e) =>
|
|
4237
|
+
onOpenRecord: (e) => kt(e),
|
|
4226
4238
|
onOpenChange: (e) => {
|
|
4227
4239
|
e || (Ye(null), ur(!1));
|
|
4228
4240
|
},
|
|
4229
4241
|
onClaim: (e) => He.mutate(e),
|
|
4230
|
-
onRelease: (e) =>
|
|
4231
|
-
workNextActive:
|
|
4232
|
-
onNext: () => Je &&
|
|
4242
|
+
onRelease: (e) => ht.mutate(e),
|
|
4243
|
+
workNextActive: Zl,
|
|
4244
|
+
onNext: () => Je && Qa(Je),
|
|
4233
4245
|
refetchItems: () => y.invalidateQueries({ queryKey: ["queue-items", l] })
|
|
4234
4246
|
}
|
|
4235
4247
|
),
|
|
4236
|
-
|
|
4248
|
+
xn.dialog
|
|
4237
4249
|
] });
|
|
4238
4250
|
}
|
|
4239
4251
|
function Lu({
|
|
@@ -4242,7 +4254,7 @@ function Lu({
|
|
|
4242
4254
|
onClose: q,
|
|
4243
4255
|
onOpenRecord: M
|
|
4244
4256
|
}) {
|
|
4245
|
-
const I =
|
|
4257
|
+
const I = ul(), { data: B, isLoading: y } = re({
|
|
4246
4258
|
queryKey: ["queue-agg-rows", l, S.row.collection, S.row.item_id, S.path],
|
|
4247
4259
|
queryFn: () => I.request(
|
|
4248
4260
|
D(`/queues/${l}/aggregate-rows`, {
|
|
@@ -4303,5 +4315,5 @@ function Lu({
|
|
|
4303
4315
|
);
|
|
4304
4316
|
}
|
|
4305
4317
|
export {
|
|
4306
|
-
|
|
4318
|
+
qp as QueueWorklist
|
|
4307
4319
|
};
|