@parallelworks/tandem-web 0.168.0 → 0.168.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_virtual/_virtual_i18n/en/common.js +2 -1
- package/_virtual/_virtual_i18n/es/common.js +2 -1
- package/_virtual/_virtual_i18n/ja/common.js +2 -1
- package/_virtual/_virtual_i18n/ko/common.js +2 -1
- package/_virtual/_virtual_i18n/zh/common.js +2 -1
- package/lib/cycleOrder.js +3 -0
- package/package.json +1 -1
- package/pages/issues.js +1 -1
- package/routes/_workspace/settings/import2.js +69 -62
- package/routes/_workspace/teams/_key/cycles/index2.js +67 -66
|
@@ -889,6 +889,7 @@ var e = {
|
|
|
889
889
|
selectIssue: "Select issue",
|
|
890
890
|
requestCount: "{count, plural, one {# customer asked for this} other {# customers asked for this}}",
|
|
891
891
|
selectingAll: "Selecting all {count, number}…",
|
|
892
|
+
selectingAllUncounted: "Selecting all…",
|
|
892
893
|
selectAllMatching: "Select all",
|
|
893
894
|
archiveTitle: "Archive {count, plural, one {this issue} other {# issues}}?",
|
|
894
895
|
archiveDescription: "Archived issues leave lists and boards. You can restore them from the archive.",
|
|
@@ -3375,7 +3376,7 @@ var e = {
|
|
|
3375
3376
|
start: "{count, plural, one {Import # team} other {Import # teams}}",
|
|
3376
3377
|
total: "{count, plural, one {# issue} other {# issues}} to bring in",
|
|
3377
3378
|
updateOnly: "Only update issues already here",
|
|
3378
|
-
updateOnlyHelp: "
|
|
3379
|
+
updateOnlyHelp: "For a team with “Only update issues already here” checked, each Linear issue is matched to an issue here by its GitHub link, or by an earlier import, and brings in its labels, priority, estimate, project, cycle and comments. Statuses stay as they are and no new issue is created; Linear issues with no match are listed as left out. Other teams bring every issue in.",
|
|
3379
3380
|
lastImport: "Latest import from {organization}",
|
|
3380
3381
|
startedAt: "Started {date}",
|
|
3381
3382
|
issuesLabel: "Issues",
|
|
@@ -889,6 +889,7 @@ var e = {
|
|
|
889
889
|
selectIssue: "Seleccionar incidencia",
|
|
890
890
|
requestCount: "{count, plural, one {# cliente lo pidió} other {# clientes lo pidieron}}",
|
|
891
891
|
selectingAll: "Seleccionando las {count, number}…",
|
|
892
|
+
selectingAllUncounted: "Seleccionando todas…",
|
|
892
893
|
selectAllMatching: "Seleccionar todas",
|
|
893
894
|
archiveTitle: "¿Archivar {count, plural, one {esta incidencia} other {# incidencias}}?",
|
|
894
895
|
archiveDescription: "Las incidencias archivadas salen de las listas y los tableros. Puedes restaurarlas desde el archivo.",
|
|
@@ -3375,7 +3376,7 @@ var e = {
|
|
|
3375
3376
|
start: "{count, plural, one {Importar # equipo} other {Importar # equipos}}",
|
|
3376
3377
|
total: "{count, plural, one {# incidencia} other {# incidencias}} por traer",
|
|
3377
3378
|
updateOnly: "Actualizar solo las incidencias que ya están aquí",
|
|
3378
|
-
updateOnlyHelp: "
|
|
3379
|
+
updateOnlyHelp: "En un equipo con «Actualizar solo las incidencias que ya están aquí» marcado, cada incidencia de Linear se empareja con una de aquí por su enlace de GitHub, o por una importación anterior, y trae sus etiquetas, prioridad, estimación, proyecto, ciclo y comentarios. Los estados no cambian y no se crea ninguna incidencia; las de Linear sin coincidencia aparecen como omitidas. Los demás equipos traen todas las incidencias.",
|
|
3379
3380
|
lastImport: "Última importación desde {organization}",
|
|
3380
3381
|
startedAt: "Iniciada el {date}",
|
|
3381
3382
|
issuesLabel: "Incidencias",
|
|
@@ -889,6 +889,7 @@ var e = {
|
|
|
889
889
|
selectIssue: "課題を選択",
|
|
890
890
|
requestCount: "{count} 社の顧客が要望",
|
|
891
891
|
selectingAll: "{count, number} 件すべてを選択中…",
|
|
892
|
+
selectingAllUncounted: "すべてを選択中…",
|
|
892
893
|
selectAllMatching: "すべて選択",
|
|
893
894
|
archiveTitle: "{count, plural, one {この課題} other {# 件の課題}}をアーカイブしますか?",
|
|
894
895
|
archiveDescription: "アーカイブした課題はリストとボードから外れます。アーカイブから元に戻せます。",
|
|
@@ -3375,7 +3376,7 @@ var e = {
|
|
|
3375
3376
|
start: "{count, plural, other {# チームをインポート}}",
|
|
3376
3377
|
total: "取り込む課題 {count, plural, other {# 件}}",
|
|
3377
3378
|
updateOnly: "ここにある課題だけを更新する",
|
|
3378
|
-
updateOnlyHelp: "
|
|
3379
|
+
updateOnlyHelp: "「ここにある課題だけを更新する」をオンにしたチームでは、各 Linear 課題を GitHub リンクまたは以前のインポートでここの課題と照合し、ラベル、優先度、見積もり、プロジェクト、サイクル、コメントを取り込みます。ステータスは変わらず、新しい課題は作成されません。一致しない Linear 課題は除外として表示されます。他のチームはすべての課題を取り込みます。",
|
|
3379
3380
|
lastImport: "{organization} からの最新のインポート",
|
|
3380
3381
|
startedAt: "{date} に開始",
|
|
3381
3382
|
issuesLabel: "課題",
|
|
@@ -889,6 +889,7 @@ var e = {
|
|
|
889
889
|
selectIssue: "이슈 선택",
|
|
890
890
|
requestCount: "고객 {count}곳이 요청함",
|
|
891
891
|
selectingAll: "{count, number}개 모두 선택하는 중…",
|
|
892
|
+
selectingAllUncounted: "모두 선택하는 중…",
|
|
892
893
|
selectAllMatching: "모두 선택",
|
|
893
894
|
archiveTitle: "{count, plural, one {이 이슈를} other {이슈 #개를}} 보관할까요?",
|
|
894
895
|
archiveDescription: "보관한 이슈는 목록과 보드에서 빠집니다. 보관함에서 복원할 수 있습니다.",
|
|
@@ -3375,7 +3376,7 @@ var e = {
|
|
|
3375
3376
|
start: "{count, plural, other {팀 #개 가져오기}}",
|
|
3376
3377
|
total: "가져올 이슈 {count, plural, other {#개}}",
|
|
3377
3378
|
updateOnly: "여기에 있는 이슈만 업데이트",
|
|
3378
|
-
updateOnlyHelp: "각 Linear 이슈를 GitHub 링크나 이전 가져오기로 여기의 이슈와
|
|
3379
|
+
updateOnlyHelp: "\"여기에 있는 이슈만 업데이트\"를 선택한 팀에서는 각 Linear 이슈를 GitHub 링크나 이전 가져오기로 여기의 이슈와 맞추고 라벨, 우선순위, 추정치, 프로젝트, 사이클, 댓글을 가져옵니다. 상태는 그대로이며 새 이슈는 만들지 않습니다. 일치하지 않는 Linear 이슈는 제외됨으로 표시됩니다. 다른 팀은 모든 이슈를 가져옵니다.",
|
|
3379
3380
|
lastImport: "{organization}에서 가져온 최근 항목",
|
|
3380
3381
|
startedAt: "{date}에 시작",
|
|
3381
3382
|
issuesLabel: "이슈",
|
|
@@ -889,6 +889,7 @@ var e = {
|
|
|
889
889
|
selectIssue: "选择议题",
|
|
890
890
|
requestCount: "{count} 个客户提出过请求",
|
|
891
891
|
selectingAll: "正在选择全部 {count, number} 个…",
|
|
892
|
+
selectingAllUncounted: "正在选择全部…",
|
|
892
893
|
selectAllMatching: "全选",
|
|
893
894
|
archiveTitle: "归档{count, plural, one {此问题} other {# 个问题}}?",
|
|
894
895
|
archiveDescription: "归档的问题会从列表和看板中移除。你可以从归档中恢复它们。",
|
|
@@ -3375,7 +3376,7 @@ var e = {
|
|
|
3375
3376
|
start: "{count, plural, other {导入 # 个团队}}",
|
|
3376
3377
|
total: "将导入 {count, plural, other {# 个问题}}",
|
|
3377
3378
|
updateOnly: "仅更新这里已有的问题",
|
|
3378
|
-
updateOnlyHelp: "
|
|
3379
|
+
updateOnlyHelp: "对勾选了“仅更新这里已有的问题”的团队,每个 Linear 问题会通过其 GitHub 链接或之前的导入与这里的问题匹配,并带入标签、优先级、估算、项目、周期和评论。状态保持不变,也不会创建新问题;没有匹配的 Linear 问题会列为已跳过。其他团队会导入所有问题。",
|
|
3379
3380
|
lastImport: "最近一次从 {organization} 导入",
|
|
3380
3381
|
startedAt: "开始于 {date}",
|
|
3381
3382
|
issuesLabel: "问题",
|
package/package.json
CHANGED
package/pages/issues.js
CHANGED
|
@@ -576,7 +576,7 @@ function Mt({ person: e } = {}) {
|
|
|
576
576
|
children: [
|
|
577
577
|
/* @__PURE__ */ g("span", {
|
|
578
578
|
className: "whitespace-nowrap tabular-nums",
|
|
579
|
-
children: Y ? s("selectingAll", { count: Un
|
|
579
|
+
children: Y ? Un ? s("selectingAll", { count: Un.total }) : s("selectingAllUncounted") : s("selected", { count: G.size })
|
|
580
580
|
}),
|
|
581
581
|
!Y && (G.size < U.length || !B) && /* @__PURE__ */ g(l, {
|
|
582
582
|
size: "sm",
|
|
@@ -178,46 +178,50 @@ function F({ workspace: i, source: c, im: l }) {
|
|
|
178
178
|
}
|
|
179
179
|
var I = "__new__";
|
|
180
180
|
function L({ workspace: n, again: a }) {
|
|
181
|
-
let o = E("linearImport"), s = j(), { data: c } = M(i(n)), [l, d] = w(""), [m, v] = w(null), [y, S] = w({}),
|
|
181
|
+
let o = E("linearImport"), s = j(), { data: c } = M(i(n)), [l, d] = w(""), [m, v] = w(null), [y, S] = w({}), C = u(), T = c.filter((e) => !e.archivedAt), N = A({
|
|
182
182
|
mutationFn: async () => t(await e.POST("/api/v1/workspaces/{workspace}/linear/teams", {
|
|
183
183
|
params: { path: { workspace: n } },
|
|
184
184
|
body: { apiKey: l }
|
|
185
185
|
})),
|
|
186
|
-
onMutate:
|
|
186
|
+
onMutate: C.clear,
|
|
187
187
|
onSuccess: (e) => {
|
|
188
188
|
v(e), S(Object.fromEntries(e.teams.map((e) => {
|
|
189
|
-
let t =
|
|
189
|
+
let t = T.find((t) => t.key === e.key);
|
|
190
190
|
return [e.id, {
|
|
191
191
|
on: !0,
|
|
192
192
|
target: t?.key ?? I,
|
|
193
193
|
newKey: e.key,
|
|
194
|
-
newName: e.name
|
|
194
|
+
newName: e.name,
|
|
195
|
+
updateOnly: !0
|
|
195
196
|
}];
|
|
196
197
|
})));
|
|
197
198
|
},
|
|
198
|
-
onError:
|
|
199
|
-
}),
|
|
199
|
+
onError: C.set
|
|
200
|
+
}), P = A({
|
|
200
201
|
mutationFn: async () => t(await e.POST("/api/v1/workspaces/{workspace}/linear/import", {
|
|
201
202
|
params: { path: { workspace: n } },
|
|
202
203
|
body: {
|
|
203
204
|
apiKey: l,
|
|
204
|
-
updateExistingOnly:
|
|
205
|
-
teams: Object.entries(y).filter(([, e]) => e.on).map(([e, t]) =>
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
205
|
+
updateExistingOnly: !0,
|
|
206
|
+
teams: Object.entries(y).filter(([, e]) => e.on).map(([e, t]) => ({
|
|
207
|
+
...t.target === I ? {
|
|
208
|
+
sourceId: e,
|
|
209
|
+
newKey: t.newKey,
|
|
210
|
+
newName: t.newName
|
|
211
|
+
} : {
|
|
212
|
+
sourceId: e,
|
|
213
|
+
teamKey: t.target
|
|
214
|
+
},
|
|
215
|
+
updateExistingOnly: t.updateOnly ?? !0
|
|
216
|
+
}))
|
|
213
217
|
}
|
|
214
218
|
})),
|
|
215
|
-
onMutate:
|
|
219
|
+
onMutate: C.clear,
|
|
216
220
|
onSuccess: () => {
|
|
217
221
|
d(""), v(null), s.invalidateQueries({ queryKey: r(n).queryKey }), s.invalidateQueries({ queryKey: i(n).queryKey });
|
|
218
222
|
},
|
|
219
|
-
onError:
|
|
220
|
-
}),
|
|
223
|
+
onError: C.set
|
|
224
|
+
}), F = Object.values(y).filter((e) => e.on).length, L = (e, t) => S((n) => ({
|
|
221
225
|
...n,
|
|
222
226
|
[e]: {
|
|
223
227
|
...n[e],
|
|
@@ -227,7 +231,7 @@ function L({ workspace: n, again: a }) {
|
|
|
227
231
|
return /* @__PURE__ */ O(x, { children: /* @__PURE__ */ k("form", {
|
|
228
232
|
className: "space-y-4 px-3 py-3",
|
|
229
233
|
onSubmit: (e) => {
|
|
230
|
-
e.preventDefault(), m ?
|
|
234
|
+
e.preventDefault(), m ? P.mutate() : N.mutate();
|
|
231
235
|
},
|
|
232
236
|
children: [
|
|
233
237
|
/* @__PURE__ */ k("div", { children: [/* @__PURE__ */ O("h2", {
|
|
@@ -273,7 +277,7 @@ function L({ workspace: n, again: a }) {
|
|
|
273
277
|
children: [
|
|
274
278
|
/* @__PURE__ */ O(p, {
|
|
275
279
|
checked: t.on,
|
|
276
|
-
onCheckedChange: (t) =>
|
|
280
|
+
onCheckedChange: (t) => L(e.id, { on: t })
|
|
277
281
|
}),
|
|
278
282
|
/* @__PURE__ */ k("span", {
|
|
279
283
|
className: "truncate",
|
|
@@ -297,62 +301,65 @@ function L({ workspace: n, again: a }) {
|
|
|
297
301
|
]
|
|
298
302
|
}), t.on && /* @__PURE__ */ k("div", {
|
|
299
303
|
className: "flex basis-full flex-wrap items-center gap-2 pl-6 sm:basis-auto sm:pl-0",
|
|
300
|
-
children: [
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
304
|
+
children: [
|
|
305
|
+
/* @__PURE__ */ O(b, {
|
|
306
|
+
"aria-label": o("into", { team: e.name }),
|
|
307
|
+
value: t.target,
|
|
308
|
+
onValueChange: (t) => t && L(e.id, { target: t }),
|
|
309
|
+
items: [{
|
|
310
|
+
value: I,
|
|
311
|
+
label: o("newTeam")
|
|
312
|
+
}, ...T.map((e) => ({
|
|
313
|
+
value: e.key,
|
|
314
|
+
label: `${e.name} (${e.key})`
|
|
315
|
+
}))],
|
|
316
|
+
size: "sm",
|
|
317
|
+
width: "content"
|
|
318
|
+
}),
|
|
319
|
+
/* @__PURE__ */ k("label", {
|
|
320
|
+
className: "flex items-center gap-2 text-xs",
|
|
321
|
+
children: [/* @__PURE__ */ O(p, {
|
|
322
|
+
checked: t.updateOnly ?? !0,
|
|
323
|
+
onCheckedChange: (t) => L(e.id, { updateOnly: t })
|
|
324
|
+
}), o("updateOnly")]
|
|
325
|
+
}),
|
|
326
|
+
t.target === I && /* @__PURE__ */ k(D, { children: [/* @__PURE__ */ O(_, {
|
|
327
|
+
"aria-label": o("newKey"),
|
|
328
|
+
value: t.newKey,
|
|
329
|
+
onChange: (t) => L(e.id, { newKey: t.target.value.toUpperCase() }),
|
|
330
|
+
className: "w-24",
|
|
331
|
+
maxLength: 10,
|
|
332
|
+
required: !0
|
|
333
|
+
}), /* @__PURE__ */ O(_, {
|
|
334
|
+
"aria-label": o("newName"),
|
|
335
|
+
value: t.newName,
|
|
336
|
+
onChange: (t) => L(e.id, { newName: t.target.value }),
|
|
337
|
+
className: "w-44",
|
|
338
|
+
required: !0
|
|
339
|
+
})] })
|
|
340
|
+
]
|
|
327
341
|
})]
|
|
328
342
|
}, e.id) : null;
|
|
329
343
|
})
|
|
330
344
|
})
|
|
331
345
|
]
|
|
332
346
|
}),
|
|
333
|
-
m && /* @__PURE__ */
|
|
334
|
-
className: "
|
|
335
|
-
children:
|
|
336
|
-
className: "mt-0.5",
|
|
337
|
-
checked: C,
|
|
338
|
-
onCheckedChange: T
|
|
339
|
-
}), /* @__PURE__ */ k("span", { children: [o("updateOnly"), /* @__PURE__ */ O("span", {
|
|
340
|
-
className: "block text-xs text-muted-foreground",
|
|
341
|
-
children: o("updateOnlyHelp")
|
|
342
|
-
})] })]
|
|
347
|
+
m && /* @__PURE__ */ O("p", {
|
|
348
|
+
className: "text-xs text-muted-foreground",
|
|
349
|
+
children: o("updateOnlyHelp")
|
|
343
350
|
}),
|
|
344
351
|
/* @__PURE__ */ k("div", {
|
|
345
352
|
className: "flex flex-wrap items-center gap-3",
|
|
346
353
|
children: [m ? /* @__PURE__ */ O(f, {
|
|
347
354
|
type: "submit",
|
|
348
355
|
variant: "primary",
|
|
349
|
-
loading:
|
|
350
|
-
disabled:
|
|
351
|
-
children: o("start", { count:
|
|
356
|
+
loading: P.isPending,
|
|
357
|
+
disabled: F === 0,
|
|
358
|
+
children: o("start", { count: F })
|
|
352
359
|
}) : /* @__PURE__ */ O(f, {
|
|
353
360
|
type: "submit",
|
|
354
361
|
variant: "primary",
|
|
355
|
-
loading:
|
|
362
|
+
loading: N.isPending,
|
|
356
363
|
children: o("findTeams")
|
|
357
364
|
}), m && /* @__PURE__ */ O("span", {
|
|
358
365
|
className: "text-xs text-muted-foreground",
|
|
@@ -361,7 +368,7 @@ function L({ workspace: n, again: a }) {
|
|
|
361
368
|
}),
|
|
362
369
|
/* @__PURE__ */ O(h, {
|
|
363
370
|
size: "md",
|
|
364
|
-
children:
|
|
371
|
+
children: C.error
|
|
365
372
|
})
|
|
366
373
|
]
|
|
367
374
|
}) });
|
|
@@ -8,24 +8,25 @@ import { useCan as l } from "../../../../../lib/roles.js";
|
|
|
8
8
|
import { teamPath as u } from "../../../../../lib/teamPaths.js";
|
|
9
9
|
import { Route as d } from "./index.js";
|
|
10
10
|
import { BurnUp as f } from "../../../../../components/Reports.js";
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
11
|
+
import { byStart as p } from "../../../../../lib/cycleOrder.js";
|
|
12
|
+
import { Button as m, EmptyState as h, ErrorText as g, PageHeader as _, StatusBadge as v } from "@parallelworks/ui";
|
|
13
|
+
import { useState as y } from "react";
|
|
14
|
+
import { useErrorMessage as b } from "@parallelworks/problem/react";
|
|
15
|
+
import { useFormatter as x, useTranslations as S } from "use-intl";
|
|
16
|
+
import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
17
|
+
import { useMutation as E, useQueryClient as D, useSuspenseQuery as O } from "@tanstack/react-query";
|
|
17
18
|
// src/routes/$workspace/teams/$key/cycles/index.tsx?tsr-split=component
|
|
18
|
-
var
|
|
19
|
-
function
|
|
20
|
-
let t = e.filter((e) => e.state === "past").sort(
|
|
19
|
+
var k = 5, A = (e) => e.progress.total + e.carriedOut;
|
|
20
|
+
function j(e) {
|
|
21
|
+
let t = e.filter((e) => e.state === "past").sort(p).slice(-3);
|
|
21
22
|
if (t.length === 0) return null;
|
|
22
23
|
let n = t.reduce((e, t) => e + t.progress.completed, 0) / t.length;
|
|
23
24
|
return n > 0 ? n : null;
|
|
24
25
|
}
|
|
25
|
-
function
|
|
26
|
-
let { workspace: c, key: f } = d.useParams(),
|
|
27
|
-
n(
|
|
28
|
-
let
|
|
26
|
+
function M() {
|
|
27
|
+
let { workspace: c, key: f } = d.useParams(), v = S("planning"), x = b(), { data: A } = O(a(c)), { data: M } = O(i(c, f)), P = A.find((e) => e.key === f);
|
|
28
|
+
n(v("cycles"), P?.name);
|
|
29
|
+
let F = l(c, "manage_cycles", { team: f }), I = D(), [L, R] = y(!1), z = E({
|
|
29
30
|
mutationFn: async () => t(await e.POST("/api/v1/workspaces/{workspace}/teams/{key}/cycles", {
|
|
30
31
|
params: { path: {
|
|
31
32
|
workspace: c,
|
|
@@ -33,76 +34,76 @@ function j() {
|
|
|
33
34
|
} },
|
|
34
35
|
body: {}
|
|
35
36
|
})),
|
|
36
|
-
onSettled: () =>
|
|
37
|
-
}),
|
|
38
|
-
return /* @__PURE__ */
|
|
37
|
+
onSettled: () => I.invalidateQueries({ queryKey: i(c, f).queryKey })
|
|
38
|
+
}), B = [...M].sort(p), V = B.filter((e) => e.state === "past"), H = L ? 0 : Math.max(0, V.length - k), U = B.filter((e) => e.state !== "past" || V.indexOf(e) >= H), W = j(M);
|
|
39
|
+
return /* @__PURE__ */ T("div", {
|
|
39
40
|
className: "flex h-full min-h-0 flex-col",
|
|
40
|
-
children: [/* @__PURE__ */
|
|
41
|
+
children: [/* @__PURE__ */ w(_, {
|
|
41
42
|
heading: !1,
|
|
42
43
|
breadcrumbs: [{
|
|
43
|
-
label:
|
|
44
|
+
label: P?.name ?? f,
|
|
44
45
|
href: u(c, f, "issues")
|
|
45
|
-
}, { label:
|
|
46
|
-
}), /* @__PURE__ */
|
|
46
|
+
}, { label: v("cycles") }]
|
|
47
|
+
}), /* @__PURE__ */ w("div", {
|
|
47
48
|
className: "min-h-0 flex-1 overflow-y-auto",
|
|
48
|
-
children: /* @__PURE__ */
|
|
49
|
+
children: /* @__PURE__ */ T("div", {
|
|
49
50
|
className: "w-full px-4 py-6 md:px-8 md:py-8",
|
|
50
51
|
children: [
|
|
51
|
-
/* @__PURE__ */
|
|
52
|
+
/* @__PURE__ */ T("div", {
|
|
52
53
|
className: "flex items-center gap-3",
|
|
53
|
-
children: [/* @__PURE__ */
|
|
54
|
+
children: [/* @__PURE__ */ w("div", {
|
|
54
55
|
className: "min-w-0",
|
|
55
|
-
children: /* @__PURE__ */
|
|
56
|
+
children: /* @__PURE__ */ w("h1", {
|
|
56
57
|
className: "text-xl font-semibold tracking-tight",
|
|
57
|
-
children:
|
|
58
|
+
children: v("cycles")
|
|
58
59
|
})
|
|
59
|
-
}),
|
|
60
|
+
}), F && P?.cyclesEnabled && /* @__PURE__ */ T(m, {
|
|
60
61
|
type: "button",
|
|
61
|
-
onClick: () =>
|
|
62
|
-
loading:
|
|
62
|
+
onClick: () => z.mutate(),
|
|
63
|
+
loading: z.isPending,
|
|
63
64
|
className: "ml-auto",
|
|
64
|
-
children: [/* @__PURE__ */
|
|
65
|
+
children: [/* @__PURE__ */ w(o, { className: "size-3.5" }), v("newCycle")]
|
|
65
66
|
})]
|
|
66
67
|
}),
|
|
67
|
-
|
|
68
|
+
z.isError && /* @__PURE__ */ w(g, {
|
|
68
69
|
size: "md",
|
|
69
70
|
className: "mt-2",
|
|
70
|
-
children:
|
|
71
|
+
children: x(z.error)
|
|
71
72
|
}),
|
|
72
|
-
!
|
|
73
|
+
!P?.cyclesEnabled && M.length === 0 ? /* @__PURE__ */ w("div", {
|
|
73
74
|
className: "mt-8",
|
|
74
|
-
children: /* @__PURE__ */
|
|
75
|
-
icon: /* @__PURE__ */
|
|
76
|
-
title:
|
|
77
|
-
description:
|
|
78
|
-
action: /* @__PURE__ */
|
|
75
|
+
children: /* @__PURE__ */ w(h, {
|
|
76
|
+
icon: /* @__PURE__ */ w(s, {}),
|
|
77
|
+
title: v("cyclesOff"),
|
|
78
|
+
description: v("cyclesOffDescription"),
|
|
79
|
+
action: /* @__PURE__ */ w(r, {
|
|
79
80
|
to: "/$workspace/teams/$key/settings",
|
|
80
81
|
params: {
|
|
81
82
|
workspace: c,
|
|
82
83
|
key: f
|
|
83
84
|
},
|
|
84
85
|
className: "text-sm text-primary hover:underline",
|
|
85
|
-
children:
|
|
86
|
+
children: v("teamSettings")
|
|
86
87
|
})
|
|
87
88
|
})
|
|
88
|
-
}) : /* @__PURE__ */
|
|
89
|
+
}) : /* @__PURE__ */ T(C, { children: [V.length > k && /* @__PURE__ */ w("div", {
|
|
89
90
|
className: "mt-4 flex justify-center",
|
|
90
|
-
children: /* @__PURE__ */
|
|
91
|
+
children: /* @__PURE__ */ w(m, {
|
|
91
92
|
type: "button",
|
|
92
93
|
variant: "ghost",
|
|
93
94
|
size: "sm",
|
|
94
|
-
onClick: () =>
|
|
95
|
-
children:
|
|
95
|
+
onClick: () => R(!L),
|
|
96
|
+
children: L ? v("fewerCycles") : v("olderCycles", { count: V.length - k })
|
|
96
97
|
})
|
|
97
|
-
}), /* @__PURE__ */
|
|
98
|
+
}), /* @__PURE__ */ w("ol", {
|
|
98
99
|
className: "relative mt-6",
|
|
99
|
-
children:
|
|
100
|
+
children: U.map((e, t) => /* @__PURE__ */ w(N, {
|
|
100
101
|
workspace: c,
|
|
101
102
|
teamKey: f,
|
|
102
103
|
cycle: e,
|
|
103
|
-
capacity:
|
|
104
|
+
capacity: W,
|
|
104
105
|
first: t === 0,
|
|
105
|
-
last: t ===
|
|
106
|
+
last: t === U.length - 1
|
|
106
107
|
}, e.id))
|
|
107
108
|
})] })
|
|
108
109
|
]
|
|
@@ -110,11 +111,11 @@ function j() {
|
|
|
110
111
|
})]
|
|
111
112
|
});
|
|
112
113
|
}
|
|
113
|
-
function
|
|
114
|
-
let l =
|
|
114
|
+
function N({ workspace: e, teamKey: t, cycle: n, capacity: i, first: a, last: o }) {
|
|
115
|
+
let l = S("planning"), u = c(), d = x(), p = n.state === "current", m = (e) => d.number(e, {
|
|
115
116
|
style: "percent",
|
|
116
117
|
maximumFractionDigits: 0
|
|
117
|
-
}), h = n.state === "past" ?
|
|
118
|
+
}), h = n.state === "past" ? A(n) : n.progress.total, g = i !== null && n.state !== "past" && h > i, _ = n.state === "past" ? [
|
|
118
119
|
...h > 0 ? [l("success", { percent: m(n.progress.completed / h) })] : [],
|
|
119
120
|
l("completedCount", { count: n.progress.completed }),
|
|
120
121
|
l("scopeCount", { count: h }),
|
|
@@ -124,27 +125,27 @@ function M({ workspace: e, teamKey: t, cycle: n, capacity: i, first: a, last: o
|
|
|
124
125
|
l("scopeCount", { count: h }),
|
|
125
126
|
...n.carriedIn > 0 ? [l("carriedIn", { count: n.carriedIn })] : []
|
|
126
127
|
];
|
|
127
|
-
return /* @__PURE__ */
|
|
128
|
+
return /* @__PURE__ */ T("li", {
|
|
128
129
|
className: "grid grid-cols-[3.5rem_1fr] gap-x-3 md:grid-cols-[4.5rem_1fr] md:gap-x-4",
|
|
129
|
-
children: [/* @__PURE__ */
|
|
130
|
+
children: [/* @__PURE__ */ T("div", {
|
|
130
131
|
className: "relative",
|
|
131
132
|
children: [
|
|
132
|
-
/* @__PURE__ */
|
|
133
|
+
/* @__PURE__ */ w("span", {
|
|
133
134
|
className: "absolute top-4 right-5 text-right text-xs leading-tight text-muted-foreground tabular-nums",
|
|
134
135
|
children: u.day(n.startsOn)
|
|
135
136
|
}),
|
|
136
|
-
/* @__PURE__ */
|
|
137
|
+
/* @__PURE__ */ w("span", {
|
|
137
138
|
"aria-hidden": "true",
|
|
138
139
|
className: `absolute right-[7px] w-px ${a ? "top-6" : "top-0"} ${o ? "h-6" : "bottom-0"} ${a && o ? "hidden" : ""} ${p ? "bg-primary" : "bg-border"}`
|
|
139
140
|
}),
|
|
140
|
-
/* @__PURE__ */
|
|
141
|
+
/* @__PURE__ */ w("span", {
|
|
141
142
|
"aria-hidden": "true",
|
|
142
143
|
className: `absolute top-[18px] right-0.5 size-[11px] rounded-full border-2 ${p ? "border-primary bg-primary" : n.state === "past" ? "border-muted-foreground bg-muted-foreground" : "border-border bg-background"}`
|
|
143
144
|
})
|
|
144
145
|
]
|
|
145
|
-
}), /* @__PURE__ */
|
|
146
|
+
}), /* @__PURE__ */ T("div", {
|
|
146
147
|
className: `min-w-0 border-b border-border ${p ? "rounded-xl bg-muted/50" : ""}`,
|
|
147
|
-
children: [/* @__PURE__ */
|
|
148
|
+
children: [/* @__PURE__ */ T(r, {
|
|
148
149
|
to: "/$workspace/teams/$key/cycles/$number",
|
|
149
150
|
params: {
|
|
150
151
|
workspace: e,
|
|
@@ -153,38 +154,38 @@ function M({ workspace: e, teamKey: t, cycle: n, capacity: i, first: a, last: o
|
|
|
153
154
|
},
|
|
154
155
|
className: "flex flex-wrap items-center gap-x-4 gap-y-1.5 rounded-xl px-3 py-3.5 hover:bg-muted/60",
|
|
155
156
|
children: [
|
|
156
|
-
/* @__PURE__ */
|
|
157
|
+
/* @__PURE__ */ T("span", {
|
|
157
158
|
className: "flex min-w-0 flex-1 basis-full items-center gap-2 md:basis-auto",
|
|
158
|
-
children: [/* @__PURE__ */
|
|
159
|
+
children: [/* @__PURE__ */ w(s, { className: `size-4 shrink-0 ${p ? "text-primary" : "text-muted-foreground"}` }), /* @__PURE__ */ T("span", {
|
|
159
160
|
className: "min-w-0",
|
|
160
|
-
children: [/* @__PURE__ */
|
|
161
|
+
children: [/* @__PURE__ */ w("span", {
|
|
161
162
|
className: "block truncate text-sm font-medium",
|
|
162
163
|
children: n.name ? l("cycleNamed", {
|
|
163
164
|
number: n.number,
|
|
164
165
|
name: n.name
|
|
165
166
|
}) : l("cycle", { number: n.number })
|
|
166
|
-
}), /* @__PURE__ */
|
|
167
|
+
}), /* @__PURE__ */ w("span", {
|
|
167
168
|
className: "block text-xs text-muted-foreground",
|
|
168
169
|
children: u.dayRange(n.startsOn, n.endsOn)
|
|
169
170
|
})]
|
|
170
171
|
})]
|
|
171
172
|
}),
|
|
172
|
-
/* @__PURE__ */
|
|
173
|
+
/* @__PURE__ */ w(v, {
|
|
173
174
|
variant: p ? "info" : "muted",
|
|
174
175
|
size: "sm",
|
|
175
176
|
children: l(`states.${n.state}`)
|
|
176
177
|
}),
|
|
177
|
-
/* @__PURE__ */
|
|
178
|
+
/* @__PURE__ */ w("span", {
|
|
178
179
|
className: "flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-muted-foreground tabular-nums",
|
|
179
|
-
children:
|
|
180
|
+
children: _.map((e, t) => /* @__PURE__ */ w("span", {
|
|
180
181
|
className: g && t === 0 ? "font-medium text-warning" : void 0,
|
|
181
182
|
children: e
|
|
182
183
|
}, e))
|
|
183
184
|
})
|
|
184
185
|
]
|
|
185
|
-
}), p && /* @__PURE__ */
|
|
186
|
+
}), p && /* @__PURE__ */ w("div", {
|
|
186
187
|
className: "px-3 pb-4",
|
|
187
|
-
children: /* @__PURE__ */
|
|
188
|
+
children: /* @__PURE__ */ w(f, {
|
|
188
189
|
workspace: e,
|
|
189
190
|
teamKey: t,
|
|
190
191
|
cycle: n
|
|
@@ -193,4 +194,4 @@ function M({ workspace: e, teamKey: t, cycle: n, capacity: i, first: a, last: o
|
|
|
193
194
|
})]
|
|
194
195
|
});
|
|
195
196
|
}
|
|
196
|
-
export {
|
|
197
|
+
export { M as component };
|