@elevasis/ui 2.14.0 → 2.15.0
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/{chunk-IO75JNQE.js → chunk-32NXXCQU.js} +1 -1
- package/dist/{chunk-QFEQWAPQ.js → chunk-5SXYCICG.js} +2 -2
- package/dist/{chunk-QFBENUS2.js → chunk-D7HBX5US.js} +3 -3
- package/dist/{chunk-C56A2MAS.js → chunk-FFXHKADZ.js} +12 -5
- package/dist/{chunk-PPKJKM3U.js → chunk-SFW573HS.js} +2 -2
- package/dist/{chunk-JAUU6TZU.js → chunk-U2RXVZGY.js} +2 -41
- package/dist/{chunk-A7346I7H.js → chunk-X75JEGHS.js} +1 -1
- package/dist/{chunk-TAUPDLQ7.js → chunk-XJ7KC54A.js} +1 -1
- package/dist/{chunk-ETQRV5A6.js → chunk-YNPVQDNB.js} +1 -1
- package/dist/components/index.d.ts +141 -49
- package/dist/components/index.js +21 -395
- package/dist/features/auth/index.d.ts +70 -6
- package/dist/features/auth/index.js +1 -1
- package/dist/features/crm/index.d.ts +70 -6
- package/dist/features/crm/index.js +4 -4
- package/dist/features/dashboard/index.js +3 -3
- package/dist/features/delivery/index.d.ts +70 -6
- package/dist/features/delivery/index.js +4 -4
- package/dist/features/lead-gen/index.js +7 -7
- package/dist/features/monitoring/index.js +4 -4
- package/dist/features/monitoring/requests/index.css +589 -0
- package/dist/features/monitoring/requests/index.js +442 -0
- package/dist/features/operations/index.js +5 -5
- package/dist/features/settings/index.d.ts +70 -6
- package/dist/features/settings/index.js +3 -3
- package/dist/hooks/index.d.ts +142 -40
- package/dist/hooks/index.js +2 -2
- package/dist/hooks/published.d.ts +142 -40
- package/dist/hooks/published.js +2 -2
- package/dist/index.d.ts +142 -40
- package/dist/index.js +2 -2
- package/dist/initialization/index.d.ts +70 -6
- package/dist/profile/index.d.ts +70 -6
- package/dist/provider/index.js +1 -1
- package/dist/provider/published.js +1 -1
- package/dist/supabase/index.d.ts +130 -12
- package/dist/types/index.d.ts +70 -6
- package/package.json +2 -2
- package/src/hooks/README.md +1 -2
|
@@ -0,0 +1,442 @@
|
|
|
1
|
+
import '../../../chunk-TUMSNGTX.js';
|
|
2
|
+
import { FilterBar } from '../../../chunk-PDHTXPSF.js';
|
|
3
|
+
import { ConfirmationModal } from '../../../chunk-GBMNCNHX.js';
|
|
4
|
+
import '../../../chunk-7M2VOCYN.js';
|
|
5
|
+
import { usePaginationState, useRequestsList, useUpdateRequestStatus, useRequest } from '../../../chunk-U2RXVZGY.js';
|
|
6
|
+
import '../../../chunk-LXHZYSMQ.js';
|
|
7
|
+
import '../../../chunk-BRXELOHC.js';
|
|
8
|
+
import '../../../chunk-22UVE3RA.js';
|
|
9
|
+
import '../../../chunk-3ZMAGTWF.js';
|
|
10
|
+
import '../../../chunk-DKQQK3WX.js';
|
|
11
|
+
import '../../../chunk-5IBTTMWX.js';
|
|
12
|
+
import '../../../chunk-R73EHHPN.js';
|
|
13
|
+
import '../../../chunk-WLOQ4IBG.js';
|
|
14
|
+
import '../../../chunk-C7BX547M.js';
|
|
15
|
+
import '../../../chunk-RX4UWZZR.js';
|
|
16
|
+
import { PageTitleCaption, ContextViewer, JsonViewer } from '../../../chunk-SQQGLGHW.js';
|
|
17
|
+
import '../../../chunk-3KMDHCAR.js';
|
|
18
|
+
import '../../../chunk-NYBEU5TE.js';
|
|
19
|
+
import '../../../chunk-ZB5GAV7J.js';
|
|
20
|
+
import '../../../chunk-SZHARWKU.js';
|
|
21
|
+
import '../../../chunk-NVOCKXUQ.js';
|
|
22
|
+
import '../../../chunk-2IFYDILW.js';
|
|
23
|
+
import '../../../chunk-ELJIFLCB.js';
|
|
24
|
+
import '../../../chunk-L4XXM55J.js';
|
|
25
|
+
import '../../../chunk-FL67C3WY.js';
|
|
26
|
+
import '../../../chunk-QJ2KCHKX.js';
|
|
27
|
+
import '../../../chunk-SLVC5OJ2.js';
|
|
28
|
+
import '../../../chunk-DT3QYZVU.js';
|
|
29
|
+
import '../../../chunk-RNP5R5I3.js';
|
|
30
|
+
import { formatTimeAgo } from '../../../chunk-IOKL7BKE.js';
|
|
31
|
+
import '../../../chunk-MTJ43R2E.js';
|
|
32
|
+
import '../../../chunk-TUXTSEAF.js';
|
|
33
|
+
import '../../../chunk-DD3CCMCZ.js';
|
|
34
|
+
import '../../../chunk-QEPXAWE2.js';
|
|
35
|
+
import '../../../chunk-BRJ3QZ4E.js';
|
|
36
|
+
import '../../../chunk-Q7DJKLEN.js';
|
|
37
|
+
import { useState } from 'react';
|
|
38
|
+
import { useNavigate } from '@tanstack/react-router';
|
|
39
|
+
import { Badge, Menu, Button, Stack, Paper, Select, Center, Loader, Text, Table, Group, Pagination, Skeleton, SimpleGrid, Title, SegmentedControl } from '@mantine/core';
|
|
40
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
41
|
+
import { IconChevronDown, IconAlertTriangle, IconArrowLeft } from '@tabler/icons-react';
|
|
42
|
+
import { notifications } from '@mantine/notifications';
|
|
43
|
+
|
|
44
|
+
// src/features/monitoring/requests/manifest.ts
|
|
45
|
+
var submittedRequestsManifest = {
|
|
46
|
+
key: "submitted-requests",
|
|
47
|
+
featureId: "submitted-requests"
|
|
48
|
+
};
|
|
49
|
+
var TYPE_COLORS = {
|
|
50
|
+
bug: "red",
|
|
51
|
+
feature: "blue",
|
|
52
|
+
question: "yellow",
|
|
53
|
+
other: "gray"
|
|
54
|
+
};
|
|
55
|
+
var TYPE_LABELS = {
|
|
56
|
+
bug: "Bug",
|
|
57
|
+
feature: "Feature",
|
|
58
|
+
question: "Question",
|
|
59
|
+
other: "Other"
|
|
60
|
+
};
|
|
61
|
+
function RequestTypeBadge({ type }) {
|
|
62
|
+
return /* @__PURE__ */ jsx(Badge, { variant: "light", color: TYPE_COLORS[type], size: "sm", children: TYPE_LABELS[type] });
|
|
63
|
+
}
|
|
64
|
+
var SEVERITY_COLORS = {
|
|
65
|
+
critical: "red",
|
|
66
|
+
warning: "orange",
|
|
67
|
+
info: "blue"
|
|
68
|
+
};
|
|
69
|
+
var SEVERITY_LABELS = {
|
|
70
|
+
critical: "Critical",
|
|
71
|
+
warning: "Warning",
|
|
72
|
+
info: "Info"
|
|
73
|
+
};
|
|
74
|
+
function SeverityBadge({ severity }) {
|
|
75
|
+
return /* @__PURE__ */ jsx(Badge, { variant: "light", color: SEVERITY_COLORS[severity], size: "sm", children: SEVERITY_LABELS[severity] });
|
|
76
|
+
}
|
|
77
|
+
var STATUS_COLORS = {
|
|
78
|
+
open: "blue",
|
|
79
|
+
investigating: "yellow",
|
|
80
|
+
resolved: "green",
|
|
81
|
+
wont_fix: "gray"
|
|
82
|
+
};
|
|
83
|
+
var STATUS_LABELS = {
|
|
84
|
+
open: "Open",
|
|
85
|
+
investigating: "Investigating",
|
|
86
|
+
resolved: "Resolved",
|
|
87
|
+
wont_fix: "Won't Fix"
|
|
88
|
+
};
|
|
89
|
+
function StatusBadge({ status }) {
|
|
90
|
+
return /* @__PURE__ */ jsx(Badge, { variant: "light", color: STATUS_COLORS[status], size: "sm", children: STATUS_LABELS[status] });
|
|
91
|
+
}
|
|
92
|
+
var VALID_TRANSITIONS = {
|
|
93
|
+
open: ["investigating", "wont_fix"],
|
|
94
|
+
investigating: ["resolved", "wont_fix", "open"],
|
|
95
|
+
resolved: ["open"],
|
|
96
|
+
wont_fix: ["open"]
|
|
97
|
+
};
|
|
98
|
+
var ALL_STATUSES = ["open", "investigating", "resolved", "wont_fix"];
|
|
99
|
+
var STATUS_LABELS2 = {
|
|
100
|
+
open: "Open",
|
|
101
|
+
investigating: "Investigating",
|
|
102
|
+
resolved: "Resolved",
|
|
103
|
+
wont_fix: "Won't Fix"
|
|
104
|
+
};
|
|
105
|
+
function StatusTransitionMenu({ currentStatus, onTransition }) {
|
|
106
|
+
const [wontFixConfirmOpen, setWontFixConfirmOpen] = useState(false);
|
|
107
|
+
const validNextStatuses = VALID_TRANSITIONS[currentStatus];
|
|
108
|
+
function handleSelect(status) {
|
|
109
|
+
if (status === "wont_fix") {
|
|
110
|
+
setWontFixConfirmOpen(true);
|
|
111
|
+
} else {
|
|
112
|
+
onTransition(status);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
116
|
+
/* @__PURE__ */ jsxs(Menu, { withinPortal: true, position: "bottom-end", shadow: "md", children: [
|
|
117
|
+
/* @__PURE__ */ jsx(Menu.Target, { children: /* @__PURE__ */ jsx(Button, { variant: "light", size: "xs", rightSection: /* @__PURE__ */ jsx(IconChevronDown, { size: 14 }), children: STATUS_LABELS2[currentStatus] }) }),
|
|
118
|
+
/* @__PURE__ */ jsxs(Menu.Dropdown, { children: [
|
|
119
|
+
/* @__PURE__ */ jsx(Menu.Label, { children: "Transition to" }),
|
|
120
|
+
ALL_STATUSES.filter((s) => s !== currentStatus).map((status) => {
|
|
121
|
+
const isValid = validNextStatuses.includes(status);
|
|
122
|
+
return /* @__PURE__ */ jsx(
|
|
123
|
+
Menu.Item,
|
|
124
|
+
{
|
|
125
|
+
disabled: !isValid,
|
|
126
|
+
color: status === "wont_fix" ? "red" : void 0,
|
|
127
|
+
onClick: () => isValid && handleSelect(status),
|
|
128
|
+
children: STATUS_LABELS2[status]
|
|
129
|
+
},
|
|
130
|
+
status
|
|
131
|
+
);
|
|
132
|
+
})
|
|
133
|
+
] })
|
|
134
|
+
] }),
|
|
135
|
+
/* @__PURE__ */ jsx(
|
|
136
|
+
ConfirmationModal,
|
|
137
|
+
{
|
|
138
|
+
opened: wontFixConfirmOpen,
|
|
139
|
+
onClose: () => setWontFixConfirmOpen(false),
|
|
140
|
+
icon: /* @__PURE__ */ jsx(IconAlertTriangle, { color: "red" }),
|
|
141
|
+
title: "Mark as Won't Fix",
|
|
142
|
+
text: "Are you sure you want to mark this request as won't fix? This signals the issue will not be addressed.",
|
|
143
|
+
buttonText: "Confirm Won't Fix",
|
|
144
|
+
buttonColor: "red",
|
|
145
|
+
confirmationHandler: () => {
|
|
146
|
+
setWontFixConfirmOpen(false);
|
|
147
|
+
onTransition("wont_fix");
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
)
|
|
151
|
+
] });
|
|
152
|
+
}
|
|
153
|
+
var PAGE_SIZE = 20;
|
|
154
|
+
function RequestsListPage({
|
|
155
|
+
type: typeProp,
|
|
156
|
+
severity: severityProp,
|
|
157
|
+
status: statusProp,
|
|
158
|
+
source: sourceProp,
|
|
159
|
+
onNavigateToRequest
|
|
160
|
+
}) {
|
|
161
|
+
const navigate = useNavigate();
|
|
162
|
+
const [typeFilter, setTypeFilter] = useState(typeProp);
|
|
163
|
+
const [severityFilter, setSeverityFilter] = useState(severityProp);
|
|
164
|
+
const [statusFilter, setStatusFilter] = useState(statusProp ?? "open");
|
|
165
|
+
const [sourceFilter, setSourceFilter] = useState(sourceProp);
|
|
166
|
+
const { page, setPage, offset, totalPages } = usePaginationState(PAGE_SIZE, [
|
|
167
|
+
typeFilter,
|
|
168
|
+
severityFilter,
|
|
169
|
+
statusFilter,
|
|
170
|
+
sourceFilter
|
|
171
|
+
]);
|
|
172
|
+
const { data: requests = [], isLoading } = useRequestsList({
|
|
173
|
+
type: typeFilter,
|
|
174
|
+
severity: severityFilter,
|
|
175
|
+
status: statusFilter,
|
|
176
|
+
source: sourceFilter,
|
|
177
|
+
limit: PAGE_SIZE,
|
|
178
|
+
offset
|
|
179
|
+
});
|
|
180
|
+
const { mutate: updateStatus } = useUpdateRequestStatus();
|
|
181
|
+
function pushSearchParam(patch) {
|
|
182
|
+
navigate({
|
|
183
|
+
// @ts-expect-error — search type is narrowed by each route wrapper
|
|
184
|
+
search: (prev) => ({ ...prev, ...patch })
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
function handleTypeChange(value) {
|
|
188
|
+
const next = value ?? void 0;
|
|
189
|
+
setTypeFilter(next);
|
|
190
|
+
pushSearchParam({ type: next });
|
|
191
|
+
}
|
|
192
|
+
function handleSeverityChange(value) {
|
|
193
|
+
const next = value ?? void 0;
|
|
194
|
+
setSeverityFilter(next);
|
|
195
|
+
pushSearchParam({ severity: next });
|
|
196
|
+
}
|
|
197
|
+
function handleStatusChange(value) {
|
|
198
|
+
const next = value ?? void 0;
|
|
199
|
+
setStatusFilter(next);
|
|
200
|
+
pushSearchParam({ status: next });
|
|
201
|
+
}
|
|
202
|
+
function handleSourceChange(value) {
|
|
203
|
+
const next = value ?? void 0;
|
|
204
|
+
setSourceFilter(next);
|
|
205
|
+
pushSearchParam({ source: next });
|
|
206
|
+
}
|
|
207
|
+
const estimatedTotal = requests.length < PAGE_SIZE ? offset + requests.length : offset + PAGE_SIZE + 1;
|
|
208
|
+
const pageCount = totalPages(estimatedTotal);
|
|
209
|
+
return /* @__PURE__ */ jsxs(Stack, { children: [
|
|
210
|
+
/* @__PURE__ */ jsx(
|
|
211
|
+
PageTitleCaption,
|
|
212
|
+
{
|
|
213
|
+
title: "Submitted Requests",
|
|
214
|
+
caption: "Browse and triage user-submitted bug reports, feature requests, and questions"
|
|
215
|
+
}
|
|
216
|
+
),
|
|
217
|
+
/* @__PURE__ */ jsx(Paper, { children: /* @__PURE__ */ jsxs(Stack, { gap: 0, children: [
|
|
218
|
+
/* @__PURE__ */ jsxs(FilterBar, { children: [
|
|
219
|
+
/* @__PURE__ */ jsx(
|
|
220
|
+
Select,
|
|
221
|
+
{
|
|
222
|
+
placeholder: "All types",
|
|
223
|
+
value: typeFilter ?? null,
|
|
224
|
+
onChange: handleTypeChange,
|
|
225
|
+
data: [
|
|
226
|
+
{ value: "bug", label: "Bug" },
|
|
227
|
+
{ value: "feature", label: "Feature" },
|
|
228
|
+
{ value: "question", label: "Question" },
|
|
229
|
+
{ value: "other", label: "Other" }
|
|
230
|
+
],
|
|
231
|
+
clearable: true,
|
|
232
|
+
size: "sm",
|
|
233
|
+
w: 150
|
|
234
|
+
}
|
|
235
|
+
),
|
|
236
|
+
/* @__PURE__ */ jsx(
|
|
237
|
+
Select,
|
|
238
|
+
{
|
|
239
|
+
placeholder: "All severities",
|
|
240
|
+
value: severityFilter ?? null,
|
|
241
|
+
onChange: handleSeverityChange,
|
|
242
|
+
data: [
|
|
243
|
+
{ value: "critical", label: "Critical" },
|
|
244
|
+
{ value: "warning", label: "Warning" },
|
|
245
|
+
{ value: "info", label: "Info" }
|
|
246
|
+
],
|
|
247
|
+
clearable: true,
|
|
248
|
+
size: "sm",
|
|
249
|
+
w: 160
|
|
250
|
+
}
|
|
251
|
+
),
|
|
252
|
+
/* @__PURE__ */ jsx(
|
|
253
|
+
Select,
|
|
254
|
+
{
|
|
255
|
+
placeholder: "All statuses",
|
|
256
|
+
value: statusFilter ?? null,
|
|
257
|
+
onChange: handleStatusChange,
|
|
258
|
+
data: [
|
|
259
|
+
{ value: "open", label: "Open" },
|
|
260
|
+
{ value: "investigating", label: "Investigating" },
|
|
261
|
+
{ value: "resolved", label: "Resolved" },
|
|
262
|
+
{ value: "wont_fix", label: "Won't Fix" }
|
|
263
|
+
],
|
|
264
|
+
clearable: true,
|
|
265
|
+
size: "sm",
|
|
266
|
+
w: 170
|
|
267
|
+
}
|
|
268
|
+
),
|
|
269
|
+
/* @__PURE__ */ jsx(
|
|
270
|
+
Select,
|
|
271
|
+
{
|
|
272
|
+
placeholder: "All sources",
|
|
273
|
+
value: sourceFilter ?? null,
|
|
274
|
+
onChange: handleSourceChange,
|
|
275
|
+
data: [
|
|
276
|
+
{ value: "agent", label: "Agent" },
|
|
277
|
+
{ value: "cli", label: "CLI" },
|
|
278
|
+
{ value: "api", label: "API" },
|
|
279
|
+
{ value: "webhook", label: "Webhook" },
|
|
280
|
+
{ value: "user", label: "User" },
|
|
281
|
+
{ value: "external", label: "External" }
|
|
282
|
+
],
|
|
283
|
+
clearable: true,
|
|
284
|
+
size: "sm",
|
|
285
|
+
w: 150
|
|
286
|
+
}
|
|
287
|
+
)
|
|
288
|
+
] }),
|
|
289
|
+
isLoading ? /* @__PURE__ */ jsx(Center, { py: "xl", children: /* @__PURE__ */ jsx(Loader, { size: "md" }) }) : requests.length === 0 ? /* @__PURE__ */ jsx(Center, { py: "xl", children: /* @__PURE__ */ jsx(Text, { c: "dimmed", children: "No requests yet" }) }) : /* @__PURE__ */ jsxs(Table, { highlightOnHover: true, style: { cursor: "pointer" }, children: [
|
|
290
|
+
/* @__PURE__ */ jsx(Table.Thead, { children: /* @__PURE__ */ jsxs(Table.Tr, { children: [
|
|
291
|
+
/* @__PURE__ */ jsx(Table.Th, { children: "Type" }),
|
|
292
|
+
/* @__PURE__ */ jsx(Table.Th, { children: "Severity" }),
|
|
293
|
+
/* @__PURE__ */ jsx(Table.Th, { children: "Title" }),
|
|
294
|
+
/* @__PURE__ */ jsx(Table.Th, { children: "Status" }),
|
|
295
|
+
/* @__PURE__ */ jsx(Table.Th, { children: "Source" }),
|
|
296
|
+
/* @__PURE__ */ jsx(Table.Th, { children: "Reported at" }),
|
|
297
|
+
/* @__PURE__ */ jsx(Table.Th, { children: "Actions" })
|
|
298
|
+
] }) }),
|
|
299
|
+
/* @__PURE__ */ jsx(Table.Tbody, { children: requests.map((request) => /* @__PURE__ */ jsxs(Table.Tr, { onClick: () => onNavigateToRequest?.(request.id), children: [
|
|
300
|
+
/* @__PURE__ */ jsx(Table.Td, { children: /* @__PURE__ */ jsx(RequestTypeBadge, { type: request.type }) }),
|
|
301
|
+
/* @__PURE__ */ jsx(Table.Td, { children: /* @__PURE__ */ jsx(SeverityBadge, { severity: request.severity }) }),
|
|
302
|
+
/* @__PURE__ */ jsx(Table.Td, { children: /* @__PURE__ */ jsx(Text, { size: "sm", lineClamp: 1, children: request.title }) }),
|
|
303
|
+
/* @__PURE__ */ jsx(Table.Td, { children: /* @__PURE__ */ jsx(StatusBadge, { status: request.status }) }),
|
|
304
|
+
/* @__PURE__ */ jsx(Table.Td, { children: /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", children: request.source }) }),
|
|
305
|
+
/* @__PURE__ */ jsx(Table.Td, { children: /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", children: formatTimeAgo(request.reported_at) }) }),
|
|
306
|
+
/* @__PURE__ */ jsx(Table.Td, { onClick: (e) => e.stopPropagation(), children: /* @__PURE__ */ jsx(
|
|
307
|
+
StatusTransitionMenu,
|
|
308
|
+
{
|
|
309
|
+
currentStatus: request.status,
|
|
310
|
+
onTransition: (newStatus) => updateStatus({ id: request.id, status: newStatus })
|
|
311
|
+
}
|
|
312
|
+
) })
|
|
313
|
+
] }, request.id)) })
|
|
314
|
+
] }),
|
|
315
|
+
pageCount > 1 && /* @__PURE__ */ jsx(Group, { justify: "flex-start", px: "md", pb: "md", children: /* @__PURE__ */ jsx(Pagination, { size: "sm", total: pageCount, value: page, onChange: setPage, boundaries: 1 }) })
|
|
316
|
+
] }) })
|
|
317
|
+
] });
|
|
318
|
+
}
|
|
319
|
+
function formatDateTime(isoString) {
|
|
320
|
+
if (!isoString) return "N/A";
|
|
321
|
+
return new Date(isoString).toLocaleString(void 0, {
|
|
322
|
+
dateStyle: "medium",
|
|
323
|
+
timeStyle: "short"
|
|
324
|
+
});
|
|
325
|
+
}
|
|
326
|
+
function MetaField({ label, children }) {
|
|
327
|
+
return /* @__PURE__ */ jsxs(Stack, { gap: 2, children: [
|
|
328
|
+
/* @__PURE__ */ jsx(Text, { size: "xs", c: "var(--color-text-subtle)", tt: "uppercase", fw: 600, children: label }),
|
|
329
|
+
/* @__PURE__ */ jsx("div", { children })
|
|
330
|
+
] });
|
|
331
|
+
}
|
|
332
|
+
function JsonSection({ title, data, emptyLabel }) {
|
|
333
|
+
const [view, setView] = useState("formatted");
|
|
334
|
+
return /* @__PURE__ */ jsx(Paper, { withBorder: true, children: /* @__PURE__ */ jsxs(Stack, { gap: "md", children: [
|
|
335
|
+
/* @__PURE__ */ jsxs(Group, { justify: "space-between", align: "center", children: [
|
|
336
|
+
/* @__PURE__ */ jsx(Title, { order: 3, children: title }),
|
|
337
|
+
data !== null && data !== void 0 && /* @__PURE__ */ jsx(
|
|
338
|
+
SegmentedControl,
|
|
339
|
+
{
|
|
340
|
+
value: view,
|
|
341
|
+
onChange: (v) => setView(v),
|
|
342
|
+
size: "xs",
|
|
343
|
+
data: [
|
|
344
|
+
{ label: "Formatted", value: "formatted" },
|
|
345
|
+
{ label: "JSON", value: "json" }
|
|
346
|
+
]
|
|
347
|
+
}
|
|
348
|
+
)
|
|
349
|
+
] }),
|
|
350
|
+
data === null || data === void 0 ? /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", fs: "italic", children: emptyLabel }) : view === "formatted" ? /* @__PURE__ */ jsx(ContextViewer, { data }) : /* @__PURE__ */ jsx(JsonViewer, { data })
|
|
351
|
+
] }) });
|
|
352
|
+
}
|
|
353
|
+
function RequestsDetailPage({ requestId, onNavigateBack }) {
|
|
354
|
+
const { data: request, isLoading } = useRequest(requestId);
|
|
355
|
+
const { mutate: updateStatus, isPending: isUpdating } = useUpdateRequestStatus();
|
|
356
|
+
function handleTransition(newStatus) {
|
|
357
|
+
updateStatus(
|
|
358
|
+
{ id: requestId, status: newStatus },
|
|
359
|
+
{
|
|
360
|
+
onSuccess: () => {
|
|
361
|
+
notifications.show({
|
|
362
|
+
title: "Status updated",
|
|
363
|
+
message: `Request status changed to "${newStatus.replace("_", " ")}".`,
|
|
364
|
+
color: "green",
|
|
365
|
+
position: "top-right",
|
|
366
|
+
autoClose: 4e3
|
|
367
|
+
});
|
|
368
|
+
},
|
|
369
|
+
onError: (error) => {
|
|
370
|
+
const message = error instanceof Error ? error.message : "Failed to update status.";
|
|
371
|
+
notifications.show({
|
|
372
|
+
title: "Update failed",
|
|
373
|
+
message,
|
|
374
|
+
color: "red",
|
|
375
|
+
position: "top-right",
|
|
376
|
+
autoClose: 5e3
|
|
377
|
+
});
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
);
|
|
381
|
+
}
|
|
382
|
+
const backButton = onNavigateBack ? /* @__PURE__ */ jsx(Button, { variant: "light", leftSection: /* @__PURE__ */ jsx(IconArrowLeft, { size: 16 }), onClick: onNavigateBack, size: "sm", children: "Back" }) : null;
|
|
383
|
+
if (isLoading) {
|
|
384
|
+
return /* @__PURE__ */ jsxs(Stack, { children: [
|
|
385
|
+
/* @__PURE__ */ jsxs(Group, { justify: "space-between", align: "end", children: [
|
|
386
|
+
/* @__PURE__ */ jsx(Skeleton, { height: 36, width: 240 }),
|
|
387
|
+
backButton
|
|
388
|
+
] }),
|
|
389
|
+
/* @__PURE__ */ jsx(Paper, { withBorder: true, children: /* @__PURE__ */ jsxs(Stack, { gap: "md", children: [
|
|
390
|
+
/* @__PURE__ */ jsx(Skeleton, { height: 20, width: 180 }),
|
|
391
|
+
/* @__PURE__ */ jsx(SimpleGrid, { cols: 2, children: Array.from({ length: 6 }).map((_, i) => /* @__PURE__ */ jsxs(Stack, { gap: 4, children: [
|
|
392
|
+
/* @__PURE__ */ jsx(Skeleton, { height: 12, width: 80 }),
|
|
393
|
+
/* @__PURE__ */ jsx(Skeleton, { height: 20, width: 140 })
|
|
394
|
+
] }, i)) })
|
|
395
|
+
] }) }),
|
|
396
|
+
/* @__PURE__ */ jsx(Paper, { withBorder: true, children: /* @__PURE__ */ jsx(Skeleton, { height: 80 }) })
|
|
397
|
+
] });
|
|
398
|
+
}
|
|
399
|
+
if (!request) {
|
|
400
|
+
return /* @__PURE__ */ jsxs(Stack, { children: [
|
|
401
|
+
/* @__PURE__ */ jsx(PageTitleCaption, { title: "Request Not Found", rightSection: backButton ?? void 0 }),
|
|
402
|
+
/* @__PURE__ */ jsx(Paper, { withBorder: true, children: /* @__PURE__ */ jsx(Text, { ta: "center", c: "dimmed", children: "This request no longer exists or could not be loaded." }) })
|
|
403
|
+
] });
|
|
404
|
+
}
|
|
405
|
+
const currentStatus = request.status;
|
|
406
|
+
return /* @__PURE__ */ jsxs(Stack, { children: [
|
|
407
|
+
/* @__PURE__ */ jsx(
|
|
408
|
+
PageTitleCaption,
|
|
409
|
+
{
|
|
410
|
+
title: request.title,
|
|
411
|
+
rightSection: /* @__PURE__ */ jsxs(Group, { gap: "xs", children: [
|
|
412
|
+
/* @__PURE__ */ jsx(StatusTransitionMenu, { currentStatus, onTransition: handleTransition }),
|
|
413
|
+
backButton
|
|
414
|
+
] })
|
|
415
|
+
}
|
|
416
|
+
),
|
|
417
|
+
/* @__PURE__ */ jsx(Paper, { withBorder: true, children: /* @__PURE__ */ jsxs(Stack, { gap: "md", children: [
|
|
418
|
+
/* @__PURE__ */ jsx(Title, { order: 3, children: "Details" }),
|
|
419
|
+
/* @__PURE__ */ jsxs(SimpleGrid, { cols: 2, spacing: "md", children: [
|
|
420
|
+
/* @__PURE__ */ jsxs(MetaField, { label: "Status", children: [
|
|
421
|
+
/* @__PURE__ */ jsx(StatusBadge, { status: currentStatus }),
|
|
422
|
+
isUpdating && /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", ml: 4, span: true, children: "Updating\u2026" })
|
|
423
|
+
] }),
|
|
424
|
+
/* @__PURE__ */ jsx(MetaField, { label: "Type", children: /* @__PURE__ */ jsx(RequestTypeBadge, { type: request.type }) }),
|
|
425
|
+
/* @__PURE__ */ jsx(MetaField, { label: "Severity", children: /* @__PURE__ */ jsx(SeverityBadge, { severity: request.severity }) }),
|
|
426
|
+
/* @__PURE__ */ jsx(MetaField, { label: "Category", children: /* @__PURE__ */ jsx(Text, { size: "sm", children: request.category }) }),
|
|
427
|
+
/* @__PURE__ */ jsx(MetaField, { label: "Source", children: /* @__PURE__ */ jsx(Text, { size: "sm", children: request.source }) }),
|
|
428
|
+
/* @__PURE__ */ jsx(MetaField, { label: "Reporter", children: /* @__PURE__ */ jsx(Text, { size: "sm", children: request.reporter_id ?? "Unknown" }) }),
|
|
429
|
+
/* @__PURE__ */ jsx(MetaField, { label: "Reported At", children: /* @__PURE__ */ jsx(Text, { size: "sm", children: formatDateTime(request.reported_at) }) }),
|
|
430
|
+
request.resolved_at && /* @__PURE__ */ jsx(MetaField, { label: "Resolved At", children: /* @__PURE__ */ jsx(Text, { size: "sm", children: formatDateTime(request.resolved_at) }) })
|
|
431
|
+
] })
|
|
432
|
+
] }) }),
|
|
433
|
+
/* @__PURE__ */ jsx(Paper, { withBorder: true, children: /* @__PURE__ */ jsxs(Stack, { gap: "md", children: [
|
|
434
|
+
/* @__PURE__ */ jsx(Title, { order: 3, children: "Description" }),
|
|
435
|
+
/* @__PURE__ */ jsx(Text, { size: "sm", style: { whiteSpace: "pre-wrap" }, children: request.description })
|
|
436
|
+
] }) }),
|
|
437
|
+
/* @__PURE__ */ jsx(JsonSection, { title: "Evidence", data: request.evidence, emptyLabel: "No evidence recorded." }),
|
|
438
|
+
/* @__PURE__ */ jsx(JsonSection, { title: "Context", data: request.context, emptyLabel: "No context recorded." })
|
|
439
|
+
] });
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
export { RequestTypeBadge, RequestsDetailPage, RequestsListPage, SeverityBadge, StatusBadge, StatusTransitionMenu, submittedRequestsManifest };
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
export { AgentExecutionPanel, AgentSessionGroup, CommandQueueDetailPage, CommandQueuePage, CommandQueueShell, CommandViewPage, CommandViewSidebarContent, ExecuteWorkflowModal, ExecutionPanel, OperationsSidebar, OperationsSidebarMiddle, OperationsSidebarTop, OrganizationGraphPage, ResourceDetailPage, ResourceExecuteDialog, ResourceExecuteForm, ResourcesPage, ResourcesSidebar, SessionChatArea, SessionChatInterface, SessionChatPage, SessionDetailsSidebar, SessionExecutionLogs, SessionHeader, SessionListItem, SessionsPage, SessionsSidebar, WorkflowExecutionPanel, operationsManifest } from '../../chunk-
|
|
1
|
+
export { AgentExecutionPanel, AgentSessionGroup, CommandQueueDetailPage, CommandQueuePage, CommandQueueShell, CommandViewPage, CommandViewSidebarContent, ExecuteWorkflowModal, ExecutionPanel, OperationsSidebar, OperationsSidebarMiddle, OperationsSidebarTop, OrganizationGraphPage, ResourceDetailPage, ResourceExecuteDialog, ResourceExecuteForm, ResourcesPage, ResourcesSidebar, SessionChatArea, SessionChatInterface, SessionChatPage, SessionDetailsSidebar, SessionExecutionLogs, SessionHeader, SessionListItem, SessionsPage, SessionsSidebar, WorkflowExecutionPanel, operationsManifest } from '../../chunk-FFXHKADZ.js';
|
|
2
2
|
import '../../chunk-ROSMICXG.js';
|
|
3
3
|
import '../../chunk-ADSSLKKP.js';
|
|
4
4
|
import '../../chunk-442LZPIR.js';
|
|
5
|
-
import '../../chunk-
|
|
5
|
+
import '../../chunk-YNPVQDNB.js';
|
|
6
6
|
import '../../chunk-BZZCNLT6.js';
|
|
7
7
|
import '../../chunk-IIMU5YAJ.js';
|
|
8
8
|
import '../../chunk-GBMNCNHX.js';
|
|
9
|
-
export { OperationsOverview } from '../../chunk-
|
|
9
|
+
export { OperationsOverview } from '../../chunk-XJ7KC54A.js';
|
|
10
10
|
import '../../chunk-LGKLC5MG.js';
|
|
11
11
|
import '../../chunk-STZJ7SY5.js';
|
|
12
12
|
import '../../chunk-M25JL54Z.js';
|
|
13
13
|
import '../../chunk-GHIPBT5V.js';
|
|
14
14
|
import '../../chunk-7M2VOCYN.js';
|
|
15
|
-
import '../../chunk-
|
|
15
|
+
import '../../chunk-U2RXVZGY.js';
|
|
16
16
|
import '../../chunk-LXHZYSMQ.js';
|
|
17
17
|
import '../../chunk-BRXELOHC.js';
|
|
18
18
|
import '../../chunk-22UVE3RA.js';
|
|
@@ -34,8 +34,8 @@ import '../../chunk-ELJIFLCB.js';
|
|
|
34
34
|
import '../../chunk-L4XXM55J.js';
|
|
35
35
|
import '../../chunk-FL67C3WY.js';
|
|
36
36
|
import '../../chunk-QJ2KCHKX.js';
|
|
37
|
-
import '../../chunk-DT3QYZVU.js';
|
|
38
37
|
import '../../chunk-SLVC5OJ2.js';
|
|
38
|
+
import '../../chunk-DT3QYZVU.js';
|
|
39
39
|
import '../../chunk-RNP5R5I3.js';
|
|
40
40
|
import '../../chunk-IOKL7BKE.js';
|
|
41
41
|
import '../../chunk-MTJ43R2E.js';
|
|
@@ -1264,10 +1264,8 @@ type Database = {
|
|
|
1264
1264
|
};
|
|
1265
1265
|
deployments: {
|
|
1266
1266
|
Row: {
|
|
1267
|
-
compiled_docs: Json | null;
|
|
1268
1267
|
created_at: string;
|
|
1269
1268
|
deployment_version: string | null;
|
|
1270
|
-
documentation: Json | null;
|
|
1271
1269
|
error_message: string | null;
|
|
1272
1270
|
id: string;
|
|
1273
1271
|
organization_id: string;
|
|
@@ -1279,10 +1277,8 @@ type Database = {
|
|
|
1279
1277
|
updated_at: string;
|
|
1280
1278
|
};
|
|
1281
1279
|
Insert: {
|
|
1282
|
-
compiled_docs?: Json | null;
|
|
1283
1280
|
created_at?: string;
|
|
1284
1281
|
deployment_version?: string | null;
|
|
1285
|
-
documentation?: Json | null;
|
|
1286
1282
|
error_message?: string | null;
|
|
1287
1283
|
id?: string;
|
|
1288
1284
|
organization_id: string;
|
|
@@ -1294,10 +1290,8 @@ type Database = {
|
|
|
1294
1290
|
updated_at?: string;
|
|
1295
1291
|
};
|
|
1296
1292
|
Update: {
|
|
1297
|
-
compiled_docs?: Json | null;
|
|
1298
1293
|
created_at?: string;
|
|
1299
1294
|
deployment_version?: string | null;
|
|
1300
|
-
documentation?: Json | null;
|
|
1301
1295
|
error_message?: string | null;
|
|
1302
1296
|
id?: string;
|
|
1303
1297
|
organization_id?: string;
|
|
@@ -1809,6 +1803,13 @@ type Database = {
|
|
|
1809
1803
|
updated_at?: string;
|
|
1810
1804
|
};
|
|
1811
1805
|
Relationships: [
|
|
1806
|
+
{
|
|
1807
|
+
foreignKeyName: "fk_milestones_project";
|
|
1808
|
+
columns: ["project_id"];
|
|
1809
|
+
isOneToOne: false;
|
|
1810
|
+
referencedRelation: "prj_projects";
|
|
1811
|
+
referencedColumns: ["id"];
|
|
1812
|
+
},
|
|
1812
1813
|
{
|
|
1813
1814
|
foreignKeyName: "prj_milestones_organization_id_fkey";
|
|
1814
1815
|
columns: ["organization_id"];
|
|
@@ -1869,6 +1870,34 @@ type Database = {
|
|
|
1869
1870
|
type?: string;
|
|
1870
1871
|
};
|
|
1871
1872
|
Relationships: [
|
|
1873
|
+
{
|
|
1874
|
+
foreignKeyName: "fk_notes_created_by";
|
|
1875
|
+
columns: ["created_by"];
|
|
1876
|
+
isOneToOne: false;
|
|
1877
|
+
referencedRelation: "users";
|
|
1878
|
+
referencedColumns: ["id"];
|
|
1879
|
+
},
|
|
1880
|
+
{
|
|
1881
|
+
foreignKeyName: "fk_notes_milestone";
|
|
1882
|
+
columns: ["milestone_id"];
|
|
1883
|
+
isOneToOne: false;
|
|
1884
|
+
referencedRelation: "prj_milestones";
|
|
1885
|
+
referencedColumns: ["id"];
|
|
1886
|
+
},
|
|
1887
|
+
{
|
|
1888
|
+
foreignKeyName: "fk_notes_project";
|
|
1889
|
+
columns: ["project_id"];
|
|
1890
|
+
isOneToOne: false;
|
|
1891
|
+
referencedRelation: "prj_projects";
|
|
1892
|
+
referencedColumns: ["id"];
|
|
1893
|
+
},
|
|
1894
|
+
{
|
|
1895
|
+
foreignKeyName: "fk_notes_task";
|
|
1896
|
+
columns: ["task_id"];
|
|
1897
|
+
isOneToOne: false;
|
|
1898
|
+
referencedRelation: "prj_tasks";
|
|
1899
|
+
referencedColumns: ["id"];
|
|
1900
|
+
},
|
|
1872
1901
|
{
|
|
1873
1902
|
foreignKeyName: "prj_notes_created_by_fkey";
|
|
1874
1903
|
columns: ["created_by"];
|
|
@@ -1959,6 +1988,20 @@ type Database = {
|
|
|
1959
1988
|
updated_at?: string;
|
|
1960
1989
|
};
|
|
1961
1990
|
Relationships: [
|
|
1991
|
+
{
|
|
1992
|
+
foreignKeyName: "fk_projects_company";
|
|
1993
|
+
columns: ["client_company_id"];
|
|
1994
|
+
isOneToOne: false;
|
|
1995
|
+
referencedRelation: "acq_companies";
|
|
1996
|
+
referencedColumns: ["id"];
|
|
1997
|
+
},
|
|
1998
|
+
{
|
|
1999
|
+
foreignKeyName: "fk_projects_deal";
|
|
2000
|
+
columns: ["deal_id"];
|
|
2001
|
+
isOneToOne: false;
|
|
2002
|
+
referencedRelation: "acq_deals";
|
|
2003
|
+
referencedColumns: ["id"];
|
|
2004
|
+
},
|
|
1962
2005
|
{
|
|
1963
2006
|
foreignKeyName: "prj_projects_client_company_id_fkey";
|
|
1964
2007
|
columns: ["client_company_id"];
|
|
@@ -2041,6 +2084,27 @@ type Database = {
|
|
|
2041
2084
|
updated_at?: string;
|
|
2042
2085
|
};
|
|
2043
2086
|
Relationships: [
|
|
2087
|
+
{
|
|
2088
|
+
foreignKeyName: "fk_tasks_milestone";
|
|
2089
|
+
columns: ["milestone_id"];
|
|
2090
|
+
isOneToOne: false;
|
|
2091
|
+
referencedRelation: "prj_milestones";
|
|
2092
|
+
referencedColumns: ["id"];
|
|
2093
|
+
},
|
|
2094
|
+
{
|
|
2095
|
+
foreignKeyName: "fk_tasks_parent";
|
|
2096
|
+
columns: ["parent_task_id"];
|
|
2097
|
+
isOneToOne: false;
|
|
2098
|
+
referencedRelation: "prj_tasks";
|
|
2099
|
+
referencedColumns: ["id"];
|
|
2100
|
+
},
|
|
2101
|
+
{
|
|
2102
|
+
foreignKeyName: "fk_tasks_project";
|
|
2103
|
+
columns: ["project_id"];
|
|
2104
|
+
isOneToOne: false;
|
|
2105
|
+
referencedRelation: "prj_projects";
|
|
2106
|
+
referencedColumns: ["id"];
|
|
2107
|
+
},
|
|
2044
2108
|
{
|
|
2045
2109
|
foreignKeyName: "prj_tasks_milestone_id_fkey";
|
|
2046
2110
|
columns: ["milestone_id"];
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { AccountSettings, AppearanceSettings, CreateWebhookEndpointModal, EditCredentialModal, EditWebhookEndpointModal, MemberConfigModal, OAuthIntegrationsCard, OrgMembersList, OrganizationSettings, WebhookEndpointList, WebhookEndpointSettings, settingsManifest } from '../../chunk-
|
|
1
|
+
export { AccountSettings, AppearanceSettings, CreateWebhookEndpointModal, EditCredentialModal, EditWebhookEndpointModal, MemberConfigModal, OAuthIntegrationsCard, OrgMembersList, OrganizationSettings, WebhookEndpointList, WebhookEndpointSettings, settingsManifest } from '../../chunk-X75JEGHS.js';
|
|
2
2
|
import '../../chunk-PDHTXPSF.js';
|
|
3
3
|
import '../../chunk-GBMNCNHX.js';
|
|
4
4
|
import '../../chunk-M25JL54Z.js';
|
|
5
5
|
import '../../chunk-6RWMRQN5.js';
|
|
6
6
|
import '../../chunk-7M2VOCYN.js';
|
|
7
|
-
import '../../chunk-
|
|
7
|
+
import '../../chunk-U2RXVZGY.js';
|
|
8
8
|
import '../../chunk-LXHZYSMQ.js';
|
|
9
9
|
import '../../chunk-BRXELOHC.js';
|
|
10
10
|
import '../../chunk-22UVE3RA.js';
|
|
@@ -26,8 +26,8 @@ import '../../chunk-ELJIFLCB.js';
|
|
|
26
26
|
import '../../chunk-L4XXM55J.js';
|
|
27
27
|
import '../../chunk-FL67C3WY.js';
|
|
28
28
|
import '../../chunk-QJ2KCHKX.js';
|
|
29
|
-
import '../../chunk-DT3QYZVU.js';
|
|
30
29
|
import '../../chunk-SLVC5OJ2.js';
|
|
30
|
+
import '../../chunk-DT3QYZVU.js';
|
|
31
31
|
import '../../chunk-RNP5R5I3.js';
|
|
32
32
|
import '../../chunk-IOKL7BKE.js';
|
|
33
33
|
import '../../chunk-MTJ43R2E.js';
|