@burdenoff/microfe-devportal 2026.705.4 → 2026.707.2
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/devportal/DevportalRoutes.js +19 -12
- package/dist/devportal/DevportalRoutes.js.map +1 -1
- package/dist/devportal/pages/InvitationDecisionPage.js +142 -0
- package/dist/devportal/pages/InvitationDecisionPage.js.map +1 -0
- package/dist/devportal/pages/OrganizationDetailPage.js +564 -403
- package/dist/devportal/pages/OrganizationDetailPage.js.map +1 -1
- package/dist/devportal/pages/OrganizationMembersPage.js +354 -339
- package/dist/devportal/pages/OrganizationMembersPage.js.map +1 -1
- package/dist/devportal/types/index.js.map +1 -1
- package/dist/generated/global-operations.js +146 -84
- package/dist/generated/global-operations.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
import { useDevportal as e } from "../providers/DevportalProvider.js";
|
|
2
2
|
import { cn as t } from "../utils/cn.js";
|
|
3
3
|
import { EmptyState as n } from "../components/EmptyState.js";
|
|
4
|
-
import { useGetApplicationsQuery as r, useGetOrganizationQuery as i, useRequestOrgVerificationMutation as a } from "../../generated/global-operations.js";
|
|
5
|
-
import { PageLayout as
|
|
6
|
-
import { ORG_ROLE_LABELS as
|
|
7
|
-
import { AppListItem as
|
|
8
|
-
import { StatCard as
|
|
9
|
-
import { DataTable as
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
4
|
+
import { useGetApplicationsQuery as r, useGetOrganizationQuery as i, useRequestOrgVerificationMutation as a, useUpdateOrgLegalInfoMutation as o, useUpdateOrgTaxInfoMutation as s, useUpdateOrganizationMutation as c } from "../../generated/global-operations.js";
|
|
5
|
+
import { PageLayout as l, PageSection as u } from "../components/PageLayout.js";
|
|
6
|
+
import { ORG_ROLE_LABELS as d } from "../utils/constants.js";
|
|
7
|
+
import { AppListItem as f } from "../components/AppCard.js";
|
|
8
|
+
import { StatCard as p, StatCardGrid as m } from "../components/StatCard.js";
|
|
9
|
+
import { DataTable as h, DetailList as g } from "../components/DataTable.js";
|
|
10
|
+
import { InputField as _, TextareaField as v } from "../components/FormField.js";
|
|
11
|
+
import { DEVPORTAL_PERMISSIONS as y } from "../constants/permissions.js";
|
|
12
|
+
import { useDevportalPermission as b } from "../hooks/usePermission.js";
|
|
13
|
+
import { useEffect as x, useState as S } from "react";
|
|
14
|
+
import { useI18n as C } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
15
|
+
import { AlertCircle as w, AppWindow as T, ArrowRight as E, BarChart3 as D, Building2 as O, CheckCircle as k, DollarSign as A, ExternalLink as j, Loader2 as M, Plus as N, Settings as P, Shield as F, TrendingUp as I, Users as L } from "lucide-react";
|
|
16
|
+
import { useParams as R } from "react-router-dom";
|
|
17
|
+
import { Fragment as z, jsx as B, jsxs as V } from "react/jsx-runtime";
|
|
18
|
+
import { EmphasisPanel as H, NextSteps as U } from "@burdenoff/fe-libs/ui";
|
|
18
19
|
//#region src/devportal/pages/OrganizationDetailPage.tsx
|
|
19
|
-
function
|
|
20
|
+
function W(e) {
|
|
20
21
|
return {
|
|
21
22
|
id: e.id,
|
|
22
23
|
name: e.name,
|
|
@@ -59,7 +60,7 @@ function B(e) {
|
|
|
59
60
|
updatedAt: e.updatedAt
|
|
60
61
|
};
|
|
61
62
|
}
|
|
62
|
-
function
|
|
63
|
+
function G(e) {
|
|
63
64
|
return {
|
|
64
65
|
id: e.id,
|
|
65
66
|
organizationId: e.organizationId,
|
|
@@ -71,7 +72,6 @@ function V(e) {
|
|
|
71
72
|
suspendedAt: e.suspendedAt ?? void 0,
|
|
72
73
|
suspendedReason: e.suspendedReason ?? void 0,
|
|
73
74
|
joinedAt: e.joinedAt,
|
|
74
|
-
lastActiveAt: e.lastActiveAt ?? void 0,
|
|
75
75
|
permissions: e.permissions ?? void 0,
|
|
76
76
|
invitedBy: e.invitedBy ?? void 0,
|
|
77
77
|
invitationId: e.invitationId ?? void 0,
|
|
@@ -79,430 +79,405 @@ function V(e) {
|
|
|
79
79
|
updatedAt: e.updatedAt
|
|
80
80
|
};
|
|
81
81
|
}
|
|
82
|
-
var
|
|
83
|
-
|
|
84
|
-
|
|
82
|
+
var K = {
|
|
83
|
+
VIEWER: 0,
|
|
84
|
+
DEVELOPER: 1,
|
|
85
|
+
ADMIN: 2,
|
|
86
|
+
OWNER: 3
|
|
87
|
+
}, q = () => {
|
|
88
|
+
let { navigate: n, basePath: a, setActiveOrgId: o, currentUser: s } = e(), { orgId: c } = R(), { t: u } = C(), d = (e, t) => {
|
|
89
|
+
let n = u(e);
|
|
85
90
|
return n === e ? t : n;
|
|
86
|
-
},
|
|
91
|
+
}, [f, p] = S("overview"), m = [
|
|
87
92
|
{
|
|
88
93
|
id: "overview",
|
|
89
|
-
label:
|
|
90
|
-
icon:
|
|
94
|
+
label: d("devportal.overview", "Overview"),
|
|
95
|
+
icon: O
|
|
91
96
|
},
|
|
92
97
|
{
|
|
93
98
|
id: "apps",
|
|
94
|
-
label:
|
|
95
|
-
icon:
|
|
99
|
+
label: d("devportal.applications", "Applications"),
|
|
100
|
+
icon: T
|
|
96
101
|
},
|
|
97
102
|
{
|
|
98
103
|
id: "members",
|
|
99
|
-
label:
|
|
100
|
-
icon:
|
|
104
|
+
label: d("devportal.members", "Members"),
|
|
105
|
+
icon: L
|
|
101
106
|
},
|
|
102
107
|
{
|
|
103
108
|
id: "settings",
|
|
104
|
-
label:
|
|
105
|
-
icon:
|
|
109
|
+
label: d("devportal.settings", "Settings"),
|
|
110
|
+
icon: P
|
|
106
111
|
}
|
|
107
|
-
], { data:
|
|
112
|
+
], { data: h, previousData: g, loading: _, error: v } = i({
|
|
108
113
|
variables: { id: c },
|
|
109
114
|
skip: !c
|
|
110
|
-
}),
|
|
115
|
+
}), y = h ?? g, { data: b } = r({
|
|
111
116
|
variables: {
|
|
112
117
|
limit: 50,
|
|
113
118
|
organizationId: c
|
|
114
119
|
},
|
|
115
120
|
skip: !c,
|
|
116
121
|
fetchPolicy: "cache-and-network"
|
|
117
|
-
}), F = (e) => {
|
|
122
|
+
}), E = (y?.developerOrganization?.members ?? []).map(G), D = (s ? E.find((e) => e.userId === s.id) : void 0)?.role, k = D !== void 0 && K[D] >= K.DEVELOPER, j = D !== void 0 && K[D] >= K.ADMIN, N = j, F = j, I = m.filter((e) => e.id !== "settings" || j), z = (e) => {
|
|
118
123
|
n?.(`${a}${e}`);
|
|
119
124
|
};
|
|
120
|
-
if (
|
|
121
|
-
c &&
|
|
122
|
-
}, [c,
|
|
123
|
-
|
|
125
|
+
if (x(() => {
|
|
126
|
+
c && o(c);
|
|
127
|
+
}, [c, o]), x(() => {
|
|
128
|
+
f === "settings" && !j && p("overview");
|
|
129
|
+
}, [f, j]), x(() => {
|
|
130
|
+
let e = y?.developerOrganization?.name;
|
|
124
131
|
if (!c || !e) return;
|
|
125
132
|
let t = window.__breadcrumbRegistry;
|
|
126
133
|
return t?.register(c, e), () => t?.unregister(c);
|
|
127
|
-
}, [c,
|
|
128
|
-
title:
|
|
134
|
+
}, [c, h?.developerOrganization?.name]), _ && !y) return /* @__PURE__ */ B(l, {
|
|
135
|
+
title: d("devportal.loadingDots", "Loading..."),
|
|
129
136
|
backLink: `${a}/organizations`,
|
|
130
|
-
backLabel:
|
|
131
|
-
children: /* @__PURE__ */
|
|
137
|
+
backLabel: d("devportal.backToOrganizations", "Back to Organizations"),
|
|
138
|
+
children: /* @__PURE__ */ B("div", {
|
|
132
139
|
className: "flex items-center justify-center py-12",
|
|
133
|
-
children: /* @__PURE__ */
|
|
140
|
+
children: /* @__PURE__ */ B(M, { className: "h-8 w-8 animate-spin text-text-secondary" })
|
|
134
141
|
})
|
|
135
142
|
});
|
|
136
|
-
if (
|
|
137
|
-
title:
|
|
143
|
+
if (v || !y?.developerOrganization) return /* @__PURE__ */ B(l, {
|
|
144
|
+
title: d("devportal.organizationNotFound", "Organization Not Found"),
|
|
138
145
|
backLink: `${a}/organizations`,
|
|
139
|
-
backLabel:
|
|
140
|
-
children: /* @__PURE__ */
|
|
146
|
+
backLabel: d("devportal.backToOrganizations", "Back to Organizations"),
|
|
147
|
+
children: /* @__PURE__ */ V("div", {
|
|
141
148
|
className: "flex flex-col items-center justify-center py-12 gap-4",
|
|
142
149
|
children: [
|
|
143
|
-
/* @__PURE__ */
|
|
144
|
-
/* @__PURE__ */
|
|
150
|
+
/* @__PURE__ */ B(w, { className: "h-12 w-12 text-status-error-text" }),
|
|
151
|
+
/* @__PURE__ */ B("h2", {
|
|
145
152
|
className: "text-lg font-semibold",
|
|
146
|
-
children:
|
|
153
|
+
children: d("devportal.organizationNotFoundLower", "Organization not found")
|
|
147
154
|
}),
|
|
148
|
-
/* @__PURE__ */
|
|
155
|
+
/* @__PURE__ */ B("p", {
|
|
149
156
|
className: "text-text-secondary",
|
|
150
|
-
children:
|
|
157
|
+
children: v?.message || d("devportal.organizationNotFoundDescription", "The organization you're looking for doesn't exist or you don't have access to it.")
|
|
151
158
|
}),
|
|
152
|
-
/* @__PURE__ */
|
|
153
|
-
onClick: () =>
|
|
159
|
+
/* @__PURE__ */ B("button", {
|
|
160
|
+
onClick: () => z("/organizations"),
|
|
154
161
|
className: "mt-4 inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
|
|
155
|
-
children:
|
|
162
|
+
children: d("devportal.backToOrganizations", "Back to Organizations")
|
|
156
163
|
})
|
|
157
164
|
]
|
|
158
165
|
})
|
|
159
166
|
});
|
|
160
|
-
let
|
|
161
|
-
return /* @__PURE__ */
|
|
162
|
-
title:
|
|
163
|
-
description:
|
|
164
|
-
purpose:
|
|
167
|
+
let H = W(y.developerOrganization), q = E, Q = b?.applications?.edges?.map((e) => e.node) ?? [];
|
|
168
|
+
return /* @__PURE__ */ V(l, {
|
|
169
|
+
title: H.name,
|
|
170
|
+
description: H.description,
|
|
171
|
+
purpose: d("devportal.orgDetailPurpose", "This is the home for one organization — the apps it owns, the people who can work on them, and its store and billing settings. Invite teammates, add apps, and verify the org so your published listings look trustworthy."),
|
|
165
172
|
backLink: `${a}/organizations`,
|
|
166
|
-
backLabel:
|
|
167
|
-
actions: /* @__PURE__ */
|
|
173
|
+
backLabel: d("devportal.backToOrganizations", "Back to Organizations"),
|
|
174
|
+
actions: /* @__PURE__ */ B("div", {
|
|
168
175
|
className: "flex items-center gap-2",
|
|
169
|
-
children:
|
|
170
|
-
onClick: () => n?.(`/billing/earnings?developerOrgId=${encodeURIComponent(
|
|
176
|
+
children: N ? /* @__PURE__ */ V("button", {
|
|
177
|
+
onClick: () => n?.(`/billing/earnings?developerOrgId=${encodeURIComponent(H.id)}&developerOrgName=${encodeURIComponent(H.name)}`),
|
|
171
178
|
className: "inline-flex items-center gap-2 rounded-md border px-4 py-2 text-sm font-medium hover:bg-bg-sunken transition-colors",
|
|
172
|
-
children: [/* @__PURE__ */
|
|
173
|
-
})
|
|
174
|
-
onClick: () => p("settings"),
|
|
175
|
-
disabled: !d,
|
|
176
|
-
"aria-disabled": !d,
|
|
177
|
-
className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors disabled:opacity-50",
|
|
178
|
-
children: [/* @__PURE__ */ I(E, { size: 16 }), u("devportal.settings", "Settings")]
|
|
179
|
-
})]
|
|
179
|
+
children: [/* @__PURE__ */ B(A, { size: 16 }), d("devportal.revenue", "Revenue")]
|
|
180
|
+
}) : null
|
|
180
181
|
}),
|
|
181
182
|
children: [
|
|
182
|
-
/* @__PURE__ */
|
|
183
|
+
/* @__PURE__ */ B("div", {
|
|
183
184
|
className: "border-b",
|
|
184
|
-
children: /* @__PURE__ */
|
|
185
|
+
children: /* @__PURE__ */ B("nav", {
|
|
185
186
|
className: "-mb-px flex gap-4 overflow-x-auto",
|
|
186
187
|
role: "tablist",
|
|
187
|
-
"aria-label":
|
|
188
|
-
children:
|
|
188
|
+
"aria-label": d("devportal.organizationSections", "Organization sections"),
|
|
189
|
+
children: I.map((e) => {
|
|
189
190
|
let n = e.icon;
|
|
190
|
-
return /* @__PURE__ */
|
|
191
|
+
return /* @__PURE__ */ V("button", {
|
|
191
192
|
id: `organization-tab-${e.id}`,
|
|
192
193
|
role: "tab",
|
|
193
194
|
"aria-selected": f === e.id,
|
|
194
195
|
"aria-controls": `organization-panel-${e.id}`,
|
|
195
196
|
onClick: () => p(e.id),
|
|
196
197
|
className: t("flex items-center gap-2 border-b-2 px-1 py-3 text-sm font-medium transition-colors", f === e.id ? "border-primary text-primary" : "border-transparent text-text-secondary hover:text-text-primary hover:border-muted-foreground"),
|
|
197
|
-
children: [/* @__PURE__ */
|
|
198
|
+
children: [/* @__PURE__ */ B(n, { size: 16 }), e.label]
|
|
198
199
|
}, e.id);
|
|
199
200
|
})
|
|
200
201
|
})
|
|
201
202
|
}),
|
|
202
|
-
/* @__PURE__ */
|
|
203
|
+
/* @__PURE__ */ B(U, {
|
|
203
204
|
className: "mt-6",
|
|
204
|
-
storageKey: `devportal-org-${
|
|
205
|
+
storageKey: `devportal-org-${H.id}`,
|
|
205
206
|
steps: [
|
|
206
|
-
{
|
|
207
|
+
...F ? [{
|
|
207
208
|
id: "invite-members",
|
|
208
|
-
label:
|
|
209
|
-
description:
|
|
210
|
-
icon: /* @__PURE__ */
|
|
209
|
+
label: d("devportal.inviteMembers", "Invite members"),
|
|
210
|
+
description: d("devportal.orgStepInvite", "Add teammates so they can build alongside you"),
|
|
211
|
+
icon: /* @__PURE__ */ B(L, { size: 16 }),
|
|
211
212
|
onClick: () => p("members")
|
|
212
|
-
},
|
|
213
|
-
{
|
|
213
|
+
}] : [],
|
|
214
|
+
...k ? [{
|
|
214
215
|
id: "create-app",
|
|
215
|
-
label:
|
|
216
|
-
description:
|
|
217
|
-
icon: /* @__PURE__ */
|
|
218
|
-
onClick: () =>
|
|
219
|
-
},
|
|
220
|
-
{
|
|
216
|
+
label: d("devportal.createApp", "Create App"),
|
|
217
|
+
description: d("devportal.orgStepCreateApp", "Build a new application under this organization"),
|
|
218
|
+
icon: /* @__PURE__ */ B(T, { size: 16 }),
|
|
219
|
+
onClick: () => z("/apps/new")
|
|
220
|
+
}] : [],
|
|
221
|
+
...j ? [{
|
|
221
222
|
id: "settings",
|
|
222
|
-
label:
|
|
223
|
-
description:
|
|
224
|
-
icon: /* @__PURE__ */
|
|
223
|
+
label: d("devportal.orgStepVerify", "Complete organization profile"),
|
|
224
|
+
description: d("devportal.orgStepVerifyDesc", "Add a logo and details, then request verification"),
|
|
225
|
+
icon: /* @__PURE__ */ B(P, { size: 16 }),
|
|
225
226
|
onClick: () => p("settings"),
|
|
226
|
-
done: !!
|
|
227
|
-
}
|
|
227
|
+
done: !!H.isVerified
|
|
228
|
+
}] : []
|
|
228
229
|
]
|
|
229
230
|
}),
|
|
230
|
-
/* @__PURE__ */
|
|
231
|
+
/* @__PURE__ */ V("div", {
|
|
231
232
|
className: "mt-6",
|
|
232
233
|
id: `organization-panel-${f}`,
|
|
233
234
|
role: "tabpanel",
|
|
234
235
|
"aria-labelledby": `organization-tab-${f}`,
|
|
235
236
|
tabIndex: 0,
|
|
236
237
|
children: [
|
|
237
|
-
f === "overview" && /* @__PURE__ */
|
|
238
|
-
org:
|
|
239
|
-
apps:
|
|
240
|
-
members:
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
onNavigate:
|
|
238
|
+
f === "overview" && /* @__PURE__ */ B(J, {
|
|
239
|
+
org: H,
|
|
240
|
+
apps: Q,
|
|
241
|
+
members: q,
|
|
242
|
+
canCreateApps: k,
|
|
243
|
+
canViewRevenue: N,
|
|
244
|
+
onNavigate: z,
|
|
244
245
|
onShowApps: () => p("apps")
|
|
245
246
|
}),
|
|
246
|
-
f === "apps" && /* @__PURE__ */
|
|
247
|
-
apps:
|
|
248
|
-
onNavigate:
|
|
247
|
+
f === "apps" && /* @__PURE__ */ B(Y, {
|
|
248
|
+
apps: Q,
|
|
249
|
+
onNavigate: z,
|
|
250
|
+
canCreateApps: k
|
|
249
251
|
}),
|
|
250
|
-
f === "members" && /* @__PURE__ */
|
|
251
|
-
members:
|
|
252
|
-
onNavigate:
|
|
253
|
-
orgId:
|
|
252
|
+
f === "members" && /* @__PURE__ */ B(X, {
|
|
253
|
+
members: q,
|
|
254
|
+
onNavigate: z,
|
|
255
|
+
orgId: H.id,
|
|
256
|
+
canInviteMembers: F
|
|
254
257
|
}),
|
|
255
|
-
f === "settings" && /* @__PURE__ */
|
|
258
|
+
f === "settings" && j && /* @__PURE__ */ B(Z, { org: H })
|
|
256
259
|
]
|
|
257
260
|
})
|
|
258
261
|
]
|
|
259
262
|
});
|
|
260
|
-
},
|
|
261
|
-
let { t:
|
|
262
|
-
let n =
|
|
263
|
+
}, J = ({ org: e, apps: t, members: r, canCreateApps: i, canViewRevenue: a, onNavigate: o, onShowApps: s }) => {
|
|
264
|
+
let { t: c } = C(), l = (e, t) => {
|
|
265
|
+
let n = c(e);
|
|
263
266
|
return n === e ? t : n;
|
|
264
267
|
};
|
|
265
|
-
return /* @__PURE__ */
|
|
268
|
+
return /* @__PURE__ */ V("div", {
|
|
266
269
|
className: "grid gap-6 lg:grid-cols-3",
|
|
267
|
-
children: [/* @__PURE__ */
|
|
270
|
+
children: [/* @__PURE__ */ V("div", {
|
|
268
271
|
className: "lg:col-span-2 space-y-6",
|
|
269
|
-
children: [
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
icon: /* @__PURE__ */ I(b, { size: 20 })
|
|
277
|
-
}),
|
|
278
|
-
/* @__PURE__ */ I(u, {
|
|
279
|
-
title: h("devportal.totalInstalls", "Total Installs"),
|
|
280
|
-
value: e.totalInstalls.toLocaleString(),
|
|
281
|
-
icon: /* @__PURE__ */ I(M, { size: 20 }),
|
|
282
|
-
trend: {
|
|
283
|
-
value: 12,
|
|
284
|
-
label: h("devportal.thisMonth", "this month")
|
|
285
|
-
}
|
|
286
|
-
}),
|
|
287
|
-
/* @__PURE__ */ I(u, {
|
|
288
|
-
title: h("devportal.totalRevenue", "Total Revenue"),
|
|
289
|
-
value: `$${e.totalRevenue.toLocaleString()}`,
|
|
290
|
-
icon: /* @__PURE__ */ I(T, { size: 20 })
|
|
291
|
-
}),
|
|
292
|
-
/* @__PURE__ */ I(u, {
|
|
293
|
-
title: h("devportal.avgRating", "Avg Rating"),
|
|
294
|
-
value: e.averageRating ? `${e.averageRating.toFixed(1)} ★` : h("devportal.notAvailable", "N/A"),
|
|
295
|
-
icon: /* @__PURE__ */ I(S, { size: 20 })
|
|
296
|
-
})
|
|
297
|
-
]
|
|
298
|
-
}) }),
|
|
299
|
-
/* @__PURE__ */ I(s, {
|
|
300
|
-
title: h("devportal.recentApplications", "Recent Applications"),
|
|
301
|
-
actions: /* @__PURE__ */ L("button", {
|
|
302
|
-
onClick: f,
|
|
303
|
-
className: "text-sm text-primary hover:underline flex items-center gap-1",
|
|
304
|
-
children: [
|
|
305
|
-
h("devportal.viewAll", "View all"),
|
|
306
|
-
" ",
|
|
307
|
-
/* @__PURE__ */ I(x, { size: 14 })
|
|
308
|
-
]
|
|
272
|
+
children: [/* @__PURE__ */ B(H, { children: /* @__PURE__ */ V(m, {
|
|
273
|
+
columns: a ? 4 : 3,
|
|
274
|
+
children: [
|
|
275
|
+
/* @__PURE__ */ B(p, {
|
|
276
|
+
title: l("devportal.publishedApps", "Published Apps"),
|
|
277
|
+
value: `${e.publishedApps}/${e.totalApps}`,
|
|
278
|
+
icon: /* @__PURE__ */ B(T, { size: 20 })
|
|
309
279
|
}),
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
icon: /* @__PURE__ */
|
|
319
|
-
|
|
320
|
-
|
|
280
|
+
/* @__PURE__ */ B(p, {
|
|
281
|
+
title: l("devportal.totalInstalls", "Total Installs"),
|
|
282
|
+
value: e.totalInstalls.toLocaleString(),
|
|
283
|
+
icon: /* @__PURE__ */ B(I, { size: 20 })
|
|
284
|
+
}),
|
|
285
|
+
a ? /* @__PURE__ */ B(p, {
|
|
286
|
+
title: l("devportal.totalRevenue", "Total Revenue"),
|
|
287
|
+
value: `$${e.totalRevenue.toLocaleString()}`,
|
|
288
|
+
icon: /* @__PURE__ */ B(A, { size: 20 })
|
|
289
|
+
}) : null,
|
|
290
|
+
/* @__PURE__ */ B(p, {
|
|
291
|
+
title: l("devportal.avgRating", "Avg Rating"),
|
|
292
|
+
value: e.averageRating ? `${e.averageRating.toFixed(1)} ★` : l("devportal.notAvailable", "N/A"),
|
|
293
|
+
icon: /* @__PURE__ */ B(D, { size: 20 })
|
|
321
294
|
})
|
|
295
|
+
]
|
|
296
|
+
}) }), /* @__PURE__ */ B(u, {
|
|
297
|
+
title: l("devportal.recentApplications", "Recent Applications"),
|
|
298
|
+
actions: /* @__PURE__ */ V("button", {
|
|
299
|
+
onClick: s,
|
|
300
|
+
className: "text-sm text-primary hover:underline flex items-center gap-1",
|
|
301
|
+
children: [
|
|
302
|
+
l("devportal.viewAll", "View all"),
|
|
303
|
+
" ",
|
|
304
|
+
/* @__PURE__ */ B(E, { size: 14 })
|
|
305
|
+
]
|
|
322
306
|
}),
|
|
323
|
-
/* @__PURE__ */
|
|
324
|
-
|
|
325
|
-
children:
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
})]
|
|
340
|
-
}), e.quotaResetAt && /* @__PURE__ */ L("p", {
|
|
341
|
-
className: "text-xs text-text-secondary mt-2",
|
|
342
|
-
children: [
|
|
343
|
-
h("devportal.quotasResetOn", "Quotas reset on"),
|
|
344
|
-
" ",
|
|
345
|
-
new Date(e.quotaResetAt).toLocaleDateString()
|
|
346
|
-
]
|
|
347
|
-
})]
|
|
307
|
+
children: t.length > 0 ? /* @__PURE__ */ B("div", {
|
|
308
|
+
className: "space-y-2",
|
|
309
|
+
children: t.slice(0, 3).map((e) => /* @__PURE__ */ B(f, {
|
|
310
|
+
app: e,
|
|
311
|
+
onClick: () => o(`/apps/${e.id}`)
|
|
312
|
+
}, e.id))
|
|
313
|
+
}) : /* @__PURE__ */ B(n, {
|
|
314
|
+
illustration: "empty-data",
|
|
315
|
+
icon: /* @__PURE__ */ B(T, { size: 24 }),
|
|
316
|
+
title: l("devportal.noApplications", "No applications"),
|
|
317
|
+
description: l("devportal.createYourFirstApplication", "Create your first application"),
|
|
318
|
+
action: i ? /* @__PURE__ */ V("button", {
|
|
319
|
+
onClick: () => o("/apps/new"),
|
|
320
|
+
className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
|
|
321
|
+
children: [/* @__PURE__ */ B(N, { size: 16 }), l("devportal.createApp", "Create App")]
|
|
322
|
+
}) : void 0
|
|
348
323
|
})
|
|
349
|
-
]
|
|
350
|
-
}), /* @__PURE__ */
|
|
324
|
+
})]
|
|
325
|
+
}), /* @__PURE__ */ V("div", {
|
|
351
326
|
className: "space-y-6",
|
|
352
327
|
children: [
|
|
353
|
-
/* @__PURE__ */
|
|
354
|
-
title:
|
|
355
|
-
children: /* @__PURE__ */
|
|
328
|
+
a ? /* @__PURE__ */ B(u, {
|
|
329
|
+
title: l("devportal.revenueSummary", "Revenue Summary"),
|
|
330
|
+
children: /* @__PURE__ */ B(g, { items: [
|
|
356
331
|
{
|
|
357
|
-
label:
|
|
332
|
+
label: l("devportal.totalRevenue", "Total Revenue"),
|
|
358
333
|
value: `$${e.totalRevenue.toLocaleString()}`
|
|
359
334
|
},
|
|
360
335
|
{
|
|
361
|
-
label:
|
|
336
|
+
label: l("devportal.platformFees", "Platform Fees"),
|
|
362
337
|
value: `$${e.totalPlatformFees.toLocaleString()}`
|
|
363
338
|
},
|
|
364
339
|
{
|
|
365
|
-
label:
|
|
340
|
+
label: l("devportal.netPayouts", "Net Payouts"),
|
|
366
341
|
value: `$${e.totalPayouts.toLocaleString()}`
|
|
367
342
|
},
|
|
368
343
|
{
|
|
369
|
-
label:
|
|
344
|
+
label: l("devportal.pendingBalance", "Pending Balance"),
|
|
370
345
|
value: `$${e.pendingBalance.toLocaleString()}`
|
|
371
346
|
},
|
|
372
347
|
{
|
|
373
|
-
label:
|
|
348
|
+
label: l("devportal.lifetimeRevenue", "Lifetime Revenue"),
|
|
374
349
|
value: `$${e.lifetimeRevenue.toLocaleString()}`
|
|
375
350
|
}
|
|
376
351
|
] })
|
|
377
|
-
}),
|
|
378
|
-
/* @__PURE__ */
|
|
379
|
-
title:
|
|
380
|
-
actions: /* @__PURE__ */
|
|
352
|
+
}) : null,
|
|
353
|
+
/* @__PURE__ */ B(u, {
|
|
354
|
+
title: l("devportal.teamMembers", "Team Members"),
|
|
355
|
+
actions: /* @__PURE__ */ B("button", {
|
|
381
356
|
onClick: () => o(`/organizations/${e.id}/members`),
|
|
382
357
|
className: "text-sm text-primary hover:underline",
|
|
383
|
-
children:
|
|
358
|
+
children: l("devportal.manage", "Manage")
|
|
384
359
|
}),
|
|
385
|
-
children: /* @__PURE__ */
|
|
360
|
+
children: /* @__PURE__ */ V("div", {
|
|
386
361
|
className: "space-y-2",
|
|
387
|
-
children: [r.slice(0, 3).map((e) => /* @__PURE__ */
|
|
362
|
+
children: [r.slice(0, 3).map((e) => /* @__PURE__ */ B("div", {
|
|
388
363
|
className: "flex items-center justify-between py-2",
|
|
389
|
-
children: /* @__PURE__ */
|
|
364
|
+
children: /* @__PURE__ */ V("div", {
|
|
390
365
|
className: "flex items-center gap-3",
|
|
391
|
-
children: [/* @__PURE__ */
|
|
366
|
+
children: [/* @__PURE__ */ B("div", {
|
|
392
367
|
className: "h-8 w-8 rounded-full bg-action-primary-bg/10 flex items-center justify-center text-sm font-medium text-primary",
|
|
393
368
|
children: e.email?.charAt(0).toUpperCase() || "U"
|
|
394
|
-
}), /* @__PURE__ */
|
|
369
|
+
}), /* @__PURE__ */ V("div", { children: [/* @__PURE__ */ B("p", {
|
|
395
370
|
className: "text-sm font-medium",
|
|
396
371
|
children: e.email
|
|
397
|
-
}), /* @__PURE__ */
|
|
372
|
+
}), /* @__PURE__ */ B("p", {
|
|
398
373
|
className: "text-xs text-text-secondary",
|
|
399
|
-
children:
|
|
374
|
+
children: d[e.role]
|
|
400
375
|
})] })]
|
|
401
376
|
})
|
|
402
|
-
}, e.id)), r.length > 3 && /* @__PURE__ */
|
|
377
|
+
}, e.id)), r.length > 3 && /* @__PURE__ */ V("p", {
|
|
403
378
|
className: "text-xs text-text-secondary",
|
|
404
379
|
children: [
|
|
405
380
|
"+",
|
|
406
381
|
r.length - 3,
|
|
407
382
|
" ",
|
|
408
|
-
|
|
383
|
+
l("devportal.moreMembers", "more members")
|
|
409
384
|
]
|
|
410
385
|
})]
|
|
411
386
|
})
|
|
412
387
|
}),
|
|
413
|
-
/* @__PURE__ */
|
|
414
|
-
title:
|
|
415
|
-
children: /* @__PURE__ */
|
|
388
|
+
/* @__PURE__ */ B(u, {
|
|
389
|
+
title: l("devportal.links", "Links"),
|
|
390
|
+
children: /* @__PURE__ */ V("div", {
|
|
416
391
|
className: "space-y-2",
|
|
417
|
-
children: [e.websiteUrl && /* @__PURE__ */
|
|
392
|
+
children: [e.websiteUrl && /* @__PURE__ */ V("a", {
|
|
418
393
|
href: e.websiteUrl,
|
|
419
394
|
target: "_blank",
|
|
420
395
|
rel: "noopener noreferrer",
|
|
421
396
|
className: "flex items-center gap-2 text-sm text-primary hover:underline",
|
|
422
|
-
children: [/* @__PURE__ */
|
|
423
|
-
}), e.contactEmail && /* @__PURE__ */
|
|
397
|
+
children: [/* @__PURE__ */ B(j, { size: 14 }), l("devportal.website", "Website")]
|
|
398
|
+
}), e.contactEmail && /* @__PURE__ */ V("a", {
|
|
424
399
|
href: `mailto:${e.contactEmail}`,
|
|
425
400
|
className: "flex items-center gap-2 text-sm text-primary hover:underline",
|
|
426
|
-
children: [/* @__PURE__ */
|
|
401
|
+
children: [/* @__PURE__ */ B(j, { size: 14 }), e.contactEmail]
|
|
427
402
|
})]
|
|
428
403
|
})
|
|
429
404
|
})
|
|
430
405
|
]
|
|
431
406
|
})]
|
|
432
407
|
});
|
|
433
|
-
},
|
|
434
|
-
let { t:
|
|
435
|
-
let n =
|
|
408
|
+
}, Y = ({ apps: e, onNavigate: t, canCreateApps: r }) => {
|
|
409
|
+
let { t: i } = C(), a = (e, t) => {
|
|
410
|
+
let n = i(e);
|
|
436
411
|
return n === e ? t : n;
|
|
437
412
|
};
|
|
438
|
-
return /* @__PURE__ */
|
|
413
|
+
return /* @__PURE__ */ V("div", {
|
|
439
414
|
className: "space-y-6",
|
|
440
|
-
children: [/* @__PURE__ */
|
|
415
|
+
children: [/* @__PURE__ */ V("div", {
|
|
441
416
|
className: "flex items-center justify-between",
|
|
442
|
-
children: [/* @__PURE__ */
|
|
417
|
+
children: [/* @__PURE__ */ V("p", {
|
|
443
418
|
className: "text-sm text-text-secondary",
|
|
444
419
|
children: [
|
|
445
420
|
e.length,
|
|
446
421
|
" ",
|
|
447
|
-
e.length === 1 ?
|
|
422
|
+
e.length === 1 ? a("devportal.application", "application") : a("devportal.applications", "applications")
|
|
448
423
|
]
|
|
449
|
-
}), /* @__PURE__ */
|
|
424
|
+
}), r ? /* @__PURE__ */ V("button", {
|
|
450
425
|
onClick: () => t("/apps/new"),
|
|
451
426
|
className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors",
|
|
452
|
-
children: [/* @__PURE__ */
|
|
453
|
-
})]
|
|
454
|
-
}), e.length > 0 ? /* @__PURE__ */
|
|
427
|
+
children: [/* @__PURE__ */ B(N, { size: 16 }), a("devportal.createApp", "Create App")]
|
|
428
|
+
}) : null]
|
|
429
|
+
}), e.length > 0 ? /* @__PURE__ */ B("div", {
|
|
455
430
|
className: "space-y-2",
|
|
456
|
-
children: e.map((e) => /* @__PURE__ */
|
|
431
|
+
children: e.map((e) => /* @__PURE__ */ B(f, {
|
|
457
432
|
app: e,
|
|
458
433
|
onClick: () => t(`/apps/${e.id}`)
|
|
459
434
|
}, e.id))
|
|
460
|
-
}) : /* @__PURE__ */
|
|
435
|
+
}) : /* @__PURE__ */ B(n, {
|
|
461
436
|
illustration: "empty-data",
|
|
462
|
-
icon: /* @__PURE__ */
|
|
463
|
-
title:
|
|
464
|
-
description:
|
|
465
|
-
action: /* @__PURE__ */
|
|
437
|
+
icon: /* @__PURE__ */ B(T, { size: 32 }),
|
|
438
|
+
title: a("devportal.noApplications", "No applications"),
|
|
439
|
+
description: a("devportal.createFirstAppForOrg", "Create your first application for this organization"),
|
|
440
|
+
action: r ? /* @__PURE__ */ V("button", {
|
|
466
441
|
onClick: () => t("/apps/new"),
|
|
467
442
|
className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
|
|
468
|
-
children: [/* @__PURE__ */
|
|
469
|
-
})
|
|
443
|
+
children: [/* @__PURE__ */ B(N, { size: 16 }), a("devportal.createApp", "Create App")]
|
|
444
|
+
}) : void 0
|
|
470
445
|
})]
|
|
471
446
|
});
|
|
472
|
-
},
|
|
473
|
-
let { t:
|
|
474
|
-
let n =
|
|
447
|
+
}, X = ({ members: e, onNavigate: n, orgId: r, canInviteMembers: i }) => {
|
|
448
|
+
let { t: a } = C(), o = (e, t) => {
|
|
449
|
+
let n = a(e);
|
|
475
450
|
return n === e ? t : n;
|
|
476
451
|
};
|
|
477
|
-
return /* @__PURE__ */
|
|
452
|
+
return /* @__PURE__ */ V("div", {
|
|
478
453
|
className: "space-y-6",
|
|
479
|
-
children: [/* @__PURE__ */
|
|
454
|
+
children: [/* @__PURE__ */ V("div", {
|
|
480
455
|
className: "flex items-center justify-between",
|
|
481
|
-
children: [/* @__PURE__ */
|
|
456
|
+
children: [/* @__PURE__ */ V("p", {
|
|
482
457
|
className: "text-sm text-text-secondary",
|
|
483
458
|
children: [
|
|
484
459
|
e.length,
|
|
485
460
|
" ",
|
|
486
|
-
e.length === 1 ?
|
|
461
|
+
e.length === 1 ? o("devportal.memberLower", "member") : o("devportal.membersLower", "members")
|
|
487
462
|
]
|
|
488
|
-
}), /* @__PURE__ */
|
|
463
|
+
}), i ? /* @__PURE__ */ V("button", {
|
|
489
464
|
onClick: () => n(`/organizations/${r}/members`),
|
|
490
465
|
className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors",
|
|
491
|
-
children: [/* @__PURE__ */
|
|
492
|
-
})]
|
|
493
|
-
}), /* @__PURE__ */
|
|
466
|
+
children: [/* @__PURE__ */ B(N, { size: 16 }), o("devportal.inviteMember", "Invite Member")]
|
|
467
|
+
}) : null]
|
|
468
|
+
}), /* @__PURE__ */ B(h, {
|
|
494
469
|
data: e,
|
|
495
470
|
keyField: "id",
|
|
496
471
|
columns: [
|
|
497
472
|
{
|
|
498
473
|
key: "email",
|
|
499
|
-
header:
|
|
500
|
-
render: (e) => /* @__PURE__ */
|
|
474
|
+
header: o("devportal.memberColumn", "Member"),
|
|
475
|
+
render: (e) => /* @__PURE__ */ V("div", {
|
|
501
476
|
className: "flex items-center gap-3",
|
|
502
|
-
children: [/* @__PURE__ */
|
|
477
|
+
children: [/* @__PURE__ */ B("div", {
|
|
503
478
|
className: "h-8 w-8 rounded-full bg-action-primary-bg/10 flex items-center justify-center text-sm font-medium text-primary",
|
|
504
479
|
children: e.email?.charAt(0).toUpperCase() || "U"
|
|
505
|
-
}), /* @__PURE__ */
|
|
480
|
+
}), /* @__PURE__ */ B("span", {
|
|
506
481
|
className: "font-medium",
|
|
507
482
|
children: e.email
|
|
508
483
|
})]
|
|
@@ -510,209 +485,395 @@ var H = () => {
|
|
|
510
485
|
},
|
|
511
486
|
{
|
|
512
487
|
key: "role",
|
|
513
|
-
header:
|
|
514
|
-
render: (e) => /* @__PURE__ */
|
|
488
|
+
header: o("devportal.roleColumn", "Role"),
|
|
489
|
+
render: (e) => /* @__PURE__ */ B("span", {
|
|
515
490
|
className: t("inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium", e.role === "OWNER" ? "bg-accent-purple-subtle text-accent-purple" : e.role === "ADMIN" ? "bg-status-info-bg-subtle text-status-info-text" : e.role === "DEVELOPER" ? "bg-status-success-bg-subtle text-status-success-text" : "bg-bg-sunken text-text-primary"),
|
|
516
|
-
children:
|
|
491
|
+
children: d[e.role]
|
|
517
492
|
})
|
|
518
493
|
},
|
|
519
494
|
{
|
|
520
495
|
key: "joinedAt",
|
|
521
|
-
header:
|
|
496
|
+
header: o("devportal.joinedColumn", "Joined"),
|
|
522
497
|
render: (e) => new Date(e.joinedAt).toLocaleDateString()
|
|
523
|
-
},
|
|
524
|
-
{
|
|
525
|
-
key: "lastActiveAt",
|
|
526
|
-
header: a("devportal.lastActiveColumn", "Last Active"),
|
|
527
|
-
render: (e) => e.lastActiveAt ? new Date(e.lastActiveAt).toLocaleDateString() : a("devportal.never", "Never")
|
|
528
498
|
}
|
|
529
499
|
]
|
|
530
500
|
})]
|
|
531
501
|
});
|
|
532
|
-
},
|
|
533
|
-
let { t } =
|
|
502
|
+
}, Z = ({ org: e }) => {
|
|
503
|
+
let { t } = C(), { allowed: n } = b(y.ORG_UPDATE), r = (e, n) => {
|
|
534
504
|
let r = t(e);
|
|
535
505
|
return r === e ? n : r;
|
|
536
|
-
}, [
|
|
537
|
-
|
|
506
|
+
}, [i, l] = S({
|
|
507
|
+
name: e.name,
|
|
508
|
+
description: e.description ?? "",
|
|
509
|
+
websiteUrl: e.websiteUrl ?? "",
|
|
510
|
+
contactEmail: e.contactEmail ?? "",
|
|
511
|
+
supportEmail: e.supportEmail ?? "",
|
|
512
|
+
logoUrl: e.logoUrl ?? "",
|
|
513
|
+
bannerUrl: e.bannerUrl ?? ""
|
|
514
|
+
}), [d, f] = S({
|
|
515
|
+
legalEntityName: e.legalEntityName ?? "",
|
|
516
|
+
legalEntityType: e.legalEntityType ?? ""
|
|
517
|
+
}), [p, m] = S({
|
|
518
|
+
taxId: e.taxId ?? "",
|
|
519
|
+
taxCountry: e.taxCountry ?? ""
|
|
520
|
+
}), [h, w] = S(null), [T, E] = S(null), [D, O] = S("manual"), [A, j] = S(!1), [N, { loading: I }] = c({ refetchQueries: ["GetOrganization"] }), [L, { loading: R }] = o({ refetchQueries: ["GetOrganization"] }), [H, { loading: U }] = s({ refetchQueries: ["GetOrganization"] }), [W, { loading: G }] = a({ onCompleted: () => j(!0) });
|
|
521
|
+
x(() => {
|
|
522
|
+
l({
|
|
523
|
+
name: e.name,
|
|
524
|
+
description: e.description ?? "",
|
|
525
|
+
websiteUrl: e.websiteUrl ?? "",
|
|
526
|
+
contactEmail: e.contactEmail ?? "",
|
|
527
|
+
supportEmail: e.supportEmail ?? "",
|
|
528
|
+
logoUrl: e.logoUrl ?? "",
|
|
529
|
+
bannerUrl: e.bannerUrl ?? ""
|
|
530
|
+
}), f({
|
|
531
|
+
legalEntityName: e.legalEntityName ?? "",
|
|
532
|
+
legalEntityType: e.legalEntityType ?? ""
|
|
533
|
+
}), m({
|
|
534
|
+
taxId: e.taxId ?? "",
|
|
535
|
+
taxCountry: e.taxCountry ?? ""
|
|
536
|
+
});
|
|
537
|
+
}, [e]);
|
|
538
|
+
let K = async () => {
|
|
539
|
+
E(null), w(null);
|
|
540
|
+
try {
|
|
541
|
+
await N({ variables: {
|
|
542
|
+
id: e.id,
|
|
543
|
+
input: {
|
|
544
|
+
name: i.name.trim() || void 0,
|
|
545
|
+
description: i.description.trim() || null,
|
|
546
|
+
websiteUrl: i.websiteUrl.trim() || null,
|
|
547
|
+
contactEmail: i.contactEmail.trim() || null,
|
|
548
|
+
supportEmail: i.supportEmail.trim() || null,
|
|
549
|
+
logoUrl: i.logoUrl.trim() || null,
|
|
550
|
+
bannerUrl: i.bannerUrl.trim() || null
|
|
551
|
+
}
|
|
552
|
+
} }), w(r("devportal.organizationUpdated", "Organization details updated"));
|
|
553
|
+
} catch (e) {
|
|
554
|
+
E(e instanceof Error ? e.message : r("devportal.failedToUpdateOrganization", "Failed to update organization"));
|
|
555
|
+
}
|
|
556
|
+
}, q = async () => {
|
|
557
|
+
E(null), w(null);
|
|
558
|
+
try {
|
|
559
|
+
await L({ variables: {
|
|
560
|
+
id: e.id,
|
|
561
|
+
input: {
|
|
562
|
+
legalEntityName: d.legalEntityName.trim() || null,
|
|
563
|
+
legalEntityType: d.legalEntityType.trim() || null
|
|
564
|
+
}
|
|
565
|
+
} }), w(r("devportal.legalInfoUpdated", "Legal information updated"));
|
|
566
|
+
} catch (e) {
|
|
567
|
+
E(e instanceof Error ? e.message : r("devportal.failedToUpdateLegalInfo", "Failed to update legal information"));
|
|
568
|
+
}
|
|
569
|
+
}, J = async () => {
|
|
570
|
+
E(null), w(null);
|
|
571
|
+
try {
|
|
572
|
+
await H({ variables: {
|
|
573
|
+
id: e.id,
|
|
574
|
+
input: {
|
|
575
|
+
taxId: p.taxId.trim() || null,
|
|
576
|
+
taxCountry: p.taxCountry.trim() || null
|
|
577
|
+
}
|
|
578
|
+
} }), w(r("devportal.taxInfoUpdated", "Tax information updated"));
|
|
579
|
+
} catch (e) {
|
|
580
|
+
E(e instanceof Error ? e.message : r("devportal.failedToUpdateTaxInfo", "Failed to update tax information"));
|
|
581
|
+
}
|
|
582
|
+
};
|
|
583
|
+
return /* @__PURE__ */ V("div", {
|
|
538
584
|
className: "space-y-6 max-w-2xl",
|
|
539
585
|
children: [
|
|
540
|
-
/* @__PURE__ */
|
|
541
|
-
|
|
542
|
-
children:
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
586
|
+
T && /* @__PURE__ */ B("div", {
|
|
587
|
+
className: "rounded-md border border-status-error-bg bg-status-error-bg-subtle px-4 py-3 text-sm text-status-error-text",
|
|
588
|
+
children: T
|
|
589
|
+
}),
|
|
590
|
+
h && /* @__PURE__ */ B("div", {
|
|
591
|
+
className: "rounded-md border border-status-success-bg bg-status-success-bg-subtle px-4 py-3 text-sm text-status-success-text",
|
|
592
|
+
children: h
|
|
593
|
+
}),
|
|
594
|
+
/* @__PURE__ */ B(u, {
|
|
595
|
+
title: r("devportal.organizationDetails", "Organization Details"),
|
|
596
|
+
children: /* @__PURE__ */ V("div", {
|
|
597
|
+
className: "space-y-4",
|
|
598
|
+
children: [
|
|
599
|
+
/* @__PURE__ */ V("div", {
|
|
600
|
+
className: "grid gap-4 sm:grid-cols-2",
|
|
601
|
+
children: [/* @__PURE__ */ B(_, {
|
|
602
|
+
label: r("devportal.organizationName", "Organization Name"),
|
|
603
|
+
value: i.name,
|
|
604
|
+
onChange: (e) => l((t) => ({
|
|
605
|
+
...t,
|
|
606
|
+
name: e.target.value
|
|
607
|
+
})),
|
|
608
|
+
disabled: !n,
|
|
609
|
+
required: !0
|
|
610
|
+
}), /* @__PURE__ */ B(_, {
|
|
611
|
+
label: r("devportal.slug", "Slug"),
|
|
612
|
+
value: e.slug,
|
|
613
|
+
disabled: !0,
|
|
614
|
+
hint: r("devportal.slugReadOnly", "Slug cannot be changed here")
|
|
615
|
+
})]
|
|
616
|
+
}),
|
|
617
|
+
/* @__PURE__ */ B(v, {
|
|
618
|
+
label: r("devportal.description", "Description"),
|
|
619
|
+
value: i.description,
|
|
620
|
+
onChange: (e) => l((t) => ({
|
|
621
|
+
...t,
|
|
622
|
+
description: e.target.value
|
|
623
|
+
})),
|
|
624
|
+
disabled: !n,
|
|
625
|
+
rows: 4
|
|
626
|
+
}),
|
|
627
|
+
/* @__PURE__ */ V("div", {
|
|
628
|
+
className: "grid gap-4 sm:grid-cols-2",
|
|
629
|
+
children: [
|
|
630
|
+
/* @__PURE__ */ B(_, {
|
|
631
|
+
label: r("devportal.website", "Website"),
|
|
632
|
+
type: "url",
|
|
633
|
+
value: i.websiteUrl,
|
|
634
|
+
onChange: (e) => l((t) => ({
|
|
635
|
+
...t,
|
|
636
|
+
websiteUrl: e.target.value
|
|
637
|
+
})),
|
|
638
|
+
disabled: !n
|
|
639
|
+
}),
|
|
640
|
+
/* @__PURE__ */ B(_, {
|
|
641
|
+
label: r("devportal.contactEmail", "Contact Email"),
|
|
642
|
+
type: "email",
|
|
643
|
+
value: i.contactEmail,
|
|
644
|
+
onChange: (e) => l((t) => ({
|
|
645
|
+
...t,
|
|
646
|
+
contactEmail: e.target.value
|
|
647
|
+
})),
|
|
648
|
+
disabled: !n
|
|
649
|
+
}),
|
|
650
|
+
/* @__PURE__ */ B(_, {
|
|
651
|
+
label: r("devportal.supportEmail", "Support Email"),
|
|
652
|
+
type: "email",
|
|
653
|
+
value: i.supportEmail,
|
|
654
|
+
onChange: (e) => l((t) => ({
|
|
655
|
+
...t,
|
|
656
|
+
supportEmail: e.target.value
|
|
657
|
+
})),
|
|
658
|
+
disabled: !n
|
|
659
|
+
}),
|
|
660
|
+
/* @__PURE__ */ B(_, {
|
|
661
|
+
label: r("devportal.logoUrl", "Logo URL"),
|
|
662
|
+
type: "url",
|
|
663
|
+
value: i.logoUrl,
|
|
664
|
+
onChange: (e) => l((t) => ({
|
|
665
|
+
...t,
|
|
666
|
+
logoUrl: e.target.value
|
|
667
|
+
})),
|
|
668
|
+
disabled: !n
|
|
669
|
+
})
|
|
670
|
+
]
|
|
671
|
+
}),
|
|
672
|
+
/* @__PURE__ */ B(_, {
|
|
673
|
+
label: r("devportal.bannerUrl", "Banner URL"),
|
|
674
|
+
type: "url",
|
|
675
|
+
value: i.bannerUrl,
|
|
676
|
+
onChange: (e) => l((t) => ({
|
|
677
|
+
...t,
|
|
678
|
+
bannerUrl: e.target.value
|
|
679
|
+
})),
|
|
680
|
+
disabled: !n
|
|
681
|
+
}),
|
|
682
|
+
/* @__PURE__ */ B(g, { items: [
|
|
683
|
+
{
|
|
684
|
+
label: r("devportal.organizationId", "Organization ID"),
|
|
685
|
+
value: /* @__PURE__ */ B("code", {
|
|
686
|
+
className: "text-xs",
|
|
687
|
+
children: e.id
|
|
688
|
+
})
|
|
689
|
+
},
|
|
690
|
+
{
|
|
691
|
+
label: r("devportal.tier", "Tier"),
|
|
692
|
+
value: e.tier
|
|
693
|
+
},
|
|
694
|
+
{
|
|
695
|
+
label: r("devportal.partnerTier", "Partner Tier"),
|
|
696
|
+
value: e.partnerTier || r("devportal.none", "None")
|
|
697
|
+
},
|
|
698
|
+
{
|
|
699
|
+
label: r("devportal.created", "Created"),
|
|
700
|
+
value: new Date(e.createdAt).toLocaleDateString()
|
|
701
|
+
},
|
|
702
|
+
{
|
|
703
|
+
label: r("devportal.platformFeeRate", "Platform Fee Rate"),
|
|
704
|
+
value: `${(e.platformFeeRate * 100).toFixed(0)}%`
|
|
705
|
+
}
|
|
706
|
+
] }),
|
|
707
|
+
/* @__PURE__ */ B("div", {
|
|
708
|
+
className: "flex justify-end",
|
|
709
|
+
children: /* @__PURE__ */ V("button", {
|
|
710
|
+
type: "button",
|
|
711
|
+
disabled: !n || I,
|
|
712
|
+
onClick: () => void K(),
|
|
713
|
+
className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 disabled:opacity-50",
|
|
714
|
+
children: [I ? /* @__PURE__ */ B(M, {
|
|
715
|
+
size: 14,
|
|
716
|
+
className: "animate-spin"
|
|
717
|
+
}) : /* @__PURE__ */ B(P, { size: 14 }), r("devportal.saveChanges", "Save Changes")]
|
|
718
|
+
})
|
|
548
719
|
})
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
label: n("devportal.slug", "Slug"),
|
|
552
|
-
value: e.slug
|
|
553
|
-
},
|
|
554
|
-
{
|
|
555
|
-
label: n("devportal.tier", "Tier"),
|
|
556
|
-
value: e.tier
|
|
557
|
-
},
|
|
558
|
-
{
|
|
559
|
-
label: n("devportal.partnerTier", "Partner Tier"),
|
|
560
|
-
value: e.partnerTier || n("devportal.none", "None")
|
|
561
|
-
},
|
|
562
|
-
{
|
|
563
|
-
label: n("devportal.created", "Created"),
|
|
564
|
-
value: new Date(e.createdAt).toLocaleDateString()
|
|
565
|
-
},
|
|
566
|
-
{
|
|
567
|
-
label: n("devportal.platformFeeRate", "Platform Fee Rate"),
|
|
568
|
-
value: `${(e.platformFeeRate * 100).toFixed(0)}%`
|
|
569
|
-
}
|
|
570
|
-
] })
|
|
720
|
+
]
|
|
721
|
+
})
|
|
571
722
|
}),
|
|
572
|
-
/* @__PURE__ */
|
|
573
|
-
title:
|
|
574
|
-
children: /* @__PURE__ */
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
{
|
|
580
|
-
label: n("devportal.entityType", "Entity Type"),
|
|
581
|
-
value: e.legalEntityType || n("devportal.notProvided", "Not provided")
|
|
582
|
-
},
|
|
583
|
-
{
|
|
584
|
-
label: n("devportal.taxId", "Tax ID"),
|
|
585
|
-
value: e.taxId ? `•••••${e.taxId.slice(-4)}` : n("devportal.notProvided", "Not provided")
|
|
586
|
-
},
|
|
587
|
-
{
|
|
588
|
-
label: n("devportal.taxCountry", "Tax Country"),
|
|
589
|
-
value: e.taxCountry || n("devportal.notProvided", "Not provided")
|
|
590
|
-
},
|
|
591
|
-
{
|
|
592
|
-
label: n("devportal.taxForm", "Tax Form"),
|
|
593
|
-
value: e.taxFormType || n("devportal.notSubmitted", "Not submitted")
|
|
594
|
-
},
|
|
595
|
-
{
|
|
596
|
-
label: n("devportal.taxFormStatus", "Tax Form Status"),
|
|
597
|
-
value: e.taxFormVerified ? /* @__PURE__ */ L("span", {
|
|
598
|
-
className: "text-status-success-text flex items-center gap-1",
|
|
723
|
+
/* @__PURE__ */ B(u, {
|
|
724
|
+
title: r("devportal.legalInformation", "Legal Information"),
|
|
725
|
+
children: /* @__PURE__ */ V("div", {
|
|
726
|
+
className: "space-y-4",
|
|
727
|
+
children: [
|
|
728
|
+
/* @__PURE__ */ V("div", {
|
|
729
|
+
className: "grid gap-4 sm:grid-cols-2",
|
|
599
730
|
children: [
|
|
600
|
-
/* @__PURE__ */
|
|
601
|
-
|
|
602
|
-
|
|
731
|
+
/* @__PURE__ */ B(_, {
|
|
732
|
+
label: r("devportal.legalEntityName", "Legal Entity Name"),
|
|
733
|
+
value: d.legalEntityName,
|
|
734
|
+
onChange: (e) => f((t) => ({
|
|
735
|
+
...t,
|
|
736
|
+
legalEntityName: e.target.value
|
|
737
|
+
})),
|
|
738
|
+
disabled: !n
|
|
739
|
+
}),
|
|
740
|
+
/* @__PURE__ */ B(_, {
|
|
741
|
+
label: r("devportal.entityType", "Entity Type"),
|
|
742
|
+
value: d.legalEntityType,
|
|
743
|
+
onChange: (e) => f((t) => ({
|
|
744
|
+
...t,
|
|
745
|
+
legalEntityType: e.target.value
|
|
746
|
+
})),
|
|
747
|
+
disabled: !n
|
|
748
|
+
}),
|
|
749
|
+
/* @__PURE__ */ B(_, {
|
|
750
|
+
label: r("devportal.taxId", "Tax ID"),
|
|
751
|
+
value: p.taxId,
|
|
752
|
+
onChange: (e) => m((t) => ({
|
|
753
|
+
...t,
|
|
754
|
+
taxId: e.target.value
|
|
755
|
+
})),
|
|
756
|
+
disabled: !n
|
|
757
|
+
}),
|
|
758
|
+
/* @__PURE__ */ B(_, {
|
|
759
|
+
label: r("devportal.taxCountry", "Tax Country"),
|
|
760
|
+
value: p.taxCountry,
|
|
761
|
+
onChange: (e) => m((t) => ({
|
|
762
|
+
...t,
|
|
763
|
+
taxCountry: e.target.value.toUpperCase()
|
|
764
|
+
})),
|
|
765
|
+
disabled: !n
|
|
766
|
+
})
|
|
603
767
|
]
|
|
604
|
-
})
|
|
605
|
-
|
|
606
|
-
|
|
768
|
+
}),
|
|
769
|
+
/* @__PURE__ */ B(g, { items: [{
|
|
770
|
+
label: r("devportal.taxForm", "Tax Form"),
|
|
771
|
+
value: e.taxFormType || r("devportal.notSubmitted", "Not submitted")
|
|
772
|
+
}, {
|
|
773
|
+
label: r("devportal.taxFormStatus", "Tax Form Status"),
|
|
774
|
+
value: e.taxFormVerified ? /* @__PURE__ */ V("span", {
|
|
775
|
+
className: "text-status-success-text flex items-center gap-1",
|
|
776
|
+
children: [
|
|
777
|
+
/* @__PURE__ */ B(k, { size: 14 }),
|
|
778
|
+
" ",
|
|
779
|
+
r("devportal.verified", "Verified")
|
|
780
|
+
]
|
|
781
|
+
}) : r("devportal.pendingVerification", "Pending verification")
|
|
782
|
+
}] }),
|
|
783
|
+
/* @__PURE__ */ V("div", {
|
|
784
|
+
className: "flex justify-end gap-2",
|
|
785
|
+
children: [/* @__PURE__ */ V("button", {
|
|
786
|
+
type: "button",
|
|
787
|
+
disabled: !n || R,
|
|
788
|
+
onClick: () => void q(),
|
|
789
|
+
className: "inline-flex items-center gap-2 rounded-md border border-border-seam px-4 py-2 text-sm font-medium hover:bg-bg-sunken disabled:opacity-50",
|
|
790
|
+
children: [R ? /* @__PURE__ */ B(M, {
|
|
791
|
+
size: 14,
|
|
792
|
+
className: "animate-spin"
|
|
793
|
+
}) : null, r("devportal.saveLegalInfo", "Save Legal Info")]
|
|
794
|
+
}), /* @__PURE__ */ V("button", {
|
|
795
|
+
type: "button",
|
|
796
|
+
disabled: !n || U,
|
|
797
|
+
onClick: () => void J(),
|
|
798
|
+
className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 disabled:opacity-50",
|
|
799
|
+
children: [U ? /* @__PURE__ */ B(M, {
|
|
800
|
+
size: 14,
|
|
801
|
+
className: "animate-spin"
|
|
802
|
+
}) : null, r("devportal.saveTaxInfo", "Save Tax Info")]
|
|
803
|
+
})]
|
|
804
|
+
})
|
|
805
|
+
]
|
|
806
|
+
})
|
|
607
807
|
}),
|
|
608
|
-
/* @__PURE__ */
|
|
609
|
-
title:
|
|
610
|
-
children: [/* @__PURE__ */
|
|
611
|
-
label:
|
|
612
|
-
value: e.isVerified ? /* @__PURE__ */
|
|
808
|
+
/* @__PURE__ */ V(u, {
|
|
809
|
+
title: r("devportal.verificationStatus", "Verification Status"),
|
|
810
|
+
children: [/* @__PURE__ */ B(g, { items: [{
|
|
811
|
+
label: r("devportal.verifiedLabel", "Verified"),
|
|
812
|
+
value: e.isVerified ? /* @__PURE__ */ V("span", {
|
|
613
813
|
className: "text-status-success-text flex items-center gap-1",
|
|
614
814
|
children: [
|
|
615
|
-
/* @__PURE__ */
|
|
815
|
+
/* @__PURE__ */ B(k, { size: 14 }),
|
|
616
816
|
" ",
|
|
617
|
-
|
|
817
|
+
r("devportal.verifiedVia", "Verified via"),
|
|
618
818
|
" ",
|
|
619
819
|
e.verificationMethod
|
|
620
820
|
]
|
|
621
|
-
}) :
|
|
821
|
+
}) : r("devportal.notVerified", "Not verified")
|
|
622
822
|
}, {
|
|
623
|
-
label:
|
|
624
|
-
value: e.isCertified ? /* @__PURE__ */
|
|
823
|
+
label: r("devportal.certifiedLabel", "Certified"),
|
|
824
|
+
value: e.isCertified ? /* @__PURE__ */ V("span", {
|
|
625
825
|
className: "text-accent-blue flex items-center gap-1",
|
|
626
826
|
children: [
|
|
627
|
-
/* @__PURE__ */
|
|
827
|
+
/* @__PURE__ */ B(F, { size: 14 }),
|
|
628
828
|
" ",
|
|
629
|
-
|
|
829
|
+
r("devportal.certifiedUntil", "Certified until"),
|
|
630
830
|
" ",
|
|
631
831
|
e.certificationExpiry ? new Date(e.certificationExpiry).toLocaleDateString() : "N/A"
|
|
632
832
|
]
|
|
633
|
-
}) :
|
|
634
|
-
}] }), !e.isVerified && /* @__PURE__ */
|
|
833
|
+
}) : r("devportal.notCertified", "Not certified")
|
|
834
|
+
}] }), !e.isVerified && /* @__PURE__ */ B("div", {
|
|
635
835
|
className: "mt-4 rounded-md border border-border-subtle p-4 space-y-3",
|
|
636
|
-
children:
|
|
836
|
+
children: A ? /* @__PURE__ */ V("p", {
|
|
637
837
|
className: "text-sm text-status-success-text flex items-center gap-2",
|
|
638
|
-
children: [/* @__PURE__ */
|
|
639
|
-
}) : /* @__PURE__ */
|
|
640
|
-
/* @__PURE__ */
|
|
838
|
+
children: [/* @__PURE__ */ B(k, { size: 14 }), r("devportal.verificationRequested", "Verification request submitted. Our team will review and contact you.")]
|
|
839
|
+
}) : /* @__PURE__ */ V(z, { children: [
|
|
840
|
+
/* @__PURE__ */ B("p", {
|
|
641
841
|
className: "text-sm text-text-secondary",
|
|
642
|
-
children:
|
|
842
|
+
children: r("devportal.requestVerificationHint", "Get your organization verified to build trust with users. Choose a verification method:")
|
|
643
843
|
}),
|
|
644
|
-
/* @__PURE__ */
|
|
844
|
+
/* @__PURE__ */ B("div", {
|
|
645
845
|
className: "flex gap-2 flex-wrap",
|
|
646
846
|
children: [
|
|
647
847
|
"domain",
|
|
648
848
|
"document",
|
|
649
849
|
"manual"
|
|
650
|
-
].map((e) => /* @__PURE__ */
|
|
850
|
+
].map((e) => /* @__PURE__ */ B("button", {
|
|
651
851
|
type: "button",
|
|
652
|
-
onClick: () =>
|
|
653
|
-
className: `rounded-md border px-3 py-1 text-xs font-medium transition-colors ${
|
|
654
|
-
children: e === "domain" ?
|
|
852
|
+
onClick: () => O(e),
|
|
853
|
+
className: `rounded-md border px-3 py-1 text-xs font-medium transition-colors ${D === e ? "bg-action-primary-bg text-action-primary-text border-primary" : "border-border-subtle hover:bg-bg-sunken"}`,
|
|
854
|
+
children: e === "domain" ? r("devportal.domainVerification", "Domain") : e === "document" ? r("devportal.documentVerification", "Document") : r("devportal.manualVerification", "Manual review")
|
|
655
855
|
}, e))
|
|
656
856
|
}),
|
|
657
|
-
/* @__PURE__ */
|
|
857
|
+
/* @__PURE__ */ V("button", {
|
|
658
858
|
type: "button",
|
|
659
|
-
disabled:
|
|
660
|
-
onClick: () =>
|
|
859
|
+
disabled: G,
|
|
860
|
+
onClick: () => W({ variables: {
|
|
661
861
|
id: e.id,
|
|
662
|
-
method:
|
|
862
|
+
method: D
|
|
663
863
|
} }),
|
|
664
864
|
className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 disabled:opacity-50",
|
|
665
|
-
children: [
|
|
865
|
+
children: [G ? /* @__PURE__ */ B(M, {
|
|
666
866
|
size: 14,
|
|
667
867
|
className: "animate-spin"
|
|
668
|
-
}) : /* @__PURE__ */
|
|
868
|
+
}) : /* @__PURE__ */ B(F, { size: 14 }), r("devportal.requestVerification", "Request Verification")]
|
|
669
869
|
})
|
|
670
870
|
] })
|
|
671
871
|
})]
|
|
672
872
|
})
|
|
673
873
|
]
|
|
674
874
|
});
|
|
675
|
-
}, q = ({ label: e, used: n, limit: r, percent: i, format: a }) => {
|
|
676
|
-
let { t: o } = v(), s = (e, t) => {
|
|
677
|
-
let n = o(e);
|
|
678
|
-
return n === e ? t : n;
|
|
679
|
-
}, c = (e) => a === "bytes" ? `${(e / (1024 * 1024 * 1024)).toFixed(1)} GB` : e >= 1e6 ? `${(e / 1e6).toFixed(1)}M` : e >= 1e3 ? `${(e / 1e3).toFixed(1)}K` : e.toLocaleString();
|
|
680
|
-
return /* @__PURE__ */ L("div", {
|
|
681
|
-
className: "rounded-card border border-border-seam p-4",
|
|
682
|
-
children: [
|
|
683
|
-
/* @__PURE__ */ L("div", {
|
|
684
|
-
className: "flex items-center justify-between mb-2",
|
|
685
|
-
children: [/* @__PURE__ */ I("span", {
|
|
686
|
-
className: "text-sm font-medium",
|
|
687
|
-
children: e
|
|
688
|
-
}), /* @__PURE__ */ L("span", {
|
|
689
|
-
className: "text-xs text-text-secondary",
|
|
690
|
-
children: [
|
|
691
|
-
c(n),
|
|
692
|
-
" / ",
|
|
693
|
-
c(r)
|
|
694
|
-
]
|
|
695
|
-
})]
|
|
696
|
-
}),
|
|
697
|
-
/* @__PURE__ */ I("div", {
|
|
698
|
-
className: "h-2 rounded-full bg-bg-sunken overflow-hidden",
|
|
699
|
-
children: /* @__PURE__ */ I("div", {
|
|
700
|
-
className: t("h-full rounded-full transition-all", i > 90 ? "bg-status-error-bg-subtle" : i > 70 ? "bg-status-warning-bg-subtle" : "bg-action-primary-bg"),
|
|
701
|
-
style: { width: `${Math.min(i, 100)}%` }
|
|
702
|
-
})
|
|
703
|
-
}),
|
|
704
|
-
/* @__PURE__ */ L("p", {
|
|
705
|
-
className: "text-xs text-text-secondary mt-1",
|
|
706
|
-
children: [
|
|
707
|
-
i.toFixed(1),
|
|
708
|
-
"% ",
|
|
709
|
-
s("devportal.used", "used")
|
|
710
|
-
]
|
|
711
|
-
})
|
|
712
|
-
]
|
|
713
|
-
});
|
|
714
875
|
};
|
|
715
876
|
//#endregion
|
|
716
|
-
export {
|
|
877
|
+
export { q as OrganizationDetailPage };
|
|
717
878
|
|
|
718
879
|
//# sourceMappingURL=OrganizationDetailPage.js.map
|