@parallelworks/tandem-web 0.160.0 → 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 +5 -0
- package/_virtual/_virtual_i18n/es/common.js +5 -0
- package/_virtual/_virtual_i18n/ja/common.js +5 -0
- package/_virtual/_virtual_i18n/ko/common.js +5 -0
- package/_virtual/_virtual_i18n/zh/common.js +5 -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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useHost as e } from "../lib/host.js";
|
|
2
2
|
import { useNavigate as t } from "../lib/router.js";
|
|
3
|
-
import { docQuery as n, docsQuery as r, issueSearchQuery as i, knowledgeQuery as a, meQuery as o,
|
|
3
|
+
import { docQuery as n, docsQuery as r, issueSearchQuery as i, knowledgeQuery as a, meQuery as o, myTeamsQuery as ee } from "../api/queries.js";
|
|
4
4
|
import { docPath as s, useDocActions as te } from "../lib/docs.js";
|
|
5
5
|
import { AddIcon as c, AreaIcon as ne, CheckIcon as re, ChevronRightIcon as ie, CloseIcon as ae, CycleIcon as oe, FileTextIcon as l, InboxIcon as u, LibraryIcon as d, ListViewIcon as f, NotificationIcon as se, ProjectIcon as p, SearchIcon as ce, SettingsIcon as le, StatusIcon as ue, TriageIcon as de, UserIcon as m, UsersIcon as h } from "./icons.js";
|
|
6
6
|
import { headingAnchor as fe, headings as pe } from "../lib/glossary.js";
|
|
@@ -1,163 +1,159 @@
|
|
|
1
1
|
import { api as e, unwrap as t } from "../api/client.js";
|
|
2
2
|
import { customerRequestsQuery as n, customersQuery as r } from "../api/queries.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
3
|
+
import { invalidateIssueLists as i } from "../api/mutations.js";
|
|
4
|
+
import { AddIcon as a, CloseIcon as o, LinkIcon as s, UsersIcon as c } from "./icons.js";
|
|
5
|
+
import { useCan as l } from "../lib/roles.js";
|
|
6
|
+
import { Button as u, Card as d, ErrorText as f, IconButton as p, Input as m, Textarea as h } from "@parallelworks/ui";
|
|
7
|
+
import { useId as g, useState as _ } from "react";
|
|
8
|
+
import { useErrorMessage as v } from "@parallelworks/problem/react";
|
|
9
|
+
import { useTranslations as y } from "use-intl";
|
|
10
|
+
import { jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
11
|
+
import { useMutation as S, useQuery as C, useQueryClient as w } from "@tanstack/react-query";
|
|
11
12
|
// src/components/CustomerRequests.tsx
|
|
12
|
-
function
|
|
13
|
-
let
|
|
14
|
-
...r(
|
|
15
|
-
enabled:
|
|
16
|
-
}), [
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
w,
|
|
20
|
-
"issues",
|
|
21
|
-
"list"
|
|
22
|
-
] });
|
|
23
|
-
}, W = x({
|
|
13
|
+
function T({ workspace: T, identifier: E, enabled: D }) {
|
|
14
|
+
let O = y("customerRequests"), k = v(), A = w(), j = l(T, "manage_customers"), M = j && D, { data: N = [] } = C(n(T, E)), { data: P = [] } = C({
|
|
15
|
+
...r(T),
|
|
16
|
+
enabled: M
|
|
17
|
+
}), [F, I] = _(!1), [L, R] = _(""), [z, B] = _(""), [V, H] = _(""), U = g(), W = () => {
|
|
18
|
+
A.invalidateQueries({ queryKey: n(T, E).queryKey }), A.invalidateQueries({ queryKey: r(T).queryKey }), i(A, T);
|
|
19
|
+
}, G = S({
|
|
24
20
|
mutationFn: async () => t(await e.POST("/api/v1/workspaces/{workspace}/issues/{identifier}/requests", {
|
|
25
21
|
params: { path: {
|
|
26
|
-
workspace:
|
|
27
|
-
identifier:
|
|
22
|
+
workspace: T,
|
|
23
|
+
identifier: E
|
|
28
24
|
} },
|
|
29
25
|
body: {
|
|
30
|
-
customerName:
|
|
31
|
-
quote:
|
|
32
|
-
url:
|
|
26
|
+
customerName: L.trim(),
|
|
27
|
+
quote: z.trim(),
|
|
28
|
+
url: V.trim()
|
|
33
29
|
}
|
|
34
30
|
})),
|
|
35
31
|
onSuccess: () => {
|
|
36
|
-
|
|
32
|
+
I(!1), R(""), B(""), H("");
|
|
37
33
|
},
|
|
38
|
-
onSettled:
|
|
39
|
-
}),
|
|
34
|
+
onSettled: W
|
|
35
|
+
}), K = S({
|
|
40
36
|
mutationFn: async (n) => t(await e.DELETE("/api/v1/workspaces/{workspace}/issues/{identifier}/requests/{requestId}", { params: { path: {
|
|
41
|
-
workspace:
|
|
42
|
-
identifier:
|
|
37
|
+
workspace: T,
|
|
38
|
+
identifier: E,
|
|
43
39
|
requestId: n
|
|
44
40
|
} } })),
|
|
45
|
-
onSettled:
|
|
41
|
+
onSettled: W
|
|
46
42
|
});
|
|
47
|
-
return
|
|
43
|
+
return N.length === 0 && !M ? null : /* @__PURE__ */ x("section", {
|
|
48
44
|
className: "mt-6",
|
|
49
|
-
"aria-label":
|
|
45
|
+
"aria-label": O("label"),
|
|
50
46
|
children: [
|
|
51
|
-
/* @__PURE__ */
|
|
47
|
+
/* @__PURE__ */ x("h2", {
|
|
52
48
|
className: "flex items-center gap-2 text-xs font-medium text-muted-foreground",
|
|
53
|
-
children: [
|
|
49
|
+
children: [O("label"), N.length > 0 && /* @__PURE__ */ b("span", {
|
|
54
50
|
className: "tabular-nums",
|
|
55
|
-
children:
|
|
51
|
+
children: N.length
|
|
56
52
|
})]
|
|
57
53
|
}),
|
|
58
|
-
|
|
54
|
+
N.length > 0 && /* @__PURE__ */ b(d, {
|
|
59
55
|
size: "fill",
|
|
60
56
|
padding: "none",
|
|
61
57
|
divided: !0,
|
|
62
58
|
interactive: !1,
|
|
63
|
-
render: /* @__PURE__ */
|
|
59
|
+
render: /* @__PURE__ */ b("ul", {}),
|
|
64
60
|
className: "mt-1",
|
|
65
|
-
children:
|
|
61
|
+
children: N.map((e) => /* @__PURE__ */ x("li", {
|
|
66
62
|
className: "flex items-start gap-2 px-3 py-2 text-sm",
|
|
67
63
|
children: [
|
|
68
|
-
/* @__PURE__ */
|
|
69
|
-
/* @__PURE__ */
|
|
64
|
+
/* @__PURE__ */ b(c, { className: "mt-0.5 size-3.5 shrink-0 text-muted-foreground" }),
|
|
65
|
+
/* @__PURE__ */ x("div", {
|
|
70
66
|
className: "min-w-0 flex-1",
|
|
71
|
-
children: [/* @__PURE__ */
|
|
67
|
+
children: [/* @__PURE__ */ b("span", {
|
|
72
68
|
className: "font-medium",
|
|
73
69
|
children: e.customer.name
|
|
74
|
-
}), e.quote && /* @__PURE__ */
|
|
70
|
+
}), e.quote && /* @__PURE__ */ b("p", {
|
|
75
71
|
className: "mt-0.5 whitespace-pre-wrap text-muted-foreground",
|
|
76
|
-
children:
|
|
72
|
+
children: O("quoted", { quote: e.quote })
|
|
77
73
|
})]
|
|
78
74
|
}),
|
|
79
|
-
e.url && /* @__PURE__ */
|
|
75
|
+
e.url && /* @__PURE__ */ x("a", {
|
|
80
76
|
href: e.url,
|
|
81
77
|
target: "_blank",
|
|
82
78
|
rel: "noreferrer",
|
|
83
79
|
className: "inline-flex shrink-0 items-center gap-1 text-xs text-primary hover:underline",
|
|
84
|
-
children: [/* @__PURE__ */
|
|
80
|
+
children: [/* @__PURE__ */ b(s, { className: "size-3" }), O("source")]
|
|
85
81
|
}),
|
|
86
|
-
|
|
82
|
+
j && /* @__PURE__ */ b(p, {
|
|
87
83
|
variant: "ghost",
|
|
88
84
|
size: "sm",
|
|
89
|
-
icon: /* @__PURE__ */
|
|
90
|
-
label:
|
|
91
|
-
onClick: () =>
|
|
85
|
+
icon: /* @__PURE__ */ b(o, {}),
|
|
86
|
+
label: O("remove", { name: e.customer.name }),
|
|
87
|
+
onClick: () => K.mutate(e.id),
|
|
92
88
|
className: "-my-1"
|
|
93
89
|
})
|
|
94
90
|
]
|
|
95
91
|
}, e.id))
|
|
96
92
|
}),
|
|
97
|
-
|
|
93
|
+
M && (F ? /* @__PURE__ */ x("form", {
|
|
98
94
|
className: "mt-2 grid gap-2",
|
|
99
95
|
onSubmit: (e) => {
|
|
100
|
-
e.preventDefault(),
|
|
96
|
+
e.preventDefault(), L.trim() && G.mutate();
|
|
101
97
|
},
|
|
102
98
|
children: [
|
|
103
|
-
/* @__PURE__ */
|
|
99
|
+
/* @__PURE__ */ b(m, {
|
|
104
100
|
autoFocus: !0,
|
|
105
101
|
required: !0,
|
|
106
|
-
list:
|
|
107
|
-
value:
|
|
108
|
-
onChange: (e) =>
|
|
109
|
-
placeholder:
|
|
110
|
-
"aria-label":
|
|
102
|
+
list: U,
|
|
103
|
+
value: L,
|
|
104
|
+
onChange: (e) => R(e.target.value),
|
|
105
|
+
placeholder: O("customer"),
|
|
106
|
+
"aria-label": O("customer"),
|
|
111
107
|
maxLength: 200
|
|
112
108
|
}),
|
|
113
|
-
/* @__PURE__ */
|
|
114
|
-
id:
|
|
115
|
-
children:
|
|
109
|
+
/* @__PURE__ */ b("datalist", {
|
|
110
|
+
id: U,
|
|
111
|
+
children: P.map((e) => /* @__PURE__ */ b("option", { value: e.name }, e.id))
|
|
116
112
|
}),
|
|
117
|
-
/* @__PURE__ */
|
|
118
|
-
value:
|
|
119
|
-
onChange: (e) =>
|
|
120
|
-
placeholder:
|
|
121
|
-
"aria-label":
|
|
113
|
+
/* @__PURE__ */ b(h, {
|
|
114
|
+
value: z,
|
|
115
|
+
onChange: (e) => B(e.target.value),
|
|
116
|
+
placeholder: O("quote"),
|
|
117
|
+
"aria-label": O("quote"),
|
|
122
118
|
maxLength: 4e3,
|
|
123
119
|
rows: 2
|
|
124
120
|
}),
|
|
125
|
-
/* @__PURE__ */
|
|
121
|
+
/* @__PURE__ */ b(m, {
|
|
126
122
|
type: "url",
|
|
127
|
-
value:
|
|
128
|
-
onChange: (e) =>
|
|
129
|
-
placeholder:
|
|
130
|
-
"aria-label":
|
|
123
|
+
value: V,
|
|
124
|
+
onChange: (e) => H(e.target.value),
|
|
125
|
+
placeholder: O("url"),
|
|
126
|
+
"aria-label": O("url"),
|
|
131
127
|
maxLength: 2e3
|
|
132
128
|
}),
|
|
133
|
-
|
|
129
|
+
G.isError && /* @__PURE__ */ b(f, {
|
|
134
130
|
size: "md",
|
|
135
|
-
children:
|
|
131
|
+
children: k(G.error)
|
|
136
132
|
}),
|
|
137
|
-
/* @__PURE__ */
|
|
133
|
+
/* @__PURE__ */ x("div", {
|
|
138
134
|
className: "flex justify-end gap-2",
|
|
139
|
-
children: [/* @__PURE__ */
|
|
135
|
+
children: [/* @__PURE__ */ b(u, {
|
|
140
136
|
type: "button",
|
|
141
137
|
size: "sm",
|
|
142
|
-
onClick: () =>
|
|
143
|
-
children:
|
|
144
|
-
}), /* @__PURE__ */
|
|
138
|
+
onClick: () => I(!1),
|
|
139
|
+
children: O("cancel")
|
|
140
|
+
}), /* @__PURE__ */ b(u, {
|
|
145
141
|
type: "submit",
|
|
146
142
|
size: "sm",
|
|
147
143
|
variant: "primary",
|
|
148
|
-
loading:
|
|
149
|
-
disabled: !
|
|
150
|
-
children:
|
|
144
|
+
loading: G.isPending,
|
|
145
|
+
disabled: !L.trim(),
|
|
146
|
+
children: O("add")
|
|
151
147
|
})]
|
|
152
148
|
})
|
|
153
149
|
]
|
|
154
|
-
}) : /* @__PURE__ */
|
|
150
|
+
}) : /* @__PURE__ */ x("button", {
|
|
155
151
|
type: "button",
|
|
156
|
-
onClick: () =>
|
|
152
|
+
onClick: () => I(!0),
|
|
157
153
|
className: "mt-1.5 flex items-center gap-1.5 text-sm text-muted-foreground hover:text-foreground",
|
|
158
|
-
children: [/* @__PURE__ */
|
|
154
|
+
children: [/* @__PURE__ */ b(a, { className: "size-3.5" }), O("addRequest")]
|
|
159
155
|
}))
|
|
160
156
|
]
|
|
161
157
|
});
|
|
162
158
|
}
|
|
163
|
-
export {
|
|
159
|
+
export { T as CustomerRequests };
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { customersQuery as e, cyclesQuery as t, labelsQuery as n,
|
|
2
|
-
import { CalendarIcon as
|
|
3
|
-
import { usePeople as
|
|
4
|
-
import { ProjectStatusIcon as
|
|
5
|
-
import { projectRef as
|
|
6
|
-
import { customFieldsQuery as
|
|
1
|
+
import { customersQuery as e, cyclesQuery as t, labelsQuery as n, myTeamsQuery as r, projectsQuery as i, statusesQuery as ee, teamsQuery as te } from "../api/queries.js";
|
|
2
|
+
import { CalendarIcon as a, CycleIcon as ne, FolderIcon as o, PriorityIcon as s, ProjectIcon as c, StatusIcon as l, TagIcon as u, UserIcon as d, UsersIcon as f, usePriorityNames as p } from "./icons.js";
|
|
3
|
+
import { usePeople as m } from "../lib/people.js";
|
|
4
|
+
import { ProjectStatusIcon as h } from "./Planning.js";
|
|
5
|
+
import { projectRef as g } from "../lib/projects.js";
|
|
6
|
+
import { customFieldsQuery as re, fieldsFor as ie, filterableKinds as _, formatFieldFilters as v, parseFieldFilters as y } from "../lib/customFields.js";
|
|
7
7
|
import { issueTypesQuery as b } from "../lib/issueTypes.js";
|
|
8
8
|
import { TypeIcon as x } from "./IssueTypes.js";
|
|
9
9
|
import { statusRef as S } from "../lib/refs.js";
|
|
10
10
|
import { Avatar as C } from "@parallelworks/ui";
|
|
11
|
-
import { useMemo as
|
|
12
|
-
import { useTranslations as
|
|
13
|
-
import { jsx as
|
|
14
|
-
import { useQuery as
|
|
15
|
-
import { useListFilters as
|
|
11
|
+
import { useMemo as ae } from "react";
|
|
12
|
+
import { useTranslations as w } from "use-intl";
|
|
13
|
+
import { jsx as T } from "react/jsx-runtime";
|
|
14
|
+
import { useQuery as E } from "@tanstack/react-query";
|
|
15
|
+
import { useListFilters as D } from "@parallelworks/ui/list";
|
|
16
16
|
// src/components/IssueFilters.tsx
|
|
17
|
-
var
|
|
17
|
+
var O = (e) => `field:${e}`, k = [
|
|
18
18
|
"team",
|
|
19
19
|
"assignee",
|
|
20
20
|
"assigneeKind",
|
|
@@ -28,8 +28,8 @@ var k = (e) => `field:${e}`, A = [
|
|
|
28
28
|
"type",
|
|
29
29
|
"fields",
|
|
30
30
|
"overdue"
|
|
31
|
-
],
|
|
32
|
-
function
|
|
31
|
+
], A = (e) => `agent:${e}`;
|
|
32
|
+
function oe(e) {
|
|
33
33
|
let t = [], n = (e, n) => {
|
|
34
34
|
n && t.push({
|
|
35
35
|
field: e,
|
|
@@ -37,7 +37,7 @@ function M(e) {
|
|
|
37
37
|
values: [n]
|
|
38
38
|
});
|
|
39
39
|
};
|
|
40
|
-
n("team", e.team), n("assignee", e.assignee && (e.assigneeKind === "agent" ?
|
|
40
|
+
n("team", e.team), n("assignee", e.assignee && (e.assigneeKind === "agent" ? A(e.assignee) : e.assignee)), n("creator", e.creator);
|
|
41
41
|
for (let n of ["status", "priority"]) {
|
|
42
42
|
let r = e[n]?.split(",").filter(Boolean) ?? [];
|
|
43
43
|
r.length > 0 && t.push({
|
|
@@ -56,13 +56,13 @@ function M(e) {
|
|
|
56
56
|
let i = /* @__PURE__ */ new Map();
|
|
57
57
|
for (let t of y(e.fields)) i.set(t.field, [...i.get(t.field) ?? [], t.value]);
|
|
58
58
|
for (let [e, n] of i) t.push({
|
|
59
|
-
field:
|
|
59
|
+
field: O(e),
|
|
60
60
|
op: "is",
|
|
61
61
|
values: n
|
|
62
62
|
});
|
|
63
63
|
return n("overdue", e.overdue), t;
|
|
64
64
|
}
|
|
65
|
-
function
|
|
65
|
+
function se(e) {
|
|
66
66
|
let t = {}, n = [];
|
|
67
67
|
for (let r of e) {
|
|
68
68
|
let e = r.values[0];
|
|
@@ -94,36 +94,36 @@ function ie(e) {
|
|
|
94
94
|
}
|
|
95
95
|
return n.length > 0 && (t.fields = v(n)), t;
|
|
96
96
|
}
|
|
97
|
-
function
|
|
97
|
+
function j(e, t) {
|
|
98
98
|
let n = { ...e };
|
|
99
|
-
for (let e of
|
|
99
|
+
for (let e of k) delete n[e];
|
|
100
100
|
return {
|
|
101
101
|
...n,
|
|
102
102
|
...t
|
|
103
103
|
};
|
|
104
104
|
}
|
|
105
|
-
function
|
|
106
|
-
let
|
|
105
|
+
function M(v, k, j, M = !1) {
|
|
106
|
+
let N = w("issueFilters"), P = w("planning"), { data: F = [] } = E(te(v)), { data: I = [] } = E(r(v)), L = I.some((e) => e.key === k.team) ? I : [...I, ...F.filter((e) => e.key === k.team)], { data: R = [] } = E(n(v)), { data: z = [] } = E(i(v)), { data: B = [] } = E(e(v)), V = L.find((e) => e.key === k.team), { data: H = [] } = E({
|
|
107
107
|
...t(v, V?.key ?? ""),
|
|
108
108
|
enabled: !!V?.cyclesEnabled
|
|
109
|
-
}), { data: U = [] } =
|
|
110
|
-
...
|
|
109
|
+
}), { data: U = [] } = E({
|
|
110
|
+
...ee(v, V?.key ?? ""),
|
|
111
111
|
enabled: !!V
|
|
112
|
-
}), W =
|
|
112
|
+
}), W = p(), { members: G, agents: K, person: q, agentName: J } = m(v), { data: Y } = E(re(v)), { data: X } = E(b(v)), Z = w("issueTypes"), Q = w("customFields"), ce = ae(() => {
|
|
113
113
|
let e = {
|
|
114
114
|
multiple: !1,
|
|
115
115
|
operators: ["is"]
|
|
116
|
-
}, t = (e) => e.name ?
|
|
116
|
+
}, t = (e) => e.name ? P("cycleNamed", {
|
|
117
117
|
number: e.number,
|
|
118
118
|
name: e.name
|
|
119
|
-
}) :
|
|
119
|
+
}) : P("cycle", { number: e.number }), n = [
|
|
120
120
|
{
|
|
121
121
|
key: "team",
|
|
122
|
-
label:
|
|
123
|
-
icon: /* @__PURE__ */
|
|
122
|
+
label: N("team"),
|
|
123
|
+
icon: /* @__PURE__ */ T(o, {}),
|
|
124
124
|
kind: "enum",
|
|
125
125
|
...e,
|
|
126
|
-
required:
|
|
126
|
+
required: M,
|
|
127
127
|
options: L.filter((e) => !e.archivedAt).map((e) => ({
|
|
128
128
|
value: e.key,
|
|
129
129
|
label: e.name,
|
|
@@ -132,25 +132,25 @@ function P(v, A, N, P = !1) {
|
|
|
132
132
|
},
|
|
133
133
|
{
|
|
134
134
|
key: "assignee",
|
|
135
|
-
label:
|
|
136
|
-
icon: /* @__PURE__ */
|
|
135
|
+
label: N("assignee"),
|
|
136
|
+
icon: /* @__PURE__ */ T(d, {}),
|
|
137
137
|
kind: "people",
|
|
138
138
|
...e,
|
|
139
139
|
options: [...G.map((e) => ({
|
|
140
140
|
value: e.user.username,
|
|
141
141
|
label: e.user.name,
|
|
142
|
-
group:
|
|
143
|
-
icon: /* @__PURE__ */
|
|
142
|
+
group: N("people"),
|
|
143
|
+
icon: /* @__PURE__ */ T(C, {
|
|
144
144
|
name: e.user.name,
|
|
145
145
|
src: e.user.avatarUrl,
|
|
146
146
|
size: "xs",
|
|
147
147
|
decorative: !0
|
|
148
148
|
})
|
|
149
149
|
})), ...K.map((e) => ({
|
|
150
|
-
value:
|
|
150
|
+
value: A(e.slug),
|
|
151
151
|
label: e.name,
|
|
152
|
-
group:
|
|
153
|
-
icon: /* @__PURE__ */
|
|
152
|
+
group: N("agents"),
|
|
153
|
+
icon: /* @__PURE__ */ T(C, {
|
|
154
154
|
name: e.name,
|
|
155
155
|
kind: "agent",
|
|
156
156
|
size: "xs",
|
|
@@ -161,14 +161,14 @@ function P(v, A, N, P = !1) {
|
|
|
161
161
|
},
|
|
162
162
|
{
|
|
163
163
|
key: "creator",
|
|
164
|
-
label:
|
|
165
|
-
icon: /* @__PURE__ */
|
|
164
|
+
label: N("creator"),
|
|
165
|
+
icon: /* @__PURE__ */ T(d, {}),
|
|
166
166
|
kind: "people",
|
|
167
167
|
...e,
|
|
168
168
|
options: G.map((e) => ({
|
|
169
169
|
value: e.user.username,
|
|
170
170
|
label: e.user.name,
|
|
171
|
-
icon: /* @__PURE__ */
|
|
171
|
+
icon: /* @__PURE__ */ T(C, {
|
|
172
172
|
name: e.user.name,
|
|
173
173
|
src: e.user.avatarUrl,
|
|
174
174
|
size: "xs",
|
|
@@ -179,8 +179,8 @@ function P(v, A, N, P = !1) {
|
|
|
179
179
|
},
|
|
180
180
|
{
|
|
181
181
|
key: "priority",
|
|
182
|
-
label:
|
|
183
|
-
icon: /* @__PURE__ */
|
|
182
|
+
label: N("priority"),
|
|
183
|
+
icon: /* @__PURE__ */ T(s, { priority: 2 }),
|
|
184
184
|
kind: "enum",
|
|
185
185
|
operators: ["is"],
|
|
186
186
|
options: [
|
|
@@ -192,83 +192,83 @@ function P(v, A, N, P = !1) {
|
|
|
192
192
|
].map((e) => ({
|
|
193
193
|
value: String(e),
|
|
194
194
|
label: W[e] ?? "",
|
|
195
|
-
icon: /* @__PURE__ */
|
|
195
|
+
icon: /* @__PURE__ */ T(s, { priority: e })
|
|
196
196
|
}))
|
|
197
197
|
},
|
|
198
198
|
{
|
|
199
199
|
key: "label",
|
|
200
|
-
label:
|
|
201
|
-
icon: /* @__PURE__ */
|
|
200
|
+
label: N("label"),
|
|
201
|
+
icon: /* @__PURE__ */ T(u, {}),
|
|
202
202
|
kind: "enum",
|
|
203
203
|
...e,
|
|
204
204
|
options: R.map((e) => ({
|
|
205
205
|
value: e.name,
|
|
206
206
|
label: e.name,
|
|
207
|
-
icon: /* @__PURE__ */
|
|
207
|
+
icon: /* @__PURE__ */ T("span", {
|
|
208
208
|
className: "size-2 rounded-full",
|
|
209
209
|
style: { background: e.color }
|
|
210
210
|
})
|
|
211
211
|
})),
|
|
212
|
-
valueLabel: () =>
|
|
212
|
+
valueLabel: () => N("deletedLabel")
|
|
213
213
|
},
|
|
214
214
|
{
|
|
215
215
|
key: "project",
|
|
216
|
-
label:
|
|
217
|
-
icon: /* @__PURE__ */
|
|
216
|
+
label: N("project"),
|
|
217
|
+
icon: /* @__PURE__ */ T(c, {}),
|
|
218
218
|
kind: "enum",
|
|
219
219
|
...e,
|
|
220
220
|
options: z.map((e) => ({
|
|
221
|
-
value:
|
|
221
|
+
value: g(e),
|
|
222
222
|
label: e.name,
|
|
223
|
-
icon: /* @__PURE__ */
|
|
223
|
+
icon: /* @__PURE__ */ T(h, { status: e.status })
|
|
224
224
|
}))
|
|
225
225
|
}
|
|
226
226
|
];
|
|
227
|
-
(B.length > 0 ||
|
|
227
|
+
(B.length > 0 || k.customer) && n.push({
|
|
228
228
|
key: "customer",
|
|
229
|
-
label:
|
|
230
|
-
icon: /* @__PURE__ */
|
|
229
|
+
label: N("customer"),
|
|
230
|
+
icon: /* @__PURE__ */ T(f, {}),
|
|
231
231
|
kind: "enum",
|
|
232
232
|
...e,
|
|
233
233
|
options: B.map((e) => ({
|
|
234
234
|
value: e.id,
|
|
235
235
|
label: e.name
|
|
236
236
|
}))
|
|
237
|
-
}), (V ||
|
|
237
|
+
}), (V || k.status) && n.splice(3, 0, {
|
|
238
238
|
key: "status",
|
|
239
|
-
label:
|
|
240
|
-
icon: /* @__PURE__ */
|
|
239
|
+
label: N("status"),
|
|
240
|
+
icon: /* @__PURE__ */ T(l, { category: "started" }),
|
|
241
241
|
kind: "enum",
|
|
242
242
|
operators: ["is"],
|
|
243
243
|
options: U.map((e) => ({
|
|
244
244
|
value: S(e),
|
|
245
245
|
label: e.name,
|
|
246
|
-
icon: /* @__PURE__ */
|
|
246
|
+
icon: /* @__PURE__ */ T(l, { category: e.category })
|
|
247
247
|
}))
|
|
248
|
-
}), (V?.cyclesEnabled ||
|
|
248
|
+
}), (V?.cyclesEnabled || k.cycle) && n.push({
|
|
249
249
|
key: "cycle",
|
|
250
|
-
label:
|
|
251
|
-
icon: /* @__PURE__ */
|
|
250
|
+
label: N("cycle"),
|
|
251
|
+
icon: /* @__PURE__ */ T(ne, {}),
|
|
252
252
|
kind: "enum",
|
|
253
253
|
...e,
|
|
254
254
|
options: H.map((e) => ({
|
|
255
255
|
value: String(e.number),
|
|
256
256
|
label: t(e),
|
|
257
|
-
description:
|
|
257
|
+
description: P(`states.${e.state}`)
|
|
258
258
|
}))
|
|
259
259
|
});
|
|
260
260
|
let r = (X ?? []).filter((e) => !e.archivedAt && (!V || e.teamIds.length === 0 || e.teamIds.includes(V.id)));
|
|
261
|
-
(r.length > 0 ||
|
|
261
|
+
(r.length > 0 || k.type) && n.push({
|
|
262
262
|
key: "type",
|
|
263
263
|
label: Z("type"),
|
|
264
|
-
icon: /* @__PURE__ */
|
|
264
|
+
icon: /* @__PURE__ */ T(u, {}),
|
|
265
265
|
kind: "enum",
|
|
266
266
|
multiple: !0,
|
|
267
267
|
operators: ["is"],
|
|
268
268
|
options: [...r.map((e) => ({
|
|
269
269
|
value: e.id,
|
|
270
270
|
label: e.name,
|
|
271
|
-
icon: /* @__PURE__ */
|
|
271
|
+
icon: /* @__PURE__ */ T(x, {
|
|
272
272
|
type: e,
|
|
273
273
|
className: "size-3.5"
|
|
274
274
|
})
|
|
@@ -277,23 +277,23 @@ function P(v, A, N, P = !1) {
|
|
|
277
277
|
label: Z("noType")
|
|
278
278
|
}]
|
|
279
279
|
});
|
|
280
|
-
let i = new Set(y(
|
|
281
|
-
for (let e of (Y ?? []).filter((e) => e.target === "issue" &&
|
|
280
|
+
let i = new Set(y(k.fields).map((e) => e.field));
|
|
281
|
+
for (let e of (Y ?? []).filter((e) => e.target === "issue" && _.includes(e.kind) && (ie([e], "issue", V?.id).length > 0 || i.has(e.id)))) {
|
|
282
282
|
let t = {
|
|
283
283
|
value: "none",
|
|
284
284
|
label: Q("noValue")
|
|
285
285
|
};
|
|
286
286
|
n.push({
|
|
287
|
-
key:
|
|
287
|
+
key: O(e.id),
|
|
288
288
|
label: e.name,
|
|
289
|
-
icon: /* @__PURE__ */
|
|
289
|
+
icon: /* @__PURE__ */ T(u, {}),
|
|
290
290
|
kind: "enum",
|
|
291
291
|
multiple: !0,
|
|
292
292
|
operators: ["is"],
|
|
293
293
|
options: e.kind === "person" ? [...G.map((e) => ({
|
|
294
294
|
value: e.user.username,
|
|
295
295
|
label: e.user.name,
|
|
296
|
-
icon: /* @__PURE__ */
|
|
296
|
+
icon: /* @__PURE__ */ T(C, {
|
|
297
297
|
name: e.user.name,
|
|
298
298
|
src: e.user.avatarUrl,
|
|
299
299
|
size: "xs",
|
|
@@ -305,7 +305,7 @@ function P(v, A, N, P = !1) {
|
|
|
305
305
|
}, t] : [...e.options.map((e) => ({
|
|
306
306
|
value: e.id ?? "",
|
|
307
307
|
label: e.name,
|
|
308
|
-
...e.color && { icon: /* @__PURE__ */
|
|
308
|
+
...e.color && { icon: /* @__PURE__ */ T("span", {
|
|
309
309
|
className: "size-2 rounded-full",
|
|
310
310
|
style: { background: e.color }
|
|
311
311
|
}) }
|
|
@@ -314,47 +314,47 @@ function P(v, A, N, P = !1) {
|
|
|
314
314
|
}
|
|
315
315
|
return n.push({
|
|
316
316
|
key: "overdue",
|
|
317
|
-
label:
|
|
318
|
-
icon: /* @__PURE__ */
|
|
317
|
+
label: N("overdue"),
|
|
318
|
+
icon: /* @__PURE__ */ T(a, {}),
|
|
319
319
|
kind: "boolean"
|
|
320
320
|
}), n;
|
|
321
321
|
}, [
|
|
322
322
|
X,
|
|
323
323
|
Z,
|
|
324
|
-
|
|
324
|
+
k.type,
|
|
325
325
|
Y,
|
|
326
326
|
Q,
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
327
|
+
k.fields,
|
|
328
|
+
N,
|
|
329
|
+
P,
|
|
330
330
|
L,
|
|
331
331
|
G,
|
|
332
332
|
K,
|
|
333
333
|
R,
|
|
334
334
|
z,
|
|
335
335
|
B,
|
|
336
|
-
|
|
336
|
+
k.customer,
|
|
337
337
|
H,
|
|
338
338
|
U,
|
|
339
339
|
W,
|
|
340
340
|
V,
|
|
341
|
-
|
|
342
|
-
|
|
341
|
+
k.cycle,
|
|
342
|
+
k.status,
|
|
343
343
|
q,
|
|
344
344
|
J,
|
|
345
|
-
|
|
346
|
-
]), $ =
|
|
345
|
+
M
|
|
346
|
+
]), $ = oe(k), le = {
|
|
347
347
|
value: $.length > 0 ? $ : null,
|
|
348
348
|
onChange: (e) => {
|
|
349
|
-
let t =
|
|
350
|
-
t.team !==
|
|
349
|
+
let t = se(e);
|
|
350
|
+
t.team !== k.team && delete t.status, j(t);
|
|
351
351
|
}
|
|
352
352
|
};
|
|
353
|
-
return
|
|
353
|
+
return D({
|
|
354
354
|
storageKey: `issues:${v}`,
|
|
355
|
-
fields:
|
|
356
|
-
store:
|
|
355
|
+
fields: ce,
|
|
356
|
+
store: le,
|
|
357
357
|
remember: !1
|
|
358
358
|
});
|
|
359
359
|
}
|
|
360
|
-
export {
|
|
360
|
+
export { M as useIssueFilters, j as withIssueFilters };
|