@burdenoff/microfe-organization 2026.625.2 → 2026.626.1
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/organization-management/modules/members/components/InviteStatusBadge.js +6 -2
- package/dist/organization-management/modules/members/components/InviteStatusBadge.js.map +1 -1
- package/dist/organization-management/modules/members/pages/InviteMemberPage.js +58 -53
- package/dist/organization-management/modules/members/pages/InviteMemberPage.js.map +1 -1
- package/dist/organization-management/modules/members/pages/InvitePeoplePage.js +56 -52
- package/dist/organization-management/modules/members/pages/InvitePeoplePage.js.map +1 -1
- package/dist/organization-management/modules/members/pages/MemberDetailPage.js +72 -68
- package/dist/organization-management/modules/members/pages/MemberDetailPage.js.map +1 -1
- package/dist/organization-management/modules/members/pages/MembersListPage.js +232 -225
- package/dist/organization-management/modules/members/pages/MembersListPage.js.map +1 -1
- package/dist/organization-management/modules/members/pages/MyInvitesPage.js +172 -182
- package/dist/organization-management/modules/members/pages/MyInvitesPage.js.map +1 -1
- package/dist/organization-management/modules/members/pages/OrganizationInviteAcceptancePage.js +132 -128
- package/dist/organization-management/modules/members/pages/OrganizationInviteAcceptancePage.js.map +1 -1
- package/dist/organization-management/modules/organizations/components/OrganizationStatusBadge.js +5 -1
- package/dist/organization-management/modules/organizations/components/OrganizationStatusBadge.js.map +1 -1
- package/dist/organization-management/modules/organizations/pages/OrganizationCreatePage.js +42 -37
- package/dist/organization-management/modules/organizations/pages/OrganizationCreatePage.js.map +1 -1
- package/dist/organization-management/modules/organizations/pages/OrganizationDetailPage.js +316 -266
- package/dist/organization-management/modules/organizations/pages/OrganizationDetailPage.js.map +1 -1
- package/dist/organization-management/modules/organizations/pages/OrganizationEditPage.js +52 -47
- package/dist/organization-management/modules/organizations/pages/OrganizationEditPage.js.map +1 -1
- package/dist/organization-management/modules/organizations/pages/OrganizationsListPage.js +108 -96
- package/dist/organization-management/modules/organizations/pages/OrganizationsListPage.js.map +1 -1
- package/dist/organization-management/modules/workspaces/components/WorkspaceStatusBadge.js +5 -1
- package/dist/organization-management/modules/workspaces/components/WorkspaceStatusBadge.js.map +1 -1
- package/dist/organization-management/modules/workspaces/pages/WorkspaceCreatePage.js +43 -38
- package/dist/organization-management/modules/workspaces/pages/WorkspaceCreatePage.js.map +1 -1
- package/dist/organization-management/modules/workspaces/pages/WorkspaceDetailPage.js +341 -286
- package/dist/organization-management/modules/workspaces/pages/WorkspaceDetailPage.js.map +1 -1
- package/dist/organization-management/modules/workspaces/pages/WorkspaceEditPage.js +50 -45
- package/dist/organization-management/modules/workspaces/pages/WorkspaceEditPage.js.map +1 -1
- package/dist/organization-management/modules/workspaces/pages/WorkspacesListPage.js +219 -209
- package/dist/organization-management/modules/workspaces/pages/WorkspacesListPage.js.map +1 -1
- package/package.json +2 -2
- package/dist/organization-management/shared/components/feedback/EmptyState.js +0 -31
- package/dist/organization-management/shared/components/feedback/EmptyState.js.map +0 -1
|
@@ -4,18 +4,18 @@ import { InviteStatus as i } from "../../../../generated/global-types.js";
|
|
|
4
4
|
import { useTr as a } from "../../../shared/hooks/useTr.js";
|
|
5
5
|
import { LoadingState as o } from "../../../shared/components/feedback/LoadingState.js";
|
|
6
6
|
import { useOrganizationPageView as s } from "../../../hooks/useOrganizationPageView.js";
|
|
7
|
-
import { useAcceptWorkspaceInvite as
|
|
8
|
-
import { MyInviteCard as
|
|
9
|
-
import { getProjectDisplayNames as
|
|
10
|
-
import { useMemo as
|
|
11
|
-
import { AlertCircle as
|
|
12
|
-
import { Badge as v, GlassCard as
|
|
13
|
-
import { usePermissions as
|
|
14
|
-
import { jsx as
|
|
15
|
-
import { NavLink as
|
|
16
|
-
import { ActorIdentity as
|
|
7
|
+
import { useAcceptWorkspaceInvite as c, useMyWorkspaceInvites as l, useRejectWorkspaceInvite as u } from "../hooks/useWorkspaceInvites.js";
|
|
8
|
+
import { MyInviteCard as d } from "../components/MyInviteCard.js";
|
|
9
|
+
import { getProjectDisplayNames as f, getRoleDisplayNames as ee, getWorkspaceDisplayName as p } from "../utils/workspaceInvitationDisplay.js";
|
|
10
|
+
import { useMemo as m, useState as h } from "react";
|
|
11
|
+
import { AlertCircle as te, BriefcaseBusiness as ne, Loader2 as g, Mail as _ } from "lucide-react";
|
|
12
|
+
import { Badge as v, GlassCard as y, IllustratedEmptyState as b, PagePurpose as re } from "@burdenoff/fe-libs/ui";
|
|
13
|
+
import { usePermissions as x } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
14
|
+
import { jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
15
|
+
import { NavLink as w } from "react-router-dom";
|
|
16
|
+
import { ActorIdentity as ie, useActorProfiles as T } from "@burdenoff/fe-libs/shared";
|
|
17
17
|
//#region src/organization-management/modules/members/pages/MyInvitesPage.tsx
|
|
18
|
-
function
|
|
18
|
+
function E(e) {
|
|
19
19
|
if (!e) return null;
|
|
20
20
|
let t = new Date(e);
|
|
21
21
|
return Number.isNaN(t.getTime()) ? null : t.toLocaleDateString(void 0, {
|
|
@@ -26,332 +26,329 @@ function w(e) {
|
|
|
26
26
|
minute: "2-digit"
|
|
27
27
|
});
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function D(e, t) {
|
|
30
30
|
return (e.endsWith("/") ? e.slice(0, -1) : e) + (t.startsWith("/") ? t : `/${t}`);
|
|
31
31
|
}
|
|
32
|
-
function
|
|
32
|
+
function O({ activeTab: e, basePath: t, tr: n }) {
|
|
33
33
|
let r = (e) => ["border-b-2 px-4 py-2 text-sm font-medium transition-colors", e ? "border-[var(--color-border-focus)] text-[var(--color-text-primary)]" : "border-transparent text-[var(--color-text-muted)] hover:text-[var(--color-text-primary)]"].join(" ");
|
|
34
|
-
return /* @__PURE__ */
|
|
34
|
+
return /* @__PURE__ */ C("div", {
|
|
35
35
|
className: "mb-6 flex gap-2 border-b border-[var(--color-border-default)]",
|
|
36
|
-
children: [/* @__PURE__ */
|
|
37
|
-
to:
|
|
36
|
+
children: [/* @__PURE__ */ S(w, {
|
|
37
|
+
to: D(t, "/invites"),
|
|
38
38
|
end: !0,
|
|
39
39
|
className: r(e === "workspace"),
|
|
40
40
|
children: n("members.myInvites.workspaceTab", "Workspace Invites")
|
|
41
|
-
}), /* @__PURE__ */
|
|
42
|
-
to:
|
|
41
|
+
}), /* @__PURE__ */ S(w, {
|
|
42
|
+
to: D(t, "/invites/organizations"),
|
|
43
43
|
className: r(e === "organization"),
|
|
44
44
|
children: n("members.myInvites.organizationTab", "Organization Invites")
|
|
45
45
|
})]
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
|
-
function
|
|
49
|
-
s(
|
|
50
|
-
let
|
|
48
|
+
function k({ activeTab: w = "workspace" }) {
|
|
49
|
+
s(w === "workspace" ? "organizations.my-workspace-invites" : "organizations.my-organization-invites");
|
|
50
|
+
let D = a(), { isLoading: k } = x(), { basePath: A = "/organizations", currentUser: j, authToken: ae, apiGatewayUrl: oe } = e(), M = w === "organization", N = w === "workspace", { invites: P, loading: F, error: I, total: L } = n(i.Pending, 20, 0, M), { invites: R, loading: z, error: B, total: V, refetch: H } = l(j?.email, N), { acceptInvite: U, loading: W } = t(), { rejectInvite: G, loading: K } = r(), { acceptInvite: se, loading: ce } = c(), { rejectInvite: le, loading: ue } = u(), [q, J] = h(null), Y = q?.tab === w ? q.message : null, [X, Z] = h(null), de = T(m(() => R.flatMap((e) => e.invitedById ? [{
|
|
51
51
|
actorId: e.invitedById,
|
|
52
52
|
actorType: "user"
|
|
53
|
-
}] : []), [
|
|
53
|
+
}] : []), [R]), {
|
|
54
54
|
apiGatewayUrl: oe,
|
|
55
|
-
authToken:
|
|
56
|
-
}), Q =
|
|
55
|
+
authToken: ae
|
|
56
|
+
}), Q = m(() => [...R].sort((e, t) => new Date(t.createdAt).getTime() - new Date(e.createdAt).getTime()), [R]), $ = w === "workspace" ? V : L, fe = async (e) => {
|
|
57
57
|
try {
|
|
58
|
-
J(null), await
|
|
58
|
+
J(null), await U(e);
|
|
59
59
|
} catch (e) {
|
|
60
60
|
J({
|
|
61
61
|
tab: "organization",
|
|
62
|
-
message: e instanceof Error ? e.message :
|
|
62
|
+
message: e instanceof Error ? e.message : D("members.myInvites.acceptFailed", "Failed to accept invite")
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
|
-
},
|
|
65
|
+
}, pe = async (e) => {
|
|
66
66
|
try {
|
|
67
|
-
J(null), await
|
|
67
|
+
J(null), await G(e);
|
|
68
68
|
} catch (e) {
|
|
69
69
|
J({
|
|
70
70
|
tab: "organization",
|
|
71
|
-
message: e instanceof Error ? e.message :
|
|
71
|
+
message: e instanceof Error ? e.message : D("members.myInvites.rejectFailed", "Failed to reject invite")
|
|
72
72
|
});
|
|
73
73
|
}
|
|
74
|
-
},
|
|
74
|
+
}, me = async (e) => {
|
|
75
75
|
try {
|
|
76
76
|
Z({
|
|
77
77
|
inviteId: e,
|
|
78
78
|
action: "accept"
|
|
79
|
-
}), J(null), await
|
|
79
|
+
}), J(null), await se(e), await H().catch(() => void 0);
|
|
80
80
|
} catch (e) {
|
|
81
81
|
J({
|
|
82
82
|
tab: "workspace",
|
|
83
|
-
message: e instanceof Error ? e.message :
|
|
83
|
+
message: e instanceof Error ? e.message : D("members.myInvites.workspaceAcceptFailed", "Failed to accept workspace invite")
|
|
84
84
|
});
|
|
85
85
|
} finally {
|
|
86
86
|
Z((t) => t?.inviteId === e && t.action === "accept" ? null : t);
|
|
87
87
|
}
|
|
88
|
-
},
|
|
88
|
+
}, he = async (e) => {
|
|
89
89
|
try {
|
|
90
90
|
Z({
|
|
91
91
|
inviteId: e,
|
|
92
92
|
action: "reject"
|
|
93
|
-
}), J(null), await
|
|
93
|
+
}), J(null), await le(e), await H().catch(() => void 0);
|
|
94
94
|
} catch (e) {
|
|
95
95
|
J({
|
|
96
96
|
tab: "workspace",
|
|
97
|
-
message: e instanceof Error ? e.message :
|
|
97
|
+
message: e instanceof Error ? e.message : D("members.myInvites.workspaceRejectFailed", "Failed to reject workspace invite")
|
|
98
98
|
});
|
|
99
99
|
} finally {
|
|
100
100
|
Z((t) => t?.inviteId === e && t.action === "reject" ? null : t);
|
|
101
101
|
}
|
|
102
102
|
};
|
|
103
|
-
return
|
|
103
|
+
return k ? /* @__PURE__ */ S("div", {
|
|
104
104
|
className: "min-h-full bg-[var(--color-bg-canvas)] p-6",
|
|
105
|
-
children: /* @__PURE__ */
|
|
106
|
-
}) :
|
|
105
|
+
children: /* @__PURE__ */ S(o, { message: D("common.loadingPermissions", "Loading permissions...") })
|
|
106
|
+
}) : N && !j?.email ? /* @__PURE__ */ S("div", {
|
|
107
107
|
className: "min-h-full bg-[var(--color-bg-canvas)] px-4 py-6 sm:px-6",
|
|
108
|
-
children: /* @__PURE__ */
|
|
108
|
+
children: /* @__PURE__ */ C("div", {
|
|
109
109
|
className: "max-w-4xl mx-auto",
|
|
110
110
|
children: [
|
|
111
|
-
/* @__PURE__ */
|
|
111
|
+
/* @__PURE__ */ C("div", {
|
|
112
112
|
className: "mb-6 flex items-center gap-3",
|
|
113
|
-
children: [/* @__PURE__ */
|
|
113
|
+
children: [/* @__PURE__ */ S(_, {
|
|
114
114
|
size: 24,
|
|
115
115
|
className: "text-[var(--color-text-primary)]"
|
|
116
|
-
}), /* @__PURE__ */
|
|
116
|
+
}), /* @__PURE__ */ S("h1", {
|
|
117
117
|
className: "text-2xl font-bold text-[var(--color-text-primary)]",
|
|
118
|
-
children:
|
|
118
|
+
children: D("members.myInvites.title", "My Invites")
|
|
119
119
|
})]
|
|
120
120
|
}),
|
|
121
|
-
/* @__PURE__ */
|
|
122
|
-
activeTab:
|
|
123
|
-
basePath:
|
|
124
|
-
tr:
|
|
121
|
+
/* @__PURE__ */ S(O, {
|
|
122
|
+
activeTab: w,
|
|
123
|
+
basePath: A,
|
|
124
|
+
tr: D
|
|
125
125
|
}),
|
|
126
|
-
/* @__PURE__ */
|
|
126
|
+
/* @__PURE__ */ S("div", {
|
|
127
127
|
className: "rounded-xl border border-[var(--color-border-default)] bg-[var(--color-bg-surface)] p-6 text-center",
|
|
128
|
-
children: /* @__PURE__ */
|
|
128
|
+
children: /* @__PURE__ */ S("p", {
|
|
129
129
|
className: "text-[var(--color-text-secondary)]",
|
|
130
|
-
children:
|
|
130
|
+
children: D("members.myInvites.signInWorkspace", "Sign in to view your workspace invites.")
|
|
131
131
|
})
|
|
132
132
|
})
|
|
133
133
|
]
|
|
134
134
|
})
|
|
135
|
-
}) :
|
|
135
|
+
}) : M && F && P.length === 0 || N && z && R.length === 0 ? /* @__PURE__ */ S("div", {
|
|
136
136
|
className: "min-h-full bg-[var(--color-bg-canvas)] px-4 py-6 sm:px-6",
|
|
137
|
-
children: /* @__PURE__ */
|
|
137
|
+
children: /* @__PURE__ */ C("div", {
|
|
138
138
|
className: "max-w-4xl mx-auto",
|
|
139
139
|
children: [
|
|
140
|
-
/* @__PURE__ */
|
|
140
|
+
/* @__PURE__ */ C("div", {
|
|
141
141
|
className: "mb-6 flex items-center gap-3",
|
|
142
|
-
children: [/* @__PURE__ */
|
|
142
|
+
children: [/* @__PURE__ */ S(_, {
|
|
143
143
|
size: 24,
|
|
144
144
|
className: "text-[var(--color-text-primary)]"
|
|
145
|
-
}), /* @__PURE__ */
|
|
145
|
+
}), /* @__PURE__ */ S("h1", {
|
|
146
146
|
className: "text-2xl font-bold text-[var(--color-text-primary)]",
|
|
147
|
-
children:
|
|
147
|
+
children: D("members.myInvites.title", "My Invites")
|
|
148
148
|
})]
|
|
149
149
|
}),
|
|
150
|
-
/* @__PURE__ */
|
|
151
|
-
activeTab:
|
|
152
|
-
basePath:
|
|
153
|
-
tr:
|
|
150
|
+
/* @__PURE__ */ S(O, {
|
|
151
|
+
activeTab: w,
|
|
152
|
+
basePath: A,
|
|
153
|
+
tr: D
|
|
154
154
|
}),
|
|
155
|
-
/* @__PURE__ */
|
|
155
|
+
/* @__PURE__ */ S("div", {
|
|
156
156
|
className: "flex items-center justify-center min-h-[300px] rounded-xl border border-[var(--color-border-default)] bg-[var(--color-bg-surface)]",
|
|
157
|
-
children: /* @__PURE__ */
|
|
157
|
+
children: /* @__PURE__ */ S(g, {
|
|
158
158
|
size: 24,
|
|
159
159
|
className: "animate-spin text-[var(--color-text-muted)]"
|
|
160
160
|
})
|
|
161
161
|
})
|
|
162
162
|
]
|
|
163
163
|
})
|
|
164
|
-
}) :
|
|
164
|
+
}) : M && I ? /* @__PURE__ */ S("div", {
|
|
165
165
|
className: "min-h-full bg-[var(--color-bg-canvas)] px-4 py-6 sm:px-6",
|
|
166
|
-
children: /* @__PURE__ */
|
|
166
|
+
children: /* @__PURE__ */ C("div", {
|
|
167
167
|
className: "max-w-4xl mx-auto",
|
|
168
168
|
children: [
|
|
169
|
-
/* @__PURE__ */
|
|
169
|
+
/* @__PURE__ */ C("div", {
|
|
170
170
|
className: "mb-6 flex items-center gap-3",
|
|
171
|
-
children: [/* @__PURE__ */
|
|
171
|
+
children: [/* @__PURE__ */ S(_, {
|
|
172
172
|
size: 24,
|
|
173
173
|
className: "text-[var(--color-text-primary)]"
|
|
174
|
-
}), /* @__PURE__ */
|
|
174
|
+
}), /* @__PURE__ */ S("h1", {
|
|
175
175
|
className: "text-2xl font-bold text-[var(--color-text-primary)]",
|
|
176
|
-
children:
|
|
176
|
+
children: D("members.myInvites.title", "My Invites")
|
|
177
177
|
})]
|
|
178
178
|
}),
|
|
179
|
-
/* @__PURE__ */
|
|
180
|
-
activeTab:
|
|
181
|
-
basePath:
|
|
182
|
-
tr:
|
|
179
|
+
/* @__PURE__ */ S(O, {
|
|
180
|
+
activeTab: w,
|
|
181
|
+
basePath: A,
|
|
182
|
+
tr: D
|
|
183
183
|
}),
|
|
184
|
-
/* @__PURE__ */
|
|
184
|
+
/* @__PURE__ */ S("div", {
|
|
185
185
|
className: "rounded-xl border border-[var(--color-status-error-border)] bg-[var(--color-status-error-bgSubtle)] p-6 text-center",
|
|
186
|
-
children: /* @__PURE__ */
|
|
186
|
+
children: /* @__PURE__ */ C("p", {
|
|
187
187
|
className: "text-[var(--color-status-error-text)]",
|
|
188
188
|
children: [
|
|
189
|
-
|
|
189
|
+
D("members.myInvites.loadFailed", "Failed to load invites"),
|
|
190
190
|
": ",
|
|
191
|
-
|
|
191
|
+
I.message
|
|
192
192
|
]
|
|
193
193
|
})
|
|
194
194
|
})
|
|
195
195
|
]
|
|
196
196
|
})
|
|
197
|
-
}) :
|
|
197
|
+
}) : N && B ? /* @__PURE__ */ S("div", {
|
|
198
198
|
className: "min-h-full bg-[var(--color-bg-canvas)] px-4 py-6 sm:px-6",
|
|
199
|
-
children: /* @__PURE__ */
|
|
199
|
+
children: /* @__PURE__ */ C("div", {
|
|
200
200
|
className: "max-w-4xl mx-auto",
|
|
201
201
|
children: [
|
|
202
|
-
/* @__PURE__ */
|
|
202
|
+
/* @__PURE__ */ C("div", {
|
|
203
203
|
className: "mb-6 flex items-center gap-3",
|
|
204
|
-
children: [/* @__PURE__ */
|
|
204
|
+
children: [/* @__PURE__ */ S(_, {
|
|
205
205
|
size: 24,
|
|
206
206
|
className: "text-[var(--color-text-primary)]"
|
|
207
|
-
}), /* @__PURE__ */
|
|
207
|
+
}), /* @__PURE__ */ S("h1", {
|
|
208
208
|
className: "text-2xl font-bold text-[var(--color-text-primary)]",
|
|
209
|
-
children:
|
|
209
|
+
children: D("members.myInvites.title", "My Invites")
|
|
210
210
|
})]
|
|
211
211
|
}),
|
|
212
|
-
/* @__PURE__ */
|
|
213
|
-
activeTab:
|
|
214
|
-
basePath:
|
|
215
|
-
tr:
|
|
212
|
+
/* @__PURE__ */ S(O, {
|
|
213
|
+
activeTab: w,
|
|
214
|
+
basePath: A,
|
|
215
|
+
tr: D
|
|
216
216
|
}),
|
|
217
|
-
/* @__PURE__ */
|
|
217
|
+
/* @__PURE__ */ S("div", {
|
|
218
218
|
className: "rounded-xl border border-[var(--color-status-error-border)] bg-[var(--color-status-error-bgSubtle)] p-6 text-center",
|
|
219
|
-
children: /* @__PURE__ */
|
|
219
|
+
children: /* @__PURE__ */ C("p", {
|
|
220
220
|
className: "text-[var(--color-status-error-text)]",
|
|
221
221
|
children: [
|
|
222
|
-
|
|
222
|
+
D("members.myInvites.workspaceLoadFailed", "Failed to load workspace invites"),
|
|
223
223
|
":",
|
|
224
224
|
" ",
|
|
225
|
-
|
|
225
|
+
B.message
|
|
226
226
|
]
|
|
227
227
|
})
|
|
228
228
|
})
|
|
229
229
|
]
|
|
230
230
|
})
|
|
231
|
-
}) : /* @__PURE__ */
|
|
231
|
+
}) : /* @__PURE__ */ S("div", {
|
|
232
232
|
className: "min-h-full bg-[var(--color-bg-canvas)] px-4 py-6 sm:px-6",
|
|
233
|
-
children: /* @__PURE__ */
|
|
233
|
+
children: /* @__PURE__ */ C("div", {
|
|
234
234
|
className: "max-w-4xl mx-auto",
|
|
235
235
|
children: [
|
|
236
|
-
/* @__PURE__ */
|
|
236
|
+
/* @__PURE__ */ C("div", {
|
|
237
237
|
className: "flex items-center gap-3 mb-6",
|
|
238
238
|
children: [
|
|
239
|
-
/* @__PURE__ */
|
|
239
|
+
/* @__PURE__ */ S(_, {
|
|
240
240
|
size: 24,
|
|
241
241
|
className: "text-[var(--color-text-primary)]"
|
|
242
242
|
}),
|
|
243
|
-
/* @__PURE__ */
|
|
243
|
+
/* @__PURE__ */ S("h1", {
|
|
244
244
|
className: "text-2xl font-bold text-[var(--color-text-primary)]",
|
|
245
|
-
children:
|
|
245
|
+
children: D("members.myInvites.title", "My Invites")
|
|
246
246
|
}),
|
|
247
|
-
$ > 0 && /* @__PURE__ */
|
|
247
|
+
$ > 0 && /* @__PURE__ */ S("span", {
|
|
248
248
|
className: "px-2.5 py-0.5 rounded-full text-xs font-medium bg-[var(--color-action-primary-bg)] text-[var(--color-action-primary-text)]",
|
|
249
249
|
children: $
|
|
250
250
|
})
|
|
251
251
|
]
|
|
252
252
|
}),
|
|
253
|
-
/* @__PURE__ */
|
|
254
|
-
activeTab:
|
|
255
|
-
basePath:
|
|
256
|
-
tr:
|
|
253
|
+
/* @__PURE__ */ S(O, {
|
|
254
|
+
activeTab: w,
|
|
255
|
+
basePath: A,
|
|
256
|
+
tr: D
|
|
257
|
+
}),
|
|
258
|
+
/* @__PURE__ */ S(re, {
|
|
259
|
+
className: "mb-4 max-w-3xl",
|
|
260
|
+
children: D("members.myInvites.purpose", "This is your personal inbox for invitations — when someone invites you to a workspace or organization, accept it here to gain access, or decline if it was not meant for you. Switch tabs to review each type of invite.")
|
|
257
261
|
}),
|
|
258
|
-
Y && /* @__PURE__ */
|
|
262
|
+
Y && /* @__PURE__ */ C("div", {
|
|
259
263
|
className: "mb-4 flex items-center gap-2 rounded-lg border border-[var(--color-status-error-border)] bg-[var(--color-status-error-bgSubtle)] p-3",
|
|
260
|
-
children: [/* @__PURE__ */
|
|
264
|
+
children: [/* @__PURE__ */ S(te, {
|
|
261
265
|
size: 16,
|
|
262
266
|
className: "shrink-0 text-[var(--color-status-error-text)]"
|
|
263
|
-
}), /* @__PURE__ */
|
|
267
|
+
}), /* @__PURE__ */ S("p", {
|
|
264
268
|
className: "text-sm text-[var(--color-status-error-text)]",
|
|
265
269
|
children: Y
|
|
266
270
|
})]
|
|
267
271
|
}),
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
}),
|
|
279
|
-
/* @__PURE__ */ y("p", {
|
|
280
|
-
className: "text-sm text-[var(--color-text-muted)]",
|
|
281
|
-
children: T("members.myInvites.workspaceEmptyDescription", "When someone invites you to a workspace, it will appear here.")
|
|
282
|
-
})
|
|
283
|
-
]
|
|
284
|
-
}) : /* @__PURE__ */ y("div", {
|
|
272
|
+
N ? Q.length === 0 ? /* @__PURE__ */ S(y, {
|
|
273
|
+
treatment: "glass",
|
|
274
|
+
glow: !0,
|
|
275
|
+
className: "rounded-xl",
|
|
276
|
+
children: /* @__PURE__ */ S(b, {
|
|
277
|
+
illustration: "empty-notifications",
|
|
278
|
+
title: D("members.myInvites.workspaceEmptyTitle", "No pending workspace invites"),
|
|
279
|
+
description: D("members.myInvites.workspaceEmptyDescription", "When someone invites you to a workspace, it will appear here.")
|
|
280
|
+
})
|
|
281
|
+
}) : /* @__PURE__ */ S("div", {
|
|
285
282
|
className: "space-y-3",
|
|
286
283
|
children: Q.map((e) => {
|
|
287
|
-
let t =
|
|
288
|
-
return /* @__PURE__ */ y
|
|
284
|
+
let t = p(e), n = ee(e), r = f(e), i = e.invitedById ? de[e.invitedById] : void 0, a = i?.displayName || i?.email || D("members.myInvites.invitedByFallback", "Someone"), o = X?.inviteId === e.id && X?.action === "accept" && ce, s = X?.inviteId === e.id && X?.action === "reject" && ue;
|
|
285
|
+
return /* @__PURE__ */ S(y, {
|
|
289
286
|
treatment: "insight",
|
|
290
287
|
className: "border-border-seam p-5",
|
|
291
|
-
children: /* @__PURE__ */
|
|
288
|
+
children: /* @__PURE__ */ C("div", {
|
|
292
289
|
className: "flex flex-col gap-4 lg:flex-row lg:items-start lg:justify-between",
|
|
293
|
-
children: [/* @__PURE__ */
|
|
290
|
+
children: [/* @__PURE__ */ C("div", {
|
|
294
291
|
className: "min-w-0 space-y-3",
|
|
295
292
|
children: [
|
|
296
|
-
/* @__PURE__ */
|
|
293
|
+
/* @__PURE__ */ C("div", {
|
|
297
294
|
className: "flex items-start gap-3",
|
|
298
|
-
children: [/* @__PURE__ */
|
|
295
|
+
children: [/* @__PURE__ */ S("div", {
|
|
299
296
|
className: "rounded-lg bg-[var(--color-bg-subtle)] p-2",
|
|
300
|
-
children: /* @__PURE__ */
|
|
297
|
+
children: /* @__PURE__ */ S(ne, {
|
|
301
298
|
size: 20,
|
|
302
299
|
className: "text-[var(--color-text-secondary)]"
|
|
303
300
|
})
|
|
304
|
-
}), /* @__PURE__ */
|
|
301
|
+
}), /* @__PURE__ */ C("div", {
|
|
305
302
|
className: "min-w-0",
|
|
306
|
-
children: [/* @__PURE__ */
|
|
303
|
+
children: [/* @__PURE__ */ S("h3", {
|
|
307
304
|
className: "font-semibold text-[var(--color-text-primary)] break-words",
|
|
308
305
|
children: t
|
|
309
|
-
}), /* @__PURE__ */
|
|
306
|
+
}), /* @__PURE__ */ S("p", {
|
|
310
307
|
className: "mt-1 text-sm text-[var(--color-text-secondary)] break-all",
|
|
311
308
|
children: e.email
|
|
312
309
|
})]
|
|
313
310
|
})]
|
|
314
311
|
}),
|
|
315
|
-
/* @__PURE__ */
|
|
312
|
+
/* @__PURE__ */ C("div", {
|
|
316
313
|
className: "flex flex-wrap items-center gap-2",
|
|
317
|
-
children: [/* @__PURE__ */
|
|
314
|
+
children: [/* @__PURE__ */ S(v, {
|
|
318
315
|
variant: "secondary",
|
|
319
316
|
children: e.status
|
|
320
|
-
}), n.map((t) => /* @__PURE__ */
|
|
317
|
+
}), n.map((t) => /* @__PURE__ */ S(v, {
|
|
321
318
|
variant: "outline",
|
|
322
319
|
children: t
|
|
323
320
|
}, `${e.id}-${t}`))]
|
|
324
321
|
}),
|
|
325
|
-
/* @__PURE__ */
|
|
322
|
+
/* @__PURE__ */ C("dl", {
|
|
326
323
|
className: "grid gap-3 text-sm text-[var(--color-text-secondary)] sm:grid-cols-2",
|
|
327
324
|
children: [
|
|
328
|
-
/* @__PURE__ */
|
|
325
|
+
/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("dt", {
|
|
329
326
|
className: "font-medium text-[var(--color-text-primary)]",
|
|
330
|
-
children:
|
|
331
|
-
}), /* @__PURE__ */
|
|
327
|
+
children: D("members.myInvites.invitedByLabel", "Invited by")
|
|
328
|
+
}), /* @__PURE__ */ S("dd", {
|
|
332
329
|
className: "break-all",
|
|
333
|
-
children: i ? /* @__PURE__ */
|
|
330
|
+
children: i ? /* @__PURE__ */ S(ie, {
|
|
334
331
|
profile: i,
|
|
335
332
|
variant: "inline",
|
|
336
333
|
hideIdDrilldown: !0
|
|
337
334
|
}) : a
|
|
338
335
|
})] }),
|
|
339
|
-
/* @__PURE__ */
|
|
336
|
+
/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("dt", {
|
|
340
337
|
className: "font-medium text-[var(--color-text-primary)]",
|
|
341
|
-
children:
|
|
342
|
-
}), /* @__PURE__ */
|
|
343
|
-
/* @__PURE__ */
|
|
338
|
+
children: D("members.myInvites.receivedLabel", "Received")
|
|
339
|
+
}), /* @__PURE__ */ S("dd", { children: E(e.createdAt) ?? "—" })] }),
|
|
340
|
+
/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("dt", {
|
|
344
341
|
className: "font-medium text-[var(--color-text-primary)]",
|
|
345
|
-
children:
|
|
346
|
-
}), /* @__PURE__ */
|
|
347
|
-
r.length > 0 ? /* @__PURE__ */
|
|
342
|
+
children: D("members.myInvites.expiresLabel", "Expires")
|
|
343
|
+
}), /* @__PURE__ */ S("dd", { children: E(e.expiresAt) ?? "—" })] }),
|
|
344
|
+
r.length > 0 ? /* @__PURE__ */ C("div", {
|
|
348
345
|
className: "sm:col-span-2",
|
|
349
|
-
children: [/* @__PURE__ */
|
|
346
|
+
children: [/* @__PURE__ */ S("dt", {
|
|
350
347
|
className: "font-medium text-[var(--color-text-primary)]",
|
|
351
|
-
children:
|
|
352
|
-
}), /* @__PURE__ */
|
|
348
|
+
children: D("members.myInvites.projectsLabel", "Projects")
|
|
349
|
+
}), /* @__PURE__ */ S("dd", {
|
|
353
350
|
className: "mt-1 flex flex-wrap gap-2",
|
|
354
|
-
children: r.map((t) => /* @__PURE__ */
|
|
351
|
+
children: r.map((t) => /* @__PURE__ */ S(v, {
|
|
355
352
|
variant: "outline",
|
|
356
353
|
children: t
|
|
357
354
|
}, `${e.id}-${t}`))
|
|
@@ -360,55 +357,48 @@ function D({ activeTab: x = "workspace" }) {
|
|
|
360
357
|
]
|
|
361
358
|
})
|
|
362
359
|
]
|
|
363
|
-
}), /* @__PURE__ */
|
|
360
|
+
}), /* @__PURE__ */ C("div", {
|
|
364
361
|
className: "flex flex-wrap items-center gap-2 shrink-0",
|
|
365
|
-
children: [/* @__PURE__ */
|
|
362
|
+
children: [/* @__PURE__ */ C("button", {
|
|
366
363
|
type: "button",
|
|
367
|
-
onClick: () => void
|
|
364
|
+
onClick: () => void me(e.id),
|
|
368
365
|
disabled: o || s,
|
|
369
366
|
className: "inline-flex items-center gap-1.5 rounded-lg bg-[var(--color-status-success-bg)] px-4 py-2 text-sm font-medium text-[var(--color-text-inverse)] transition-all duration-200 hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-50",
|
|
370
|
-
children: [o ? /* @__PURE__ */
|
|
367
|
+
children: [o ? /* @__PURE__ */ S(g, {
|
|
371
368
|
size: 14,
|
|
372
369
|
className: "animate-spin"
|
|
373
|
-
}) : null,
|
|
374
|
-
}), /* @__PURE__ */
|
|
370
|
+
}) : null, D("members.myInvites.accept", "Accept")]
|
|
371
|
+
}), /* @__PURE__ */ C("button", {
|
|
375
372
|
type: "button",
|
|
376
|
-
onClick: () => void
|
|
373
|
+
onClick: () => void he(e.id),
|
|
377
374
|
disabled: o || s,
|
|
378
375
|
className: "inline-flex items-center gap-1.5 rounded-lg border border-[var(--color-border-default)] bg-transparent px-4 py-2 text-sm font-medium text-[var(--color-text-primary)] transition-all duration-200 hover:border-[var(--color-status-error-border)] hover:bg-[var(--color-status-error-bgSubtle)] hover:text-[var(--color-status-error-text)] disabled:cursor-not-allowed disabled:opacity-50",
|
|
379
|
-
children: [s ? /* @__PURE__ */
|
|
376
|
+
children: [s ? /* @__PURE__ */ S(g, {
|
|
380
377
|
size: 14,
|
|
381
378
|
className: "animate-spin"
|
|
382
|
-
}) : null,
|
|
379
|
+
}) : null, D("members.myInvites.decline", "Decline")]
|
|
383
380
|
})]
|
|
384
381
|
})]
|
|
385
382
|
})
|
|
386
383
|
}, e.id);
|
|
387
384
|
})
|
|
388
|
-
}) :
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
}),
|
|
399
|
-
/* @__PURE__ */ y("p", {
|
|
400
|
-
className: "text-sm text-[var(--color-text-muted)]",
|
|
401
|
-
children: T("members.myInvites.emptyDescription", "When someone invites you to an organization, it will appear here.")
|
|
402
|
-
})
|
|
403
|
-
]
|
|
404
|
-
}) : /* @__PURE__ */ y("div", {
|
|
385
|
+
}) : P.length === 0 ? /* @__PURE__ */ S(y, {
|
|
386
|
+
treatment: "glass",
|
|
387
|
+
glow: !0,
|
|
388
|
+
className: "rounded-xl",
|
|
389
|
+
children: /* @__PURE__ */ S(b, {
|
|
390
|
+
illustration: "empty-notifications",
|
|
391
|
+
title: D("members.myInvites.emptyTitle", "No pending invites"),
|
|
392
|
+
description: D("members.myInvites.emptyDescription", "When someone invites you to an organization, it will appear here.")
|
|
393
|
+
})
|
|
394
|
+
}) : /* @__PURE__ */ S("div", {
|
|
405
395
|
className: "space-y-3",
|
|
406
|
-
children:
|
|
396
|
+
children: P.map((e) => /* @__PURE__ */ S(d, {
|
|
407
397
|
invite: e,
|
|
408
|
-
onAccept:
|
|
409
|
-
onReject:
|
|
410
|
-
accepting:
|
|
411
|
-
rejecting:
|
|
398
|
+
onAccept: fe,
|
|
399
|
+
onReject: pe,
|
|
400
|
+
accepting: W,
|
|
401
|
+
rejecting: K
|
|
412
402
|
}, e.id))
|
|
413
403
|
})
|
|
414
404
|
]
|
|
@@ -416,6 +406,6 @@ function D({ activeTab: x = "workspace" }) {
|
|
|
416
406
|
});
|
|
417
407
|
}
|
|
418
408
|
//#endregion
|
|
419
|
-
export {
|
|
409
|
+
export { k as MyInvitesPage };
|
|
420
410
|
|
|
421
411
|
//# sourceMappingURL=MyInvitesPage.js.map
|