@burdenoff/microfe-devportal 2026.914.1 → 2026.914.3
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.d.ts.map +1 -1
- package/dist/devportal/DevportalRoutes.js +130 -110
- package/dist/devportal/DevportalRoutes.js.map +1 -1
- package/dist/devportal/components/SectionNav.d.ts +10 -1
- package/dist/devportal/components/SectionNav.d.ts.map +1 -1
- package/dist/devportal/components/SectionNav.js +60 -42
- package/dist/devportal/components/SectionNav.js.map +1 -1
- package/dist/devportal/hooks/useIsSellerSection.d.ts +13 -0
- package/dist/devportal/hooks/useIsSellerSection.d.ts.map +1 -0
- package/dist/devportal/hooks/useIsSellerSection.js +15 -0
- package/dist/devportal/hooks/useIsSellerSection.js.map +1 -0
- package/dist/devportal/pages/CreateOrganizationPage.d.ts.map +1 -1
- package/dist/devportal/pages/CreateOrganizationPage.js +107 -106
- package/dist/devportal/pages/CreateOrganizationPage.js.map +1 -1
- package/dist/devportal/pages/OrganizationDetailPage.d.ts.map +1 -1
- package/dist/devportal/pages/OrganizationDetailPage.js +349 -336
- package/dist/devportal/pages/OrganizationDetailPage.js.map +1 -1
- package/dist/devportal/pages/OrganizationMembersPage.d.ts.map +1 -1
- package/dist/devportal/pages/OrganizationMembersPage.js +291 -290
- package/dist/devportal/pages/OrganizationMembersPage.js.map +1 -1
- package/dist/devportal/pages/OrganizationsPage.d.ts.map +1 -1
- package/dist/devportal/pages/OrganizationsPage.js +102 -101
- package/dist/devportal/pages/OrganizationsPage.js.map +1 -1
- package/dist/devportal/pages/RevenueDashboardPage.d.ts.map +1 -1
- package/dist/devportal/pages/RevenueDashboardPage.js +210 -209
- package/dist/devportal/pages/RevenueDashboardPage.js.map +1 -1
- package/dist/devportal/pages/SellerDashboardPage.d.ts.map +1 -1
- package/dist/devportal/pages/SellerDashboardPage.js +14 -22
- package/dist/devportal/pages/SellerDashboardPage.js.map +1 -1
- package/dist/generated/global-operations.d.ts +102 -12
- package/dist/generated/global-operations.d.ts.map +1 -1
- package/dist/generated/global-operations.js +107 -92
- package/dist/generated/global-operations.js.map +1 -1
- package/dist/generated/global-types.d.ts +2963 -242
- package/dist/generated/global-types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,21 +1,22 @@
|
|
|
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 {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
4
|
+
import { orgSectionPath as r, useIsSellerSection as i } from "../hooks/useIsSellerSection.js";
|
|
5
|
+
import { useGetApplicationsQuery as a, useGetOrganizationQuery as o, useUpdateOrgLegalInfoMutation as s, useUpdateOrgTaxInfoMutation as c, useUpdateOrganizationMutation as l } from "../../generated/global-operations.js";
|
|
6
|
+
import { PageLayout as u, PageSection as d } from "../components/PageLayout.js";
|
|
7
|
+
import { ORG_ROLE_LABELS as f } from "../utils/constants.js";
|
|
8
|
+
import { AppListItem as p } from "../components/AppCard.js";
|
|
9
|
+
import { StatCard as m, StatCardGrid as h } from "../components/StatCard.js";
|
|
10
|
+
import { DataTable as g, DetailList as _ } from "../components/DataTable.js";
|
|
11
|
+
import { InputField as v, TextareaField as y } from "../components/FormField.js";
|
|
12
|
+
import { useDevportalPermission as ee } from "../hooks/usePermission.js";
|
|
13
|
+
import { DEVPORTAL_PERMISSIONS as te } from "../constants/permissions.js";
|
|
13
14
|
import { useEffect as b, useState as x } from "react";
|
|
14
|
-
import { AlertCircle as S, AppWindow as C, ArrowRight as w, BarChart3 as T, Building2 as
|
|
15
|
-
import { useParams as
|
|
16
|
-
import { Fragment as
|
|
17
|
-
import { useI18n as
|
|
18
|
-
import { EmphasisPanel as
|
|
15
|
+
import { AlertCircle as S, AppWindow as C, ArrowRight as w, BarChart3 as T, Building2 as ne, CheckCircle as E, DollarSign as D, ExternalLink as O, Loader2 as k, Plus as A, Settings as j, Shield as M, TrendingUp as N, Users as P } from "lucide-react";
|
|
16
|
+
import { useParams as re } from "react-router";
|
|
17
|
+
import { Fragment as F, jsx as I, jsxs as L } from "react/jsx-runtime";
|
|
18
|
+
import { useI18n as R } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
19
|
+
import { EmphasisPanel as z, NextSteps as B } from "@burdenoff/fe-libs/ui";
|
|
19
20
|
import { graphqlFetch as V } from "@burdenoff/fe-libs/shared/graphql";
|
|
20
21
|
//#region src/devportal/pages/OrganizationDetailPage.tsx
|
|
21
22
|
var H = "\n query OrganizationVerificationDetails($id: ID!) {\n developerOrganization(id: $id) {\n id\n verificationMethod\n verificationRequestedAt\n verificationStatus\n verificationRequestNotes\n verificationEvidenceUrl\n verificationDomain\n verificationRequestedBy\n verificationReviewedAt\n verificationReviewedBy\n verificationReviewNotes\n verificationRejectedReason\n }\n }\n", U = "\n mutation RequestOrgVerificationExtended(\n $id: ID!\n $method: String!\n $notes: String\n $evidenceUrl: String\n $domain: String\n ) {\n requestOrgVerification(\n id: $id\n method: $method\n notes: $notes\n evidenceUrl: $evidenceUrl\n domain: $domain\n ) {\n id\n verificationMethod\n verificationRequestedAt\n verificationStatus\n verificationRequestNotes\n verificationEvidenceUrl\n verificationDomain\n verificationRejectedReason\n }\n }\n";
|
|
@@ -115,399 +116,411 @@ var Y = {
|
|
|
115
116
|
ADMIN: 2,
|
|
116
117
|
OWNER: 3
|
|
117
118
|
}, X = () => {
|
|
118
|
-
let { navigate: n, basePath:
|
|
119
|
-
let n =
|
|
119
|
+
let { navigate: n, basePath: s, setActiveOrgId: c, setActivePhysicalOrgId: l, currentUser: d } = e(), f = i(), { orgId: p } = re(), { t: m } = R(), h = (e, t) => {
|
|
120
|
+
let n = m(e);
|
|
120
121
|
return n === e ? t : n;
|
|
121
|
-
}, [
|
|
122
|
+
}, [g, _] = x("overview"), v = [
|
|
122
123
|
{
|
|
123
124
|
id: "overview",
|
|
124
|
-
label:
|
|
125
|
-
icon:
|
|
125
|
+
label: h("devportal.overview", "Overview"),
|
|
126
|
+
icon: ne
|
|
126
127
|
},
|
|
127
128
|
{
|
|
128
129
|
id: "apps",
|
|
129
|
-
label:
|
|
130
|
+
label: h("devportal.applications", "Applications"),
|
|
130
131
|
icon: C
|
|
131
132
|
},
|
|
132
133
|
{
|
|
133
134
|
id: "members",
|
|
134
|
-
label:
|
|
135
|
-
icon:
|
|
135
|
+
label: h("devportal.members", "Members"),
|
|
136
|
+
icon: P
|
|
136
137
|
},
|
|
137
138
|
{
|
|
138
139
|
id: "settings",
|
|
139
|
-
label:
|
|
140
|
-
icon:
|
|
140
|
+
label: h("devportal.settings", "Settings"),
|
|
141
|
+
icon: j
|
|
141
142
|
}
|
|
142
|
-
], { data:
|
|
143
|
-
variables: { id:
|
|
144
|
-
skip: !
|
|
145
|
-
}),
|
|
143
|
+
], { data: y, previousData: ee, loading: te, error: w } = o({
|
|
144
|
+
variables: { id: p },
|
|
145
|
+
skip: !p
|
|
146
|
+
}), T = y ?? ee, { data: E } = a({
|
|
146
147
|
variables: {
|
|
147
148
|
limit: 50,
|
|
148
|
-
organizationId:
|
|
149
|
+
organizationId: p
|
|
149
150
|
},
|
|
150
|
-
skip: !
|
|
151
|
+
skip: !p,
|
|
151
152
|
fetchPolicy: "cache-and-network"
|
|
152
|
-
}),
|
|
153
|
-
n?.(`${
|
|
153
|
+
}), O = (T?.developerOrganization?.members ?? []).map(G), M = (d ? O.find((e) => e.userId === d.id) : void 0)?.role, N = M !== void 0 && Y[M] >= Y.DEVELOPER, F = M !== void 0 && Y[M] >= Y.ADMIN, z = F, V = F, H = v.filter((e) => e.id !== "settings" || F), U = (e) => {
|
|
154
|
+
n?.(`${s}${e}`);
|
|
154
155
|
};
|
|
155
156
|
if (b(() => {
|
|
156
|
-
|
|
157
|
-
}, [
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
157
|
+
p && (f ? l(p) : c(p));
|
|
158
|
+
}, [
|
|
159
|
+
p,
|
|
160
|
+
f,
|
|
161
|
+
c,
|
|
162
|
+
l
|
|
163
|
+
]), b(() => {
|
|
164
|
+
g === "settings" && !F && _("overview");
|
|
165
|
+
}, [g, F]), b(() => {
|
|
166
|
+
let e = T?.developerOrganization?.name;
|
|
167
|
+
if (!p || !e) return;
|
|
162
168
|
let t = window.__breadcrumbRegistry;
|
|
163
|
-
return t?.register(
|
|
164
|
-
}, [
|
|
165
|
-
title:
|
|
166
|
-
backLink: `${
|
|
167
|
-
backLabel:
|
|
168
|
-
children: /* @__PURE__ */
|
|
169
|
+
return t?.register(p, e), () => t?.unregister(p);
|
|
170
|
+
}, [p, y?.developerOrganization?.name]), te && !T) return /* @__PURE__ */ I(u, {
|
|
171
|
+
title: h("devportal.loadingDots", "Loading..."),
|
|
172
|
+
backLink: `${s}${r(f)}`,
|
|
173
|
+
backLabel: h("devportal.backToOrganizations", "Back to Organizations"),
|
|
174
|
+
children: /* @__PURE__ */ I("div", {
|
|
169
175
|
className: "flex items-center justify-center py-12",
|
|
170
|
-
children: /* @__PURE__ */
|
|
176
|
+
children: /* @__PURE__ */ I(k, { className: "h-8 w-8 animate-spin text-text-secondary" })
|
|
171
177
|
})
|
|
172
178
|
});
|
|
173
|
-
if (
|
|
174
|
-
title:
|
|
175
|
-
backLink: `${
|
|
176
|
-
backLabel:
|
|
177
|
-
children: /* @__PURE__ */
|
|
179
|
+
if (w || !T?.developerOrganization) return /* @__PURE__ */ I(u, {
|
|
180
|
+
title: h("devportal.organizationNotFound", "Organization Not Found"),
|
|
181
|
+
backLink: `${s}${r(f)}`,
|
|
182
|
+
backLabel: h("devportal.backToOrganizations", "Back to Organizations"),
|
|
183
|
+
children: /* @__PURE__ */ L("div", {
|
|
178
184
|
className: "flex flex-col items-center justify-center py-12 gap-4",
|
|
179
185
|
children: [
|
|
180
|
-
/* @__PURE__ */
|
|
181
|
-
/* @__PURE__ */
|
|
186
|
+
/* @__PURE__ */ I(S, { className: "h-12 w-12 text-status-error-text" }),
|
|
187
|
+
/* @__PURE__ */ I("h2", {
|
|
182
188
|
className: "text-lg font-semibold",
|
|
183
|
-
children:
|
|
189
|
+
children: h("devportal.organizationNotFoundLower", "Organization not found")
|
|
184
190
|
}),
|
|
185
|
-
/* @__PURE__ */
|
|
191
|
+
/* @__PURE__ */ I("p", {
|
|
186
192
|
className: "text-text-secondary",
|
|
187
|
-
children:
|
|
193
|
+
children: w?.message || h("devportal.organizationNotFoundDescription", "The organization you're looking for doesn't exist or you don't have access to it.")
|
|
188
194
|
}),
|
|
189
|
-
/* @__PURE__ */
|
|
190
|
-
onClick: () =>
|
|
195
|
+
/* @__PURE__ */ I("button", {
|
|
196
|
+
onClick: () => U(r(f)),
|
|
191
197
|
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",
|
|
192
|
-
children:
|
|
198
|
+
children: h("devportal.backToOrganizations", "Back to Organizations")
|
|
193
199
|
})
|
|
194
200
|
]
|
|
195
201
|
})
|
|
196
202
|
});
|
|
197
|
-
let
|
|
198
|
-
return /* @__PURE__ */
|
|
199
|
-
title:
|
|
200
|
-
description:
|
|
201
|
-
purpose:
|
|
202
|
-
backLink: `${
|
|
203
|
-
backLabel:
|
|
204
|
-
actions: /* @__PURE__ */
|
|
203
|
+
let K = W(T.developerOrganization), q = O, J = E?.applications?.edges?.map((e) => e.node) ?? [];
|
|
204
|
+
return /* @__PURE__ */ L(u, {
|
|
205
|
+
title: K.name,
|
|
206
|
+
description: K.description,
|
|
207
|
+
purpose: h("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."),
|
|
208
|
+
backLink: `${s}${r(f)}`,
|
|
209
|
+
backLabel: h("devportal.backToOrganizations", "Back to Organizations"),
|
|
210
|
+
actions: /* @__PURE__ */ I("div", {
|
|
205
211
|
className: "flex items-center gap-2",
|
|
206
|
-
children:
|
|
207
|
-
onClick: () => n?.(`/billing/earnings?developerOrgId=${encodeURIComponent(
|
|
212
|
+
children: z ? /* @__PURE__ */ L("button", {
|
|
213
|
+
onClick: () => n?.(`/billing/earnings?developerOrgId=${encodeURIComponent(K.id)}&developerOrgName=${encodeURIComponent(K.name)}`),
|
|
208
214
|
className: "inline-flex items-center gap-2 rounded-md border px-4 py-2 text-sm font-medium hover:bg-bg-sunken transition-colors",
|
|
209
|
-
children: [/* @__PURE__ */
|
|
215
|
+
children: [/* @__PURE__ */ I(D, { size: 16 }), h("devportal.revenue", "Revenue")]
|
|
210
216
|
}) : null
|
|
211
217
|
}),
|
|
212
218
|
children: [
|
|
213
|
-
/* @__PURE__ */
|
|
219
|
+
/* @__PURE__ */ I("div", {
|
|
214
220
|
className: "border-b",
|
|
215
|
-
children: /* @__PURE__ */
|
|
221
|
+
children: /* @__PURE__ */ I("nav", {
|
|
216
222
|
className: "-mb-px flex gap-4 overflow-x-auto",
|
|
217
223
|
role: "tablist",
|
|
218
|
-
"aria-label":
|
|
219
|
-
children:
|
|
224
|
+
"aria-label": h("devportal.organizationSections", "Organization sections"),
|
|
225
|
+
children: H.map((e) => {
|
|
220
226
|
let n = e.icon;
|
|
221
|
-
return /* @__PURE__ */
|
|
227
|
+
return /* @__PURE__ */ L("button", {
|
|
222
228
|
id: `organization-tab-${e.id}`,
|
|
223
229
|
role: "tab",
|
|
224
|
-
"aria-selected":
|
|
230
|
+
"aria-selected": g === e.id,
|
|
225
231
|
"aria-controls": `organization-panel-${e.id}`,
|
|
226
|
-
onClick: () =>
|
|
227
|
-
className: t("flex items-center gap-2 border-b-2 px-1 py-3 text-sm font-medium transition-colors",
|
|
228
|
-
children: [/* @__PURE__ */
|
|
232
|
+
onClick: () => _(e.id),
|
|
233
|
+
className: t("flex items-center gap-2 border-b-2 px-1 py-3 text-sm font-medium transition-colors", g === e.id ? "border-primary text-primary" : "border-transparent text-text-secondary hover:text-text-primary hover:border-muted-foreground"),
|
|
234
|
+
children: [/* @__PURE__ */ I(n, { size: 16 }), e.label]
|
|
229
235
|
}, e.id);
|
|
230
236
|
})
|
|
231
237
|
})
|
|
232
238
|
}),
|
|
233
|
-
/* @__PURE__ */
|
|
239
|
+
/* @__PURE__ */ I(B, {
|
|
234
240
|
className: "mt-6",
|
|
235
|
-
storageKey: `devportal-org-${
|
|
241
|
+
storageKey: `devportal-org-${K.id}`,
|
|
236
242
|
steps: [
|
|
237
|
-
...
|
|
243
|
+
...V ? [{
|
|
238
244
|
id: "invite-members",
|
|
239
|
-
label:
|
|
240
|
-
description:
|
|
241
|
-
icon: /* @__PURE__ */
|
|
242
|
-
onClick: () =>
|
|
245
|
+
label: h("devportal.inviteMembers", "Invite members"),
|
|
246
|
+
description: h("devportal.orgStepInvite", "Add teammates so they can build alongside you"),
|
|
247
|
+
icon: /* @__PURE__ */ I(P, { size: 16 }),
|
|
248
|
+
onClick: () => _("members")
|
|
243
249
|
}] : [],
|
|
244
|
-
...
|
|
250
|
+
...N && !f ? [{
|
|
245
251
|
id: "create-app",
|
|
246
|
-
label:
|
|
247
|
-
description:
|
|
248
|
-
icon: /* @__PURE__ */
|
|
249
|
-
onClick: () =>
|
|
252
|
+
label: h("devportal.createApp", "Create App"),
|
|
253
|
+
description: h("devportal.orgStepCreateApp", "Build a new application under this organization"),
|
|
254
|
+
icon: /* @__PURE__ */ I(C, { size: 16 }),
|
|
255
|
+
onClick: () => U("/apps/new")
|
|
250
256
|
}] : [],
|
|
251
|
-
...
|
|
257
|
+
...N && f ? [{
|
|
258
|
+
id: "list-item",
|
|
259
|
+
label: h("devportal.listAnItem", "List an Item"),
|
|
260
|
+
description: h("devportal.orgStepListItem", "List a physical product for sale under this organization"),
|
|
261
|
+
icon: /* @__PURE__ */ I(A, { size: 16 }),
|
|
262
|
+
onClick: () => U("/seller/items/new")
|
|
263
|
+
}] : [],
|
|
264
|
+
...F ? [{
|
|
252
265
|
id: "settings",
|
|
253
|
-
label:
|
|
254
|
-
description:
|
|
255
|
-
icon: /* @__PURE__ */
|
|
256
|
-
onClick: () =>
|
|
257
|
-
done: !!
|
|
266
|
+
label: h("devportal.orgStepVerify", "Complete organization profile"),
|
|
267
|
+
description: h("devportal.orgStepVerifyDesc", "Add a logo and details, then request verification"),
|
|
268
|
+
icon: /* @__PURE__ */ I(j, { size: 16 }),
|
|
269
|
+
onClick: () => _("settings"),
|
|
270
|
+
done: !!K.isVerified
|
|
258
271
|
}] : []
|
|
259
272
|
]
|
|
260
273
|
}),
|
|
261
|
-
/* @__PURE__ */
|
|
274
|
+
/* @__PURE__ */ L("div", {
|
|
262
275
|
className: "mt-6",
|
|
263
|
-
id: `organization-panel-${
|
|
276
|
+
id: `organization-panel-${g}`,
|
|
264
277
|
role: "tabpanel",
|
|
265
|
-
"aria-labelledby": `organization-tab-${
|
|
278
|
+
"aria-labelledby": `organization-tab-${g}`,
|
|
266
279
|
tabIndex: 0,
|
|
267
280
|
children: [
|
|
268
|
-
|
|
269
|
-
org:
|
|
270
|
-
apps:
|
|
271
|
-
members:
|
|
272
|
-
canCreateApps:
|
|
273
|
-
canViewRevenue:
|
|
274
|
-
onNavigate:
|
|
275
|
-
onShowApps: () =>
|
|
281
|
+
g === "overview" && /* @__PURE__ */ I(Z, {
|
|
282
|
+
org: K,
|
|
283
|
+
apps: J,
|
|
284
|
+
members: q,
|
|
285
|
+
canCreateApps: N,
|
|
286
|
+
canViewRevenue: z,
|
|
287
|
+
onNavigate: U,
|
|
288
|
+
onShowApps: () => _("apps")
|
|
276
289
|
}),
|
|
277
|
-
|
|
278
|
-
apps:
|
|
279
|
-
onNavigate:
|
|
280
|
-
canCreateApps:
|
|
290
|
+
g === "apps" && /* @__PURE__ */ I(ie, {
|
|
291
|
+
apps: J,
|
|
292
|
+
onNavigate: U,
|
|
293
|
+
canCreateApps: N
|
|
281
294
|
}),
|
|
282
|
-
|
|
283
|
-
members:
|
|
284
|
-
onNavigate:
|
|
285
|
-
orgId:
|
|
286
|
-
canInviteMembers:
|
|
295
|
+
g === "members" && /* @__PURE__ */ I(Q, {
|
|
296
|
+
members: q,
|
|
297
|
+
onNavigate: U,
|
|
298
|
+
orgId: K.id,
|
|
299
|
+
canInviteMembers: V
|
|
287
300
|
}),
|
|
288
|
-
|
|
301
|
+
g === "settings" && F && /* @__PURE__ */ I($, { org: K })
|
|
289
302
|
]
|
|
290
303
|
})
|
|
291
304
|
]
|
|
292
305
|
});
|
|
293
306
|
}, Z = ({ org: e, apps: t, members: r, canCreateApps: i, canViewRevenue: a, onNavigate: o, onShowApps: s }) => {
|
|
294
|
-
let { t: c } =
|
|
307
|
+
let { t: c } = R(), l = (e, t) => {
|
|
295
308
|
let n = c(e);
|
|
296
309
|
return n === e ? t : n;
|
|
297
310
|
};
|
|
298
|
-
return /* @__PURE__ */
|
|
311
|
+
return /* @__PURE__ */ L("div", {
|
|
299
312
|
className: "grid gap-6 lg:grid-cols-3",
|
|
300
|
-
children: [/* @__PURE__ */
|
|
313
|
+
children: [/* @__PURE__ */ L("div", {
|
|
301
314
|
className: "lg:col-span-2 space-y-6",
|
|
302
|
-
children: [/* @__PURE__ */
|
|
315
|
+
children: [/* @__PURE__ */ I(z, { children: /* @__PURE__ */ L(h, {
|
|
303
316
|
columns: a ? 4 : 3,
|
|
304
317
|
children: [
|
|
305
|
-
/* @__PURE__ */
|
|
306
|
-
title:
|
|
318
|
+
/* @__PURE__ */ I(m, {
|
|
319
|
+
title: l("devportal.publishedApps", "Published Apps"),
|
|
307
320
|
value: `${e.publishedApps}/${e.totalApps}`,
|
|
308
|
-
icon: /* @__PURE__ */
|
|
321
|
+
icon: /* @__PURE__ */ I(C, { size: 20 })
|
|
309
322
|
}),
|
|
310
|
-
/* @__PURE__ */
|
|
311
|
-
title:
|
|
323
|
+
/* @__PURE__ */ I(m, {
|
|
324
|
+
title: l("devportal.totalInstalls", "Total Installs"),
|
|
312
325
|
value: e.totalInstalls.toLocaleString(),
|
|
313
|
-
icon: /* @__PURE__ */
|
|
326
|
+
icon: /* @__PURE__ */ I(N, { size: 20 })
|
|
314
327
|
}),
|
|
315
|
-
a ? /* @__PURE__ */
|
|
316
|
-
title:
|
|
328
|
+
a ? /* @__PURE__ */ I(m, {
|
|
329
|
+
title: l("devportal.totalRevenue", "Total Revenue"),
|
|
317
330
|
value: `$${e.totalRevenue.toLocaleString()}`,
|
|
318
|
-
icon: /* @__PURE__ */
|
|
331
|
+
icon: /* @__PURE__ */ I(D, { size: 20 })
|
|
319
332
|
}) : null,
|
|
320
|
-
/* @__PURE__ */
|
|
321
|
-
title:
|
|
322
|
-
value: e.averageRating ? `${e.averageRating.toFixed(1)} ★` :
|
|
323
|
-
icon: /* @__PURE__ */
|
|
333
|
+
/* @__PURE__ */ I(m, {
|
|
334
|
+
title: l("devportal.avgRating", "Avg Rating"),
|
|
335
|
+
value: e.averageRating ? `${e.averageRating.toFixed(1)} ★` : l("devportal.notAvailable", "N/A"),
|
|
336
|
+
icon: /* @__PURE__ */ I(T, { size: 20 })
|
|
324
337
|
})
|
|
325
338
|
]
|
|
326
|
-
}) }), /* @__PURE__ */
|
|
327
|
-
title:
|
|
328
|
-
actions: /* @__PURE__ */
|
|
339
|
+
}) }), /* @__PURE__ */ I(d, {
|
|
340
|
+
title: l("devportal.recentApplications", "Recent Applications"),
|
|
341
|
+
actions: /* @__PURE__ */ L("button", {
|
|
329
342
|
onClick: s,
|
|
330
343
|
className: "text-sm text-primary hover:underline flex items-center gap-1",
|
|
331
344
|
children: [
|
|
332
|
-
|
|
345
|
+
l("devportal.viewAll", "View all"),
|
|
333
346
|
" ",
|
|
334
|
-
/* @__PURE__ */
|
|
347
|
+
/* @__PURE__ */ I(w, { size: 14 })
|
|
335
348
|
]
|
|
336
349
|
}),
|
|
337
|
-
children: t.length > 0 ? /* @__PURE__ */
|
|
350
|
+
children: t.length > 0 ? /* @__PURE__ */ I("div", {
|
|
338
351
|
className: "space-y-2",
|
|
339
|
-
children: t.slice(0, 3).map((e) => /* @__PURE__ */
|
|
352
|
+
children: t.slice(0, 3).map((e) => /* @__PURE__ */ I(p, {
|
|
340
353
|
app: e,
|
|
341
354
|
onClick: () => o(`/apps/${e.id}`)
|
|
342
355
|
}, e.id))
|
|
343
|
-
}) : /* @__PURE__ */
|
|
356
|
+
}) : /* @__PURE__ */ I(n, {
|
|
344
357
|
illustration: "empty-data",
|
|
345
|
-
icon: /* @__PURE__ */
|
|
346
|
-
title:
|
|
347
|
-
description:
|
|
348
|
-
action: i ? /* @__PURE__ */
|
|
358
|
+
icon: /* @__PURE__ */ I(C, { size: 24 }),
|
|
359
|
+
title: l("devportal.noApplications", "No applications"),
|
|
360
|
+
description: l("devportal.createYourFirstApplication", "Create your first application"),
|
|
361
|
+
action: i ? /* @__PURE__ */ L("button", {
|
|
349
362
|
onClick: () => o("/apps/new"),
|
|
350
363
|
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",
|
|
351
|
-
children: [/* @__PURE__ */
|
|
364
|
+
children: [/* @__PURE__ */ I(A, { size: 16 }), l("devportal.createApp", "Create App")]
|
|
352
365
|
}) : void 0
|
|
353
366
|
})
|
|
354
367
|
})]
|
|
355
|
-
}), /* @__PURE__ */
|
|
368
|
+
}), /* @__PURE__ */ L("div", {
|
|
356
369
|
className: "space-y-6",
|
|
357
370
|
children: [
|
|
358
|
-
a ? /* @__PURE__ */
|
|
359
|
-
title:
|
|
360
|
-
children: /* @__PURE__ */
|
|
371
|
+
a ? /* @__PURE__ */ I(d, {
|
|
372
|
+
title: l("devportal.revenueSummary", "Revenue Summary"),
|
|
373
|
+
children: /* @__PURE__ */ I(_, { items: [
|
|
361
374
|
{
|
|
362
|
-
label:
|
|
375
|
+
label: l("devportal.totalRevenue", "Total Revenue"),
|
|
363
376
|
value: `$${e.totalRevenue.toLocaleString()}`
|
|
364
377
|
},
|
|
365
378
|
{
|
|
366
|
-
label:
|
|
379
|
+
label: l("devportal.platformFees", "Platform Fees"),
|
|
367
380
|
value: `$${e.totalPlatformFees.toLocaleString()}`
|
|
368
381
|
},
|
|
369
382
|
{
|
|
370
|
-
label:
|
|
383
|
+
label: l("devportal.netPayouts", "Net Payouts"),
|
|
371
384
|
value: `$${e.totalPayouts.toLocaleString()}`
|
|
372
385
|
},
|
|
373
386
|
{
|
|
374
|
-
label:
|
|
387
|
+
label: l("devportal.pendingBalance", "Pending Balance"),
|
|
375
388
|
value: `$${e.pendingBalance.toLocaleString()}`
|
|
376
389
|
},
|
|
377
390
|
{
|
|
378
|
-
label:
|
|
391
|
+
label: l("devportal.lifetimeRevenue", "Lifetime Revenue"),
|
|
379
392
|
value: `$${e.lifetimeRevenue.toLocaleString()}`
|
|
380
393
|
}
|
|
381
394
|
] })
|
|
382
395
|
}) : null,
|
|
383
|
-
/* @__PURE__ */
|
|
384
|
-
title:
|
|
385
|
-
actions: /* @__PURE__ */
|
|
396
|
+
/* @__PURE__ */ I(d, {
|
|
397
|
+
title: l("devportal.teamMembers", "Team Members"),
|
|
398
|
+
actions: /* @__PURE__ */ I("button", {
|
|
386
399
|
onClick: () => o(`/organizations/${e.id}/members`),
|
|
387
400
|
className: "text-sm text-primary hover:underline",
|
|
388
|
-
children:
|
|
401
|
+
children: l("devportal.manage", "Manage")
|
|
389
402
|
}),
|
|
390
|
-
children: /* @__PURE__ */
|
|
403
|
+
children: /* @__PURE__ */ L("div", {
|
|
391
404
|
className: "space-y-2",
|
|
392
|
-
children: [r.slice(0, 3).map((e) => /* @__PURE__ */
|
|
405
|
+
children: [r.slice(0, 3).map((e) => /* @__PURE__ */ I("div", {
|
|
393
406
|
className: "flex items-center justify-between py-2",
|
|
394
|
-
children: /* @__PURE__ */
|
|
407
|
+
children: /* @__PURE__ */ L("div", {
|
|
395
408
|
className: "flex items-center gap-3",
|
|
396
|
-
children: [/* @__PURE__ */
|
|
409
|
+
children: [/* @__PURE__ */ I("div", {
|
|
397
410
|
className: "h-8 w-8 rounded-full bg-action-primary-bg/10 flex items-center justify-center text-sm font-medium text-primary",
|
|
398
411
|
children: e.email?.charAt(0).toUpperCase() || "U"
|
|
399
|
-
}), /* @__PURE__ */
|
|
412
|
+
}), /* @__PURE__ */ L("div", { children: [/* @__PURE__ */ I("p", {
|
|
400
413
|
className: "text-sm font-medium",
|
|
401
414
|
children: e.email
|
|
402
|
-
}), /* @__PURE__ */
|
|
415
|
+
}), /* @__PURE__ */ I("p", {
|
|
403
416
|
className: "text-xs text-text-secondary",
|
|
404
|
-
children:
|
|
417
|
+
children: f[e.role]
|
|
405
418
|
})] })]
|
|
406
419
|
})
|
|
407
|
-
}, e.id)), r.length > 3 && /* @__PURE__ */
|
|
420
|
+
}, e.id)), r.length > 3 && /* @__PURE__ */ L("p", {
|
|
408
421
|
className: "text-xs text-text-secondary",
|
|
409
422
|
children: [
|
|
410
423
|
"+",
|
|
411
424
|
r.length - 3,
|
|
412
425
|
" ",
|
|
413
|
-
|
|
426
|
+
l("devportal.moreMembers", "more members")
|
|
414
427
|
]
|
|
415
428
|
})]
|
|
416
429
|
})
|
|
417
430
|
}),
|
|
418
|
-
/* @__PURE__ */
|
|
419
|
-
title:
|
|
420
|
-
children: /* @__PURE__ */
|
|
431
|
+
/* @__PURE__ */ I(d, {
|
|
432
|
+
title: l("devportal.links", "Links"),
|
|
433
|
+
children: /* @__PURE__ */ L("div", {
|
|
421
434
|
className: "space-y-2",
|
|
422
|
-
children: [e.websiteUrl && /* @__PURE__ */
|
|
435
|
+
children: [e.websiteUrl && /* @__PURE__ */ L("a", {
|
|
423
436
|
href: e.websiteUrl,
|
|
424
437
|
target: "_blank",
|
|
425
438
|
rel: "noopener noreferrer",
|
|
426
439
|
className: "flex items-center gap-2 text-sm text-primary hover:underline",
|
|
427
|
-
children: [/* @__PURE__ */
|
|
428
|
-
}), e.contactEmail && /* @__PURE__ */
|
|
440
|
+
children: [/* @__PURE__ */ I(O, { size: 14 }), l("devportal.website", "Website")]
|
|
441
|
+
}), e.contactEmail && /* @__PURE__ */ L("a", {
|
|
429
442
|
href: `mailto:${e.contactEmail}`,
|
|
430
443
|
className: "flex items-center gap-2 text-sm text-primary hover:underline",
|
|
431
|
-
children: [/* @__PURE__ */
|
|
444
|
+
children: [/* @__PURE__ */ I(O, { size: 14 }), e.contactEmail]
|
|
432
445
|
})]
|
|
433
446
|
})
|
|
434
447
|
})
|
|
435
448
|
]
|
|
436
449
|
})]
|
|
437
450
|
});
|
|
438
|
-
},
|
|
439
|
-
let { t: i } =
|
|
451
|
+
}, ie = ({ apps: e, onNavigate: t, canCreateApps: r }) => {
|
|
452
|
+
let { t: i } = R(), a = (e, t) => {
|
|
440
453
|
let n = i(e);
|
|
441
454
|
return n === e ? t : n;
|
|
442
455
|
};
|
|
443
|
-
return /* @__PURE__ */
|
|
456
|
+
return /* @__PURE__ */ L("div", {
|
|
444
457
|
className: "space-y-6",
|
|
445
|
-
children: [/* @__PURE__ */
|
|
458
|
+
children: [/* @__PURE__ */ L("div", {
|
|
446
459
|
className: "flex items-center justify-between",
|
|
447
|
-
children: [/* @__PURE__ */
|
|
460
|
+
children: [/* @__PURE__ */ L("p", {
|
|
448
461
|
className: "text-sm text-text-secondary",
|
|
449
462
|
children: [
|
|
450
463
|
e.length,
|
|
451
464
|
" ",
|
|
452
465
|
e.length === 1 ? a("devportal.application", "application") : a("devportal.applications", "applications")
|
|
453
466
|
]
|
|
454
|
-
}), r ? /* @__PURE__ */
|
|
467
|
+
}), r ? /* @__PURE__ */ L("button", {
|
|
455
468
|
onClick: () => t("/apps/new"),
|
|
456
469
|
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",
|
|
457
|
-
children: [/* @__PURE__ */
|
|
470
|
+
children: [/* @__PURE__ */ I(A, { size: 16 }), a("devportal.createApp", "Create App")]
|
|
458
471
|
}) : null]
|
|
459
|
-
}), e.length > 0 ? /* @__PURE__ */
|
|
472
|
+
}), e.length > 0 ? /* @__PURE__ */ I("div", {
|
|
460
473
|
className: "space-y-2",
|
|
461
|
-
children: e.map((e) => /* @__PURE__ */
|
|
474
|
+
children: e.map((e) => /* @__PURE__ */ I(p, {
|
|
462
475
|
app: e,
|
|
463
476
|
onClick: () => t(`/apps/${e.id}`)
|
|
464
477
|
}, e.id))
|
|
465
|
-
}) : /* @__PURE__ */
|
|
478
|
+
}) : /* @__PURE__ */ I(n, {
|
|
466
479
|
illustration: "empty-data",
|
|
467
|
-
icon: /* @__PURE__ */
|
|
480
|
+
icon: /* @__PURE__ */ I(C, { size: 32 }),
|
|
468
481
|
title: a("devportal.noApplications", "No applications"),
|
|
469
482
|
description: a("devportal.createFirstAppForOrg", "Create your first application for this organization"),
|
|
470
|
-
action: r ? /* @__PURE__ */
|
|
483
|
+
action: r ? /* @__PURE__ */ L("button", {
|
|
471
484
|
onClick: () => t("/apps/new"),
|
|
472
485
|
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",
|
|
473
|
-
children: [/* @__PURE__ */
|
|
486
|
+
children: [/* @__PURE__ */ I(A, { size: 16 }), a("devportal.createApp", "Create App")]
|
|
474
487
|
}) : void 0
|
|
475
488
|
})]
|
|
476
489
|
});
|
|
477
|
-
},
|
|
478
|
-
let { t: a } =
|
|
490
|
+
}, Q = ({ members: e, onNavigate: n, orgId: r, canInviteMembers: i }) => {
|
|
491
|
+
let { t: a } = R(), o = (e, t) => {
|
|
479
492
|
let n = a(e);
|
|
480
493
|
return n === e ? t : n;
|
|
481
494
|
};
|
|
482
|
-
return /* @__PURE__ */
|
|
495
|
+
return /* @__PURE__ */ L("div", {
|
|
483
496
|
className: "space-y-6",
|
|
484
|
-
children: [/* @__PURE__ */
|
|
497
|
+
children: [/* @__PURE__ */ L("div", {
|
|
485
498
|
className: "flex items-center justify-between",
|
|
486
|
-
children: [/* @__PURE__ */
|
|
499
|
+
children: [/* @__PURE__ */ L("p", {
|
|
487
500
|
className: "text-sm text-text-secondary",
|
|
488
501
|
children: [
|
|
489
502
|
e.length,
|
|
490
503
|
" ",
|
|
491
504
|
e.length === 1 ? o("devportal.memberLower", "member") : o("devportal.membersLower", "members")
|
|
492
505
|
]
|
|
493
|
-
}), i ? /* @__PURE__ */
|
|
506
|
+
}), i ? /* @__PURE__ */ L("button", {
|
|
494
507
|
onClick: () => n(`/organizations/${r}/members`),
|
|
495
508
|
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",
|
|
496
|
-
children: [/* @__PURE__ */
|
|
509
|
+
children: [/* @__PURE__ */ I(A, { size: 16 }), o("devportal.inviteMember", "Invite Member")]
|
|
497
510
|
}) : null]
|
|
498
|
-
}), /* @__PURE__ */
|
|
511
|
+
}), /* @__PURE__ */ I(g, {
|
|
499
512
|
data: e,
|
|
500
513
|
keyField: "id",
|
|
501
514
|
columns: [
|
|
502
515
|
{
|
|
503
516
|
key: "email",
|
|
504
517
|
header: o("devportal.memberColumn", "Member"),
|
|
505
|
-
render: (e) => /* @__PURE__ */
|
|
518
|
+
render: (e) => /* @__PURE__ */ L("div", {
|
|
506
519
|
className: "flex items-center gap-3",
|
|
507
|
-
children: [/* @__PURE__ */
|
|
520
|
+
children: [/* @__PURE__ */ I("div", {
|
|
508
521
|
className: "h-8 w-8 rounded-full bg-action-primary-bg/10 flex items-center justify-center text-sm font-medium text-primary",
|
|
509
522
|
children: e.email?.charAt(0).toUpperCase() || "U"
|
|
510
|
-
}), /* @__PURE__ */
|
|
523
|
+
}), /* @__PURE__ */ I("span", {
|
|
511
524
|
className: "font-medium",
|
|
512
525
|
children: e.email
|
|
513
526
|
})]
|
|
@@ -516,9 +529,9 @@ var Y = {
|
|
|
516
529
|
{
|
|
517
530
|
key: "role",
|
|
518
531
|
header: o("devportal.roleColumn", "Role"),
|
|
519
|
-
render: (e) => /* @__PURE__ */
|
|
532
|
+
render: (e) => /* @__PURE__ */ I("span", {
|
|
520
533
|
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"),
|
|
521
|
-
children:
|
|
534
|
+
children: f[e.role]
|
|
522
535
|
})
|
|
523
536
|
},
|
|
524
537
|
{
|
|
@@ -529,11 +542,11 @@ var Y = {
|
|
|
529
542
|
]
|
|
530
543
|
})]
|
|
531
544
|
});
|
|
532
|
-
},
|
|
533
|
-
let { t } =
|
|
545
|
+
}, $ = ({ org: e }) => {
|
|
546
|
+
let { t } = R(), { allowed: n } = ee(te.ORG_UPDATE), r = (e, n) => {
|
|
534
547
|
let r = t(e);
|
|
535
548
|
return r === e ? n : r;
|
|
536
|
-
}, [i,
|
|
549
|
+
}, [i, a] = x({
|
|
537
550
|
name: e.name,
|
|
538
551
|
description: e.description ?? "",
|
|
539
552
|
websiteUrl: e.websiteUrl ?? "",
|
|
@@ -541,25 +554,25 @@ var Y = {
|
|
|
541
554
|
supportEmail: e.supportEmail ?? "",
|
|
542
555
|
logoUrl: e.logoUrl ?? "",
|
|
543
556
|
bannerUrl: e.bannerUrl ?? ""
|
|
544
|
-
}), [
|
|
557
|
+
}), [o, u] = x({
|
|
545
558
|
legalEntityName: e.legalEntityName ?? "",
|
|
546
559
|
legalEntityType: e.legalEntityType ?? ""
|
|
547
560
|
}), [f, p] = x({
|
|
548
561
|
taxId: e.taxId ?? "",
|
|
549
562
|
taxCountry: e.taxCountry ?? ""
|
|
550
|
-
}), [m,
|
|
563
|
+
}), [m, h] = x(null), [g, S] = x(null), [C, w] = x("manual"), [T, ne] = x(!1), [D, O] = x(""), [A, N] = x(""), [P, re] = x(""), [z, B] = x(null), [W, G] = x(!1), Y = z ?? {
|
|
551
564
|
verificationMethod: e.verificationMethod,
|
|
552
565
|
verificationRequestedAt: e.verificationRequestedAt,
|
|
553
566
|
verificationStatus: e.verificationStatus,
|
|
554
567
|
verificationRequestNotes: e.verificationRequestNotes,
|
|
555
568
|
verificationRejectedReason: e.verificationRejectedReason
|
|
556
|
-
},
|
|
557
|
-
i.contactEmail.trim() ? J(i.contactEmail) ||
|
|
558
|
-
let
|
|
559
|
-
|
|
560
|
-
let
|
|
569
|
+
}, X = [];
|
|
570
|
+
i.contactEmail.trim() ? J(i.contactEmail) || X.push(r("devportal.contactEmailInvalid", "Contact email must be valid")) : X.push(r("devportal.contactEmailRequired", "Contact email is required")), i.supportEmail.trim() && !J(i.supportEmail) && X.push(r("devportal.supportEmailInvalid", "Support email must be valid")), i.websiteUrl.trim() ? q(i.websiteUrl) || X.push(r("devportal.websiteInvalid", "Website URL must be valid")) : X.push(r("devportal.websiteRequired", "Website URL is required")), o.legalEntityName.trim() || X.push(r("devportal.legalEntityNameRequired", "Legal entity name is required")), o.legalEntityType.trim() || X.push(r("devportal.legalEntityTypeRequired", "Entity type is required")), f.taxId.trim() || X.push(r("devportal.taxIdRequired", "Tax ID is required")), f.taxCountry.trim() ? /^[A-Za-z]{2}$/.test(f.taxCountry.trim()) || X.push(r("devportal.taxCountryInvalid", "Tax country must be a 2-letter code")) : X.push(r("devportal.taxCountryRequired", "Tax country is required"));
|
|
571
|
+
let Z = [];
|
|
572
|
+
C === "domain" && !K(P.trim()) && Z.push(r("devportal.verification.errors.domainRequired", "Enter a valid domain like burdenoff.com")), C === "document" && !q(A.trim()) && Z.push(r("devportal.verification.errors.evidenceUrlRequired", "Enter a valid evidence URL starting with http:// or https://")), C === "manual" && !D.trim() && Z.push(r("devportal.verification.errors.notesRequired", "Add notes so the reviewer knows what to verify"));
|
|
573
|
+
let ie = X.length === 0 && Z.length === 0 && !W && n, [Q, { loading: $ }] = l({ refetchQueries: ["GetOrganization"] }), [ae, { loading: oe }] = s({ refetchQueries: ["GetOrganization"] }), [se, { loading: ce }] = c({ refetchQueries: ["GetOrganization"] });
|
|
561
574
|
b(() => {
|
|
562
|
-
|
|
575
|
+
a({
|
|
563
576
|
name: e.name,
|
|
564
577
|
description: e.description ?? "",
|
|
565
578
|
websiteUrl: e.websiteUrl ?? "",
|
|
@@ -567,7 +580,7 @@ var Y = {
|
|
|
567
580
|
supportEmail: e.supportEmail ?? "",
|
|
568
581
|
logoUrl: e.logoUrl ?? "",
|
|
569
582
|
bannerUrl: e.bannerUrl ?? ""
|
|
570
|
-
}),
|
|
583
|
+
}), u({
|
|
571
584
|
legalEntityName: e.legalEntityName ?? "",
|
|
572
585
|
legalEntityType: e.legalEntityType ?? ""
|
|
573
586
|
}), p({
|
|
@@ -579,12 +592,12 @@ var Y = {
|
|
|
579
592
|
gateway: "global",
|
|
580
593
|
query: H,
|
|
581
594
|
variables: { id: e.id }
|
|
582
|
-
}).then((e) =>
|
|
583
|
-
}, [e.id,
|
|
595
|
+
}).then((e) => B(e.data?.developerOrganization ?? null)).catch(() => B(null));
|
|
596
|
+
}, [e.id, T]);
|
|
584
597
|
let le = async () => {
|
|
585
|
-
|
|
598
|
+
S(null), h(null);
|
|
586
599
|
try {
|
|
587
|
-
await
|
|
600
|
+
await Q({ variables: {
|
|
588
601
|
id: e.id,
|
|
589
602
|
input: {
|
|
590
603
|
name: i.name.trim() || void 0,
|
|
@@ -595,25 +608,25 @@ var Y = {
|
|
|
595
608
|
logoUrl: i.logoUrl.trim() || null,
|
|
596
609
|
bannerUrl: i.bannerUrl.trim() || null
|
|
597
610
|
}
|
|
598
|
-
} }),
|
|
611
|
+
} }), h(r("devportal.organizationUpdated", "Organization details updated"));
|
|
599
612
|
} catch (e) {
|
|
600
|
-
|
|
613
|
+
S(e instanceof Error ? e.message : r("devportal.failedToUpdateOrganization", "Failed to update organization"));
|
|
601
614
|
}
|
|
602
615
|
}, ue = async () => {
|
|
603
|
-
|
|
616
|
+
S(null), h(null);
|
|
604
617
|
try {
|
|
605
618
|
await ae({ variables: {
|
|
606
619
|
id: e.id,
|
|
607
620
|
input: {
|
|
608
|
-
legalEntityName:
|
|
609
|
-
legalEntityType:
|
|
621
|
+
legalEntityName: o.legalEntityName.trim() || null,
|
|
622
|
+
legalEntityType: o.legalEntityType.trim() || null
|
|
610
623
|
}
|
|
611
|
-
} }),
|
|
624
|
+
} }), h(r("devportal.legalInfoUpdated", "Legal information updated"));
|
|
612
625
|
} catch (e) {
|
|
613
|
-
|
|
626
|
+
S(e instanceof Error ? e.message : r("devportal.failedToUpdateLegalInfo", "Failed to update legal information"));
|
|
614
627
|
}
|
|
615
628
|
}, de = async () => {
|
|
616
|
-
|
|
629
|
+
S(null), h(null);
|
|
617
630
|
try {
|
|
618
631
|
await se({ variables: {
|
|
619
632
|
id: e.id,
|
|
@@ -621,93 +634,93 @@ var Y = {
|
|
|
621
634
|
taxId: f.taxId.trim() || null,
|
|
622
635
|
taxCountry: f.taxCountry.trim() || null
|
|
623
636
|
}
|
|
624
|
-
} }),
|
|
637
|
+
} }), h(r("devportal.taxInfoUpdated", "Tax information updated"));
|
|
625
638
|
} catch (e) {
|
|
626
|
-
|
|
639
|
+
S(e instanceof Error ? e.message : r("devportal.failedToUpdateTaxInfo", "Failed to update tax information"));
|
|
627
640
|
}
|
|
628
641
|
};
|
|
629
|
-
return /* @__PURE__ */
|
|
642
|
+
return /* @__PURE__ */ L("div", {
|
|
630
643
|
className: "space-y-6 max-w-2xl",
|
|
631
644
|
children: [
|
|
632
|
-
|
|
645
|
+
g && /* @__PURE__ */ I("div", {
|
|
633
646
|
className: "rounded-md border border-status-error-bg bg-status-error-bg-subtle px-4 py-3 text-sm text-status-error-text",
|
|
634
|
-
children:
|
|
647
|
+
children: g
|
|
635
648
|
}),
|
|
636
|
-
m && /* @__PURE__ */
|
|
649
|
+
m && /* @__PURE__ */ I("div", {
|
|
637
650
|
className: "rounded-md border border-status-success-bg bg-status-success-bg-subtle px-4 py-3 text-sm text-status-success-text",
|
|
638
651
|
children: m
|
|
639
652
|
}),
|
|
640
|
-
/* @__PURE__ */
|
|
653
|
+
/* @__PURE__ */ I(d, {
|
|
641
654
|
title: r("devportal.organizationDetails", "Organization Details"),
|
|
642
|
-
children: /* @__PURE__ */
|
|
655
|
+
children: /* @__PURE__ */ L("div", {
|
|
643
656
|
className: "space-y-4",
|
|
644
657
|
children: [
|
|
645
|
-
/* @__PURE__ */
|
|
658
|
+
/* @__PURE__ */ L("div", {
|
|
646
659
|
className: "grid gap-4 sm:grid-cols-2",
|
|
647
|
-
children: [/* @__PURE__ */
|
|
660
|
+
children: [/* @__PURE__ */ I(v, {
|
|
648
661
|
label: r("devportal.organizationName", "Organization Name"),
|
|
649
662
|
value: i.name,
|
|
650
|
-
onChange: (e) =>
|
|
663
|
+
onChange: (e) => a((t) => ({
|
|
651
664
|
...t,
|
|
652
665
|
name: e.target.value
|
|
653
666
|
})),
|
|
654
667
|
disabled: !n,
|
|
655
668
|
required: !0
|
|
656
|
-
}), /* @__PURE__ */
|
|
669
|
+
}), /* @__PURE__ */ I(v, {
|
|
657
670
|
label: r("devportal.slug", "Slug"),
|
|
658
671
|
value: e.slug,
|
|
659
672
|
disabled: !0,
|
|
660
673
|
hint: r("devportal.slugReadOnly", "Slug cannot be changed here")
|
|
661
674
|
})]
|
|
662
675
|
}),
|
|
663
|
-
/* @__PURE__ */
|
|
676
|
+
/* @__PURE__ */ I(y, {
|
|
664
677
|
label: r("devportal.description", "Description"),
|
|
665
678
|
value: i.description,
|
|
666
|
-
onChange: (e) =>
|
|
679
|
+
onChange: (e) => a((t) => ({
|
|
667
680
|
...t,
|
|
668
681
|
description: e.target.value
|
|
669
682
|
})),
|
|
670
683
|
disabled: !n,
|
|
671
684
|
rows: 4
|
|
672
685
|
}),
|
|
673
|
-
/* @__PURE__ */
|
|
686
|
+
/* @__PURE__ */ L("div", {
|
|
674
687
|
className: "grid gap-4 sm:grid-cols-2",
|
|
675
688
|
children: [
|
|
676
|
-
/* @__PURE__ */
|
|
689
|
+
/* @__PURE__ */ I(v, {
|
|
677
690
|
label: r("devportal.website", "Website"),
|
|
678
691
|
type: "url",
|
|
679
692
|
value: i.websiteUrl,
|
|
680
|
-
onChange: (e) =>
|
|
693
|
+
onChange: (e) => a((t) => ({
|
|
681
694
|
...t,
|
|
682
695
|
websiteUrl: e.target.value
|
|
683
696
|
})),
|
|
684
697
|
disabled: !n
|
|
685
698
|
}),
|
|
686
|
-
/* @__PURE__ */
|
|
699
|
+
/* @__PURE__ */ I(v, {
|
|
687
700
|
label: r("devportal.contactEmail", "Contact Email"),
|
|
688
701
|
type: "email",
|
|
689
702
|
value: i.contactEmail,
|
|
690
|
-
onChange: (e) =>
|
|
703
|
+
onChange: (e) => a((t) => ({
|
|
691
704
|
...t,
|
|
692
705
|
contactEmail: e.target.value
|
|
693
706
|
})),
|
|
694
707
|
disabled: !n
|
|
695
708
|
}),
|
|
696
|
-
/* @__PURE__ */
|
|
709
|
+
/* @__PURE__ */ I(v, {
|
|
697
710
|
label: r("devportal.supportEmail", "Support Email"),
|
|
698
711
|
type: "email",
|
|
699
712
|
value: i.supportEmail,
|
|
700
|
-
onChange: (e) =>
|
|
713
|
+
onChange: (e) => a((t) => ({
|
|
701
714
|
...t,
|
|
702
715
|
supportEmail: e.target.value
|
|
703
716
|
})),
|
|
704
717
|
disabled: !n
|
|
705
718
|
}),
|
|
706
|
-
/* @__PURE__ */
|
|
719
|
+
/* @__PURE__ */ I(v, {
|
|
707
720
|
label: r("devportal.logoUrl", "Logo URL"),
|
|
708
721
|
type: "url",
|
|
709
722
|
value: i.logoUrl,
|
|
710
|
-
onChange: (e) =>
|
|
723
|
+
onChange: (e) => a((t) => ({
|
|
711
724
|
...t,
|
|
712
725
|
logoUrl: e.target.value
|
|
713
726
|
})),
|
|
@@ -715,20 +728,20 @@ var Y = {
|
|
|
715
728
|
})
|
|
716
729
|
]
|
|
717
730
|
}),
|
|
718
|
-
/* @__PURE__ */
|
|
731
|
+
/* @__PURE__ */ I(v, {
|
|
719
732
|
label: r("devportal.bannerUrl", "Banner URL"),
|
|
720
733
|
type: "url",
|
|
721
734
|
value: i.bannerUrl,
|
|
722
|
-
onChange: (e) =>
|
|
735
|
+
onChange: (e) => a((t) => ({
|
|
723
736
|
...t,
|
|
724
737
|
bannerUrl: e.target.value
|
|
725
738
|
})),
|
|
726
739
|
disabled: !n
|
|
727
740
|
}),
|
|
728
|
-
/* @__PURE__ */
|
|
741
|
+
/* @__PURE__ */ I(_, { items: [
|
|
729
742
|
{
|
|
730
743
|
label: r("devportal.organizationId", "Organization ID"),
|
|
731
|
-
value: /* @__PURE__ */
|
|
744
|
+
value: /* @__PURE__ */ I("code", {
|
|
732
745
|
className: "text-xs",
|
|
733
746
|
children: e.id
|
|
734
747
|
})
|
|
@@ -750,49 +763,49 @@ var Y = {
|
|
|
750
763
|
value: `${(e.platformFeeRate * 100).toFixed(0)}%`
|
|
751
764
|
}
|
|
752
765
|
] }),
|
|
753
|
-
/* @__PURE__ */
|
|
766
|
+
/* @__PURE__ */ I("div", {
|
|
754
767
|
className: "flex justify-end",
|
|
755
|
-
children: /* @__PURE__ */
|
|
768
|
+
children: /* @__PURE__ */ L("button", {
|
|
756
769
|
type: "button",
|
|
757
|
-
disabled: !n ||
|
|
770
|
+
disabled: !n || $,
|
|
758
771
|
onClick: () => void le(),
|
|
759
772
|
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",
|
|
760
|
-
children: [
|
|
773
|
+
children: [$ ? /* @__PURE__ */ I(k, {
|
|
761
774
|
size: 14,
|
|
762
775
|
className: "animate-spin"
|
|
763
|
-
}) : /* @__PURE__ */
|
|
776
|
+
}) : /* @__PURE__ */ I(j, { size: 14 }), r("devportal.saveChanges", "Save Changes")]
|
|
764
777
|
})
|
|
765
778
|
})
|
|
766
779
|
]
|
|
767
780
|
})
|
|
768
781
|
}),
|
|
769
|
-
/* @__PURE__ */
|
|
782
|
+
/* @__PURE__ */ I(d, {
|
|
770
783
|
title: r("devportal.legalInformation", "Legal Information"),
|
|
771
|
-
children: /* @__PURE__ */
|
|
784
|
+
children: /* @__PURE__ */ L("div", {
|
|
772
785
|
className: "space-y-4",
|
|
773
786
|
children: [
|
|
774
|
-
/* @__PURE__ */
|
|
787
|
+
/* @__PURE__ */ L("div", {
|
|
775
788
|
className: "grid gap-4 sm:grid-cols-2",
|
|
776
789
|
children: [
|
|
777
|
-
/* @__PURE__ */
|
|
790
|
+
/* @__PURE__ */ I(v, {
|
|
778
791
|
label: r("devportal.legalEntityName", "Legal Entity Name"),
|
|
779
|
-
value:
|
|
780
|
-
onChange: (e) =>
|
|
792
|
+
value: o.legalEntityName,
|
|
793
|
+
onChange: (e) => u((t) => ({
|
|
781
794
|
...t,
|
|
782
795
|
legalEntityName: e.target.value
|
|
783
796
|
})),
|
|
784
797
|
disabled: !n
|
|
785
798
|
}),
|
|
786
|
-
/* @__PURE__ */
|
|
799
|
+
/* @__PURE__ */ I(v, {
|
|
787
800
|
label: r("devportal.entityType", "Entity Type"),
|
|
788
|
-
value:
|
|
789
|
-
onChange: (e) =>
|
|
801
|
+
value: o.legalEntityType,
|
|
802
|
+
onChange: (e) => u((t) => ({
|
|
790
803
|
...t,
|
|
791
804
|
legalEntityType: e.target.value
|
|
792
805
|
})),
|
|
793
806
|
disabled: !n
|
|
794
807
|
}),
|
|
795
|
-
/* @__PURE__ */
|
|
808
|
+
/* @__PURE__ */ I(v, {
|
|
796
809
|
label: r("devportal.taxId", "Tax ID"),
|
|
797
810
|
value: f.taxId,
|
|
798
811
|
onChange: (e) => p((t) => ({
|
|
@@ -801,7 +814,7 @@ var Y = {
|
|
|
801
814
|
})),
|
|
802
815
|
disabled: !n
|
|
803
816
|
}),
|
|
804
|
-
/* @__PURE__ */
|
|
817
|
+
/* @__PURE__ */ I(v, {
|
|
805
818
|
label: r("devportal.taxCountry", "Tax Country"),
|
|
806
819
|
value: f.taxCountry,
|
|
807
820
|
onChange: (e) => p((t) => ({
|
|
@@ -812,37 +825,37 @@ var Y = {
|
|
|
812
825
|
})
|
|
813
826
|
]
|
|
814
827
|
}),
|
|
815
|
-
/* @__PURE__ */
|
|
828
|
+
/* @__PURE__ */ I(_, { items: [{
|
|
816
829
|
label: r("devportal.taxForm", "Tax Form"),
|
|
817
830
|
value: e.taxFormType || r("devportal.notSubmitted", "Not submitted")
|
|
818
831
|
}, {
|
|
819
832
|
label: r("devportal.taxFormStatus", "Tax Form Status"),
|
|
820
|
-
value: e.taxFormType ? e.taxFormVerified ? /* @__PURE__ */
|
|
833
|
+
value: e.taxFormType ? e.taxFormVerified ? /* @__PURE__ */ L("span", {
|
|
821
834
|
className: "text-status-success-text flex items-center gap-1",
|
|
822
835
|
children: [
|
|
823
|
-
/* @__PURE__ */
|
|
836
|
+
/* @__PURE__ */ I(E, { size: 14 }),
|
|
824
837
|
" ",
|
|
825
838
|
r("devportal.verified", "Verified")
|
|
826
839
|
]
|
|
827
840
|
}) : r("devportal.pendingVerification", "Pending verification") : r("devportal.notSubmitted", "Not submitted")
|
|
828
841
|
}] }),
|
|
829
|
-
/* @__PURE__ */
|
|
842
|
+
/* @__PURE__ */ L("div", {
|
|
830
843
|
className: "flex justify-end gap-2",
|
|
831
|
-
children: [/* @__PURE__ */
|
|
844
|
+
children: [/* @__PURE__ */ L("button", {
|
|
832
845
|
type: "button",
|
|
833
846
|
disabled: !n || oe,
|
|
834
847
|
onClick: () => void ue(),
|
|
835
848
|
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",
|
|
836
|
-
children: [oe ? /* @__PURE__ */
|
|
849
|
+
children: [oe ? /* @__PURE__ */ I(k, {
|
|
837
850
|
size: 14,
|
|
838
851
|
className: "animate-spin"
|
|
839
852
|
}) : null, r("devportal.saveLegalInfo", "Save Legal Info")]
|
|
840
|
-
}), /* @__PURE__ */
|
|
853
|
+
}), /* @__PURE__ */ L("button", {
|
|
841
854
|
type: "button",
|
|
842
855
|
disabled: !n || ce,
|
|
843
856
|
onClick: () => void de(),
|
|
844
857
|
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",
|
|
845
|
-
children: [ce ? /* @__PURE__ */
|
|
858
|
+
children: [ce ? /* @__PURE__ */ I(k, {
|
|
846
859
|
size: 14,
|
|
847
860
|
className: "animate-spin"
|
|
848
861
|
}) : null, r("devportal.saveTaxInfo", "Save Tax Info")]
|
|
@@ -851,115 +864,115 @@ var Y = {
|
|
|
851
864
|
]
|
|
852
865
|
})
|
|
853
866
|
}),
|
|
854
|
-
/* @__PURE__ */
|
|
867
|
+
/* @__PURE__ */ L(d, {
|
|
855
868
|
title: r("devportal.verificationStatus", "Verification Status"),
|
|
856
|
-
children: [/* @__PURE__ */
|
|
869
|
+
children: [/* @__PURE__ */ I(_, { items: [{
|
|
857
870
|
label: r("devportal.verifiedLabel", "Verified"),
|
|
858
|
-
value:
|
|
871
|
+
value: Y.verificationStatus === "VERIFIED" ? /* @__PURE__ */ L("span", {
|
|
859
872
|
className: "text-status-success-text flex items-center gap-1",
|
|
860
873
|
children: [
|
|
861
|
-
/* @__PURE__ */
|
|
874
|
+
/* @__PURE__ */ I(E, { size: 14 }),
|
|
862
875
|
" ",
|
|
863
876
|
r("devportal.verifiedVia", "Verified via"),
|
|
864
877
|
" ",
|
|
865
|
-
|
|
878
|
+
Y.verificationMethod
|
|
866
879
|
]
|
|
867
|
-
}) :
|
|
880
|
+
}) : Y.verificationStatus === "PENDING" ? r("devportal.pendingVerification", "Pending verification") : Y.verificationStatus === "REJECTED" ? r("devportal.verificationRejected", "Rejected") : r("devportal.notVerified", "Not verified")
|
|
868
881
|
}, {
|
|
869
882
|
label: r("devportal.certifiedLabel", "Certified"),
|
|
870
|
-
value: e.isCertified ? /* @__PURE__ */
|
|
883
|
+
value: e.isCertified ? /* @__PURE__ */ L("span", {
|
|
871
884
|
className: "text-accent-blue flex items-center gap-1",
|
|
872
885
|
children: [
|
|
873
|
-
/* @__PURE__ */
|
|
886
|
+
/* @__PURE__ */ I(M, { size: 14 }),
|
|
874
887
|
" ",
|
|
875
888
|
r("devportal.certifiedUntil", "Certified until"),
|
|
876
889
|
" ",
|
|
877
890
|
e.certificationExpiry ? new Date(e.certificationExpiry).toLocaleDateString() : "N/A"
|
|
878
891
|
]
|
|
879
892
|
}) : r("devportal.notCertified", "Not certified")
|
|
880
|
-
}] }),
|
|
893
|
+
}] }), Y.verificationStatus !== "VERIFIED" && /* @__PURE__ */ I("div", {
|
|
881
894
|
className: "mt-4 rounded-md border border-border-subtle p-4 space-y-3",
|
|
882
|
-
children:
|
|
895
|
+
children: T ? /* @__PURE__ */ L("p", {
|
|
883
896
|
className: "text-sm text-status-success-text flex items-center gap-2",
|
|
884
|
-
children: [/* @__PURE__ */
|
|
885
|
-
}) : /* @__PURE__ */
|
|
886
|
-
/* @__PURE__ */
|
|
897
|
+
children: [/* @__PURE__ */ I(E, { size: 14 }), r("devportal.verificationRequested", "Verification request submitted. Our team will review and contact you.")]
|
|
898
|
+
}) : /* @__PURE__ */ L(F, { children: [
|
|
899
|
+
/* @__PURE__ */ I("p", {
|
|
887
900
|
className: "text-sm text-text-secondary",
|
|
888
901
|
children: r("devportal.requestVerificationHint", "Get your organization verified to build trust with users. Choose a verification method:")
|
|
889
902
|
}),
|
|
890
|
-
|
|
903
|
+
Y.verificationStatus === "PENDING" && /* @__PURE__ */ L("div", {
|
|
891
904
|
className: "rounded-md border border-border-subtle bg-bg-sunken/40 p-3 text-sm text-text-secondary",
|
|
892
905
|
children: [
|
|
893
906
|
r("devportal.pendingVerification", "Pending verification"),
|
|
894
|
-
|
|
895
|
-
|
|
907
|
+
Y.verificationMethod ? ` · ${Y.verificationMethod}` : "",
|
|
908
|
+
Y.verificationRequestNotes ? ` · ${Y.verificationRequestNotes}` : ""
|
|
896
909
|
]
|
|
897
910
|
}),
|
|
898
|
-
|
|
911
|
+
Y.verificationStatus === "REJECTED" && Y.verificationRejectedReason && /* @__PURE__ */ I("div", {
|
|
899
912
|
className: "rounded-md border border-status-error-border bg-status-error-bg-subtle p-3 text-sm text-status-error-text",
|
|
900
|
-
children:
|
|
913
|
+
children: Y.verificationRejectedReason
|
|
901
914
|
}),
|
|
902
|
-
|
|
915
|
+
X.length > 0 && /* @__PURE__ */ L("div", {
|
|
903
916
|
className: "rounded-md border border-border-subtle bg-bg-sunken/40 p-3 text-sm text-text-secondary",
|
|
904
|
-
children: [/* @__PURE__ */
|
|
917
|
+
children: [/* @__PURE__ */ I("div", {
|
|
905
918
|
className: "font-medium text-text-primary",
|
|
906
919
|
children: r("devportal.completeBeforeVerification", "Complete these details before submitting for review")
|
|
907
|
-
}), /* @__PURE__ */
|
|
920
|
+
}), /* @__PURE__ */ I("ul", {
|
|
908
921
|
className: "mt-2 list-disc pl-5 space-y-1",
|
|
909
|
-
children:
|
|
922
|
+
children: X.map((e) => /* @__PURE__ */ I("li", { children: e }, e))
|
|
910
923
|
})]
|
|
911
924
|
}),
|
|
912
|
-
|
|
913
|
-
/* @__PURE__ */
|
|
925
|
+
Y.verificationStatus !== "PENDING" && /* @__PURE__ */ L(F, { children: [
|
|
926
|
+
/* @__PURE__ */ I("div", {
|
|
914
927
|
className: "flex gap-2 flex-wrap",
|
|
915
928
|
children: [
|
|
916
929
|
"domain",
|
|
917
930
|
"document",
|
|
918
931
|
"manual"
|
|
919
|
-
].map((e) => /* @__PURE__ */
|
|
932
|
+
].map((e) => /* @__PURE__ */ I("button", {
|
|
920
933
|
type: "button",
|
|
921
|
-
onClick: () =>
|
|
922
|
-
className: `rounded-md border px-3 py-1 text-xs font-medium transition-colors ${
|
|
934
|
+
onClick: () => w(e),
|
|
935
|
+
className: `rounded-md border px-3 py-1 text-xs font-medium transition-colors ${C === e ? "bg-action-primary-bg text-action-primary-text border-primary" : "border-border-subtle hover:bg-bg-sunken"}`,
|
|
923
936
|
children: e === "domain" ? r("devportal.domainVerification", "Domain") : e === "document" ? r("devportal.documentVerification", "Document") : r("devportal.manualVerification", "Manual review")
|
|
924
937
|
}, e))
|
|
925
938
|
}),
|
|
926
|
-
|
|
939
|
+
C === "domain" ? /* @__PURE__ */ I(v, {
|
|
927
940
|
label: r("devportal.domainVerification", "Domain"),
|
|
928
|
-
value:
|
|
929
|
-
onChange: (e) =>
|
|
941
|
+
value: P,
|
|
942
|
+
onChange: (e) => re(e.target.value),
|
|
930
943
|
placeholder: "example.com"
|
|
931
|
-
}) :
|
|
944
|
+
}) : C === "document" ? /* @__PURE__ */ I(v, {
|
|
932
945
|
label: r("devportal.evidenceUrl", "Evidence URL"),
|
|
933
|
-
value:
|
|
934
|
-
onChange: (e) =>
|
|
946
|
+
value: A,
|
|
947
|
+
onChange: (e) => N(e.target.value),
|
|
935
948
|
placeholder: "https://..."
|
|
936
949
|
}) : null,
|
|
937
|
-
/* @__PURE__ */
|
|
950
|
+
/* @__PURE__ */ I(y, {
|
|
938
951
|
label: r("devportal.notes", "Notes"),
|
|
939
|
-
value:
|
|
940
|
-
onChange: (e) =>
|
|
952
|
+
value: D,
|
|
953
|
+
onChange: (e) => O(e.target.value),
|
|
941
954
|
placeholder: "What should reviewers validate?"
|
|
942
955
|
}),
|
|
943
|
-
/* @__PURE__ */
|
|
956
|
+
/* @__PURE__ */ L("button", {
|
|
944
957
|
type: "button",
|
|
945
|
-
disabled: !
|
|
958
|
+
disabled: !ie,
|
|
946
959
|
onClick: () => void (async () => {
|
|
947
|
-
let t =
|
|
948
|
-
if (
|
|
949
|
-
|
|
960
|
+
let t = P.trim(), n = A.trim(), a = D.trim();
|
|
961
|
+
if (C === "domain" && !K(t)) {
|
|
962
|
+
S(r("devportal.verification.errors.domainRequired", "Enter a valid domain like burdenoff.com"));
|
|
950
963
|
return;
|
|
951
964
|
}
|
|
952
|
-
if (
|
|
953
|
-
|
|
965
|
+
if (C === "document" && !q(n)) {
|
|
966
|
+
S(r("devportal.verification.errors.evidenceUrlRequired", "Enter a valid evidence URL starting with http:// or https://"));
|
|
954
967
|
return;
|
|
955
968
|
}
|
|
956
|
-
if (
|
|
957
|
-
|
|
969
|
+
if (C === "manual" && !a) {
|
|
970
|
+
S(r("devportal.verification.errors.notesRequired", "Add notes so the reviewer knows what to verify"));
|
|
958
971
|
return;
|
|
959
972
|
}
|
|
960
|
-
|
|
973
|
+
S(null), h(null), G(!0);
|
|
961
974
|
try {
|
|
962
|
-
await
|
|
975
|
+
await Q({ variables: {
|
|
963
976
|
id: e.id,
|
|
964
977
|
input: {
|
|
965
978
|
name: i.name.trim() || void 0,
|
|
@@ -973,8 +986,8 @@ var Y = {
|
|
|
973
986
|
} }), await ae({ variables: {
|
|
974
987
|
id: e.id,
|
|
975
988
|
input: {
|
|
976
|
-
legalEntityName:
|
|
977
|
-
legalEntityType:
|
|
989
|
+
legalEntityName: o.legalEntityName.trim() || null,
|
|
990
|
+
legalEntityType: o.legalEntityType.trim() || null
|
|
978
991
|
}
|
|
979
992
|
} }), await se({ variables: {
|
|
980
993
|
id: e.id,
|
|
@@ -983,34 +996,34 @@ var Y = {
|
|
|
983
996
|
taxCountry: f.taxCountry.trim() || null
|
|
984
997
|
}
|
|
985
998
|
} });
|
|
986
|
-
let
|
|
999
|
+
let s = await V({
|
|
987
1000
|
gateway: "global",
|
|
988
1001
|
query: U,
|
|
989
1002
|
variables: {
|
|
990
1003
|
id: e.id,
|
|
991
|
-
method:
|
|
1004
|
+
method: C,
|
|
992
1005
|
notes: a || null,
|
|
993
|
-
evidenceUrl:
|
|
994
|
-
domain:
|
|
1006
|
+
evidenceUrl: C === "domain" ? null : n || null,
|
|
1007
|
+
domain: C === "domain" && t || null
|
|
995
1008
|
}
|
|
996
1009
|
});
|
|
997
|
-
if (
|
|
998
|
-
|
|
1010
|
+
if (s.errors?.length) throw Error(s.errors[0]?.message || "Verification request failed");
|
|
1011
|
+
ne(!0), h(r("devportal.verificationRequested", "Verification request submitted. Our team will review and contact you.")), B((await V({
|
|
999
1012
|
gateway: "global",
|
|
1000
1013
|
query: H,
|
|
1001
1014
|
variables: { id: e.id }
|
|
1002
1015
|
})).data?.developerOrganization ?? null);
|
|
1003
1016
|
} catch (e) {
|
|
1004
|
-
|
|
1017
|
+
S(e instanceof Error ? e.message : r("devportal.verificationRequestFailed", "Verification request failed"));
|
|
1005
1018
|
} finally {
|
|
1006
|
-
|
|
1019
|
+
G(!1);
|
|
1007
1020
|
}
|
|
1008
1021
|
})(),
|
|
1009
1022
|
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",
|
|
1010
|
-
children: [
|
|
1023
|
+
children: [W ? /* @__PURE__ */ I(k, {
|
|
1011
1024
|
size: 14,
|
|
1012
1025
|
className: "animate-spin"
|
|
1013
|
-
}) : /* @__PURE__ */
|
|
1026
|
+
}) : /* @__PURE__ */ I(M, { size: 14 }), r("devportal.requestVerification", "Request Verification")]
|
|
1014
1027
|
})
|
|
1015
1028
|
] })
|
|
1016
1029
|
] })
|