@nivaro/react 0.3.14 → 0.3.16
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/dist/full.css +1 -1
- package/dist/hooks/useSessionRecorder.js +1 -1
- package/dist/index.d.ts +127 -6
- package/dist/index.js +736 -734
- package/dist/shared/components/CollectionBrowserView.js +2316 -2281
- package/dist/shared/components/ItemEditForm.js +3773 -3604
- package/dist/shared/components/RecordGridEditor.js +319 -282
- package/dist/shared/components/RecordReadView.js +202 -200
- package/dist/shared/components/cbv/unknown-fields.js +18 -8
- package/dist/shared/components/import/DocumentAutofillButton.js +148 -142
- package/dist/shared/components/item-edit/CatalogPickerField.js +264 -276
- package/dist/shared/components/item-edit/FieldRenderer.js +136 -133
- package/dist/shared/components/item-edit/FieldRow.js +198 -184
- package/dist/shared/components/item-edit/HeaderTools.js +107 -99
- package/dist/shared/components/item-edit/InlineTableField.js +138 -136
- package/dist/shared/components/item-edit/RecordLiveSync.js +1 -0
- package/dist/shared/components/item-edit/RelationCombobox.js +30 -23
- package/dist/shared/components/item-edit/SummaryPanel.js +334 -294
- package/dist/shared/components/item-edit/column-length.js +12 -0
- package/dist/shared/components/panels/AccessDeniedPanel.js +47 -37
- package/dist/shared/components/panels/ItemLockBanner.js +307 -285
- package/dist/shared/components/panels/PipelinePanel.js +486 -465
- package/dist/shared/components/panels/RevisionsPanel.js +210 -204
- package/dist/shared/components/profile/DelegationCard.js +178 -121
- package/dist/shared/components/profile/PersonActivity.js +152 -139
- package/dist/shared/components/queue/QueueWorklist.js +668 -659
- package/dist/shared/components/queue/transition-note.js +90 -0
- package/dist/shared/components/support/SupportRequestDialog.js +100 -89
- package/dist/shared/components/support/TicketDetailSheet.js +104 -91
- package/dist/shared/lib/autofill-runs.js +33 -26
- package/dist/shared/lib/draft-store.js +40 -24
- package/dist/shared/lib/live-queries.js +10 -9
- package/dist/shared/lib/restore-skipped.js +10 -0
- package/package.json +1 -1
|
@@ -1,107 +1,114 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { setMyDelegate as
|
|
3
|
-
import { useQuery as
|
|
4
|
-
import { Undo2 as
|
|
5
|
-
import { useState as
|
|
6
|
-
import { useNivaroClient as
|
|
7
|
-
import { get as
|
|
8
|
-
import { cn as
|
|
9
|
-
import { RelationCombobox as
|
|
10
|
-
import { SectionCard as
|
|
11
|
-
function
|
|
1
|
+
import { jsxs as o, jsx as e, Fragment as T } from "react/jsx-runtime";
|
|
2
|
+
import { setMyDelegate as Y } from "@nivaro/sdk";
|
|
3
|
+
import { useQuery as F, useMutation as M } from "@tanstack/react-query";
|
|
4
|
+
import { Undo2 as G, Loader2 as K, Check as Q, UserRound as z } from "lucide-react";
|
|
5
|
+
import { useState as m, useEffect as P } from "react";
|
|
6
|
+
import { useNivaroClient as B } from "../../context.js";
|
|
7
|
+
import { get as I, post as L, patch as H } from "../../lib/commands.js";
|
|
8
|
+
import { cn as J } from "../../lib/utils.js";
|
|
9
|
+
import { RelationCombobox as V } from "../item-edit/RelationCombobox.js";
|
|
10
|
+
import { SectionCard as X, Toggle as Z, Field as k, PersonChip as U } from "./primitives.js";
|
|
11
|
+
function ce({
|
|
12
12
|
user: n,
|
|
13
|
-
onSaved:
|
|
14
|
-
forUser:
|
|
15
|
-
coversFor:
|
|
13
|
+
onSaved: R,
|
|
14
|
+
forUser: c,
|
|
15
|
+
coversFor: w
|
|
16
16
|
}) {
|
|
17
|
-
const
|
|
17
|
+
const a = (c == null ? void 0 : c.firstName) ?? null, u = B(), [p, N] = m(!!n.is_out_of_office), [i, S] = m(null), [l, C] = m(n.delegate_id ?? null), [g, $] = m(
|
|
18
18
|
n.delegate_expires_at ? String(n.delegate_expires_at).slice(0, 10) : ""
|
|
19
|
-
),
|
|
20
|
-
|
|
21
|
-
if (!
|
|
22
|
-
|
|
19
|
+
), d = n, [h, D] = m(d.ooo_start ? String(d.ooo_start).slice(0, 10) : ""), [b, E] = m(d.ooo_end ? String(d.ooo_end).slice(0, 10) : ""), W = p !== !!n.is_out_of_office || (l ?? null) !== (n.delegate_id ?? null) || g !== (n.delegate_expires_at ? String(n.delegate_expires_at).slice(0, 10) : "") || h !== (d.ooo_start ? String(d.ooo_start).slice(0, 10) : "") || b !== (d.ooo_end ? String(d.ooo_end).slice(0, 10) : ""), y = (p || !!h && !!b) && !l;
|
|
20
|
+
P(() => {
|
|
21
|
+
if (!y) {
|
|
22
|
+
S(null);
|
|
23
23
|
return;
|
|
24
24
|
}
|
|
25
|
-
let
|
|
26
|
-
return
|
|
27
|
-
|
|
28
|
-
).then((
|
|
29
|
-
|
|
25
|
+
let t = !1;
|
|
26
|
+
return u.request(
|
|
27
|
+
I(c ? `/users/${c.id}/ooo-exposure` : "/users/me/ooo-exposure")
|
|
28
|
+
).then((r) => {
|
|
29
|
+
t || S(r.data);
|
|
30
30
|
}).catch(() => {
|
|
31
31
|
}), () => {
|
|
32
|
-
|
|
32
|
+
t = !0;
|
|
33
33
|
};
|
|
34
|
-
}, [
|
|
35
|
-
const { data:
|
|
36
|
-
queryKey: ["delegate-preview"],
|
|
37
|
-
queryFn: () =>
|
|
38
|
-
|
|
39
|
-
).then((
|
|
40
|
-
enabled: !
|
|
34
|
+
}, [y, u, c]);
|
|
35
|
+
const { data: s } = F({
|
|
36
|
+
queryKey: ["delegate-preview", l],
|
|
37
|
+
queryFn: () => u.request(
|
|
38
|
+
I("/users/me/delegate-preview", l ? { delegate_id: l } : void 0)
|
|
39
|
+
).then((t) => t.data),
|
|
40
|
+
enabled: !c && !!l && (p || !!h && !!b),
|
|
41
41
|
staleTime: 6e4
|
|
42
|
-
}), [
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
42
|
+
}), [v, A] = m([]), [O, f] = m(null);
|
|
43
|
+
P(() => f(null), [l]);
|
|
44
|
+
const _ = M({
|
|
45
|
+
mutationFn: async ({ acknowledge: t = !1 } = {}) => {
|
|
46
|
+
const r = {
|
|
47
|
+
is_out_of_office: p,
|
|
48
|
+
delegate_id: l,
|
|
49
|
+
delegate_expires_at: g ? (/* @__PURE__ */ new Date(`${g}T23:59:59`)).toISOString() : null,
|
|
48
50
|
// Scheduled window — the ooo-schedule cron flips the toggle on
|
|
49
51
|
// entry and clears it (and the window) when it passes.
|
|
50
|
-
ooo_start:
|
|
51
|
-
ooo_end:
|
|
52
|
+
ooo_start: h ? (/* @__PURE__ */ new Date(`${h}T00:00:00`)).toISOString() : null,
|
|
53
|
+
ooo_end: b ? (/* @__PURE__ */ new Date(`${b}T23:59:59`)).toISOString() : null
|
|
52
54
|
};
|
|
53
|
-
if (!
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
55
|
+
if (!c)
|
|
56
|
+
return t ? u.request(L("/users/me/delegate", { ...r, acknowledge_unreachable: !0 })) : u.request(Y(r));
|
|
57
|
+
const x = await u.request(
|
|
58
|
+
L(`/delegation/${c.id}/delegate`, {
|
|
59
|
+
is_out_of_office: r.is_out_of_office,
|
|
60
|
+
delegate_id: r.delegate_id,
|
|
61
|
+
delegate_expires_at: r.delegate_expires_at
|
|
59
62
|
})
|
|
60
63
|
);
|
|
61
|
-
return await
|
|
62
|
-
|
|
63
|
-
),
|
|
64
|
+
return await u.request(
|
|
65
|
+
H(`/users/${c.id}`, { ooo_start: r.ooo_start, ooo_end: r.ooo_end })
|
|
66
|
+
), x;
|
|
64
67
|
},
|
|
65
|
-
onSuccess: (
|
|
66
|
-
const
|
|
67
|
-
|
|
68
|
+
onSuccess: (t) => {
|
|
69
|
+
const r = (t == null ? void 0 : t.warnings) ?? [];
|
|
70
|
+
A(r), f(null), R();
|
|
71
|
+
},
|
|
72
|
+
onError: (t) => {
|
|
73
|
+
const r = t.response, x = (r == null ? void 0 : r.data) ?? r;
|
|
74
|
+
(x == null ? void 0 : x.code) === "DELEGATE_CANNOT_SEE" && f(x.error || "Your delegate cannot open the records you own approvals on.");
|
|
68
75
|
}
|
|
69
|
-
}),
|
|
70
|
-
|
|
71
|
-
},
|
|
76
|
+
}), j = () => {
|
|
77
|
+
N(!!n.is_out_of_office), C(n.delegate_id ?? null), $(n.delegate_expires_at ? String(n.delegate_expires_at).slice(0, 10) : ""), D(d.ooo_start ? String(d.ooo_start).slice(0, 10) : ""), E(d.ooo_end ? String(d.ooo_end).slice(0, 10) : "");
|
|
78
|
+
}, q = g ? (/* @__PURE__ */ new Date(`${g}T12:00:00`)).toLocaleDateString(void 0, {
|
|
72
79
|
month: "long",
|
|
73
80
|
day: "numeric"
|
|
74
81
|
}) : null;
|
|
75
|
-
return /* @__PURE__ */
|
|
76
|
-
|
|
82
|
+
return /* @__PURE__ */ o(
|
|
83
|
+
X,
|
|
77
84
|
{
|
|
78
85
|
testId: "delegation",
|
|
79
|
-
icon: /* @__PURE__ */
|
|
86
|
+
icon: /* @__PURE__ */ e(z, { className: "h-4 w-4" }),
|
|
80
87
|
title: "Out of office",
|
|
81
|
-
hint:
|
|
82
|
-
actions:
|
|
83
|
-
/* @__PURE__ */
|
|
88
|
+
hint: a ? `Route ${a}'s approvals to a delegate while they are away` : "Route your approvals to a delegate while you are away",
|
|
89
|
+
actions: W && /* @__PURE__ */ o("span", { className: "flex items-center gap-1.5", children: [
|
|
90
|
+
/* @__PURE__ */ o(
|
|
84
91
|
"button",
|
|
85
92
|
{
|
|
86
93
|
type: "button",
|
|
87
94
|
title: "Discard changes",
|
|
88
|
-
onClick:
|
|
95
|
+
onClick: j,
|
|
89
96
|
className: "inline-flex h-7 items-center gap-1 rounded-md px-2 text-[11.5px] font-medium text-slate-400 transition-colors hover:text-slate-600 dark:hover:text-slate-200",
|
|
90
97
|
children: [
|
|
91
|
-
/* @__PURE__ */
|
|
98
|
+
/* @__PURE__ */ e(G, { className: "h-3 w-3" }),
|
|
92
99
|
" Reset"
|
|
93
100
|
]
|
|
94
101
|
}
|
|
95
102
|
),
|
|
96
|
-
/* @__PURE__ */
|
|
103
|
+
/* @__PURE__ */ o(
|
|
97
104
|
"button",
|
|
98
105
|
{
|
|
99
106
|
type: "button",
|
|
100
|
-
disabled:
|
|
101
|
-
onClick: () =>
|
|
107
|
+
disabled: _.isPending,
|
|
108
|
+
onClick: () => _.mutate({}),
|
|
102
109
|
className: "inline-flex h-7 items-center gap-1 rounded-md bg-nvr-cyan px-2.5 text-[11.5px] font-semibold text-white transition-opacity disabled:opacity-50",
|
|
103
110
|
children: [
|
|
104
|
-
|
|
111
|
+
_.isPending ? /* @__PURE__ */ e(K, { className: "h-3 w-3 animate-spin" }) : /* @__PURE__ */ e(Q, { className: "h-3 w-3" }),
|
|
105
112
|
" ",
|
|
106
113
|
"Save"
|
|
107
114
|
]
|
|
@@ -109,124 +116,174 @@ function se({
|
|
|
109
116
|
)
|
|
110
117
|
] }),
|
|
111
118
|
children: [
|
|
112
|
-
/* @__PURE__ */
|
|
113
|
-
/* @__PURE__ */
|
|
114
|
-
/* @__PURE__ */
|
|
115
|
-
|
|
119
|
+
/* @__PURE__ */ o("div", { className: "flex items-center justify-between gap-3", children: [
|
|
120
|
+
/* @__PURE__ */ e("span", { className: "text-[12.5px] font-medium text-slate-700 dark:text-slate-200", children: a ? `${a} is out of office` : "I'm out of office" }),
|
|
121
|
+
/* @__PURE__ */ e(
|
|
122
|
+
Z,
|
|
116
123
|
{
|
|
117
|
-
on:
|
|
118
|
-
onChange: () =>
|
|
119
|
-
label:
|
|
124
|
+
on: p,
|
|
125
|
+
onChange: () => N((t) => !t),
|
|
126
|
+
label: a ? `${a} is out of office` : "I'm out of office",
|
|
120
127
|
tone: "amber"
|
|
121
128
|
}
|
|
122
129
|
)
|
|
123
130
|
] }),
|
|
124
|
-
|
|
125
|
-
/* @__PURE__ */
|
|
131
|
+
y && i && i.owned_open_records + i.sla_escalations > 0 && /* @__PURE__ */ o("div", { className: "mt-2 rounded-md border border-amber-300 bg-amber-50 px-3 py-2 text-[12px] text-amber-800 dark:border-amber-500/40 dark:bg-amber-500/10 dark:text-amber-300", children: [
|
|
132
|
+
/* @__PURE__ */ e("span", { className: "font-semibold", children: "No delegate is set." }),
|
|
126
133
|
" While",
|
|
127
134
|
" ",
|
|
128
|
-
|
|
135
|
+
a ? `${a} is` : "you're",
|
|
129
136
|
" out,",
|
|
130
137
|
" ",
|
|
131
|
-
|
|
132
|
-
/* @__PURE__ */
|
|
138
|
+
i.owned_open_records > 0 && /* @__PURE__ */ o(T, { children: [
|
|
139
|
+
/* @__PURE__ */ e("span", { className: "font-semibold", children: i.owned_open_records }),
|
|
133
140
|
" open record",
|
|
134
|
-
|
|
141
|
+
i.owned_open_records === 1 ? "" : "s",
|
|
135
142
|
" ",
|
|
136
|
-
|
|
143
|
+
a ? "they own" : "you own"
|
|
137
144
|
] }),
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
/* @__PURE__ */
|
|
145
|
+
i.owned_open_records > 0 && i.sla_escalations > 0 && " and ",
|
|
146
|
+
i.sla_escalations > 0 && /* @__PURE__ */ o(T, { children: [
|
|
147
|
+
/* @__PURE__ */ e("span", { className: "font-semibold", children: i.sla_escalations }),
|
|
141
148
|
" SLA escalation rule",
|
|
142
|
-
|
|
149
|
+
i.sla_escalations === 1 ? "" : "s",
|
|
143
150
|
" that page ",
|
|
144
|
-
|
|
151
|
+
a ? "them" : "you"
|
|
145
152
|
] }),
|
|
146
153
|
" ",
|
|
147
154
|
"will have nobody covering them.",
|
|
148
155
|
" ",
|
|
149
|
-
|
|
156
|
+
a ? "Assign a delegate below." : "Pick a delegate below."
|
|
150
157
|
] }),
|
|
151
|
-
|
|
158
|
+
l && s && /* @__PURE__ */ o("div", { className: "mt-2 rounded-md border border-slate-200 bg-slate-50 px-3 py-2 text-[12px] text-slate-600 dark:border-border dark:bg-muted/40 dark:text-slate-300", children: [
|
|
152
159
|
"Your delegate would inherit",
|
|
153
160
|
" ",
|
|
154
|
-
/* @__PURE__ */
|
|
161
|
+
/* @__PURE__ */ e("b", { className: "tabular-nums", children: s.approx_open_approvals }),
|
|
155
162
|
" open approval",
|
|
156
|
-
|
|
163
|
+
s.approx_open_approvals === 1 ? "" : "s",
|
|
157
164
|
" while you're out."
|
|
158
165
|
] }),
|
|
159
|
-
|
|
160
|
-
|
|
166
|
+
l && (s == null ? void 0 : s.delegate_reach) && s.delegate_reach.hidden > 0 && /* @__PURE__ */ o(
|
|
167
|
+
"div",
|
|
168
|
+
{
|
|
169
|
+
className: "mt-2 rounded-md border border-amber-300 bg-amber-50 px-3 py-2 text-[12px] text-amber-800 dark:border-amber-500/40 dark:bg-amber-500/10 dark:text-amber-300",
|
|
170
|
+
"data-delegate-reach": !0,
|
|
171
|
+
children: [
|
|
172
|
+
"Your delegate cannot open",
|
|
173
|
+
" ",
|
|
174
|
+
/* @__PURE__ */ e("b", { className: "tabular-nums", children: s.delegate_reach.hidden === s.delegate_reach.owned ? "any" : s.delegate_reach.hidden }),
|
|
175
|
+
" ",
|
|
176
|
+
"of the ",
|
|
177
|
+
s.delegate_reach.owned,
|
|
178
|
+
" record",
|
|
179
|
+
s.delegate_reach.owned === 1 ? "" : "s",
|
|
180
|
+
" you own approvals on — those would wait for you. Pick someone who can see them."
|
|
181
|
+
]
|
|
182
|
+
}
|
|
183
|
+
),
|
|
184
|
+
O && /* @__PURE__ */ o(
|
|
185
|
+
"div",
|
|
186
|
+
{
|
|
187
|
+
className: "mt-2 rounded-md border border-red-300 bg-red-50 px-3 py-2 text-[12px] text-red-700 dark:border-red-500/40 dark:bg-red-500/10 dark:text-red-300",
|
|
188
|
+
role: "alert",
|
|
189
|
+
"data-delegate-unreachable": !0,
|
|
190
|
+
children: [
|
|
191
|
+
/* @__PURE__ */ e("p", { children: O }),
|
|
192
|
+
/* @__PURE__ */ o("div", { className: "mt-1.5 flex gap-1.5", children: [
|
|
193
|
+
/* @__PURE__ */ e(
|
|
194
|
+
"button",
|
|
195
|
+
{
|
|
196
|
+
type: "button",
|
|
197
|
+
disabled: _.isPending,
|
|
198
|
+
onClick: () => _.mutate({ acknowledge: !0 }),
|
|
199
|
+
className: "h-7 rounded-md border border-red-300 px-2.5 text-[11.5px] font-medium hover:bg-red-100 disabled:opacity-50 dark:border-red-500/40 dark:hover:bg-red-500/15",
|
|
200
|
+
children: "Save anyway"
|
|
201
|
+
}
|
|
202
|
+
),
|
|
203
|
+
/* @__PURE__ */ e(
|
|
204
|
+
"button",
|
|
205
|
+
{
|
|
206
|
+
type: "button",
|
|
207
|
+
onClick: () => f(null),
|
|
208
|
+
className: "h-7 rounded-md px-2.5 text-[11.5px] text-red-600 hover:underline dark:text-red-300",
|
|
209
|
+
children: "Pick someone else"
|
|
210
|
+
}
|
|
211
|
+
)
|
|
212
|
+
] })
|
|
213
|
+
]
|
|
214
|
+
}
|
|
215
|
+
),
|
|
216
|
+
v.length > 0 && /* @__PURE__ */ o("div", { className: "mt-2 rounded-md border border-amber-300 bg-amber-50 px-3 py-2 text-[12px] text-amber-800 dark:border-amber-500/40 dark:bg-amber-500/10 dark:text-amber-300", children: [
|
|
217
|
+
/* @__PURE__ */ o("p", { className: "font-semibold", children: [
|
|
161
218
|
"Coverage warning",
|
|
162
|
-
|
|
219
|
+
v.length === 1 ? "" : "s",
|
|
163
220
|
":"
|
|
164
221
|
] }),
|
|
165
|
-
/* @__PURE__ */
|
|
222
|
+
/* @__PURE__ */ e("ul", { className: "mt-0.5 list-disc pl-4", children: v.map((t) => /* @__PURE__ */ e("li", { children: t }, t)) })
|
|
166
223
|
] }),
|
|
167
|
-
/* @__PURE__ */
|
|
168
|
-
/* @__PURE__ */
|
|
169
|
-
/* @__PURE__ */
|
|
170
|
-
/* @__PURE__ */
|
|
171
|
-
|
|
224
|
+
/* @__PURE__ */ o("div", { className: "mt-3 grid gap-3 border-t border-slate-100 pt-3 dark:border-border/60 sm:grid-cols-2", children: [
|
|
225
|
+
/* @__PURE__ */ o("div", { children: [
|
|
226
|
+
/* @__PURE__ */ e("span", { className: "mb-1 block text-[11px] font-medium uppercase tracking-wide text-slate-500 dark:text-slate-400", children: "Delegate" }),
|
|
227
|
+
/* @__PURE__ */ e(
|
|
228
|
+
V,
|
|
172
229
|
{
|
|
173
230
|
collection: "nivaro_users",
|
|
174
|
-
value:
|
|
175
|
-
onChange: (
|
|
231
|
+
value: l,
|
|
232
|
+
onChange: (t) => C(t == null ? null : String(t)),
|
|
176
233
|
placeholder: "Pick a delegate…"
|
|
177
234
|
}
|
|
178
235
|
)
|
|
179
236
|
] }),
|
|
180
|
-
/* @__PURE__ */
|
|
181
|
-
|
|
237
|
+
/* @__PURE__ */ e(
|
|
238
|
+
k,
|
|
182
239
|
{
|
|
183
240
|
label: "Out from",
|
|
184
241
|
hint: "schedule ahead",
|
|
185
242
|
type: "date",
|
|
186
|
-
value:
|
|
187
|
-
onChange:
|
|
243
|
+
value: h,
|
|
244
|
+
onChange: D
|
|
188
245
|
}
|
|
189
246
|
),
|
|
190
|
-
/* @__PURE__ */
|
|
191
|
-
|
|
247
|
+
/* @__PURE__ */ e(
|
|
248
|
+
k,
|
|
192
249
|
{
|
|
193
250
|
label: "Out until",
|
|
194
251
|
hint: "auto-clears after",
|
|
195
252
|
type: "date",
|
|
196
|
-
value:
|
|
197
|
-
onChange:
|
|
253
|
+
value: b,
|
|
254
|
+
onChange: E
|
|
198
255
|
}
|
|
199
256
|
),
|
|
200
|
-
/* @__PURE__ */
|
|
201
|
-
|
|
257
|
+
/* @__PURE__ */ e(
|
|
258
|
+
k,
|
|
202
259
|
{
|
|
203
260
|
label: "Until",
|
|
204
261
|
hint: "optional",
|
|
205
262
|
type: "date",
|
|
206
|
-
value:
|
|
207
|
-
onChange:
|
|
263
|
+
value: g,
|
|
264
|
+
onChange: $,
|
|
208
265
|
inputClassName: "h-9"
|
|
209
266
|
}
|
|
210
267
|
)
|
|
211
268
|
] }),
|
|
212
|
-
/* @__PURE__ */
|
|
269
|
+
/* @__PURE__ */ e(
|
|
213
270
|
"p",
|
|
214
271
|
{
|
|
215
|
-
className:
|
|
272
|
+
className: J(
|
|
216
273
|
"mt-3 text-[11.5px] leading-relaxed",
|
|
217
|
-
|
|
274
|
+
p && !l ? "rounded-md bg-amber-50 px-2.5 py-1.5 text-amber-700 dark:bg-amber-500/10 dark:text-amber-400" : "text-slate-400 dark:text-slate-500"
|
|
218
275
|
),
|
|
219
|
-
children:
|
|
276
|
+
children: p && !l ? a ? `No delegate picked — approvals will wait for ${a} until they return.` : "No delegate picked — approvals will wait for you until you return." : p ? `Workflow ownership and approvals route to ${a ? `${a}'s` : "your"} delegate${q ? ` through ${q}` : ` until ${a ? "this is" : "you turn this"} off`}.` : `When enabled, workflow ownership and approvals resolve to ${a ? `${a}'s` : "your"} delegate.`
|
|
220
277
|
}
|
|
221
278
|
),
|
|
222
|
-
|
|
223
|
-
/* @__PURE__ */
|
|
224
|
-
/* @__PURE__ */
|
|
279
|
+
w && w.length > 0 && /* @__PURE__ */ o("div", { className: "mt-3 border-t border-slate-100 pt-3 dark:border-border/60", children: [
|
|
280
|
+
/* @__PURE__ */ e("p", { className: "mb-1.5 text-[11px] font-medium uppercase tracking-wide text-slate-400", children: "Covers for" }),
|
|
281
|
+
/* @__PURE__ */ e("div", { className: "flex flex-wrap gap-x-4 gap-y-1.5", "data-person-covers": !0, children: w.map((t) => /* @__PURE__ */ e(U, { person: t }, t.id)) })
|
|
225
282
|
] })
|
|
226
283
|
]
|
|
227
284
|
}
|
|
228
285
|
);
|
|
229
286
|
}
|
|
230
287
|
export {
|
|
231
|
-
|
|
288
|
+
ce as DelegationCard
|
|
232
289
|
};
|