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