@parallelworks/tandem-web 0.171.1 → 0.171.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 +5 -2
- package/_virtual/_virtual_i18n/es/common.js +5 -2
- package/_virtual/_virtual_i18n/ja/common.js +5 -2
- package/_virtual/_virtual_i18n/ko/common.js +5 -2
- package/_virtual/_virtual_i18n/zh/common.js +5 -2
- package/components/AccessGrants.js +6 -6
- package/components/ActivityTimeline.js +60 -60
- package/components/ActorAvatar.js +4 -4
- package/components/ActorLink.js +34 -0
- package/components/AgentWork.js +494 -494
- package/components/AppLauncher.js +7 -7
- package/components/AreaLink.js +13 -13
- package/components/AreaTiles.js +13 -13
- package/components/AreaWork.js +22 -22
- package/components/Attachments.js +73 -69
- package/components/BlockHandle.js +3 -3
- package/components/BugRotation.js +8 -8
- package/components/CodeHostSettings.js +121 -87
- package/components/CollabEditor.js +13 -13
- package/components/CommandPalette.js +206 -206
- package/components/CustomFields.js +95 -95
- package/components/CustomerRequests.js +11 -11
- package/components/DashboardPanel.js +201 -164
- package/components/DateChip.js +21 -21
- package/components/DocHistory.js +14 -14
- package/components/DocIcon.js +4 -4
- package/components/DocIconPicker.js +4 -4
- package/components/DocLinkPicker.js +22 -22
- package/components/DocLook.js +16 -16
- package/components/DocProperties.js +81 -81
- package/components/DocTable.js +53 -53
- package/components/DocsTree.js +179 -179
- package/components/Editor.js +69 -69
- package/components/FavoritesNav.js +78 -78
- package/components/GitHub.js +87 -87
- package/components/Graph.js +14 -14
- package/components/HostActions.js +21 -21
- package/components/HostPanel.js +6 -6
- package/components/HoverCards.js +74 -74
- package/components/IssueBoard.js +13 -10
- package/components/IssueBreakdown.js +31 -31
- package/components/IssueCode.js +19 -19
- package/components/IssueEvent.js +97 -92
- package/components/IssueFilters.js +39 -39
- package/components/IssueGroup.js +16 -16
- package/components/IssueImport.js +13 -13
- package/components/IssueInsights.js +20 -20
- package/components/IssueListBlock.js +81 -81
- package/components/IssueRelations.js +34 -34
- package/components/IssueRow.js +31 -31
- package/components/IssueSentry.js +36 -34
- package/components/IssueTemplates.js +23 -23
- package/components/IssueTypes.js +40 -40
- package/components/MarkdownTransfer.js +10 -10
- package/components/MentionPicker.js +19 -19
- package/components/NewIssueDialog.js +53 -53
- package/components/NewProjectDialog.js +82 -82
- package/components/PersonActivity.js +13 -13
- package/components/PersonHoverCard.js +44 -44
- package/components/Planning.js +16 -16
- package/components/Reports.js +8 -8
- package/components/SettingsNav.js +15 -15
- package/components/ShareDialog.js +8 -8
- package/components/SharedViewer.js +23 -23
- package/components/SlashMenu.js +26 -26
- package/components/SubPages.js +10 -10
- package/components/TeamForm.js +9 -9
- package/components/TeamRepositories.js +21 -21
- package/components/TeamWorkflow.js +6 -6
- package/components/UnlinkedMentions.js +29 -29
- package/components/Updates.js +8 -8
- package/components/Widgets.js +99 -97
- package/components/WorkCounts.js +12 -12
- package/components/cycleCrumb.js +8 -8
- package/components/editorPlugins.js +101 -101
- package/components/settings.js +6 -6
- package/components/video.js +7 -7
- package/hostedApp.js +24 -24
- package/index.js +18 -18
- package/lib/assignees.js +3 -3
- package/lib/attachments.js +12 -12
- package/lib/boardMove.js +27 -27
- package/lib/collab.js +1 -1
- package/lib/docs.js +115 -115
- package/lib/githubLink.js +7 -7
- package/lib/issueList.js +51 -51
- package/lib/issueMenu.js +117 -117
- package/lib/knowledge.js +134 -134
- package/lib/live.js +38 -38
- package/lib/notifications.js +47 -47
- package/lib/triageSeen.js +2 -2
- package/lib/views.js +31 -31
- package/package.json +24 -24
- package/pages/area.js +64 -64
- package/pages/areas.js +199 -199
- package/pages/decisions.js +51 -51
- package/pages/issues.js +120 -120
- package/pages/projects.js +238 -238
- package/pages/triage.js +202 -212
- package/routes/_workspace/agents/_slug2.js +127 -127
- package/routes/_workspace/agents/index2.js +22 -22
- package/routes/_workspace/dashboards/_dashboardId2.js +84 -84
- package/routes/_workspace/dashboards/index2.js +34 -34
- package/routes/_workspace/docs/_doc2.js +267 -267
- package/routes/_workspace/docs/space2._space.js +31 -31
- package/routes/_workspace/docs2.js +4 -4
- package/routes/_workspace/graph2.js +11 -11
- package/routes/_workspace/graph3.js +11 -11
- package/routes/_workspace/issues/_identifier2.js +519 -522
- package/routes/_workspace/issues/index.js +13 -13
- package/routes/_workspace/knowledge/_term2.js +148 -146
- package/routes/_workspace/knowledge/_term3.js +4 -4
- package/routes/_workspace/knowledge/index.js +12 -12
- package/routes/_workspace/knowledge/index2.js +117 -115
- package/routes/_workspace/measures2.js +8 -8
- package/routes/_workspace/measures3.js +29 -29
- package/routes/_workspace/notifications2.js +263 -263
- package/routes/_workspace/people/_username.js +10 -10
- package/routes/_workspace/people/_username2.js +41 -41
- package/routes/_workspace/projects/_projectId3.js +303 -303
- package/routes/_workspace/projects/_projectId4.js +4 -4
- package/routes/_workspace/projects/_projectId_3.milestones._milestoneId.js +28 -28
- package/routes/_workspace/projects/_projectId_4.milestones._milestoneId.js +4 -4
- package/routes/_workspace/projects/index.js +8 -8
- package/routes/_workspace/settings/account2.js +8 -8
- package/routes/_workspace/settings/audit-log2.js +8 -8
- package/routes/_workspace/settings/audit-log3.js +155 -155
- package/routes/_workspace/settings/connections2.js +4 -4
- package/routes/_workspace/settings/fields2.js +5 -5
- package/routes/_workspace/settings/github2.js +11 -11
- package/routes/_workspace/settings/gitlab2.js +5 -5
- package/routes/_workspace/settings/groups2.js +52 -52
- package/routes/_workspace/settings/import2.js +39 -39
- package/routes/_workspace/settings/index2.js +5 -5
- package/routes/_workspace/settings/intercom2.js +11 -11
- package/routes/_workspace/settings/labels2.js +33 -33
- package/routes/_workspace/settings/members2.js +81 -81
- package/routes/_workspace/settings/notifications2.js +46 -46
- package/routes/_workspace/settings/parallelworks2.js +20 -20
- package/routes/_workspace/settings/roles2.js +41 -41
- package/routes/_workspace/settings/runners2.js +15 -15
- package/routes/_workspace/settings/sentry2.js +15 -15
- package/routes/_workspace/settings/sessions2.js +9 -9
- package/routes/_workspace/settings/sessions3.js +4 -4
- package/routes/_workspace/settings/slack2.js +12 -12
- package/routes/_workspace/settings/sso2.js +37 -37
- package/routes/_workspace/settings/sso3.js +7 -7
- package/routes/_workspace/settings/teams2.js +29 -29
- package/routes/_workspace/settings/tokens2.js +32 -32
- package/routes/_workspace/settings/tokens3.js +4 -4
- package/routes/_workspace/settings/webhooks2.js +41 -41
- package/routes/_workspace/settings/zendesk2.js +11 -11
- package/routes/_workspace/teams/_key/cycles/_number2.js +33 -33
- package/routes/_workspace/teams/_key/cycles/_number3.js +7 -7
- package/routes/_workspace/teams/_key/cycles/index2.js +37 -37
- package/routes/_workspace/teams/_key/issues.js +10 -10
- package/routes/_workspace/teams/_key/projects.js +6 -6
- package/routes/_workspace/teams/_key/settings2.js +396 -396
- package/routes/_workspace2.js +308 -308
- package/routes/_workspace3.js +8 -8
- package/routes/device2.js +4 -4
- package/routes/device3.js +4 -4
- package/routes/docs/_tag/_endpoint2.js +3 -3
- package/routes/docs/_tag/index2.js +3 -3
- package/routes/docs/route2.js +7 -7
- package/routes/index2.js +5 -5
- package/routes/login2.js +10 -10
- package/routes/new2.js +12 -12
- package/routes/new3.js +5 -5
- package/routes/request2._token.js +6 -6
- package/routes/share2._secret.js +4 -4
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
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 { Avatar as
|
|
25
|
-
import { useState as
|
|
26
|
-
import { useErrorMessage as
|
|
27
|
-
import { useTranslations as
|
|
28
|
-
import { Fragment as
|
|
1
|
+
import { api as e, unwrap as t } from "../../../../api/client.js";
|
|
2
|
+
import { invalidateIssueLists as n } from "../../../../api/mutations.js";
|
|
3
|
+
import { agentsQuery as r, meQuery as i, teamAccessQuery as a, teamMembersQuery as o, teamsQuery as s } from "../../../../api/queries.js";
|
|
4
|
+
import { AccessGrants as c } from "../../../../components/AccessGrants.js";
|
|
5
|
+
import { BugRotation as l } from "../../../../components/BugRotation.js";
|
|
6
|
+
import { FieldSettings as u } from "../../../../components/CustomFields.js";
|
|
7
|
+
import { FavoriteStar as d } from "../../../../components/FavoriteStar.js";
|
|
8
|
+
import { IconUpload as f } from "../../../../components/IconUpload.js";
|
|
9
|
+
import { IssueTemplates as p } from "../../../../components/IssueTemplates.js";
|
|
10
|
+
import { AddIcon as m, ShieldIcon as h, UsersIcon as g } from "../../../../components/icons.js";
|
|
11
|
+
import { PersonHoverCard as _ } from "../../../../components/PersonHoverCard.js";
|
|
12
|
+
import { StatusRules as v } from "../../../../components/StatusRules.js";
|
|
13
|
+
import { TeamRepositories as y } from "../../../../components/TeamRepositories.js";
|
|
14
|
+
import { TeamWorkflow as b } from "../../../../components/TeamWorkflow.js";
|
|
15
|
+
import { appURL as x } from "../../../../lib/base.js";
|
|
16
|
+
import { useConfirm as S } from "../../../../lib/confirm.js";
|
|
17
|
+
import { copyItem as C } from "../../../../lib/menus.js";
|
|
18
|
+
import { usePageTitle as w } from "../../../../lib/pageTitle.js";
|
|
19
|
+
import { usePeople as ee } from "../../../../lib/people.js";
|
|
20
|
+
import { usePermissions as T } from "../../../../lib/roles.js";
|
|
21
|
+
import { useNavigate as E } from "../../../../lib/router.js";
|
|
22
|
+
import { withSubTeams as D } from "../../../../lib/teamTree.js";
|
|
23
|
+
import { Route as O } from "./settings.js";
|
|
24
|
+
import { Avatar as k, Button as A, Card as j, Combobox as M, ConfirmModal as te, CopyButton as N, ErrorText as P, Input as F, PageHeader as ne, Section as I, Select as L, SettingRow as R, SettingsCard as z, Switch as B, menuDivider as V, useOpenMenu as H } from "@parallelworks/ui";
|
|
25
|
+
import { useState as U } from "react";
|
|
26
|
+
import { useErrorMessage as W } from "@parallelworks/problem/react";
|
|
27
|
+
import { useTranslations as G } from "use-intl";
|
|
28
|
+
import { Fragment as K, jsx as q, jsxs as J } from "react/jsx-runtime";
|
|
29
29
|
import { useMutation as Y, useQuery as X, useQueryClient as Z, useSuspenseQuery as Q } from "@tanstack/react-query";
|
|
30
30
|
// src/routes/$workspace/teams/$key/settings.tsx?tsr-split=component
|
|
31
31
|
function re() {
|
|
32
|
-
let { workspace:
|
|
33
|
-
mutationFn: async (
|
|
32
|
+
let { workspace: n, key: r } = O.useParams(), { data: i } = Q(s(n)), a = T(n, { team: r }), o = a.has("manage_teams"), c = G("settingsNav"), m = Z(), h = Y({
|
|
33
|
+
mutationFn: async (i) => t(await e.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
|
|
34
34
|
params: { path: {
|
|
35
|
-
workspace:
|
|
36
|
-
key:
|
|
35
|
+
workspace: n,
|
|
36
|
+
key: r
|
|
37
37
|
} },
|
|
38
|
-
body:
|
|
38
|
+
body: i
|
|
39
39
|
})),
|
|
40
|
-
onSettled: () =>
|
|
41
|
-
}),
|
|
42
|
-
return
|
|
40
|
+
onSettled: () => m.invalidateQueries({ queryKey: s(n).queryKey })
|
|
41
|
+
}), g = i.find((e) => e.key === r);
|
|
42
|
+
return w(g?.name), g ? /* @__PURE__ */ J("div", {
|
|
43
43
|
className: "flex h-full min-h-0 flex-col",
|
|
44
|
-
children: [/* @__PURE__ */ q(
|
|
44
|
+
children: [/* @__PURE__ */ q(ne, {
|
|
45
45
|
heading: !1,
|
|
46
46
|
breadcrumbs: [
|
|
47
47
|
{
|
|
48
48
|
label: c("label"),
|
|
49
|
-
href: `/${
|
|
49
|
+
href: `/${n}/settings`
|
|
50
50
|
},
|
|
51
51
|
{
|
|
52
52
|
label: c("teams"),
|
|
53
|
-
href: `/${
|
|
53
|
+
href: `/${n}/settings/teams`
|
|
54
54
|
},
|
|
55
|
-
{ label:
|
|
55
|
+
{ label: g.name }
|
|
56
56
|
]
|
|
57
57
|
}), /* @__PURE__ */ q("div", {
|
|
58
58
|
className: "min-h-0 flex-1 overflow-y-auto",
|
|
@@ -62,137 +62,137 @@ function re() {
|
|
|
62
62
|
/* @__PURE__ */ J("div", {
|
|
63
63
|
className: "flex items-center gap-3",
|
|
64
64
|
children: [
|
|
65
|
-
/* @__PURE__ */ q(
|
|
66
|
-
workspace:
|
|
67
|
-
icon:
|
|
68
|
-
name:
|
|
69
|
-
onChange: (e) =>
|
|
65
|
+
/* @__PURE__ */ q(f, {
|
|
66
|
+
workspace: n,
|
|
67
|
+
icon: g.icon,
|
|
68
|
+
name: g.name,
|
|
69
|
+
onChange: (e) => h.mutateAsync({
|
|
70
70
|
icon: e,
|
|
71
71
|
color: ""
|
|
72
72
|
}),
|
|
73
|
-
disabled: !
|
|
73
|
+
disabled: !o,
|
|
74
74
|
size: 40
|
|
75
75
|
}),
|
|
76
76
|
/* @__PURE__ */ J("h1", {
|
|
77
77
|
className: "text-xl font-semibold tracking-tight",
|
|
78
78
|
children: [
|
|
79
|
-
|
|
79
|
+
g.name,
|
|
80
80
|
" ",
|
|
81
81
|
/* @__PURE__ */ q("span", {
|
|
82
82
|
className: "font-normal text-muted-foreground",
|
|
83
|
-
children:
|
|
83
|
+
children: g.key
|
|
84
84
|
})
|
|
85
85
|
]
|
|
86
86
|
}),
|
|
87
|
-
/* @__PURE__ */ q(
|
|
88
|
-
workspace:
|
|
87
|
+
/* @__PURE__ */ q(d, {
|
|
88
|
+
workspace: n,
|
|
89
89
|
kind: "team",
|
|
90
|
-
target:
|
|
90
|
+
target: g.id
|
|
91
91
|
})
|
|
92
92
|
]
|
|
93
93
|
}),
|
|
94
94
|
/* @__PURE__ */ q(ie, {
|
|
95
|
-
workspace:
|
|
96
|
-
team:
|
|
97
|
-
teams:
|
|
98
|
-
isAdmin:
|
|
95
|
+
workspace: n,
|
|
96
|
+
team: g,
|
|
97
|
+
teams: i,
|
|
98
|
+
isAdmin: o
|
|
99
99
|
}),
|
|
100
100
|
/* @__PURE__ */ q(de, {
|
|
101
|
-
workspace:
|
|
102
|
-
teamKey:
|
|
103
|
-
isAdmin:
|
|
101
|
+
workspace: n,
|
|
102
|
+
teamKey: r,
|
|
103
|
+
isAdmin: a.has("manage_members")
|
|
104
104
|
}),
|
|
105
|
-
/* @__PURE__ */ q(
|
|
106
|
-
workspace:
|
|
107
|
-
teamKey:
|
|
108
|
-
isAdmin:
|
|
105
|
+
/* @__PURE__ */ q(b, {
|
|
106
|
+
workspace: n,
|
|
107
|
+
teamKey: r,
|
|
108
|
+
isAdmin: a.has("manage_labels")
|
|
109
109
|
}),
|
|
110
|
-
|
|
111
|
-
workspace:
|
|
110
|
+
a.has("manage_labels") && /* @__PURE__ */ q(u, {
|
|
111
|
+
workspace: n,
|
|
112
112
|
target: "issue",
|
|
113
113
|
team: {
|
|
114
|
-
key:
|
|
115
|
-
id:
|
|
114
|
+
key: r,
|
|
115
|
+
id: g.id
|
|
116
116
|
}
|
|
117
117
|
}),
|
|
118
|
-
/* @__PURE__ */ q(
|
|
119
|
-
workspace:
|
|
120
|
-
team:
|
|
121
|
-
isAdmin:
|
|
118
|
+
/* @__PURE__ */ q(v, {
|
|
119
|
+
workspace: n,
|
|
120
|
+
team: g,
|
|
121
|
+
isAdmin: o
|
|
122
122
|
}),
|
|
123
123
|
/* @__PURE__ */ q(ae, {
|
|
124
|
-
workspace:
|
|
125
|
-
team:
|
|
126
|
-
isAdmin:
|
|
124
|
+
workspace: n,
|
|
125
|
+
team: g,
|
|
126
|
+
isAdmin: o
|
|
127
127
|
}),
|
|
128
128
|
/* @__PURE__ */ q(se, {
|
|
129
|
-
workspace:
|
|
130
|
-
team:
|
|
131
|
-
isAdmin:
|
|
129
|
+
workspace: n,
|
|
130
|
+
team: g,
|
|
131
|
+
isAdmin: o
|
|
132
132
|
}),
|
|
133
133
|
/* @__PURE__ */ q(oe, {
|
|
134
|
-
workspace:
|
|
135
|
-
team:
|
|
136
|
-
isAdmin:
|
|
134
|
+
workspace: n,
|
|
135
|
+
team: g,
|
|
136
|
+
isAdmin: o
|
|
137
137
|
}),
|
|
138
|
-
/* @__PURE__ */ q(
|
|
139
|
-
workspace:
|
|
140
|
-
teamKey:
|
|
141
|
-
isAdmin:
|
|
138
|
+
/* @__PURE__ */ q(l, {
|
|
139
|
+
workspace: n,
|
|
140
|
+
teamKey: r,
|
|
141
|
+
isAdmin: o
|
|
142
142
|
}),
|
|
143
|
-
/* @__PURE__ */ q(
|
|
144
|
-
workspace:
|
|
145
|
-
teamKey:
|
|
146
|
-
isAdmin:
|
|
143
|
+
/* @__PURE__ */ q(p, {
|
|
144
|
+
workspace: n,
|
|
145
|
+
teamKey: r,
|
|
146
|
+
isAdmin: a.has("manage_templates")
|
|
147
147
|
}),
|
|
148
148
|
/* @__PURE__ */ q(ce, {
|
|
149
|
-
workspace:
|
|
150
|
-
team:
|
|
151
|
-
isAdmin:
|
|
149
|
+
workspace: n,
|
|
150
|
+
team: g,
|
|
151
|
+
isAdmin: o
|
|
152
152
|
}),
|
|
153
153
|
/* @__PURE__ */ q(ue, {
|
|
154
|
-
workspace:
|
|
155
|
-
team:
|
|
156
|
-
isAdmin:
|
|
154
|
+
workspace: n,
|
|
155
|
+
team: g,
|
|
156
|
+
isAdmin: o
|
|
157
157
|
}),
|
|
158
|
-
/* @__PURE__ */ q(
|
|
159
|
-
workspace:
|
|
160
|
-
team:
|
|
161
|
-
isAdmin:
|
|
158
|
+
/* @__PURE__ */ q(y, {
|
|
159
|
+
workspace: n,
|
|
160
|
+
team: g,
|
|
161
|
+
isAdmin: o
|
|
162
162
|
}),
|
|
163
163
|
/* @__PURE__ */ q(fe, {
|
|
164
|
-
workspace:
|
|
165
|
-
teamKey:
|
|
164
|
+
workspace: n,
|
|
165
|
+
teamKey: r
|
|
166
166
|
}),
|
|
167
|
-
|
|
168
|
-
workspace:
|
|
169
|
-
team:
|
|
167
|
+
o && /* @__PURE__ */ q(pe, {
|
|
168
|
+
workspace: n,
|
|
169
|
+
team: g
|
|
170
170
|
})
|
|
171
171
|
]
|
|
172
172
|
})
|
|
173
173
|
})]
|
|
174
174
|
}) : null;
|
|
175
175
|
}
|
|
176
|
-
function ie({ workspace:
|
|
177
|
-
let o =
|
|
178
|
-
mutationFn: async (i) =>
|
|
176
|
+
function ie({ workspace: n, team: r, teams: i, isAdmin: a }) {
|
|
177
|
+
let o = G("teamParent"), c = W(), l = Z(), u = Y({
|
|
178
|
+
mutationFn: async (i) => t(await e.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
|
|
179
179
|
params: { path: {
|
|
180
|
-
workspace:
|
|
180
|
+
workspace: n,
|
|
181
181
|
key: r.key
|
|
182
182
|
} },
|
|
183
183
|
body: { parent: i }
|
|
184
184
|
})),
|
|
185
|
-
onSettled: () =>
|
|
186
|
-
}), d =
|
|
187
|
-
return /* @__PURE__ */ J(
|
|
185
|
+
onSettled: () => l.invalidateQueries({ queryKey: s(n).queryKey })
|
|
186
|
+
}), d = D(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(z, {
|
|
188
188
|
title: o("title"),
|
|
189
189
|
description: o("description"),
|
|
190
190
|
children: [
|
|
191
|
-
/* @__PURE__ */ q(
|
|
191
|
+
/* @__PURE__ */ q(R, {
|
|
192
192
|
label: o("parent"),
|
|
193
193
|
children: /* @__PURE__ */ q("div", {
|
|
194
194
|
className: "w-56",
|
|
195
|
-
children: /* @__PURE__ */ q(
|
|
195
|
+
children: /* @__PURE__ */ q(L, {
|
|
196
196
|
width: "fill",
|
|
197
197
|
"aria-label": o("parent"),
|
|
198
198
|
value: f?.key ?? "",
|
|
@@ -208,115 +208,115 @@ function ie({ workspace: e, team: r, teams: i, isAdmin: a }) {
|
|
|
208
208
|
})
|
|
209
209
|
})
|
|
210
210
|
}),
|
|
211
|
-
p.length > 0 && /* @__PURE__ */ q(
|
|
211
|
+
p.length > 0 && /* @__PURE__ */ q(R, {
|
|
212
212
|
label: o("subTeams"),
|
|
213
213
|
children: /* @__PURE__ */ q("span", {
|
|
214
214
|
className: "text-sm",
|
|
215
215
|
children: p.map((e) => e.name).join(", ")
|
|
216
216
|
})
|
|
217
217
|
}),
|
|
218
|
-
u.error && /* @__PURE__ */ q(
|
|
218
|
+
u.error && /* @__PURE__ */ q(P, { children: c(u.error) })
|
|
219
219
|
]
|
|
220
220
|
});
|
|
221
221
|
}
|
|
222
|
-
function ae({ workspace:
|
|
223
|
-
let
|
|
224
|
-
workspace:
|
|
225
|
-
key:
|
|
226
|
-
} } },
|
|
227
|
-
mutationFn: async (
|
|
228
|
-
...
|
|
229
|
-
body:
|
|
222
|
+
function ae({ workspace: n, team: r, isAdmin: a }) {
|
|
223
|
+
let o = G("teamIntake"), c = W(), l = Z(), { data: u } = X(i), d = () => l.invalidateQueries({ queryKey: s(n).queryKey }), f = { params: { path: {
|
|
224
|
+
workspace: n,
|
|
225
|
+
key: r.key
|
|
226
|
+
} } }, p = Y({
|
|
227
|
+
mutationFn: async (n) => t(await e.PUT("/api/v1/workspaces/{workspace}/teams/{key}/intake", {
|
|
228
|
+
...f,
|
|
229
|
+
body: n
|
|
230
230
|
})),
|
|
231
|
-
onSettled:
|
|
232
|
-
}),
|
|
233
|
-
mutationFn: async () =>
|
|
234
|
-
onSettled:
|
|
235
|
-
}), { token:
|
|
236
|
-
return /* @__PURE__ */ J(
|
|
237
|
-
title:
|
|
238
|
-
description:
|
|
231
|
+
onSettled: d
|
|
232
|
+
}), m = Y({
|
|
233
|
+
mutationFn: async () => t(await e.POST("/api/v1/workspaces/{workspace}/teams/{key}/intake/rotate", f)),
|
|
234
|
+
onSettled: d
|
|
235
|
+
}), { 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;
|
|
236
|
+
return /* @__PURE__ */ J(z, {
|
|
237
|
+
title: o("title"),
|
|
238
|
+
description: o("description"),
|
|
239
239
|
children: [
|
|
240
|
-
/* @__PURE__ */ q(
|
|
241
|
-
label:
|
|
242
|
-
helpText:
|
|
243
|
-
children: /* @__PURE__ */ q(
|
|
244
|
-
"aria-label":
|
|
245
|
-
checked:
|
|
246
|
-
disabled:
|
|
247
|
-
onCheckedChange: (e) =>
|
|
240
|
+
/* @__PURE__ */ q(R, {
|
|
241
|
+
label: o("form"),
|
|
242
|
+
helpText: r.triageEnabled ? o("formHelp") : o("needsTriage"),
|
|
243
|
+
children: /* @__PURE__ */ q(B, {
|
|
244
|
+
"aria-label": o("form"),
|
|
245
|
+
checked: g,
|
|
246
|
+
disabled: b || !r.triageEnabled && !g,
|
|
247
|
+
onCheckedChange: (e) => p.mutate({
|
|
248
248
|
form: e,
|
|
249
|
-
email:
|
|
249
|
+
email: _
|
|
250
250
|
})
|
|
251
251
|
})
|
|
252
252
|
}),
|
|
253
|
-
|
|
254
|
-
label:
|
|
253
|
+
g && v && /* @__PURE__ */ q(R, {
|
|
254
|
+
label: o("link"),
|
|
255
255
|
children: /* @__PURE__ */ J("div", {
|
|
256
256
|
className: "flex min-w-0 items-center gap-2",
|
|
257
257
|
children: [/* @__PURE__ */ q("code", {
|
|
258
258
|
className: "min-w-0 truncate text-xs",
|
|
259
|
-
children:
|
|
260
|
-
}), /* @__PURE__ */ q(
|
|
261
|
-
text:
|
|
262
|
-
label:
|
|
259
|
+
children: v
|
|
260
|
+
}), /* @__PURE__ */ q(N, {
|
|
261
|
+
text: v,
|
|
262
|
+
label: o("copyLink"),
|
|
263
263
|
size: "sm",
|
|
264
264
|
variant: "ghost"
|
|
265
265
|
})]
|
|
266
266
|
})
|
|
267
267
|
}),
|
|
268
|
-
/* @__PURE__ */ q(
|
|
269
|
-
label:
|
|
270
|
-
helpText:
|
|
271
|
-
children: /* @__PURE__ */ q(
|
|
272
|
-
"aria-label":
|
|
273
|
-
checked:
|
|
274
|
-
disabled:
|
|
275
|
-
onCheckedChange: (e) =>
|
|
276
|
-
form:
|
|
268
|
+
/* @__PURE__ */ q(R, {
|
|
269
|
+
label: o("email"),
|
|
270
|
+
helpText: u?.intakeDomain ? o("emailHelp") : o("noDomain"),
|
|
271
|
+
children: /* @__PURE__ */ q(B, {
|
|
272
|
+
"aria-label": o("email"),
|
|
273
|
+
checked: _,
|
|
274
|
+
disabled: b || !u?.intakeDomain || !r.triageEnabled && !_,
|
|
275
|
+
onCheckedChange: (e) => p.mutate({
|
|
276
|
+
form: g,
|
|
277
277
|
email: e
|
|
278
278
|
})
|
|
279
279
|
})
|
|
280
280
|
}),
|
|
281
|
-
|
|
282
|
-
label:
|
|
281
|
+
_ && y && /* @__PURE__ */ q(R, {
|
|
282
|
+
label: o("address"),
|
|
283
283
|
children: /* @__PURE__ */ J("div", {
|
|
284
284
|
className: "flex min-w-0 items-center gap-2",
|
|
285
285
|
children: [/* @__PURE__ */ q("code", {
|
|
286
286
|
className: "min-w-0 truncate text-xs",
|
|
287
|
-
children:
|
|
288
|
-
}), /* @__PURE__ */ q(
|
|
289
|
-
text:
|
|
290
|
-
label:
|
|
287
|
+
children: y
|
|
288
|
+
}), /* @__PURE__ */ q(N, {
|
|
289
|
+
text: y,
|
|
290
|
+
label: o("copyAddress"),
|
|
291
291
|
size: "sm",
|
|
292
292
|
variant: "ghost"
|
|
293
293
|
})]
|
|
294
294
|
})
|
|
295
295
|
}),
|
|
296
|
-
|
|
297
|
-
label:
|
|
298
|
-
helpText:
|
|
299
|
-
children: /* @__PURE__ */ q(
|
|
296
|
+
h && a && /* @__PURE__ */ q(R, {
|
|
297
|
+
label: o("rotate"),
|
|
298
|
+
helpText: o("rotateHelp"),
|
|
299
|
+
children: /* @__PURE__ */ q(A, {
|
|
300
300
|
size: "sm",
|
|
301
|
-
loading:
|
|
302
|
-
onClick: () =>
|
|
303
|
-
children:
|
|
301
|
+
loading: m.isPending,
|
|
302
|
+
onClick: () => m.mutate(),
|
|
303
|
+
children: o("rotateButton")
|
|
304
304
|
})
|
|
305
305
|
}),
|
|
306
|
-
S && /* @__PURE__ */ q(
|
|
306
|
+
S && /* @__PURE__ */ q(P, { children: c(S) })
|
|
307
307
|
]
|
|
308
308
|
});
|
|
309
309
|
}
|
|
310
|
-
function oe({ workspace:
|
|
311
|
-
let a =
|
|
312
|
-
mutationFn: async (i) =>
|
|
310
|
+
function oe({ workspace: n, team: r, isAdmin: i }) {
|
|
311
|
+
let a = G("planning.sla"), o = G("priority"), c = W(), l = Z(), u = Y({
|
|
312
|
+
mutationFn: async (i) => t(await e.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
|
|
313
313
|
params: { path: {
|
|
314
|
-
workspace:
|
|
314
|
+
workspace: n,
|
|
315
315
|
key: r.key
|
|
316
316
|
} },
|
|
317
317
|
body: { slaHours: i }
|
|
318
318
|
})),
|
|
319
|
-
onSettled: () =>
|
|
319
|
+
onSettled: () => l.invalidateQueries({ queryKey: s(n).queryKey })
|
|
320
320
|
}), d = [
|
|
321
321
|
0,
|
|
322
322
|
4,
|
|
@@ -327,7 +327,7 @@ function oe({ workspace: e, team: r, isAdmin: i }) {
|
|
|
327
327
|
168,
|
|
328
328
|
336
|
|
329
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 });
|
|
330
|
-
return /* @__PURE__ */ J(
|
|
330
|
+
return /* @__PURE__ */ J(z, {
|
|
331
331
|
title: a("title"),
|
|
332
332
|
description: a("description"),
|
|
333
333
|
children: [[
|
|
@@ -335,11 +335,11 @@ function oe({ workspace: e, team: r, isAdmin: i }) {
|
|
|
335
335
|
"high",
|
|
336
336
|
"medium",
|
|
337
337
|
"low"
|
|
338
|
-
].map((e) => /* @__PURE__ */ q(
|
|
338
|
+
].map((e) => /* @__PURE__ */ q(R, {
|
|
339
339
|
label: o(e),
|
|
340
340
|
children: /* @__PURE__ */ q("div", {
|
|
341
341
|
className: "w-40",
|
|
342
|
-
children: /* @__PURE__ */ q(
|
|
342
|
+
children: /* @__PURE__ */ q(L, {
|
|
343
343
|
width: "fill",
|
|
344
344
|
"aria-label": a("target", { priority: o(e) }),
|
|
345
345
|
value: String(r.slaHours[e]),
|
|
@@ -354,65 +354,65 @@ function oe({ workspace: e, team: r, isAdmin: i }) {
|
|
|
354
354
|
}))
|
|
355
355
|
})
|
|
356
356
|
})
|
|
357
|
-
}, e)), u.isError && /* @__PURE__ */ q(
|
|
357
|
+
}, e)), u.isError && /* @__PURE__ */ q(P, { children: c(u.error) })]
|
|
358
358
|
});
|
|
359
359
|
}
|
|
360
|
-
function se({ workspace:
|
|
361
|
-
let a =
|
|
362
|
-
mutationFn: async (i) =>
|
|
360
|
+
function se({ workspace: n, team: r, isAdmin: i }) {
|
|
361
|
+
let a = G("planning.settings"), o = W(), c = Z(), l = Y({
|
|
362
|
+
mutationFn: async (i) => t(await e.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
|
|
363
363
|
params: { path: {
|
|
364
|
-
workspace:
|
|
364
|
+
workspace: n,
|
|
365
365
|
key: r.key
|
|
366
366
|
} },
|
|
367
367
|
body: i
|
|
368
368
|
})),
|
|
369
369
|
onSettled: () => {
|
|
370
|
-
|
|
370
|
+
c.invalidateQueries({ queryKey: s(n).queryKey }), c.invalidateQueries({ queryKey: [
|
|
371
371
|
"workspace",
|
|
372
|
-
|
|
372
|
+
n,
|
|
373
373
|
"cycles",
|
|
374
374
|
r.key
|
|
375
375
|
] });
|
|
376
376
|
}
|
|
377
|
-
}), u = !i ||
|
|
378
|
-
return /* @__PURE__ */ J(
|
|
377
|
+
}), u = !i || l.isPending, d = (e) => l.isError && l.variables && e in l.variables ? o(l.error) : null;
|
|
378
|
+
return /* @__PURE__ */ J(z, {
|
|
379
379
|
title: a("title"),
|
|
380
380
|
description: a("description"),
|
|
381
381
|
children: [
|
|
382
|
-
/* @__PURE__ */ q(
|
|
382
|
+
/* @__PURE__ */ q(R, {
|
|
383
383
|
label: a("triage"),
|
|
384
384
|
helpText: a("triageHelp"),
|
|
385
385
|
error: d("triageEnabled"),
|
|
386
|
-
children: /* @__PURE__ */ q(
|
|
386
|
+
children: /* @__PURE__ */ q(B, {
|
|
387
387
|
"aria-label": a("triage"),
|
|
388
388
|
checked: r.triageEnabled,
|
|
389
389
|
disabled: u,
|
|
390
|
-
onCheckedChange: (e) =>
|
|
390
|
+
onCheckedChange: (e) => l.mutate({ triageEnabled: e })
|
|
391
391
|
})
|
|
392
392
|
}),
|
|
393
|
-
/* @__PURE__ */ q(
|
|
393
|
+
/* @__PURE__ */ q(R, {
|
|
394
394
|
label: a("customerRequests"),
|
|
395
395
|
helpText: a("customerRequestsHelp"),
|
|
396
396
|
error: d("customerRequestsEnabled"),
|
|
397
|
-
children: /* @__PURE__ */ q(
|
|
397
|
+
children: /* @__PURE__ */ q(B, {
|
|
398
398
|
"aria-label": a("customerRequests"),
|
|
399
399
|
checked: r.customerRequestsEnabled,
|
|
400
400
|
disabled: u,
|
|
401
|
-
onCheckedChange: (e) =>
|
|
401
|
+
onCheckedChange: (e) => l.mutate({ customerRequestsEnabled: e })
|
|
402
402
|
})
|
|
403
403
|
}),
|
|
404
|
-
/* @__PURE__ */ q(
|
|
404
|
+
/* @__PURE__ */ q(R, {
|
|
405
405
|
label: a("autoClose"),
|
|
406
406
|
helpText: a("autoCloseHelp"),
|
|
407
407
|
error: d("autoCloseDays"),
|
|
408
408
|
children: /* @__PURE__ */ q("div", {
|
|
409
409
|
className: "w-40",
|
|
410
|
-
children: /* @__PURE__ */ q(
|
|
410
|
+
children: /* @__PURE__ */ q(L, {
|
|
411
411
|
width: "fill",
|
|
412
412
|
"aria-label": a("autoClose"),
|
|
413
413
|
value: String(r.autoCloseDays),
|
|
414
414
|
disabled: u,
|
|
415
|
-
onValueChange: (e) => e &&
|
|
415
|
+
onValueChange: (e) => e && l.mutate({ autoCloseDays: Number(e) }),
|
|
416
416
|
items: [
|
|
417
417
|
0,
|
|
418
418
|
30,
|
|
@@ -427,18 +427,18 @@ function se({ workspace: e, team: r, isAdmin: i }) {
|
|
|
427
427
|
})
|
|
428
428
|
})
|
|
429
429
|
}),
|
|
430
|
-
/* @__PURE__ */ q(
|
|
430
|
+
/* @__PURE__ */ q(R, {
|
|
431
431
|
label: a("autoArchive"),
|
|
432
432
|
helpText: a("autoArchiveHelp"),
|
|
433
433
|
error: d("autoArchiveDays"),
|
|
434
434
|
children: /* @__PURE__ */ q("div", {
|
|
435
435
|
className: "w-40",
|
|
436
|
-
children: /* @__PURE__ */ q(
|
|
436
|
+
children: /* @__PURE__ */ q(L, {
|
|
437
437
|
width: "fill",
|
|
438
438
|
"aria-label": a("autoArchive"),
|
|
439
439
|
value: String(r.autoArchiveDays),
|
|
440
440
|
disabled: u,
|
|
441
|
-
onValueChange: (e) => e &&
|
|
441
|
+
onValueChange: (e) => e && l.mutate({ autoArchiveDays: Number(e) }),
|
|
442
442
|
items: [
|
|
443
443
|
0,
|
|
444
444
|
1,
|
|
@@ -453,29 +453,29 @@ function se({ workspace: e, team: r, isAdmin: i }) {
|
|
|
453
453
|
})
|
|
454
454
|
})
|
|
455
455
|
}),
|
|
456
|
-
/* @__PURE__ */ q(
|
|
456
|
+
/* @__PURE__ */ q(R, {
|
|
457
457
|
label: a("cycles"),
|
|
458
458
|
helpText: a("cyclesHelp"),
|
|
459
459
|
error: d("cyclesEnabled"),
|
|
460
|
-
children: /* @__PURE__ */ q(
|
|
460
|
+
children: /* @__PURE__ */ q(B, {
|
|
461
461
|
"aria-label": a("cycles"),
|
|
462
462
|
checked: r.cyclesEnabled,
|
|
463
463
|
disabled: u,
|
|
464
|
-
onCheckedChange: (e) =>
|
|
464
|
+
onCheckedChange: (e) => l.mutate({ cyclesEnabled: e })
|
|
465
465
|
})
|
|
466
466
|
}),
|
|
467
|
-
/* @__PURE__ */ q(
|
|
467
|
+
/* @__PURE__ */ q(R, {
|
|
468
468
|
label: a("cycleLength"),
|
|
469
469
|
helpText: a("cycleLengthHelp"),
|
|
470
470
|
error: d("cycleWeeks"),
|
|
471
471
|
children: /* @__PURE__ */ q("div", {
|
|
472
472
|
className: "w-36",
|
|
473
|
-
children: /* @__PURE__ */ q(
|
|
473
|
+
children: /* @__PURE__ */ q(L, {
|
|
474
474
|
width: "fill",
|
|
475
475
|
"aria-label": a("cycleLength"),
|
|
476
476
|
value: r.cycleWeeks,
|
|
477
477
|
disabled: u,
|
|
478
|
-
onValueChange: (e) => e &&
|
|
478
|
+
onValueChange: (e) => e && l.mutate({ cycleWeeks: e }),
|
|
479
479
|
items: [
|
|
480
480
|
1,
|
|
481
481
|
2,
|
|
@@ -487,18 +487,18 @@ function se({ workspace: e, team: r, isAdmin: i }) {
|
|
|
487
487
|
})
|
|
488
488
|
})
|
|
489
489
|
}),
|
|
490
|
-
/* @__PURE__ */ q(
|
|
490
|
+
/* @__PURE__ */ q(R, {
|
|
491
491
|
label: a("upcomingCycles"),
|
|
492
492
|
helpText: a("upcomingCyclesHelp"),
|
|
493
493
|
error: d("cycleUpcoming"),
|
|
494
494
|
children: /* @__PURE__ */ q("div", {
|
|
495
495
|
className: "w-36",
|
|
496
|
-
children: /* @__PURE__ */ q(
|
|
496
|
+
children: /* @__PURE__ */ q(L, {
|
|
497
497
|
width: "fill",
|
|
498
498
|
"aria-label": a("upcomingCycles"),
|
|
499
499
|
value: r.cycleUpcoming,
|
|
500
500
|
disabled: u,
|
|
501
|
-
onValueChange: (e) => e !== null &&
|
|
501
|
+
onValueChange: (e) => e !== null && l.mutate({ cycleUpcoming: e }),
|
|
502
502
|
items: [
|
|
503
503
|
0,
|
|
504
504
|
1,
|
|
@@ -515,29 +515,29 @@ function se({ workspace: e, team: r, isAdmin: i }) {
|
|
|
515
515
|
})
|
|
516
516
|
})
|
|
517
517
|
}),
|
|
518
|
-
/* @__PURE__ */ q(
|
|
518
|
+
/* @__PURE__ */ q(R, {
|
|
519
519
|
label: a("autoAdd"),
|
|
520
520
|
helpText: a("autoAddHelp"),
|
|
521
521
|
error: d("cycleAutoAdd"),
|
|
522
|
-
children: /* @__PURE__ */ q(
|
|
522
|
+
children: /* @__PURE__ */ q(B, {
|
|
523
523
|
"aria-label": a("autoAdd"),
|
|
524
524
|
checked: r.cycleAutoAdd,
|
|
525
525
|
disabled: u,
|
|
526
|
-
onCheckedChange: (e) =>
|
|
526
|
+
onCheckedChange: (e) => l.mutate({ cycleAutoAdd: e })
|
|
527
527
|
})
|
|
528
528
|
}),
|
|
529
|
-
/* @__PURE__ */ q(
|
|
529
|
+
/* @__PURE__ */ q(R, {
|
|
530
530
|
label: a("estimates"),
|
|
531
531
|
helpText: a("estimatesHelp"),
|
|
532
532
|
error: d("estimateScale"),
|
|
533
533
|
children: /* @__PURE__ */ q("div", {
|
|
534
534
|
className: "w-44",
|
|
535
|
-
children: /* @__PURE__ */ q(
|
|
535
|
+
children: /* @__PURE__ */ q(L, {
|
|
536
536
|
width: "fill",
|
|
537
537
|
"aria-label": a("estimates"),
|
|
538
538
|
value: r.estimateScale,
|
|
539
539
|
disabled: u,
|
|
540
|
-
onValueChange: (e) => e &&
|
|
540
|
+
onValueChange: (e) => e && l.mutate({ estimateScale: e }),
|
|
541
541
|
items: [
|
|
542
542
|
"none",
|
|
543
543
|
"fibonacci",
|
|
@@ -562,44 +562,44 @@ var $ = [
|
|
|
562
562
|
"merge",
|
|
563
563
|
"release"
|
|
564
564
|
];
|
|
565
|
-
function ce({ workspace:
|
|
566
|
-
let o =
|
|
567
|
-
mutationFn: async (
|
|
565
|
+
function ce({ workspace: n, team: i, isAdmin: a }) {
|
|
566
|
+
let o = G("flow"), c = W(), l = Z(), { data: u = [] } = X(r(n)), d = Y({
|
|
567
|
+
mutationFn: async (r) => t(await e.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
|
|
568
568
|
params: { path: {
|
|
569
|
-
workspace:
|
|
570
|
-
key:
|
|
569
|
+
workspace: n,
|
|
570
|
+
key: i.key
|
|
571
571
|
} },
|
|
572
|
-
body: { flow:
|
|
572
|
+
body: { flow: r }
|
|
573
573
|
})),
|
|
574
|
-
onSettled: () =>
|
|
574
|
+
onSettled: () => l.invalidateQueries({ queryKey: s(n).queryKey })
|
|
575
575
|
}), f = Y({
|
|
576
|
-
mutationFn: async (
|
|
576
|
+
mutationFn: async (r) => t(await e.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
|
|
577
577
|
params: { path: {
|
|
578
|
-
workspace:
|
|
579
|
-
key:
|
|
578
|
+
workspace: n,
|
|
579
|
+
key: i.key
|
|
580
580
|
} },
|
|
581
|
-
body: { autoMerge:
|
|
581
|
+
body: { autoMerge: r }
|
|
582
582
|
})),
|
|
583
|
-
onSettled: () =>
|
|
583
|
+
onSettled: () => l.invalidateQueries({ queryKey: s(n).queryKey })
|
|
584
584
|
}), p = Y({
|
|
585
|
-
mutationFn: async (
|
|
585
|
+
mutationFn: async (r) => t(await e.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
|
|
586
586
|
params: { path: {
|
|
587
|
-
workspace:
|
|
588
|
-
key:
|
|
587
|
+
workspace: n,
|
|
588
|
+
key: i.key
|
|
589
589
|
} },
|
|
590
|
-
body: { draftPullRequests:
|
|
590
|
+
body: { draftPullRequests: r }
|
|
591
591
|
})),
|
|
592
|
-
onSettled: () =>
|
|
592
|
+
onSettled: () => l.invalidateQueries({ queryKey: s(n).queryKey })
|
|
593
593
|
}), m = Y({
|
|
594
|
-
mutationFn: async (
|
|
594
|
+
mutationFn: async (r) => t(await e.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
|
|
595
595
|
params: { path: {
|
|
596
|
-
workspace:
|
|
597
|
-
key:
|
|
596
|
+
workspace: n,
|
|
597
|
+
key: i.key
|
|
598
598
|
} },
|
|
599
|
-
body: { pullRequestsAsAssigner:
|
|
599
|
+
body: { pullRequestsAsAssigner: r }
|
|
600
600
|
})),
|
|
601
|
-
onSettled: () =>
|
|
602
|
-
}), h = (e) =>
|
|
601
|
+
onSettled: () => l.invalidateQueries({ queryKey: s(n).queryKey })
|
|
602
|
+
}), h = (e) => i.flow.find((t) => t.stage === e), [g, _] = U(null), v = (e, t) => {
|
|
603
603
|
_(e), d.mutate($.flatMap((n) => {
|
|
604
604
|
let r = h(n);
|
|
605
605
|
return n === e ? t.on ? [{
|
|
@@ -607,22 +607,22 @@ function ce({ workspace: e, team: r, isAdmin: i }) {
|
|
|
607
607
|
...t.agentId && { agentId: t.agentId }
|
|
608
608
|
}] : [] : r ? [r] : [];
|
|
609
609
|
}));
|
|
610
|
-
}, y = !
|
|
611
|
-
return /* @__PURE__ */ J(
|
|
610
|
+
}, y = !a || d.isPending;
|
|
611
|
+
return /* @__PURE__ */ J(z, {
|
|
612
612
|
title: o("title"),
|
|
613
613
|
description: o("description"),
|
|
614
614
|
children: [
|
|
615
615
|
$.map((e) => {
|
|
616
616
|
let t = h(e), n = u.filter((t) => !t.archivedAt && (e !== "review" || t.maxRole === "viewer"));
|
|
617
|
-
return /* @__PURE__ */ q(
|
|
617
|
+
return /* @__PURE__ */ q(R, {
|
|
618
618
|
label: o(`stages.${e}`),
|
|
619
619
|
helpText: o(`help.${e}`),
|
|
620
|
-
error: d.isError && g === e ?
|
|
620
|
+
error: d.isError && g === e ? c(d.error) : null,
|
|
621
621
|
children: /* @__PURE__ */ J("div", {
|
|
622
622
|
className: "flex items-center gap-3",
|
|
623
623
|
children: [t && /* @__PURE__ */ q("div", {
|
|
624
624
|
className: "w-44",
|
|
625
|
-
children: /* @__PURE__ */ q(
|
|
625
|
+
children: /* @__PURE__ */ q(L, {
|
|
626
626
|
width: "fill",
|
|
627
627
|
"aria-label": o("agentFor", { stage: o(`stages.${e}`) }),
|
|
628
628
|
value: t.agentId ?? "",
|
|
@@ -639,7 +639,7 @@ function ce({ workspace: e, team: r, isAdmin: i }) {
|
|
|
639
639
|
label: e.name
|
|
640
640
|
}))]
|
|
641
641
|
})
|
|
642
|
-
}), /* @__PURE__ */ q(
|
|
642
|
+
}), /* @__PURE__ */ q(B, {
|
|
643
643
|
"aria-label": o(`stages.${e}`),
|
|
644
644
|
checked: !!t,
|
|
645
645
|
disabled: y,
|
|
@@ -648,70 +648,70 @@ function ce({ workspace: e, team: r, isAdmin: i }) {
|
|
|
648
648
|
})
|
|
649
649
|
}, e);
|
|
650
650
|
}),
|
|
651
|
-
h("release") && /* @__PURE__ */ q(
|
|
651
|
+
h("release") && /* @__PURE__ */ q(R, {
|
|
652
652
|
label: o("releaseTargets"),
|
|
653
653
|
helpText: o("releaseTargetsHelp"),
|
|
654
654
|
children: /* @__PURE__ */ q(le, {
|
|
655
|
-
workspace:
|
|
656
|
-
team:
|
|
657
|
-
disabled: !
|
|
655
|
+
workspace: n,
|
|
656
|
+
team: i,
|
|
657
|
+
disabled: !a
|
|
658
658
|
})
|
|
659
659
|
}),
|
|
660
|
-
/* @__PURE__ */ q(
|
|
660
|
+
/* @__PURE__ */ q(R, {
|
|
661
661
|
label: o("autoMerge"),
|
|
662
662
|
helpText: o("autoMergeHelp"),
|
|
663
|
-
error: f.isError ?
|
|
664
|
-
children: /* @__PURE__ */ q(
|
|
663
|
+
error: f.isError ? c(f.error) : null,
|
|
664
|
+
children: /* @__PURE__ */ q(B, {
|
|
665
665
|
"aria-label": o("autoMerge"),
|
|
666
|
-
checked:
|
|
667
|
-
disabled: !
|
|
666
|
+
checked: i.autoMerge,
|
|
667
|
+
disabled: !a || f.isPending,
|
|
668
668
|
onCheckedChange: (e) => f.mutate(e)
|
|
669
669
|
})
|
|
670
670
|
}),
|
|
671
|
-
/* @__PURE__ */ q(
|
|
671
|
+
/* @__PURE__ */ q(R, {
|
|
672
672
|
label: o("draftPullRequests"),
|
|
673
673
|
helpText: o("draftPullRequestsHelp"),
|
|
674
|
-
error: p.isError ?
|
|
675
|
-
children: /* @__PURE__ */ q(
|
|
674
|
+
error: p.isError ? c(p.error) : null,
|
|
675
|
+
children: /* @__PURE__ */ q(B, {
|
|
676
676
|
"aria-label": o("draftPullRequests"),
|
|
677
|
-
checked:
|
|
678
|
-
disabled: !
|
|
677
|
+
checked: i.draftPullRequests,
|
|
678
|
+
disabled: !a || p.isPending,
|
|
679
679
|
onCheckedChange: (e) => p.mutate(e)
|
|
680
680
|
})
|
|
681
681
|
}),
|
|
682
|
-
/* @__PURE__ */ q(
|
|
682
|
+
/* @__PURE__ */ q(R, {
|
|
683
683
|
label: o("pullRequestsAsAssigner"),
|
|
684
684
|
helpText: o("pullRequestsAsAssignerHelp"),
|
|
685
|
-
error: m.isError ?
|
|
686
|
-
children: /* @__PURE__ */ q(
|
|
685
|
+
error: m.isError ? c(m.error) : null,
|
|
686
|
+
children: /* @__PURE__ */ q(B, {
|
|
687
687
|
"aria-label": o("pullRequestsAsAssigner"),
|
|
688
|
-
checked:
|
|
689
|
-
disabled: !
|
|
688
|
+
checked: i.pullRequestsAsAssigner,
|
|
689
|
+
disabled: !a || m.isPending,
|
|
690
690
|
onCheckedChange: (e) => m.mutate(e)
|
|
691
691
|
})
|
|
692
692
|
})
|
|
693
693
|
]
|
|
694
694
|
});
|
|
695
695
|
}
|
|
696
|
-
function le({ workspace:
|
|
697
|
-
let a =
|
|
698
|
-
mutationFn: async (i) =>
|
|
696
|
+
function le({ workspace: n, team: r, disabled: i }) {
|
|
697
|
+
let a = G("flow"), o = W(), c = Z(), [l, u] = U(r.releaseTargets.join(", ")), d = Y({
|
|
698
|
+
mutationFn: async (i) => t(await e.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
|
|
699
699
|
params: { path: {
|
|
700
|
-
workspace:
|
|
700
|
+
workspace: n,
|
|
701
701
|
key: r.key
|
|
702
702
|
} },
|
|
703
703
|
body: { releaseTargets: i }
|
|
704
704
|
})),
|
|
705
|
-
onSettled: () =>
|
|
705
|
+
onSettled: () => c.invalidateQueries({ queryKey: s(n).queryKey })
|
|
706
706
|
}), f = () => {
|
|
707
|
-
let e =
|
|
707
|
+
let e = l.split(",").map((e) => e.trim()).filter(Boolean);
|
|
708
708
|
e.join(",") !== r.releaseTargets.join(",") && d.mutate(e);
|
|
709
709
|
};
|
|
710
710
|
return /* @__PURE__ */ q("div", {
|
|
711
711
|
className: "w-64",
|
|
712
|
-
children: /* @__PURE__ */ q(
|
|
712
|
+
children: /* @__PURE__ */ q(F, {
|
|
713
713
|
"aria-label": a("releaseTargets"),
|
|
714
|
-
value:
|
|
714
|
+
value: l,
|
|
715
715
|
disabled: i,
|
|
716
716
|
onChange: (e) => u(e.target.value),
|
|
717
717
|
onBlur: f,
|
|
@@ -721,77 +721,77 @@ function le({ workspace: e, team: r, disabled: i }) {
|
|
|
721
721
|
})
|
|
722
722
|
});
|
|
723
723
|
}
|
|
724
|
-
function ue({ workspace:
|
|
725
|
-
let a =
|
|
726
|
-
mutationFn: async (i) =>
|
|
724
|
+
function ue({ workspace: n, team: r, isAdmin: i }) {
|
|
725
|
+
let a = G("team"), o = W(), c = Z(), l = Y({
|
|
726
|
+
mutationFn: async (i) => t(await e.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
|
|
727
727
|
params: { path: {
|
|
728
|
-
workspace:
|
|
728
|
+
workspace: n,
|
|
729
729
|
key: r.key
|
|
730
730
|
} },
|
|
731
731
|
body: { requireKnownTerms: i }
|
|
732
732
|
})),
|
|
733
|
-
onSettled: () =>
|
|
733
|
+
onSettled: () => c.invalidateQueries({ queryKey: s(n).queryKey })
|
|
734
734
|
});
|
|
735
|
-
return /* @__PURE__ */ q(
|
|
735
|
+
return /* @__PURE__ */ q(z, {
|
|
736
736
|
title: a("agentQuestions"),
|
|
737
737
|
description: a("agentQuestionsDescription"),
|
|
738
|
-
children: /* @__PURE__ */ q(
|
|
738
|
+
children: /* @__PURE__ */ q(R, {
|
|
739
739
|
label: a("requireKnownTerms"),
|
|
740
740
|
helpText: a("requireKnownTermsHelp"),
|
|
741
|
-
error:
|
|
742
|
-
children: /* @__PURE__ */ q(
|
|
741
|
+
error: l.isError ? o(l.error) : null,
|
|
742
|
+
children: /* @__PURE__ */ q(B, {
|
|
743
743
|
"aria-label": a("requireKnownTerms"),
|
|
744
744
|
checked: r.requireKnownTerms,
|
|
745
|
-
disabled: !i ||
|
|
746
|
-
onCheckedChange: (e) =>
|
|
745
|
+
disabled: !i || l.isPending,
|
|
746
|
+
onCheckedChange: (e) => l.mutate(e)
|
|
747
747
|
})
|
|
748
748
|
})
|
|
749
749
|
});
|
|
750
750
|
}
|
|
751
|
-
function de({ workspace:
|
|
752
|
-
let { data: s } = Q(
|
|
751
|
+
function de({ workspace: n, teamKey: r, isAdmin: a }) {
|
|
752
|
+
let { data: s } = Q(o(n, r)), { data: c } = Q(i), { members: l, person: u } = ee(n), d = Z(), f = H(), p = E(), [h, g] = U(null), v = G("team"), y = W(), b = G("common"), x = Y({
|
|
753
753
|
mutationFn: async (i) => {
|
|
754
754
|
for (let { username: a, add: o } of i) {
|
|
755
755
|
let i = { params: { path: {
|
|
756
|
-
workspace:
|
|
756
|
+
workspace: n,
|
|
757
757
|
key: r,
|
|
758
758
|
username: a
|
|
759
759
|
} } };
|
|
760
|
-
|
|
760
|
+
t(o ? await e.PUT("/api/v1/workspaces/{workspace}/teams/{key}/members/{username}", i) : await e.DELETE("/api/v1/workspaces/{workspace}/teams/{key}/members/{username}", i));
|
|
761
761
|
}
|
|
762
762
|
},
|
|
763
|
-
onMutate: () =>
|
|
764
|
-
onError: (e) =>
|
|
765
|
-
onSettled: () =>
|
|
766
|
-
}),
|
|
763
|
+
onMutate: () => g(null),
|
|
764
|
+
onError: (e) => g(y(e)),
|
|
765
|
+
onSettled: () => d.invalidateQueries({ queryKey: o(n, r).queryKey })
|
|
766
|
+
}), S = (e) => x.mutate([...e.filter((e) => !s.includes(e)).map((e) => ({
|
|
767
767
|
username: e,
|
|
768
768
|
add: !0
|
|
769
769
|
})), ...s.filter((t) => !e.includes(t)).map((e) => ({
|
|
770
770
|
username: e,
|
|
771
771
|
add: !1
|
|
772
|
-
}))]),
|
|
773
|
-
return /* @__PURE__ */ J(
|
|
772
|
+
}))]), w = c?.user.username ?? "", T = s.includes(w);
|
|
773
|
+
return /* @__PURE__ */ J(I, {
|
|
774
774
|
variant: "bare",
|
|
775
775
|
headingLevel: 2,
|
|
776
776
|
collapsible: !1,
|
|
777
|
-
title:
|
|
778
|
-
description:
|
|
779
|
-
actions: /* @__PURE__ */ J(
|
|
777
|
+
title: v("members"),
|
|
778
|
+
description: v("membersDescription"),
|
|
779
|
+
actions: /* @__PURE__ */ J(K, { children: [!T && /* @__PURE__ */ q(A, {
|
|
780
780
|
type: "button",
|
|
781
781
|
size: "sm",
|
|
782
782
|
variant: "primary",
|
|
783
|
-
onClick: () =>
|
|
784
|
-
username:
|
|
783
|
+
onClick: () => x.mutate([{
|
|
784
|
+
username: w,
|
|
785
785
|
add: !0
|
|
786
786
|
}]),
|
|
787
|
-
children:
|
|
788
|
-
}), a && /* @__PURE__ */ q(
|
|
787
|
+
children: v("join")
|
|
788
|
+
}), a && /* @__PURE__ */ q(M, {
|
|
789
789
|
multiple: !0,
|
|
790
|
-
items:
|
|
790
|
+
items: l.map((e) => ({
|
|
791
791
|
value: e.user.username,
|
|
792
792
|
label: e.user.name,
|
|
793
793
|
hint: e.user.email,
|
|
794
|
-
icon: /* @__PURE__ */ q(
|
|
794
|
+
icon: /* @__PURE__ */ q(k, {
|
|
795
795
|
name: e.user.name,
|
|
796
796
|
src: e.user.avatarUrl,
|
|
797
797
|
size: "xs",
|
|
@@ -799,99 +799,99 @@ function de({ workspace: e, teamKey: r, isAdmin: a }) {
|
|
|
799
799
|
})
|
|
800
800
|
})),
|
|
801
801
|
value: s,
|
|
802
|
-
onValueChange:
|
|
802
|
+
onValueChange: S,
|
|
803
803
|
align: "end",
|
|
804
|
-
placeholder:
|
|
805
|
-
"aria-label":
|
|
806
|
-
trigger: /* @__PURE__ */ J(
|
|
804
|
+
placeholder: v("addPlaceholder"),
|
|
805
|
+
"aria-label": v("addMember"),
|
|
806
|
+
trigger: /* @__PURE__ */ J(A, {
|
|
807
807
|
type: "button",
|
|
808
808
|
size: "sm",
|
|
809
|
-
loading:
|
|
809
|
+
loading: x.isPending,
|
|
810
810
|
children: [
|
|
811
|
-
/* @__PURE__ */ q(
|
|
811
|
+
/* @__PURE__ */ q(m, { className: "size-3.5" }),
|
|
812
812
|
" ",
|
|
813
|
-
|
|
813
|
+
v("addMember")
|
|
814
814
|
]
|
|
815
815
|
})
|
|
816
816
|
})] }),
|
|
817
|
-
children: [/* @__PURE__ */ J(
|
|
817
|
+
children: [/* @__PURE__ */ J(j, {
|
|
818
818
|
size: "fill",
|
|
819
819
|
padding: "none",
|
|
820
820
|
divided: !0,
|
|
821
821
|
interactive: !1,
|
|
822
822
|
render: /* @__PURE__ */ q("ul", {}),
|
|
823
|
-
children: [s.map((
|
|
824
|
-
onContextMenu: (
|
|
823
|
+
children: [s.map((e) => /* @__PURE__ */ J("li", {
|
|
824
|
+
onContextMenu: (t) => f(t, [
|
|
825
825
|
{
|
|
826
|
-
label:
|
|
827
|
-
onClick: () =>
|
|
826
|
+
label: v("viewIssues"),
|
|
827
|
+
onClick: () => p({
|
|
828
828
|
to: "/$workspace/teams/$key/issues",
|
|
829
829
|
params: {
|
|
830
|
-
workspace:
|
|
830
|
+
workspace: n,
|
|
831
831
|
key: r
|
|
832
832
|
},
|
|
833
|
-
search: { assignee:
|
|
833
|
+
search: { assignee: e }
|
|
834
834
|
})
|
|
835
835
|
},
|
|
836
|
-
|
|
837
|
-
...a ||
|
|
838
|
-
label:
|
|
836
|
+
C(b("copyEmail"), u(e).email ?? ""),
|
|
837
|
+
...a || e === w ? [V, {
|
|
838
|
+
label: v(e === w ? "leaveTeam" : "removeFromTeam"),
|
|
839
839
|
destructive: !0,
|
|
840
|
-
onClick: () =>
|
|
841
|
-
username:
|
|
840
|
+
onClick: () => x.mutate([{
|
|
841
|
+
username: e,
|
|
842
842
|
add: !1
|
|
843
843
|
}])
|
|
844
844
|
}] : []
|
|
845
845
|
]),
|
|
846
846
|
className: "flex items-center gap-3 px-3 py-2 text-sm",
|
|
847
847
|
children: [
|
|
848
|
-
/* @__PURE__ */ q(
|
|
849
|
-
workspace:
|
|
850
|
-
handle:
|
|
851
|
-
children: /* @__PURE__ */ q(
|
|
852
|
-
name:
|
|
853
|
-
src:
|
|
848
|
+
/* @__PURE__ */ q(_, {
|
|
849
|
+
workspace: n,
|
|
850
|
+
handle: e,
|
|
851
|
+
children: /* @__PURE__ */ q(k, {
|
|
852
|
+
name: u(e).name,
|
|
853
|
+
src: u(e).avatarUrl,
|
|
854
854
|
size: "md"
|
|
855
855
|
})
|
|
856
856
|
}),
|
|
857
857
|
/* @__PURE__ */ J("span", {
|
|
858
858
|
className: "flex-1",
|
|
859
|
-
children: [
|
|
859
|
+
children: [u(e).name, e === w && /* @__PURE__ */ J("span", {
|
|
860
860
|
className: "text-muted-foreground",
|
|
861
|
-
children: [" ",
|
|
861
|
+
children: [" ", v("you")]
|
|
862
862
|
})]
|
|
863
863
|
}),
|
|
864
|
-
(a ||
|
|
864
|
+
(a || e === w) && /* @__PURE__ */ q("button", {
|
|
865
865
|
type: "button",
|
|
866
|
-
onClick: () =>
|
|
867
|
-
username:
|
|
866
|
+
onClick: () => x.mutate([{
|
|
867
|
+
username: e,
|
|
868
868
|
add: !1
|
|
869
869
|
}]),
|
|
870
870
|
className: "text-xs text-muted-foreground hover:text-danger",
|
|
871
|
-
children:
|
|
871
|
+
children: e === w ? v("leave") : b("remove")
|
|
872
872
|
})
|
|
873
873
|
]
|
|
874
|
-
},
|
|
874
|
+
}, e)), s.length === 0 && /* @__PURE__ */ q("li", {
|
|
875
875
|
className: "px-3 py-2 text-sm text-muted-foreground",
|
|
876
|
-
children:
|
|
876
|
+
children: v("noMembers")
|
|
877
877
|
})]
|
|
878
|
-
}), /* @__PURE__ */ q(
|
|
878
|
+
}), /* @__PURE__ */ q(P, {
|
|
879
879
|
size: "md",
|
|
880
880
|
className: "mt-2",
|
|
881
|
-
children:
|
|
881
|
+
children: h
|
|
882
882
|
})]
|
|
883
883
|
});
|
|
884
884
|
}
|
|
885
|
-
function fe({ workspace:
|
|
886
|
-
let { data:
|
|
887
|
-
mutationFn: async (
|
|
885
|
+
function fe({ workspace: r, teamKey: i }) {
|
|
886
|
+
let { data: o } = Q(a(r, i)), { data: l } = Q(s(r)), u = Z(), d = G("team"), f = Y({
|
|
887
|
+
mutationFn: async (n) => t(await e.PUT("/api/v1/workspaces/{workspace}/teams/{key}/access", {
|
|
888
888
|
params: { path: {
|
|
889
|
-
workspace:
|
|
890
|
-
key:
|
|
889
|
+
workspace: r,
|
|
890
|
+
key: i
|
|
891
891
|
} },
|
|
892
892
|
body: {
|
|
893
|
-
restricted: !!
|
|
894
|
-
grants:
|
|
893
|
+
restricted: !!n.restricted,
|
|
894
|
+
grants: n.grants.map((e) => ({
|
|
895
895
|
principal: {
|
|
896
896
|
kind: e.principal.kind,
|
|
897
897
|
handle: e.principal.handle
|
|
@@ -900,55 +900,55 @@ function fe({ workspace: e, teamKey: r }) {
|
|
|
900
900
|
}))
|
|
901
901
|
}
|
|
902
902
|
})),
|
|
903
|
-
onSuccess: (
|
|
903
|
+
onSuccess: (e) => u.setQueryData(a(r, i).queryKey, e),
|
|
904
904
|
onSettled: () => {
|
|
905
|
-
|
|
905
|
+
u.invalidateQueries({ queryKey: a(r, i).queryKey }), u.invalidateQueries({ queryKey: s(r).queryKey }), n(u, r);
|
|
906
906
|
}
|
|
907
907
|
});
|
|
908
|
-
return /* @__PURE__ */ q(
|
|
908
|
+
return /* @__PURE__ */ q(I, {
|
|
909
909
|
variant: "bare",
|
|
910
910
|
headingLevel: 2,
|
|
911
911
|
collapsible: !1,
|
|
912
|
-
title:
|
|
913
|
-
description:
|
|
914
|
-
children: /* @__PURE__ */ q(
|
|
915
|
-
workspace:
|
|
916
|
-
resourceName:
|
|
917
|
-
access:
|
|
918
|
-
save: (e) =>
|
|
919
|
-
openLabel:
|
|
912
|
+
title: d("access"),
|
|
913
|
+
description: d("accessDescription"),
|
|
914
|
+
children: /* @__PURE__ */ q(c, {
|
|
915
|
+
workspace: r,
|
|
916
|
+
resourceName: l.find((e) => e.key === i)?.name ?? i,
|
|
917
|
+
access: o,
|
|
918
|
+
save: (e) => f.mutateAsync(e),
|
|
919
|
+
openLabel: d("everyone"),
|
|
920
920
|
rules: [{
|
|
921
921
|
id: "admins",
|
|
922
|
-
icon: /* @__PURE__ */ q(
|
|
923
|
-
title:
|
|
924
|
-
detail:
|
|
922
|
+
icon: /* @__PURE__ */ q(h, { className: "size-4" }),
|
|
923
|
+
title: d("admins"),
|
|
924
|
+
detail: d("adminsDetail"),
|
|
925
925
|
roleId: "admin"
|
|
926
|
-
}, ...
|
|
926
|
+
}, ...o.restricted ? [] : [{
|
|
927
927
|
id: "everyone",
|
|
928
|
-
icon: /* @__PURE__ */ q(
|
|
929
|
-
title:
|
|
930
|
-
detail:
|
|
928
|
+
icon: /* @__PURE__ */ q(g, { className: "size-4" }),
|
|
929
|
+
title: d("everyone"),
|
|
930
|
+
detail: d("everyoneDetail")
|
|
931
931
|
}]]
|
|
932
932
|
})
|
|
933
933
|
});
|
|
934
934
|
}
|
|
935
|
-
function pe({ workspace:
|
|
936
|
-
let i =
|
|
937
|
-
mutationFn: async (i) =>
|
|
935
|
+
function pe({ workspace: n, team: r }) {
|
|
936
|
+
let i = G("team"), a = Z(), o = W(), { confirm: c, dialog: l } = S(), u = !!r.archivedAt, d = Y({
|
|
937
|
+
mutationFn: async (i) => t(await e.PATCH("/api/v1/workspaces/{workspace}/teams/{key}", {
|
|
938
938
|
params: { path: {
|
|
939
|
-
workspace:
|
|
939
|
+
workspace: n,
|
|
940
940
|
key: r.key
|
|
941
941
|
} },
|
|
942
942
|
body: { archived: i }
|
|
943
943
|
})),
|
|
944
|
-
onSettled: () => a.invalidateQueries({ queryKey:
|
|
945
|
-
}), f = () =>
|
|
944
|
+
onSettled: () => a.invalidateQueries({ queryKey: s(n).queryKey })
|
|
945
|
+
}), f = () => c({
|
|
946
946
|
title: i("archiveConfirm", { name: r.name }),
|
|
947
947
|
description: i("archiveDetail"),
|
|
948
948
|
confirmLabel: i("archive"),
|
|
949
949
|
onConfirm: () => d.mutateAsync(!0)
|
|
950
950
|
});
|
|
951
|
-
return /* @__PURE__ */ J(
|
|
951
|
+
return /* @__PURE__ */ J(I, {
|
|
952
952
|
variant: "card",
|
|
953
953
|
...!u && { tone: "error" },
|
|
954
954
|
collapsible: !1,
|
|
@@ -956,41 +956,41 @@ function pe({ workspace: e, team: r }) {
|
|
|
956
956
|
title: i(u ? "archived" : "dangerZone"),
|
|
957
957
|
description: i(u ? "archivedDetail" : "archiveDetail"),
|
|
958
958
|
children: [
|
|
959
|
-
u ? /* @__PURE__ */ q(
|
|
959
|
+
u ? /* @__PURE__ */ q(A, {
|
|
960
960
|
onClick: () => d.mutate(!1),
|
|
961
961
|
loading: d.isPending,
|
|
962
962
|
children: i("restore")
|
|
963
|
-
}) : /* @__PURE__ */ q(
|
|
963
|
+
}) : /* @__PURE__ */ q(A, {
|
|
964
964
|
variant: "danger",
|
|
965
965
|
onClick: f,
|
|
966
966
|
loading: d.isPending,
|
|
967
967
|
children: i("archive")
|
|
968
968
|
}),
|
|
969
|
-
d.error && !d.variables && /* @__PURE__ */ q(
|
|
969
|
+
d.error && !d.variables && /* @__PURE__ */ q(P, {
|
|
970
970
|
size: "md",
|
|
971
971
|
className: "mt-3",
|
|
972
972
|
children: o(d.error)
|
|
973
973
|
}),
|
|
974
|
-
|
|
974
|
+
l,
|
|
975
975
|
/* @__PURE__ */ q(me, {
|
|
976
|
-
workspace:
|
|
976
|
+
workspace: n,
|
|
977
977
|
team: r
|
|
978
978
|
})
|
|
979
979
|
]
|
|
980
980
|
});
|
|
981
981
|
}
|
|
982
|
-
function me({ workspace:
|
|
983
|
-
let
|
|
984
|
-
mutationFn: async () =>
|
|
985
|
-
workspace:
|
|
982
|
+
function me({ workspace: n, team: r }) {
|
|
983
|
+
let i = G("team"), a = Z(), o = E(), c = W(), [l, u] = U(!1), [d, f] = U(""), [p, m] = U(null), h = Y({
|
|
984
|
+
mutationFn: async () => t(await e.DELETE("/api/v1/workspaces/{workspace}/teams/{key}", { params: { path: {
|
|
985
|
+
workspace: n,
|
|
986
986
|
key: r.key
|
|
987
987
|
} } })),
|
|
988
988
|
onSuccess: async () => {
|
|
989
|
-
|
|
989
|
+
a.setQueryData(s(n).queryKey, (e) => e?.filter((e) => e.id !== r.id)), await o({
|
|
990
990
|
to: "/$workspace",
|
|
991
|
-
params: { workspace:
|
|
991
|
+
params: { workspace: n },
|
|
992
992
|
replace: !0
|
|
993
|
-
}), await
|
|
993
|
+
}), await a.invalidateQueries({ queryKey: s(n).queryKey });
|
|
994
994
|
}
|
|
995
995
|
});
|
|
996
996
|
return /* @__PURE__ */ J("div", {
|
|
@@ -998,42 +998,42 @@ function me({ workspace: e, team: r }) {
|
|
|
998
998
|
children: [
|
|
999
999
|
/* @__PURE__ */ q("h3", {
|
|
1000
1000
|
className: "text-sm font-medium",
|
|
1001
|
-
children:
|
|
1001
|
+
children: i("delete")
|
|
1002
1002
|
}),
|
|
1003
1003
|
/* @__PURE__ */ q("p", {
|
|
1004
1004
|
className: "mt-1 text-sm text-muted-foreground",
|
|
1005
|
-
children:
|
|
1005
|
+
children: i("deleteDetail")
|
|
1006
1006
|
}),
|
|
1007
|
-
/* @__PURE__ */ q(
|
|
1007
|
+
/* @__PURE__ */ q(A, {
|
|
1008
1008
|
variant: "danger",
|
|
1009
1009
|
className: "mt-3",
|
|
1010
|
-
onClick: () =>
|
|
1011
|
-
children:
|
|
1010
|
+
onClick: () => u(!0),
|
|
1011
|
+
children: i("delete")
|
|
1012
1012
|
}),
|
|
1013
|
-
/* @__PURE__ */ q(
|
|
1014
|
-
open:
|
|
1013
|
+
/* @__PURE__ */ q(te, {
|
|
1014
|
+
open: l,
|
|
1015
1015
|
onClose: () => {
|
|
1016
|
-
|
|
1016
|
+
u(!1), f(""), m(null);
|
|
1017
1017
|
},
|
|
1018
|
-
title:
|
|
1019
|
-
description:
|
|
1020
|
-
confirmLabel:
|
|
1018
|
+
title: i("deleteConfirm", { name: r.name }),
|
|
1019
|
+
description: i("deleteConfirmDetail"),
|
|
1020
|
+
confirmLabel: i("delete"),
|
|
1021
1021
|
destructive: !0,
|
|
1022
1022
|
initialFocus: "first-control",
|
|
1023
|
-
confirmDisabled:
|
|
1024
|
-
pending:
|
|
1025
|
-
error:
|
|
1026
|
-
onConfirm: () =>
|
|
1027
|
-
throw
|
|
1023
|
+
confirmDisabled: d.trim() !== r.key,
|
|
1024
|
+
pending: h.isPending,
|
|
1025
|
+
error: p ? c(p) : void 0,
|
|
1026
|
+
onConfirm: () => h.mutateAsync().catch((e) => {
|
|
1027
|
+
throw m(e), e;
|
|
1028
1028
|
}),
|
|
1029
1029
|
children: /* @__PURE__ */ J("label", {
|
|
1030
1030
|
className: "mt-3 block text-sm",
|
|
1031
|
-
children: [
|
|
1031
|
+
children: [i.rich("deleteTypeKey", { key: () => /* @__PURE__ */ q("code", {
|
|
1032
1032
|
className: "font-mono",
|
|
1033
1033
|
children: r.key
|
|
1034
|
-
}) }), /* @__PURE__ */ q(
|
|
1035
|
-
value:
|
|
1036
|
-
onChange: (e) =>
|
|
1034
|
+
}) }), /* @__PURE__ */ q(F, {
|
|
1035
|
+
value: d,
|
|
1036
|
+
onChange: (e) => f(e.target.value),
|
|
1037
1037
|
autoComplete: "off",
|
|
1038
1038
|
spellCheck: !1,
|
|
1039
1039
|
className: "mt-1.5 w-full"
|