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