@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,154 +1,156 @@
|
|
|
1
|
-
import { jsxs as n, jsx as r, Fragment as
|
|
2
|
-
import { useQueryClient as
|
|
3
|
-
import { ExternalLink as
|
|
4
|
-
import { useState as
|
|
1
|
+
import { jsxs as n, jsx as r, Fragment as le } from "react/jsx-runtime";
|
|
2
|
+
import { useQueryClient as de, useQuery as U, useMutation as z } from "@tanstack/react-query";
|
|
3
|
+
import { ExternalLink as ce, ArrowRight as G } from "lucide-react";
|
|
4
|
+
import { useState as I, useEffect as me } from "react";
|
|
5
5
|
import { toast as k } from "sonner";
|
|
6
|
-
import { useNivaroClient as
|
|
7
|
-
import { get as
|
|
8
|
-
import { formatMultiValue as
|
|
9
|
-
import { useLiveRecord as
|
|
10
|
-
import { usePresence as
|
|
11
|
-
import { userErrorMessage as
|
|
12
|
-
import { cn as
|
|
13
|
-
import { lockedMoveOffer as
|
|
14
|
-
import { TransitionRequirementsDialog as
|
|
15
|
-
import { Badge as
|
|
16
|
-
import { Sheet as
|
|
17
|
-
import { OwnerAvatars as
|
|
18
|
-
import { pathHeader as
|
|
19
|
-
import { useTransitionNote as
|
|
20
|
-
|
|
6
|
+
import { useNivaroClient as ue, useItemNavigation as pe } from "../../context.js";
|
|
7
|
+
import { get as J, post as X } from "../../lib/commands.js";
|
|
8
|
+
import { formatMultiValue as be } from "../../lib/format-value.js";
|
|
9
|
+
import { useLiveRecord as xe, batchTouches as P, LIVE_ASPECTS as A } from "../../lib/live.js";
|
|
10
|
+
import { usePresence as he } from "../../lib/presence-hooks.js";
|
|
11
|
+
import { userErrorMessage as fe } from "../../lib/safe-error.js";
|
|
12
|
+
import { cn as Y, formatRelative as ge, humanHours as ye } from "../../lib/utils.js";
|
|
13
|
+
import { lockedMoveOffer as ve, transitionRequirementsFromError as ke } from "../panels/PipelinePanel.js";
|
|
14
|
+
import { TransitionRequirementsDialog as Ne } from "../panels/TransitionRequirementsDialog.js";
|
|
15
|
+
import { Badge as we } from "../ui/badge.js";
|
|
16
|
+
import { Sheet as _e, SheetContent as qe, SheetHeader as Ce, SheetTitle as Se } from "../ui/sheet.js";
|
|
17
|
+
import { OwnerAvatars as Te } from "./OwnerAvatars.js";
|
|
18
|
+
import { pathHeader as Ke } from "./path-label.js";
|
|
19
|
+
import { useTransitionNote as Ie, needsTransitionNote as Pe } from "./transition-note.js";
|
|
20
|
+
import { extraValueText as Ae } from "./worklist-helpers.js";
|
|
21
|
+
function $e(t) {
|
|
21
22
|
return (t ?? []).filter((c) => c.in_row_menu !== !1);
|
|
22
23
|
}
|
|
23
|
-
function
|
|
24
|
-
return
|
|
24
|
+
function Ee(t) {
|
|
25
|
+
return ye(t);
|
|
25
26
|
}
|
|
26
|
-
const
|
|
27
|
-
function
|
|
27
|
+
const Me = Ke;
|
|
28
|
+
function f({ label: t, children: c }) {
|
|
28
29
|
return /* @__PURE__ */ n("div", { className: "bg-white px-3 py-2.5 dark:bg-card", children: [
|
|
29
30
|
/* @__PURE__ */ r("p", { className: "mb-0.5 text-[10px] font-medium uppercase tracking-wide text-slate-400 dark:text-muted-foreground", children: t }),
|
|
30
31
|
/* @__PURE__ */ r("div", { className: "text-[12px] text-slate-700 dark:text-slate-200", children: c })
|
|
31
32
|
] });
|
|
32
33
|
}
|
|
33
|
-
function
|
|
34
|
+
function Qe(t, c, N) {
|
|
34
35
|
return {
|
|
35
36
|
transition_id: t,
|
|
36
37
|
...c ? { comment: c } : {},
|
|
37
38
|
...N ? { lock_ack: !0 } : {}
|
|
38
39
|
};
|
|
39
40
|
}
|
|
40
|
-
function
|
|
41
|
+
function at({
|
|
41
42
|
item: t,
|
|
42
43
|
onOpenChange: c,
|
|
43
44
|
onClaim: N,
|
|
44
|
-
onRelease:
|
|
45
|
-
workNextActive:
|
|
46
|
-
onNext:
|
|
47
|
-
refetchItems:
|
|
45
|
+
onRelease: Z,
|
|
46
|
+
workNextActive: L,
|
|
47
|
+
onNext: $,
|
|
48
|
+
refetchItems: E,
|
|
48
49
|
stateLabels: w,
|
|
49
|
-
collectionLabel:
|
|
50
|
-
claimsEnabled:
|
|
51
|
-
columnFormats:
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
50
|
+
collectionLabel: M,
|
|
51
|
+
claimsEnabled: ee = !0,
|
|
52
|
+
columnFormats: y,
|
|
53
|
+
extraMeta: _,
|
|
54
|
+
fieldLabel: q,
|
|
55
|
+
width: te,
|
|
56
|
+
itemLayout: Q,
|
|
57
|
+
onOpenRecord: R
|
|
56
58
|
}) {
|
|
57
|
-
var
|
|
58
|
-
const
|
|
59
|
-
|
|
60
|
-
const { data: l } =
|
|
61
|
-
queryKey: ["queue-sheet-instance", o,
|
|
62
|
-
queryFn: () =>
|
|
63
|
-
enabled: !!o && !!
|
|
64
|
-
}), { data: b } =
|
|
65
|
-
queryKey: ["queue-sheet-comments", o,
|
|
66
|
-
queryFn: () =>
|
|
67
|
-
enabled: !!o && !!
|
|
68
|
-
}), { viewers: x } =
|
|
59
|
+
var O;
|
|
60
|
+
const g = de(), v = ue(), { open: re, urlFor: ae } = pe(), [C, j] = I(""), [m, S] = I(null), [T, p] = I(null), F = Ie(), o = t == null ? void 0 : t.collection, i = t == null ? void 0 : t.item_id;
|
|
61
|
+
me(() => p(null), [o, i]);
|
|
62
|
+
const { data: l } = U({
|
|
63
|
+
queryKey: ["queue-sheet-instance", o, i],
|
|
64
|
+
queryFn: () => v.request(J(`/pipelines/instance/${o}/${i}`)).then((e) => e.data),
|
|
65
|
+
enabled: !!o && !!i
|
|
66
|
+
}), { data: b } = U({
|
|
67
|
+
queryKey: ["queue-sheet-comments", o, i],
|
|
68
|
+
queryFn: () => v.request(J("/comments", { collection: o, item: i })).then((e) => ({ data: (e.data ?? []).filter((a) => !a.deleted) })).catch(() => ({ data: [] })),
|
|
69
|
+
enabled: !!o && !!i
|
|
70
|
+
}), { viewers: x } = he(o, i), s = z({
|
|
69
71
|
mutationFn: ({
|
|
70
72
|
transitionId: e,
|
|
71
73
|
comment: a,
|
|
72
|
-
lockAck:
|
|
73
|
-
}) =>
|
|
74
|
-
|
|
75
|
-
`/pipelines/instance/${o}/${
|
|
76
|
-
|
|
74
|
+
lockAck: h
|
|
75
|
+
}) => v.request(
|
|
76
|
+
X(
|
|
77
|
+
`/pipelines/instance/${o}/${i}/transition`,
|
|
78
|
+
Qe(e, a, h)
|
|
77
79
|
)
|
|
78
80
|
),
|
|
79
81
|
onSuccess: () => {
|
|
80
|
-
|
|
82
|
+
S(null), p(null), g.invalidateQueries({ queryKey: ["queue-sheet-instance", o, i] }), E(), k.success("Transitioned");
|
|
81
83
|
},
|
|
82
|
-
onError: (e, { transitionId: a, comment:
|
|
84
|
+
onError: (e, { transitionId: a, comment: h }) => {
|
|
83
85
|
p(null);
|
|
84
|
-
const
|
|
85
|
-
if (
|
|
86
|
-
const u = ((l == null ? void 0 : l.available_transitions) ?? []).find((se) => se.id === a),
|
|
87
|
-
k.warning(
|
|
88
|
-
id: `nvr-locked-move:${o}:${String(
|
|
86
|
+
const V = ve(e);
|
|
87
|
+
if (V) {
|
|
88
|
+
const u = ((l == null ? void 0 : l.available_transitions) ?? []).find((se) => se.id === a), ie = (u == null ? void 0 : u.label) || "Move";
|
|
89
|
+
k.warning(V.message, {
|
|
90
|
+
id: `nvr-locked-move:${o}:${String(i)}`,
|
|
89
91
|
duration: 2e4,
|
|
90
92
|
action: {
|
|
91
|
-
label: `${
|
|
92
|
-
onClick: () =>
|
|
93
|
+
label: `${ie} anyway`,
|
|
94
|
+
onClick: () => s.mutate({ transitionId: a, comment: h, lockAck: !0 })
|
|
93
95
|
},
|
|
94
96
|
cancel: { label: "Wait", onClick: () => {
|
|
95
97
|
} }
|
|
96
98
|
});
|
|
97
99
|
return;
|
|
98
100
|
}
|
|
99
|
-
const
|
|
100
|
-
if (
|
|
101
|
-
|
|
102
|
-
payload:
|
|
101
|
+
const W = ke(e);
|
|
102
|
+
if (W) {
|
|
103
|
+
S((u) => ({
|
|
104
|
+
payload: W,
|
|
103
105
|
transitionId: a,
|
|
104
|
-
comment:
|
|
106
|
+
comment: h,
|
|
105
107
|
revision: ((u == null ? void 0 : u.revision) ?? 0) + 1
|
|
106
108
|
}));
|
|
107
109
|
return;
|
|
108
110
|
}
|
|
109
|
-
k.error(
|
|
111
|
+
k.error(fe(e, "Transition failed"));
|
|
110
112
|
}
|
|
111
|
-
}),
|
|
112
|
-
mutationFn: (e) =>
|
|
113
|
+
}), B = z({
|
|
114
|
+
mutationFn: (e) => v.request(X("/comments", { collection: o, item: i, text: e })),
|
|
113
115
|
onSuccess: () => {
|
|
114
|
-
|
|
116
|
+
j(""), g.invalidateQueries({ queryKey: ["queue-sheet-comments", o, i] });
|
|
115
117
|
},
|
|
116
118
|
onError: () => k.error("Failed to post comment")
|
|
117
119
|
});
|
|
118
|
-
|
|
119
|
-
|
|
120
|
+
xe(o, i, (e) => {
|
|
121
|
+
P(e, A.state) ? (g.invalidateQueries({ queryKey: ["queue-sheet-instance", o, i] }), e.own || E()) : P(e, A.owners) && g.invalidateQueries({ queryKey: ["queue-sheet-instance", o, i] }), P(e, A.comments) && g.invalidateQueries({ queryKey: ["queue-sheet-comments", o, i] });
|
|
120
122
|
});
|
|
121
|
-
const
|
|
122
|
-
const a =
|
|
123
|
+
const K = $e(l == null ? void 0 : l.available_transitions), d = T && K.some((e) => e.id === T.id) ? T : null, D = new Map(((l == null ? void 0 : l.states) ?? []).map((e) => [e.id, e])), H = (e) => {
|
|
124
|
+
const a = D.get(e.to_state);
|
|
123
125
|
return e.label || (a == null ? void 0 : a.label) || (a == null ? void 0 : a.key) || "Move";
|
|
124
|
-
},
|
|
125
|
-
const a =
|
|
126
|
+
}, ne = (e) => {
|
|
127
|
+
const a = D.get(e.to_state);
|
|
126
128
|
return (a == null ? void 0 : a.label) || (a == null ? void 0 : a.key) || e.label || "the next step";
|
|
127
|
-
},
|
|
128
|
-
if (!
|
|
129
|
-
if (
|
|
129
|
+
}, oe = async (e) => {
|
|
130
|
+
if (!s.isPending) {
|
|
131
|
+
if (Pe(e)) {
|
|
130
132
|
p(null);
|
|
131
|
-
const a = await
|
|
133
|
+
const a = await F.ask(H(e));
|
|
132
134
|
if (!a) return;
|
|
133
|
-
|
|
135
|
+
s.mutate({ transitionId: e.id, comment: a });
|
|
134
136
|
return;
|
|
135
137
|
}
|
|
136
138
|
p(e);
|
|
137
139
|
}
|
|
138
140
|
};
|
|
139
|
-
return /* @__PURE__ */ n(
|
|
141
|
+
return /* @__PURE__ */ n(_e, { open: !!t, onOpenChange: c, children: [
|
|
140
142
|
/* @__PURE__ */ r(
|
|
141
|
-
|
|
143
|
+
qe,
|
|
142
144
|
{
|
|
143
145
|
side: "right",
|
|
144
146
|
className: "flex max-w-full flex-col gap-0 p-0",
|
|
145
|
-
style: { width:
|
|
146
|
-
children: t && /* @__PURE__ */ n(
|
|
147
|
-
/* @__PURE__ */ r(
|
|
147
|
+
style: { width: te ?? 480, maxWidth: "96vw" },
|
|
148
|
+
children: t && /* @__PURE__ */ n(le, { children: [
|
|
149
|
+
/* @__PURE__ */ r(Ce, { className: "shrink-0 border-b border-slate-200 px-5 py-4 dark:border-border", children: /* @__PURE__ */ n("div", { className: "flex items-start justify-between gap-3 pr-6", children: [
|
|
148
150
|
/* @__PURE__ */ n("div", { className: "min-w-0", children: [
|
|
149
|
-
/* @__PURE__ */ r(
|
|
151
|
+
/* @__PURE__ */ r(Se, { className: "truncate text-[15px] font-semibold", children: t.label }),
|
|
150
152
|
/* @__PURE__ */ n("div", { className: "mt-1.5 flex items-center gap-2", children: [
|
|
151
|
-
/* @__PURE__ */ r(
|
|
153
|
+
/* @__PURE__ */ r(we, { variant: "outline", children: M ? M(t.collection) : t.collection }),
|
|
152
154
|
x.length > 0 && /* @__PURE__ */ n(
|
|
153
155
|
"span",
|
|
154
156
|
{
|
|
@@ -178,60 +180,63 @@ function et({
|
|
|
178
180
|
/* @__PURE__ */ n(
|
|
179
181
|
"a",
|
|
180
182
|
{
|
|
181
|
-
href:
|
|
183
|
+
href: ae({
|
|
182
184
|
collection: t.collection,
|
|
183
185
|
itemId: t.item_id,
|
|
184
|
-
layoutSlug:
|
|
186
|
+
layoutSlug: Q ?? null
|
|
185
187
|
}),
|
|
186
188
|
onClick: (e) => {
|
|
187
|
-
e.metaKey || e.ctrlKey || e.shiftKey || e.altKey || e.button !== 0 || (e.preventDefault(),
|
|
189
|
+
e.metaKey || e.ctrlKey || e.shiftKey || e.altKey || e.button !== 0 || (e.preventDefault(), R ? R(t) : re({
|
|
188
190
|
collection: t.collection,
|
|
189
191
|
itemId: t.item_id,
|
|
190
|
-
layoutSlug:
|
|
192
|
+
layoutSlug: Q ?? null
|
|
191
193
|
}));
|
|
192
194
|
},
|
|
193
195
|
className: "flex shrink-0 items-center gap-1 text-[12px] font-medium text-nvr-navy hover:underline dark:text-nvr-cyan",
|
|
194
196
|
children: [
|
|
195
197
|
"Open ",
|
|
196
|
-
/* @__PURE__ */ r(
|
|
198
|
+
/* @__PURE__ */ r(ce, { className: "h-3 w-3" })
|
|
197
199
|
]
|
|
198
200
|
}
|
|
199
201
|
)
|
|
200
202
|
] }) }),
|
|
201
203
|
/* @__PURE__ */ n("div", { className: "flex-1 overflow-y-auto px-5 py-4", children: [
|
|
202
204
|
/* @__PURE__ */ n("div", { className: "mb-4 grid grid-cols-2 gap-px overflow-hidden rounded-lg border border-slate-200 bg-slate-200 dark:border-border dark:bg-border", children: [
|
|
203
|
-
/* @__PURE__ */ r(
|
|
204
|
-
/* @__PURE__ */ r(
|
|
205
|
-
/* @__PURE__ */ r(
|
|
205
|
+
/* @__PURE__ */ r(f, { label: "Owners", children: /* @__PURE__ */ r(Te, { owners: t.owners, max: 6 }) }),
|
|
206
|
+
/* @__PURE__ */ r(f, { label: "Claimed by", children: ((O = t.claimed_by) == null ? void 0 : O.name) ?? "—" }),
|
|
207
|
+
/* @__PURE__ */ r(f, { label: "SLA", children: t.sla_status ? /* @__PURE__ */ r(
|
|
206
208
|
"span",
|
|
207
209
|
{
|
|
208
|
-
className:
|
|
210
|
+
className: Y(
|
|
209
211
|
"rounded px-1.5 py-0.5 text-[11px] font-medium",
|
|
210
212
|
t.sla_status === "breached" ? "bg-red-50 text-red-600 dark:bg-red-500/10 dark:text-red-400" : t.sla_status === "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"
|
|
211
213
|
),
|
|
212
214
|
children: t.sla_status
|
|
213
215
|
}
|
|
214
216
|
) : "—" }),
|
|
215
|
-
/* @__PURE__ */ r(
|
|
216
|
-
t.at_risk && /* @__PURE__ */ r(
|
|
217
|
-
Object.entries(t.extra ?? {}).map(([e, a]) => /* @__PURE__ */ r(
|
|
217
|
+
/* @__PURE__ */ r(f, { label: "Aging", children: Ee(t.aging_hours) }),
|
|
218
|
+
t.at_risk && /* @__PURE__ */ r(f, { label: "Risk", children: /* @__PURE__ */ r("span", { className: "text-red-500", children: "⚑ At risk" }) }),
|
|
219
|
+
Object.entries(t.extra ?? {}).map(([e, a]) => /* @__PURE__ */ r(f, { label: (q == null ? void 0 : q(e)) || Me(e), children: a == null || a === "" ? "—" : y != null && y[e] ? be(String(a), y[e]) : Ae(
|
|
220
|
+
_ == null ? void 0 : _.find((h) => h.path === e),
|
|
221
|
+
String(a)
|
|
222
|
+
) }, e))
|
|
218
223
|
] }),
|
|
219
|
-
|
|
224
|
+
K.length > 0 && /* @__PURE__ */ n("div", { className: "mb-4", children: [
|
|
220
225
|
/* @__PURE__ */ r("p", { className: "mb-1.5 text-[11px] font-medium uppercase tracking-wide text-slate-400 dark:text-muted-foreground", children: "Transitions" }),
|
|
221
|
-
/* @__PURE__ */ r("div", { className: "flex flex-wrap gap-1.5", children:
|
|
226
|
+
/* @__PURE__ */ r("div", { className: "flex flex-wrap gap-1.5", children: K.map((e) => /* @__PURE__ */ n(
|
|
222
227
|
"button",
|
|
223
228
|
{
|
|
224
229
|
type: "button",
|
|
225
|
-
disabled:
|
|
230
|
+
disabled: s.isPending,
|
|
226
231
|
"aria-pressed": (d == null ? void 0 : d.id) === e.id,
|
|
227
|
-
onClick: () => void
|
|
228
|
-
className:
|
|
232
|
+
onClick: () => void oe(e),
|
|
233
|
+
className: Y(
|
|
229
234
|
"flex items-center gap-1 rounded-md border border-slate-200 bg-white px-2.5 py-1.5 text-[12px] font-medium text-slate-700 hover:border-nvr-cyan hover:text-nvr-navy disabled:opacity-50 dark:border-border dark:bg-card dark:text-slate-200 dark:hover:text-nvr-cyan",
|
|
230
235
|
(d == null ? void 0 : d.id) === e.id && "border-nvr-cyan"
|
|
231
236
|
),
|
|
232
237
|
children: [
|
|
233
|
-
|
|
234
|
-
/* @__PURE__ */ r(
|
|
238
|
+
H(e),
|
|
239
|
+
/* @__PURE__ */ r(G, { className: "h-3 w-3 text-slate-400" })
|
|
235
240
|
]
|
|
236
241
|
},
|
|
237
242
|
e.id
|
|
@@ -249,7 +254,7 @@ function et({
|
|
|
249
254
|
/* @__PURE__ */ r("span", { className: "font-semibold", children: t.label }),
|
|
250
255
|
" to",
|
|
251
256
|
" ",
|
|
252
|
-
/* @__PURE__ */ r("span", { className: "font-semibold", children:
|
|
257
|
+
/* @__PURE__ */ r("span", { className: "font-semibold", children: ne(d) }),
|
|
253
258
|
"?"
|
|
254
259
|
] }),
|
|
255
260
|
/* @__PURE__ */ n("div", { className: "mt-2 flex gap-2", children: [
|
|
@@ -257,17 +262,17 @@ function et({
|
|
|
257
262
|
"button",
|
|
258
263
|
{
|
|
259
264
|
type: "button",
|
|
260
|
-
disabled:
|
|
261
|
-
onClick: () =>
|
|
265
|
+
disabled: s.isPending,
|
|
266
|
+
onClick: () => s.mutate({ transitionId: d.id }),
|
|
262
267
|
className: "h-7 rounded-md bg-nvr-cyan px-3 text-[12px] font-semibold text-white disabled:opacity-50",
|
|
263
|
-
children:
|
|
268
|
+
children: s.isPending ? "Moving…" : "Confirm"
|
|
264
269
|
}
|
|
265
270
|
),
|
|
266
271
|
/* @__PURE__ */ r(
|
|
267
272
|
"button",
|
|
268
273
|
{
|
|
269
274
|
type: "button",
|
|
270
|
-
disabled:
|
|
275
|
+
disabled: s.isPending,
|
|
271
276
|
onClick: () => p(null),
|
|
272
277
|
className: "h-7 rounded-md border border-slate-200 bg-white px-3 text-[12px] text-slate-600 hover:bg-muted disabled:opacity-50 dark:border-border dark:bg-card dark:text-slate-300",
|
|
273
278
|
children: "Keep"
|
|
@@ -278,11 +283,11 @@ function et({
|
|
|
278
283
|
}
|
|
279
284
|
)
|
|
280
285
|
] }),
|
|
281
|
-
(
|
|
286
|
+
(ee || t.claimed_by) && /* @__PURE__ */ r("div", { className: "mb-4", children: /* @__PURE__ */ r(
|
|
282
287
|
"button",
|
|
283
288
|
{
|
|
284
289
|
type: "button",
|
|
285
|
-
onClick: () => t.claimed_by ?
|
|
290
|
+
onClick: () => t.claimed_by ? Z(t) : N(t),
|
|
286
291
|
className: "rounded-md bg-nvr-cyan px-3 py-1.5 text-[12px] font-medium text-white hover:bg-nvr-cyan/90",
|
|
287
292
|
children: t.claimed_by ? "Release claim" : "Claim this item"
|
|
288
293
|
}
|
|
@@ -293,7 +298,7 @@ function et({
|
|
|
293
298
|
((b == null ? void 0 : b.data) ?? []).map((e) => /* @__PURE__ */ n("div", { className: "rounded-md bg-slate-50 px-3 py-2 dark:bg-muted/40", children: [
|
|
294
299
|
/* @__PURE__ */ n("p", { className: "text-[11px] font-medium text-slate-500 dark:text-muted-foreground", children: [
|
|
295
300
|
[e.first_name, e.last_name].filter(Boolean).join(" ") || e.email || "—",
|
|
296
|
-
/* @__PURE__ */ r("span", { className: "ml-1.5 font-normal text-slate-400", children:
|
|
301
|
+
/* @__PURE__ */ r("span", { className: "ml-1.5 font-normal text-slate-400", children: ge(e.created_at) })
|
|
297
302
|
] }),
|
|
298
303
|
/* @__PURE__ */ r("p", { className: "mt-0.5 whitespace-pre-wrap text-[12px] text-slate-700 dark:text-slate-200", children: e.text })
|
|
299
304
|
] }, e.id)),
|
|
@@ -303,8 +308,8 @@ function et({
|
|
|
303
308
|
/* @__PURE__ */ r(
|
|
304
309
|
"textarea",
|
|
305
310
|
{
|
|
306
|
-
value:
|
|
307
|
-
onChange: (e) =>
|
|
311
|
+
value: C,
|
|
312
|
+
onChange: (e) => j(e.target.value),
|
|
308
313
|
placeholder: "Add a comment…",
|
|
309
314
|
rows: 2,
|
|
310
315
|
className: "w-full rounded-md border border-slate-200 bg-white px-2.5 py-1.5 text-[12px] focus:border-nvr-cyan focus:outline-none dark:border-border dark:bg-card"
|
|
@@ -314,8 +319,8 @@ function et({
|
|
|
314
319
|
"button",
|
|
315
320
|
{
|
|
316
321
|
type: "button",
|
|
317
|
-
disabled: !
|
|
318
|
-
onClick: () =>
|
|
322
|
+
disabled: !C.trim() || B.isPending,
|
|
323
|
+
onClick: () => B.mutate(C.trim()),
|
|
319
324
|
className: "mt-1 rounded-md border border-slate-200 px-2.5 py-1 text-[12px] font-medium text-slate-600 hover:text-slate-800 disabled:opacity-50 dark:border-border dark:text-slate-300",
|
|
320
325
|
children: "Post"
|
|
321
326
|
}
|
|
@@ -323,15 +328,15 @@ function et({
|
|
|
323
328
|
] })
|
|
324
329
|
] })
|
|
325
330
|
] }),
|
|
326
|
-
|
|
331
|
+
L && $ && /* @__PURE__ */ r("div", { className: "shrink-0 border-t border-slate-200 px-5 py-3 dark:border-border", children: /* @__PURE__ */ n(
|
|
327
332
|
"button",
|
|
328
333
|
{
|
|
329
334
|
type: "button",
|
|
330
|
-
onClick:
|
|
335
|
+
onClick: $,
|
|
331
336
|
className: "flex w-full items-center justify-center gap-1.5 rounded-md bg-nvr-cyan px-3 py-2 text-[13px] font-semibold text-white hover:bg-nvr-cyan/90",
|
|
332
337
|
children: [
|
|
333
338
|
"Next ",
|
|
334
|
-
/* @__PURE__ */ r(
|
|
339
|
+
/* @__PURE__ */ r(G, { className: "h-3.5 w-3.5" })
|
|
335
340
|
]
|
|
336
341
|
}
|
|
337
342
|
) })
|
|
@@ -339,25 +344,25 @@ function et({
|
|
|
339
344
|
}
|
|
340
345
|
),
|
|
341
346
|
m && /* @__PURE__ */ r(
|
|
342
|
-
|
|
347
|
+
Ne,
|
|
343
348
|
{
|
|
344
349
|
payload: m.payload,
|
|
345
350
|
transitionId: m.transitionId,
|
|
346
351
|
isRetry: m.revision > 1,
|
|
347
|
-
onSubmitted: () =>
|
|
352
|
+
onSubmitted: () => s.mutate({
|
|
348
353
|
transitionId: m.transitionId,
|
|
349
354
|
comment: m.comment
|
|
350
355
|
}),
|
|
351
|
-
executing:
|
|
352
|
-
onClose: () =>
|
|
356
|
+
executing: s.isPending,
|
|
357
|
+
onClose: () => S(null)
|
|
353
358
|
},
|
|
354
359
|
m.revision
|
|
355
360
|
),
|
|
356
|
-
|
|
361
|
+
F.dialog
|
|
357
362
|
] });
|
|
358
363
|
}
|
|
359
364
|
export {
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
365
|
+
at as QueueItemSheet,
|
|
366
|
+
$e as peekTransitions,
|
|
367
|
+
Qe as sheetTransitionBody
|
|
363
368
|
};
|