@parallelworks/tandem-web 0.189.2 → 0.189.3
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/_virtual/_virtual_i18n/en/common.js +1 -32
- package/_virtual/_virtual_i18n/es/common.js +1 -32
- package/_virtual/_virtual_i18n/ja/common.js +1 -32
- package/_virtual/_virtual_i18n/ko/common.js +1 -32
- package/_virtual/_virtual_i18n/zh/common.js +1 -32
- package/components/NewIssueDialog.js +205 -205
- package/package.json +1 -1
- package/routeTree.gen.js +238 -244
- package/routes/_workspace/teams/_key/settings2.js +168 -262
- package/routes/request._token.js +0 -3
- package/routes/request2._token.js +0 -132
|
@@ -12,24 +12,23 @@ import { PersonHoverCard as _ } from "../../../../components/PersonHoverCard.js"
|
|
|
12
12
|
import { StatusRules as v } from "../../../../components/StatusRules.js";
|
|
13
13
|
import { TeamRepositories as y } from "../../../../components/TeamRepositories.js";
|
|
14
14
|
import { TeamWorkflow as b } from "../../../../components/TeamWorkflow.js";
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import { usePageTitle as w } from "../../../../lib/pageTitle.js";
|
|
15
|
+
import { useConfirm as x } from "../../../../lib/confirm.js";
|
|
16
|
+
import { copyItem as S } from "../../../../lib/menus.js";
|
|
17
|
+
import { usePageTitle as C } from "../../../../lib/pageTitle.js";
|
|
19
18
|
import { usePeople as ee } from "../../../../lib/people.js";
|
|
20
|
-
import { usePermissions as
|
|
21
|
-
import { useNavigate as
|
|
22
|
-
import { withSubTeams as
|
|
23
|
-
import { Route as
|
|
24
|
-
import { Avatar as
|
|
25
|
-
import { useState as
|
|
26
|
-
import { useErrorMessage as
|
|
27
|
-
import { useTranslations as
|
|
28
|
-
import { Fragment as
|
|
29
|
-
import { useMutation as
|
|
19
|
+
import { usePermissions as w } from "../../../../lib/roles.js";
|
|
20
|
+
import { useNavigate as T } from "../../../../lib/router.js";
|
|
21
|
+
import { withSubTeams as E } from "../../../../lib/teamTree.js";
|
|
22
|
+
import { Route as D } from "./settings.js";
|
|
23
|
+
import { Avatar as O, Button as k, Card as A, Combobox as j, ConfirmModal as M, ErrorText as N, Input as P, PageHeader as F, Section as I, Select as L, SettingRow as R, SettingsCard as z, Switch as B, menuDivider as V, useOpenMenu as te } from "@parallelworks/ui";
|
|
24
|
+
import { useState as H } from "react";
|
|
25
|
+
import { useErrorMessage as U } from "@parallelworks/problem/react";
|
|
26
|
+
import { useTranslations as W } from "use-intl";
|
|
27
|
+
import { Fragment as G, jsx as K, jsxs as q } from "react/jsx-runtime";
|
|
28
|
+
import { useMutation as J, useQuery as Y, useQueryClient as X, useSuspenseQuery as Z } from "@tanstack/react-query";
|
|
30
29
|
// src/routes/$workspace/teams/$key/settings.tsx?tsr-split=component
|
|
31
|
-
function
|
|
32
|
-
let { workspace: n, key: r } =
|
|
30
|
+
function ne() {
|
|
31
|
+
let { workspace: n, key: r } = D.useParams(), { data: i } = Z(s(n)), a = w(n, { team: r }), o = a.has("manage_teams"), c = W("settingsNav"), m = X(), h = J({
|
|
33
32
|
mutationFn: async (i) => t(await e.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
|
|
34
33
|
params: { path: {
|
|
35
34
|
workspace: n,
|
|
@@ -39,9 +38,9 @@ function re() {
|
|
|
39
38
|
})),
|
|
40
39
|
onSettled: () => m.invalidateQueries({ queryKey: s(n).queryKey })
|
|
41
40
|
}), g = i.find((e) => e.key === r);
|
|
42
|
-
return
|
|
41
|
+
return C(g?.name), g ? /* @__PURE__ */ q("div", {
|
|
43
42
|
className: "flex h-full min-h-0 flex-col",
|
|
44
|
-
children: [/* @__PURE__ */
|
|
43
|
+
children: [/* @__PURE__ */ K(F, {
|
|
45
44
|
heading: !1,
|
|
46
45
|
breadcrumbs: [
|
|
47
46
|
{
|
|
@@ -54,15 +53,15 @@ function re() {
|
|
|
54
53
|
},
|
|
55
54
|
{ label: g.name }
|
|
56
55
|
]
|
|
57
|
-
}), /* @__PURE__ */
|
|
56
|
+
}), /* @__PURE__ */ K("div", {
|
|
58
57
|
className: "min-h-0 flex-1 overflow-y-auto",
|
|
59
|
-
children: /* @__PURE__ */
|
|
58
|
+
children: /* @__PURE__ */ q("div", {
|
|
60
59
|
className: "w-full space-y-12 px-4 py-6 md:px-8 md:py-8",
|
|
61
60
|
children: [
|
|
62
|
-
/* @__PURE__ */
|
|
61
|
+
/* @__PURE__ */ q("div", {
|
|
63
62
|
className: "flex items-center gap-3",
|
|
64
63
|
children: [
|
|
65
|
-
/* @__PURE__ */
|
|
64
|
+
/* @__PURE__ */ K(f, {
|
|
66
65
|
workspace: n,
|
|
67
66
|
icon: g.icon,
|
|
68
67
|
name: g.name,
|
|
@@ -73,46 +72,46 @@ function re() {
|
|
|
73
72
|
disabled: !o,
|
|
74
73
|
size: 40
|
|
75
74
|
}),
|
|
76
|
-
/* @__PURE__ */
|
|
75
|
+
/* @__PURE__ */ q("h1", {
|
|
77
76
|
className: "text-xl font-semibold tracking-tight",
|
|
78
77
|
children: [
|
|
79
78
|
g.name,
|
|
80
79
|
" ",
|
|
81
|
-
/* @__PURE__ */
|
|
80
|
+
/* @__PURE__ */ K("span", {
|
|
82
81
|
className: "font-normal text-muted-foreground",
|
|
83
82
|
children: g.key
|
|
84
83
|
})
|
|
85
84
|
]
|
|
86
85
|
}),
|
|
87
|
-
/* @__PURE__ */
|
|
86
|
+
/* @__PURE__ */ K(d, {
|
|
88
87
|
workspace: n,
|
|
89
88
|
kind: "team",
|
|
90
89
|
target: g.id
|
|
91
90
|
})
|
|
92
91
|
]
|
|
93
92
|
}),
|
|
94
|
-
/* @__PURE__ */
|
|
93
|
+
/* @__PURE__ */ K(ae, {
|
|
95
94
|
workspace: n,
|
|
96
95
|
team: g,
|
|
97
96
|
teams: i,
|
|
98
97
|
isAdmin: o
|
|
99
98
|
}),
|
|
100
|
-
g.sidebarHidden && /* @__PURE__ */
|
|
99
|
+
g.sidebarHidden && /* @__PURE__ */ K(ie, {
|
|
101
100
|
workspace: n,
|
|
102
101
|
team: g,
|
|
103
102
|
isAdmin: o
|
|
104
103
|
}),
|
|
105
|
-
/* @__PURE__ */
|
|
104
|
+
/* @__PURE__ */ K(ue, {
|
|
106
105
|
workspace: n,
|
|
107
106
|
teamKey: r,
|
|
108
107
|
isAdmin: a.has("manage_members")
|
|
109
108
|
}),
|
|
110
|
-
/* @__PURE__ */
|
|
109
|
+
/* @__PURE__ */ K(b, {
|
|
111
110
|
workspace: n,
|
|
112
111
|
teamKey: r,
|
|
113
112
|
isAdmin: a.has("manage_labels")
|
|
114
113
|
}),
|
|
115
|
-
a.has("manage_labels") && /* @__PURE__ */
|
|
114
|
+
a.has("manage_labels") && /* @__PURE__ */ K(u, {
|
|
116
115
|
workspace: n,
|
|
117
116
|
target: "issue",
|
|
118
117
|
team: {
|
|
@@ -120,56 +119,51 @@ function re() {
|
|
|
120
119
|
id: g.id
|
|
121
120
|
}
|
|
122
121
|
}),
|
|
123
|
-
/* @__PURE__ */
|
|
124
|
-
workspace: n,
|
|
125
|
-
team: g,
|
|
126
|
-
isAdmin: o
|
|
127
|
-
}),
|
|
128
|
-
/* @__PURE__ */ q(se, {
|
|
122
|
+
/* @__PURE__ */ K(v, {
|
|
129
123
|
workspace: n,
|
|
130
124
|
team: g,
|
|
131
125
|
isAdmin: o
|
|
132
126
|
}),
|
|
133
|
-
/* @__PURE__ */
|
|
127
|
+
/* @__PURE__ */ K(se, {
|
|
134
128
|
workspace: n,
|
|
135
129
|
team: g,
|
|
136
130
|
isAdmin: o
|
|
137
131
|
}),
|
|
138
|
-
/* @__PURE__ */
|
|
132
|
+
/* @__PURE__ */ K(oe, {
|
|
139
133
|
workspace: n,
|
|
140
134
|
team: g,
|
|
141
135
|
isAdmin: o
|
|
142
136
|
}),
|
|
143
|
-
/* @__PURE__ */
|
|
137
|
+
/* @__PURE__ */ K(l, {
|
|
144
138
|
workspace: n,
|
|
145
139
|
teamKey: r,
|
|
146
140
|
isAdmin: o
|
|
147
141
|
}),
|
|
148
|
-
/* @__PURE__ */
|
|
142
|
+
/* @__PURE__ */ K(p, {
|
|
149
143
|
workspace: n,
|
|
150
144
|
teamKey: r,
|
|
151
145
|
isAdmin: a.has("manage_templates")
|
|
152
146
|
}),
|
|
153
|
-
/* @__PURE__ */
|
|
147
|
+
/* @__PURE__ */ K(ce, {
|
|
154
148
|
workspace: n,
|
|
155
149
|
team: g,
|
|
156
150
|
isAdmin: o
|
|
157
151
|
}),
|
|
158
|
-
/* @__PURE__ */
|
|
152
|
+
/* @__PURE__ */ K($, {
|
|
159
153
|
workspace: n,
|
|
160
154
|
team: g,
|
|
161
155
|
isAdmin: o
|
|
162
156
|
}),
|
|
163
|
-
/* @__PURE__ */
|
|
157
|
+
/* @__PURE__ */ K(y, {
|
|
164
158
|
workspace: n,
|
|
165
159
|
team: g,
|
|
166
160
|
isAdmin: o
|
|
167
161
|
}),
|
|
168
|
-
/* @__PURE__ */
|
|
162
|
+
/* @__PURE__ */ K(de, {
|
|
169
163
|
workspace: n,
|
|
170
164
|
teamKey: r
|
|
171
165
|
}),
|
|
172
|
-
o && /* @__PURE__ */
|
|
166
|
+
o && /* @__PURE__ */ K(fe, {
|
|
173
167
|
workspace: n,
|
|
174
168
|
team: g
|
|
175
169
|
})
|
|
@@ -178,15 +172,15 @@ function re() {
|
|
|
178
172
|
})]
|
|
179
173
|
}) : null;
|
|
180
174
|
}
|
|
181
|
-
var
|
|
175
|
+
var re = [
|
|
182
176
|
"issues",
|
|
183
177
|
"projects",
|
|
184
178
|
"areas",
|
|
185
179
|
"decisions",
|
|
186
180
|
"docs"
|
|
187
181
|
];
|
|
188
|
-
function
|
|
189
|
-
let a =
|
|
182
|
+
function ie({ workspace: n, team: r, isAdmin: i }) {
|
|
183
|
+
let a = W("teamSidebar"), o = W("workspace"), c = U(), l = X(), u = J({
|
|
190
184
|
mutationFn: async (i) => t(await e.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
|
|
191
185
|
params: { path: {
|
|
192
186
|
workspace: n,
|
|
@@ -195,7 +189,7 @@ function ae({ workspace: n, team: r, isAdmin: i }) {
|
|
|
195
189
|
body: { sidebarHidden: i }
|
|
196
190
|
})),
|
|
197
191
|
onSettled: () => l.invalidateQueries({ queryKey: s(n).queryKey })
|
|
198
|
-
}), d = u.isPending && u.variables ? u.variables : r.sidebarHidden ?? [], f =
|
|
192
|
+
}), d = u.isPending && u.variables ? u.variables : r.sidebarHidden ?? [], f = re.filter((e) => !d.includes(e)), p = [
|
|
199
193
|
{
|
|
200
194
|
page: "triage",
|
|
201
195
|
help: a("triageHelp"),
|
|
@@ -227,26 +221,26 @@ function ae({ workspace: n, team: r, isAdmin: i }) {
|
|
|
227
221
|
available: r.cyclesEnabled
|
|
228
222
|
}
|
|
229
223
|
];
|
|
230
|
-
return /* @__PURE__ */
|
|
224
|
+
return /* @__PURE__ */ q(z, {
|
|
231
225
|
title: a("title"),
|
|
232
226
|
description: a("description"),
|
|
233
227
|
children: [p.filter((e) => e.available).map(({ page: e, help: t }) => {
|
|
234
228
|
let n = !d.includes(e), r = n && f.length === 1 && f[0] === e;
|
|
235
|
-
return /* @__PURE__ */
|
|
229
|
+
return /* @__PURE__ */ K(R, {
|
|
236
230
|
label: o(e),
|
|
237
231
|
helpText: r ? a("keepOne") : t,
|
|
238
|
-
children: /* @__PURE__ */
|
|
232
|
+
children: /* @__PURE__ */ K(B, {
|
|
239
233
|
"aria-label": o(e),
|
|
240
234
|
checked: n,
|
|
241
235
|
disabled: !i || r || u.isPending,
|
|
242
236
|
onCheckedChange: (t) => u.mutate(t ? d.filter((t) => t !== e) : [...d, e])
|
|
243
237
|
})
|
|
244
238
|
}, e);
|
|
245
|
-
}), u.isError && /* @__PURE__ */
|
|
239
|
+
}), u.isError && /* @__PURE__ */ K(N, { children: c(u.error) })]
|
|
246
240
|
});
|
|
247
241
|
}
|
|
248
|
-
function
|
|
249
|
-
let o =
|
|
242
|
+
function ae({ workspace: n, team: r, teams: i, isAdmin: a }) {
|
|
243
|
+
let o = W("teamParent"), c = U(), l = X(), u = J({
|
|
250
244
|
mutationFn: async (i) => t(await e.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
|
|
251
245
|
params: { path: {
|
|
252
246
|
workspace: n,
|
|
@@ -255,16 +249,16 @@ function oe({ workspace: n, team: r, teams: i, isAdmin: a }) {
|
|
|
255
249
|
body: { parent: i }
|
|
256
250
|
})),
|
|
257
251
|
onSettled: () => l.invalidateQueries({ queryKey: s(n).queryKey })
|
|
258
|
-
}), d =
|
|
259
|
-
return /* @__PURE__ */
|
|
252
|
+
}), d = E(i, r.id), f = i.find((e) => e.id === r.parentId), p = i.filter((e) => e.parentId === r.id && !e.archivedAt);
|
|
253
|
+
return /* @__PURE__ */ q(z, {
|
|
260
254
|
title: o("title"),
|
|
261
255
|
description: o("description"),
|
|
262
256
|
children: [
|
|
263
|
-
/* @__PURE__ */
|
|
257
|
+
/* @__PURE__ */ K(R, {
|
|
264
258
|
label: o("parent"),
|
|
265
|
-
children: /* @__PURE__ */
|
|
259
|
+
children: /* @__PURE__ */ K("div", {
|
|
266
260
|
className: "w-56",
|
|
267
|
-
children: /* @__PURE__ */
|
|
261
|
+
children: /* @__PURE__ */ K(L, {
|
|
268
262
|
width: "fill",
|
|
269
263
|
"aria-label": o("parent"),
|
|
270
264
|
value: f?.key ?? "",
|
|
@@ -280,107 +274,19 @@ function oe({ workspace: n, team: r, teams: i, isAdmin: a }) {
|
|
|
280
274
|
})
|
|
281
275
|
})
|
|
282
276
|
}),
|
|
283
|
-
p.length > 0 && /* @__PURE__ */
|
|
277
|
+
p.length > 0 && /* @__PURE__ */ K(R, {
|
|
284
278
|
label: o("subTeams"),
|
|
285
|
-
children: /* @__PURE__ */
|
|
279
|
+
children: /* @__PURE__ */ K("span", {
|
|
286
280
|
className: "text-sm",
|
|
287
281
|
children: p.map((e) => e.name).join(", ")
|
|
288
282
|
})
|
|
289
283
|
}),
|
|
290
|
-
u.error && /* @__PURE__ */
|
|
291
|
-
]
|
|
292
|
-
});
|
|
293
|
-
}
|
|
294
|
-
function se({ workspace: n, team: r, isAdmin: a }) {
|
|
295
|
-
let o = G("teamIntake"), c = W(), l = Z(), { data: u } = X(i), d = () => l.invalidateQueries({ queryKey: s(n).queryKey }), f = { params: { path: {
|
|
296
|
-
workspace: n,
|
|
297
|
-
key: r.key
|
|
298
|
-
} } }, p = Y({
|
|
299
|
-
mutationFn: async (n) => t(await e.PUT("/api/v1/workspaces/{workspace}/teams/{key}/intake", {
|
|
300
|
-
...f,
|
|
301
|
-
body: n
|
|
302
|
-
})),
|
|
303
|
-
onSettled: d
|
|
304
|
-
}), m = Y({
|
|
305
|
-
mutationFn: async () => t(await e.POST("/api/v1/workspaces/{workspace}/teams/{key}/intake/rotate", f)),
|
|
306
|
-
onSettled: d
|
|
307
|
-
}), { token: h, form: g, email: _ } = r.intake, v = h ? x(`/request/${h}`) : "", y = h && u?.intakeDomain ? `${h}@${u.intakeDomain}` : "", b = !a || p.isPending, S = p.error ?? m.error;
|
|
308
|
-
return /* @__PURE__ */ J(z, {
|
|
309
|
-
title: o("title"),
|
|
310
|
-
description: o("description"),
|
|
311
|
-
children: [
|
|
312
|
-
/* @__PURE__ */ q(R, {
|
|
313
|
-
label: o("form"),
|
|
314
|
-
helpText: r.triageEnabled ? o("formHelp") : o("needsTriage"),
|
|
315
|
-
children: /* @__PURE__ */ q(B, {
|
|
316
|
-
"aria-label": o("form"),
|
|
317
|
-
checked: g,
|
|
318
|
-
disabled: b || !r.triageEnabled && !g,
|
|
319
|
-
onCheckedChange: (e) => p.mutate({
|
|
320
|
-
form: e,
|
|
321
|
-
email: _
|
|
322
|
-
})
|
|
323
|
-
})
|
|
324
|
-
}),
|
|
325
|
-
g && v && /* @__PURE__ */ q(R, {
|
|
326
|
-
label: o("link"),
|
|
327
|
-
children: /* @__PURE__ */ J("div", {
|
|
328
|
-
className: "flex min-w-0 items-center gap-2",
|
|
329
|
-
children: [/* @__PURE__ */ q("code", {
|
|
330
|
-
className: "min-w-0 truncate text-xs",
|
|
331
|
-
children: v
|
|
332
|
-
}), /* @__PURE__ */ q(N, {
|
|
333
|
-
text: v,
|
|
334
|
-
label: o("formLink"),
|
|
335
|
-
size: "sm",
|
|
336
|
-
variant: "ghost"
|
|
337
|
-
})]
|
|
338
|
-
})
|
|
339
|
-
}),
|
|
340
|
-
/* @__PURE__ */ q(R, {
|
|
341
|
-
label: o("email"),
|
|
342
|
-
helpText: u?.intakeDomain ? o("emailHelp") : o("noDomain"),
|
|
343
|
-
children: /* @__PURE__ */ q(B, {
|
|
344
|
-
"aria-label": o("email"),
|
|
345
|
-
checked: _,
|
|
346
|
-
disabled: b || !u?.intakeDomain || !r.triageEnabled && !_,
|
|
347
|
-
onCheckedChange: (e) => p.mutate({
|
|
348
|
-
form: g,
|
|
349
|
-
email: e
|
|
350
|
-
})
|
|
351
|
-
})
|
|
352
|
-
}),
|
|
353
|
-
_ && y && /* @__PURE__ */ q(R, {
|
|
354
|
-
label: o("address"),
|
|
355
|
-
children: /* @__PURE__ */ J("div", {
|
|
356
|
-
className: "flex min-w-0 items-center gap-2",
|
|
357
|
-
children: [/* @__PURE__ */ q("code", {
|
|
358
|
-
className: "min-w-0 truncate text-xs",
|
|
359
|
-
children: y
|
|
360
|
-
}), /* @__PURE__ */ q(N, {
|
|
361
|
-
text: y,
|
|
362
|
-
label: o("emailAddress"),
|
|
363
|
-
size: "sm",
|
|
364
|
-
variant: "ghost"
|
|
365
|
-
})]
|
|
366
|
-
})
|
|
367
|
-
}),
|
|
368
|
-
h && a && /* @__PURE__ */ q(R, {
|
|
369
|
-
label: o("rotate"),
|
|
370
|
-
helpText: o("rotateHelp"),
|
|
371
|
-
children: /* @__PURE__ */ q(A, {
|
|
372
|
-
size: "sm",
|
|
373
|
-
loading: m.isPending,
|
|
374
|
-
onClick: () => m.mutate(),
|
|
375
|
-
children: o("rotateButton")
|
|
376
|
-
})
|
|
377
|
-
}),
|
|
378
|
-
S && /* @__PURE__ */ q(P, { children: c(S) })
|
|
284
|
+
u.error && /* @__PURE__ */ K(N, { children: c(u.error) })
|
|
379
285
|
]
|
|
380
286
|
});
|
|
381
287
|
}
|
|
382
|
-
function
|
|
383
|
-
let a =
|
|
288
|
+
function oe({ workspace: n, team: r, isAdmin: i }) {
|
|
289
|
+
let a = W("planning.sla"), o = W("priority"), c = U(), l = X(), u = J({
|
|
384
290
|
mutationFn: async (i) => t(await e.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
|
|
385
291
|
params: { path: {
|
|
386
292
|
workspace: n,
|
|
@@ -399,7 +305,7 @@ function ce({ workspace: n, team: r, isAdmin: i }) {
|
|
|
399
305
|
168,
|
|
400
306
|
336
|
|
401
307
|
], f = (e) => e === 0 ? a("none") : e < 24 ? a("hours", { count: e }) : e % 168 == 0 ? a("weeks", { count: e / 168 }) : a("days", { count: e / 24 });
|
|
402
|
-
return /* @__PURE__ */
|
|
308
|
+
return /* @__PURE__ */ q(z, {
|
|
403
309
|
title: a("title"),
|
|
404
310
|
description: a("description"),
|
|
405
311
|
children: [[
|
|
@@ -407,11 +313,11 @@ function ce({ workspace: n, team: r, isAdmin: i }) {
|
|
|
407
313
|
"high",
|
|
408
314
|
"medium",
|
|
409
315
|
"low"
|
|
410
|
-
].map((e) => /* @__PURE__ */
|
|
316
|
+
].map((e) => /* @__PURE__ */ K(R, {
|
|
411
317
|
label: o(e),
|
|
412
|
-
children: /* @__PURE__ */
|
|
318
|
+
children: /* @__PURE__ */ K("div", {
|
|
413
319
|
className: "w-40",
|
|
414
|
-
children: /* @__PURE__ */
|
|
320
|
+
children: /* @__PURE__ */ K(L, {
|
|
415
321
|
width: "fill",
|
|
416
322
|
"aria-label": a("target", { priority: o(e) }),
|
|
417
323
|
value: String(r.slaHours[e]),
|
|
@@ -426,11 +332,11 @@ function ce({ workspace: n, team: r, isAdmin: i }) {
|
|
|
426
332
|
}))
|
|
427
333
|
})
|
|
428
334
|
})
|
|
429
|
-
}, e)), u.isError && /* @__PURE__ */
|
|
335
|
+
}, e)), u.isError && /* @__PURE__ */ K(N, { children: c(u.error) })]
|
|
430
336
|
});
|
|
431
337
|
}
|
|
432
|
-
function
|
|
433
|
-
let a =
|
|
338
|
+
function se({ workspace: n, team: r, isAdmin: i }) {
|
|
339
|
+
let a = W("planning.settings"), o = U(), c = X(), l = J({
|
|
434
340
|
mutationFn: async (i) => t(await e.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
|
|
435
341
|
params: { path: {
|
|
436
342
|
workspace: n,
|
|
@@ -447,39 +353,39 @@ function le({ workspace: n, team: r, isAdmin: i }) {
|
|
|
447
353
|
] });
|
|
448
354
|
}
|
|
449
355
|
}), u = !i || l.isPending, d = (e) => l.isError && l.variables && e in l.variables ? o(l.error) : null;
|
|
450
|
-
return /* @__PURE__ */
|
|
356
|
+
return /* @__PURE__ */ q(z, {
|
|
451
357
|
title: a("title"),
|
|
452
358
|
description: a("description"),
|
|
453
359
|
children: [
|
|
454
|
-
/* @__PURE__ */
|
|
360
|
+
/* @__PURE__ */ K(R, {
|
|
455
361
|
label: a("triage"),
|
|
456
362
|
helpText: a("triageHelp"),
|
|
457
363
|
error: d("triageEnabled"),
|
|
458
|
-
children: /* @__PURE__ */
|
|
364
|
+
children: /* @__PURE__ */ K(B, {
|
|
459
365
|
"aria-label": a("triage"),
|
|
460
366
|
checked: r.triageEnabled,
|
|
461
367
|
disabled: u,
|
|
462
368
|
onCheckedChange: (e) => l.mutate({ triageEnabled: e })
|
|
463
369
|
})
|
|
464
370
|
}),
|
|
465
|
-
/* @__PURE__ */
|
|
371
|
+
/* @__PURE__ */ K(R, {
|
|
466
372
|
label: a("customerRequests"),
|
|
467
373
|
helpText: a("customerRequestsHelp"),
|
|
468
374
|
error: d("customerRequestsEnabled"),
|
|
469
|
-
children: /* @__PURE__ */
|
|
375
|
+
children: /* @__PURE__ */ K(B, {
|
|
470
376
|
"aria-label": a("customerRequests"),
|
|
471
377
|
checked: r.customerRequestsEnabled,
|
|
472
378
|
disabled: u,
|
|
473
379
|
onCheckedChange: (e) => l.mutate({ customerRequestsEnabled: e })
|
|
474
380
|
})
|
|
475
381
|
}),
|
|
476
|
-
/* @__PURE__ */
|
|
382
|
+
/* @__PURE__ */ K(R, {
|
|
477
383
|
label: a("autoClose"),
|
|
478
384
|
helpText: a("autoCloseHelp"),
|
|
479
385
|
error: d("autoCloseDays"),
|
|
480
|
-
children: /* @__PURE__ */
|
|
386
|
+
children: /* @__PURE__ */ K("div", {
|
|
481
387
|
className: "w-40",
|
|
482
|
-
children: /* @__PURE__ */
|
|
388
|
+
children: /* @__PURE__ */ K(L, {
|
|
483
389
|
width: "fill",
|
|
484
390
|
"aria-label": a("autoClose"),
|
|
485
391
|
value: String(r.autoCloseDays),
|
|
@@ -499,13 +405,13 @@ function le({ workspace: n, team: r, isAdmin: i }) {
|
|
|
499
405
|
})
|
|
500
406
|
})
|
|
501
407
|
}),
|
|
502
|
-
/* @__PURE__ */
|
|
408
|
+
/* @__PURE__ */ K(R, {
|
|
503
409
|
label: a("autoArchive"),
|
|
504
410
|
helpText: a("autoArchiveHelp"),
|
|
505
411
|
error: d("autoArchiveDays"),
|
|
506
|
-
children: /* @__PURE__ */
|
|
412
|
+
children: /* @__PURE__ */ K("div", {
|
|
507
413
|
className: "w-40",
|
|
508
|
-
children: /* @__PURE__ */
|
|
414
|
+
children: /* @__PURE__ */ K(L, {
|
|
509
415
|
width: "fill",
|
|
510
416
|
"aria-label": a("autoArchive"),
|
|
511
417
|
value: String(r.autoArchiveDays),
|
|
@@ -525,24 +431,24 @@ function le({ workspace: n, team: r, isAdmin: i }) {
|
|
|
525
431
|
})
|
|
526
432
|
})
|
|
527
433
|
}),
|
|
528
|
-
/* @__PURE__ */
|
|
434
|
+
/* @__PURE__ */ K(R, {
|
|
529
435
|
label: a("cycles"),
|
|
530
436
|
helpText: a("cyclesHelp"),
|
|
531
437
|
error: d("cyclesEnabled"),
|
|
532
|
-
children: /* @__PURE__ */
|
|
438
|
+
children: /* @__PURE__ */ K(B, {
|
|
533
439
|
"aria-label": a("cycles"),
|
|
534
440
|
checked: r.cyclesEnabled,
|
|
535
441
|
disabled: u,
|
|
536
442
|
onCheckedChange: (e) => l.mutate({ cyclesEnabled: e })
|
|
537
443
|
})
|
|
538
444
|
}),
|
|
539
|
-
/* @__PURE__ */
|
|
445
|
+
/* @__PURE__ */ K(R, {
|
|
540
446
|
label: a("cycleLength"),
|
|
541
447
|
helpText: a("cycleLengthHelp"),
|
|
542
448
|
error: d("cycleWeeks"),
|
|
543
|
-
children: /* @__PURE__ */
|
|
449
|
+
children: /* @__PURE__ */ K("div", {
|
|
544
450
|
className: "w-36",
|
|
545
|
-
children: /* @__PURE__ */
|
|
451
|
+
children: /* @__PURE__ */ K(L, {
|
|
546
452
|
width: "fill",
|
|
547
453
|
"aria-label": a("cycleLength"),
|
|
548
454
|
value: r.cycleWeeks,
|
|
@@ -559,13 +465,13 @@ function le({ workspace: n, team: r, isAdmin: i }) {
|
|
|
559
465
|
})
|
|
560
466
|
})
|
|
561
467
|
}),
|
|
562
|
-
/* @__PURE__ */
|
|
468
|
+
/* @__PURE__ */ K(R, {
|
|
563
469
|
label: a("upcomingCycles"),
|
|
564
470
|
helpText: a("upcomingCyclesHelp"),
|
|
565
471
|
error: d("cycleUpcoming"),
|
|
566
|
-
children: /* @__PURE__ */
|
|
472
|
+
children: /* @__PURE__ */ K("div", {
|
|
567
473
|
className: "w-36",
|
|
568
|
-
children: /* @__PURE__ */
|
|
474
|
+
children: /* @__PURE__ */ K(L, {
|
|
569
475
|
width: "fill",
|
|
570
476
|
"aria-label": a("upcomingCycles"),
|
|
571
477
|
value: r.cycleUpcoming,
|
|
@@ -587,24 +493,24 @@ function le({ workspace: n, team: r, isAdmin: i }) {
|
|
|
587
493
|
})
|
|
588
494
|
})
|
|
589
495
|
}),
|
|
590
|
-
/* @__PURE__ */
|
|
496
|
+
/* @__PURE__ */ K(R, {
|
|
591
497
|
label: a("autoAdd"),
|
|
592
498
|
helpText: a("autoAddHelp"),
|
|
593
499
|
error: d("cycleAutoAdd"),
|
|
594
|
-
children: /* @__PURE__ */
|
|
500
|
+
children: /* @__PURE__ */ K(B, {
|
|
595
501
|
"aria-label": a("autoAdd"),
|
|
596
502
|
checked: r.cycleAutoAdd,
|
|
597
503
|
disabled: u,
|
|
598
504
|
onCheckedChange: (e) => l.mutate({ cycleAutoAdd: e })
|
|
599
505
|
})
|
|
600
506
|
}),
|
|
601
|
-
/* @__PURE__ */
|
|
507
|
+
/* @__PURE__ */ K(R, {
|
|
602
508
|
label: a("estimates"),
|
|
603
509
|
helpText: a("estimatesHelp"),
|
|
604
510
|
error: d("estimateScale"),
|
|
605
|
-
children: /* @__PURE__ */
|
|
511
|
+
children: /* @__PURE__ */ K("div", {
|
|
606
512
|
className: "w-44",
|
|
607
|
-
children: /* @__PURE__ */
|
|
513
|
+
children: /* @__PURE__ */ K(L, {
|
|
608
514
|
width: "fill",
|
|
609
515
|
"aria-label": a("estimates"),
|
|
610
516
|
value: r.estimateScale,
|
|
@@ -626,7 +532,7 @@ function le({ workspace: n, team: r, isAdmin: i }) {
|
|
|
626
532
|
]
|
|
627
533
|
});
|
|
628
534
|
}
|
|
629
|
-
var
|
|
535
|
+
var Q = [
|
|
630
536
|
"plan",
|
|
631
537
|
"implement",
|
|
632
538
|
"review",
|
|
@@ -634,8 +540,8 @@ var $ = [
|
|
|
634
540
|
"merge",
|
|
635
541
|
"release"
|
|
636
542
|
];
|
|
637
|
-
function
|
|
638
|
-
let o =
|
|
543
|
+
function ce({ workspace: n, team: i, isAdmin: a }) {
|
|
544
|
+
let o = W("flow"), c = U(), l = X(), { data: u = [] } = Y(r(n)), d = J({
|
|
639
545
|
mutationFn: async (r) => t(await e.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
|
|
640
546
|
params: { path: {
|
|
641
547
|
workspace: n,
|
|
@@ -644,7 +550,7 @@ function ue({ workspace: n, team: i, isAdmin: a }) {
|
|
|
644
550
|
body: { flow: r }
|
|
645
551
|
})),
|
|
646
552
|
onSettled: () => l.invalidateQueries({ queryKey: s(n).queryKey })
|
|
647
|
-
}), f =
|
|
553
|
+
}), f = J({
|
|
648
554
|
mutationFn: async (r) => t(await e.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
|
|
649
555
|
params: { path: {
|
|
650
556
|
workspace: n,
|
|
@@ -653,7 +559,7 @@ function ue({ workspace: n, team: i, isAdmin: a }) {
|
|
|
653
559
|
body: { autoMerge: r }
|
|
654
560
|
})),
|
|
655
561
|
onSettled: () => l.invalidateQueries({ queryKey: s(n).queryKey })
|
|
656
|
-
}), p =
|
|
562
|
+
}), p = J({
|
|
657
563
|
mutationFn: async (r) => t(await e.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
|
|
658
564
|
params: { path: {
|
|
659
565
|
workspace: n,
|
|
@@ -662,7 +568,7 @@ function ue({ workspace: n, team: i, isAdmin: a }) {
|
|
|
662
568
|
body: { draftPullRequests: r }
|
|
663
569
|
})),
|
|
664
570
|
onSettled: () => l.invalidateQueries({ queryKey: s(n).queryKey })
|
|
665
|
-
}), m =
|
|
571
|
+
}), m = J({
|
|
666
572
|
mutationFn: async (r) => t(await e.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
|
|
667
573
|
params: { path: {
|
|
668
574
|
workspace: n,
|
|
@@ -671,8 +577,8 @@ function ue({ workspace: n, team: i, isAdmin: a }) {
|
|
|
671
577
|
body: { pullRequestsAsAssigner: r }
|
|
672
578
|
})),
|
|
673
579
|
onSettled: () => l.invalidateQueries({ queryKey: s(n).queryKey })
|
|
674
|
-
}), h = (e) => i.flow.find((t) => t.stage === e), [g, _] =
|
|
675
|
-
_(e), d.mutate(
|
|
580
|
+
}), h = (e) => i.flow.find((t) => t.stage === e), [g, _] = H(null), v = (e, t) => {
|
|
581
|
+
_(e), d.mutate(Q.flatMap((n) => {
|
|
676
582
|
let r = h(n);
|
|
677
583
|
return n === e ? t.on ? [{
|
|
678
584
|
stage: n,
|
|
@@ -680,21 +586,21 @@ function ue({ workspace: n, team: i, isAdmin: a }) {
|
|
|
680
586
|
}] : [] : r ? [r] : [];
|
|
681
587
|
}));
|
|
682
588
|
}, y = !a || d.isPending;
|
|
683
|
-
return /* @__PURE__ */
|
|
589
|
+
return /* @__PURE__ */ q(z, {
|
|
684
590
|
title: o("title"),
|
|
685
591
|
description: o("description"),
|
|
686
592
|
children: [
|
|
687
|
-
|
|
593
|
+
Q.map((e) => {
|
|
688
594
|
let t = h(e), n = u.filter((t) => !t.archivedAt && (e !== "review" || t.maxRole === "viewer"));
|
|
689
|
-
return /* @__PURE__ */
|
|
595
|
+
return /* @__PURE__ */ K(R, {
|
|
690
596
|
label: o(`stages.${e}`),
|
|
691
597
|
helpText: o(`help.${e}`),
|
|
692
598
|
error: d.isError && g === e ? c(d.error) : null,
|
|
693
|
-
children: /* @__PURE__ */
|
|
599
|
+
children: /* @__PURE__ */ q("div", {
|
|
694
600
|
className: "flex items-center gap-3",
|
|
695
|
-
children: [t && /* @__PURE__ */
|
|
601
|
+
children: [t && /* @__PURE__ */ K("div", {
|
|
696
602
|
className: "w-44",
|
|
697
|
-
children: /* @__PURE__ */
|
|
603
|
+
children: /* @__PURE__ */ K(L, {
|
|
698
604
|
width: "fill",
|
|
699
605
|
"aria-label": o("agentFor", { stage: o(`stages.${e}`) }),
|
|
700
606
|
value: t.agentId ?? "",
|
|
@@ -711,7 +617,7 @@ function ue({ workspace: n, team: i, isAdmin: a }) {
|
|
|
711
617
|
label: e.name
|
|
712
618
|
}))]
|
|
713
619
|
})
|
|
714
|
-
}), /* @__PURE__ */
|
|
620
|
+
}), /* @__PURE__ */ K(B, {
|
|
715
621
|
"aria-label": o(`stages.${e}`),
|
|
716
622
|
checked: !!t,
|
|
717
623
|
disabled: y,
|
|
@@ -720,42 +626,42 @@ function ue({ workspace: n, team: i, isAdmin: a }) {
|
|
|
720
626
|
})
|
|
721
627
|
}, e);
|
|
722
628
|
}),
|
|
723
|
-
h("release") && /* @__PURE__ */
|
|
629
|
+
h("release") && /* @__PURE__ */ K(R, {
|
|
724
630
|
label: o("releaseTargets"),
|
|
725
631
|
helpText: o("releaseTargetsHelp"),
|
|
726
|
-
children: /* @__PURE__ */
|
|
632
|
+
children: /* @__PURE__ */ K(le, {
|
|
727
633
|
workspace: n,
|
|
728
634
|
team: i,
|
|
729
635
|
disabled: !a
|
|
730
636
|
})
|
|
731
637
|
}),
|
|
732
|
-
/* @__PURE__ */
|
|
638
|
+
/* @__PURE__ */ K(R, {
|
|
733
639
|
label: o("autoMerge"),
|
|
734
640
|
helpText: o("autoMergeHelp"),
|
|
735
641
|
error: f.isError ? c(f.error) : null,
|
|
736
|
-
children: /* @__PURE__ */
|
|
642
|
+
children: /* @__PURE__ */ K(B, {
|
|
737
643
|
"aria-label": o("autoMerge"),
|
|
738
644
|
checked: i.autoMerge,
|
|
739
645
|
disabled: !a || f.isPending,
|
|
740
646
|
onCheckedChange: (e) => f.mutate(e)
|
|
741
647
|
})
|
|
742
648
|
}),
|
|
743
|
-
/* @__PURE__ */
|
|
649
|
+
/* @__PURE__ */ K(R, {
|
|
744
650
|
label: o("draftPullRequests"),
|
|
745
651
|
helpText: o("draftPullRequestsHelp"),
|
|
746
652
|
error: p.isError ? c(p.error) : null,
|
|
747
|
-
children: /* @__PURE__ */
|
|
653
|
+
children: /* @__PURE__ */ K(B, {
|
|
748
654
|
"aria-label": o("draftPullRequests"),
|
|
749
655
|
checked: i.draftPullRequests,
|
|
750
656
|
disabled: !a || p.isPending,
|
|
751
657
|
onCheckedChange: (e) => p.mutate(e)
|
|
752
658
|
})
|
|
753
659
|
}),
|
|
754
|
-
/* @__PURE__ */
|
|
660
|
+
/* @__PURE__ */ K(R, {
|
|
755
661
|
label: o("pullRequestsAsAssigner"),
|
|
756
662
|
helpText: o("pullRequestsAsAssignerHelp"),
|
|
757
663
|
error: m.isError ? c(m.error) : null,
|
|
758
|
-
children: /* @__PURE__ */
|
|
664
|
+
children: /* @__PURE__ */ K(B, {
|
|
759
665
|
"aria-label": o("pullRequestsAsAssigner"),
|
|
760
666
|
checked: i.pullRequestsAsAssigner,
|
|
761
667
|
disabled: !a || m.isPending,
|
|
@@ -765,8 +671,8 @@ function ue({ workspace: n, team: i, isAdmin: a }) {
|
|
|
765
671
|
]
|
|
766
672
|
});
|
|
767
673
|
}
|
|
768
|
-
function
|
|
769
|
-
let a =
|
|
674
|
+
function le({ workspace: n, team: r, disabled: i }) {
|
|
675
|
+
let a = W("flow"), o = U(), c = X(), [l, u] = H(r.releaseTargets.join(", ")), d = J({
|
|
770
676
|
mutationFn: async (i) => t(await e.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
|
|
771
677
|
params: { path: {
|
|
772
678
|
workspace: n,
|
|
@@ -779,9 +685,9 @@ function de({ workspace: n, team: r, disabled: i }) {
|
|
|
779
685
|
let e = l.split(",").map((e) => e.trim()).filter(Boolean);
|
|
780
686
|
e.join(",") !== r.releaseTargets.join(",") && d.mutate(e);
|
|
781
687
|
};
|
|
782
|
-
return /* @__PURE__ */
|
|
688
|
+
return /* @__PURE__ */ K("div", {
|
|
783
689
|
className: "w-64",
|
|
784
|
-
children: /* @__PURE__ */
|
|
690
|
+
children: /* @__PURE__ */ K(P, {
|
|
785
691
|
"aria-label": a("releaseTargets"),
|
|
786
692
|
value: l,
|
|
787
693
|
disabled: i,
|
|
@@ -793,8 +699,8 @@ function de({ workspace: n, team: r, disabled: i }) {
|
|
|
793
699
|
})
|
|
794
700
|
});
|
|
795
701
|
}
|
|
796
|
-
function
|
|
797
|
-
let a =
|
|
702
|
+
function $({ workspace: n, team: r, isAdmin: i }) {
|
|
703
|
+
let a = W("team"), o = U(), c = X(), l = J({
|
|
798
704
|
mutationFn: async (i) => t(await e.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
|
|
799
705
|
params: { path: {
|
|
800
706
|
workspace: n,
|
|
@@ -804,14 +710,14 @@ function fe({ workspace: n, team: r, isAdmin: i }) {
|
|
|
804
710
|
})),
|
|
805
711
|
onSettled: () => c.invalidateQueries({ queryKey: s(n).queryKey })
|
|
806
712
|
});
|
|
807
|
-
return /* @__PURE__ */
|
|
713
|
+
return /* @__PURE__ */ K(z, {
|
|
808
714
|
title: a("agentQuestions"),
|
|
809
715
|
description: a("agentQuestionsDescription"),
|
|
810
|
-
children: /* @__PURE__ */
|
|
716
|
+
children: /* @__PURE__ */ K(R, {
|
|
811
717
|
label: a("requireKnownTerms"),
|
|
812
718
|
helpText: a("requireKnownTermsHelp"),
|
|
813
719
|
error: l.isError ? o(l.error) : null,
|
|
814
|
-
children: /* @__PURE__ */
|
|
720
|
+
children: /* @__PURE__ */ K(B, {
|
|
815
721
|
"aria-label": a("requireKnownTerms"),
|
|
816
722
|
checked: r.requireKnownTerms,
|
|
817
723
|
disabled: !i || l.isPending,
|
|
@@ -820,8 +726,8 @@ function fe({ workspace: n, team: r, isAdmin: i }) {
|
|
|
820
726
|
})
|
|
821
727
|
});
|
|
822
728
|
}
|
|
823
|
-
function
|
|
824
|
-
let { data: s } =
|
|
729
|
+
function ue({ workspace: n, teamKey: r, isAdmin: a }) {
|
|
730
|
+
let { data: s } = Z(o(n, r)), { data: c } = Z(i), { members: l, person: u } = ee(n), d = X(), f = te(), p = T(), [h, g] = H(null), v = W("team"), y = U(), b = W("common"), x = J({
|
|
825
731
|
mutationFn: async (i) => {
|
|
826
732
|
for (let { username: a, add: o } of i) {
|
|
827
733
|
let i = { params: { path: {
|
|
@@ -835,20 +741,20 @@ function pe({ workspace: n, teamKey: r, isAdmin: a }) {
|
|
|
835
741
|
onMutate: () => g(null),
|
|
836
742
|
onError: (e) => g(y(e)),
|
|
837
743
|
onSettled: () => d.invalidateQueries({ queryKey: o(n, r).queryKey })
|
|
838
|
-
}),
|
|
744
|
+
}), C = (e) => x.mutate([...e.filter((e) => !s.includes(e)).map((e) => ({
|
|
839
745
|
username: e,
|
|
840
746
|
add: !0
|
|
841
747
|
})), ...s.filter((t) => !e.includes(t)).map((e) => ({
|
|
842
748
|
username: e,
|
|
843
749
|
add: !1
|
|
844
|
-
}))]), w = c?.user.username ?? "",
|
|
845
|
-
return /* @__PURE__ */
|
|
750
|
+
}))]), w = c?.user.username ?? "", E = s.includes(w);
|
|
751
|
+
return /* @__PURE__ */ q(I, {
|
|
846
752
|
variant: "bare",
|
|
847
753
|
headingLevel: 2,
|
|
848
754
|
collapsible: !1,
|
|
849
755
|
title: v("members"),
|
|
850
756
|
description: v("membersDescription"),
|
|
851
|
-
actions: /* @__PURE__ */
|
|
757
|
+
actions: /* @__PURE__ */ q(G, { children: [!E && /* @__PURE__ */ K(k, {
|
|
852
758
|
type: "button",
|
|
853
759
|
size: "sm",
|
|
854
760
|
variant: "primary",
|
|
@@ -857,13 +763,13 @@ function pe({ workspace: n, teamKey: r, isAdmin: a }) {
|
|
|
857
763
|
add: !0
|
|
858
764
|
}]),
|
|
859
765
|
children: v("join")
|
|
860
|
-
}), a && /* @__PURE__ */
|
|
766
|
+
}), a && /* @__PURE__ */ K(j, {
|
|
861
767
|
multiple: !0,
|
|
862
768
|
items: l.map((e) => ({
|
|
863
769
|
value: e.user.username,
|
|
864
770
|
label: e.user.name,
|
|
865
771
|
hint: e.user.email,
|
|
866
|
-
icon: /* @__PURE__ */
|
|
772
|
+
icon: /* @__PURE__ */ K(O, {
|
|
867
773
|
name: e.user.name,
|
|
868
774
|
src: e.user.avatarUrl,
|
|
869
775
|
size: "xs",
|
|
@@ -871,28 +777,28 @@ function pe({ workspace: n, teamKey: r, isAdmin: a }) {
|
|
|
871
777
|
})
|
|
872
778
|
})),
|
|
873
779
|
value: s,
|
|
874
|
-
onValueChange:
|
|
780
|
+
onValueChange: C,
|
|
875
781
|
align: "end",
|
|
876
782
|
placeholder: v("addPlaceholder"),
|
|
877
783
|
"aria-label": v("addMember"),
|
|
878
|
-
trigger: /* @__PURE__ */
|
|
784
|
+
trigger: /* @__PURE__ */ q(k, {
|
|
879
785
|
type: "button",
|
|
880
786
|
size: "sm",
|
|
881
787
|
loading: x.isPending,
|
|
882
788
|
children: [
|
|
883
|
-
/* @__PURE__ */
|
|
789
|
+
/* @__PURE__ */ K(m, { className: "size-3.5" }),
|
|
884
790
|
" ",
|
|
885
791
|
v("addMember")
|
|
886
792
|
]
|
|
887
793
|
})
|
|
888
794
|
})] }),
|
|
889
|
-
children: [/* @__PURE__ */
|
|
795
|
+
children: [/* @__PURE__ */ q(A, {
|
|
890
796
|
size: "fill",
|
|
891
797
|
padding: "none",
|
|
892
798
|
divided: !0,
|
|
893
799
|
interactive: !1,
|
|
894
|
-
render: /* @__PURE__ */
|
|
895
|
-
children: [s.map((e) => /* @__PURE__ */
|
|
800
|
+
render: /* @__PURE__ */ K("ul", {}),
|
|
801
|
+
children: [s.map((e) => /* @__PURE__ */ q("li", {
|
|
896
802
|
onContextMenu: (t) => f(t, [
|
|
897
803
|
{
|
|
898
804
|
label: v("viewIssues"),
|
|
@@ -905,7 +811,7 @@ function pe({ workspace: n, teamKey: r, isAdmin: a }) {
|
|
|
905
811
|
search: { assignee: e }
|
|
906
812
|
})
|
|
907
813
|
},
|
|
908
|
-
|
|
814
|
+
S(b("copyEmail"), u(e).email ?? ""),
|
|
909
815
|
...a || e === w ? [V, {
|
|
910
816
|
label: v(e === w ? "leaveTeam" : "removeFromTeam"),
|
|
911
817
|
destructive: !0,
|
|
@@ -917,23 +823,23 @@ function pe({ workspace: n, teamKey: r, isAdmin: a }) {
|
|
|
917
823
|
]),
|
|
918
824
|
className: "flex items-center gap-3 px-3 py-2 text-sm",
|
|
919
825
|
children: [
|
|
920
|
-
/* @__PURE__ */
|
|
826
|
+
/* @__PURE__ */ K(_, {
|
|
921
827
|
workspace: n,
|
|
922
828
|
handle: e,
|
|
923
|
-
children: /* @__PURE__ */
|
|
829
|
+
children: /* @__PURE__ */ K(O, {
|
|
924
830
|
name: u(e).name,
|
|
925
831
|
src: u(e).avatarUrl,
|
|
926
832
|
size: "md"
|
|
927
833
|
})
|
|
928
834
|
}),
|
|
929
|
-
/* @__PURE__ */
|
|
835
|
+
/* @__PURE__ */ q("span", {
|
|
930
836
|
className: "flex-1",
|
|
931
|
-
children: [u(e).name, e === w && /* @__PURE__ */
|
|
837
|
+
children: [u(e).name, e === w && /* @__PURE__ */ q("span", {
|
|
932
838
|
className: "text-muted-foreground",
|
|
933
839
|
children: [" ", v("you")]
|
|
934
840
|
})]
|
|
935
841
|
}),
|
|
936
|
-
(a || e === w) && /* @__PURE__ */
|
|
842
|
+
(a || e === w) && /* @__PURE__ */ K("button", {
|
|
937
843
|
type: "button",
|
|
938
844
|
onClick: () => x.mutate([{
|
|
939
845
|
username: e,
|
|
@@ -943,19 +849,19 @@ function pe({ workspace: n, teamKey: r, isAdmin: a }) {
|
|
|
943
849
|
children: e === w ? v("leave") : b("remove")
|
|
944
850
|
})
|
|
945
851
|
]
|
|
946
|
-
}, e)), s.length === 0 && /* @__PURE__ */
|
|
852
|
+
}, e)), s.length === 0 && /* @__PURE__ */ K("li", {
|
|
947
853
|
className: "px-3 py-2 text-sm text-muted-foreground",
|
|
948
854
|
children: v("noMembers")
|
|
949
855
|
})]
|
|
950
|
-
}), /* @__PURE__ */
|
|
856
|
+
}), /* @__PURE__ */ K(N, {
|
|
951
857
|
size: "md",
|
|
952
858
|
className: "mt-2",
|
|
953
859
|
children: h
|
|
954
860
|
})]
|
|
955
861
|
});
|
|
956
862
|
}
|
|
957
|
-
function
|
|
958
|
-
let { data: o } =
|
|
863
|
+
function de({ workspace: r, teamKey: i }) {
|
|
864
|
+
let { data: o } = Z(a(r, i)), { data: l } = Z(s(r)), u = X(), d = W("team"), f = J({
|
|
959
865
|
mutationFn: async (n) => t(await e.PUT("/api/v1/workspaces/{workspace}/teams/{key}/access", {
|
|
960
866
|
params: { path: {
|
|
961
867
|
workspace: r,
|
|
@@ -977,13 +883,13 @@ function me({ workspace: r, teamKey: i }) {
|
|
|
977
883
|
u.invalidateQueries({ queryKey: a(r, i).queryKey }), u.invalidateQueries({ queryKey: s(r).queryKey }), n(u, r);
|
|
978
884
|
}
|
|
979
885
|
});
|
|
980
|
-
return /* @__PURE__ */
|
|
886
|
+
return /* @__PURE__ */ K(I, {
|
|
981
887
|
variant: "bare",
|
|
982
888
|
headingLevel: 2,
|
|
983
889
|
collapsible: !1,
|
|
984
890
|
title: d("access"),
|
|
985
891
|
description: d("accessDescription"),
|
|
986
|
-
children: /* @__PURE__ */
|
|
892
|
+
children: /* @__PURE__ */ K(c, {
|
|
987
893
|
workspace: r,
|
|
988
894
|
resourceName: l.find((e) => e.key === i)?.name ?? i,
|
|
989
895
|
access: o,
|
|
@@ -991,21 +897,21 @@ function me({ workspace: r, teamKey: i }) {
|
|
|
991
897
|
openLabel: d("everyone"),
|
|
992
898
|
rules: [{
|
|
993
899
|
id: "admins",
|
|
994
|
-
icon: /* @__PURE__ */
|
|
900
|
+
icon: /* @__PURE__ */ K(h, { className: "size-4" }),
|
|
995
901
|
title: d("admins"),
|
|
996
902
|
detail: d("adminsDetail"),
|
|
997
903
|
roleId: "admin"
|
|
998
904
|
}, ...o.restricted ? [] : [{
|
|
999
905
|
id: "everyone",
|
|
1000
|
-
icon: /* @__PURE__ */
|
|
906
|
+
icon: /* @__PURE__ */ K(g, { className: "size-4" }),
|
|
1001
907
|
title: d("everyone"),
|
|
1002
908
|
detail: d("everyoneDetail")
|
|
1003
909
|
}]]
|
|
1004
910
|
})
|
|
1005
911
|
});
|
|
1006
912
|
}
|
|
1007
|
-
function
|
|
1008
|
-
let i =
|
|
913
|
+
function fe({ workspace: n, team: r }) {
|
|
914
|
+
let i = W("team"), a = X(), o = U(), { confirm: c, dialog: l } = x(), u = !!r.archivedAt, d = J({
|
|
1009
915
|
mutationFn: async (i) => t(await e.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
|
|
1010
916
|
params: { path: {
|
|
1011
917
|
workspace: n,
|
|
@@ -1020,7 +926,7 @@ function he({ workspace: n, team: r }) {
|
|
|
1020
926
|
confirmLabel: i("archive"),
|
|
1021
927
|
onConfirm: () => d.mutateAsync(!0)
|
|
1022
928
|
});
|
|
1023
|
-
return /* @__PURE__ */
|
|
929
|
+
return /* @__PURE__ */ q(I, {
|
|
1024
930
|
variant: "card",
|
|
1025
931
|
...!u && { tone: "error" },
|
|
1026
932
|
collapsible: !1,
|
|
@@ -1028,31 +934,31 @@ function he({ workspace: n, team: r }) {
|
|
|
1028
934
|
title: i(u ? "archived" : "dangerZone"),
|
|
1029
935
|
description: i(u ? "archivedDetail" : "archiveDetail"),
|
|
1030
936
|
children: [
|
|
1031
|
-
u ? /* @__PURE__ */
|
|
937
|
+
u ? /* @__PURE__ */ K(k, {
|
|
1032
938
|
onClick: () => d.mutate(!1),
|
|
1033
939
|
loading: d.isPending,
|
|
1034
940
|
children: i("restore")
|
|
1035
|
-
}) : /* @__PURE__ */
|
|
941
|
+
}) : /* @__PURE__ */ K(k, {
|
|
1036
942
|
variant: "danger",
|
|
1037
943
|
onClick: f,
|
|
1038
944
|
loading: d.isPending,
|
|
1039
945
|
children: i("archive")
|
|
1040
946
|
}),
|
|
1041
|
-
d.error && !d.variables && /* @__PURE__ */
|
|
947
|
+
d.error && !d.variables && /* @__PURE__ */ K(N, {
|
|
1042
948
|
size: "md",
|
|
1043
949
|
className: "mt-3",
|
|
1044
950
|
children: o(d.error)
|
|
1045
951
|
}),
|
|
1046
952
|
l,
|
|
1047
|
-
/* @__PURE__ */
|
|
953
|
+
/* @__PURE__ */ K(pe, {
|
|
1048
954
|
workspace: n,
|
|
1049
955
|
team: r
|
|
1050
956
|
})
|
|
1051
957
|
]
|
|
1052
958
|
});
|
|
1053
959
|
}
|
|
1054
|
-
function
|
|
1055
|
-
let i =
|
|
960
|
+
function pe({ workspace: n, team: r }) {
|
|
961
|
+
let i = W("team"), a = X(), o = T(), c = U(), [l, u] = H(!1), [d, f] = H(""), [p, m] = H(null), h = J({
|
|
1056
962
|
mutationFn: async () => t(await e.DELETE("/api/v1/workspaces/{workspace}/teams/{key}", { params: { path: {
|
|
1057
963
|
workspace: n,
|
|
1058
964
|
key: r.key
|
|
@@ -1065,24 +971,24 @@ function ge({ workspace: n, team: r }) {
|
|
|
1065
971
|
}), await a.invalidateQueries({ queryKey: s(n).queryKey });
|
|
1066
972
|
}
|
|
1067
973
|
});
|
|
1068
|
-
return /* @__PURE__ */
|
|
974
|
+
return /* @__PURE__ */ q("div", {
|
|
1069
975
|
className: "mt-6 border-t border-border pt-6",
|
|
1070
976
|
children: [
|
|
1071
|
-
/* @__PURE__ */
|
|
977
|
+
/* @__PURE__ */ K("h3", {
|
|
1072
978
|
className: "text-sm font-medium",
|
|
1073
979
|
children: i("delete")
|
|
1074
980
|
}),
|
|
1075
|
-
/* @__PURE__ */
|
|
981
|
+
/* @__PURE__ */ K("p", {
|
|
1076
982
|
className: "mt-1 text-sm text-muted-foreground",
|
|
1077
983
|
children: i("deleteDetail")
|
|
1078
984
|
}),
|
|
1079
|
-
/* @__PURE__ */
|
|
985
|
+
/* @__PURE__ */ K(k, {
|
|
1080
986
|
variant: "danger",
|
|
1081
987
|
className: "mt-3",
|
|
1082
988
|
onClick: () => u(!0),
|
|
1083
989
|
children: i("delete")
|
|
1084
990
|
}),
|
|
1085
|
-
/* @__PURE__ */
|
|
991
|
+
/* @__PURE__ */ K(M, {
|
|
1086
992
|
open: l,
|
|
1087
993
|
onClose: () => {
|
|
1088
994
|
u(!1), f(""), m(null);
|
|
@@ -1098,12 +1004,12 @@ function ge({ workspace: n, team: r }) {
|
|
|
1098
1004
|
onConfirm: () => h.mutateAsync().catch((e) => {
|
|
1099
1005
|
throw m(e), e;
|
|
1100
1006
|
}),
|
|
1101
|
-
children: /* @__PURE__ */
|
|
1007
|
+
children: /* @__PURE__ */ q("label", {
|
|
1102
1008
|
className: "mt-3 block text-sm",
|
|
1103
|
-
children: [i.rich("deleteTypeKey", { key: () => /* @__PURE__ */
|
|
1009
|
+
children: [i.rich("deleteTypeKey", { key: () => /* @__PURE__ */ K("code", {
|
|
1104
1010
|
className: "font-mono",
|
|
1105
1011
|
children: r.key
|
|
1106
|
-
}) }), /* @__PURE__ */
|
|
1012
|
+
}) }), /* @__PURE__ */ K(P, {
|
|
1107
1013
|
value: d,
|
|
1108
1014
|
onChange: (e) => f(e.target.value),
|
|
1109
1015
|
autoComplete: "off",
|
|
@@ -1115,4 +1021,4 @@ function ge({ workspace: n, team: r }) {
|
|
|
1115
1021
|
]
|
|
1116
1022
|
});
|
|
1117
1023
|
}
|
|
1118
|
-
export {
|
|
1024
|
+
export { ne as component };
|