@nivaro/react 0.3.116 → 0.3.118
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/full.css +1 -1
- package/dist/hooks/useSessionRecorder.js +1 -1
- package/dist/index.d.ts +140 -14
- package/dist/index.js +488 -485
- package/dist/shared/components/ActivityEntry.js +130 -125
- package/dist/shared/components/AgentPresenceChip.js +36 -26
- package/dist/shared/components/CellCopyLayer.js +50 -45
- package/dist/shared/components/CollectionBrowserView.js +3855 -3785
- package/dist/shared/components/FilePreviewLightbox.js +96 -58
- package/dist/shared/components/InStep.js +18 -17
- package/dist/shared/components/ItemEditForm.js +4220 -4175
- package/dist/shared/components/JobsTray.js +8 -8
- package/dist/shared/components/LiveNewMatchesPill.js +21 -14
- package/dist/shared/components/LiveOffNote.js +3 -2
- package/dist/shared/components/LiveRowMark.js +53 -23
- package/dist/shared/components/LiveTraceView.js +162 -123
- package/dist/shared/components/MyWorkView.js +320 -299
- package/dist/shared/components/NotificationBell.js +14 -14
- package/dist/shared/components/OverflowRail.js +1 -1
- package/dist/shared/components/PageRenderer.js +120 -116
- package/dist/shared/components/ProfileView.js +203 -202
- package/dist/shared/components/RealtimeStatusBanner.js +31 -29
- package/dist/shared/components/RecordDrilldownSheet.js +7 -7
- package/dist/shared/components/RecordHoverCard.js +102 -84
- package/dist/shared/components/RecordReadView.js +146 -146
- package/dist/shared/components/ReportView.js +1086 -1091
- package/dist/shared/components/ScreenRefreshButton.js +34 -32
- package/dist/shared/components/TipLayer.js +65 -58
- package/dist/shared/components/WidgetImageMenu.js +83 -43
- package/dist/shared/components/activity/RecordActivityStream.js +175 -173
- package/dist/shared/components/bulk/BulkSelectionNotices.js +142 -119
- package/dist/shared/components/cbv/column-totals.js +62 -57
- package/dist/shared/components/change-proposals/ChangeProposalsPanel.js +158 -143
- package/dist/shared/components/change-proposals/ProposeChangeButton.js +17 -11
- package/dist/shared/components/change-proposals/ProposeChangeDialog.js +201 -173
- package/dist/shared/components/charts/category-axis.js +93 -0
- package/dist/shared/components/chat/ChatAnalyticsView.js +27 -27
- package/dist/shared/components/chat/HuddleAnalyticsTab.js +17 -17
- package/dist/shared/components/collections-directory/CollectionsToolbar.js +39 -41
- package/dist/shared/components/collections-directory/page-model.js +72 -67
- package/dist/shared/components/integrations/RecordIntegrationPreview.js +48 -56
- package/dist/shared/components/integrations/SendStatus.js +65 -59
- package/dist/shared/components/integrations/console/ReadyToSendView.js +275 -209
- package/dist/shared/components/integrations/console/SignalCard.js +237 -230
- package/dist/shared/components/item-edit/CatalogPickerField.js +227 -205
- package/dist/shared/components/item-edit/ChangedAfterApprovalBadge.js +131 -92
- package/dist/shared/components/item-edit/CloneDialog.js +191 -161
- package/dist/shared/components/item-edit/DerivedCauseNote.js +44 -30
- package/dist/shared/components/item-edit/DraftRecoveryBanner.js +153 -134
- package/dist/shared/components/item-edit/FieldComments.js +54 -53
- package/dist/shared/components/item-edit/FieldPointer.js +82 -67
- package/dist/shared/components/item-edit/FieldRow.js +106 -100
- package/dist/shared/components/item-edit/FieldSourceBadge.js +58 -56
- package/dist/shared/components/item-edit/FilePickerField.js +452 -387
- package/dist/shared/components/item-edit/HeaderSummaryChip.js +78 -56
- package/dist/shared/components/item-edit/HeaderTools.js +94 -85
- package/dist/shared/components/item-edit/InlineTableField.js +1242 -1218
- package/dist/shared/components/item-edit/ListNeighborNav.js +47 -50
- package/dist/shared/components/item-edit/LiveTraceSheet.js +15 -10
- package/dist/shared/components/item-edit/MembershipSetField.js +285 -254
- package/dist/shared/components/item-edit/OutboxReviewTray.js +155 -144
- package/dist/shared/components/item-edit/QueueReturnChip.js +15 -36
- package/dist/shared/components/item-edit/RecalcValue.js +57 -32
- package/dist/shared/components/item-edit/RecordHelpChip.js +21 -22
- package/dist/shared/components/item-edit/RecordLiveSync.js +283 -231
- package/dist/shared/components/item-edit/RelationCombobox.js +439 -393
- package/dist/shared/components/item-edit/RemoteChangeUi.js +292 -224
- package/dist/shared/components/item-edit/RemoteUploads.js +26 -20
- package/dist/shared/components/item-edit/RemovedLineNote.js +77 -67
- package/dist/shared/components/item-edit/RichTextEditorImpl.js +184 -179
- package/dist/shared/components/item-edit/ScheduledChangeChip.js +168 -134
- package/dist/shared/components/item-edit/SectionPresence.js +18 -10
- package/dist/shared/components/item-edit/SplitLinesButton.js +163 -139
- package/dist/shared/components/item-edit/UserChip.js +1 -1
- package/dist/shared/components/item-edit/file-live.js +69 -54
- package/dist/shared/components/item-edit/layout-switch.js +98 -89
- package/dist/shared/components/item-edit/partner-needs.js +12 -12
- package/dist/shared/components/item-edit/removed-line.js +31 -25
- package/dist/shared/components/layout-editor/pickers/field-picker.js +112 -104
- package/dist/shared/components/list/ListViewers.js +46 -35
- package/dist/shared/components/notifications/NotificationCenterView.js +479 -437
- package/dist/shared/components/panels/AccessDeniedPanel.js +176 -101
- package/dist/shared/components/panels/AlertBanners.js +82 -72
- package/dist/shared/components/panels/BranchLanes.js +22 -22
- package/dist/shared/components/panels/CommentImages.js +123 -102
- package/dist/shared/components/panels/CommentPanel.js +186 -185
- package/dist/shared/components/panels/ExternalRequestsChip.js +111 -119
- package/dist/shared/components/panels/OwnerOpenedLine.js +31 -24
- package/dist/shared/components/panels/PipelinePanel.js +2037 -1885
- package/dist/shared/components/panels/ResubmissionDiff.js +163 -142
- package/dist/shared/components/pipeline/BindingStartStateSettings.js +163 -0
- package/dist/shared/components/pipeline/OwnerMatrixSheet.js +400 -288
- package/dist/shared/components/pipeline/PipelineEditorView.js +320 -299
- package/dist/shared/components/profile/AgentNameField.js +107 -81
- package/dist/shared/components/profile/AgentsPanel.js +184 -184
- package/dist/shared/components/profile/PersonAccess.js +599 -495
- package/dist/shared/components/profile/SignInTroubleshooter.js +160 -127
- package/dist/shared/components/profile/SignedInDevices.js +17 -17
- package/dist/shared/components/profile/primitives.js +1 -1
- package/dist/shared/components/queue/OwnerAvatars.js +91 -54
- package/dist/shared/components/queue/QueueTeamStrip.js +56 -46
- package/dist/shared/components/queue/QueueWorklist.js +1002 -983
- package/dist/shared/components/support/AssignRules.js +1733 -0
- package/dist/shared/components/support/PersonPick.js +88 -0
- package/dist/shared/components/support/RequestList.js +790 -0
- package/dist/shared/components/support/ScreenShare.js +158 -152
- package/dist/shared/components/support/SupportRequestDialog.js +50 -48
- package/dist/shared/components/support/SupportView.js +140 -246
- package/dist/shared/components/support/TicketDetailSheet.js +82 -75
- package/dist/shared/components/support/TicketSlowScreens.js +9 -9
- package/dist/shared/components/support/assign-rules-text.js +171 -0
- package/dist/shared/components/support/support-list.js +125 -0
- package/dist/shared/components/ui/SimpleSelect.js +28 -20
- package/dist/shared/components/ui/checkbox.js +6 -6
- package/dist/shared/components/ui/select.js +43 -39
- package/dist/shared/components/ui/sheet.js +9 -9
- package/dist/shared/components/ui/switch.js +12 -11
- package/dist/shared/components/watch-list/WatchDock.js +532 -459
- package/dist/shared/components/watch-list/WatchExtras.js +332 -286
- package/dist/shared/components/watch-list/WatchRows.js +164 -140
- package/dist/shared/lib/activity-sentence.js +103 -91
- package/dist/shared/lib/agent-presence.js +27 -21
- package/dist/shared/lib/approval-progress.js +2 -2
- package/dist/shared/lib/copy-rules.js +31 -24
- package/dist/shared/lib/derived-causes.js +113 -78
- package/dist/shared/lib/grid-cursors.js +26 -26
- package/dist/shared/lib/label-flash.js +27 -0
- package/dist/shared/lib/list-return.js +137 -125
- package/dist/shared/lib/live-deltas.js +40 -34
- package/dist/shared/lib/live-groups.js +56 -52
- package/dist/shared/lib/live-preference.js +64 -59
- package/dist/shared/lib/live-screen.js +223 -192
- package/dist/shared/lib/partner-failure.js +11 -11
- package/dist/shared/lib/rollup-recalc.js +68 -64
- package/dist/shared/lib/screen-refresh.js +74 -68
- package/dist/shared/lib/screen-share.js +108 -104
- package/dist/shared/lib/send-status.js +77 -61
- package/dist/shared/lib/text-diff-window.js +29 -0
- package/dist/shared/lib/use-query-entry.js +17 -0
- package/dist/shared/lib/watch-list.js +210 -209
- package/dist/shared/lib/widget-image-render.js +72 -49
- package/package.json +1 -1
|
@@ -1,85 +1,92 @@
|
|
|
1
1
|
import { jsx as e, jsxs as n } from "react/jsx-runtime";
|
|
2
|
-
import { useQueryClient as
|
|
3
|
-
import { Check as
|
|
4
|
-
import { useState as
|
|
5
|
-
import { useApiFetchConfig as
|
|
6
|
-
import { useDeadlineNow as
|
|
7
|
-
import { useLiveEvent as
|
|
8
|
-
import { useLiveOps as
|
|
9
|
-
import { resolveNotificationTarget as
|
|
10
|
-
import { usePrefetchIntent as
|
|
11
|
-
import { useOptionalRealtime as
|
|
12
|
-
import { usePeekOrOpen as
|
|
13
|
-
import { userErrorMessage as
|
|
14
|
-
import {
|
|
15
|
-
import { cn as
|
|
16
|
-
import { AgentQuestionsCard as
|
|
17
|
-
import { FirstWeekCard as
|
|
18
|
-
import { TaskDoButton as
|
|
19
|
-
import { openChatRoom as
|
|
20
|
-
import { useMyRecordRooms as
|
|
21
|
-
import { useCoveringQuery as
|
|
22
|
-
import { LearningPathCard as
|
|
23
|
-
import { RequiredVideosCard as
|
|
24
|
-
import { SkeletonBar as
|
|
25
|
-
import { TickerNumber as
|
|
26
|
-
import { UserAvatar as
|
|
27
|
-
const
|
|
2
|
+
import { useQueryClient as ve, useQuery as _e, useMutation as z } from "@tanstack/react-query";
|
|
3
|
+
import { Check as Ce, Bot as Se } from "lucide-react";
|
|
4
|
+
import { useState as S, useRef as H, useMemo as oe, useEffect as J } from "react";
|
|
5
|
+
import { useApiFetchConfig as $e, useItemNavigation as Te, useNavigation as je } from "../context.js";
|
|
6
|
+
import { useDeadlineNow as Oe, liveSlaReading as Ie } from "../lib/deadline-ticker.js";
|
|
7
|
+
import { useLiveEvent as Le } from "../lib/live.js";
|
|
8
|
+
import { useLiveOps as Me, useFreshIds as Ae } from "../lib/live-ops.js";
|
|
9
|
+
import { resolveNotificationTarget as ie, runNotificationTarget as De } from "../lib/notification-target.js";
|
|
10
|
+
import { usePrefetchIntent as qe } from "../lib/prefetch.js";
|
|
11
|
+
import { useOptionalRealtime as Fe } from "../lib/realtime.js";
|
|
12
|
+
import { usePeekOrOpen as Ue, peekable as le } from "../lib/record-peek.js";
|
|
13
|
+
import { userErrorMessage as We } from "../lib/safe-error.js";
|
|
14
|
+
import { slaChip as Ee, withinDay as Pe } from "../lib/sla-chip.js";
|
|
15
|
+
import { cn as q, formatRelative as Qe } from "../lib/utils.js";
|
|
16
|
+
import { AgentQuestionsCard as Ke } from "./AgentQuestionsCard.js";
|
|
17
|
+
import { FirstWeekCard as Be } from "./ai/FirstWeekCard.js";
|
|
18
|
+
import { TaskDoButton as ze } from "./ai/TaskDo.js";
|
|
19
|
+
import { openChatRoom as He, canOpenChatRoom as Je } from "./chat/chat-core.js";
|
|
20
|
+
import { useMyRecordRooms as Re } from "./chat/chat-hooks.js";
|
|
21
|
+
import { useCoveringQuery as Ve, DelegateCoverLine as Ye } from "./DelegateCoverLine.js";
|
|
22
|
+
import { LearningPathCard as Ze } from "./help-videos/viewer/LearningPathCard.js";
|
|
23
|
+
import { RequiredVideosCard as Ge } from "./help-videos/viewer/RequiredVideosCard.js";
|
|
24
|
+
import { SkeletonBar as Xe, ListSkeleton as et } from "./Skeletons.js";
|
|
25
|
+
import { TickerNumber as tt } from "./TickerNumber.js";
|
|
26
|
+
import { UserAvatar as rt } from "./UserAvatar.js";
|
|
27
|
+
const at = 8e3, ce = ["records", "proposals", "tasks", "team", "waiting", "notifications"], me = /* @__PURE__ */ new Set(["records", "proposals"]), ue = {
|
|
28
28
|
records: "Waiting on you",
|
|
29
29
|
proposals: "Changes to review",
|
|
30
30
|
tasks: "My tasks",
|
|
31
31
|
team: "Team tasks",
|
|
32
32
|
waiting: "Waiting on others",
|
|
33
33
|
notifications: "Notifications"
|
|
34
|
-
},
|
|
34
|
+
}, nt = () => (/* @__PURE__ */ new Date()).toISOString().slice(0, 10), F = (o) => !!o && String(o).slice(0, 10) < nt(), st = {
|
|
35
35
|
alert: "bg-red-500/10 text-red-600 dark:text-red-400",
|
|
36
36
|
warn: "bg-amber-400/15 text-amber-700 dark:text-amber-400",
|
|
37
37
|
neutral: "bg-slate-500/10 text-slate-600 dark:text-slate-400",
|
|
38
38
|
ok: "bg-emerald-500/10 text-emerald-700 dark:text-emerald-400"
|
|
39
39
|
};
|
|
40
|
-
function
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
function dt(o, u) {
|
|
41
|
+
return o != null && o.due_at ? Ie(o, u) : o;
|
|
42
|
+
}
|
|
43
|
+
function pe(o) {
|
|
44
|
+
return !o || o.status === "breached" ? !1 : o.status === "warning" || Pe(o);
|
|
45
|
+
}
|
|
46
|
+
function ot({ sla: o }) {
|
|
47
|
+
const u = Ee(o), c = u && pe(o) ? { ...u, tone: "warn" } : u;
|
|
48
|
+
return c ? /* @__PURE__ */ e(
|
|
43
49
|
"span",
|
|
44
50
|
{
|
|
45
|
-
"data-sla-chip":
|
|
46
|
-
className: `rounded px-1.5 py-0.5 text-[10px] font-semibold tabular-nums transition-colors duration-500 ${
|
|
47
|
-
children:
|
|
51
|
+
"data-sla-chip": c.tone,
|
|
52
|
+
className: `rounded px-1.5 py-0.5 text-[10px] font-semibold tabular-nums transition-colors duration-500 ${st[c.tone]}`,
|
|
53
|
+
children: c.label
|
|
48
54
|
}
|
|
49
55
|
) : null;
|
|
50
56
|
}
|
|
51
|
-
function
|
|
52
|
-
return
|
|
57
|
+
function it({ state: o, color: u }) {
|
|
58
|
+
return o ? /* @__PURE__ */ e(
|
|
53
59
|
"span",
|
|
54
60
|
{
|
|
55
|
-
|
|
61
|
+
"data-tip": o,
|
|
62
|
+
className: "min-w-0 truncate rounded-full px-2 py-0.5 text-[10.5px] font-medium",
|
|
56
63
|
style: {
|
|
57
|
-
backgroundColor:
|
|
58
|
-
color:
|
|
64
|
+
backgroundColor: u ? `${u}22` : "rgba(100,116,139,.12)",
|
|
65
|
+
color: u ?? void 0
|
|
59
66
|
},
|
|
60
|
-
children:
|
|
67
|
+
children: o
|
|
61
68
|
}
|
|
62
69
|
) : null;
|
|
63
70
|
}
|
|
64
|
-
function
|
|
65
|
-
const c =
|
|
66
|
-
(
|
|
67
|
-
),
|
|
71
|
+
function lt({ order: o, hidden: u }) {
|
|
72
|
+
const c = o.filter(
|
|
73
|
+
(p) => !u.includes(p) && (p === "records" || p === "tasks" || p === "notifications")
|
|
74
|
+
), y = (p, w) => /* @__PURE__ */ n(
|
|
68
75
|
"section",
|
|
69
76
|
{
|
|
70
77
|
className: "rounded-lg border border-slate-200 bg-white dark:border-border dark:bg-card",
|
|
71
78
|
children: [
|
|
72
79
|
/* @__PURE__ */ n("div", { className: "border-b border-slate-200 px-4 py-2.5 dark:border-border", children: [
|
|
73
|
-
/* @__PURE__ */ e("h2", { className: "text-[13px] font-medium text-slate-400 dark:text-slate-500", children:
|
|
74
|
-
|
|
80
|
+
/* @__PURE__ */ e("h2", { className: "text-[13px] font-medium text-slate-400 dark:text-slate-500", children: ue[p] ?? p }),
|
|
81
|
+
p === "records" && /* @__PURE__ */ e("p", { className: "text-[11px] text-muted-foreground", children: "Records whose current step resolves you as an owner — most urgent first." })
|
|
75
82
|
] }),
|
|
76
83
|
/* @__PURE__ */ e(
|
|
77
|
-
|
|
84
|
+
et,
|
|
78
85
|
{
|
|
79
86
|
header: !1,
|
|
80
|
-
rows:
|
|
87
|
+
rows: w,
|
|
81
88
|
rowClassName: "h-[37px] px-4",
|
|
82
|
-
columns:
|
|
89
|
+
columns: p === "records" ? [
|
|
83
90
|
{ key: "label", grow: 6 },
|
|
84
91
|
{ key: "where", width: 90, shape: "short" },
|
|
85
92
|
{ key: "state", width: 72, shape: "badge" },
|
|
@@ -92,58 +99,58 @@ function rt({ order: i, hidden: p }) {
|
|
|
92
99
|
)
|
|
93
100
|
]
|
|
94
101
|
},
|
|
95
|
-
|
|
96
|
-
),
|
|
97
|
-
for (let
|
|
98
|
-
if (c[
|
|
99
|
-
|
|
102
|
+
p
|
|
103
|
+
), g = [];
|
|
104
|
+
for (let p = 0; p < c.length; ) {
|
|
105
|
+
if (c[p] === "records") {
|
|
106
|
+
g.push(y("records", 5)), p++;
|
|
100
107
|
continue;
|
|
101
108
|
}
|
|
102
|
-
const
|
|
103
|
-
|
|
104
|
-
/* @__PURE__ */ e("div", { className: "grid gap-5 lg:grid-cols-2", children:
|
|
105
|
-
),
|
|
109
|
+
const w = c.slice(p, p + 2).filter((f) => f !== "records");
|
|
110
|
+
g.push(
|
|
111
|
+
/* @__PURE__ */ e("div", { className: "grid grid-cols-1 gap-5 lg:grid-cols-2", children: w.map((f) => y(f, 4)) }, w.join("+"))
|
|
112
|
+
), p += w.length;
|
|
106
113
|
}
|
|
107
|
-
return /* @__PURE__ */ n("div", { className: "space-y-5 p-6", "data-my-work-loading": !0, "aria-busy": "true", children: [
|
|
114
|
+
return /* @__PURE__ */ n("div", { className: "space-y-5 p-4 sm:p-6", "data-my-work-loading": !0, "aria-busy": "true", children: [
|
|
108
115
|
/* @__PURE__ */ n("div", { className: "flex items-start justify-between", children: [
|
|
109
|
-
/* @__PURE__ */ e("div", { className: "grid flex-1 grid-cols-2 gap-3 lg:grid-cols-4", children: ["Waiting on you", "SLA breached", "Open tasks", "Unread notifications"].map((
|
|
116
|
+
/* @__PURE__ */ e("div", { className: "grid flex-1 grid-cols-2 gap-3 lg:grid-cols-4", children: ["Waiting on you", "SLA breached", "Open tasks", "Unread notifications"].map((p) => /* @__PURE__ */ n(
|
|
110
117
|
"div",
|
|
111
118
|
{
|
|
112
119
|
className: "rounded-lg border border-slate-200 bg-white p-3 dark:border-border dark:bg-card",
|
|
113
120
|
children: [
|
|
114
|
-
/* @__PURE__ */ e("p", { className: "text-[10.5px] uppercase tracking-wide text-muted-foreground", children:
|
|
115
|
-
/* @__PURE__ */ e("p", { className: "mt-0.5 flex h-[27px] items-center", children: /* @__PURE__ */ e(
|
|
121
|
+
/* @__PURE__ */ e("p", { className: "text-[10.5px] uppercase tracking-wide text-muted-foreground", children: p }),
|
|
122
|
+
/* @__PURE__ */ e("p", { className: "mt-0.5 flex h-[27px] items-center", children: /* @__PURE__ */ e(Xe, { width: 34, className: "h-[18px] rounded-md" }) })
|
|
116
123
|
]
|
|
117
124
|
},
|
|
118
|
-
|
|
125
|
+
p
|
|
119
126
|
)) }),
|
|
120
127
|
/* @__PURE__ */ e("span", { className: "ml-3 rounded-md border border-slate-200 px-2.5 py-1.5 text-[12px] text-slate-400 dark:border-border dark:text-slate-500", children: "Refresh" }),
|
|
121
128
|
/* @__PURE__ */ e("span", { className: "ml-2 rounded-md border border-slate-200 px-2.5 py-1.5 text-[12px] text-slate-400 dark:border-border dark:text-slate-500", children: "Customize" })
|
|
122
129
|
] }),
|
|
123
|
-
|
|
130
|
+
g
|
|
124
131
|
] });
|
|
125
132
|
}
|
|
126
|
-
function
|
|
127
|
-
return /* @__PURE__ */ n("div", { className: "rounded-lg border border-slate-200 bg-white p-3 dark:border-border dark:bg-card", children: [
|
|
128
|
-
/* @__PURE__ */ e("p", { className: "text-[10.5px] uppercase tracking-wide text-muted-foreground", children:
|
|
129
|
-
/* @__PURE__ */ e("p", { className: `mt-0.5 text-[18px] font-semibold tabular-nums ${c ?? ""}`, children: /* @__PURE__ */ e(
|
|
133
|
+
function U({ label: o, value: u, tone: c }) {
|
|
134
|
+
return /* @__PURE__ */ n("div", { className: "min-w-0 rounded-lg border border-slate-200 bg-white p-3 dark:border-border dark:bg-card", children: [
|
|
135
|
+
/* @__PURE__ */ e("p", { className: "break-words text-[10.5px] uppercase tracking-wide text-muted-foreground", children: o }),
|
|
136
|
+
/* @__PURE__ */ e("p", { className: `mt-0.5 text-[18px] font-semibold tabular-nums ${c ?? ""}`, children: /* @__PURE__ */ e(tt, { value: u }) })
|
|
130
137
|
] });
|
|
131
138
|
}
|
|
132
|
-
function
|
|
133
|
-
notificationRoutes:
|
|
134
|
-
onOpenPath:
|
|
139
|
+
function Ft({
|
|
140
|
+
notificationRoutes: o,
|
|
141
|
+
onOpenPath: u
|
|
135
142
|
} = {}) {
|
|
136
|
-
const { apiBase: c, authHeaders:
|
|
143
|
+
const { apiBase: c, authHeaders: y, credentials: g } = $e(), { open: p } = Te(), w = Ue(), f = je(), v = ve(), R = qe(), V = (r) => {
|
|
137
144
|
var h, m;
|
|
138
|
-
const s = ((h =
|
|
139
|
-
|
|
140
|
-
},
|
|
145
|
+
const s = ((h = o == null ? void 0 : o.support) == null ? void 0 : h.call(o, String(r))) ?? ((m = f.consoleUrl) == null ? void 0 : m.call(f, `/support?ticket=${r}`)) ?? `/support?ticket=${r}`;
|
|
146
|
+
u ? u(s) : f.navigate(s);
|
|
147
|
+
}, W = Fe(), [he, O] = S(!1), [x, be] = S(() => {
|
|
141
148
|
try {
|
|
142
149
|
const r = localStorage.getItem("nvr_mywork_sections");
|
|
143
150
|
if (r) {
|
|
144
151
|
const s = JSON.parse(r);
|
|
145
152
|
if (Array.isArray(s == null ? void 0 : s.order) && Array.isArray(s == null ? void 0 : s.hidden)) {
|
|
146
|
-
const h =
|
|
153
|
+
const h = ce.map((m, b) => ({
|
|
147
154
|
k: m,
|
|
148
155
|
at: s.order.indexOf(m) >= 0 ? s.order.indexOf(m) : b - 0.5
|
|
149
156
|
})).sort((m, b) => m.at - b.at).map((m) => m.k);
|
|
@@ -152,257 +159,263 @@ function Ot({
|
|
|
152
159
|
}
|
|
153
160
|
} catch {
|
|
154
161
|
}
|
|
155
|
-
return { order: [...
|
|
156
|
-
}),
|
|
157
|
-
|
|
162
|
+
return { order: [...ce], hidden: [] };
|
|
163
|
+
}), Y = (r) => {
|
|
164
|
+
be(r);
|
|
158
165
|
try {
|
|
159
166
|
localStorage.setItem("nvr_mywork_sections", JSON.stringify(r));
|
|
160
167
|
} catch {
|
|
161
168
|
}
|
|
162
|
-
}, [
|
|
163
|
-
const r =
|
|
169
|
+
}, [xe, ge] = S(!1), Z = H(0), [I, fe] = S("all"), ke = Oe(!0), [E, G] = S(null), { data: L } = Ve(), k = oe(() => {
|
|
170
|
+
const r = E ? L == null ? void 0 : L.find((s) => s.user_id === E) : null;
|
|
164
171
|
return r ? { userId: r.user_id, name: r.first_name || r.name, keys: new Set(r.keys) } : null;
|
|
165
|
-
}, [
|
|
172
|
+
}, [E, L]), { data: a, isLoading: ye, refetch: X, isFetching: ee } = _e({
|
|
166
173
|
queryKey: ["my-work"],
|
|
167
174
|
queryFn: async () => {
|
|
168
|
-
const r = await fetch(`${c}/my-work`, { headers:
|
|
175
|
+
const r = await fetch(`${c}/my-work`, { headers: y, credentials: g });
|
|
169
176
|
if (!r.ok) throw new Error("my-work failed");
|
|
170
177
|
return (await r.json()).data;
|
|
171
178
|
},
|
|
172
179
|
staleTime: 6e4
|
|
173
|
-
}),
|
|
180
|
+
}), te = H(0), $ = H(null), re = () => {
|
|
174
181
|
const r = () => {
|
|
175
|
-
|
|
176
|
-
}, s =
|
|
177
|
-
|
|
182
|
+
$.current = null, te.current = Date.now(), O(!1), v.invalidateQueries({ queryKey: ["my-work"] });
|
|
183
|
+
}, s = te.current + at - Date.now();
|
|
184
|
+
$.current || (s <= 0 ? r() : $.current = setTimeout(r, s));
|
|
178
185
|
};
|
|
179
|
-
|
|
186
|
+
Me("my-work", re, { debounceMs: 1500 }), Le("notification:new", re, { debounceMs: 1500 }), J(
|
|
180
187
|
() => () => {
|
|
181
|
-
|
|
188
|
+
$.current && clearTimeout($.current);
|
|
182
189
|
},
|
|
183
190
|
[]
|
|
184
191
|
);
|
|
185
|
-
const
|
|
192
|
+
const ae = Ae([
|
|
186
193
|
...((a == null ? void 0 : a.owned) ?? []).map((r) => `o:${r.collection}:${r.item}`),
|
|
187
194
|
...((a == null ? void 0 : a.tasks) ?? []).map((r) => `t:${r.id}`),
|
|
188
195
|
...((a == null ? void 0 : a.team_tasks) ?? []).map((r) => `tt:${r.id}`),
|
|
189
196
|
...((a == null ? void 0 : a.requested) ?? []).map((r) => `r:${r.id}`),
|
|
190
197
|
...((a == null ? void 0 : a.notifications) ?? []).map((r) => `n:${r.id}`),
|
|
191
198
|
...((a == null ? void 0 : a.proposals) ?? []).map((r) => `p:${r.id}`)
|
|
192
|
-
]),
|
|
199
|
+
]), _ = (r) => ae.has(r) ? "bg-nvr-cyan/10 transition-colors duration-700" : "transition-colors duration-700", P = oe(() => {
|
|
193
200
|
const r = /* @__PURE__ */ new Set();
|
|
194
201
|
for (const s of (a == null ? void 0 : a.owned) ?? []) s.collection && r.add(s.collection);
|
|
195
202
|
return [...r];
|
|
196
203
|
}, [a]);
|
|
197
|
-
|
|
198
|
-
if (!(!
|
|
199
|
-
return
|
|
204
|
+
J(() => {
|
|
205
|
+
if (!(!W || P.length === 0))
|
|
206
|
+
return W.subscribeCollections(P, () => {
|
|
200
207
|
const r = Date.now();
|
|
201
|
-
r -
|
|
208
|
+
r - Z.current < 3e4 || (Z.current = r, O(!0));
|
|
202
209
|
});
|
|
203
|
-
}, [
|
|
204
|
-
const
|
|
210
|
+
}, [W, P]);
|
|
211
|
+
const ne = z({
|
|
205
212
|
// A ticket closes through /support so its requester hears about it.
|
|
206
213
|
mutationFn: (r) => fetch(`${c}/${r.kind === "support" ? "support/tickets" : "tasks"}/${r.id}`, {
|
|
207
214
|
method: "PATCH",
|
|
208
|
-
headers: { ...
|
|
209
|
-
credentials:
|
|
215
|
+
headers: { ...y, "content-type": "application/json" },
|
|
216
|
+
credentials: g,
|
|
210
217
|
body: JSON.stringify({ status: "done" })
|
|
211
218
|
}),
|
|
212
|
-
onSuccess: () =>
|
|
213
|
-
}),
|
|
219
|
+
onSuccess: () => v.invalidateQueries({ queryKey: ["my-work"] })
|
|
220
|
+
}), M = z({
|
|
214
221
|
mutationFn: async ({ id: r, action: s }) => {
|
|
215
222
|
const h = await fetch(`${c}/tasks/${r}/${s}`, {
|
|
216
223
|
method: "POST",
|
|
217
|
-
headers: { ...
|
|
218
|
-
credentials:
|
|
224
|
+
headers: { ...y, "content-type": "application/json" },
|
|
225
|
+
credentials: g,
|
|
219
226
|
body: "{}"
|
|
220
227
|
}), m = await h.json().catch(() => ({}));
|
|
221
228
|
if (!h.ok) throw new Error(m.error ?? "Failed");
|
|
222
229
|
return s;
|
|
223
230
|
},
|
|
224
231
|
onSuccess: (r) => {
|
|
225
|
-
|
|
232
|
+
Q(r === "claim" ? "It’s yours — it moved to My tasks." : "Reminder sent."), v.invalidateQueries({ queryKey: ["my-work"] });
|
|
226
233
|
},
|
|
227
|
-
onError: (r) =>
|
|
228
|
-
}), [
|
|
229
|
-
|
|
230
|
-
if (!
|
|
231
|
-
const r = setTimeout(() =>
|
|
234
|
+
onError: (r) => Q(We(r, "Failed"))
|
|
235
|
+
}), [A, Q] = S(null);
|
|
236
|
+
J(() => {
|
|
237
|
+
if (!A) return;
|
|
238
|
+
const r = setTimeout(() => Q(null), 4e3);
|
|
232
239
|
return () => clearTimeout(r);
|
|
233
|
-
}, [
|
|
234
|
-
const
|
|
240
|
+
}, [A]);
|
|
241
|
+
const se = z({
|
|
235
242
|
mutationFn: (r) => fetch(`${c}/notifications/mark-read`, {
|
|
236
243
|
method: "POST",
|
|
237
|
-
headers: { ...
|
|
238
|
-
credentials:
|
|
244
|
+
headers: { ...y, "content-type": "application/json" },
|
|
245
|
+
credentials: g,
|
|
239
246
|
body: JSON.stringify({ ids: r })
|
|
240
247
|
}),
|
|
241
248
|
onSuccess: () => {
|
|
242
|
-
|
|
249
|
+
v.invalidateQueries({ queryKey: ["my-work"] }), v.invalidateQueries({ queryKey: ["notifications"] });
|
|
243
250
|
}
|
|
244
|
-
}),
|
|
245
|
-
if (r && s &&
|
|
246
|
-
const l = (m ?? []).filter((d) => d.collection && d.item &&
|
|
247
|
-
if (
|
|
251
|
+
}), C = (r, s, h, m) => {
|
|
252
|
+
if (r && s && le(r)) {
|
|
253
|
+
const l = (m ?? []).filter((d) => d.collection && d.item && le(d.collection)).map((d) => ({ collection: d.collection, itemId: String(d.item) }));
|
|
254
|
+
if (w({ collection: r, itemId: String(s) }, h, { list: l }) !== "navigate")
|
|
248
255
|
return;
|
|
249
256
|
}
|
|
250
257
|
const b = {
|
|
251
|
-
record: (l, d) => (
|
|
252
|
-
...
|
|
253
|
-
}, t =
|
|
258
|
+
record: (l, d) => (p({ collection: l, itemId: d }), null),
|
|
259
|
+
...o
|
|
260
|
+
}, t = ie(r, s, {
|
|
254
261
|
...b,
|
|
255
262
|
record: (l, d) => {
|
|
256
|
-
var
|
|
257
|
-
return ((
|
|
263
|
+
var N;
|
|
264
|
+
return ((N = o == null ? void 0 : o.record) == null ? void 0 : N.call(o, l, d)) ?? null;
|
|
258
265
|
}
|
|
259
266
|
});
|
|
260
267
|
if (t) {
|
|
261
|
-
|
|
268
|
+
De(t, (l) => u == null ? void 0 : u(l));
|
|
262
269
|
return;
|
|
263
270
|
}
|
|
264
|
-
r && s && !/^nivaro_/i.test(r) && r !== "__chat__" &&
|
|
265
|
-
},
|
|
271
|
+
r && s && !/^nivaro_/i.test(r) && r !== "__chat__" && p({ collection: r, itemId: s });
|
|
272
|
+
}, we = (r, s) => r && s && !/^nivaro_/i.test(r) && r !== "__chat__" ? !0 : !!ie(r, s, {
|
|
266
273
|
record: () => null,
|
|
267
|
-
...
|
|
274
|
+
...o
|
|
268
275
|
});
|
|
269
|
-
return
|
|
270
|
-
/* @__PURE__ */ e(
|
|
271
|
-
/* @__PURE__ */ n("div", { className: "flex items-start justify-between", children: [
|
|
272
|
-
/* @__PURE__ */ n("div", { className: "grid flex-1 grid-cols-2 gap-3 lg:grid-cols-4", children: [
|
|
273
|
-
/* @__PURE__ */ e(
|
|
276
|
+
return ye || !a ? /* @__PURE__ */ e(lt, { order: x.order, hidden: x.hidden }) : /* @__PURE__ */ n("div", { className: "space-y-5 p-4 sm:p-6", "data-my-work": !0, children: [
|
|
277
|
+
/* @__PURE__ */ e(Be, { onOpenPath: u }),
|
|
278
|
+
/* @__PURE__ */ n("div", { className: "flex flex-col-reverse gap-3 sm:flex-row sm:items-start sm:justify-between", children: [
|
|
279
|
+
/* @__PURE__ */ n("div", { className: "grid min-w-0 flex-1 grid-cols-2 gap-3 lg:grid-cols-4", children: [
|
|
280
|
+
/* @__PURE__ */ e(U, { label: "Waiting on you", value: a.counts.owned }),
|
|
274
281
|
/* @__PURE__ */ e(
|
|
275
|
-
|
|
282
|
+
U,
|
|
276
283
|
{
|
|
277
284
|
label: "SLA breached",
|
|
278
285
|
value: a.counts.owned_breached,
|
|
279
286
|
tone: a.counts.owned_breached > 0 ? "text-red-600 dark:text-red-400" : ""
|
|
280
287
|
}
|
|
281
288
|
),
|
|
282
|
-
/* @__PURE__ */ e(
|
|
283
|
-
/* @__PURE__ */ e(
|
|
289
|
+
/* @__PURE__ */ e(U, { label: "Open tasks", value: a.counts.tasks }),
|
|
290
|
+
/* @__PURE__ */ e(U, { label: "Unread notifications", value: a.counts.notifications })
|
|
284
291
|
] }),
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
"button",
|
|
301
|
-
{
|
|
302
|
-
type: "button",
|
|
303
|
-
onClick: () => {
|
|
304
|
-
O(!1), R();
|
|
305
|
-
},
|
|
306
|
-
disabled: G,
|
|
307
|
-
className: "ml-3 rounded-md border border-slate-200 px-2.5 py-1.5 text-[12px] hover:bg-muted disabled:opacity-50 dark:border-border",
|
|
308
|
-
children: G ? "Refreshing…" : "Refresh"
|
|
309
|
-
}
|
|
310
|
-
),
|
|
311
|
-
/* @__PURE__ */ n("div", { className: "relative ml-2", children: [
|
|
292
|
+
/* @__PURE__ */ n("div", { className: "flex shrink-0 flex-wrap items-center justify-end gap-2", children: [
|
|
293
|
+
he && /* @__PURE__ */ n(
|
|
294
|
+
"button",
|
|
295
|
+
{
|
|
296
|
+
type: "button",
|
|
297
|
+
onClick: () => {
|
|
298
|
+
O(!1), X();
|
|
299
|
+
},
|
|
300
|
+
className: "inline-flex items-center gap-1.5 rounded-full border border-nvr-cyan/40 bg-nvr-cyan/10 px-3 py-1.5 text-[12px] font-medium text-[#0e7490] hover:bg-nvr-cyan/20 dark:text-[#67e8f9]",
|
|
301
|
+
children: [
|
|
302
|
+
/* @__PURE__ */ e("span", { className: "h-1.5 w-1.5 animate-pulse rounded-full bg-nvr-cyan" }),
|
|
303
|
+
"Updates available — refresh"
|
|
304
|
+
]
|
|
305
|
+
}
|
|
306
|
+
),
|
|
312
307
|
/* @__PURE__ */ e(
|
|
313
308
|
"button",
|
|
314
309
|
{
|
|
315
310
|
type: "button",
|
|
316
|
-
onClick: () =>
|
|
317
|
-
|
|
318
|
-
|
|
311
|
+
onClick: () => {
|
|
312
|
+
O(!1), X();
|
|
313
|
+
},
|
|
314
|
+
disabled: ee,
|
|
315
|
+
className: "rounded-md border border-slate-200 px-2.5 py-1.5 text-[12px] hover:bg-muted disabled:opacity-50 dark:border-border",
|
|
316
|
+
children: ee ? "Refreshing…" : "Refresh"
|
|
319
317
|
}
|
|
320
318
|
),
|
|
321
|
-
|
|
322
|
-
/* @__PURE__ */ e(
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
}
|
|
341
|
-
),
|
|
342
|
-
/* @__PURE__ */ e(
|
|
343
|
-
"span",
|
|
344
|
-
{
|
|
345
|
-
className: `min-w-0 flex-1 truncate text-[12px] ${m ? "text-slate-400 line-through" : ""}`,
|
|
346
|
-
children: h
|
|
347
|
-
}
|
|
348
|
-
),
|
|
349
|
-
/* @__PURE__ */ e(
|
|
350
|
-
"button",
|
|
351
|
-
{
|
|
352
|
-
type: "button",
|
|
353
|
-
onClick: () => b(-1),
|
|
354
|
-
disabled: s === 0,
|
|
355
|
-
className: "px-1 text-[11px] text-slate-400 hover:text-foreground disabled:opacity-30",
|
|
356
|
-
children: "↑"
|
|
357
|
-
}
|
|
358
|
-
),
|
|
359
|
-
/* @__PURE__ */ e(
|
|
360
|
-
"button",
|
|
319
|
+
/* @__PURE__ */ n("div", { className: "relative", children: [
|
|
320
|
+
/* @__PURE__ */ e(
|
|
321
|
+
"button",
|
|
322
|
+
{
|
|
323
|
+
type: "button",
|
|
324
|
+
onClick: () => ge((r) => !r),
|
|
325
|
+
className: "rounded-md border border-slate-200 px-2.5 py-1.5 text-[12px] hover:bg-muted dark:border-border",
|
|
326
|
+
children: "Customize"
|
|
327
|
+
}
|
|
328
|
+
),
|
|
329
|
+
xe && /* @__PURE__ */ n("div", { className: "absolute right-0 top-full z-20 mt-1 w-56 rounded-lg border border-slate-200 bg-white p-2 shadow-lg dark:border-border dark:bg-card", children: [
|
|
330
|
+
/* @__PURE__ */ e("p", { className: "px-1 pb-1.5 text-[11px] font-semibold text-slate-500", children: "Sections" }),
|
|
331
|
+
x.order.map((r, s) => {
|
|
332
|
+
const h = ue[r] ?? r, m = x.hidden.includes(r), b = (t) => {
|
|
333
|
+
const l = [...x.order], d = s + t;
|
|
334
|
+
d < 0 || d >= l.length || ([l[s], l[d]] = [l[d], l[s]], Y({ ...x, order: l }));
|
|
335
|
+
};
|
|
336
|
+
return /* @__PURE__ */ n(
|
|
337
|
+
"div",
|
|
361
338
|
{
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
339
|
+
className: "flex items-center gap-1 rounded px-1 py-1 hover:bg-muted",
|
|
340
|
+
children: [
|
|
341
|
+
/* @__PURE__ */ e(
|
|
342
|
+
"button",
|
|
343
|
+
{
|
|
344
|
+
type: "button",
|
|
345
|
+
onClick: () => Y({
|
|
346
|
+
...x,
|
|
347
|
+
hidden: m ? x.hidden.filter((t) => t !== r) : [...x.hidden, r]
|
|
348
|
+
}),
|
|
349
|
+
className: "flex h-4 w-4 items-center justify-center rounded border border-slate-300 text-[10px] dark:border-border",
|
|
350
|
+
title: m ? "Show section" : "Hide section",
|
|
351
|
+
children: m ? "" : "✓"
|
|
352
|
+
}
|
|
353
|
+
),
|
|
354
|
+
/* @__PURE__ */ e(
|
|
355
|
+
"span",
|
|
356
|
+
{
|
|
357
|
+
className: `min-w-0 flex-1 truncate text-[12px] ${m ? "text-slate-400 line-through" : ""}`,
|
|
358
|
+
children: h
|
|
359
|
+
}
|
|
360
|
+
),
|
|
361
|
+
/* @__PURE__ */ e(
|
|
362
|
+
"button",
|
|
363
|
+
{
|
|
364
|
+
type: "button",
|
|
365
|
+
onClick: () => b(-1),
|
|
366
|
+
disabled: s === 0,
|
|
367
|
+
className: "px-1 text-[11px] text-slate-400 hover:text-foreground disabled:opacity-30",
|
|
368
|
+
children: "↑"
|
|
369
|
+
}
|
|
370
|
+
),
|
|
371
|
+
/* @__PURE__ */ e(
|
|
372
|
+
"button",
|
|
373
|
+
{
|
|
374
|
+
type: "button",
|
|
375
|
+
onClick: () => b(1),
|
|
376
|
+
disabled: s === x.order.length - 1,
|
|
377
|
+
className: "px-1 text-[11px] text-slate-400 hover:text-foreground disabled:opacity-30",
|
|
378
|
+
children: "↓"
|
|
379
|
+
}
|
|
380
|
+
)
|
|
381
|
+
]
|
|
382
|
+
},
|
|
383
|
+
r
|
|
384
|
+
);
|
|
385
|
+
})
|
|
386
|
+
] })
|
|
371
387
|
] })
|
|
372
388
|
] })
|
|
373
389
|
] }),
|
|
374
|
-
|
|
390
|
+
A && /* @__PURE__ */ e(
|
|
375
391
|
"p",
|
|
376
392
|
{
|
|
377
393
|
className: "rounded-md border border-slate-200 bg-white px-3 py-2 text-[12px] dark:border-border dark:bg-card",
|
|
378
394
|
role: "status",
|
|
379
395
|
"data-my-work-task-note": !0,
|
|
380
|
-
children:
|
|
396
|
+
children: A
|
|
381
397
|
}
|
|
382
398
|
),
|
|
383
|
-
/* @__PURE__ */ e(
|
|
399
|
+
/* @__PURE__ */ e(Ke, { questions: a.questions ?? [] }),
|
|
384
400
|
/* @__PURE__ */ e(
|
|
385
|
-
|
|
401
|
+
Ye,
|
|
386
402
|
{
|
|
387
|
-
showing: (
|
|
388
|
-
onShow: (r) =>
|
|
403
|
+
showing: (k == null ? void 0 : k.userId) ?? null,
|
|
404
|
+
onShow: (r) => G((s) => s === r.user_id ? null : r.user_id)
|
|
389
405
|
}
|
|
390
406
|
),
|
|
391
|
-
/* @__PURE__ */ e(
|
|
392
|
-
/* @__PURE__ */ e(
|
|
407
|
+
/* @__PURE__ */ e(Ge, { className: "mb-4" }),
|
|
408
|
+
/* @__PURE__ */ e(Ze, { className: "mb-4" }),
|
|
393
409
|
(() => {
|
|
394
410
|
const r = {
|
|
395
411
|
records: () => {
|
|
396
|
-
const t = a.owned.
|
|
397
|
-
var
|
|
398
|
-
return ((
|
|
399
|
-
}).length, d = I === "soon" ? a.owned.filter(
|
|
400
|
-
var N;
|
|
401
|
-
return ((N = o.sla) == null ? void 0 : N.status) === "breached";
|
|
402
|
-
}) : a.owned, f = w ? d.filter((o) => w.keys.has(`${o.collection}:${o.item}`)) : d, j = [
|
|
412
|
+
const t = new Map(a.owned.map((i) => [i, dt(i.sla, ke)])), l = (i) => pe(t.get(i) ?? null), d = (i) => {
|
|
413
|
+
var j;
|
|
414
|
+
return ((j = t.get(i)) == null ? void 0 : j.status) === "breached";
|
|
415
|
+
}, N = a.owned.filter(l).length, T = a.owned.filter(d).length, D = I === "soon" ? a.owned.filter(l) : I === "breached" ? a.owned.filter(d) : a.owned, K = k ? D.filter((i) => k.keys.has(`${i.collection}:${i.item}`)) : D, Ne = [
|
|
403
416
|
{ key: "all", label: `All (${a.owned.length})` },
|
|
404
|
-
{ key: "soon", label: `
|
|
405
|
-
{ key: "breached", label: `Breached (${
|
|
417
|
+
{ key: "soon", label: `Due soon (${N})` },
|
|
418
|
+
{ key: "breached", label: `Breached (${T})` }
|
|
406
419
|
];
|
|
407
420
|
return /* @__PURE__ */ n("section", { className: "rounded-lg border border-slate-200 bg-white dark:border-border dark:bg-card", children: [
|
|
408
421
|
/* @__PURE__ */ n("div", { className: "border-b border-slate-200 px-4 py-2.5 dark:border-border", children: [
|
|
@@ -410,55 +423,55 @@ function Ot({
|
|
|
410
423
|
/* @__PURE__ */ e("p", { className: "text-[11px] text-muted-foreground", children: "Records whose current step resolves you as an owner — most urgent first." })
|
|
411
424
|
] }),
|
|
412
425
|
a.owned.length > 0 && /* @__PURE__ */ n("div", { className: "flex flex-wrap items-center gap-1 border-b border-slate-100 px-4 py-2 dark:border-border/60", children: [
|
|
413
|
-
/* @__PURE__ */ e("div", { className: "flex items-center gap-1 rounded-lg bg-slate-100 p-1 dark:bg-muted", children:
|
|
426
|
+
/* @__PURE__ */ e("div", { className: "flex items-center gap-1 rounded-lg bg-slate-100 p-1 dark:bg-muted", children: Ne.map((i) => /* @__PURE__ */ e(
|
|
414
427
|
"button",
|
|
415
428
|
{
|
|
416
429
|
type: "button",
|
|
417
|
-
"data-my-work-sla-filter":
|
|
418
|
-
"aria-pressed": I ===
|
|
419
|
-
onClick: () =>
|
|
430
|
+
"data-my-work-sla-filter": i.key,
|
|
431
|
+
"aria-pressed": I === i.key,
|
|
432
|
+
onClick: () => fe(i.key),
|
|
420
433
|
className: [
|
|
421
434
|
"rounded-md px-2.5 py-1 text-[11px] font-medium transition-colors duration-150",
|
|
422
|
-
I ===
|
|
435
|
+
I === i.key ? "bg-white text-slate-900 shadow-sm dark:bg-card dark:text-foreground" : "text-slate-500 hover:text-slate-700 dark:text-slate-400 dark:hover:text-slate-200"
|
|
423
436
|
].join(" "),
|
|
424
|
-
children:
|
|
437
|
+
children: i.label
|
|
425
438
|
},
|
|
426
|
-
|
|
439
|
+
i.key
|
|
427
440
|
)) }),
|
|
428
|
-
|
|
441
|
+
k && /* @__PURE__ */ n(
|
|
429
442
|
"button",
|
|
430
443
|
{
|
|
431
444
|
type: "button",
|
|
432
445
|
"data-my-work-cover-filter": !0,
|
|
433
|
-
onClick: () =>
|
|
434
|
-
"aria-label": `Show all records, not only ${
|
|
446
|
+
onClick: () => G(null),
|
|
447
|
+
"aria-label": `Show all records, not only ${k.name}'s`,
|
|
435
448
|
className: "ml-1 inline-flex items-center gap-1 rounded-full border border-nvr-cyan/40 bg-nvr-cyan/10 px-2.5 py-1 text-[11px] font-medium text-[#0e7490] hover:bg-nvr-cyan/20 dark:text-[#67e8f9]",
|
|
436
449
|
children: [
|
|
437
|
-
|
|
450
|
+
k.name,
|
|
438
451
|
"'s records",
|
|
439
452
|
/* @__PURE__ */ e("span", { "aria-hidden": !0, className: "text-[12px] leading-none", children: "×" })
|
|
440
453
|
]
|
|
441
454
|
}
|
|
442
455
|
)
|
|
443
456
|
] }),
|
|
444
|
-
|
|
445
|
-
var
|
|
457
|
+
K.length === 0 ? /* @__PURE__ */ e("p", { className: "px-4 py-6 text-center text-[12.5px] text-muted-foreground", children: a.owned.length === 0 ? "Nothing is waiting on you. Enjoy it." : "Nothing matches this filter." }) : /* @__PURE__ */ e("ul", { className: "divide-y divide-slate-100 dark:divide-border/60", children: K.map((i) => {
|
|
458
|
+
var j, de;
|
|
446
459
|
return /* @__PURE__ */ e(
|
|
447
460
|
"li",
|
|
448
461
|
{
|
|
449
|
-
className:
|
|
450
|
-
"data-my-work-fresh":
|
|
462
|
+
className: _(`o:${i.collection}:${i.item}`),
|
|
463
|
+
"data-my-work-fresh": ae.has(`o:${i.collection}:${i.item}`) || void 0,
|
|
451
464
|
children: /* @__PURE__ */ n(
|
|
452
465
|
"button",
|
|
453
466
|
{
|
|
454
467
|
type: "button",
|
|
455
|
-
onClick: (
|
|
456
|
-
...
|
|
468
|
+
onClick: (B) => C(i.collection, i.item, B, K),
|
|
469
|
+
...R.record(i.collection, i.item),
|
|
457
470
|
className: "flex w-full items-center gap-2.5 px-4 py-2 text-left hover:bg-muted",
|
|
458
471
|
children: [
|
|
459
|
-
/* @__PURE__ */ e("span", { className: "min-w-
|
|
460
|
-
/* @__PURE__ */ e("span", { className: "hidden text-[11px] text-muted-foreground sm:inline", children:
|
|
461
|
-
((
|
|
472
|
+
/* @__PURE__ */ e("span", { className: "min-w-[6.5rem] flex-1 truncate text-[12.5px] font-medium", children: i.label }),
|
|
473
|
+
/* @__PURE__ */ e("span", { className: "hidden text-[11px] text-muted-foreground sm:inline", children: i.collection.replace(/_/g, " ") }),
|
|
474
|
+
((j = i.flags) == null ? void 0 : j.some((B) => /^on hold$/i.test(B.name.trim()))) && /* @__PURE__ */ e(
|
|
462
475
|
"span",
|
|
463
476
|
{
|
|
464
477
|
"data-my-work-hold": !0,
|
|
@@ -466,13 +479,19 @@ function Ot({
|
|
|
466
479
|
children: "On hold"
|
|
467
480
|
}
|
|
468
481
|
),
|
|
469
|
-
/* @__PURE__ */ e(
|
|
470
|
-
|
|
482
|
+
/* @__PURE__ */ e(
|
|
483
|
+
it,
|
|
484
|
+
{
|
|
485
|
+
state: i.state_label || ((de = i.state) == null ? void 0 : de.replace(/_/g, " ")) || null,
|
|
486
|
+
color: i.state_color
|
|
487
|
+
}
|
|
488
|
+
),
|
|
489
|
+
/* @__PURE__ */ e("span", { className: "shrink-0", children: /* @__PURE__ */ e(ot, { sla: t.get(i) ?? null }) })
|
|
471
490
|
]
|
|
472
491
|
}
|
|
473
492
|
)
|
|
474
493
|
},
|
|
475
|
-
`${
|
|
494
|
+
`${i.collection}:${i.item}`
|
|
476
495
|
);
|
|
477
496
|
}) })
|
|
478
497
|
] });
|
|
@@ -488,12 +507,12 @@ function Ot({
|
|
|
488
507
|
/* @__PURE__ */ e("h2", { className: "text-[13px] font-medium", children: "Changes to review" }),
|
|
489
508
|
/* @__PURE__ */ e("p", { className: "text-[11px] text-muted-foreground", children: "Proposed changes on locked records — open one to compare old and new and accept or decline it." })
|
|
490
509
|
] }),
|
|
491
|
-
/* @__PURE__ */ e("ul", { className: "divide-y divide-slate-100 dark:divide-border/60", children: (a.proposals ?? []).map((t) => /* @__PURE__ */ e("li", { className:
|
|
510
|
+
/* @__PURE__ */ e("ul", { className: "divide-y divide-slate-100 dark:divide-border/60", children: (a.proposals ?? []).map((t) => /* @__PURE__ */ e("li", { className: _(`p:${t.id}`), "data-my-work-proposal": t.id, children: /* @__PURE__ */ n(
|
|
492
511
|
"button",
|
|
493
512
|
{
|
|
494
513
|
type: "button",
|
|
495
|
-
onClick: () =>
|
|
496
|
-
...
|
|
514
|
+
onClick: () => C(t.collection, t.item),
|
|
515
|
+
...R.record(t.collection, t.item),
|
|
497
516
|
className: "flex w-full items-start gap-2.5 px-4 py-2 text-left hover:bg-muted",
|
|
498
517
|
children: [
|
|
499
518
|
/* @__PURE__ */ n("span", { className: "min-w-0 flex-1", children: [
|
|
@@ -507,7 +526,7 @@ function Ot({
|
|
|
507
526
|
t.reason
|
|
508
527
|
] })
|
|
509
528
|
] }),
|
|
510
|
-
/* @__PURE__ */ e("span", { className: "shrink-0 pt-0.5 text-[11px] text-muted-foreground", children:
|
|
529
|
+
/* @__PURE__ */ e("span", { className: "shrink-0 pt-0.5 text-[11px] text-muted-foreground", children: Qe(t.created_at) })
|
|
511
530
|
]
|
|
512
531
|
}
|
|
513
532
|
) }, t.id)) })
|
|
@@ -519,15 +538,15 @@ function Ot({
|
|
|
519
538
|
a.tasks.length === 0 ? /* @__PURE__ */ e("p", { className: "px-4 py-5 text-center text-[12.5px] text-muted-foreground", children: "No open tasks." }) : /* @__PURE__ */ e("ul", { className: "divide-y divide-slate-100 dark:divide-border/60", children: a.tasks.map((t) => /* @__PURE__ */ n(
|
|
520
539
|
"li",
|
|
521
540
|
{
|
|
522
|
-
className:
|
|
541
|
+
className: q("flex items-center gap-2.5 px-4 py-2", _(`t:${t.id}`)),
|
|
523
542
|
children: [
|
|
524
543
|
/* @__PURE__ */ e(
|
|
525
544
|
"button",
|
|
526
545
|
{
|
|
527
546
|
type: "button",
|
|
528
547
|
title: "Mark done",
|
|
529
|
-
onClick: () =>
|
|
530
|
-
disabled:
|
|
548
|
+
onClick: () => ne.mutate(t),
|
|
549
|
+
disabled: ne.isPending,
|
|
531
550
|
className: "flex h-4 w-4 shrink-0 items-center justify-center rounded border border-slate-300 text-transparent hover:border-emerald-500 hover:text-emerald-500 dark:border-border",
|
|
532
551
|
children: "✓"
|
|
533
552
|
}
|
|
@@ -541,7 +560,7 @@ function Ot({
|
|
|
541
560
|
"data-tip": `Handed to ${t.agent_name ?? "your agent"} — it picks this up through My Work`,
|
|
542
561
|
"data-my-work-agent-task": t.id,
|
|
543
562
|
children: [
|
|
544
|
-
/* @__PURE__ */ e(
|
|
563
|
+
/* @__PURE__ */ e(Se, { className: "h-3 w-3", "aria-hidden": !0 }),
|
|
545
564
|
t.agent_name ?? "Agent"
|
|
546
565
|
]
|
|
547
566
|
}
|
|
@@ -550,7 +569,7 @@ function Ot({
|
|
|
550
569
|
"button",
|
|
551
570
|
{
|
|
552
571
|
type: "button",
|
|
553
|
-
onClick: (l) => t.kind === "support" ?
|
|
572
|
+
onClick: (l) => t.kind === "support" ? V(t.id) : C(t.collection, t.item, l),
|
|
554
573
|
className: "min-w-0 flex-1 truncate text-left text-[12.5px] hover:underline",
|
|
555
574
|
children: [
|
|
556
575
|
t.title,
|
|
@@ -559,18 +578,18 @@ function Ot({
|
|
|
559
578
|
}
|
|
560
579
|
),
|
|
561
580
|
/* @__PURE__ */ e(
|
|
562
|
-
|
|
581
|
+
ze,
|
|
563
582
|
{
|
|
564
583
|
task: t,
|
|
565
584
|
isAssignee: !0,
|
|
566
585
|
compact: !0,
|
|
567
|
-
onTaskChanged: () => void
|
|
586
|
+
onTaskChanged: () => void v.invalidateQueries({ queryKey: ["my-work"] })
|
|
568
587
|
}
|
|
569
588
|
),
|
|
570
589
|
t.due_date && /* @__PURE__ */ e(
|
|
571
590
|
"span",
|
|
572
591
|
{
|
|
573
|
-
className: `text-[11px] tabular-nums ${
|
|
592
|
+
className: `text-[11px] tabular-nums ${F(t.due_date) ? "font-medium text-red-600 dark:text-red-400" : "text-muted-foreground"}`,
|
|
574
593
|
children: new Date(t.due_date).toLocaleDateString(void 0, { timeZone: "UTC" })
|
|
575
594
|
}
|
|
576
595
|
)
|
|
@@ -592,7 +611,7 @@ function Ot({
|
|
|
592
611
|
(a.team_tasks ?? []).length === 0 ? /* @__PURE__ */ e("p", { className: "px-4 py-5 text-center text-[12.5px] text-muted-foreground", children: "Nothing waiting with your teams." }) : /* @__PURE__ */ e("ul", { className: "divide-y divide-slate-100 dark:divide-border/60", children: (a.team_tasks ?? []).map((t) => /* @__PURE__ */ n(
|
|
593
612
|
"li",
|
|
594
613
|
{
|
|
595
|
-
className:
|
|
614
|
+
className: q("flex items-center gap-2.5 px-4 py-2", _(`tt:${t.id}`)),
|
|
596
615
|
"data-my-work-team-task": t.id,
|
|
597
616
|
children: [
|
|
598
617
|
t.priority === "urgent" && /* @__PURE__ */ e("span", { className: "shrink-0 rounded bg-red-500/10 px-1 py-px text-[9.5px] font-semibold uppercase tracking-wide text-red-600 dark:text-red-400", children: "urgent" }),
|
|
@@ -600,7 +619,7 @@ function Ot({
|
|
|
600
619
|
"button",
|
|
601
620
|
{
|
|
602
621
|
type: "button",
|
|
603
|
-
onClick: (l) =>
|
|
622
|
+
onClick: (l) => C(t.collection, t.item, l),
|
|
604
623
|
className: "min-w-0 flex-1 truncate text-left text-[12.5px] hover:underline",
|
|
605
624
|
children: [
|
|
606
625
|
t.title,
|
|
@@ -611,7 +630,7 @@ function Ot({
|
|
|
611
630
|
t.due_date && /* @__PURE__ */ e(
|
|
612
631
|
"span",
|
|
613
632
|
{
|
|
614
|
-
className: `text-[11px] tabular-nums ${
|
|
633
|
+
className: `text-[11px] tabular-nums ${F(t.due_date) ? "font-medium text-red-600 dark:text-red-400" : "text-muted-foreground"}`,
|
|
615
634
|
children: new Date(t.due_date).toLocaleDateString(void 0, {
|
|
616
635
|
timeZone: "UTC"
|
|
617
636
|
})
|
|
@@ -621,8 +640,8 @@ function Ot({
|
|
|
621
640
|
"button",
|
|
622
641
|
{
|
|
623
642
|
type: "button",
|
|
624
|
-
onClick: () =>
|
|
625
|
-
disabled:
|
|
643
|
+
onClick: () => M.mutate({ id: t.id, action: "claim" }),
|
|
644
|
+
disabled: M.isPending,
|
|
626
645
|
className: "shrink-0 rounded-md border border-slate-200 px-2 py-0.5 text-[11px] font-medium hover:bg-muted dark:border-border",
|
|
627
646
|
"data-my-work-claim": t.id,
|
|
628
647
|
children: "Pick it up"
|
|
@@ -636,7 +655,7 @@ function Ot({
|
|
|
636
655
|
}
|
|
637
656
|
),
|
|
638
657
|
waiting: () => {
|
|
639
|
-
const t = a.requested ?? [], l = t.filter((d) =>
|
|
658
|
+
const t = a.requested ?? [], l = t.filter((d) => F(d.due_date)).length;
|
|
640
659
|
return /* @__PURE__ */ n(
|
|
641
660
|
"section",
|
|
642
661
|
{
|
|
@@ -654,18 +673,18 @@ function Ot({
|
|
|
654
673
|
/* @__PURE__ */ e("p", { className: "text-[11px] text-muted-foreground", children: "Tasks you asked someone else to do." })
|
|
655
674
|
] }),
|
|
656
675
|
t.length === 0 ? /* @__PURE__ */ e("p", { className: "px-4 py-5 text-center text-[12.5px] text-muted-foreground", children: "You are not waiting on anyone." }) : /* @__PURE__ */ e("ul", { className: "divide-y divide-slate-100 dark:divide-border/60", children: t.map((d) => {
|
|
657
|
-
const
|
|
676
|
+
const N = F(d.due_date), T = !!d.nudged_at && Date.now() - new Date(d.nudged_at).getTime() < 20 * 36e5;
|
|
658
677
|
return /* @__PURE__ */ n(
|
|
659
678
|
"li",
|
|
660
679
|
{
|
|
661
|
-
className:
|
|
680
|
+
className: q("flex items-center gap-2.5 px-4 py-2", _(`r:${d.id}`)),
|
|
662
681
|
"data-my-work-requested": d.id,
|
|
663
682
|
children: [
|
|
664
683
|
/* @__PURE__ */ n(
|
|
665
684
|
"button",
|
|
666
685
|
{
|
|
667
686
|
type: "button",
|
|
668
|
-
onClick: (
|
|
687
|
+
onClick: (D) => d.kind === "support" ? V(d.id) : C(d.collection, d.item, D),
|
|
669
688
|
className: "min-w-0 flex-1 truncate text-left text-[12.5px] hover:underline",
|
|
670
689
|
children: [
|
|
671
690
|
d.title,
|
|
@@ -679,9 +698,9 @@ function Ot({
|
|
|
679
698
|
d.due_date && /* @__PURE__ */ n(
|
|
680
699
|
"span",
|
|
681
700
|
{
|
|
682
|
-
className: `text-[11px] tabular-nums ${
|
|
701
|
+
className: `text-[11px] tabular-nums ${N ? "font-medium text-red-600 dark:text-red-400" : "text-muted-foreground"}`,
|
|
683
702
|
children: [
|
|
684
|
-
|
|
703
|
+
N ? "Overdue · " : "",
|
|
685
704
|
new Date(d.due_date).toLocaleDateString(void 0, {
|
|
686
705
|
timeZone: "UTC"
|
|
687
706
|
})
|
|
@@ -692,12 +711,12 @@ function Ot({
|
|
|
692
711
|
"button",
|
|
693
712
|
{
|
|
694
713
|
type: "button",
|
|
695
|
-
onClick: () =>
|
|
696
|
-
disabled:
|
|
697
|
-
title:
|
|
714
|
+
onClick: () => M.mutate({ id: d.id, action: "nudge" }),
|
|
715
|
+
disabled: M.isPending || T,
|
|
716
|
+
title: T ? "Already nudged today" : "Send a reminder",
|
|
698
717
|
className: "shrink-0 rounded-md border border-slate-200 px-2 py-0.5 text-[11px] font-medium hover:bg-muted disabled:opacity-50 dark:border-border",
|
|
699
718
|
"data-my-work-nudge": d.id,
|
|
700
|
-
children:
|
|
719
|
+
children: T ? "Nudged" : "Nudge"
|
|
701
720
|
}
|
|
702
721
|
)
|
|
703
722
|
]
|
|
@@ -716,7 +735,7 @@ function Ot({
|
|
|
716
735
|
"button",
|
|
717
736
|
{
|
|
718
737
|
type: "button",
|
|
719
|
-
onClick: () =>
|
|
738
|
+
onClick: () => se.mutate(a.notifications.map((t) => t.id)),
|
|
720
739
|
className: "text-[11px] text-[#00a5cc] hover:underline",
|
|
721
740
|
children: "Mark all read"
|
|
722
741
|
}
|
|
@@ -725,21 +744,21 @@ function Ot({
|
|
|
725
744
|
a.notifications.length === 0 ? /* @__PURE__ */ e("p", { className: "px-4 py-5 text-center text-[12.5px] text-muted-foreground", children: "You're all caught up." }) : /* @__PURE__ */ e("ul", { className: "divide-y divide-slate-100 dark:divide-border/60", children: a.notifications.map((t) => /* @__PURE__ */ n(
|
|
726
745
|
"li",
|
|
727
746
|
{
|
|
728
|
-
className:
|
|
747
|
+
className: q("flex items-start gap-2.5 px-4 py-2", _(`n:${t.id}`)),
|
|
729
748
|
children: [
|
|
730
749
|
/* @__PURE__ */ e(
|
|
731
|
-
|
|
750
|
+
rt,
|
|
732
751
|
{
|
|
733
752
|
userId: t.sender,
|
|
734
753
|
className: "mt-0.5 h-5 w-5",
|
|
735
754
|
fallback: /* @__PURE__ */ e("span", { className: "mt-0.5 flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-slate-100 text-[9px] font-semibold text-slate-500 dark:bg-muted" })
|
|
736
755
|
}
|
|
737
756
|
),
|
|
738
|
-
|
|
757
|
+
we(t.collection, t.item) ? /* @__PURE__ */ n(
|
|
739
758
|
"button",
|
|
740
759
|
{
|
|
741
760
|
type: "button",
|
|
742
|
-
onClick: (l) =>
|
|
761
|
+
onClick: (l) => C(t.collection, t.item, l, a.notifications),
|
|
743
762
|
className: "min-w-0 flex-1 cursor-pointer text-left hover:opacity-80",
|
|
744
763
|
children: [
|
|
745
764
|
/* @__PURE__ */ e("p", { className: "truncate text-[12.5px] font-medium", children: t.subject }),
|
|
@@ -759,9 +778,9 @@ function Ot({
|
|
|
759
778
|
type: "button",
|
|
760
779
|
"aria-label": "Mark read",
|
|
761
780
|
"data-tip": "Mark read",
|
|
762
|
-
onClick: () =>
|
|
781
|
+
onClick: () => se.mutate([t.id]),
|
|
763
782
|
className: "mt-0.5 shrink-0 rounded p-1 text-slate-400 hover:bg-slate-100 hover:text-slate-700 dark:hover:bg-muted dark:hover:text-slate-200",
|
|
764
|
-
children: /* @__PURE__ */ e(
|
|
783
|
+
children: /* @__PURE__ */ e(Ce, { className: "h-3 w-3" })
|
|
765
784
|
}
|
|
766
785
|
)
|
|
767
786
|
]
|
|
@@ -770,39 +789,41 @@ function Ot({
|
|
|
770
789
|
)) })
|
|
771
790
|
] })
|
|
772
791
|
}, s = new Map(
|
|
773
|
-
|
|
792
|
+
x.order.filter((t) => !x.hidden.includes(t) && r[t]).map((t) => [t, r[t]()]).filter(([, t]) => t != null)
|
|
774
793
|
), h = [...s.keys()], m = [];
|
|
775
794
|
let b = 0;
|
|
776
795
|
for (; b < h.length; ) {
|
|
777
796
|
const t = h[b];
|
|
778
|
-
if (
|
|
779
|
-
m.push(
|
|
797
|
+
if (me.has(t))
|
|
798
|
+
m.push(
|
|
799
|
+
/* @__PURE__ */ e("div", { className: "min-w-0", children: s.get(t) }, t)
|
|
800
|
+
), b++;
|
|
780
801
|
else {
|
|
781
802
|
const l = [t];
|
|
782
|
-
b + 1 < h.length && !
|
|
783
|
-
/* @__PURE__ */ e("div", { className: "grid gap-5 lg:grid-cols-2", children: l.map((d) => /* @__PURE__ */ e("div", { children: s.get(d) }, d)) }, l.join("+"))
|
|
803
|
+
b + 1 < h.length && !me.has(h[b + 1]) && l.push(h[b + 1]), m.push(
|
|
804
|
+
/* @__PURE__ */ e("div", { className: "grid grid-cols-1 gap-5 lg:grid-cols-2", children: l.map((d) => /* @__PURE__ */ e("div", { className: "min-w-0", children: s.get(d) }, d)) }, l.join("+"))
|
|
784
805
|
), b += l.length;
|
|
785
806
|
}
|
|
786
807
|
}
|
|
787
808
|
return m;
|
|
788
809
|
})(),
|
|
789
|
-
/* @__PURE__ */ e(
|
|
810
|
+
/* @__PURE__ */ e(ct, {})
|
|
790
811
|
] });
|
|
791
812
|
}
|
|
792
|
-
function
|
|
793
|
-
const
|
|
794
|
-
return !
|
|
813
|
+
function ct() {
|
|
814
|
+
const o = Je(), { rooms: u } = Re(o);
|
|
815
|
+
return !o || u.length === 0 ? null : /* @__PURE__ */ n(
|
|
795
816
|
"section",
|
|
796
817
|
{
|
|
797
818
|
className: "rounded-lg border border-slate-200 bg-white dark:border-border dark:bg-card",
|
|
798
819
|
"data-my-work-chat": !0,
|
|
799
820
|
children: [
|
|
800
821
|
/* @__PURE__ */ e("div", { className: "border-b border-slate-200 px-4 py-2.5 dark:border-border", children: /* @__PURE__ */ e("h2", { className: "text-[13px] font-medium", children: "Record conversations" }) }),
|
|
801
|
-
/* @__PURE__ */ e("ul", { className: "divide-y divide-slate-100 dark:divide-border/60", children:
|
|
822
|
+
/* @__PURE__ */ e("ul", { className: "divide-y divide-slate-100 dark:divide-border/60", children: u.map((c) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ n(
|
|
802
823
|
"button",
|
|
803
824
|
{
|
|
804
825
|
type: "button",
|
|
805
|
-
onClick: () =>
|
|
826
|
+
onClick: () => He(c.room, c.label),
|
|
806
827
|
className: "flex w-full items-center gap-2.5 px-4 py-2 text-left hover:bg-slate-50 dark:hover:bg-muted/40",
|
|
807
828
|
"data-my-work-chat-room": c.room,
|
|
808
829
|
children: [
|
|
@@ -823,5 +844,5 @@ function at() {
|
|
|
823
844
|
);
|
|
824
845
|
}
|
|
825
846
|
export {
|
|
826
|
-
|
|
847
|
+
Ft as MyWorkView
|
|
827
848
|
};
|