@burdenoff/microfe-healthybowl 2026.1202.2 → 2026.1202.4
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.
|
@@ -1,31 +1,32 @@
|
|
|
1
1
|
import { PageLayout as e } from "../../components/PageLayout.js";
|
|
2
2
|
import { ErrorState as t } from "../../components/ErrorState.js";
|
|
3
|
-
import { PageLoader as
|
|
4
|
-
import { EmptyState as
|
|
5
|
-
import { Modal as
|
|
6
|
-
import { useHealthyBowl as
|
|
7
|
-
import { useBasePath as
|
|
8
|
-
import { useOpenOnAction as
|
|
9
|
-
import { useDefaultTaskProject as
|
|
3
|
+
import { PageLoader as ee } from "../../components/PageLoader.js";
|
|
4
|
+
import { EmptyState as te } from "../../components/EmptyState.js";
|
|
5
|
+
import { Modal as ne } from "../../components/Modal.js";
|
|
6
|
+
import { useHealthyBowl as n } from "../../context/HealthyBowlContext.js";
|
|
7
|
+
import { useBasePath as r } from "../../hooks/useBasePath.js";
|
|
8
|
+
import { useOpenOnAction as i } from "../../hooks/useOpenOnAction.js";
|
|
9
|
+
import { useDefaultTaskProject as a } from "./useDefaultTaskProject.js";
|
|
10
10
|
import { useFarmTaskLabels as o } from "./useFarmTaskLabels.js";
|
|
11
11
|
import { useTr as s } from "../../../shared/hooks/useTr.js";
|
|
12
|
-
import { useCanManageTasks as
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
12
|
+
import { useCanManageTasks as re } from "./useCanManageTasks.js";
|
|
13
|
+
import { useHbPagesV3 as ie } from "../../pagesV3.js";
|
|
14
|
+
import { todayDateParam as ae } from "./useJobCardTasks.js";
|
|
15
|
+
import { useCallback as c, useMemo as l, useState as u } from "react";
|
|
16
|
+
import { useI18n as d } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
17
|
+
import { Bug as f, ListChecks as p, MapPin as m, PawPrint as h, Plus as g, Printer as _, Sprout as v } from "lucide-react";
|
|
17
18
|
import { useNavigate as y, useSearchParams as b } from "react-router";
|
|
18
19
|
import { jsx as x, jsxs as S } from "react/jsx-runtime";
|
|
19
20
|
import { Button as C } from "@burdenoff/fe-libs/ui";
|
|
20
|
-
import { useWorkspaceDirectory as
|
|
21
|
-
import { gql as
|
|
22
|
-
import { ApolloProvider as
|
|
23
|
-
import { useSafeGatewayClient as
|
|
24
|
-
import { CreateTaskCore as
|
|
21
|
+
import { useWorkspaceDirectory as oe } from "@burdenoff/fe-libs/sharing";
|
|
22
|
+
import { gql as w } from "@apollo/client";
|
|
23
|
+
import { ApolloProvider as T } from "@apollo/client/react";
|
|
24
|
+
import { useSafeGatewayClient as se } from "@burdenoff/fe-libs/shared/graphql";
|
|
25
|
+
import { CreateTaskCore as ce, TasksPageCore as le } from "@burdenoff/planmagnet-fe-sdk";
|
|
25
26
|
// src/healthybowl/pages/tasks/TasksPage.tsx
|
|
26
|
-
var
|
|
27
|
+
var ue = (e) => {
|
|
27
28
|
switch (e) {
|
|
28
|
-
case "FIELD": return /* @__PURE__ */ x(
|
|
29
|
+
case "FIELD": return /* @__PURE__ */ x(m, {
|
|
29
30
|
className: "h-3 w-3",
|
|
30
31
|
"aria-hidden": "true"
|
|
31
32
|
});
|
|
@@ -33,18 +34,18 @@ var ce = (e) => {
|
|
|
33
34
|
className: "h-3 w-3",
|
|
34
35
|
"aria-hidden": "true"
|
|
35
36
|
});
|
|
36
|
-
case "ANIMAL": return /* @__PURE__ */ x(
|
|
37
|
+
case "ANIMAL": return /* @__PURE__ */ x(h, {
|
|
37
38
|
className: "h-3 w-3",
|
|
38
39
|
"aria-hidden": "true"
|
|
39
40
|
});
|
|
40
41
|
case "PEST_ISSUE":
|
|
41
|
-
case "PEST": return /* @__PURE__ */ x(
|
|
42
|
+
case "PEST": return /* @__PURE__ */ x(f, {
|
|
42
43
|
className: "h-3 w-3",
|
|
43
44
|
"aria-hidden": "true"
|
|
44
45
|
});
|
|
45
46
|
default: return null;
|
|
46
47
|
}
|
|
47
|
-
},
|
|
48
|
+
}, E = [
|
|
48
49
|
{
|
|
49
50
|
status: "BACKLOG",
|
|
50
51
|
label: "Backlog"
|
|
@@ -65,69 +66,70 @@ var ce = (e) => {
|
|
|
65
66
|
status: "DONE",
|
|
66
67
|
label: "Done"
|
|
67
68
|
}
|
|
68
|
-
],
|
|
69
|
+
], de = E.map((e) => e.status), D = w`
|
|
69
70
|
mutation HealthyBowlNotifyMention($input: HealthyBowlNotifyMentionInput!) {
|
|
70
71
|
healthybowlNotifyMention(input: $input)
|
|
71
72
|
}
|
|
72
73
|
`, O = () => {
|
|
73
|
-
let { workspaceId:
|
|
74
|
-
let e = new URLSearchParams({ date:
|
|
74
|
+
let { workspaceId: f, currentUser: m, authToken: h, apiGatewayUrl: v } = n(), w = se("workspace"), O = m?.id, [k] = b(), A = k.get("item") ?? void 0, j = y(), { buildPath: M } = r(), N = c(() => {
|
|
75
|
+
let e = new URLSearchParams({ date: ae() });
|
|
75
76
|
O && e.set("assignee", O), j(`${M("tasks/job-card")}?${e.toString()}`);
|
|
76
77
|
}, [
|
|
77
78
|
j,
|
|
78
79
|
M,
|
|
79
80
|
O
|
|
80
|
-
]), { projectId: P, loading: F, resolved: I, error: L, retry: R, ensureProject: z } =
|
|
81
|
-
workspaceId:
|
|
82
|
-
authToken:
|
|
81
|
+
]), { projectId: P, loading: F, resolved: I, error: L, retry: R, ensureProject: z } = a(w, f, O), { members: B } = oe({
|
|
82
|
+
workspaceId: f,
|
|
83
|
+
authToken: h,
|
|
83
84
|
apiGatewayUrl: v
|
|
84
|
-
}), V =
|
|
85
|
+
}), V = l(() => B.map((e) => ({
|
|
85
86
|
id: e.id,
|
|
86
87
|
name: e.name
|
|
87
|
-
})), [B]), H =
|
|
88
|
+
})), [B]), H = l(() => new Map(B.map((e) => [e.id, e.name])), [B]), U = c((e) => {
|
|
88
89
|
let t = H.get(e);
|
|
89
90
|
return t ? { name: t } : null;
|
|
90
|
-
}, [H]), W = o(), G = s(), { locale: K } =
|
|
91
|
-
|
|
92
|
-
mutation:
|
|
91
|
+
}, [H]), W = o(), G = s(), { locale: K } = d(), { canManage: q, loading: fe } = re(f), J = c((e) => {
|
|
92
|
+
w && e.mentionedIds.length !== 0 && w.mutate({
|
|
93
|
+
mutation: D,
|
|
93
94
|
variables: { input: {
|
|
94
95
|
taskId: e.entityId,
|
|
95
96
|
mentionedUserIds: e.mentionedIds
|
|
96
97
|
} }
|
|
97
98
|
}).catch(() => {});
|
|
98
|
-
}, [
|
|
99
|
-
|
|
99
|
+
}, [w]), [pe, Y] = u(!1), [me, X] = u(!1), Z = c(async () => {
|
|
100
|
+
Y(!0);
|
|
100
101
|
try {
|
|
101
|
-
await z() &&
|
|
102
|
+
await z() && X(!0);
|
|
102
103
|
} finally {
|
|
103
|
-
|
|
104
|
+
Y(!1);
|
|
104
105
|
}
|
|
105
|
-
}, [z]),
|
|
106
|
-
|
|
107
|
-
let
|
|
108
|
-
client:
|
|
109
|
-
children: /* @__PURE__ */ x(
|
|
110
|
-
columns:
|
|
111
|
-
workspaceId:
|
|
106
|
+
}, [z]), Q = c(() => X(!1), []);
|
|
107
|
+
i("new", () => void Z(), !!w && q && !fe && I && !F && !L);
|
|
108
|
+
let $ = ie(), he = l(() => w ? /* @__PURE__ */ x(T, {
|
|
109
|
+
client: w,
|
|
110
|
+
children: /* @__PURE__ */ x(le, {
|
|
111
|
+
columns: E,
|
|
112
|
+
workspaceId: f,
|
|
112
113
|
projectId: P ?? void 0,
|
|
113
114
|
readonly: !q,
|
|
114
115
|
currentActorId: O,
|
|
115
116
|
commentsEntityType: "planmagnet_workitem",
|
|
116
|
-
onMention:
|
|
117
|
+
onMention: J,
|
|
117
118
|
openItemId: A,
|
|
118
119
|
labels: W,
|
|
119
120
|
locale: K,
|
|
120
121
|
assigneeOptions: V,
|
|
121
122
|
resolveAssignee: U,
|
|
122
123
|
linkSourceProduct: "healthybowl",
|
|
123
|
-
renderLinkIcon:
|
|
124
|
+
renderLinkIcon: ue,
|
|
124
125
|
enableSavedViews: !0,
|
|
125
126
|
enableShortcuts: !0,
|
|
127
|
+
appearance: $ ? "depth" : "standard",
|
|
126
128
|
onTaskSaved: () => {}
|
|
127
129
|
})
|
|
128
130
|
}) : null, [
|
|
129
|
-
|
|
130
|
-
|
|
131
|
+
w,
|
|
132
|
+
f,
|
|
131
133
|
P,
|
|
132
134
|
q,
|
|
133
135
|
O,
|
|
@@ -136,7 +138,8 @@ var ce = (e) => {
|
|
|
136
138
|
K,
|
|
137
139
|
V,
|
|
138
140
|
U,
|
|
139
|
-
|
|
141
|
+
J,
|
|
142
|
+
$
|
|
140
143
|
]);
|
|
141
144
|
return /* @__PURE__ */ S(e, {
|
|
142
145
|
title: G("healthybowl.tasks.pageTitle", "Farm Tasks"),
|
|
@@ -144,7 +147,7 @@ var ce = (e) => {
|
|
|
144
147
|
description: G("healthybowl.tasks.pageDescription", "Plan and track farm work — planting, harvesting, maintenance, and more — on a shared board."),
|
|
145
148
|
helpPrompt: G("healthybowl.tasks.helpPrompt", "How do I use Farm Tasks to plan and track work on my farm?"),
|
|
146
149
|
purpose: G("healthybowl.tasks.purpose", "Farm Tasks is your team's shared to-do board. Create tasks, set priority and due dates, drag them across columns as work progresses, and open any task for details."),
|
|
147
|
-
purposeIcon: /* @__PURE__ */ x(
|
|
150
|
+
purposeIcon: /* @__PURE__ */ x(p, {
|
|
148
151
|
className: "size-5",
|
|
149
152
|
"aria-hidden": "true"
|
|
150
153
|
}),
|
|
@@ -160,22 +163,22 @@ var ce = (e) => {
|
|
|
160
163
|
G("healthybowl.tasks.printJobCard", "Print job card")
|
|
161
164
|
]
|
|
162
165
|
}),
|
|
163
|
-
children: [
|
|
166
|
+
children: [w ? L ? /* @__PURE__ */ x(t, {
|
|
164
167
|
title: "Couldn't open Farm Tasks",
|
|
165
168
|
description: L.message,
|
|
166
169
|
onRetry: R
|
|
167
|
-
}) : F || !I ? /* @__PURE__ */ x(
|
|
168
|
-
icon: /* @__PURE__ */ x(
|
|
170
|
+
}) : F || !I ? /* @__PURE__ */ x(ee, {}) : P ? he : /* @__PURE__ */ x(te, {
|
|
171
|
+
icon: /* @__PURE__ */ x(p, {
|
|
169
172
|
className: "size-8",
|
|
170
173
|
"aria-hidden": "true"
|
|
171
174
|
}),
|
|
172
175
|
title: G("healthybowl.tasks.emptyTitle", "No farm tasks yet"),
|
|
173
176
|
description: q ? G("healthybowl.tasks.emptyDescription", "Add your first task to start planning farm work on a shared board.") : G("healthybowl.tasks.emptyDescriptionReadOnly", "Tasks your team adds will appear here."),
|
|
174
177
|
action: q ? /* @__PURE__ */ S(C, {
|
|
175
|
-
onClick: () => void
|
|
176
|
-
disabled:
|
|
178
|
+
onClick: () => void Z(),
|
|
179
|
+
disabled: pe,
|
|
177
180
|
children: [
|
|
178
|
-
/* @__PURE__ */ x(
|
|
181
|
+
/* @__PURE__ */ x(g, {
|
|
179
182
|
className: "me-1.5 h-4 w-4",
|
|
180
183
|
"aria-hidden": "true"
|
|
181
184
|
}),
|
|
@@ -187,25 +190,25 @@ var ce = (e) => {
|
|
|
187
190
|
}) : /* @__PURE__ */ x(t, {
|
|
188
191
|
title: "Tasks unavailable",
|
|
189
192
|
description: "The workspace connection isn't ready. Reload the page or reselect your workspace."
|
|
190
|
-
}),
|
|
191
|
-
open:
|
|
192
|
-
onClose:
|
|
193
|
+
}), w && P ? /* @__PURE__ */ x(ne, {
|
|
194
|
+
open: me,
|
|
195
|
+
onClose: Q,
|
|
193
196
|
title: G("healthybowl.tasks.newTaskTitle", "New task"),
|
|
194
|
-
children: /* @__PURE__ */ x(
|
|
195
|
-
client:
|
|
196
|
-
children: /* @__PURE__ */ x(
|
|
197
|
-
workspaceId:
|
|
197
|
+
children: /* @__PURE__ */ x(T, {
|
|
198
|
+
client: w,
|
|
199
|
+
children: /* @__PURE__ */ x(ce, {
|
|
200
|
+
workspaceId: f,
|
|
198
201
|
projectId: P,
|
|
199
202
|
hideHeader: !0,
|
|
200
|
-
statuses:
|
|
203
|
+
statuses: de,
|
|
201
204
|
assigneeOptions: V,
|
|
202
205
|
hiddenFields: [
|
|
203
206
|
"type",
|
|
204
207
|
"storyPoints",
|
|
205
208
|
"labels"
|
|
206
209
|
],
|
|
207
|
-
onCreated:
|
|
208
|
-
onCancel:
|
|
210
|
+
onCreated: Q,
|
|
211
|
+
onCancel: Q
|
|
209
212
|
})
|
|
210
213
|
})
|
|
211
214
|
}) : null]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@burdenoff/microfe-healthybowl",
|
|
3
|
-
"version": "2026.1202.
|
|
3
|
+
"version": "2026.1202.4",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/Algoshred/microfe-healthybowl.git"
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"dependencies": {
|
|
63
63
|
"@apollo/client": "^4.3.7",
|
|
64
64
|
"@burdenoff/fe-libs": "2026.1202.2",
|
|
65
|
-
"@burdenoff/planmagnet-fe-sdk": "2026.
|
|
65
|
+
"@burdenoff/planmagnet-fe-sdk": "2026.1202.1",
|
|
66
66
|
"@tanstack/react-query": "^5.106.1",
|
|
67
67
|
"clsx": "^2.1.1",
|
|
68
68
|
"date-fns": "^4.4.0",
|