@burdenoff/microfe-devportal 2026.916.1 → 2026.916.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/devportal/pages/OrganizationDetailPage.js +174 -193
- package/dist/devportal/pages/OrganizationDetailPage.js.map +1 -1
- package/dist/devportal/pages/SellerDashboardPage.d.ts.map +1 -1
- package/dist/devportal/pages/SellerDashboardPage.js +120 -96
- package/dist/devportal/pages/SellerDashboardPage.js.map +1 -1
- package/package.json +1 -1
|
@@ -17,15 +17,15 @@ import { DEVPORTAL_PERMISSIONS as re } from "../constants/permissions.js";
|
|
|
17
17
|
import { useOrganizationPickupAddresses as ie } from "../hooks/useOrganizationPickupAddresses.js";
|
|
18
18
|
import { formatCurrency as w } from "../utils/currency.js";
|
|
19
19
|
import { useEffect as T, useState as E } from "react";
|
|
20
|
-
import { AlertCircle as ae, AppWindow as D, ArrowRight as oe, BarChart3 as
|
|
20
|
+
import { AlertCircle as ae, AppWindow as D, ArrowRight as oe, BarChart3 as O, Building2 as se, CheckCircle as k, CreditCard as A, DollarSign as j, ExternalLink as M, Loader2 as N, Plus as P, Settings as ce, Shield as le, Trash2 as ue, TrendingUp as F, Users as de } from "lucide-react";
|
|
21
21
|
import { useParams as I } from "react-router";
|
|
22
22
|
import { Fragment as L, jsx as R, jsxs as z } from "react/jsx-runtime";
|
|
23
23
|
import { useI18n as B } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
24
24
|
import { EmphasisPanel as V, NextSteps as H } from "@burdenoff/fe-libs/ui";
|
|
25
|
-
import { clearGraphqlFetchResponseCache as
|
|
25
|
+
import { clearGraphqlFetchResponseCache as U, graphqlFetch as W } from "@burdenoff/fe-libs/shared/graphql";
|
|
26
26
|
//#region src/devportal/pages/OrganizationDetailPage.tsx
|
|
27
|
-
var
|
|
28
|
-
function
|
|
27
|
+
var fe = "\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", G = "\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";
|
|
28
|
+
function pe(e) {
|
|
29
29
|
let t = e;
|
|
30
30
|
return {
|
|
31
31
|
id: e.id,
|
|
@@ -83,7 +83,7 @@ function me(e) {
|
|
|
83
83
|
updatedAt: e.updatedAt
|
|
84
84
|
};
|
|
85
85
|
}
|
|
86
|
-
function
|
|
86
|
+
function K(e) {
|
|
87
87
|
return {
|
|
88
88
|
id: e.id,
|
|
89
89
|
organizationId: e.organizationId,
|
|
@@ -102,11 +102,11 @@ function G(e) {
|
|
|
102
102
|
updatedAt: e.updatedAt
|
|
103
103
|
};
|
|
104
104
|
}
|
|
105
|
-
function
|
|
105
|
+
function q(e) {
|
|
106
106
|
let t = e.trim().toLowerCase();
|
|
107
107
|
return /^[a-z0-9.-]+\.[a-z]{2,}$/i.test(t) && !t.includes("@");
|
|
108
108
|
}
|
|
109
|
-
function
|
|
109
|
+
function J(e) {
|
|
110
110
|
try {
|
|
111
111
|
let t = new URL(e.trim());
|
|
112
112
|
return t.protocol === "http:" || t.protocol === "https:";
|
|
@@ -114,16 +114,16 @@ function q(e) {
|
|
|
114
114
|
return !1;
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
|
-
function
|
|
117
|
+
function me(e) {
|
|
118
118
|
let t = e.trim();
|
|
119
119
|
return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t);
|
|
120
120
|
}
|
|
121
|
-
var
|
|
121
|
+
var Y = {
|
|
122
122
|
VIEWER: 0,
|
|
123
123
|
DEVELOPER: 1,
|
|
124
124
|
ADMIN: 2,
|
|
125
125
|
OWNER: 3
|
|
126
|
-
},
|
|
126
|
+
}, X = () => {
|
|
127
127
|
let { navigate: n, basePath: c, setActiveOrgId: l, setActivePhysicalOrgId: u, currentUser: f } = e(), p = i(), { orgId: m } = I(), { addresses: h, loading: g, refetch: _ } = ie(m), { data: v } = s({
|
|
128
128
|
variables: {
|
|
129
129
|
organizationId: m ?? "",
|
|
@@ -137,7 +137,7 @@ var J = {
|
|
|
137
137
|
{
|
|
138
138
|
id: "overview",
|
|
139
139
|
label: x("devportal.overview", "Overview"),
|
|
140
|
-
icon:
|
|
140
|
+
icon: se
|
|
141
141
|
},
|
|
142
142
|
{
|
|
143
143
|
id: "apps",
|
|
@@ -147,24 +147,24 @@ var J = {
|
|
|
147
147
|
{
|
|
148
148
|
id: "members",
|
|
149
149
|
label: x("devportal.members", "Members"),
|
|
150
|
-
icon:
|
|
150
|
+
icon: de
|
|
151
151
|
},
|
|
152
152
|
{
|
|
153
153
|
id: "settings",
|
|
154
154
|
label: x("devportal.settings", "Settings"),
|
|
155
|
-
icon:
|
|
155
|
+
icon: ce
|
|
156
156
|
}
|
|
157
|
-
], { data: w, previousData: oe, loading:
|
|
157
|
+
], { data: w, previousData: oe, loading: O, error: k } = o({
|
|
158
158
|
variables: { id: m },
|
|
159
159
|
skip: !m
|
|
160
|
-
}),
|
|
160
|
+
}), M = w ?? oe, { data: le } = a({
|
|
161
161
|
variables: {
|
|
162
162
|
limit: 50,
|
|
163
163
|
organizationId: m
|
|
164
164
|
},
|
|
165
165
|
skip: !m,
|
|
166
166
|
fetchPolicy: "cache-and-network"
|
|
167
|
-
}),
|
|
167
|
+
}), ue = (M?.developerOrganization?.members ?? []).map(K), F = (f ? ue.find((e) => e.userId === f.id) : void 0)?.role, L = F !== void 0 && Y[F] >= Y.DEVELOPER, V = F !== void 0 && Y[F] >= Y.ADMIN, U = V, W = V, fe = re.filter((e) => e.id !== "settings" || V), G = (e) => {
|
|
168
168
|
n?.(`${c}${e}`);
|
|
169
169
|
};
|
|
170
170
|
if (T(() => {
|
|
@@ -177,20 +177,20 @@ var J = {
|
|
|
177
177
|
]), T(() => {
|
|
178
178
|
S === "settings" && !V && C("overview");
|
|
179
179
|
}, [S, V]), T(() => {
|
|
180
|
-
let e =
|
|
180
|
+
let e = M?.developerOrganization?.name;
|
|
181
181
|
if (!m || !e) return;
|
|
182
182
|
let t = window.__breadcrumbRegistry;
|
|
183
183
|
return t?.register(m, e), () => t?.unregister(m);
|
|
184
|
-
}, [m, w?.developerOrganization?.name]),
|
|
184
|
+
}, [m, w?.developerOrganization?.name]), O && !M) return /* @__PURE__ */ R(d, {
|
|
185
185
|
title: x("devportal.loadingDots", "Loading..."),
|
|
186
186
|
backLink: `${c}${r(p)}`,
|
|
187
187
|
backLabel: x("devportal.backToOrganizations", "Back to Organizations"),
|
|
188
188
|
children: /* @__PURE__ */ R("div", {
|
|
189
189
|
className: "flex items-center justify-center py-12",
|
|
190
|
-
children: /* @__PURE__ */ R(
|
|
190
|
+
children: /* @__PURE__ */ R(N, { className: "h-8 w-8 animate-spin text-text-secondary" })
|
|
191
191
|
})
|
|
192
192
|
});
|
|
193
|
-
if (
|
|
193
|
+
if (k || !M?.developerOrganization) return /* @__PURE__ */ R(d, {
|
|
194
194
|
title: x("devportal.organizationNotFound", "Organization Not Found"),
|
|
195
195
|
backLink: `${c}${r(p)}`,
|
|
196
196
|
backLabel: x("devportal.backToOrganizations", "Back to Organizations"),
|
|
@@ -204,29 +204,29 @@ var J = {
|
|
|
204
204
|
}),
|
|
205
205
|
/* @__PURE__ */ R("p", {
|
|
206
206
|
className: "text-text-secondary",
|
|
207
|
-
children:
|
|
207
|
+
children: k?.message || x("devportal.organizationNotFoundDescription", "The organization you're looking for doesn't exist or you don't have access to it.")
|
|
208
208
|
}),
|
|
209
209
|
/* @__PURE__ */ R("button", {
|
|
210
|
-
onClick: () =>
|
|
210
|
+
onClick: () => G(r(p)),
|
|
211
211
|
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",
|
|
212
212
|
children: x("devportal.backToOrganizations", "Back to Organizations")
|
|
213
213
|
})
|
|
214
214
|
]
|
|
215
215
|
})
|
|
216
216
|
});
|
|
217
|
-
let
|
|
217
|
+
let q = pe(M.developerOrganization), J = ue, me = le?.applications?.edges?.map((e) => e.node) ?? [], X = `/billing/earnings?developerOrgId=${encodeURIComponent(q.id)}&developerOrgName=${encodeURIComponent(q.name)}&returnTo=${encodeURIComponent(`${c}${r(p, q.id)}`)}`;
|
|
218
218
|
return /* @__PURE__ */ z(d, {
|
|
219
|
-
title:
|
|
220
|
-
description:
|
|
219
|
+
title: q.name,
|
|
220
|
+
description: q.description,
|
|
221
221
|
purpose: x("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."),
|
|
222
222
|
backLink: `${c}${r(p)}`,
|
|
223
223
|
backLabel: x("devportal.backToOrganizations", "Back to Organizations"),
|
|
224
224
|
actions: /* @__PURE__ */ R("div", {
|
|
225
225
|
className: "flex items-center gap-2",
|
|
226
|
-
children:
|
|
227
|
-
onClick: () => n?.(
|
|
226
|
+
children: U ? /* @__PURE__ */ z("button", {
|
|
227
|
+
onClick: () => n?.(X),
|
|
228
228
|
className: "inline-flex items-center gap-2 rounded-md border px-4 py-2 text-sm font-medium hover:bg-bg-sunken transition-colors",
|
|
229
|
-
children: [/* @__PURE__ */ R(
|
|
229
|
+
children: [/* @__PURE__ */ R(j, { size: 16 }), x("devportal.revenue", "Revenue")]
|
|
230
230
|
}) : null
|
|
231
231
|
}),
|
|
232
232
|
children: [
|
|
@@ -236,7 +236,7 @@ var J = {
|
|
|
236
236
|
className: "-mb-px flex gap-4 overflow-x-auto",
|
|
237
237
|
role: "tablist",
|
|
238
238
|
"aria-label": x("devportal.organizationSections", "Organization sections"),
|
|
239
|
-
children:
|
|
239
|
+
children: fe.map((e) => {
|
|
240
240
|
let n = e.icon;
|
|
241
241
|
return /* @__PURE__ */ z("button", {
|
|
242
242
|
id: `organization-tab-${e.id}`,
|
|
@@ -265,44 +265,44 @@ var J = {
|
|
|
265
265
|
}),
|
|
266
266
|
/* @__PURE__ */ R(H, {
|
|
267
267
|
className: "mt-6",
|
|
268
|
-
storageKey: `devportal-org-${
|
|
268
|
+
storageKey: `devportal-org-${q.id}`,
|
|
269
269
|
steps: [
|
|
270
|
-
...
|
|
270
|
+
...W ? [{
|
|
271
271
|
id: "invite-members",
|
|
272
272
|
label: x("devportal.inviteMembers", "Invite members"),
|
|
273
273
|
description: x("devportal.orgStepInvite", "Add teammates so they can build alongside you"),
|
|
274
|
-
icon: /* @__PURE__ */ R(
|
|
274
|
+
icon: /* @__PURE__ */ R(de, { size: 16 }),
|
|
275
275
|
onClick: () => C("members")
|
|
276
276
|
}] : [],
|
|
277
277
|
...V ? [{
|
|
278
278
|
id: "settings",
|
|
279
279
|
label: x("devportal.orgStepVerify", "Complete organization profile"),
|
|
280
280
|
description: x("devportal.orgStepVerifyDesc", "Add a logo and details, then request verification"),
|
|
281
|
-
icon: /* @__PURE__ */ R(
|
|
281
|
+
icon: /* @__PURE__ */ R(ce, { size: 16 }),
|
|
282
282
|
onClick: () => C("settings"),
|
|
283
|
-
done: !!
|
|
283
|
+
done: !!q.isVerified
|
|
284
284
|
}] : [],
|
|
285
285
|
...V ? [{
|
|
286
286
|
id: "link-billing",
|
|
287
287
|
label: x("devportal.orgStepLinkBilling", "Link billing account"),
|
|
288
288
|
description: x("devportal.orgStepLinkBillingDesc", "Connect a billing account so sale and payout revenue has somewhere to go"),
|
|
289
|
-
icon: /* @__PURE__ */ R(
|
|
290
|
-
onClick: () => n?.(
|
|
291
|
-
done: !!
|
|
289
|
+
icon: /* @__PURE__ */ R(A, { size: 16 }),
|
|
290
|
+
onClick: () => n?.(X),
|
|
291
|
+
done: !!q.billingAccountId
|
|
292
292
|
}] : [],
|
|
293
293
|
...L && !p ? [{
|
|
294
294
|
id: "create-app",
|
|
295
295
|
label: x("devportal.createApp", "Create App"),
|
|
296
296
|
description: x("devportal.orgStepCreateApp", "Build a new application under this organization"),
|
|
297
297
|
icon: /* @__PURE__ */ R(D, { size: 16 }),
|
|
298
|
-
onClick: () =>
|
|
298
|
+
onClick: () => G("/apps/new")
|
|
299
299
|
}] : [],
|
|
300
300
|
...L && p ? [{
|
|
301
301
|
id: "list-item",
|
|
302
302
|
label: x("devportal.listAnItem", "List an Item"),
|
|
303
303
|
description: x("devportal.orgStepListItem", "List a physical product for sale under this organization"),
|
|
304
|
-
icon: /* @__PURE__ */ R(
|
|
305
|
-
onClick: () =>
|
|
304
|
+
icon: /* @__PURE__ */ R(P, { size: 16 }),
|
|
305
|
+
onClick: () => G("/seller/items/new")
|
|
306
306
|
}] : []
|
|
307
307
|
]
|
|
308
308
|
}),
|
|
@@ -313,30 +313,30 @@ var J = {
|
|
|
313
313
|
"aria-labelledby": `organization-tab-${S}`,
|
|
314
314
|
tabIndex: 0,
|
|
315
315
|
children: [
|
|
316
|
-
S === "overview" && /* @__PURE__ */ R(
|
|
317
|
-
org:
|
|
318
|
-
apps:
|
|
319
|
-
members:
|
|
316
|
+
S === "overview" && /* @__PURE__ */ R(Z, {
|
|
317
|
+
org: q,
|
|
318
|
+
apps: me,
|
|
319
|
+
members: J,
|
|
320
320
|
canCreateApps: L,
|
|
321
|
-
canViewRevenue:
|
|
321
|
+
canViewRevenue: U,
|
|
322
322
|
currency: y,
|
|
323
|
-
onNavigate:
|
|
323
|
+
onNavigate: G,
|
|
324
324
|
onShowApps: () => C("apps")
|
|
325
325
|
}),
|
|
326
|
-
S === "apps" && /* @__PURE__ */ R(
|
|
327
|
-
org:
|
|
328
|
-
apps:
|
|
329
|
-
onNavigate:
|
|
326
|
+
S === "apps" && /* @__PURE__ */ R(he, {
|
|
327
|
+
org: q,
|
|
328
|
+
apps: me,
|
|
329
|
+
onNavigate: G,
|
|
330
330
|
canCreateApps: L
|
|
331
331
|
}),
|
|
332
|
-
S === "members" && /* @__PURE__ */ R(
|
|
333
|
-
members:
|
|
334
|
-
onNavigate:
|
|
335
|
-
orgId:
|
|
336
|
-
canInviteMembers:
|
|
332
|
+
S === "members" && /* @__PURE__ */ R(ge, {
|
|
333
|
+
members: J,
|
|
334
|
+
onNavigate: G,
|
|
335
|
+
orgId: q.id,
|
|
336
|
+
canInviteMembers: W
|
|
337
337
|
}),
|
|
338
|
-
S === "settings" && V && /* @__PURE__ */ R(
|
|
339
|
-
org:
|
|
338
|
+
S === "settings" && V && /* @__PURE__ */ R(_e, {
|
|
339
|
+
org: q,
|
|
340
340
|
pickupAddresses: h,
|
|
341
341
|
pickupAddressesLoading: g,
|
|
342
342
|
refetchPickupAddresses: _,
|
|
@@ -347,7 +347,7 @@ var J = {
|
|
|
347
347
|
})
|
|
348
348
|
]
|
|
349
349
|
});
|
|
350
|
-
},
|
|
350
|
+
}, Z = ({ org: e, apps: t, members: r, canCreateApps: i, canViewRevenue: a, currency: o, onNavigate: s, onShowApps: c }) => {
|
|
351
351
|
let { t: l } = B(), u = (e, t) => {
|
|
352
352
|
let n = l(e);
|
|
353
353
|
return n === e ? t : n;
|
|
@@ -357,27 +357,26 @@ var J = {
|
|
|
357
357
|
children: [/* @__PURE__ */ z("div", {
|
|
358
358
|
className: "lg:col-span-2 space-y-6",
|
|
359
359
|
children: [/* @__PURE__ */ R(V, { children: /* @__PURE__ */ z(g, {
|
|
360
|
-
columns: e.kind === "PHYSICAL" ?
|
|
360
|
+
columns: e.kind === "PHYSICAL" ? 2 : a ? 4 : 3,
|
|
361
361
|
children: [
|
|
362
|
-
/* @__PURE__ */ R(h, {
|
|
362
|
+
e.kind !== "PHYSICAL" && /* @__PURE__ */ z(L, { children: [/* @__PURE__ */ R(h, {
|
|
363
363
|
title: u("devportal.publishedApps", "Published Apps"),
|
|
364
364
|
value: `${e.publishedApps}/${e.totalApps}`,
|
|
365
365
|
icon: /* @__PURE__ */ R(D, { size: 20 })
|
|
366
|
-
}),
|
|
367
|
-
e.kind !== "PHYSICAL" && /* @__PURE__ */ R(h, {
|
|
366
|
+
}), /* @__PURE__ */ R(h, {
|
|
368
367
|
title: u("devportal.totalInstalls", "Total Installs"),
|
|
369
368
|
value: e.totalInstalls.toLocaleString(),
|
|
370
|
-
icon: /* @__PURE__ */ R(
|
|
371
|
-
}),
|
|
369
|
+
icon: /* @__PURE__ */ R(F, { size: 20 })
|
|
370
|
+
})] }),
|
|
372
371
|
a ? /* @__PURE__ */ R(h, {
|
|
373
372
|
title: u("devportal.totalRevenue", "Total Revenue"),
|
|
374
373
|
value: w(e.totalRevenue, o),
|
|
375
|
-
icon: /* @__PURE__ */ R(
|
|
374
|
+
icon: /* @__PURE__ */ R(j, { size: 20 })
|
|
376
375
|
}) : null,
|
|
377
376
|
/* @__PURE__ */ R(h, {
|
|
378
377
|
title: u("devportal.avgRating", "Avg Rating"),
|
|
379
378
|
value: e.averageRating ? `${e.averageRating.toFixed(1)} ★` : u("devportal.notAvailable", "N/A"),
|
|
380
|
-
icon: /* @__PURE__ */ R(
|
|
379
|
+
icon: /* @__PURE__ */ R(O, { size: 20 })
|
|
381
380
|
})
|
|
382
381
|
]
|
|
383
382
|
}) }), /* @__PURE__ */ R(f, {
|
|
@@ -405,7 +404,7 @@ var J = {
|
|
|
405
404
|
action: i ? /* @__PURE__ */ z("button", {
|
|
406
405
|
onClick: () => s(e.kind === "PHYSICAL" ? "/seller/items/new" : "/apps/new"),
|
|
407
406
|
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",
|
|
408
|
-
children: [/* @__PURE__ */ R(
|
|
407
|
+
children: [/* @__PURE__ */ R(P, { size: 16 }), e.kind === "PHYSICAL" ? u("devportal.createItem", "Create Item") : u("devportal.createApp", "Create App")]
|
|
409
408
|
}) : void 0
|
|
410
409
|
})
|
|
411
410
|
})]
|
|
@@ -414,28 +413,10 @@ var J = {
|
|
|
414
413
|
children: [
|
|
415
414
|
a ? /* @__PURE__ */ R(f, {
|
|
416
415
|
title: u("devportal.revenueSummary", "Revenue Summary"),
|
|
417
|
-
children: /* @__PURE__ */ R(v, { items: [
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
},
|
|
422
|
-
{
|
|
423
|
-
label: u("devportal.platformFees", "Platform Fees"),
|
|
424
|
-
value: w(e.totalPlatformFees, o)
|
|
425
|
-
},
|
|
426
|
-
{
|
|
427
|
-
label: u("devportal.netPayouts", "Net Payouts"),
|
|
428
|
-
value: w(e.totalPayouts, o)
|
|
429
|
-
},
|
|
430
|
-
{
|
|
431
|
-
label: u("devportal.pendingBalance", "Pending Balance"),
|
|
432
|
-
value: w(e.pendingBalance, o)
|
|
433
|
-
},
|
|
434
|
-
{
|
|
435
|
-
label: u("devportal.lifetimeRevenue", "Lifetime Revenue"),
|
|
436
|
-
value: w(e.lifetimeRevenue, o)
|
|
437
|
-
}
|
|
438
|
-
] })
|
|
416
|
+
children: /* @__PURE__ */ R(v, { items: [{
|
|
417
|
+
label: u("devportal.totalRevenue", "Total Revenue"),
|
|
418
|
+
value: w(e.totalRevenue, o)
|
|
419
|
+
}] })
|
|
439
420
|
}) : null,
|
|
440
421
|
/* @__PURE__ */ R(f, {
|
|
441
422
|
title: u("devportal.teamMembers", "Team Members"),
|
|
@@ -481,18 +462,18 @@ var J = {
|
|
|
481
462
|
target: "_blank",
|
|
482
463
|
rel: "noopener noreferrer",
|
|
483
464
|
className: "flex items-center gap-2 text-sm text-primary hover:underline",
|
|
484
|
-
children: [/* @__PURE__ */ R(
|
|
465
|
+
children: [/* @__PURE__ */ R(M, { size: 14 }), u("devportal.website", "Website")]
|
|
485
466
|
}), e.contactEmail && /* @__PURE__ */ z("a", {
|
|
486
467
|
href: `mailto:${e.contactEmail}`,
|
|
487
468
|
className: "flex items-center gap-2 text-sm text-primary hover:underline",
|
|
488
|
-
children: [/* @__PURE__ */ R(
|
|
469
|
+
children: [/* @__PURE__ */ R(M, { size: 14 }), e.contactEmail]
|
|
489
470
|
})]
|
|
490
471
|
})
|
|
491
472
|
})
|
|
492
473
|
]
|
|
493
474
|
})]
|
|
494
475
|
});
|
|
495
|
-
},
|
|
476
|
+
}, he = ({ org: e, apps: t, onNavigate: r, canCreateApps: i }) => {
|
|
496
477
|
let { t: a } = B(), o = (e, t) => {
|
|
497
478
|
let n = a(e);
|
|
498
479
|
return n === e ? t : n;
|
|
@@ -511,7 +492,7 @@ var J = {
|
|
|
511
492
|
}), i ? /* @__PURE__ */ z("button", {
|
|
512
493
|
onClick: () => r(c),
|
|
513
494
|
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",
|
|
514
|
-
children: [/* @__PURE__ */ R(
|
|
495
|
+
children: [/* @__PURE__ */ R(P, { size: 16 }), l]
|
|
515
496
|
}) : null]
|
|
516
497
|
}), t.length > 0 ? /* @__PURE__ */ R("div", {
|
|
517
498
|
className: "space-y-2",
|
|
@@ -527,11 +508,11 @@ var J = {
|
|
|
527
508
|
action: i ? /* @__PURE__ */ z("button", {
|
|
528
509
|
onClick: () => r(c),
|
|
529
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",
|
|
530
|
-
children: [/* @__PURE__ */ R(
|
|
511
|
+
children: [/* @__PURE__ */ R(P, { size: 16 }), l]
|
|
531
512
|
}) : void 0
|
|
532
513
|
})]
|
|
533
514
|
});
|
|
534
|
-
},
|
|
515
|
+
}, ge = ({ members: e, onNavigate: n, orgId: r, canInviteMembers: i }) => {
|
|
535
516
|
let { t: a } = B(), o = (e, t) => {
|
|
536
517
|
let n = a(e);
|
|
537
518
|
return n === e ? t : n;
|
|
@@ -550,7 +531,7 @@ var J = {
|
|
|
550
531
|
}), i ? /* @__PURE__ */ z("button", {
|
|
551
532
|
onClick: () => n(`/organizations/${r}/members`),
|
|
552
533
|
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",
|
|
553
|
-
children: [/* @__PURE__ */ R(
|
|
534
|
+
children: [/* @__PURE__ */ R(P, { size: 16 }), o("devportal.inviteMember", "Invite Member")]
|
|
554
535
|
}) : null]
|
|
555
536
|
}), /* @__PURE__ */ R(_, {
|
|
556
537
|
data: e,
|
|
@@ -586,7 +567,7 @@ var J = {
|
|
|
586
567
|
]
|
|
587
568
|
})]
|
|
588
569
|
});
|
|
589
|
-
},
|
|
570
|
+
}, _e = ({ org: e, pickupAddresses: n, pickupAddressesLoading: r, refetchPickupAddresses: i, focusFulfillment: a, onFocusFulfillmentHandled: o }) => {
|
|
590
571
|
let [s, d] = E(!1);
|
|
591
572
|
T(() => {
|
|
592
573
|
if (!a) return;
|
|
@@ -614,17 +595,17 @@ var J = {
|
|
|
614
595
|
}), [w, ae] = E({
|
|
615
596
|
taxId: e.taxId ?? "",
|
|
616
597
|
taxCountry: e.taxCountry ?? ""
|
|
617
|
-
}), { locations: D, refetch: oe } = ne(), [
|
|
598
|
+
}), { locations: D, refetch: oe } = ne(), [O, se] = E(!1), [A, j] = E(null), [M, F] = E(null), [de, I] = E(null), [V, H] = E(null), [pe, K] = E(null), [Y, X] = E(null), [Z, he] = E("manual"), [ge, _e] = E(!1), [ve, ye] = E(""), [be, xe] = E(""), [Se, Ce] = E(""), [we, Te] = E(null), [Ee, De] = E(!1), Q = we ?? {
|
|
618
599
|
verificationMethod: e.verificationMethod,
|
|
619
600
|
verificationRequestedAt: e.verificationRequestedAt,
|
|
620
601
|
verificationStatus: e.verificationStatus,
|
|
621
602
|
verificationRequestNotes: e.verificationRequestNotes,
|
|
622
603
|
verificationRejectedReason: e.verificationRejectedReason
|
|
623
|
-
},
|
|
624
|
-
g.contactEmail.trim() ?
|
|
625
|
-
let
|
|
626
|
-
|
|
627
|
-
let ke =
|
|
604
|
+
}, $ = [];
|
|
605
|
+
g.contactEmail.trim() ? me(g.contactEmail) || $.push(h("devportal.contactEmailInvalid", "Contact email must be valid")) : $.push(h("devportal.contactEmailRequired", "Contact email is required")), g.supportEmail.trim() && !me(g.supportEmail) && $.push(h("devportal.supportEmailInvalid", "Support email must be valid")), g.websiteUrl.trim() ? J(g.websiteUrl) || $.push(h("devportal.websiteInvalid", "Website URL must be valid")) : $.push(h("devportal.websiteRequired", "Website URL is required")), b.legalEntityName.trim() || $.push(h("devportal.legalEntityNameRequired", "Legal entity name is required")), b.legalEntityType.trim() || $.push(h("devportal.legalEntityTypeRequired", "Entity type is required")), w.taxId.trim() || $.push(h("devportal.taxIdRequired", "Tax ID is required")), w.taxCountry.trim() ? /^[A-Za-z]{2}$/.test(w.taxCountry.trim()) || $.push(h("devportal.taxCountryInvalid", "Tax country must be a 2-letter code")) : $.push(h("devportal.taxCountryRequired", "Tax country is required"));
|
|
606
|
+
let Oe = [];
|
|
607
|
+
Z === "domain" && !q(Se.trim()) && Oe.push(h("devportal.verification.errors.domainRequired", "Enter a valid domain like burdenoff.com")), Z === "document" && !J(be.trim()) && Oe.push(h("devportal.verification.errors.evidenceUrlRequired", "Enter a valid evidence URL starting with http:// or https://")), Z === "manual" && !ve.trim() && Oe.push(h("devportal.verification.errors.notesRequired", "Add notes so the reviewer knows what to verify"));
|
|
608
|
+
let ke = $.length === 0 && Oe.length === 0 && !Ee && m, [Ae, { loading: je }] = u({ refetchQueries: ["GetOrganization"] }), [Me, { loading: Ne }] = c({ refetchQueries: ["GetOrganization"] }), [Pe, { loading: Fe }] = l({ refetchQueries: ["GetOrganization"] });
|
|
628
609
|
T(() => {
|
|
629
610
|
_({
|
|
630
611
|
name: e.name,
|
|
@@ -642,14 +623,14 @@ var J = {
|
|
|
642
623
|
taxCountry: e.taxCountry ?? ""
|
|
643
624
|
});
|
|
644
625
|
}, [e.id]), T(() => {
|
|
645
|
-
e.id &&
|
|
626
|
+
e.id && W({
|
|
646
627
|
gateway: "global",
|
|
647
|
-
query:
|
|
628
|
+
query: fe,
|
|
648
629
|
variables: { id: e.id }
|
|
649
|
-
}).then((e) =>
|
|
650
|
-
}, [e.id,
|
|
630
|
+
}).then((e) => Te(e.data?.developerOrganization ?? null)).catch(() => Te(null));
|
|
631
|
+
}, [e.id, ge]);
|
|
651
632
|
let Ie = async () => {
|
|
652
|
-
|
|
633
|
+
X(null), K(null);
|
|
653
634
|
try {
|
|
654
635
|
await Ae({ variables: {
|
|
655
636
|
id: e.id,
|
|
@@ -662,12 +643,12 @@ var J = {
|
|
|
662
643
|
logoUrl: g.logoUrl.trim() || null,
|
|
663
644
|
bannerUrl: g.bannerUrl.trim() || null
|
|
664
645
|
}
|
|
665
|
-
} }),
|
|
646
|
+
} }), K(h("devportal.organizationUpdated", "Organization details updated"));
|
|
666
647
|
} catch (e) {
|
|
667
|
-
|
|
648
|
+
X(e instanceof Error ? e.message : h("devportal.failedToUpdateOrganization", "Failed to update organization"));
|
|
668
649
|
}
|
|
669
650
|
}, Le = async () => {
|
|
670
|
-
|
|
651
|
+
X(null), K(null);
|
|
671
652
|
try {
|
|
672
653
|
await Me({ variables: {
|
|
673
654
|
id: e.id,
|
|
@@ -675,12 +656,12 @@ var J = {
|
|
|
675
656
|
legalEntityName: b.legalEntityName.trim() || null,
|
|
676
657
|
legalEntityType: b.legalEntityType.trim() || null
|
|
677
658
|
}
|
|
678
|
-
} }),
|
|
659
|
+
} }), K(h("devportal.legalInfoUpdated", "Legal information updated"));
|
|
679
660
|
} catch (e) {
|
|
680
|
-
|
|
661
|
+
X(e instanceof Error ? e.message : h("devportal.failedToUpdateLegalInfo", "Failed to update legal information"));
|
|
681
662
|
}
|
|
682
663
|
}, Re = async () => {
|
|
683
|
-
|
|
664
|
+
X(null), K(null);
|
|
684
665
|
try {
|
|
685
666
|
await Pe({ variables: {
|
|
686
667
|
id: e.id,
|
|
@@ -688,51 +669,51 @@ var J = {
|
|
|
688
669
|
taxId: w.taxId.trim() || null,
|
|
689
670
|
taxCountry: w.taxCountry.trim() || null
|
|
690
671
|
}
|
|
691
|
-
} }),
|
|
672
|
+
} }), K(h("devportal.taxInfoUpdated", "Tax information updated"));
|
|
692
673
|
} catch (e) {
|
|
693
|
-
|
|
674
|
+
X(e instanceof Error ? e.message : h("devportal.failedToUpdateTaxInfo", "Failed to update tax information"));
|
|
694
675
|
}
|
|
695
676
|
}, ze = async (e) => {
|
|
696
|
-
H(null), I(null),
|
|
677
|
+
H(null), I(null), F(e);
|
|
697
678
|
try {
|
|
698
|
-
let t = await
|
|
679
|
+
let t = await W({
|
|
699
680
|
gateway: "global",
|
|
700
681
|
query: "\n mutation DevportalSetDefaultPickupAddress($id: ID!) {\n setDefaultPickupAddress(id: $id) {\n id\n }\n }\n ",
|
|
701
682
|
variables: { id: e }
|
|
702
683
|
});
|
|
703
684
|
if (t.errors?.length) throw Error(t.errors[0]?.message ?? "Failed to switch pickup address");
|
|
704
|
-
|
|
685
|
+
U(), i(), I(h("devportal.pickupAddressSetActive", "Pickup address updated"));
|
|
705
686
|
} catch (e) {
|
|
706
687
|
H(e instanceof Error ? e.message : h("devportal.failedToSwitchPickupAddress", "Failed to switch pickup address"));
|
|
707
688
|
} finally {
|
|
708
|
-
|
|
689
|
+
F(null);
|
|
709
690
|
}
|
|
710
691
|
}, Be = async (e) => {
|
|
711
|
-
H(null), I(null),
|
|
692
|
+
H(null), I(null), F(e);
|
|
712
693
|
try {
|
|
713
|
-
let t = await
|
|
694
|
+
let t = await W({
|
|
714
695
|
gateway: "global",
|
|
715
696
|
query: "\n mutation DevportalRemoveOrgPickupAddress($id: ID!) {\n removeDeveloperOrgPickupAddress(id: $id)\n }\n ",
|
|
716
697
|
variables: { id: e }
|
|
717
698
|
});
|
|
718
699
|
if (t.errors?.length) throw Error(t.errors[0]?.message ?? "Failed to remove pickup address");
|
|
719
|
-
|
|
700
|
+
U(), i(), I(h("devportal.pickupAddressRemoved", "Pickup address removed"));
|
|
720
701
|
} catch (e) {
|
|
721
702
|
H(e instanceof Error ? e.message : h("devportal.failedToRemovePickupAddress", "Failed to remove pickup address"));
|
|
722
703
|
} finally {
|
|
723
|
-
|
|
704
|
+
F(null), j(null);
|
|
724
705
|
}
|
|
725
706
|
};
|
|
726
707
|
return /* @__PURE__ */ z("div", {
|
|
727
708
|
className: "space-y-6 max-w-2xl",
|
|
728
709
|
children: [
|
|
729
|
-
|
|
710
|
+
Y && /* @__PURE__ */ R("div", {
|
|
730
711
|
className: "rounded-md border border-status-error-bg bg-status-error-bg-subtle px-4 py-3 text-sm text-status-error-text",
|
|
731
|
-
children:
|
|
712
|
+
children: Y
|
|
732
713
|
}),
|
|
733
|
-
|
|
714
|
+
pe && /* @__PURE__ */ R("div", {
|
|
734
715
|
className: "rounded-md border border-status-success-bg bg-status-success-bg-subtle px-4 py-3 text-sm text-status-success-text",
|
|
735
|
-
children:
|
|
716
|
+
children: pe
|
|
736
717
|
}),
|
|
737
718
|
/* @__PURE__ */ R(f, {
|
|
738
719
|
title: h("devportal.organizationDetails", "Organization Details"),
|
|
@@ -854,10 +835,10 @@ var J = {
|
|
|
854
835
|
disabled: !m || je,
|
|
855
836
|
onClick: () => void Ie(),
|
|
856
837
|
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",
|
|
857
|
-
children: [je ? /* @__PURE__ */ R(
|
|
838
|
+
children: [je ? /* @__PURE__ */ R(N, {
|
|
858
839
|
size: 14,
|
|
859
840
|
className: "animate-spin"
|
|
860
|
-
}) : /* @__PURE__ */ R(
|
|
841
|
+
}) : /* @__PURE__ */ R(ce, { size: 14 }), h("devportal.saveChanges", "Save Changes")]
|
|
861
842
|
})
|
|
862
843
|
})
|
|
863
844
|
]
|
|
@@ -917,7 +898,7 @@ var J = {
|
|
|
917
898
|
value: e.taxFormType ? e.taxFormVerified ? /* @__PURE__ */ z("span", {
|
|
918
899
|
className: "text-status-success-text flex items-center gap-1",
|
|
919
900
|
children: [
|
|
920
|
-
/* @__PURE__ */ R(
|
|
901
|
+
/* @__PURE__ */ R(k, { size: 14 }),
|
|
921
902
|
" ",
|
|
922
903
|
h("devportal.verified", "Verified")
|
|
923
904
|
]
|
|
@@ -930,7 +911,7 @@ var J = {
|
|
|
930
911
|
disabled: !m || Ne,
|
|
931
912
|
onClick: () => void Le(),
|
|
932
913
|
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",
|
|
933
|
-
children: [Ne ? /* @__PURE__ */ R(
|
|
914
|
+
children: [Ne ? /* @__PURE__ */ R(N, {
|
|
934
915
|
size: 14,
|
|
935
916
|
className: "animate-spin"
|
|
936
917
|
}) : null, h("devportal.saveLegalInfo", "Save Legal Info")]
|
|
@@ -939,7 +920,7 @@ var J = {
|
|
|
939
920
|
disabled: !m || Fe,
|
|
940
921
|
onClick: () => void Re(),
|
|
941
922
|
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",
|
|
942
|
-
children: [Fe ? /* @__PURE__ */ R(
|
|
923
|
+
children: [Fe ? /* @__PURE__ */ R(N, {
|
|
943
924
|
size: 14,
|
|
944
925
|
className: "animate-spin"
|
|
945
926
|
}) : null, h("devportal.saveTaxInfo", "Save Tax Info")]
|
|
@@ -959,9 +940,9 @@ var J = {
|
|
|
959
940
|
className: "rounded-md border border-status-error-bg bg-status-error-bg-subtle px-4 py-3 text-sm text-status-error-text",
|
|
960
941
|
children: V
|
|
961
942
|
}),
|
|
962
|
-
|
|
943
|
+
de && /* @__PURE__ */ R("div", {
|
|
963
944
|
className: "rounded-md border border-status-success-bg bg-status-success-bg-subtle px-4 py-3 text-sm text-status-success-text",
|
|
964
|
-
children:
|
|
945
|
+
children: de
|
|
965
946
|
}),
|
|
966
947
|
!r && n.length === 0 && /* @__PURE__ */ z("div", {
|
|
967
948
|
className: "rounded-md border border-border-seam bg-bg-sunken p-4",
|
|
@@ -976,7 +957,7 @@ var J = {
|
|
|
976
957
|
n.length > 0 && /* @__PURE__ */ R("div", {
|
|
977
958
|
className: "grid grid-cols-1 gap-3 sm:grid-cols-2",
|
|
978
959
|
children: n.map((e) => {
|
|
979
|
-
let n = D.some((t) => t.carrier === e.carrier && t.postalCode === e.postalCode), r =
|
|
960
|
+
let n = D.some((t) => t.carrier === e.carrier && t.postalCode === e.postalCode), r = M === e.id;
|
|
980
961
|
return /* @__PURE__ */ z("div", {
|
|
981
962
|
className: t("rounded-md border p-4", e.isDefault ? "border-status-success-border bg-status-success-bg-subtle" : "border-border-seam bg-bg-sunken"),
|
|
982
963
|
children: [
|
|
@@ -1024,9 +1005,9 @@ var J = {
|
|
|
1024
1005
|
}), /* @__PURE__ */ z("button", {
|
|
1025
1006
|
type: "button",
|
|
1026
1007
|
disabled: r,
|
|
1027
|
-
onClick: () =>
|
|
1008
|
+
onClick: () => j(e.id),
|
|
1028
1009
|
className: "flex items-center gap-1.5 text-sm text-status-error-text hover:underline disabled:opacity-50",
|
|
1029
|
-
children: [/* @__PURE__ */ R(
|
|
1010
|
+
children: [/* @__PURE__ */ R(ue, { className: "h-3.5 w-3.5" }), h("devportal.removePickupAddressCta", "Remove")]
|
|
1030
1011
|
})]
|
|
1031
1012
|
})
|
|
1032
1013
|
]
|
|
@@ -1037,14 +1018,14 @@ var J = {
|
|
|
1037
1018
|
className: "flex justify-end",
|
|
1038
1019
|
children: /* @__PURE__ */ z("button", {
|
|
1039
1020
|
type: "button",
|
|
1040
|
-
onClick: () =>
|
|
1021
|
+
onClick: () => se(!0),
|
|
1041
1022
|
className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
|
|
1042
|
-
children: [/* @__PURE__ */ R(
|
|
1023
|
+
children: [/* @__PURE__ */ R(P, { size: 14 }), h("devportal.addPickupAddressCta", "Add pickup address")]
|
|
1043
1024
|
})
|
|
1044
1025
|
}),
|
|
1045
|
-
|
|
1046
|
-
open:
|
|
1047
|
-
onOpenChange:
|
|
1026
|
+
O && /* @__PURE__ */ R(S, {
|
|
1027
|
+
open: O,
|
|
1028
|
+
onOpenChange: se,
|
|
1048
1029
|
organizationId: e.id,
|
|
1049
1030
|
carrier: "shiprocket",
|
|
1050
1031
|
onRegistered: () => {
|
|
@@ -1052,18 +1033,18 @@ var J = {
|
|
|
1052
1033
|
}
|
|
1053
1034
|
}),
|
|
1054
1035
|
/* @__PURE__ */ R(x, {
|
|
1055
|
-
open:
|
|
1036
|
+
open: A !== null,
|
|
1056
1037
|
onOpenChange: (e) => {
|
|
1057
|
-
e ||
|
|
1038
|
+
e || j(null);
|
|
1058
1039
|
},
|
|
1059
1040
|
variant: "danger",
|
|
1060
|
-
loading:
|
|
1041
|
+
loading: M === A,
|
|
1061
1042
|
title: h("devportal.removePickupAddressConfirmTitle", "Remove this pickup address?"),
|
|
1062
1043
|
description: h("devportal.removePickupAddressConfirmDesc", "We'll stop using it to quote and book shipments for this organization. Carriers like Shiprocket don't offer a way to delete an address from their own account once added, so it may still show up there, but it won't be used for your orders anymore."),
|
|
1063
1044
|
confirmLabel: h("devportal.remove", "Remove"),
|
|
1064
1045
|
cancelLabel: h("devportal.cancel", "Cancel"),
|
|
1065
1046
|
onConfirm: async () => {
|
|
1066
|
-
|
|
1047
|
+
A && await Be(A);
|
|
1067
1048
|
}
|
|
1068
1049
|
})
|
|
1069
1050
|
]
|
|
@@ -1073,61 +1054,61 @@ var J = {
|
|
|
1073
1054
|
title: h("devportal.verificationStatus", "Verification Status"),
|
|
1074
1055
|
children: [/* @__PURE__ */ R(v, { items: [{
|
|
1075
1056
|
label: h("devportal.verifiedLabel", "Verified"),
|
|
1076
|
-
value:
|
|
1057
|
+
value: Q.verificationStatus === "VERIFIED" ? /* @__PURE__ */ z("span", {
|
|
1077
1058
|
className: "text-status-success-text flex items-center gap-1",
|
|
1078
1059
|
children: [
|
|
1079
|
-
/* @__PURE__ */ R(
|
|
1060
|
+
/* @__PURE__ */ R(k, { size: 14 }),
|
|
1080
1061
|
" ",
|
|
1081
1062
|
h("devportal.verifiedVia", "Verified via"),
|
|
1082
1063
|
" ",
|
|
1083
|
-
|
|
1064
|
+
Q.verificationMethod
|
|
1084
1065
|
]
|
|
1085
|
-
}) :
|
|
1066
|
+
}) : Q.verificationStatus === "PENDING" ? h("devportal.pendingVerification", "Pending verification") : Q.verificationStatus === "REJECTED" ? h("devportal.verificationRejected", "Rejected") : h("devportal.notVerified", "Not verified")
|
|
1086
1067
|
}, {
|
|
1087
1068
|
label: h("devportal.certifiedLabel", "Certified"),
|
|
1088
1069
|
value: e.isCertified ? /* @__PURE__ */ z("span", {
|
|
1089
1070
|
className: "text-accent-blue flex items-center gap-1",
|
|
1090
1071
|
children: [
|
|
1091
|
-
/* @__PURE__ */ R(
|
|
1072
|
+
/* @__PURE__ */ R(le, { size: 14 }),
|
|
1092
1073
|
" ",
|
|
1093
1074
|
h("devportal.certifiedUntil", "Certified until"),
|
|
1094
1075
|
" ",
|
|
1095
1076
|
e.certificationExpiry ? new Date(e.certificationExpiry).toLocaleDateString() : "N/A"
|
|
1096
1077
|
]
|
|
1097
1078
|
}) : h("devportal.notCertified", "Not certified")
|
|
1098
|
-
}] }),
|
|
1079
|
+
}] }), Q.verificationStatus !== "VERIFIED" && /* @__PURE__ */ R("div", {
|
|
1099
1080
|
className: "mt-4 rounded-md border border-border-subtle p-4 space-y-3",
|
|
1100
|
-
children:
|
|
1081
|
+
children: ge ? /* @__PURE__ */ z("p", {
|
|
1101
1082
|
className: "text-sm text-status-success-text flex items-center gap-2",
|
|
1102
|
-
children: [/* @__PURE__ */ R(
|
|
1083
|
+
children: [/* @__PURE__ */ R(k, { size: 14 }), h("devportal.verificationRequested", "Verification request submitted. Our team will review and contact you.")]
|
|
1103
1084
|
}) : /* @__PURE__ */ z(L, { children: [
|
|
1104
1085
|
/* @__PURE__ */ R("p", {
|
|
1105
1086
|
className: "text-sm text-text-secondary",
|
|
1106
1087
|
children: h("devportal.requestVerificationHint", "Get your organization verified to build trust with users. Choose a verification method:")
|
|
1107
1088
|
}),
|
|
1108
|
-
|
|
1089
|
+
Q.verificationStatus === "PENDING" && /* @__PURE__ */ z("div", {
|
|
1109
1090
|
className: "rounded-md border border-border-subtle bg-bg-sunken/40 p-3 text-sm text-text-secondary",
|
|
1110
1091
|
children: [
|
|
1111
1092
|
h("devportal.pendingVerification", "Pending verification"),
|
|
1112
|
-
|
|
1113
|
-
|
|
1093
|
+
Q.verificationMethod ? ` · ${Q.verificationMethod}` : "",
|
|
1094
|
+
Q.verificationRequestNotes ? ` · ${Q.verificationRequestNotes}` : ""
|
|
1114
1095
|
]
|
|
1115
1096
|
}),
|
|
1116
|
-
|
|
1097
|
+
Q.verificationStatus === "REJECTED" && Q.verificationRejectedReason && /* @__PURE__ */ R("div", {
|
|
1117
1098
|
className: "rounded-md border border-status-error-border bg-status-error-bg-subtle p-3 text-sm text-status-error-text",
|
|
1118
|
-
children:
|
|
1099
|
+
children: Q.verificationRejectedReason
|
|
1119
1100
|
}),
|
|
1120
|
-
|
|
1101
|
+
$.length > 0 && /* @__PURE__ */ z("div", {
|
|
1121
1102
|
className: "rounded-md border border-border-subtle bg-bg-sunken/40 p-3 text-sm text-text-secondary",
|
|
1122
1103
|
children: [/* @__PURE__ */ R("div", {
|
|
1123
1104
|
className: "font-medium text-text-primary",
|
|
1124
1105
|
children: h("devportal.completeBeforeVerification", "Complete these details before submitting for review")
|
|
1125
1106
|
}), /* @__PURE__ */ R("ul", {
|
|
1126
1107
|
className: "mt-2 list-disc pl-5 space-y-1",
|
|
1127
|
-
children:
|
|
1108
|
+
children: $.map((e) => /* @__PURE__ */ R("li", { children: e }, e))
|
|
1128
1109
|
})]
|
|
1129
1110
|
}),
|
|
1130
|
-
|
|
1111
|
+
Q.verificationStatus !== "PENDING" && /* @__PURE__ */ z(L, { children: [
|
|
1131
1112
|
/* @__PURE__ */ R("div", {
|
|
1132
1113
|
className: "flex gap-2 flex-wrap",
|
|
1133
1114
|
children: [
|
|
@@ -1136,46 +1117,46 @@ var J = {
|
|
|
1136
1117
|
"manual"
|
|
1137
1118
|
].map((e) => /* @__PURE__ */ R("button", {
|
|
1138
1119
|
type: "button",
|
|
1139
|
-
onClick: () =>
|
|
1140
|
-
className: `rounded-md border px-3 py-1 text-xs font-medium transition-colors ${
|
|
1120
|
+
onClick: () => he(e),
|
|
1121
|
+
className: `rounded-md border px-3 py-1 text-xs font-medium transition-colors ${Z === e ? "bg-action-primary-bg text-action-primary-text border-primary" : "border-border-subtle hover:bg-bg-sunken"}`,
|
|
1141
1122
|
children: e === "domain" ? h("devportal.domainVerification", "Domain") : e === "document" ? h("devportal.documentVerification", "Document") : h("devportal.manualVerification", "Manual review")
|
|
1142
1123
|
}, e))
|
|
1143
1124
|
}),
|
|
1144
|
-
|
|
1125
|
+
Z === "domain" ? /* @__PURE__ */ R(y, {
|
|
1145
1126
|
label: h("devportal.domainVerification", "Domain"),
|
|
1146
|
-
value:
|
|
1147
|
-
onChange: (e) =>
|
|
1127
|
+
value: Se,
|
|
1128
|
+
onChange: (e) => Ce(e.target.value),
|
|
1148
1129
|
placeholder: "example.com"
|
|
1149
|
-
}) :
|
|
1130
|
+
}) : Z === "document" ? /* @__PURE__ */ R(y, {
|
|
1150
1131
|
label: h("devportal.evidenceUrl", "Evidence URL"),
|
|
1151
|
-
value:
|
|
1152
|
-
onChange: (e) =>
|
|
1132
|
+
value: be,
|
|
1133
|
+
onChange: (e) => xe(e.target.value),
|
|
1153
1134
|
placeholder: "https://..."
|
|
1154
1135
|
}) : null,
|
|
1155
1136
|
/* @__PURE__ */ R(ee, {
|
|
1156
1137
|
label: h("devportal.notes", "Notes"),
|
|
1157
|
-
value:
|
|
1158
|
-
onChange: (e) =>
|
|
1138
|
+
value: ve,
|
|
1139
|
+
onChange: (e) => ye(e.target.value),
|
|
1159
1140
|
placeholder: "What should reviewers validate?"
|
|
1160
1141
|
}),
|
|
1161
1142
|
/* @__PURE__ */ z("button", {
|
|
1162
1143
|
type: "button",
|
|
1163
1144
|
disabled: !ke,
|
|
1164
1145
|
onClick: () => void (async () => {
|
|
1165
|
-
let t =
|
|
1166
|
-
if (
|
|
1167
|
-
|
|
1146
|
+
let t = Se.trim(), n = be.trim(), r = ve.trim();
|
|
1147
|
+
if (Z === "domain" && !q(t)) {
|
|
1148
|
+
X(h("devportal.verification.errors.domainRequired", "Enter a valid domain like burdenoff.com"));
|
|
1168
1149
|
return;
|
|
1169
1150
|
}
|
|
1170
|
-
if (
|
|
1171
|
-
|
|
1151
|
+
if (Z === "document" && !J(n)) {
|
|
1152
|
+
X(h("devportal.verification.errors.evidenceUrlRequired", "Enter a valid evidence URL starting with http:// or https://"));
|
|
1172
1153
|
return;
|
|
1173
1154
|
}
|
|
1174
|
-
if (
|
|
1175
|
-
|
|
1155
|
+
if (Z === "manual" && !r) {
|
|
1156
|
+
X(h("devportal.verification.errors.notesRequired", "Add notes so the reviewer knows what to verify"));
|
|
1176
1157
|
return;
|
|
1177
1158
|
}
|
|
1178
|
-
|
|
1159
|
+
X(null), K(null), De(!0);
|
|
1179
1160
|
try {
|
|
1180
1161
|
await Ae({ variables: {
|
|
1181
1162
|
id: e.id,
|
|
@@ -1201,34 +1182,34 @@ var J = {
|
|
|
1201
1182
|
taxCountry: w.taxCountry.trim() || null
|
|
1202
1183
|
}
|
|
1203
1184
|
} });
|
|
1204
|
-
let i = await
|
|
1185
|
+
let i = await W({
|
|
1205
1186
|
gateway: "global",
|
|
1206
|
-
query:
|
|
1187
|
+
query: G,
|
|
1207
1188
|
variables: {
|
|
1208
1189
|
id: e.id,
|
|
1209
|
-
method:
|
|
1190
|
+
method: Z,
|
|
1210
1191
|
notes: r || null,
|
|
1211
|
-
evidenceUrl:
|
|
1212
|
-
domain:
|
|
1192
|
+
evidenceUrl: Z === "domain" ? null : n || null,
|
|
1193
|
+
domain: Z === "domain" && t || null
|
|
1213
1194
|
}
|
|
1214
1195
|
});
|
|
1215
1196
|
if (i.errors?.length) throw Error(i.errors[0]?.message || "Verification request failed");
|
|
1216
|
-
|
|
1197
|
+
_e(!0), K(h("devportal.verificationRequested", "Verification request submitted. Our team will review and contact you.")), Te((await W({
|
|
1217
1198
|
gateway: "global",
|
|
1218
|
-
query:
|
|
1199
|
+
query: fe,
|
|
1219
1200
|
variables: { id: e.id }
|
|
1220
1201
|
})).data?.developerOrganization ?? null);
|
|
1221
1202
|
} catch (e) {
|
|
1222
|
-
|
|
1203
|
+
X(e instanceof Error ? e.message : h("devportal.verificationRequestFailed", "Verification request failed"));
|
|
1223
1204
|
} finally {
|
|
1224
|
-
|
|
1205
|
+
De(!1);
|
|
1225
1206
|
}
|
|
1226
1207
|
})(),
|
|
1227
1208
|
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",
|
|
1228
|
-
children: [
|
|
1209
|
+
children: [Ee ? /* @__PURE__ */ R(N, {
|
|
1229
1210
|
size: 14,
|
|
1230
1211
|
className: "animate-spin"
|
|
1231
|
-
}) : /* @__PURE__ */ R(
|
|
1212
|
+
}) : /* @__PURE__ */ R(le, { size: 14 }), h("devportal.requestVerification", "Request Verification")]
|
|
1232
1213
|
})
|
|
1233
1214
|
] })
|
|
1234
1215
|
] })
|
|
@@ -1238,6 +1219,6 @@ var J = {
|
|
|
1238
1219
|
});
|
|
1239
1220
|
};
|
|
1240
1221
|
//#endregion
|
|
1241
|
-
export {
|
|
1222
|
+
export { X as OrganizationDetailPage };
|
|
1242
1223
|
|
|
1243
1224
|
//# sourceMappingURL=OrganizationDetailPage.js.map
|