@nivaro/react 0.3.40 → 0.3.42
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/components/LayoutForm.js +100 -98
- package/dist/full.css +1 -1
- package/dist/hooks/useSessionRecorder.js +1 -1
- package/dist/index.d.ts +645 -16
- package/dist/index.js +814 -775
- package/dist/shared/components/ActivityEntry.js +154 -0
- package/dist/shared/components/AudienceConfirmPanel.js +98 -0
- package/dist/shared/components/BackgroundRunOffer.js +43 -31
- package/dist/shared/components/BroadcastView.js +225 -204
- package/dist/shared/components/CollectionBrowserView.js +3924 -3584
- package/dist/shared/components/ConfigHistory.js +153 -0
- package/dist/shared/components/ConfigReadBack.js +65 -0
- package/dist/shared/components/DataTable.js +379 -346
- package/dist/shared/components/ForceReloadBanner.js +47 -40
- package/dist/shared/components/IdleReloadWatcher.js +69 -0
- package/dist/shared/components/ItemEditForm.js +4041 -3853
- package/dist/shared/components/MyWorkView.js +278 -213
- package/dist/shared/components/NotificationBell.js +130 -121
- package/dist/shared/components/PickerExcludedRows.js +3 -3
- package/dist/shared/components/ProfileView.js +776 -1003
- package/dist/shared/components/RecentRecordsRail.js +34 -16
- package/dist/shared/components/RecordReadView.js +500 -477
- package/dist/shared/components/Skeletons.js +199 -0
- package/dist/shared/components/SlowNotice.js +63 -0
- package/dist/shared/components/Term.js +23 -0
- package/dist/shared/components/WidgetSlot.js +350 -353
- package/dist/shared/components/access/PermissionSummary.js +106 -0
- package/dist/shared/components/bulk/BulkActionButtons.js +76 -73
- package/dist/shared/components/chat/ChatPanel.js +902 -886
- package/dist/shared/components/chat/MemberPaging.js +70 -0
- package/dist/shared/components/chat/RoomParts.js +147 -117
- package/dist/shared/components/chat/ScreenClip.js +73 -69
- package/dist/shared/components/chat/chat-core.js +449 -396
- package/dist/shared/components/chat/huddle/huddle-store.js +48 -43
- package/dist/shared/components/help-videos/api.js +2 -5
- package/dist/shared/components/help-videos/viewer/HelpVideoMatchChip.js +79 -0
- package/dist/shared/components/help-videos/viewer/matchChip.js +50 -0
- package/dist/shared/components/imports/CollectionImportPanel.js +139 -133
- package/dist/shared/components/imports/RunDetailSheet.js +222 -227
- package/dist/shared/components/integrations/console/ErrorExplanation.js +121 -0
- package/dist/shared/components/integrations/console/PartnerDetail.js +175 -174
- package/dist/shared/components/integrations/console/SubmissionRow.js +36 -34
- package/dist/shared/components/integrations/console/drill/SubmissionDrill.js +50 -48
- package/dist/shared/components/item-edit/FieldComments.js +212 -0
- package/dist/shared/components/item-edit/FieldRow.js +340 -336
- package/dist/shared/components/item-edit/RecordGrantTools.js +28 -28
- package/dist/shared/components/item-edit/RecordHeaderActions.js +23 -22
- package/dist/shared/components/item-edit/RelationCombobox.js +231 -222
- package/dist/shared/components/item-edit/RuleHiddenNotes.js +55 -0
- package/dist/shared/components/item-edit/field-comments-context.js +6 -0
- package/dist/shared/components/item-edit/field-sources.js +33 -0
- package/dist/shared/components/item-edit/rule-hidden.js +30 -0
- package/dist/shared/components/layout-editor/HistoryPanel.js +113 -96
- package/dist/shared/components/layout-editor/editors/cascade-filters.js +170 -145
- package/dist/shared/components/layout-editor/inspector/Breadcrumb.js +22 -18
- package/dist/shared/components/layout-editor/inspector/GroupInspector.js +177 -159
- package/dist/shared/components/layout-editor/inspector/PickerTab.js +35 -34
- package/dist/shared/components/layout-editor/inspector/RulesTab.js +124 -111
- package/dist/shared/components/layout-editor/inspector/kit.js +292 -277
- package/dist/shared/components/layout-editor/parity-keys.json.js +1 -1
- package/dist/shared/components/layout-editor/settings/settings-registry.js +1 -1
- package/dist/shared/components/list/CopyListLinkButton.js +41 -0
- package/dist/shared/components/list/InlineEdit.js +363 -0
- package/dist/shared/components/notifications/NotificationCenterView.js +213 -181
- package/dist/shared/components/notifications/NotificationDetailBits.js +205 -82
- package/dist/shared/components/notifications/NotificationRulesEditor.js +515 -0
- package/dist/shared/components/notifications/TestMyRules.js +137 -0
- package/dist/shared/components/notifications/changes-lines.js +24 -0
- package/dist/shared/components/notifications/why-lines.js +64 -0
- package/dist/shared/components/panels/CommentPanel.js +316 -281
- package/dist/shared/components/panels/LegalHoldBanner.js +38 -0
- package/dist/shared/components/panels/PipelinePanel.js +201 -196
- package/dist/shared/components/panels/RevisionsPanel.js +496 -479
- package/dist/shared/components/pipeline/PipelineEditorView.js +1587 -1560
- package/dist/shared/components/pipeline/PipelineStateOwners.js +116 -103
- package/dist/shared/components/profile/PersonDidPanel.js +188 -0
- package/dist/shared/components/profile/PersonProfile.js +57 -52
- package/dist/shared/components/queue/QueueWorklist.js +1526 -1365
- package/dist/shared/hooks/useSlowReason.js +39 -0
- package/dist/shared/lib/activity-sentence.js +670 -0
- package/dist/shared/lib/config-sentences.js +418 -0
- package/dist/shared/lib/core-glossary.js +229 -0
- package/dist/shared/lib/error-hints.js +159 -0
- package/dist/shared/lib/error-message.js +105 -0
- package/dist/shared/lib/error-toast.js +22 -0
- package/dist/shared/lib/field-comments.js +25 -0
- package/dist/shared/lib/filter-sentence.js +261 -0
- package/dist/shared/lib/glossary.js +55 -48
- package/dist/shared/lib/idle-reload.js +138 -0
- package/dist/shared/lib/layout-resolve.js +42 -29
- package/dist/shared/lib/list-inline-edit.js +190 -0
- package/dist/shared/lib/list-link.js +147 -0
- package/dist/shared/lib/prefetch.js +259 -106
- package/dist/shared/lib/record-ref.js +72 -0
- package/dist/shared/lib/reload-holds.js +25 -0
- package/dist/shared/lib/safe-error.js +52 -24
- package/dist/shared/lib/skeleton-shapes.js +72 -0
- package/dist/shared/lib/slow-reason.js +63 -0
- package/package.json +1 -1
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
import { jsx as e, jsxs as o } from "react/jsx-runtime";
|
|
2
|
+
import { useQuery as f, useMutation as w } from "@tanstack/react-query";
|
|
3
|
+
import { Download as C, ListChecks as L, ChevronRight as S } from "lucide-react";
|
|
4
|
+
import { useState as v } from "react";
|
|
5
|
+
import { useNivaroClient as N, useItemNavigation as T } from "../../context.js";
|
|
6
|
+
import { get as k, post as _ } from "../../lib/commands.js";
|
|
7
|
+
import { formatNumber as y, formatDate as D, cn as O, titleCase as q } from "../../lib/utils.js";
|
|
8
|
+
import { SimpleSelect as U } from "../ui/SimpleSelect.js";
|
|
9
|
+
import { SectionCard as j, EmptyLine as b } from "./primitives.js";
|
|
10
|
+
const g = "__none__", E = [
|
|
11
|
+
{ value: "7", label: "Last 7 days" },
|
|
12
|
+
{ value: "30", label: "Last 30 days" },
|
|
13
|
+
{ value: "90", label: "Last 90 days" }
|
|
14
|
+
];
|
|
15
|
+
function R() {
|
|
16
|
+
try {
|
|
17
|
+
return Intl.DateTimeFormat().resolvedOptions().timeZone || "UTC";
|
|
18
|
+
} catch {
|
|
19
|
+
return "UTC";
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
function $(r) {
|
|
23
|
+
return r ? q(r.replace(/^(nivaro|directus)_/, "").replace(/_/g, " ")) : "Sign-ins and other";
|
|
24
|
+
}
|
|
25
|
+
function F(r) {
|
|
26
|
+
return Object.entries(r).sort((n, s) => s[1] - n[1]).map(([n, s]) => `${s} ${n.replace(/[-_]/g, " ")}`).join(" · ");
|
|
27
|
+
}
|
|
28
|
+
function G({ userId: r, name: n }) {
|
|
29
|
+
const s = N(), [i, h] = v("30"), c = R(), { data: a, isLoading: u, isError: p } = f({
|
|
30
|
+
queryKey: ["nvr-person-did", r, i, c],
|
|
31
|
+
queryFn: () => s.request(k(`/activity/people/${r}/summary`, { days: i, tz: c })).then((l) => l.data),
|
|
32
|
+
staleTime: 6e4
|
|
33
|
+
}), d = w({
|
|
34
|
+
mutationFn: () => s.request(
|
|
35
|
+
_(`/activity/people/${r}/export`, { days: Number(i), tz: c })
|
|
36
|
+
).then((l) => l.data),
|
|
37
|
+
onSuccess: ({ csv: l, filename: t }) => {
|
|
38
|
+
const m = URL.createObjectURL(new Blob([l], { type: "text/csv;charset=utf-8" })), x = document.createElement("a");
|
|
39
|
+
x.href = m, x.download = t, x.click(), setTimeout(() => URL.revokeObjectURL(m), 1e3);
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
return /* @__PURE__ */ e(
|
|
43
|
+
j,
|
|
44
|
+
{
|
|
45
|
+
icon: /* @__PURE__ */ e(L, { className: "h-4 w-4" }),
|
|
46
|
+
title: n ? `What ${n} did` : "What they did",
|
|
47
|
+
hint: "Every recorded change, by day and collection",
|
|
48
|
+
testId: "what-they-did",
|
|
49
|
+
actions: /* @__PURE__ */ o("div", { className: "flex items-center gap-2", children: [
|
|
50
|
+
/* @__PURE__ */ e(
|
|
51
|
+
U,
|
|
52
|
+
{
|
|
53
|
+
value: i,
|
|
54
|
+
onChange: h,
|
|
55
|
+
options: E,
|
|
56
|
+
className: "h-7 w-[130px] text-[12px]",
|
|
57
|
+
ariaLabel: "Window"
|
|
58
|
+
}
|
|
59
|
+
),
|
|
60
|
+
/* @__PURE__ */ o(
|
|
61
|
+
"button",
|
|
62
|
+
{
|
|
63
|
+
type: "button",
|
|
64
|
+
onClick: () => d.mutate(),
|
|
65
|
+
disabled: d.isPending || !(a != null && a.total),
|
|
66
|
+
className: "inline-flex h-7 items-center gap-1 rounded-md border border-slate-200 px-2 text-[12px] text-slate-700 hover:bg-muted disabled:opacity-50 dark:border-border dark:text-slate-200",
|
|
67
|
+
"data-person-did-export": !0,
|
|
68
|
+
children: [
|
|
69
|
+
/* @__PURE__ */ e(C, { className: "h-3.5 w-3.5" }),
|
|
70
|
+
d.isPending ? "Exporting…" : "CSV"
|
|
71
|
+
]
|
|
72
|
+
}
|
|
73
|
+
)
|
|
74
|
+
] }),
|
|
75
|
+
children: u ? /* @__PURE__ */ e("div", { className: "space-y-2", "aria-busy": "true", children: [0, 1, 2].map((l) => /* @__PURE__ */ e("div", { className: "h-9 animate-pulse rounded-md bg-slate-100 dark:bg-muted" }, l)) }) : p || !a ? /* @__PURE__ */ e(b, { children: "The activity could not be loaded." }) : a.days.length === 0 ? /* @__PURE__ */ e(b, { children: "Nothing recorded in this window." }) : /* @__PURE__ */ o("div", { className: "space-y-3", "data-person-did": !0, children: [
|
|
76
|
+
/* @__PURE__ */ o("p", { className: "text-[11.5px] text-slate-500 dark:text-slate-400", children: [
|
|
77
|
+
y(a.total),
|
|
78
|
+
a.truncated ? "+" : "",
|
|
79
|
+
" entries over ",
|
|
80
|
+
a.days.length,
|
|
81
|
+
" active day",
|
|
82
|
+
a.days.length === 1 ? "" : "s",
|
|
83
|
+
a.truncated ? " — the newest are shown; export for a shorter window." : ""
|
|
84
|
+
] }),
|
|
85
|
+
a.days.map((l) => /* @__PURE__ */ e(W, { userId: r, group: l, tz: a.tz }, l.day))
|
|
86
|
+
] })
|
|
87
|
+
}
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
function W({ userId: r, group: n, tz: s }) {
|
|
91
|
+
return /* @__PURE__ */ o("section", { "data-person-did-day": n.day, children: [
|
|
92
|
+
/* @__PURE__ */ o("h4", { className: "mb-1 flex items-baseline gap-2 text-[12px] font-semibold text-slate-700 dark:text-slate-200", children: [
|
|
93
|
+
D(n.day, { weekday: "short" }),
|
|
94
|
+
/* @__PURE__ */ e("span", { className: "font-normal text-slate-500 dark:text-slate-400", children: y(n.total) })
|
|
95
|
+
] }),
|
|
96
|
+
/* @__PURE__ */ e("ul", { className: "divide-y divide-slate-100 rounded-md border border-slate-200 dark:divide-border/60 dark:border-border", children: n.collections.map((i) => /* @__PURE__ */ e(
|
|
97
|
+
P,
|
|
98
|
+
{
|
|
99
|
+
userId: r,
|
|
100
|
+
day: n.day,
|
|
101
|
+
tz: s,
|
|
102
|
+
group: i
|
|
103
|
+
},
|
|
104
|
+
i.collection ?? g
|
|
105
|
+
)) })
|
|
106
|
+
] });
|
|
107
|
+
}
|
|
108
|
+
function P({
|
|
109
|
+
userId: r,
|
|
110
|
+
day: n,
|
|
111
|
+
tz: s,
|
|
112
|
+
group: i
|
|
113
|
+
}) {
|
|
114
|
+
const h = N(), c = T(), [a, u] = v(!1), p = i.collection ?? g, { data: d, isLoading: l } = f({
|
|
115
|
+
queryKey: ["nvr-person-did-entries", r, n, p, s],
|
|
116
|
+
enabled: a,
|
|
117
|
+
queryFn: () => h.request(
|
|
118
|
+
k(`/activity/people/${r}/entries`, { day: n, collection: p, tz: s })
|
|
119
|
+
).then((t) => t.data),
|
|
120
|
+
staleTime: 6e4
|
|
121
|
+
});
|
|
122
|
+
return /* @__PURE__ */ o("li", { children: [
|
|
123
|
+
/* @__PURE__ */ o(
|
|
124
|
+
"button",
|
|
125
|
+
{
|
|
126
|
+
type: "button",
|
|
127
|
+
onClick: () => u((t) => !t),
|
|
128
|
+
"aria-expanded": a,
|
|
129
|
+
className: "flex w-full items-center gap-2 px-3 py-2 text-left text-[12.5px] hover:bg-muted",
|
|
130
|
+
children: [
|
|
131
|
+
/* @__PURE__ */ e(
|
|
132
|
+
S,
|
|
133
|
+
{
|
|
134
|
+
className: O(
|
|
135
|
+
"h-3.5 w-3.5 shrink-0 text-slate-400 transition-transform",
|
|
136
|
+
a && "rotate-90"
|
|
137
|
+
)
|
|
138
|
+
}
|
|
139
|
+
),
|
|
140
|
+
/* @__PURE__ */ e("span", { className: "font-medium text-slate-800 dark:text-slate-100", children: $(i.collection) }),
|
|
141
|
+
/* @__PURE__ */ e("span", { className: "min-w-0 truncate text-[11.5px] text-slate-500 dark:text-slate-400", children: F(i.actions) }),
|
|
142
|
+
/* @__PURE__ */ e("span", { className: "ml-auto shrink-0 tabular-nums text-slate-600 dark:text-slate-300", children: y(i.count) })
|
|
143
|
+
]
|
|
144
|
+
}
|
|
145
|
+
),
|
|
146
|
+
a && /* @__PURE__ */ e("div", { className: "border-t border-slate-100 bg-slate-50 px-3 py-2 dark:border-border/60 dark:bg-muted/30", children: l ? /* @__PURE__ */ e("p", { className: "text-[11.5px] text-slate-500 dark:text-slate-400", children: "Loading…" }) : /* @__PURE__ */ o("ol", { className: "space-y-1", children: [
|
|
147
|
+
(d ?? []).map((t) => {
|
|
148
|
+
const m = t.collection && t.item && !/^(nivaro|directus)_/.test(t.collection) ? { collection: t.collection, itemId: t.item } : null;
|
|
149
|
+
return /* @__PURE__ */ o("li", { className: "flex items-baseline gap-2 text-[11.5px]", children: [
|
|
150
|
+
/* @__PURE__ */ e("time", { className: "w-14 shrink-0 tabular-nums text-slate-500 dark:text-slate-400", children: new Intl.DateTimeFormat("en-US", {
|
|
151
|
+
hour: "numeric",
|
|
152
|
+
minute: "2-digit",
|
|
153
|
+
timeZone: s
|
|
154
|
+
}).format(new Date(t.timestamp)) }),
|
|
155
|
+
/* @__PURE__ */ e("span", { className: "shrink-0 font-medium text-slate-700 dark:text-slate-200", children: t.action.replace(/[-_]/g, " ") }),
|
|
156
|
+
t.item && (m ? /* @__PURE__ */ o(
|
|
157
|
+
"button",
|
|
158
|
+
{
|
|
159
|
+
type: "button",
|
|
160
|
+
className: "shrink-0 text-nvr-navy hover:underline dark:text-nvr-cyan",
|
|
161
|
+
onClick: () => c.open(m),
|
|
162
|
+
children: [
|
|
163
|
+
"#",
|
|
164
|
+
t.item
|
|
165
|
+
]
|
|
166
|
+
}
|
|
167
|
+
) : /* @__PURE__ */ o("span", { className: "shrink-0 font-mono text-slate-500 dark:text-slate-400", children: [
|
|
168
|
+
"#",
|
|
169
|
+
t.item
|
|
170
|
+
] })),
|
|
171
|
+
t.comment && /* @__PURE__ */ e(
|
|
172
|
+
"span",
|
|
173
|
+
{
|
|
174
|
+
className: "min-w-0 truncate text-slate-500 dark:text-slate-400",
|
|
175
|
+
title: t.comment,
|
|
176
|
+
children: t.comment
|
|
177
|
+
}
|
|
178
|
+
)
|
|
179
|
+
] }, t.id);
|
|
180
|
+
}),
|
|
181
|
+
(d == null ? void 0 : d.length) === 500 && /* @__PURE__ */ e("li", { className: "text-[11px] text-slate-500 dark:text-slate-400", children: "The first 500 are shown — export for all." })
|
|
182
|
+
] }) })
|
|
183
|
+
] });
|
|
184
|
+
}
|
|
185
|
+
export {
|
|
186
|
+
G as PersonDidPanel,
|
|
187
|
+
$ as collectionName
|
|
188
|
+
};
|
|
@@ -2,29 +2,31 @@ import { jsx as r, jsxs as a } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState as b } from "react";
|
|
3
3
|
import { useItemEditAuth as _ } from "../../context.js";
|
|
4
4
|
import { cn as l } from "../../lib/utils.js";
|
|
5
|
-
import {
|
|
5
|
+
import { PermissionSummaryCard as A } from "../access/PermissionSummary.js";
|
|
6
|
+
import { Tabs as I, TabsList as P, TabsTrigger as S, TabsContent as i } from "../ui/tabs.js";
|
|
6
7
|
import { DayTimelineCard as T } from "./DayTimeline.js";
|
|
7
|
-
import { DelegationCard as
|
|
8
|
-
import { MyDefaultsCard as
|
|
9
|
-
import { SuspensionBanner as
|
|
8
|
+
import { DelegationCard as D } from "./DelegationCard.js";
|
|
9
|
+
import { MyDefaultsCard as U } from "./MyDefaultsCard.js";
|
|
10
|
+
import { SuspensionBanner as F, AccessCard as M, UserScopesCard as O, UserDirectoryCard as W, SessionsCard as j, ApiTokenCard as E } from "./PersonAccess.js";
|
|
10
11
|
import { AccessSummaryCard as L } from "./PersonAccessSummary.js";
|
|
11
|
-
import { StatsCard as R, ActivityFeedCard as V, SignInsCard as
|
|
12
|
-
import { ForceReloadCard as
|
|
13
|
-
import { PersonAiMemoryCard as
|
|
14
|
-
import { CompareAccessCard as
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
|
|
21
|
-
|
|
12
|
+
import { StatsCard as R, ActivityFeedCard as V, SignInsCard as B, JourneyCard as H } from "./PersonActivity.js";
|
|
13
|
+
import { ForceReloadCard as J, SignOutEverywhereCard as q, MergeCard as z, OffboardingCard as G } from "./PersonAdminTools.js";
|
|
14
|
+
import { PersonAiMemoryCard as K } from "./PersonAiMemory.js";
|
|
15
|
+
import { CompareAccessCard as Q } from "./PersonCompare.js";
|
|
16
|
+
import { PersonDidPanel as X } from "./PersonDidPanel.js";
|
|
17
|
+
import { WorkingOnCard as Y, TeamLoadCard as Z, WhyCard as $ } from "./PersonExtras.js";
|
|
18
|
+
import { PersonHeader as ee } from "./PersonHeader.js";
|
|
19
|
+
import { AboutCard as re, PeopleCard as ae, AvailabilityCard as de, ResponsibilitiesCard as se } from "./PersonOverview.js";
|
|
20
|
+
import { PersonWeekCard as te } from "./PersonWeek.js";
|
|
21
|
+
import { usePersonProfile as ie, useInvalidatePerson as oe } from "./types.js";
|
|
22
|
+
function Te({
|
|
23
|
+
userId: o,
|
|
22
24
|
className: n,
|
|
23
|
-
initialTab:
|
|
25
|
+
initialTab: h = "overview"
|
|
24
26
|
}) {
|
|
25
|
-
var v,
|
|
26
|
-
const t = _(), s = !!(t != null && t.isAdmin), { data: e, isLoading:
|
|
27
|
-
if (
|
|
27
|
+
var v, g, f;
|
|
28
|
+
const t = _(), s = !!(t != null && t.isAdmin), { data: e, isLoading: y, isError: x } = ie(o), N = oe(o), [u, C] = b(h), [c, k] = b("feed");
|
|
29
|
+
if (y || !e && !x) return /* @__PURE__ */ r(le, { className: n });
|
|
28
30
|
if (!e)
|
|
29
31
|
return /* @__PURE__ */ a(
|
|
30
32
|
"div",
|
|
@@ -42,21 +44,21 @@ function Ae({
|
|
|
42
44
|
);
|
|
43
45
|
const w = !!(t != null && t.userId) && !!((v = e.manager) != null && v.id) && String(e.manager.id).toUpperCase() === String(t.userId).toUpperCase(), p = /* @__PURE__ */ a("div", { className: "grid gap-4 lg:grid-cols-2", children: [
|
|
44
46
|
/* @__PURE__ */ a("div", { className: "space-y-4", children: [
|
|
45
|
-
/* @__PURE__ */ r(
|
|
46
|
-
/* @__PURE__ */ r(
|
|
47
|
+
/* @__PURE__ */ r(re, { profile: e, isAdmin: s }),
|
|
48
|
+
/* @__PURE__ */ r(Y, { profile: e }),
|
|
47
49
|
e.direct_reports.length > 0 && /* @__PURE__ */ r(
|
|
48
|
-
|
|
50
|
+
Z,
|
|
49
51
|
{
|
|
50
52
|
userId: e.id,
|
|
51
53
|
firstName: e.first_name ?? e.name,
|
|
52
54
|
expectedRows: e.direct_reports.length
|
|
53
55
|
}
|
|
54
56
|
),
|
|
55
|
-
/* @__PURE__ */ r(
|
|
57
|
+
/* @__PURE__ */ r(ae, { profile: e })
|
|
56
58
|
] }),
|
|
57
59
|
/* @__PURE__ */ a("div", { className: "space-y-4", children: [
|
|
58
60
|
s ? /* @__PURE__ */ r(
|
|
59
|
-
|
|
61
|
+
D,
|
|
60
62
|
{
|
|
61
63
|
user: {
|
|
62
64
|
id: e.id,
|
|
@@ -66,26 +68,26 @@ function Ae({
|
|
|
66
68
|
role: e.role_id,
|
|
67
69
|
status: e.status,
|
|
68
70
|
is_out_of_office: e.is_out_of_office,
|
|
69
|
-
delegate_id: ((
|
|
70
|
-
delegate_expires_at: ((
|
|
71
|
+
delegate_id: ((g = e.delegate) == null ? void 0 : g.id) ?? null,
|
|
72
|
+
delegate_expires_at: ((f = e.delegate) == null ? void 0 : f.expires_at) ?? null,
|
|
71
73
|
ooo_start: e.ooo_start,
|
|
72
74
|
ooo_end: e.ooo_end
|
|
73
75
|
},
|
|
74
76
|
forUser: { id: e.id, firstName: e.first_name ?? e.name },
|
|
75
77
|
coversFor: e.covers_for,
|
|
76
|
-
onSaved:
|
|
78
|
+
onSaved: N
|
|
77
79
|
}
|
|
78
|
-
) : /* @__PURE__ */ r(
|
|
79
|
-
/* @__PURE__ */ r(
|
|
80
|
-
(s || w) && /* @__PURE__ */ r(
|
|
80
|
+
) : /* @__PURE__ */ r(de, { profile: e }),
|
|
81
|
+
/* @__PURE__ */ r(se, { profile: e, isAdmin: s }),
|
|
82
|
+
(s || w) && /* @__PURE__ */ r(te, { profile: e })
|
|
81
83
|
] })
|
|
82
84
|
] });
|
|
83
85
|
return /* @__PURE__ */ a("div", { className: l("flex flex-col gap-4", n), "data-nvr-person": e.id, children: [
|
|
84
|
-
/* @__PURE__ */ r(
|
|
85
|
-
s && /* @__PURE__ */ r(
|
|
86
|
-
s ? /* @__PURE__ */ a(
|
|
86
|
+
/* @__PURE__ */ r(ee, { profile: e, isAdmin: s }),
|
|
87
|
+
s && /* @__PURE__ */ r(F, { profile: e }),
|
|
88
|
+
s ? /* @__PURE__ */ a(I, { value: u, onValueChange: (d) => C(d), children: [
|
|
87
89
|
/* @__PURE__ */ r(
|
|
88
|
-
|
|
90
|
+
P,
|
|
89
91
|
{
|
|
90
92
|
className: "h-9 w-full justify-start gap-1 rounded-lg border border-slate-200 bg-white p-1 dark:border-border dark:bg-card",
|
|
91
93
|
"data-person-tabs": !0,
|
|
@@ -93,6 +95,7 @@ function Ae({
|
|
|
93
95
|
["overview", "Overview"],
|
|
94
96
|
["access", "Access"],
|
|
95
97
|
["activity", "Activity"],
|
|
98
|
+
["did", "What they did"],
|
|
96
99
|
["tools", "Admin tools"]
|
|
97
100
|
].map(([d, m]) => /* @__PURE__ */ r(
|
|
98
101
|
S,
|
|
@@ -106,22 +109,23 @@ function Ae({
|
|
|
106
109
|
))
|
|
107
110
|
}
|
|
108
111
|
),
|
|
109
|
-
/* @__PURE__ */ r(
|
|
110
|
-
/* @__PURE__ */ r(
|
|
112
|
+
/* @__PURE__ */ r(i, { value: "overview", className: "mt-4 focus-visible:outline-none", children: p }),
|
|
113
|
+
/* @__PURE__ */ r(i, { value: "access", className: "mt-4 focus-visible:outline-none", children: /* @__PURE__ */ a("div", { className: "grid gap-4 lg:grid-cols-2", children: [
|
|
111
114
|
/* @__PURE__ */ a("div", { className: "space-y-4", children: [
|
|
112
|
-
/* @__PURE__ */ r(
|
|
115
|
+
/* @__PURE__ */ r(M, { profile: e }),
|
|
113
116
|
/* @__PURE__ */ r(L, { userId: e.id }),
|
|
114
|
-
/* @__PURE__ */ r(
|
|
115
|
-
/* @__PURE__ */ r(
|
|
116
|
-
/* @__PURE__ */ r(
|
|
117
|
+
/* @__PURE__ */ r(A, { userId: e.id }),
|
|
118
|
+
/* @__PURE__ */ r(O, { userId: e.id }),
|
|
119
|
+
/* @__PURE__ */ r($, { profile: e }),
|
|
120
|
+
/* @__PURE__ */ r(Q, { profile: e })
|
|
117
121
|
] }),
|
|
118
122
|
/* @__PURE__ */ a("div", { className: "space-y-4", children: [
|
|
119
|
-
/* @__PURE__ */ r(
|
|
123
|
+
/* @__PURE__ */ r(W, { profile: e }),
|
|
120
124
|
/* @__PURE__ */ r(j, { userId: e.id }),
|
|
121
125
|
/* @__PURE__ */ r(E, { profile: e })
|
|
122
126
|
] })
|
|
123
127
|
] }) }),
|
|
124
|
-
/* @__PURE__ */ a(
|
|
128
|
+
/* @__PURE__ */ a(i, { value: "activity", className: "mt-4 focus-visible:outline-none", children: [
|
|
125
129
|
/* @__PURE__ */ a(
|
|
126
130
|
"fieldset",
|
|
127
131
|
{
|
|
@@ -156,28 +160,29 @@ function Ae({
|
|
|
156
160
|
/* @__PURE__ */ r(V, { userId: e.id })
|
|
157
161
|
] }),
|
|
158
162
|
/* @__PURE__ */ a("div", { className: "space-y-4", children: [
|
|
159
|
-
/* @__PURE__ */ r(
|
|
160
|
-
/* @__PURE__ */ r(
|
|
163
|
+
/* @__PURE__ */ r(B, { profile: e }),
|
|
164
|
+
/* @__PURE__ */ r(H, { userId: e.id })
|
|
161
165
|
] })
|
|
162
166
|
] })
|
|
163
167
|
] }),
|
|
164
|
-
/* @__PURE__ */ r(
|
|
168
|
+
/* @__PURE__ */ r(i, { value: "did", className: "mt-4 focus-visible:outline-none", children: u === "did" && /* @__PURE__ */ r(X, { userId: e.id, name: e.first_name ?? e.name }) }),
|
|
169
|
+
/* @__PURE__ */ r(i, { value: "tools", className: "mt-4 focus-visible:outline-none", children: /* @__PURE__ */ a("div", { className: "grid gap-4 lg:grid-cols-2", children: [
|
|
165
170
|
/* @__PURE__ */ a("div", { className: "space-y-4", children: [
|
|
166
|
-
/* @__PURE__ */ r(H, { profile: e }),
|
|
167
171
|
/* @__PURE__ */ r(J, { profile: e }),
|
|
168
|
-
/* @__PURE__ */ r(q, { profile: e })
|
|
172
|
+
/* @__PURE__ */ r(q, { profile: e }),
|
|
173
|
+
/* @__PURE__ */ r(z, { profile: e })
|
|
169
174
|
] }),
|
|
170
175
|
/* @__PURE__ */ a("div", { className: "space-y-4", children: [
|
|
171
|
-
/* @__PURE__ */ r(z, { profile: e }),
|
|
172
176
|
/* @__PURE__ */ r(G, { profile: e }),
|
|
173
|
-
/* @__PURE__ */ r(
|
|
177
|
+
/* @__PURE__ */ r(K, { profile: e }),
|
|
178
|
+
/* @__PURE__ */ r(U, { userId: e.id, name: e.first_name ?? e.name })
|
|
174
179
|
] })
|
|
175
180
|
] }) })
|
|
176
181
|
] }) : p
|
|
177
182
|
] });
|
|
178
183
|
}
|
|
179
|
-
function
|
|
180
|
-
return /* @__PURE__ */ a("div", { className: l("flex animate-pulse flex-col gap-4",
|
|
184
|
+
function le({ className: o }) {
|
|
185
|
+
return /* @__PURE__ */ a("div", { className: l("flex animate-pulse flex-col gap-4", o), "aria-busy": "true", children: [
|
|
181
186
|
/* @__PURE__ */ a("div", { className: "flex items-center gap-5 rounded-lg border border-slate-200 bg-white p-5 dark:border-border dark:bg-card", children: [
|
|
182
187
|
/* @__PURE__ */ r("div", { className: "h-[76px] w-[76px] rounded-full bg-slate-100 dark:bg-muted" }),
|
|
183
188
|
/* @__PURE__ */ a("div", { className: "flex-1 space-y-2.5", children: [
|
|
@@ -193,5 +198,5 @@ function ie({ className: i }) {
|
|
|
193
198
|
] });
|
|
194
199
|
}
|
|
195
200
|
export {
|
|
196
|
-
|
|
201
|
+
Te as PersonProfile
|
|
197
202
|
};
|