@parallelworks/tandem-web 0.139.0 → 0.139.2
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/components/AppRoot.js +9 -8
- package/components/SettingsNav.js +6 -6
- package/components/settings.js +10 -10
- package/hostedApp.js +47 -45
- package/lib/pageTitle.js +22 -10
- package/package.json +1 -1
- package/pages/areas.js +112 -112
- package/pages/decisions.js +36 -36
- package/pages/issues.js +34 -34
- package/pages/projects.js +109 -109
- package/pages/triage.js +64 -64
- package/routes/_workspace/agents/_slug2.js +21 -21
- package/routes/_workspace/agents/index2.js +16 -16
- package/routes/_workspace/areas/_area2.js +105 -105
- package/routes/_workspace/docs/_doc2.js +185 -185
- package/routes/_workspace/graph3.js +8 -8
- package/routes/_workspace/issues/_identifier2.js +484 -484
- package/routes/_workspace/knowledge/_term2.js +166 -166
- package/routes/_workspace/knowledge/index2.js +33 -33
- package/routes/_workspace/measures3.js +18 -18
- package/routes/_workspace/notifications2.js +112 -112
- package/routes/_workspace/people/_username2.js +36 -36
- package/routes/_workspace/projects/_projectId3.js +215 -215
- package/routes/_workspace/teams/_key/cycles/_number2.js +16 -16
- package/routes/_workspace/teams/_key/cycles/index2.js +38 -38
- package/routes/_workspace/teams/_key/settings2.js +131 -131
- package/routes/_workspace2.js +394 -394
- package/routes/docs/route2.js +5 -5
- package/routes/new2.js +8 -8
- package/routes/request2._token.js +4 -4
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { appURL as e } from "../../../../lib/base.js";
|
|
2
2
|
import { api as t, unwrap as n } from "../../../../api/client.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
3
|
+
import { usePageTitle as r } from "../../../../lib/pageTitle.js";
|
|
4
|
+
import { useNavigate as i } from "../../../../lib/router.js";
|
|
5
|
+
import { agentsQuery as a, meQuery as o, teamAccessQuery as s, teamMembersQuery as c, teamsQuery as l } from "../../../../api/queries.js";
|
|
6
|
+
import { AddIcon as u, ShieldIcon as d, UsersIcon as f } from "../../../../components/icons.js";
|
|
7
|
+
import { Route as p } from "./settings.js";
|
|
8
|
+
import { copyItem as m } from "../../../../lib/menus.js";
|
|
9
|
+
import { usePeople as h } from "../../../../lib/people.js";
|
|
10
10
|
import { usePermissions as g } from "../../../../lib/roles.js";
|
|
11
11
|
import { useConfirm as _ } from "../../../../lib/confirm.js";
|
|
12
12
|
import { PersonHoverCard as v } from "../../../../components/PersonHoverCard.js";
|
|
@@ -26,30 +26,30 @@ import { Fragment as K, jsx as q, jsxs as J } from "react/jsx-runtime";
|
|
|
26
26
|
import { useMutation as Y, useQuery as X, useQueryClient as Z, useSuspenseQuery as Q } from "@tanstack/react-query";
|
|
27
27
|
// src/routes/$workspace/teams/$key/settings.tsx?tsr-split=component
|
|
28
28
|
function ee() {
|
|
29
|
-
let { workspace: e, key:
|
|
30
|
-
mutationFn: async (
|
|
29
|
+
let { workspace: e, key: i } = p.useParams(), { data: a } = Q(l(e)), o = g(e, { team: i }), s = o.has("manage_teams"), c = G("settingsNav"), u = Z(), d = Y({
|
|
30
|
+
mutationFn: async (r) => n(await t.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
|
|
31
31
|
params: { path: {
|
|
32
32
|
workspace: e,
|
|
33
|
-
key:
|
|
33
|
+
key: i
|
|
34
34
|
} },
|
|
35
|
-
body:
|
|
35
|
+
body: r
|
|
36
36
|
})),
|
|
37
|
-
onSettled: () =>
|
|
38
|
-
}),
|
|
39
|
-
return
|
|
37
|
+
onSettled: () => u.invalidateQueries({ queryKey: l(e).queryKey })
|
|
38
|
+
}), f = a.find((e) => e.key === i);
|
|
39
|
+
return r(f?.name), f ? /* @__PURE__ */ J("div", {
|
|
40
40
|
className: "flex h-full min-h-0 flex-col",
|
|
41
41
|
children: [/* @__PURE__ */ q(F, {
|
|
42
42
|
heading: !1,
|
|
43
43
|
breadcrumbs: [
|
|
44
44
|
{
|
|
45
|
-
label:
|
|
45
|
+
label: c("label"),
|
|
46
46
|
href: `/${e}/settings`
|
|
47
47
|
},
|
|
48
48
|
{
|
|
49
|
-
label:
|
|
49
|
+
label: c("teams"),
|
|
50
50
|
href: `/${e}/settings/teams`
|
|
51
51
|
},
|
|
52
|
-
{ label:
|
|
52
|
+
{ label: f.name }
|
|
53
53
|
]
|
|
54
54
|
}), /* @__PURE__ */ q("div", {
|
|
55
55
|
className: "min-h-0 flex-1 overflow-y-auto",
|
|
@@ -61,103 +61,103 @@ function ee() {
|
|
|
61
61
|
children: [
|
|
62
62
|
/* @__PURE__ */ q(b, {
|
|
63
63
|
workspace: e,
|
|
64
|
-
icon:
|
|
65
|
-
name:
|
|
66
|
-
onChange: (e) =>
|
|
64
|
+
icon: f.icon,
|
|
65
|
+
name: f.name,
|
|
66
|
+
onChange: (e) => d.mutateAsync({
|
|
67
67
|
icon: e,
|
|
68
68
|
color: ""
|
|
69
69
|
}),
|
|
70
|
-
disabled: !
|
|
70
|
+
disabled: !s,
|
|
71
71
|
size: 40
|
|
72
72
|
}),
|
|
73
73
|
/* @__PURE__ */ J("h1", {
|
|
74
74
|
className: "text-xl font-semibold tracking-tight",
|
|
75
75
|
children: [
|
|
76
|
-
|
|
76
|
+
f.name,
|
|
77
77
|
" ",
|
|
78
78
|
/* @__PURE__ */ q("span", {
|
|
79
79
|
className: "font-normal text-muted-foreground",
|
|
80
|
-
children:
|
|
80
|
+
children: f.key
|
|
81
81
|
})
|
|
82
82
|
]
|
|
83
83
|
}),
|
|
84
84
|
/* @__PURE__ */ q(y, {
|
|
85
85
|
workspace: e,
|
|
86
86
|
kind: "team",
|
|
87
|
-
target:
|
|
87
|
+
target: f.id
|
|
88
88
|
})
|
|
89
89
|
]
|
|
90
90
|
}),
|
|
91
91
|
/* @__PURE__ */ q(se, {
|
|
92
92
|
workspace: e,
|
|
93
|
-
teamKey:
|
|
94
|
-
isAdmin:
|
|
93
|
+
teamKey: i,
|
|
94
|
+
isAdmin: o.has("manage_members")
|
|
95
95
|
}),
|
|
96
96
|
/* @__PURE__ */ q(E, {
|
|
97
97
|
workspace: e,
|
|
98
|
-
teamKey:
|
|
99
|
-
isAdmin:
|
|
98
|
+
teamKey: i,
|
|
99
|
+
isAdmin: o.has("manage_labels")
|
|
100
100
|
}),
|
|
101
101
|
/* @__PURE__ */ q(w, {
|
|
102
102
|
workspace: e,
|
|
103
|
-
team:
|
|
104
|
-
isAdmin:
|
|
103
|
+
team: f,
|
|
104
|
+
isAdmin: s
|
|
105
105
|
}),
|
|
106
106
|
/* @__PURE__ */ q(te, {
|
|
107
107
|
workspace: e,
|
|
108
|
-
team:
|
|
109
|
-
isAdmin:
|
|
108
|
+
team: f,
|
|
109
|
+
isAdmin: s
|
|
110
110
|
}),
|
|
111
111
|
/* @__PURE__ */ q(re, {
|
|
112
112
|
workspace: e,
|
|
113
|
-
team:
|
|
114
|
-
isAdmin:
|
|
113
|
+
team: f,
|
|
114
|
+
isAdmin: s
|
|
115
115
|
}),
|
|
116
116
|
/* @__PURE__ */ q(ne, {
|
|
117
117
|
workspace: e,
|
|
118
|
-
team:
|
|
119
|
-
isAdmin:
|
|
118
|
+
team: f,
|
|
119
|
+
isAdmin: s
|
|
120
120
|
}),
|
|
121
121
|
/* @__PURE__ */ q(S, {
|
|
122
122
|
workspace: e,
|
|
123
|
-
teamKey:
|
|
124
|
-
isAdmin:
|
|
123
|
+
teamKey: i,
|
|
124
|
+
isAdmin: s
|
|
125
125
|
}),
|
|
126
126
|
/* @__PURE__ */ q(C, {
|
|
127
127
|
workspace: e,
|
|
128
|
-
teamKey:
|
|
129
|
-
isAdmin:
|
|
128
|
+
teamKey: i,
|
|
129
|
+
isAdmin: o.has("manage_templates")
|
|
130
130
|
}),
|
|
131
131
|
/* @__PURE__ */ q(ie, {
|
|
132
132
|
workspace: e,
|
|
133
|
-
team:
|
|
134
|
-
isAdmin:
|
|
133
|
+
team: f,
|
|
134
|
+
isAdmin: s
|
|
135
135
|
}),
|
|
136
136
|
/* @__PURE__ */ q(oe, {
|
|
137
137
|
workspace: e,
|
|
138
|
-
team:
|
|
139
|
-
isAdmin:
|
|
138
|
+
team: f,
|
|
139
|
+
isAdmin: s
|
|
140
140
|
}),
|
|
141
141
|
/* @__PURE__ */ q(T, {
|
|
142
142
|
workspace: e,
|
|
143
|
-
team:
|
|
144
|
-
isAdmin:
|
|
143
|
+
team: f,
|
|
144
|
+
isAdmin: s
|
|
145
145
|
}),
|
|
146
146
|
/* @__PURE__ */ q(ce, {
|
|
147
147
|
workspace: e,
|
|
148
|
-
teamKey:
|
|
148
|
+
teamKey: i
|
|
149
149
|
}),
|
|
150
|
-
|
|
150
|
+
s && /* @__PURE__ */ q(le, {
|
|
151
151
|
workspace: e,
|
|
152
|
-
team:
|
|
152
|
+
team: f
|
|
153
153
|
})
|
|
154
154
|
]
|
|
155
155
|
})
|
|
156
156
|
})]
|
|
157
157
|
}) : null;
|
|
158
158
|
}
|
|
159
|
-
function te({ workspace: r, team: i, isAdmin:
|
|
160
|
-
let s = G("teamIntake"),
|
|
159
|
+
function te({ workspace: r, team: i, isAdmin: a }) {
|
|
160
|
+
let s = G("teamIntake"), c = W(), u = Z(), { data: d } = X(o), f = () => u.invalidateQueries({ queryKey: l(r).queryKey }), p = { params: { path: {
|
|
161
161
|
workspace: r,
|
|
162
162
|
key: i.key
|
|
163
163
|
} } }, m = Y({
|
|
@@ -169,7 +169,7 @@ function te({ workspace: r, team: i, isAdmin: o }) {
|
|
|
169
169
|
}), h = Y({
|
|
170
170
|
mutationFn: async () => n(await t.POST("/api/v1/workspaces/{workspace}/teams/{key}/intake/rotate", p)),
|
|
171
171
|
onSettled: f
|
|
172
|
-
}), { token: g, form: _, email: v } = i.intake, y = g ? e(`/request/${g}`) : "", b = g && d?.intakeDomain ? `${g}@${d.intakeDomain}` : "", x = !
|
|
172
|
+
}), { token: g, form: _, email: v } = i.intake, y = g ? e(`/request/${g}`) : "", b = g && d?.intakeDomain ? `${g}@${d.intakeDomain}` : "", x = !a || m.isPending, S = m.error ?? h.error;
|
|
173
173
|
return /* @__PURE__ */ J(z, {
|
|
174
174
|
title: s("title"),
|
|
175
175
|
description: s("description"),
|
|
@@ -230,7 +230,7 @@ function te({ workspace: r, team: i, isAdmin: o }) {
|
|
|
230
230
|
})]
|
|
231
231
|
})
|
|
232
232
|
}),
|
|
233
|
-
g &&
|
|
233
|
+
g && a && /* @__PURE__ */ q(R, {
|
|
234
234
|
label: s("rotate"),
|
|
235
235
|
helpText: s("rotateHelp"),
|
|
236
236
|
children: /* @__PURE__ */ q(O, {
|
|
@@ -240,12 +240,12 @@ function te({ workspace: r, team: i, isAdmin: o }) {
|
|
|
240
240
|
children: s("rotateButton")
|
|
241
241
|
})
|
|
242
242
|
}),
|
|
243
|
-
S && /* @__PURE__ */ q(N, { children:
|
|
243
|
+
S && /* @__PURE__ */ q(N, { children: c(S) })
|
|
244
244
|
]
|
|
245
245
|
});
|
|
246
246
|
}
|
|
247
247
|
function ne({ workspace: e, team: r, isAdmin: i }) {
|
|
248
|
-
let a = G("planning.sla"), o = G("priority"), s = W(),
|
|
248
|
+
let a = G("planning.sla"), o = G("priority"), s = W(), c = Z(), u = Y({
|
|
249
249
|
mutationFn: async (i) => n(await t.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
|
|
250
250
|
params: { path: {
|
|
251
251
|
workspace: e,
|
|
@@ -253,7 +253,7 @@ function ne({ workspace: e, team: r, isAdmin: i }) {
|
|
|
253
253
|
} },
|
|
254
254
|
body: { slaHours: i }
|
|
255
255
|
})),
|
|
256
|
-
onSettled: () =>
|
|
256
|
+
onSettled: () => c.invalidateQueries({ queryKey: l(e).queryKey })
|
|
257
257
|
}), d = [
|
|
258
258
|
0,
|
|
259
259
|
4,
|
|
@@ -295,7 +295,7 @@ function ne({ workspace: e, team: r, isAdmin: i }) {
|
|
|
295
295
|
});
|
|
296
296
|
}
|
|
297
297
|
function re({ workspace: e, team: r, isAdmin: i }) {
|
|
298
|
-
let a = G("planning.settings"), o = W(), s = Z(),
|
|
298
|
+
let a = G("planning.settings"), o = W(), s = Z(), c = Y({
|
|
299
299
|
mutationFn: async (i) => n(await t.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
|
|
300
300
|
params: { path: {
|
|
301
301
|
workspace: e,
|
|
@@ -304,14 +304,14 @@ function re({ workspace: e, team: r, isAdmin: i }) {
|
|
|
304
304
|
body: i
|
|
305
305
|
})),
|
|
306
306
|
onSettled: () => {
|
|
307
|
-
s.invalidateQueries({ queryKey:
|
|
307
|
+
s.invalidateQueries({ queryKey: l(e).queryKey }), s.invalidateQueries({ queryKey: [
|
|
308
308
|
"workspace",
|
|
309
309
|
e,
|
|
310
310
|
"cycles",
|
|
311
311
|
r.key
|
|
312
312
|
] });
|
|
313
313
|
}
|
|
314
|
-
}), u = !i ||
|
|
314
|
+
}), u = !i || c.isPending, d = (e) => c.isError && c.variables && e in c.variables ? o(c.error) : null;
|
|
315
315
|
return /* @__PURE__ */ J(z, {
|
|
316
316
|
title: a("title"),
|
|
317
317
|
description: a("description"),
|
|
@@ -324,7 +324,7 @@ function re({ workspace: e, team: r, isAdmin: i }) {
|
|
|
324
324
|
"aria-label": a("triage"),
|
|
325
325
|
checked: r.triageEnabled,
|
|
326
326
|
disabled: u,
|
|
327
|
-
onCheckedChange: (e) =>
|
|
327
|
+
onCheckedChange: (e) => c.mutate({ triageEnabled: e })
|
|
328
328
|
})
|
|
329
329
|
}),
|
|
330
330
|
/* @__PURE__ */ q(R, {
|
|
@@ -335,7 +335,7 @@ function re({ workspace: e, team: r, isAdmin: i }) {
|
|
|
335
335
|
"aria-label": a("customerRequests"),
|
|
336
336
|
checked: r.customerRequestsEnabled,
|
|
337
337
|
disabled: u,
|
|
338
|
-
onCheckedChange: (e) =>
|
|
338
|
+
onCheckedChange: (e) => c.mutate({ customerRequestsEnabled: e })
|
|
339
339
|
})
|
|
340
340
|
}),
|
|
341
341
|
/* @__PURE__ */ q(R, {
|
|
@@ -349,7 +349,7 @@ function re({ workspace: e, team: r, isAdmin: i }) {
|
|
|
349
349
|
"aria-label": a("autoClose"),
|
|
350
350
|
value: String(r.autoCloseDays),
|
|
351
351
|
disabled: u,
|
|
352
|
-
onValueChange: (e) => e &&
|
|
352
|
+
onValueChange: (e) => e && c.mutate({ autoCloseDays: Number(e) }),
|
|
353
353
|
items: [
|
|
354
354
|
0,
|
|
355
355
|
30,
|
|
@@ -375,7 +375,7 @@ function re({ workspace: e, team: r, isAdmin: i }) {
|
|
|
375
375
|
"aria-label": a("autoArchive"),
|
|
376
376
|
value: String(r.autoArchiveDays),
|
|
377
377
|
disabled: u,
|
|
378
|
-
onValueChange: (e) => e &&
|
|
378
|
+
onValueChange: (e) => e && c.mutate({ autoArchiveDays: Number(e) }),
|
|
379
379
|
items: [
|
|
380
380
|
0,
|
|
381
381
|
1,
|
|
@@ -398,7 +398,7 @@ function re({ workspace: e, team: r, isAdmin: i }) {
|
|
|
398
398
|
"aria-label": a("cycles"),
|
|
399
399
|
checked: r.cyclesEnabled,
|
|
400
400
|
disabled: u,
|
|
401
|
-
onCheckedChange: (e) =>
|
|
401
|
+
onCheckedChange: (e) => c.mutate({ cyclesEnabled: e })
|
|
402
402
|
})
|
|
403
403
|
}),
|
|
404
404
|
/* @__PURE__ */ q(R, {
|
|
@@ -412,7 +412,7 @@ function re({ workspace: e, team: r, isAdmin: i }) {
|
|
|
412
412
|
"aria-label": a("cycleLength"),
|
|
413
413
|
value: r.cycleWeeks,
|
|
414
414
|
disabled: u,
|
|
415
|
-
onValueChange: (e) => e &&
|
|
415
|
+
onValueChange: (e) => e && c.mutate({ cycleWeeks: e }),
|
|
416
416
|
items: [
|
|
417
417
|
1,
|
|
418
418
|
2,
|
|
@@ -435,7 +435,7 @@ function re({ workspace: e, team: r, isAdmin: i }) {
|
|
|
435
435
|
"aria-label": a("upcomingCycles"),
|
|
436
436
|
value: r.cycleUpcoming,
|
|
437
437
|
disabled: u,
|
|
438
|
-
onValueChange: (e) => e !== null &&
|
|
438
|
+
onValueChange: (e) => e !== null && c.mutate({ cycleUpcoming: e }),
|
|
439
439
|
items: [
|
|
440
440
|
0,
|
|
441
441
|
1,
|
|
@@ -460,7 +460,7 @@ function re({ workspace: e, team: r, isAdmin: i }) {
|
|
|
460
460
|
"aria-label": a("autoAdd"),
|
|
461
461
|
checked: r.cycleAutoAdd,
|
|
462
462
|
disabled: u,
|
|
463
|
-
onCheckedChange: (e) =>
|
|
463
|
+
onCheckedChange: (e) => c.mutate({ cycleAutoAdd: e })
|
|
464
464
|
})
|
|
465
465
|
}),
|
|
466
466
|
/* @__PURE__ */ q(R, {
|
|
@@ -474,7 +474,7 @@ function re({ workspace: e, team: r, isAdmin: i }) {
|
|
|
474
474
|
"aria-label": a("estimates"),
|
|
475
475
|
value: r.estimateScale,
|
|
476
476
|
disabled: u,
|
|
477
|
-
onValueChange: (e) => e &&
|
|
477
|
+
onValueChange: (e) => e && c.mutate({ estimateScale: e }),
|
|
478
478
|
items: [
|
|
479
479
|
"none",
|
|
480
480
|
"fibonacci",
|
|
@@ -499,8 +499,8 @@ var $ = [
|
|
|
499
499
|
"merge",
|
|
500
500
|
"release"
|
|
501
501
|
];
|
|
502
|
-
function ie({ workspace: e, team: r, isAdmin:
|
|
503
|
-
let o = G("flow"), s = W(),
|
|
502
|
+
function ie({ workspace: e, team: r, isAdmin: i }) {
|
|
503
|
+
let o = G("flow"), s = W(), c = Z(), { data: u = [] } = X(a(e)), d = Y({
|
|
504
504
|
mutationFn: async (i) => n(await t.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
|
|
505
505
|
params: { path: {
|
|
506
506
|
workspace: e,
|
|
@@ -508,7 +508,7 @@ function ie({ workspace: e, team: r, isAdmin: a }) {
|
|
|
508
508
|
} },
|
|
509
509
|
body: { flow: i }
|
|
510
510
|
})),
|
|
511
|
-
onSettled: () =>
|
|
511
|
+
onSettled: () => c.invalidateQueries({ queryKey: l(e).queryKey })
|
|
512
512
|
}), f = Y({
|
|
513
513
|
mutationFn: async (i) => n(await t.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
|
|
514
514
|
params: { path: {
|
|
@@ -517,7 +517,7 @@ function ie({ workspace: e, team: r, isAdmin: a }) {
|
|
|
517
517
|
} },
|
|
518
518
|
body: { autoMerge: i }
|
|
519
519
|
})),
|
|
520
|
-
onSettled: () =>
|
|
520
|
+
onSettled: () => c.invalidateQueries({ queryKey: l(e).queryKey })
|
|
521
521
|
}), p = Y({
|
|
522
522
|
mutationFn: async (i) => n(await t.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
|
|
523
523
|
params: { path: {
|
|
@@ -526,7 +526,7 @@ function ie({ workspace: e, team: r, isAdmin: a }) {
|
|
|
526
526
|
} },
|
|
527
527
|
body: { draftPullRequests: i }
|
|
528
528
|
})),
|
|
529
|
-
onSettled: () =>
|
|
529
|
+
onSettled: () => c.invalidateQueries({ queryKey: l(e).queryKey })
|
|
530
530
|
}), m = (e) => r.flow.find((t) => t.stage === e), [h, g] = U(null), _ = (e, t) => {
|
|
531
531
|
g(e), d.mutate($.flatMap((n) => {
|
|
532
532
|
let r = m(n);
|
|
@@ -535,7 +535,7 @@ function ie({ workspace: e, team: r, isAdmin: a }) {
|
|
|
535
535
|
...t.agentId && { agentId: t.agentId }
|
|
536
536
|
}] : [] : r ? [r] : [];
|
|
537
537
|
}));
|
|
538
|
-
}, v = !
|
|
538
|
+
}, v = !i || d.isPending;
|
|
539
539
|
return /* @__PURE__ */ J(z, {
|
|
540
540
|
title: o("title"),
|
|
541
541
|
description: o("description"),
|
|
@@ -582,7 +582,7 @@ function ie({ workspace: e, team: r, isAdmin: a }) {
|
|
|
582
582
|
children: /* @__PURE__ */ q(ae, {
|
|
583
583
|
workspace: e,
|
|
584
584
|
team: r,
|
|
585
|
-
disabled: !
|
|
585
|
+
disabled: !i
|
|
586
586
|
})
|
|
587
587
|
}),
|
|
588
588
|
/* @__PURE__ */ q(R, {
|
|
@@ -592,7 +592,7 @@ function ie({ workspace: e, team: r, isAdmin: a }) {
|
|
|
592
592
|
children: /* @__PURE__ */ q(B, {
|
|
593
593
|
"aria-label": o("autoMerge"),
|
|
594
594
|
checked: r.autoMerge,
|
|
595
|
-
disabled: !
|
|
595
|
+
disabled: !i || f.isPending,
|
|
596
596
|
onCheckedChange: (e) => f.mutate(e)
|
|
597
597
|
})
|
|
598
598
|
}),
|
|
@@ -603,7 +603,7 @@ function ie({ workspace: e, team: r, isAdmin: a }) {
|
|
|
603
603
|
children: /* @__PURE__ */ q(B, {
|
|
604
604
|
"aria-label": o("draftPullRequests"),
|
|
605
605
|
checked: r.draftPullRequests,
|
|
606
|
-
disabled: !
|
|
606
|
+
disabled: !i || p.isPending,
|
|
607
607
|
onCheckedChange: (e) => p.mutate(e)
|
|
608
608
|
})
|
|
609
609
|
})
|
|
@@ -611,7 +611,7 @@ function ie({ workspace: e, team: r, isAdmin: a }) {
|
|
|
611
611
|
});
|
|
612
612
|
}
|
|
613
613
|
function ae({ workspace: e, team: r, disabled: i }) {
|
|
614
|
-
let a = G("flow"), o = W(), s = Z(), [
|
|
614
|
+
let a = G("flow"), o = W(), s = Z(), [c, u] = U(r.releaseTargets.join(", ")), d = Y({
|
|
615
615
|
mutationFn: async (i) => n(await t.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
|
|
616
616
|
params: { path: {
|
|
617
617
|
workspace: e,
|
|
@@ -619,16 +619,16 @@ function ae({ workspace: e, team: r, disabled: i }) {
|
|
|
619
619
|
} },
|
|
620
620
|
body: { releaseTargets: i }
|
|
621
621
|
})),
|
|
622
|
-
onSettled: () => s.invalidateQueries({ queryKey:
|
|
622
|
+
onSettled: () => s.invalidateQueries({ queryKey: l(e).queryKey })
|
|
623
623
|
}), f = () => {
|
|
624
|
-
let e =
|
|
624
|
+
let e = c.split(",").map((e) => e.trim()).filter(Boolean);
|
|
625
625
|
e.join(",") !== r.releaseTargets.join(",") && d.mutate(e);
|
|
626
626
|
};
|
|
627
627
|
return /* @__PURE__ */ q("div", {
|
|
628
628
|
className: "w-64",
|
|
629
629
|
children: /* @__PURE__ */ q(P, {
|
|
630
630
|
"aria-label": a("releaseTargets"),
|
|
631
|
-
value:
|
|
631
|
+
value: c,
|
|
632
632
|
disabled: i,
|
|
633
633
|
onChange: (e) => u(e.target.value),
|
|
634
634
|
onBlur: f,
|
|
@@ -639,7 +639,7 @@ function ae({ workspace: e, team: r, disabled: i }) {
|
|
|
639
639
|
});
|
|
640
640
|
}
|
|
641
641
|
function oe({ workspace: e, team: r, isAdmin: i }) {
|
|
642
|
-
let a = G("team"), o = W(), s = Z(),
|
|
642
|
+
let a = G("team"), o = W(), s = Z(), c = Y({
|
|
643
643
|
mutationFn: async (i) => n(await t.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
|
|
644
644
|
params: { path: {
|
|
645
645
|
workspace: e,
|
|
@@ -647,7 +647,7 @@ function oe({ workspace: e, team: r, isAdmin: i }) {
|
|
|
647
647
|
} },
|
|
648
648
|
body: { requireKnownTerms: i }
|
|
649
649
|
})),
|
|
650
|
-
onSettled: () => s.invalidateQueries({ queryKey:
|
|
650
|
+
onSettled: () => s.invalidateQueries({ queryKey: l(e).queryKey })
|
|
651
651
|
});
|
|
652
652
|
return /* @__PURE__ */ q(z, {
|
|
653
653
|
title: a("agentQuestions"),
|
|
@@ -655,38 +655,38 @@ function oe({ workspace: e, team: r, isAdmin: i }) {
|
|
|
655
655
|
children: /* @__PURE__ */ q(R, {
|
|
656
656
|
label: a("requireKnownTerms"),
|
|
657
657
|
helpText: a("requireKnownTermsHelp"),
|
|
658
|
-
error:
|
|
658
|
+
error: c.isError ? o(c.error) : null,
|
|
659
659
|
children: /* @__PURE__ */ q(B, {
|
|
660
660
|
"aria-label": a("requireKnownTerms"),
|
|
661
661
|
checked: r.requireKnownTerms,
|
|
662
|
-
disabled: !i ||
|
|
663
|
-
onCheckedChange: (e) =>
|
|
662
|
+
disabled: !i || c.isPending,
|
|
663
|
+
onCheckedChange: (e) => c.mutate(e)
|
|
664
664
|
})
|
|
665
665
|
})
|
|
666
666
|
});
|
|
667
667
|
}
|
|
668
|
-
function se({ workspace: e, teamKey:
|
|
669
|
-
let { data:
|
|
670
|
-
mutationFn: async (
|
|
671
|
-
for (let { username: a, add: o } of
|
|
672
|
-
let
|
|
668
|
+
function se({ workspace: e, teamKey: r, isAdmin: a }) {
|
|
669
|
+
let { data: s } = Q(c(e, r)), { data: l } = Q(o), { members: d, person: f } = h(e), p = Z(), g = H(), _ = i(), [y, b] = U(null), x = G("team"), S = W(), C = G("common"), w = Y({
|
|
670
|
+
mutationFn: async (i) => {
|
|
671
|
+
for (let { username: a, add: o } of i) {
|
|
672
|
+
let i = { params: { path: {
|
|
673
673
|
workspace: e,
|
|
674
|
-
key:
|
|
674
|
+
key: r,
|
|
675
675
|
username: a
|
|
676
676
|
} } };
|
|
677
|
-
n(o ? await t.PUT("/api/v1/workspaces/{workspace}/teams/{key}/members/{username}",
|
|
677
|
+
n(o ? await t.PUT("/api/v1/workspaces/{workspace}/teams/{key}/members/{username}", i) : await t.DELETE("/api/v1/workspaces/{workspace}/teams/{key}/members/{username}", i));
|
|
678
678
|
}
|
|
679
679
|
},
|
|
680
680
|
onMutate: () => b(null),
|
|
681
681
|
onError: (e) => b(S(e)),
|
|
682
|
-
onSettled: () =>
|
|
683
|
-
}), T = (e) => w.mutate([...e.filter((e) => !
|
|
682
|
+
onSettled: () => p.invalidateQueries({ queryKey: c(e, r).queryKey })
|
|
683
|
+
}), T = (e) => w.mutate([...e.filter((e) => !s.includes(e)).map((e) => ({
|
|
684
684
|
username: e,
|
|
685
685
|
add: !0
|
|
686
|
-
})), ...
|
|
686
|
+
})), ...s.filter((t) => !e.includes(t)).map((e) => ({
|
|
687
687
|
username: e,
|
|
688
688
|
add: !1
|
|
689
|
-
}))]), E =
|
|
689
|
+
}))]), E = l?.user.username ?? "", j = s.includes(E);
|
|
690
690
|
return /* @__PURE__ */ J(I, {
|
|
691
691
|
variant: "bare",
|
|
692
692
|
headingLevel: 2,
|
|
@@ -702,7 +702,7 @@ function se({ workspace: e, teamKey: i, isAdmin: o }) {
|
|
|
702
702
|
add: !0
|
|
703
703
|
}]),
|
|
704
704
|
children: x("join")
|
|
705
|
-
}),
|
|
705
|
+
}), a && /* @__PURE__ */ q(A, {
|
|
706
706
|
multiple: !0,
|
|
707
707
|
items: d.map((e) => ({
|
|
708
708
|
value: e.user.username,
|
|
@@ -715,7 +715,7 @@ function se({ workspace: e, teamKey: i, isAdmin: o }) {
|
|
|
715
715
|
decorative: !0
|
|
716
716
|
})
|
|
717
717
|
})),
|
|
718
|
-
value:
|
|
718
|
+
value: s,
|
|
719
719
|
onValueChange: T,
|
|
720
720
|
align: "end",
|
|
721
721
|
placeholder: x("addPlaceholder"),
|
|
@@ -725,7 +725,7 @@ function se({ workspace: e, teamKey: i, isAdmin: o }) {
|
|
|
725
725
|
size: "sm",
|
|
726
726
|
loading: w.isPending,
|
|
727
727
|
children: [
|
|
728
|
-
/* @__PURE__ */ q(
|
|
728
|
+
/* @__PURE__ */ q(u, { className: "size-3.5" }),
|
|
729
729
|
" ",
|
|
730
730
|
x("addMember")
|
|
731
731
|
]
|
|
@@ -737,7 +737,7 @@ function se({ workspace: e, teamKey: i, isAdmin: o }) {
|
|
|
737
737
|
divided: !0,
|
|
738
738
|
interactive: !1,
|
|
739
739
|
render: /* @__PURE__ */ q("ul", {}),
|
|
740
|
-
children: [
|
|
740
|
+
children: [s.map((t) => /* @__PURE__ */ J("li", {
|
|
741
741
|
onContextMenu: (n) => g(n, [
|
|
742
742
|
{
|
|
743
743
|
label: x("viewIssues"),
|
|
@@ -745,13 +745,13 @@ function se({ workspace: e, teamKey: i, isAdmin: o }) {
|
|
|
745
745
|
to: "/$workspace/teams/$key/issues",
|
|
746
746
|
params: {
|
|
747
747
|
workspace: e,
|
|
748
|
-
key:
|
|
748
|
+
key: r
|
|
749
749
|
},
|
|
750
750
|
search: { assignee: t }
|
|
751
751
|
})
|
|
752
752
|
},
|
|
753
|
-
|
|
754
|
-
...
|
|
753
|
+
m(C("copyEmail"), f(t).email ?? ""),
|
|
754
|
+
...a || t === E ? [V, {
|
|
755
755
|
label: x(t === E ? "leaveTeam" : "removeFromTeam"),
|
|
756
756
|
destructive: !0,
|
|
757
757
|
onClick: () => w.mutate([{
|
|
@@ -778,7 +778,7 @@ function se({ workspace: e, teamKey: i, isAdmin: o }) {
|
|
|
778
778
|
children: [" ", x("you")]
|
|
779
779
|
})]
|
|
780
780
|
}),
|
|
781
|
-
(
|
|
781
|
+
(a || t === E) && /* @__PURE__ */ q("button", {
|
|
782
782
|
type: "button",
|
|
783
783
|
onClick: () => w.mutate([{
|
|
784
784
|
username: t,
|
|
@@ -788,7 +788,7 @@ function se({ workspace: e, teamKey: i, isAdmin: o }) {
|
|
|
788
788
|
children: t === E ? x("leave") : C("remove")
|
|
789
789
|
})
|
|
790
790
|
]
|
|
791
|
-
}, t)),
|
|
791
|
+
}, t)), s.length === 0 && /* @__PURE__ */ q("li", {
|
|
792
792
|
className: "px-3 py-2 text-sm text-muted-foreground",
|
|
793
793
|
children: x("noMembers")
|
|
794
794
|
})]
|
|
@@ -800,7 +800,7 @@ function se({ workspace: e, teamKey: i, isAdmin: o }) {
|
|
|
800
800
|
});
|
|
801
801
|
}
|
|
802
802
|
function ce({ workspace: e, teamKey: r }) {
|
|
803
|
-
let { data: i } = Q(
|
|
803
|
+
let { data: i } = Q(s(e, r)), { data: a } = Q(l(e)), o = Z(), c = G("team"), u = Y({
|
|
804
804
|
mutationFn: async (i) => n(await t.PUT("/api/v1/workspaces/{workspace}/teams/{key}/access", {
|
|
805
805
|
params: { path: {
|
|
806
806
|
workspace: e,
|
|
@@ -817,9 +817,9 @@ function ce({ workspace: e, teamKey: r }) {
|
|
|
817
817
|
}))
|
|
818
818
|
}
|
|
819
819
|
})),
|
|
820
|
-
onSuccess: (t) =>
|
|
820
|
+
onSuccess: (t) => o.setQueryData(s(e, r).queryKey, t),
|
|
821
821
|
onSettled: () => {
|
|
822
|
-
|
|
822
|
+
o.invalidateQueries({ queryKey: s(e, r).queryKey }), o.invalidateQueries({ queryKey: l(e).queryKey }), o.invalidateQueries({ queryKey: [
|
|
823
823
|
"workspace",
|
|
824
824
|
e,
|
|
825
825
|
"issues",
|
|
@@ -831,31 +831,31 @@ function ce({ workspace: e, teamKey: r }) {
|
|
|
831
831
|
variant: "bare",
|
|
832
832
|
headingLevel: 2,
|
|
833
833
|
collapsible: !1,
|
|
834
|
-
title:
|
|
835
|
-
description:
|
|
834
|
+
title: c("access"),
|
|
835
|
+
description: c("accessDescription"),
|
|
836
836
|
children: /* @__PURE__ */ q(x, {
|
|
837
837
|
workspace: e,
|
|
838
838
|
resourceName: a.find((e) => e.key === r)?.name ?? r,
|
|
839
839
|
access: i,
|
|
840
|
-
save: (e) =>
|
|
841
|
-
openLabel:
|
|
840
|
+
save: (e) => u.mutateAsync(e),
|
|
841
|
+
openLabel: c("everyone"),
|
|
842
842
|
rules: [{
|
|
843
843
|
id: "admins",
|
|
844
|
-
icon: /* @__PURE__ */ q(
|
|
845
|
-
title:
|
|
846
|
-
detail:
|
|
844
|
+
icon: /* @__PURE__ */ q(d, { className: "size-4" }),
|
|
845
|
+
title: c("admins"),
|
|
846
|
+
detail: c("adminsDetail"),
|
|
847
847
|
roleId: "admin"
|
|
848
848
|
}, ...i.restricted ? [] : [{
|
|
849
849
|
id: "everyone",
|
|
850
|
-
icon: /* @__PURE__ */ q(
|
|
851
|
-
title:
|
|
852
|
-
detail:
|
|
850
|
+
icon: /* @__PURE__ */ q(f, { className: "size-4" }),
|
|
851
|
+
title: c("everyone"),
|
|
852
|
+
detail: c("everyoneDetail")
|
|
853
853
|
}]]
|
|
854
854
|
})
|
|
855
855
|
});
|
|
856
856
|
}
|
|
857
857
|
function le({ workspace: e, team: r }) {
|
|
858
|
-
let i = G("team"), a = Z(), o = W(), { confirm: s, dialog:
|
|
858
|
+
let i = G("team"), a = Z(), o = W(), { confirm: s, dialog: c } = _(), u = !!r.archivedAt, d = Y({
|
|
859
859
|
mutationFn: async (i) => n(await t.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
|
|
860
860
|
params: { path: {
|
|
861
861
|
workspace: e,
|
|
@@ -863,7 +863,7 @@ function le({ workspace: e, team: r }) {
|
|
|
863
863
|
} },
|
|
864
864
|
body: { archived: i }
|
|
865
865
|
})),
|
|
866
|
-
onSettled: () => a.invalidateQueries({ queryKey:
|
|
866
|
+
onSettled: () => a.invalidateQueries({ queryKey: l(e).queryKey })
|
|
867
867
|
}), f = () => s({
|
|
868
868
|
title: i("archiveConfirm", { name: r.name }),
|
|
869
869
|
description: i("archiveDetail"),
|
|
@@ -893,7 +893,7 @@ function le({ workspace: e, team: r }) {
|
|
|
893
893
|
className: "mt-3",
|
|
894
894
|
children: o(d.error)
|
|
895
895
|
}),
|
|
896
|
-
|
|
896
|
+
c,
|
|
897
897
|
/* @__PURE__ */ q(ue, {
|
|
898
898
|
workspace: e,
|
|
899
899
|
team: r
|
|
@@ -901,18 +901,18 @@ function le({ workspace: e, team: r }) {
|
|
|
901
901
|
]
|
|
902
902
|
});
|
|
903
903
|
}
|
|
904
|
-
function ue({ workspace: e, team:
|
|
905
|
-
let a = G("team"), o = Z(), s =
|
|
904
|
+
function ue({ workspace: e, team: r }) {
|
|
905
|
+
let a = G("team"), o = Z(), s = i(), c = W(), [u, d] = U(!1), [f, p] = U(""), [m, h] = U(null), g = Y({
|
|
906
906
|
mutationFn: async () => n(await t.DELETE("/api/v1/workspaces/{workspace}/teams/{key}", { params: { path: {
|
|
907
907
|
workspace: e,
|
|
908
|
-
key:
|
|
908
|
+
key: r.key
|
|
909
909
|
} } })),
|
|
910
910
|
onSuccess: async () => {
|
|
911
|
-
o.setQueryData(
|
|
911
|
+
o.setQueryData(l(e).queryKey, (e) => e?.filter((e) => e.id !== r.id)), await s({
|
|
912
912
|
to: "/$workspace",
|
|
913
913
|
params: { workspace: e },
|
|
914
914
|
replace: !0
|
|
915
|
-
}), await o.invalidateQueries({ queryKey:
|
|
915
|
+
}), await o.invalidateQueries({ queryKey: l(e).queryKey });
|
|
916
916
|
}
|
|
917
917
|
});
|
|
918
918
|
return /* @__PURE__ */ J("div", {
|
|
@@ -937,14 +937,14 @@ function ue({ workspace: e, team: i }) {
|
|
|
937
937
|
onClose: () => {
|
|
938
938
|
d(!1), p(""), h(null);
|
|
939
939
|
},
|
|
940
|
-
title: a("deleteConfirm", { name:
|
|
940
|
+
title: a("deleteConfirm", { name: r.name }),
|
|
941
941
|
description: a("deleteConfirmDetail"),
|
|
942
942
|
confirmLabel: a("delete"),
|
|
943
943
|
destructive: !0,
|
|
944
944
|
initialFocus: "first-control",
|
|
945
|
-
confirmDisabled: f.trim() !==
|
|
945
|
+
confirmDisabled: f.trim() !== r.key,
|
|
946
946
|
pending: g.isPending,
|
|
947
|
-
error: m ?
|
|
947
|
+
error: m ? c(m) : void 0,
|
|
948
948
|
onConfirm: () => g.mutateAsync().catch((e) => {
|
|
949
949
|
throw h(e), e;
|
|
950
950
|
}),
|
|
@@ -952,7 +952,7 @@ function ue({ workspace: e, team: i }) {
|
|
|
952
952
|
className: "mt-3 block text-sm",
|
|
953
953
|
children: [a.rich("deleteTypeKey", { key: () => /* @__PURE__ */ q("code", {
|
|
954
954
|
className: "font-mono",
|
|
955
|
-
children:
|
|
955
|
+
children: r.key
|
|
956
956
|
}) }), /* @__PURE__ */ q(P, {
|
|
957
957
|
value: f,
|
|
958
958
|
onChange: (e) => p(e.target.value),
|