@parallelworks/tandem-web 0.160.1 → 0.161.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/_virtual/_virtual_i18n/en/common.js +4 -0
- package/_virtual/_virtual_i18n/es/common.js +4 -0
- package/_virtual/_virtual_i18n/ja/common.js +4 -0
- package/_virtual/_virtual_i18n/ko/common.js +4 -0
- package/_virtual/_virtual_i18n/zh/common.js +4 -0
- package/api/mutations.js +16 -9
- package/api/queries.js +194 -140
- package/components/CommandPalette.js +1 -1
- package/components/CustomerRequests.js +81 -85
- package/components/IssueFilters.js +87 -87
- package/components/IssueGroupList.js +72 -0
- package/components/IssueRow.js +70 -66
- package/components/IssueSection.js +30 -20
- package/components/NewIssueDialog.js +175 -175
- package/components/NewProjectDialog.js +64 -64
- package/lib/boardMove.js +13 -3
- package/lib/groupList.js +14 -0
- package/package.json +2 -1
- package/pages/issues.js +393 -340
- package/routes/_workspace/issues/index.js +1 -1
- package/routes/_workspace/teams/_key/settings2.js +180 -164
- package/routes/_workspace2.js +3 -3
- package/routes/_workspace3.js +11 -10
|
@@ -3,32 +3,33 @@ import { api as t, unwrap as n } from "../../../../api/client.js";
|
|
|
3
3
|
import { usePageTitle as r } from "../../../../lib/pageTitle.js";
|
|
4
4
|
import { useNavigate as i } from "../../../../lib/router.js";
|
|
5
5
|
import { agentsQuery as a, meQuery as o, teamAccessQuery as s, teamMembersQuery as c, teamsQuery as l } from "../../../../api/queries.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
6
|
+
import { invalidateIssueLists as u } from "../../../../api/mutations.js";
|
|
7
|
+
import { copyItem as d } from "../../../../lib/menus.js";
|
|
8
|
+
import { AddIcon as f, ShieldIcon as p, UsersIcon as m } from "../../../../components/icons.js";
|
|
9
|
+
import { usePeople as h } from "../../../../lib/people.js";
|
|
10
|
+
import { usePermissions as g } from "../../../../lib/roles.js";
|
|
11
|
+
import { useConfirm as _ } from "../../../../lib/confirm.js";
|
|
12
|
+
import { FieldSettings as v } from "../../../../components/CustomFields.js";
|
|
13
|
+
import { PersonHoverCard as y } from "../../../../components/PersonHoverCard.js";
|
|
14
|
+
import { Route as b } from "./settings.js";
|
|
15
|
+
import { FavoriteStar as x } from "../../../../components/FavoriteStar.js";
|
|
16
|
+
import { IconUpload as S } from "../../../../components/IconUpload.js";
|
|
17
|
+
import { AccessGrants as C } from "../../../../components/AccessGrants.js";
|
|
18
|
+
import { BugRotation as w } from "../../../../components/BugRotation.js";
|
|
19
|
+
import { IssueTemplates as T } from "../../../../components/IssueTemplates.js";
|
|
20
|
+
import { StatusRules as E } from "../../../../components/StatusRules.js";
|
|
21
|
+
import { TeamRepositories as D } from "../../../../components/TeamRepositories.js";
|
|
22
|
+
import { TeamWorkflow as O } from "../../../../components/TeamWorkflow.js";
|
|
23
|
+
import { withSubTeams as k } from "../../../../lib/teamTree.js";
|
|
24
|
+
import { Avatar as A, Button as j, Card as M, Combobox as N, ConfirmModal as ee, CopyButton as P, ErrorText as F, Input as I, PageHeader as te, Section as L, Select as R, SettingRow as z, SettingsCard as B, Switch as V, menuDivider as H, useOpenMenu as U } from "@parallelworks/ui";
|
|
25
|
+
import { useState as W } from "react";
|
|
26
|
+
import { useErrorMessage as G } from "@parallelworks/problem/react";
|
|
27
|
+
import { useTranslations as K } from "use-intl";
|
|
28
|
+
import { Fragment as ne, jsx as q, jsxs as J } from "react/jsx-runtime";
|
|
28
29
|
import { useMutation as Y, useQuery as X, useQueryClient as Z, useSuspenseQuery as Q } from "@tanstack/react-query";
|
|
29
30
|
// src/routes/$workspace/teams/$key/settings.tsx?tsr-split=component
|
|
30
|
-
function
|
|
31
|
-
let { workspace: e, key: i } =
|
|
31
|
+
function re() {
|
|
32
|
+
let { workspace: e, key: i } = b.useParams(), { data: a } = Q(l(e)), o = g(e, { team: i }), s = o.has("manage_teams"), c = K("settingsNav"), u = Z(), d = Y({
|
|
32
33
|
mutationFn: async (r) => n(await t.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
|
|
33
34
|
params: { path: {
|
|
34
35
|
workspace: e,
|
|
@@ -40,7 +41,7 @@ function ne() {
|
|
|
40
41
|
}), f = a.find((e) => e.key === i);
|
|
41
42
|
return r(f?.name), f ? /* @__PURE__ */ J("div", {
|
|
42
43
|
className: "flex h-full min-h-0 flex-col",
|
|
43
|
-
children: [/* @__PURE__ */ q(
|
|
44
|
+
children: [/* @__PURE__ */ q(te, {
|
|
44
45
|
heading: !1,
|
|
45
46
|
breadcrumbs: [
|
|
46
47
|
{
|
|
@@ -61,7 +62,7 @@ function ne() {
|
|
|
61
62
|
/* @__PURE__ */ J("div", {
|
|
62
63
|
className: "flex items-center gap-3",
|
|
63
64
|
children: [
|
|
64
|
-
/* @__PURE__ */ q(
|
|
65
|
+
/* @__PURE__ */ q(S, {
|
|
65
66
|
workspace: e,
|
|
66
67
|
icon: f.icon,
|
|
67
68
|
name: f.name,
|
|
@@ -83,30 +84,30 @@ function ne() {
|
|
|
83
84
|
})
|
|
84
85
|
]
|
|
85
86
|
}),
|
|
86
|
-
/* @__PURE__ */ q(
|
|
87
|
+
/* @__PURE__ */ q(x, {
|
|
87
88
|
workspace: e,
|
|
88
89
|
kind: "team",
|
|
89
90
|
target: f.id
|
|
90
91
|
})
|
|
91
92
|
]
|
|
92
93
|
}),
|
|
93
|
-
/* @__PURE__ */ q(
|
|
94
|
+
/* @__PURE__ */ q(ie, {
|
|
94
95
|
workspace: e,
|
|
95
96
|
team: f,
|
|
96
97
|
teams: a,
|
|
97
98
|
isAdmin: s
|
|
98
99
|
}),
|
|
99
|
-
/* @__PURE__ */ q(
|
|
100
|
+
/* @__PURE__ */ q(de, {
|
|
100
101
|
workspace: e,
|
|
101
102
|
teamKey: i,
|
|
102
103
|
isAdmin: o.has("manage_members")
|
|
103
104
|
}),
|
|
104
|
-
/* @__PURE__ */ q(
|
|
105
|
+
/* @__PURE__ */ q(O, {
|
|
105
106
|
workspace: e,
|
|
106
107
|
teamKey: i,
|
|
107
108
|
isAdmin: o.has("manage_labels")
|
|
108
109
|
}),
|
|
109
|
-
o.has("manage_labels") && /* @__PURE__ */ q(
|
|
110
|
+
o.has("manage_labels") && /* @__PURE__ */ q(v, {
|
|
110
111
|
workspace: e,
|
|
111
112
|
target: "issue",
|
|
112
113
|
team: {
|
|
@@ -114,56 +115,56 @@ function ne() {
|
|
|
114
115
|
id: f.id
|
|
115
116
|
}
|
|
116
117
|
}),
|
|
117
|
-
/* @__PURE__ */ q(
|
|
118
|
+
/* @__PURE__ */ q(E, {
|
|
118
119
|
workspace: e,
|
|
119
120
|
team: f,
|
|
120
121
|
isAdmin: s
|
|
121
122
|
}),
|
|
122
|
-
/* @__PURE__ */ q(
|
|
123
|
+
/* @__PURE__ */ q(ae, {
|
|
123
124
|
workspace: e,
|
|
124
125
|
team: f,
|
|
125
126
|
isAdmin: s
|
|
126
127
|
}),
|
|
127
|
-
/* @__PURE__ */ q(
|
|
128
|
+
/* @__PURE__ */ q(se, {
|
|
128
129
|
workspace: e,
|
|
129
130
|
team: f,
|
|
130
131
|
isAdmin: s
|
|
131
132
|
}),
|
|
132
|
-
/* @__PURE__ */ q(
|
|
133
|
+
/* @__PURE__ */ q(oe, {
|
|
133
134
|
workspace: e,
|
|
134
135
|
team: f,
|
|
135
136
|
isAdmin: s
|
|
136
137
|
}),
|
|
137
|
-
/* @__PURE__ */ q(
|
|
138
|
+
/* @__PURE__ */ q(w, {
|
|
138
139
|
workspace: e,
|
|
139
140
|
teamKey: i,
|
|
140
141
|
isAdmin: s
|
|
141
142
|
}),
|
|
142
|
-
/* @__PURE__ */ q(
|
|
143
|
+
/* @__PURE__ */ q(T, {
|
|
143
144
|
workspace: e,
|
|
144
145
|
teamKey: i,
|
|
145
146
|
isAdmin: o.has("manage_templates")
|
|
146
147
|
}),
|
|
147
|
-
/* @__PURE__ */ q(
|
|
148
|
+
/* @__PURE__ */ q(ce, {
|
|
148
149
|
workspace: e,
|
|
149
150
|
team: f,
|
|
150
151
|
isAdmin: s
|
|
151
152
|
}),
|
|
152
|
-
/* @__PURE__ */ q(
|
|
153
|
+
/* @__PURE__ */ q(ue, {
|
|
153
154
|
workspace: e,
|
|
154
155
|
team: f,
|
|
155
156
|
isAdmin: s
|
|
156
157
|
}),
|
|
157
|
-
/* @__PURE__ */ q(
|
|
158
|
+
/* @__PURE__ */ q(D, {
|
|
158
159
|
workspace: e,
|
|
159
160
|
team: f,
|
|
160
161
|
isAdmin: s
|
|
161
162
|
}),
|
|
162
|
-
/* @__PURE__ */ q(
|
|
163
|
+
/* @__PURE__ */ q(fe, {
|
|
163
164
|
workspace: e,
|
|
164
165
|
teamKey: i
|
|
165
166
|
}),
|
|
166
|
-
s && /* @__PURE__ */ q(
|
|
167
|
+
s && /* @__PURE__ */ q(pe, {
|
|
167
168
|
workspace: e,
|
|
168
169
|
team: f
|
|
169
170
|
})
|
|
@@ -172,8 +173,8 @@ function ne() {
|
|
|
172
173
|
})]
|
|
173
174
|
}) : null;
|
|
174
175
|
}
|
|
175
|
-
function
|
|
176
|
-
let o =
|
|
176
|
+
function ie({ workspace: e, team: r, teams: i, isAdmin: a }) {
|
|
177
|
+
let o = K("teamParent"), s = G(), c = Z(), u = Y({
|
|
177
178
|
mutationFn: async (i) => n(await t.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
|
|
178
179
|
params: { path: {
|
|
179
180
|
workspace: e,
|
|
@@ -182,16 +183,16 @@ function re({ workspace: e, team: r, teams: i, isAdmin: a }) {
|
|
|
182
183
|
body: { parent: i }
|
|
183
184
|
})),
|
|
184
185
|
onSettled: () => c.invalidateQueries({ queryKey: l(e).queryKey })
|
|
185
|
-
}), d =
|
|
186
|
-
return /* @__PURE__ */ J(
|
|
186
|
+
}), d = k(i, r.id), f = i.find((e) => e.id === r.parentId), p = i.filter((e) => e.parentId === r.id && !e.archivedAt);
|
|
187
|
+
return /* @__PURE__ */ J(B, {
|
|
187
188
|
title: o("title"),
|
|
188
189
|
description: o("description"),
|
|
189
190
|
children: [
|
|
190
|
-
/* @__PURE__ */ q(
|
|
191
|
+
/* @__PURE__ */ q(z, {
|
|
191
192
|
label: o("parent"),
|
|
192
193
|
children: /* @__PURE__ */ q("div", {
|
|
193
194
|
className: "w-56",
|
|
194
|
-
children: /* @__PURE__ */ q(
|
|
195
|
+
children: /* @__PURE__ */ q(R, {
|
|
195
196
|
width: "fill",
|
|
196
197
|
"aria-label": o("parent"),
|
|
197
198
|
value: f?.key ?? "",
|
|
@@ -207,19 +208,19 @@ function re({ workspace: e, team: r, teams: i, isAdmin: a }) {
|
|
|
207
208
|
})
|
|
208
209
|
})
|
|
209
210
|
}),
|
|
210
|
-
p.length > 0 && /* @__PURE__ */ q(
|
|
211
|
+
p.length > 0 && /* @__PURE__ */ q(z, {
|
|
211
212
|
label: o("subTeams"),
|
|
212
213
|
children: /* @__PURE__ */ q("span", {
|
|
213
214
|
className: "text-sm",
|
|
214
215
|
children: p.map((e) => e.name).join(", ")
|
|
215
216
|
})
|
|
216
217
|
}),
|
|
217
|
-
u.error && /* @__PURE__ */ q(
|
|
218
|
+
u.error && /* @__PURE__ */ q(F, { children: s(u.error) })
|
|
218
219
|
]
|
|
219
220
|
});
|
|
220
221
|
}
|
|
221
|
-
function
|
|
222
|
-
let s =
|
|
222
|
+
function ae({ workspace: r, team: i, isAdmin: a }) {
|
|
223
|
+
let s = K("teamIntake"), c = G(), u = Z(), { data: d } = X(o), f = () => u.invalidateQueries({ queryKey: l(r).queryKey }), p = { params: { path: {
|
|
223
224
|
workspace: r,
|
|
224
225
|
key: i.key
|
|
225
226
|
} } }, m = Y({
|
|
@@ -232,14 +233,14 @@ function ie({ workspace: r, team: i, isAdmin: a }) {
|
|
|
232
233
|
mutationFn: async () => n(await t.POST("/api/v1/workspaces/{workspace}/teams/{key}/intake/rotate", p)),
|
|
233
234
|
onSettled: f
|
|
234
235
|
}), { 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;
|
|
235
|
-
return /* @__PURE__ */ J(
|
|
236
|
+
return /* @__PURE__ */ J(B, {
|
|
236
237
|
title: s("title"),
|
|
237
238
|
description: s("description"),
|
|
238
239
|
children: [
|
|
239
|
-
/* @__PURE__ */ q(
|
|
240
|
+
/* @__PURE__ */ q(z, {
|
|
240
241
|
label: s("form"),
|
|
241
242
|
helpText: i.triageEnabled ? s("formHelp") : s("needsTriage"),
|
|
242
|
-
children: /* @__PURE__ */ q(
|
|
243
|
+
children: /* @__PURE__ */ q(V, {
|
|
243
244
|
"aria-label": s("form"),
|
|
244
245
|
checked: _,
|
|
245
246
|
disabled: x || !i.triageEnabled && !_,
|
|
@@ -249,14 +250,14 @@ function ie({ workspace: r, team: i, isAdmin: a }) {
|
|
|
249
250
|
})
|
|
250
251
|
})
|
|
251
252
|
}),
|
|
252
|
-
_ && y && /* @__PURE__ */ q(
|
|
253
|
+
_ && y && /* @__PURE__ */ q(z, {
|
|
253
254
|
label: s("link"),
|
|
254
255
|
children: /* @__PURE__ */ J("div", {
|
|
255
256
|
className: "flex min-w-0 items-center gap-2",
|
|
256
257
|
children: [/* @__PURE__ */ q("code", {
|
|
257
258
|
className: "min-w-0 truncate text-xs",
|
|
258
259
|
children: y
|
|
259
|
-
}), /* @__PURE__ */ q(
|
|
260
|
+
}), /* @__PURE__ */ q(P, {
|
|
260
261
|
text: y,
|
|
261
262
|
label: s("copyLink"),
|
|
262
263
|
size: "sm",
|
|
@@ -264,10 +265,10 @@ function ie({ workspace: r, team: i, isAdmin: a }) {
|
|
|
264
265
|
})]
|
|
265
266
|
})
|
|
266
267
|
}),
|
|
267
|
-
/* @__PURE__ */ q(
|
|
268
|
+
/* @__PURE__ */ q(z, {
|
|
268
269
|
label: s("email"),
|
|
269
270
|
helpText: d?.intakeDomain ? s("emailHelp") : s("noDomain"),
|
|
270
|
-
children: /* @__PURE__ */ q(
|
|
271
|
+
children: /* @__PURE__ */ q(V, {
|
|
271
272
|
"aria-label": s("email"),
|
|
272
273
|
checked: v,
|
|
273
274
|
disabled: x || !d?.intakeDomain || !i.triageEnabled && !v,
|
|
@@ -277,14 +278,14 @@ function ie({ workspace: r, team: i, isAdmin: a }) {
|
|
|
277
278
|
})
|
|
278
279
|
})
|
|
279
280
|
}),
|
|
280
|
-
v && b && /* @__PURE__ */ q(
|
|
281
|
+
v && b && /* @__PURE__ */ q(z, {
|
|
281
282
|
label: s("address"),
|
|
282
283
|
children: /* @__PURE__ */ J("div", {
|
|
283
284
|
className: "flex min-w-0 items-center gap-2",
|
|
284
285
|
children: [/* @__PURE__ */ q("code", {
|
|
285
286
|
className: "min-w-0 truncate text-xs",
|
|
286
287
|
children: b
|
|
287
|
-
}), /* @__PURE__ */ q(
|
|
288
|
+
}), /* @__PURE__ */ q(P, {
|
|
288
289
|
text: b,
|
|
289
290
|
label: s("copyAddress"),
|
|
290
291
|
size: "sm",
|
|
@@ -292,22 +293,22 @@ function ie({ workspace: r, team: i, isAdmin: a }) {
|
|
|
292
293
|
})]
|
|
293
294
|
})
|
|
294
295
|
}),
|
|
295
|
-
g && a && /* @__PURE__ */ q(
|
|
296
|
+
g && a && /* @__PURE__ */ q(z, {
|
|
296
297
|
label: s("rotate"),
|
|
297
298
|
helpText: s("rotateHelp"),
|
|
298
|
-
children: /* @__PURE__ */ q(
|
|
299
|
+
children: /* @__PURE__ */ q(j, {
|
|
299
300
|
size: "sm",
|
|
300
301
|
loading: h.isPending,
|
|
301
302
|
onClick: () => h.mutate(),
|
|
302
303
|
children: s("rotateButton")
|
|
303
304
|
})
|
|
304
305
|
}),
|
|
305
|
-
S && /* @__PURE__ */ q(
|
|
306
|
+
S && /* @__PURE__ */ q(F, { children: c(S) })
|
|
306
307
|
]
|
|
307
308
|
});
|
|
308
309
|
}
|
|
309
|
-
function
|
|
310
|
-
let a =
|
|
310
|
+
function oe({ workspace: e, team: r, isAdmin: i }) {
|
|
311
|
+
let a = K("planning.sla"), o = K("priority"), s = G(), c = Z(), u = Y({
|
|
311
312
|
mutationFn: async (i) => n(await t.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
|
|
312
313
|
params: { path: {
|
|
313
314
|
workspace: e,
|
|
@@ -326,7 +327,7 @@ function ae({ workspace: e, team: r, isAdmin: i }) {
|
|
|
326
327
|
168,
|
|
327
328
|
336
|
|
328
329
|
], 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 });
|
|
329
|
-
return /* @__PURE__ */ J(
|
|
330
|
+
return /* @__PURE__ */ J(B, {
|
|
330
331
|
title: a("title"),
|
|
331
332
|
description: a("description"),
|
|
332
333
|
children: [[
|
|
@@ -334,11 +335,11 @@ function ae({ workspace: e, team: r, isAdmin: i }) {
|
|
|
334
335
|
"high",
|
|
335
336
|
"medium",
|
|
336
337
|
"low"
|
|
337
|
-
].map((e) => /* @__PURE__ */ q(
|
|
338
|
+
].map((e) => /* @__PURE__ */ q(z, {
|
|
338
339
|
label: o(e),
|
|
339
340
|
children: /* @__PURE__ */ q("div", {
|
|
340
341
|
className: "w-40",
|
|
341
|
-
children: /* @__PURE__ */ q(
|
|
342
|
+
children: /* @__PURE__ */ q(R, {
|
|
342
343
|
width: "fill",
|
|
343
344
|
"aria-label": a("target", { priority: o(e) }),
|
|
344
345
|
value: String(r.slaHours[e]),
|
|
@@ -353,11 +354,11 @@ function ae({ workspace: e, team: r, isAdmin: i }) {
|
|
|
353
354
|
}))
|
|
354
355
|
})
|
|
355
356
|
})
|
|
356
|
-
}, e)), u.isError && /* @__PURE__ */ q(
|
|
357
|
+
}, e)), u.isError && /* @__PURE__ */ q(F, { children: s(u.error) })]
|
|
357
358
|
});
|
|
358
359
|
}
|
|
359
|
-
function
|
|
360
|
-
let a =
|
|
360
|
+
function se({ workspace: e, team: r, isAdmin: i }) {
|
|
361
|
+
let a = K("planning.settings"), o = G(), s = Z(), c = Y({
|
|
361
362
|
mutationFn: async (i) => n(await t.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
|
|
362
363
|
params: { path: {
|
|
363
364
|
workspace: e,
|
|
@@ -374,39 +375,39 @@ function oe({ workspace: e, team: r, isAdmin: i }) {
|
|
|
374
375
|
] });
|
|
375
376
|
}
|
|
376
377
|
}), u = !i || c.isPending, d = (e) => c.isError && c.variables && e in c.variables ? o(c.error) : null;
|
|
377
|
-
return /* @__PURE__ */ J(
|
|
378
|
+
return /* @__PURE__ */ J(B, {
|
|
378
379
|
title: a("title"),
|
|
379
380
|
description: a("description"),
|
|
380
381
|
children: [
|
|
381
|
-
/* @__PURE__ */ q(
|
|
382
|
+
/* @__PURE__ */ q(z, {
|
|
382
383
|
label: a("triage"),
|
|
383
384
|
helpText: a("triageHelp"),
|
|
384
385
|
error: d("triageEnabled"),
|
|
385
|
-
children: /* @__PURE__ */ q(
|
|
386
|
+
children: /* @__PURE__ */ q(V, {
|
|
386
387
|
"aria-label": a("triage"),
|
|
387
388
|
checked: r.triageEnabled,
|
|
388
389
|
disabled: u,
|
|
389
390
|
onCheckedChange: (e) => c.mutate({ triageEnabled: e })
|
|
390
391
|
})
|
|
391
392
|
}),
|
|
392
|
-
/* @__PURE__ */ q(
|
|
393
|
+
/* @__PURE__ */ q(z, {
|
|
393
394
|
label: a("customerRequests"),
|
|
394
395
|
helpText: a("customerRequestsHelp"),
|
|
395
396
|
error: d("customerRequestsEnabled"),
|
|
396
|
-
children: /* @__PURE__ */ q(
|
|
397
|
+
children: /* @__PURE__ */ q(V, {
|
|
397
398
|
"aria-label": a("customerRequests"),
|
|
398
399
|
checked: r.customerRequestsEnabled,
|
|
399
400
|
disabled: u,
|
|
400
401
|
onCheckedChange: (e) => c.mutate({ customerRequestsEnabled: e })
|
|
401
402
|
})
|
|
402
403
|
}),
|
|
403
|
-
/* @__PURE__ */ q(
|
|
404
|
+
/* @__PURE__ */ q(z, {
|
|
404
405
|
label: a("autoClose"),
|
|
405
406
|
helpText: a("autoCloseHelp"),
|
|
406
407
|
error: d("autoCloseDays"),
|
|
407
408
|
children: /* @__PURE__ */ q("div", {
|
|
408
409
|
className: "w-40",
|
|
409
|
-
children: /* @__PURE__ */ q(
|
|
410
|
+
children: /* @__PURE__ */ q(R, {
|
|
410
411
|
width: "fill",
|
|
411
412
|
"aria-label": a("autoClose"),
|
|
412
413
|
value: String(r.autoCloseDays),
|
|
@@ -426,13 +427,13 @@ function oe({ workspace: e, team: r, isAdmin: i }) {
|
|
|
426
427
|
})
|
|
427
428
|
})
|
|
428
429
|
}),
|
|
429
|
-
/* @__PURE__ */ q(
|
|
430
|
+
/* @__PURE__ */ q(z, {
|
|
430
431
|
label: a("autoArchive"),
|
|
431
432
|
helpText: a("autoArchiveHelp"),
|
|
432
433
|
error: d("autoArchiveDays"),
|
|
433
434
|
children: /* @__PURE__ */ q("div", {
|
|
434
435
|
className: "w-40",
|
|
435
|
-
children: /* @__PURE__ */ q(
|
|
436
|
+
children: /* @__PURE__ */ q(R, {
|
|
436
437
|
width: "fill",
|
|
437
438
|
"aria-label": a("autoArchive"),
|
|
438
439
|
value: String(r.autoArchiveDays),
|
|
@@ -452,24 +453,24 @@ function oe({ workspace: e, team: r, isAdmin: i }) {
|
|
|
452
453
|
})
|
|
453
454
|
})
|
|
454
455
|
}),
|
|
455
|
-
/* @__PURE__ */ q(
|
|
456
|
+
/* @__PURE__ */ q(z, {
|
|
456
457
|
label: a("cycles"),
|
|
457
458
|
helpText: a("cyclesHelp"),
|
|
458
459
|
error: d("cyclesEnabled"),
|
|
459
|
-
children: /* @__PURE__ */ q(
|
|
460
|
+
children: /* @__PURE__ */ q(V, {
|
|
460
461
|
"aria-label": a("cycles"),
|
|
461
462
|
checked: r.cyclesEnabled,
|
|
462
463
|
disabled: u,
|
|
463
464
|
onCheckedChange: (e) => c.mutate({ cyclesEnabled: e })
|
|
464
465
|
})
|
|
465
466
|
}),
|
|
466
|
-
/* @__PURE__ */ q(
|
|
467
|
+
/* @__PURE__ */ q(z, {
|
|
467
468
|
label: a("cycleLength"),
|
|
468
469
|
helpText: a("cycleLengthHelp"),
|
|
469
470
|
error: d("cycleWeeks"),
|
|
470
471
|
children: /* @__PURE__ */ q("div", {
|
|
471
472
|
className: "w-36",
|
|
472
|
-
children: /* @__PURE__ */ q(
|
|
473
|
+
children: /* @__PURE__ */ q(R, {
|
|
473
474
|
width: "fill",
|
|
474
475
|
"aria-label": a("cycleLength"),
|
|
475
476
|
value: r.cycleWeeks,
|
|
@@ -486,13 +487,13 @@ function oe({ workspace: e, team: r, isAdmin: i }) {
|
|
|
486
487
|
})
|
|
487
488
|
})
|
|
488
489
|
}),
|
|
489
|
-
/* @__PURE__ */ q(
|
|
490
|
+
/* @__PURE__ */ q(z, {
|
|
490
491
|
label: a("upcomingCycles"),
|
|
491
492
|
helpText: a("upcomingCyclesHelp"),
|
|
492
493
|
error: d("cycleUpcoming"),
|
|
493
494
|
children: /* @__PURE__ */ q("div", {
|
|
494
495
|
className: "w-36",
|
|
495
|
-
children: /* @__PURE__ */ q(
|
|
496
|
+
children: /* @__PURE__ */ q(R, {
|
|
496
497
|
width: "fill",
|
|
497
498
|
"aria-label": a("upcomingCycles"),
|
|
498
499
|
value: r.cycleUpcoming,
|
|
@@ -514,24 +515,24 @@ function oe({ workspace: e, team: r, isAdmin: i }) {
|
|
|
514
515
|
})
|
|
515
516
|
})
|
|
516
517
|
}),
|
|
517
|
-
/* @__PURE__ */ q(
|
|
518
|
+
/* @__PURE__ */ q(z, {
|
|
518
519
|
label: a("autoAdd"),
|
|
519
520
|
helpText: a("autoAddHelp"),
|
|
520
521
|
error: d("cycleAutoAdd"),
|
|
521
|
-
children: /* @__PURE__ */ q(
|
|
522
|
+
children: /* @__PURE__ */ q(V, {
|
|
522
523
|
"aria-label": a("autoAdd"),
|
|
523
524
|
checked: r.cycleAutoAdd,
|
|
524
525
|
disabled: u,
|
|
525
526
|
onCheckedChange: (e) => c.mutate({ cycleAutoAdd: e })
|
|
526
527
|
})
|
|
527
528
|
}),
|
|
528
|
-
/* @__PURE__ */ q(
|
|
529
|
+
/* @__PURE__ */ q(z, {
|
|
529
530
|
label: a("estimates"),
|
|
530
531
|
helpText: a("estimatesHelp"),
|
|
531
532
|
error: d("estimateScale"),
|
|
532
533
|
children: /* @__PURE__ */ q("div", {
|
|
533
534
|
className: "w-44",
|
|
534
|
-
children: /* @__PURE__ */ q(
|
|
535
|
+
children: /* @__PURE__ */ q(R, {
|
|
535
536
|
width: "fill",
|
|
536
537
|
"aria-label": a("estimates"),
|
|
537
538
|
value: r.estimateScale,
|
|
@@ -561,8 +562,8 @@ var $ = [
|
|
|
561
562
|
"merge",
|
|
562
563
|
"release"
|
|
563
564
|
];
|
|
564
|
-
function
|
|
565
|
-
let o =
|
|
565
|
+
function ce({ workspace: e, team: r, isAdmin: i }) {
|
|
566
|
+
let o = K("flow"), s = G(), c = Z(), { data: u = [] } = X(a(e)), d = Y({
|
|
566
567
|
mutationFn: async (i) => n(await t.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
|
|
567
568
|
params: { path: {
|
|
568
569
|
workspace: e,
|
|
@@ -589,35 +590,44 @@ function se({ workspace: e, team: r, isAdmin: i }) {
|
|
|
589
590
|
body: { draftPullRequests: i }
|
|
590
591
|
})),
|
|
591
592
|
onSettled: () => c.invalidateQueries({ queryKey: l(e).queryKey })
|
|
592
|
-
}), m = (
|
|
593
|
-
|
|
594
|
-
|
|
593
|
+
}), m = Y({
|
|
594
|
+
mutationFn: async (i) => n(await t.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
|
|
595
|
+
params: { path: {
|
|
596
|
+
workspace: e,
|
|
597
|
+
key: r.key
|
|
598
|
+
} },
|
|
599
|
+
body: { pullRequestsAsAssigner: i }
|
|
600
|
+
})),
|
|
601
|
+
onSettled: () => c.invalidateQueries({ queryKey: l(e).queryKey })
|
|
602
|
+
}), h = (e) => r.flow.find((t) => t.stage === e), [g, _] = W(null), v = (e, t) => {
|
|
603
|
+
_(e), d.mutate($.flatMap((n) => {
|
|
604
|
+
let r = h(n);
|
|
595
605
|
return n === e ? t.on ? [{
|
|
596
606
|
stage: n,
|
|
597
607
|
...t.agentId && { agentId: t.agentId }
|
|
598
608
|
}] : [] : r ? [r] : [];
|
|
599
609
|
}));
|
|
600
|
-
},
|
|
601
|
-
return /* @__PURE__ */ J(
|
|
610
|
+
}, y = !i || d.isPending;
|
|
611
|
+
return /* @__PURE__ */ J(B, {
|
|
602
612
|
title: o("title"),
|
|
603
613
|
description: o("description"),
|
|
604
614
|
children: [
|
|
605
615
|
$.map((e) => {
|
|
606
|
-
let t =
|
|
607
|
-
return /* @__PURE__ */ q(
|
|
616
|
+
let t = h(e), n = u.filter((t) => !t.archivedAt && (e !== "review" || t.maxRole === "viewer"));
|
|
617
|
+
return /* @__PURE__ */ q(z, {
|
|
608
618
|
label: o(`stages.${e}`),
|
|
609
619
|
helpText: o(`help.${e}`),
|
|
610
|
-
error: d.isError &&
|
|
620
|
+
error: d.isError && g === e ? s(d.error) : null,
|
|
611
621
|
children: /* @__PURE__ */ J("div", {
|
|
612
622
|
className: "flex items-center gap-3",
|
|
613
623
|
children: [t && /* @__PURE__ */ q("div", {
|
|
614
624
|
className: "w-44",
|
|
615
|
-
children: /* @__PURE__ */ q(
|
|
625
|
+
children: /* @__PURE__ */ q(R, {
|
|
616
626
|
width: "fill",
|
|
617
627
|
"aria-label": o("agentFor", { stage: o(`stages.${e}`) }),
|
|
618
628
|
value: t.agentId ?? "",
|
|
619
|
-
disabled:
|
|
620
|
-
onValueChange: (t) =>
|
|
629
|
+
disabled: y,
|
|
630
|
+
onValueChange: (t) => v(e, {
|
|
621
631
|
on: !0,
|
|
622
632
|
agentId: t ?? ""
|
|
623
633
|
}),
|
|
@@ -629,51 +639,62 @@ function se({ workspace: e, team: r, isAdmin: i }) {
|
|
|
629
639
|
label: e.name
|
|
630
640
|
}))]
|
|
631
641
|
})
|
|
632
|
-
}), /* @__PURE__ */ q(
|
|
642
|
+
}), /* @__PURE__ */ q(V, {
|
|
633
643
|
"aria-label": o(`stages.${e}`),
|
|
634
644
|
checked: !!t,
|
|
635
|
-
disabled:
|
|
636
|
-
onCheckedChange: (t) =>
|
|
645
|
+
disabled: y,
|
|
646
|
+
onCheckedChange: (t) => v(e, { on: t })
|
|
637
647
|
})]
|
|
638
648
|
})
|
|
639
649
|
}, e);
|
|
640
650
|
}),
|
|
641
|
-
|
|
651
|
+
h("release") && /* @__PURE__ */ q(z, {
|
|
642
652
|
label: o("releaseTargets"),
|
|
643
653
|
helpText: o("releaseTargetsHelp"),
|
|
644
|
-
children: /* @__PURE__ */ q(
|
|
654
|
+
children: /* @__PURE__ */ q(le, {
|
|
645
655
|
workspace: e,
|
|
646
656
|
team: r,
|
|
647
657
|
disabled: !i
|
|
648
658
|
})
|
|
649
659
|
}),
|
|
650
|
-
/* @__PURE__ */ q(
|
|
660
|
+
/* @__PURE__ */ q(z, {
|
|
651
661
|
label: o("autoMerge"),
|
|
652
662
|
helpText: o("autoMergeHelp"),
|
|
653
663
|
error: f.isError ? s(f.error) : null,
|
|
654
|
-
children: /* @__PURE__ */ q(
|
|
664
|
+
children: /* @__PURE__ */ q(V, {
|
|
655
665
|
"aria-label": o("autoMerge"),
|
|
656
666
|
checked: r.autoMerge,
|
|
657
667
|
disabled: !i || f.isPending,
|
|
658
668
|
onCheckedChange: (e) => f.mutate(e)
|
|
659
669
|
})
|
|
660
670
|
}),
|
|
661
|
-
/* @__PURE__ */ q(
|
|
671
|
+
/* @__PURE__ */ q(z, {
|
|
662
672
|
label: o("draftPullRequests"),
|
|
663
673
|
helpText: o("draftPullRequestsHelp"),
|
|
664
674
|
error: p.isError ? s(p.error) : null,
|
|
665
|
-
children: /* @__PURE__ */ q(
|
|
675
|
+
children: /* @__PURE__ */ q(V, {
|
|
666
676
|
"aria-label": o("draftPullRequests"),
|
|
667
677
|
checked: r.draftPullRequests,
|
|
668
678
|
disabled: !i || p.isPending,
|
|
669
679
|
onCheckedChange: (e) => p.mutate(e)
|
|
670
680
|
})
|
|
681
|
+
}),
|
|
682
|
+
/* @__PURE__ */ q(z, {
|
|
683
|
+
label: o("pullRequestsAsAssigner"),
|
|
684
|
+
helpText: o("pullRequestsAsAssignerHelp"),
|
|
685
|
+
error: m.isError ? s(m.error) : null,
|
|
686
|
+
children: /* @__PURE__ */ q(V, {
|
|
687
|
+
"aria-label": o("pullRequestsAsAssigner"),
|
|
688
|
+
checked: r.pullRequestsAsAssigner,
|
|
689
|
+
disabled: !i || m.isPending,
|
|
690
|
+
onCheckedChange: (e) => m.mutate(e)
|
|
691
|
+
})
|
|
671
692
|
})
|
|
672
693
|
]
|
|
673
694
|
});
|
|
674
695
|
}
|
|
675
|
-
function
|
|
676
|
-
let a =
|
|
696
|
+
function le({ workspace: e, team: r, disabled: i }) {
|
|
697
|
+
let a = K("flow"), o = G(), s = Z(), [c, u] = W(r.releaseTargets.join(", ")), d = Y({
|
|
677
698
|
mutationFn: async (i) => n(await t.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
|
|
678
699
|
params: { path: {
|
|
679
700
|
workspace: e,
|
|
@@ -688,7 +709,7 @@ function ce({ workspace: e, team: r, disabled: i }) {
|
|
|
688
709
|
};
|
|
689
710
|
return /* @__PURE__ */ q("div", {
|
|
690
711
|
className: "w-64",
|
|
691
|
-
children: /* @__PURE__ */ q(
|
|
712
|
+
children: /* @__PURE__ */ q(I, {
|
|
692
713
|
"aria-label": a("releaseTargets"),
|
|
693
714
|
value: c,
|
|
694
715
|
disabled: i,
|
|
@@ -700,8 +721,8 @@ function ce({ workspace: e, team: r, disabled: i }) {
|
|
|
700
721
|
})
|
|
701
722
|
});
|
|
702
723
|
}
|
|
703
|
-
function
|
|
704
|
-
let a =
|
|
724
|
+
function ue({ workspace: e, team: r, isAdmin: i }) {
|
|
725
|
+
let a = K("team"), o = G(), s = Z(), c = Y({
|
|
705
726
|
mutationFn: async (i) => n(await t.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
|
|
706
727
|
params: { path: {
|
|
707
728
|
workspace: e,
|
|
@@ -711,14 +732,14 @@ function le({ workspace: e, team: r, isAdmin: i }) {
|
|
|
711
732
|
})),
|
|
712
733
|
onSettled: () => s.invalidateQueries({ queryKey: l(e).queryKey })
|
|
713
734
|
});
|
|
714
|
-
return /* @__PURE__ */ q(
|
|
735
|
+
return /* @__PURE__ */ q(B, {
|
|
715
736
|
title: a("agentQuestions"),
|
|
716
737
|
description: a("agentQuestionsDescription"),
|
|
717
|
-
children: /* @__PURE__ */ q(
|
|
738
|
+
children: /* @__PURE__ */ q(z, {
|
|
718
739
|
label: a("requireKnownTerms"),
|
|
719
740
|
helpText: a("requireKnownTermsHelp"),
|
|
720
741
|
error: c.isError ? o(c.error) : null,
|
|
721
|
-
children: /* @__PURE__ */ q(
|
|
742
|
+
children: /* @__PURE__ */ q(V, {
|
|
722
743
|
"aria-label": a("requireKnownTerms"),
|
|
723
744
|
checked: r.requireKnownTerms,
|
|
724
745
|
disabled: !i || c.isPending,
|
|
@@ -727,8 +748,8 @@ function le({ workspace: e, team: r, isAdmin: i }) {
|
|
|
727
748
|
})
|
|
728
749
|
});
|
|
729
750
|
}
|
|
730
|
-
function
|
|
731
|
-
let { data: s } = Q(c(e, r)), { data: l } = Q(o), { members:
|
|
751
|
+
function de({ workspace: e, teamKey: r, isAdmin: a }) {
|
|
752
|
+
let { data: s } = Q(c(e, r)), { data: l } = Q(o), { members: u, person: p } = h(e), m = Z(), g = U(), _ = i(), [v, b] = W(null), x = K("team"), S = G(), C = K("common"), w = Y({
|
|
732
753
|
mutationFn: async (i) => {
|
|
733
754
|
for (let { username: a, add: o } of i) {
|
|
734
755
|
let i = { params: { path: {
|
|
@@ -741,7 +762,7 @@ function ue({ workspace: e, teamKey: r, isAdmin: a }) {
|
|
|
741
762
|
},
|
|
742
763
|
onMutate: () => b(null),
|
|
743
764
|
onError: (e) => b(S(e)),
|
|
744
|
-
onSettled: () =>
|
|
765
|
+
onSettled: () => m.invalidateQueries({ queryKey: c(e, r).queryKey })
|
|
745
766
|
}), T = (e) => w.mutate([...e.filter((e) => !s.includes(e)).map((e) => ({
|
|
746
767
|
username: e,
|
|
747
768
|
add: !0
|
|
@@ -749,13 +770,13 @@ function ue({ workspace: e, teamKey: r, isAdmin: a }) {
|
|
|
749
770
|
username: e,
|
|
750
771
|
add: !1
|
|
751
772
|
}))]), E = l?.user.username ?? "", D = s.includes(E);
|
|
752
|
-
return /* @__PURE__ */ J(
|
|
773
|
+
return /* @__PURE__ */ J(L, {
|
|
753
774
|
variant: "bare",
|
|
754
775
|
headingLevel: 2,
|
|
755
776
|
collapsible: !1,
|
|
756
777
|
title: x("members"),
|
|
757
778
|
description: x("membersDescription"),
|
|
758
|
-
actions: /* @__PURE__ */ J(
|
|
779
|
+
actions: /* @__PURE__ */ J(ne, { children: [!D && /* @__PURE__ */ q(j, {
|
|
759
780
|
type: "button",
|
|
760
781
|
size: "sm",
|
|
761
782
|
variant: "primary",
|
|
@@ -764,13 +785,13 @@ function ue({ workspace: e, teamKey: r, isAdmin: a }) {
|
|
|
764
785
|
add: !0
|
|
765
786
|
}]),
|
|
766
787
|
children: x("join")
|
|
767
|
-
}), a && /* @__PURE__ */ q(
|
|
788
|
+
}), a && /* @__PURE__ */ q(N, {
|
|
768
789
|
multiple: !0,
|
|
769
|
-
items:
|
|
790
|
+
items: u.map((e) => ({
|
|
770
791
|
value: e.user.username,
|
|
771
792
|
label: e.user.name,
|
|
772
793
|
hint: e.user.email,
|
|
773
|
-
icon: /* @__PURE__ */ q(
|
|
794
|
+
icon: /* @__PURE__ */ q(A, {
|
|
774
795
|
name: e.user.name,
|
|
775
796
|
src: e.user.avatarUrl,
|
|
776
797
|
size: "xs",
|
|
@@ -782,18 +803,18 @@ function ue({ workspace: e, teamKey: r, isAdmin: a }) {
|
|
|
782
803
|
align: "end",
|
|
783
804
|
placeholder: x("addPlaceholder"),
|
|
784
805
|
"aria-label": x("addMember"),
|
|
785
|
-
trigger: /* @__PURE__ */ J(
|
|
806
|
+
trigger: /* @__PURE__ */ J(j, {
|
|
786
807
|
type: "button",
|
|
787
808
|
size: "sm",
|
|
788
809
|
loading: w.isPending,
|
|
789
810
|
children: [
|
|
790
|
-
/* @__PURE__ */ q(
|
|
811
|
+
/* @__PURE__ */ q(f, { className: "size-3.5" }),
|
|
791
812
|
" ",
|
|
792
813
|
x("addMember")
|
|
793
814
|
]
|
|
794
815
|
})
|
|
795
816
|
})] }),
|
|
796
|
-
children: [/* @__PURE__ */ J(
|
|
817
|
+
children: [/* @__PURE__ */ J(M, {
|
|
797
818
|
size: "fill",
|
|
798
819
|
padding: "none",
|
|
799
820
|
divided: !0,
|
|
@@ -812,8 +833,8 @@ function ue({ workspace: e, teamKey: r, isAdmin: a }) {
|
|
|
812
833
|
search: { assignee: t }
|
|
813
834
|
})
|
|
814
835
|
},
|
|
815
|
-
|
|
816
|
-
...a || t === E ? [
|
|
836
|
+
d(C("copyEmail"), p(t).email ?? ""),
|
|
837
|
+
...a || t === E ? [H, {
|
|
817
838
|
label: x(t === E ? "leaveTeam" : "removeFromTeam"),
|
|
818
839
|
destructive: !0,
|
|
819
840
|
onClick: () => w.mutate([{
|
|
@@ -824,10 +845,10 @@ function ue({ workspace: e, teamKey: r, isAdmin: a }) {
|
|
|
824
845
|
]),
|
|
825
846
|
className: "flex items-center gap-3 px-3 py-2 text-sm",
|
|
826
847
|
children: [
|
|
827
|
-
/* @__PURE__ */ q(
|
|
848
|
+
/* @__PURE__ */ q(y, {
|
|
828
849
|
workspace: e,
|
|
829
850
|
handle: t,
|
|
830
|
-
children: /* @__PURE__ */ q(
|
|
851
|
+
children: /* @__PURE__ */ q(A, {
|
|
831
852
|
name: p(t).name,
|
|
832
853
|
src: p(t).avatarUrl,
|
|
833
854
|
size: "md"
|
|
@@ -854,15 +875,15 @@ function ue({ workspace: e, teamKey: r, isAdmin: a }) {
|
|
|
854
875
|
className: "px-3 py-2 text-sm text-muted-foreground",
|
|
855
876
|
children: x("noMembers")
|
|
856
877
|
})]
|
|
857
|
-
}), /* @__PURE__ */ q(
|
|
878
|
+
}), /* @__PURE__ */ q(F, {
|
|
858
879
|
size: "md",
|
|
859
880
|
className: "mt-2",
|
|
860
|
-
children:
|
|
881
|
+
children: v
|
|
861
882
|
})]
|
|
862
883
|
});
|
|
863
884
|
}
|
|
864
|
-
function
|
|
865
|
-
let { data: i } = Q(s(e, r)), { data: a } = Q(l(e)), o = Z(), c =
|
|
885
|
+
function fe({ workspace: e, teamKey: r }) {
|
|
886
|
+
let { data: i } = Q(s(e, r)), { data: a } = Q(l(e)), o = Z(), c = K("team"), d = Y({
|
|
866
887
|
mutationFn: async (i) => n(await t.PUT("/api/v1/workspaces/{workspace}/teams/{key}/access", {
|
|
867
888
|
params: { path: {
|
|
868
889
|
workspace: e,
|
|
@@ -881,43 +902,38 @@ function de({ workspace: e, teamKey: r }) {
|
|
|
881
902
|
})),
|
|
882
903
|
onSuccess: (t) => o.setQueryData(s(e, r).queryKey, t),
|
|
883
904
|
onSettled: () => {
|
|
884
|
-
o.invalidateQueries({ queryKey: s(e, r).queryKey }), o.invalidateQueries({ queryKey: l(e).queryKey }), o
|
|
885
|
-
"workspace",
|
|
886
|
-
e,
|
|
887
|
-
"issues",
|
|
888
|
-
"list"
|
|
889
|
-
] });
|
|
905
|
+
o.invalidateQueries({ queryKey: s(e, r).queryKey }), o.invalidateQueries({ queryKey: l(e).queryKey }), u(o, e);
|
|
890
906
|
}
|
|
891
907
|
});
|
|
892
|
-
return /* @__PURE__ */ q(
|
|
908
|
+
return /* @__PURE__ */ q(L, {
|
|
893
909
|
variant: "bare",
|
|
894
910
|
headingLevel: 2,
|
|
895
911
|
collapsible: !1,
|
|
896
912
|
title: c("access"),
|
|
897
913
|
description: c("accessDescription"),
|
|
898
|
-
children: /* @__PURE__ */ q(
|
|
914
|
+
children: /* @__PURE__ */ q(C, {
|
|
899
915
|
workspace: e,
|
|
900
916
|
resourceName: a.find((e) => e.key === r)?.name ?? r,
|
|
901
917
|
access: i,
|
|
902
|
-
save: (e) =>
|
|
918
|
+
save: (e) => d.mutateAsync(e),
|
|
903
919
|
openLabel: c("everyone"),
|
|
904
920
|
rules: [{
|
|
905
921
|
id: "admins",
|
|
906
|
-
icon: /* @__PURE__ */ q(
|
|
922
|
+
icon: /* @__PURE__ */ q(p, { className: "size-4" }),
|
|
907
923
|
title: c("admins"),
|
|
908
924
|
detail: c("adminsDetail"),
|
|
909
925
|
roleId: "admin"
|
|
910
926
|
}, ...i.restricted ? [] : [{
|
|
911
927
|
id: "everyone",
|
|
912
|
-
icon: /* @__PURE__ */ q(
|
|
928
|
+
icon: /* @__PURE__ */ q(m, { className: "size-4" }),
|
|
913
929
|
title: c("everyone"),
|
|
914
930
|
detail: c("everyoneDetail")
|
|
915
931
|
}]]
|
|
916
932
|
})
|
|
917
933
|
});
|
|
918
934
|
}
|
|
919
|
-
function
|
|
920
|
-
let i =
|
|
935
|
+
function pe({ workspace: e, team: r }) {
|
|
936
|
+
let i = K("team"), a = Z(), o = G(), { confirm: s, dialog: c } = _(), u = !!r.archivedAt, d = Y({
|
|
921
937
|
mutationFn: async (i) => n(await t.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
|
|
922
938
|
params: { path: {
|
|
923
939
|
workspace: e,
|
|
@@ -932,7 +948,7 @@ function fe({ workspace: e, team: r }) {
|
|
|
932
948
|
confirmLabel: i("archive"),
|
|
933
949
|
onConfirm: () => d.mutateAsync(!0)
|
|
934
950
|
});
|
|
935
|
-
return /* @__PURE__ */ J(
|
|
951
|
+
return /* @__PURE__ */ J(L, {
|
|
936
952
|
variant: "card",
|
|
937
953
|
...!u && { tone: "error" },
|
|
938
954
|
collapsible: !1,
|
|
@@ -940,31 +956,31 @@ function fe({ workspace: e, team: r }) {
|
|
|
940
956
|
title: i(u ? "archived" : "dangerZone"),
|
|
941
957
|
description: i(u ? "archivedDetail" : "archiveDetail"),
|
|
942
958
|
children: [
|
|
943
|
-
u ? /* @__PURE__ */ q(
|
|
959
|
+
u ? /* @__PURE__ */ q(j, {
|
|
944
960
|
onClick: () => d.mutate(!1),
|
|
945
961
|
loading: d.isPending,
|
|
946
962
|
children: i("restore")
|
|
947
|
-
}) : /* @__PURE__ */ q(
|
|
963
|
+
}) : /* @__PURE__ */ q(j, {
|
|
948
964
|
variant: "danger",
|
|
949
965
|
onClick: f,
|
|
950
966
|
loading: d.isPending,
|
|
951
967
|
children: i("archive")
|
|
952
968
|
}),
|
|
953
|
-
d.error && !d.variables && /* @__PURE__ */ q(
|
|
969
|
+
d.error && !d.variables && /* @__PURE__ */ q(F, {
|
|
954
970
|
size: "md",
|
|
955
971
|
className: "mt-3",
|
|
956
972
|
children: o(d.error)
|
|
957
973
|
}),
|
|
958
974
|
c,
|
|
959
|
-
/* @__PURE__ */ q(
|
|
975
|
+
/* @__PURE__ */ q(me, {
|
|
960
976
|
workspace: e,
|
|
961
977
|
team: r
|
|
962
978
|
})
|
|
963
979
|
]
|
|
964
980
|
});
|
|
965
981
|
}
|
|
966
|
-
function
|
|
967
|
-
let a =
|
|
982
|
+
function me({ workspace: e, team: r }) {
|
|
983
|
+
let a = K("team"), o = Z(), s = i(), c = G(), [u, d] = W(!1), [f, p] = W(""), [m, h] = W(null), g = Y({
|
|
968
984
|
mutationFn: async () => n(await t.DELETE("/api/v1/workspaces/{workspace}/teams/{key}", { params: { path: {
|
|
969
985
|
workspace: e,
|
|
970
986
|
key: r.key
|
|
@@ -988,13 +1004,13 @@ function pe({ workspace: e, team: r }) {
|
|
|
988
1004
|
className: "mt-1 text-sm text-muted-foreground",
|
|
989
1005
|
children: a("deleteDetail")
|
|
990
1006
|
}),
|
|
991
|
-
/* @__PURE__ */ q(
|
|
1007
|
+
/* @__PURE__ */ q(j, {
|
|
992
1008
|
variant: "danger",
|
|
993
1009
|
className: "mt-3",
|
|
994
1010
|
onClick: () => d(!0),
|
|
995
1011
|
children: a("delete")
|
|
996
1012
|
}),
|
|
997
|
-
/* @__PURE__ */ q(
|
|
1013
|
+
/* @__PURE__ */ q(ee, {
|
|
998
1014
|
open: u,
|
|
999
1015
|
onClose: () => {
|
|
1000
1016
|
d(!1), p(""), h(null);
|
|
@@ -1015,7 +1031,7 @@ function pe({ workspace: e, team: r }) {
|
|
|
1015
1031
|
children: [a.rich("deleteTypeKey", { key: () => /* @__PURE__ */ q("code", {
|
|
1016
1032
|
className: "font-mono",
|
|
1017
1033
|
children: r.key
|
|
1018
|
-
}) }), /* @__PURE__ */ q(
|
|
1034
|
+
}) }), /* @__PURE__ */ q(I, {
|
|
1019
1035
|
value: f,
|
|
1020
1036
|
onChange: (e) => p(e.target.value),
|
|
1021
1037
|
autoComplete: "off",
|
|
@@ -1027,4 +1043,4 @@ function pe({ workspace: e, team: r }) {
|
|
|
1027
1043
|
]
|
|
1028
1044
|
});
|
|
1029
1045
|
}
|
|
1030
|
-
export {
|
|
1046
|
+
export { re as component };
|