@burdenoff/microfe-devportal 2026.915.6 → 2026.915.7
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/components/RegisterPickupLocationModal.d.ts.map +1 -1
- package/dist/devportal/components/RegisterPickupLocationModal.js +3 -1
- package/dist/devportal/components/RegisterPickupLocationModal.js.map +1 -1
- package/dist/devportal/components/ReportOrderIssueModal.d.ts.map +1 -1
- package/dist/devportal/components/ReportOrderIssueModal.js.map +1 -1
- package/dist/devportal/pages/CreateOrganizationPage.d.ts.map +1 -1
- package/dist/devportal/pages/CreateOrganizationPage.js +236 -160
- package/dist/devportal/pages/CreateOrganizationPage.js.map +1 -1
- package/dist/devportal/pages/OrganizationDetailPage.d.ts.map +1 -1
- package/dist/devportal/pages/OrganizationDetailPage.js +330 -316
- package/dist/devportal/pages/OrganizationDetailPage.js.map +1 -1
- package/package.json +1 -1
|
@@ -9,20 +9,21 @@ import { AppListItem as p } from "../components/AppCard.js";
|
|
|
9
9
|
import { StatCard as m, StatCardGrid as h } from "../components/StatCard.js";
|
|
10
10
|
import { DataTable as g, DetailList as _ } from "../components/DataTable.js";
|
|
11
11
|
import { InputField as v, TextareaField as y } from "../components/FormField.js";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
12
|
+
import { ConfirmDialog as ee } from "../components/ConfirmDialog.js";
|
|
13
|
+
import { RegisterPickupLocationModal as te } from "../components/RegisterPickupLocationModal.js";
|
|
14
|
+
import { useDevportalPermission as b } from "../hooks/usePermission.js";
|
|
15
|
+
import { capitalizeCarrierName as x, useCarrierPickupLocations as ne } from "../hooks/useCarrierPickupLocations.js";
|
|
16
|
+
import { DEVPORTAL_PERMISSIONS as S } from "../constants/permissions.js";
|
|
17
|
+
import { useEffect as C, useState as w } from "react";
|
|
18
|
+
import { AlertCircle as re, AppWindow as T, ArrowRight as E, BarChart3 as D, Building2 as O, CheckCircle as k, DollarSign as A, ExternalLink as j, Loader2 as M, Plus as N, Settings as P, Shield as F, Trash2 as ie, TrendingUp as I, Users as L } from "lucide-react";
|
|
19
|
+
import { useParams as ae } from "react-router";
|
|
20
|
+
import { Fragment as R, jsx as z, jsxs as B } from "react/jsx-runtime";
|
|
21
|
+
import { useI18n as V } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
22
|
+
import { EmphasisPanel as H, NextSteps as oe } from "@burdenoff/fe-libs/ui";
|
|
23
|
+
import { graphqlFetch as U } from "@burdenoff/fe-libs/shared/graphql";
|
|
23
24
|
//#region src/devportal/pages/OrganizationDetailPage.tsx
|
|
24
|
-
var
|
|
25
|
-
function
|
|
25
|
+
var se = "\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", ce = "\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";
|
|
26
|
+
function W(e) {
|
|
26
27
|
let t = e;
|
|
27
28
|
return {
|
|
28
29
|
id: e.id,
|
|
@@ -79,7 +80,7 @@ function G(e) {
|
|
|
79
80
|
updatedAt: e.updatedAt
|
|
80
81
|
};
|
|
81
82
|
}
|
|
82
|
-
function
|
|
83
|
+
function le(e) {
|
|
83
84
|
return {
|
|
84
85
|
id: e.id,
|
|
85
86
|
organizationId: e.organizationId,
|
|
@@ -98,11 +99,11 @@ function oe(e) {
|
|
|
98
99
|
updatedAt: e.updatedAt
|
|
99
100
|
};
|
|
100
101
|
}
|
|
101
|
-
function
|
|
102
|
+
function ue(e) {
|
|
102
103
|
let t = e.trim().toLowerCase();
|
|
103
104
|
return /^[a-z0-9.-]+\.[a-z]{2,}$/i.test(t) && !t.includes("@");
|
|
104
105
|
}
|
|
105
|
-
function
|
|
106
|
+
function G(e) {
|
|
106
107
|
try {
|
|
107
108
|
let t = new URL(e.trim());
|
|
108
109
|
return t.protocol === "http:" || t.protocol === "https:";
|
|
@@ -110,39 +111,39 @@ function K(e) {
|
|
|
110
111
|
return !1;
|
|
111
112
|
}
|
|
112
113
|
}
|
|
113
|
-
function
|
|
114
|
+
function de(e) {
|
|
114
115
|
let t = e.trim();
|
|
115
116
|
return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t);
|
|
116
117
|
}
|
|
117
|
-
var
|
|
118
|
+
var K = {
|
|
118
119
|
VIEWER: 0,
|
|
119
120
|
DEVELOPER: 1,
|
|
120
121
|
ADMIN: 2,
|
|
121
122
|
OWNER: 3
|
|
122
|
-
},
|
|
123
|
-
let { navigate: n, basePath: s, setActiveOrgId: c, setActivePhysicalOrgId: l, currentUser: d } = e(), f = i(), { orgId: p } =
|
|
123
|
+
}, fe = () => {
|
|
124
|
+
let { navigate: n, basePath: s, setActiveOrgId: c, setActivePhysicalOrgId: l, currentUser: d } = e(), f = i(), { orgId: p } = ae(), { t: m } = V(), h = (e, t) => {
|
|
124
125
|
let n = m(e);
|
|
125
126
|
return n === e ? t : n;
|
|
126
|
-
}, [g, _] =
|
|
127
|
+
}, [g, _] = w("overview"), v = [
|
|
127
128
|
{
|
|
128
129
|
id: "overview",
|
|
129
130
|
label: h("devportal.overview", "Overview"),
|
|
130
|
-
icon:
|
|
131
|
+
icon: O
|
|
131
132
|
},
|
|
132
133
|
{
|
|
133
134
|
id: "apps",
|
|
134
135
|
label: h("devportal.applications", "Applications"),
|
|
135
|
-
icon:
|
|
136
|
+
icon: T
|
|
136
137
|
},
|
|
137
138
|
{
|
|
138
139
|
id: "members",
|
|
139
140
|
label: h("devportal.members", "Members"),
|
|
140
|
-
icon:
|
|
141
|
+
icon: L
|
|
141
142
|
},
|
|
142
143
|
{
|
|
143
144
|
id: "settings",
|
|
144
145
|
label: h("devportal.settings", "Settings"),
|
|
145
|
-
icon:
|
|
146
|
+
icon: P
|
|
146
147
|
}
|
|
147
148
|
], { data: y, previousData: ee, loading: te, error: b } = o({
|
|
148
149
|
variables: { id: p },
|
|
@@ -154,228 +155,228 @@ var q = {
|
|
|
154
155
|
},
|
|
155
156
|
skip: !p,
|
|
156
157
|
fetchPolicy: "cache-and-network"
|
|
157
|
-
}),
|
|
158
|
+
}), S = (x?.developerOrganization?.members ?? []).map(le), E = (d ? S.find((e) => e.userId === d.id) : void 0)?.role, D = E !== void 0 && K[E] >= K.DEVELOPER, k = E !== void 0 && K[E] >= K.ADMIN, j = k, F = k, ie = v.filter((e) => e.id !== "settings" || k), I = (e) => {
|
|
158
159
|
n?.(`${s}${e}`);
|
|
159
160
|
};
|
|
160
|
-
if (
|
|
161
|
+
if (C(() => {
|
|
161
162
|
p && (f ? l(p) : c(p));
|
|
162
163
|
}, [
|
|
163
164
|
p,
|
|
164
165
|
f,
|
|
165
166
|
c,
|
|
166
167
|
l
|
|
167
|
-
]),
|
|
168
|
-
g === "settings" && !
|
|
169
|
-
}, [g,
|
|
168
|
+
]), C(() => {
|
|
169
|
+
g === "settings" && !k && _("overview");
|
|
170
|
+
}, [g, k]), C(() => {
|
|
170
171
|
let e = x?.developerOrganization?.name;
|
|
171
172
|
if (!p || !e) return;
|
|
172
173
|
let t = window.__breadcrumbRegistry;
|
|
173
174
|
return t?.register(p, e), () => t?.unregister(p);
|
|
174
|
-
}, [p, y?.developerOrganization?.name]), te && !x) return /* @__PURE__ */
|
|
175
|
+
}, [p, y?.developerOrganization?.name]), te && !x) return /* @__PURE__ */ z(u, {
|
|
175
176
|
title: h("devportal.loadingDots", "Loading..."),
|
|
176
177
|
backLink: `${s}${r(f)}`,
|
|
177
178
|
backLabel: h("devportal.backToOrganizations", "Back to Organizations"),
|
|
178
|
-
children: /* @__PURE__ */
|
|
179
|
+
children: /* @__PURE__ */ z("div", {
|
|
179
180
|
className: "flex items-center justify-center py-12",
|
|
180
|
-
children: /* @__PURE__ */
|
|
181
|
+
children: /* @__PURE__ */ z(M, { className: "h-8 w-8 animate-spin text-text-secondary" })
|
|
181
182
|
})
|
|
182
183
|
});
|
|
183
|
-
if (b || !x?.developerOrganization) return /* @__PURE__ */
|
|
184
|
+
if (b || !x?.developerOrganization) return /* @__PURE__ */ z(u, {
|
|
184
185
|
title: h("devportal.organizationNotFound", "Organization Not Found"),
|
|
185
186
|
backLink: `${s}${r(f)}`,
|
|
186
187
|
backLabel: h("devportal.backToOrganizations", "Back to Organizations"),
|
|
187
|
-
children: /* @__PURE__ */
|
|
188
|
+
children: /* @__PURE__ */ B("div", {
|
|
188
189
|
className: "flex flex-col items-center justify-center py-12 gap-4",
|
|
189
190
|
children: [
|
|
190
|
-
/* @__PURE__ */
|
|
191
|
-
/* @__PURE__ */
|
|
191
|
+
/* @__PURE__ */ z(re, { className: "h-12 w-12 text-status-error-text" }),
|
|
192
|
+
/* @__PURE__ */ z("h2", {
|
|
192
193
|
className: "text-lg font-semibold",
|
|
193
194
|
children: h("devportal.organizationNotFoundLower", "Organization not found")
|
|
194
195
|
}),
|
|
195
|
-
/* @__PURE__ */
|
|
196
|
+
/* @__PURE__ */ z("p", {
|
|
196
197
|
className: "text-text-secondary",
|
|
197
198
|
children: b?.message || h("devportal.organizationNotFoundDescription", "The organization you're looking for doesn't exist or you don't have access to it.")
|
|
198
199
|
}),
|
|
199
|
-
/* @__PURE__ */
|
|
200
|
-
onClick: () =>
|
|
200
|
+
/* @__PURE__ */ z("button", {
|
|
201
|
+
onClick: () => I(r(f)),
|
|
201
202
|
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",
|
|
202
203
|
children: h("devportal.backToOrganizations", "Back to Organizations")
|
|
203
204
|
})
|
|
204
205
|
]
|
|
205
206
|
})
|
|
206
207
|
});
|
|
207
|
-
let
|
|
208
|
-
return /* @__PURE__ */
|
|
209
|
-
title:
|
|
210
|
-
description:
|
|
208
|
+
let R = W(x.developerOrganization), H = S, U = ne?.applications?.edges?.map((e) => e.node) ?? [];
|
|
209
|
+
return /* @__PURE__ */ B(u, {
|
|
210
|
+
title: R.name,
|
|
211
|
+
description: R.description,
|
|
211
212
|
purpose: h("devportal.orgDetailPurpose", "This is the home for one organization — the apps it owns, the people who can work on them, and its store and billing settings. Invite teammates, add apps, and verify the org so your published listings look trustworthy."),
|
|
212
213
|
backLink: `${s}${r(f)}`,
|
|
213
214
|
backLabel: h("devportal.backToOrganizations", "Back to Organizations"),
|
|
214
|
-
actions: /* @__PURE__ */
|
|
215
|
+
actions: /* @__PURE__ */ z("div", {
|
|
215
216
|
className: "flex items-center gap-2",
|
|
216
|
-
children:
|
|
217
|
-
onClick: () => n?.(`/billing/earnings?developerOrgId=${encodeURIComponent(
|
|
217
|
+
children: j ? /* @__PURE__ */ B("button", {
|
|
218
|
+
onClick: () => n?.(`/billing/earnings?developerOrgId=${encodeURIComponent(R.id)}&developerOrgName=${encodeURIComponent(R.name)}`),
|
|
218
219
|
className: "inline-flex items-center gap-2 rounded-md border px-4 py-2 text-sm font-medium hover:bg-bg-sunken transition-colors",
|
|
219
|
-
children: [/* @__PURE__ */
|
|
220
|
+
children: [/* @__PURE__ */ z(A, { size: 16 }), h("devportal.revenue", "Revenue")]
|
|
220
221
|
}) : null
|
|
221
222
|
}),
|
|
222
223
|
children: [
|
|
223
|
-
/* @__PURE__ */
|
|
224
|
+
/* @__PURE__ */ z("div", {
|
|
224
225
|
className: "border-b",
|
|
225
|
-
children: /* @__PURE__ */
|
|
226
|
+
children: /* @__PURE__ */ z("nav", {
|
|
226
227
|
className: "-mb-px flex gap-4 overflow-x-auto",
|
|
227
228
|
role: "tablist",
|
|
228
229
|
"aria-label": h("devportal.organizationSections", "Organization sections"),
|
|
229
|
-
children:
|
|
230
|
+
children: ie.map((e) => {
|
|
230
231
|
let n = e.icon;
|
|
231
|
-
return /* @__PURE__ */
|
|
232
|
+
return /* @__PURE__ */ B("button", {
|
|
232
233
|
id: `organization-tab-${e.id}`,
|
|
233
234
|
role: "tab",
|
|
234
235
|
"aria-selected": g === e.id,
|
|
235
236
|
"aria-controls": `organization-panel-${e.id}`,
|
|
236
237
|
onClick: () => _(e.id),
|
|
237
238
|
className: t("flex items-center gap-2 border-b-2 px-1 py-3 text-sm font-medium transition-colors", g === e.id ? "border-primary text-primary" : "border-transparent text-text-secondary hover:text-text-primary hover:border-muted-foreground"),
|
|
238
|
-
children: [/* @__PURE__ */
|
|
239
|
+
children: [/* @__PURE__ */ z(n, { size: 16 }), e.label]
|
|
239
240
|
}, e.id);
|
|
240
241
|
})
|
|
241
242
|
})
|
|
242
243
|
}),
|
|
243
|
-
/* @__PURE__ */
|
|
244
|
+
/* @__PURE__ */ z(oe, {
|
|
244
245
|
className: "mt-6",
|
|
245
|
-
storageKey: `devportal-org-${
|
|
246
|
+
storageKey: `devportal-org-${R.id}`,
|
|
246
247
|
steps: [
|
|
247
248
|
...F ? [{
|
|
248
249
|
id: "invite-members",
|
|
249
250
|
label: h("devportal.inviteMembers", "Invite members"),
|
|
250
251
|
description: h("devportal.orgStepInvite", "Add teammates so they can build alongside you"),
|
|
251
|
-
icon: /* @__PURE__ */
|
|
252
|
+
icon: /* @__PURE__ */ z(L, { size: 16 }),
|
|
252
253
|
onClick: () => _("members")
|
|
253
254
|
}] : [],
|
|
254
|
-
...
|
|
255
|
+
...D && !f ? [{
|
|
255
256
|
id: "create-app",
|
|
256
257
|
label: h("devportal.createApp", "Create App"),
|
|
257
258
|
description: h("devportal.orgStepCreateApp", "Build a new application under this organization"),
|
|
258
|
-
icon: /* @__PURE__ */
|
|
259
|
-
onClick: () =>
|
|
259
|
+
icon: /* @__PURE__ */ z(T, { size: 16 }),
|
|
260
|
+
onClick: () => I("/apps/new")
|
|
260
261
|
}] : [],
|
|
261
|
-
...
|
|
262
|
+
...D && f ? [{
|
|
262
263
|
id: "list-item",
|
|
263
264
|
label: h("devportal.listAnItem", "List an Item"),
|
|
264
265
|
description: h("devportal.orgStepListItem", "List a physical product for sale under this organization"),
|
|
265
|
-
icon: /* @__PURE__ */
|
|
266
|
-
onClick: () =>
|
|
266
|
+
icon: /* @__PURE__ */ z(N, { size: 16 }),
|
|
267
|
+
onClick: () => I("/seller/items/new")
|
|
267
268
|
}] : [],
|
|
268
|
-
...
|
|
269
|
+
...k ? [{
|
|
269
270
|
id: "settings",
|
|
270
271
|
label: h("devportal.orgStepVerify", "Complete organization profile"),
|
|
271
272
|
description: h("devportal.orgStepVerifyDesc", "Add a logo and details, then request verification"),
|
|
272
|
-
icon: /* @__PURE__ */
|
|
273
|
+
icon: /* @__PURE__ */ z(P, { size: 16 }),
|
|
273
274
|
onClick: () => _("settings"),
|
|
274
|
-
done: !!
|
|
275
|
+
done: !!R.isVerified
|
|
275
276
|
}] : []
|
|
276
277
|
]
|
|
277
278
|
}),
|
|
278
|
-
/* @__PURE__ */
|
|
279
|
+
/* @__PURE__ */ B("div", {
|
|
279
280
|
className: "mt-6",
|
|
280
281
|
id: `organization-panel-${g}`,
|
|
281
282
|
role: "tabpanel",
|
|
282
283
|
"aria-labelledby": `organization-tab-${g}`,
|
|
283
284
|
tabIndex: 0,
|
|
284
285
|
children: [
|
|
285
|
-
g === "overview" && /* @__PURE__ */
|
|
286
|
-
org:
|
|
287
|
-
apps:
|
|
288
|
-
members:
|
|
289
|
-
canCreateApps:
|
|
290
|
-
canViewRevenue:
|
|
291
|
-
onNavigate:
|
|
286
|
+
g === "overview" && /* @__PURE__ */ z(q, {
|
|
287
|
+
org: R,
|
|
288
|
+
apps: U,
|
|
289
|
+
members: H,
|
|
290
|
+
canCreateApps: D,
|
|
291
|
+
canViewRevenue: j,
|
|
292
|
+
onNavigate: I,
|
|
292
293
|
onShowApps: () => _("apps")
|
|
293
294
|
}),
|
|
294
|
-
g === "apps" && /* @__PURE__ */
|
|
295
|
-
org:
|
|
296
|
-
apps:
|
|
297
|
-
onNavigate:
|
|
298
|
-
canCreateApps:
|
|
295
|
+
g === "apps" && /* @__PURE__ */ z(pe, {
|
|
296
|
+
org: R,
|
|
297
|
+
apps: U,
|
|
298
|
+
onNavigate: I,
|
|
299
|
+
canCreateApps: D
|
|
299
300
|
}),
|
|
300
|
-
g === "members" && /* @__PURE__ */
|
|
301
|
-
members:
|
|
302
|
-
onNavigate:
|
|
303
|
-
orgId:
|
|
301
|
+
g === "members" && /* @__PURE__ */ z(me, {
|
|
302
|
+
members: H,
|
|
303
|
+
onNavigate: I,
|
|
304
|
+
orgId: R.id,
|
|
304
305
|
canInviteMembers: F
|
|
305
306
|
}),
|
|
306
|
-
g === "settings" &&
|
|
307
|
+
g === "settings" && k && /* @__PURE__ */ z(J, { org: R })
|
|
307
308
|
]
|
|
308
309
|
})
|
|
309
310
|
]
|
|
310
311
|
});
|
|
311
|
-
},
|
|
312
|
-
let { t: c } =
|
|
312
|
+
}, q = ({ org: e, apps: t, members: r, canCreateApps: i, canViewRevenue: a, onNavigate: o, onShowApps: s }) => {
|
|
313
|
+
let { t: c } = V(), l = (e, t) => {
|
|
313
314
|
let n = c(e);
|
|
314
315
|
return n === e ? t : n;
|
|
315
316
|
};
|
|
316
|
-
return /* @__PURE__ */
|
|
317
|
+
return /* @__PURE__ */ B("div", {
|
|
317
318
|
className: "grid gap-6 lg:grid-cols-3",
|
|
318
|
-
children: [/* @__PURE__ */
|
|
319
|
+
children: [/* @__PURE__ */ B("div", {
|
|
319
320
|
className: "lg:col-span-2 space-y-6",
|
|
320
|
-
children: [/* @__PURE__ */
|
|
321
|
+
children: [/* @__PURE__ */ z(H, { children: /* @__PURE__ */ B(h, {
|
|
321
322
|
columns: a ? 4 : 3,
|
|
322
323
|
children: [
|
|
323
|
-
/* @__PURE__ */
|
|
324
|
+
/* @__PURE__ */ z(m, {
|
|
324
325
|
title: l("devportal.publishedApps", "Published Apps"),
|
|
325
326
|
value: `${e.publishedApps}/${e.totalApps}`,
|
|
326
|
-
icon: /* @__PURE__ */
|
|
327
|
+
icon: /* @__PURE__ */ z(T, { size: 20 })
|
|
327
328
|
}),
|
|
328
|
-
/* @__PURE__ */
|
|
329
|
+
/* @__PURE__ */ z(m, {
|
|
329
330
|
title: l("devportal.totalInstalls", "Total Installs"),
|
|
330
331
|
value: e.totalInstalls.toLocaleString(),
|
|
331
|
-
icon: /* @__PURE__ */
|
|
332
|
+
icon: /* @__PURE__ */ z(I, { size: 20 })
|
|
332
333
|
}),
|
|
333
|
-
a ? /* @__PURE__ */
|
|
334
|
+
a ? /* @__PURE__ */ z(m, {
|
|
334
335
|
title: l("devportal.totalRevenue", "Total Revenue"),
|
|
335
336
|
value: `$${e.totalRevenue.toLocaleString()}`,
|
|
336
|
-
icon: /* @__PURE__ */
|
|
337
|
+
icon: /* @__PURE__ */ z(A, { size: 20 })
|
|
337
338
|
}) : null,
|
|
338
|
-
/* @__PURE__ */
|
|
339
|
+
/* @__PURE__ */ z(m, {
|
|
339
340
|
title: l("devportal.avgRating", "Avg Rating"),
|
|
340
341
|
value: e.averageRating ? `${e.averageRating.toFixed(1)} ★` : l("devportal.notAvailable", "N/A"),
|
|
341
|
-
icon: /* @__PURE__ */
|
|
342
|
+
icon: /* @__PURE__ */ z(D, { size: 20 })
|
|
342
343
|
})
|
|
343
344
|
]
|
|
344
|
-
}) }), /* @__PURE__ */
|
|
345
|
+
}) }), /* @__PURE__ */ z(d, {
|
|
345
346
|
title: l("devportal.recentApplications", "Recent Applications"),
|
|
346
|
-
actions: /* @__PURE__ */
|
|
347
|
+
actions: /* @__PURE__ */ B("button", {
|
|
347
348
|
onClick: s,
|
|
348
349
|
className: "text-sm text-primary hover:underline flex items-center gap-1",
|
|
349
350
|
children: [
|
|
350
351
|
l("devportal.viewAll", "View all"),
|
|
351
352
|
" ",
|
|
352
|
-
/* @__PURE__ */
|
|
353
|
+
/* @__PURE__ */ z(E, { size: 14 })
|
|
353
354
|
]
|
|
354
355
|
}),
|
|
355
|
-
children: t.length > 0 ? /* @__PURE__ */
|
|
356
|
+
children: t.length > 0 ? /* @__PURE__ */ z("div", {
|
|
356
357
|
className: "space-y-2",
|
|
357
|
-
children: t.slice(0, 3).map((e) => /* @__PURE__ */
|
|
358
|
+
children: t.slice(0, 3).map((e) => /* @__PURE__ */ z(p, {
|
|
358
359
|
app: e,
|
|
359
360
|
onClick: () => o(`/apps/${e.id}`)
|
|
360
361
|
}, e.id))
|
|
361
|
-
}) : /* @__PURE__ */
|
|
362
|
+
}) : /* @__PURE__ */ z(n, {
|
|
362
363
|
illustration: "empty-data",
|
|
363
|
-
icon: /* @__PURE__ */
|
|
364
|
+
icon: /* @__PURE__ */ z(T, { size: 24 }),
|
|
364
365
|
title: l("devportal.noApplications", "No applications"),
|
|
365
366
|
description: e.kind === "PHYSICAL" ? l("devportal.createYourFirstItem", "List your first physical item") : l("devportal.createYourFirstApplication", "Create your first application"),
|
|
366
|
-
action: i ? /* @__PURE__ */
|
|
367
|
+
action: i ? /* @__PURE__ */ B("button", {
|
|
367
368
|
onClick: () => o(e.kind === "PHYSICAL" ? "/seller/items/new" : "/apps/new"),
|
|
368
369
|
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",
|
|
369
|
-
children: [/* @__PURE__ */
|
|
370
|
+
children: [/* @__PURE__ */ z(N, { size: 16 }), e.kind === "PHYSICAL" ? l("devportal.createItem", "Create Item") : l("devportal.createApp", "Create App")]
|
|
370
371
|
}) : void 0
|
|
371
372
|
})
|
|
372
373
|
})]
|
|
373
|
-
}), /* @__PURE__ */
|
|
374
|
+
}), /* @__PURE__ */ B("div", {
|
|
374
375
|
className: "space-y-6",
|
|
375
376
|
children: [
|
|
376
|
-
a ? /* @__PURE__ */
|
|
377
|
+
a ? /* @__PURE__ */ z(d, {
|
|
377
378
|
title: l("devportal.revenueSummary", "Revenue Summary"),
|
|
378
|
-
children: /* @__PURE__ */
|
|
379
|
+
children: /* @__PURE__ */ z(_, { items: [
|
|
379
380
|
{
|
|
380
381
|
label: l("devportal.totalRevenue", "Total Revenue"),
|
|
381
382
|
value: `$${e.totalRevenue.toLocaleString()}`
|
|
@@ -398,31 +399,31 @@ var q = {
|
|
|
398
399
|
}
|
|
399
400
|
] })
|
|
400
401
|
}) : null,
|
|
401
|
-
/* @__PURE__ */
|
|
402
|
+
/* @__PURE__ */ z(d, {
|
|
402
403
|
title: l("devportal.teamMembers", "Team Members"),
|
|
403
|
-
actions: /* @__PURE__ */
|
|
404
|
+
actions: /* @__PURE__ */ z("button", {
|
|
404
405
|
onClick: () => o(`/organizations/${e.id}/members`),
|
|
405
406
|
className: "text-sm text-primary hover:underline",
|
|
406
407
|
children: l("devportal.manage", "Manage")
|
|
407
408
|
}),
|
|
408
|
-
children: /* @__PURE__ */
|
|
409
|
+
children: /* @__PURE__ */ B("div", {
|
|
409
410
|
className: "space-y-2",
|
|
410
|
-
children: [r.slice(0, 3).map((e) => /* @__PURE__ */
|
|
411
|
+
children: [r.slice(0, 3).map((e) => /* @__PURE__ */ z("div", {
|
|
411
412
|
className: "flex items-center justify-between py-2",
|
|
412
|
-
children: /* @__PURE__ */
|
|
413
|
+
children: /* @__PURE__ */ B("div", {
|
|
413
414
|
className: "flex items-center gap-3",
|
|
414
|
-
children: [/* @__PURE__ */
|
|
415
|
+
children: [/* @__PURE__ */ z("div", {
|
|
415
416
|
className: "h-8 w-8 rounded-full bg-action-primary-bg/10 flex items-center justify-center text-sm font-medium text-primary",
|
|
416
417
|
children: e.email?.charAt(0).toUpperCase() || "U"
|
|
417
|
-
}), /* @__PURE__ */
|
|
418
|
+
}), /* @__PURE__ */ B("div", { children: [/* @__PURE__ */ z("p", {
|
|
418
419
|
className: "text-sm font-medium",
|
|
419
420
|
children: e.email
|
|
420
|
-
}), /* @__PURE__ */
|
|
421
|
+
}), /* @__PURE__ */ z("p", {
|
|
421
422
|
className: "text-xs text-text-secondary",
|
|
422
423
|
children: f[e.role]
|
|
423
424
|
})] })]
|
|
424
425
|
})
|
|
425
|
-
}, e.id)), r.length > 3 && /* @__PURE__ */
|
|
426
|
+
}, e.id)), r.length > 3 && /* @__PURE__ */ B("p", {
|
|
426
427
|
className: "text-xs text-text-secondary",
|
|
427
428
|
children: [
|
|
428
429
|
"+",
|
|
@@ -433,99 +434,99 @@ var q = {
|
|
|
433
434
|
})]
|
|
434
435
|
})
|
|
435
436
|
}),
|
|
436
|
-
/* @__PURE__ */
|
|
437
|
+
/* @__PURE__ */ z(d, {
|
|
437
438
|
title: l("devportal.links", "Links"),
|
|
438
|
-
children: /* @__PURE__ */
|
|
439
|
+
children: /* @__PURE__ */ B("div", {
|
|
439
440
|
className: "space-y-2",
|
|
440
|
-
children: [e.websiteUrl && /* @__PURE__ */
|
|
441
|
+
children: [e.websiteUrl && /* @__PURE__ */ B("a", {
|
|
441
442
|
href: e.websiteUrl,
|
|
442
443
|
target: "_blank",
|
|
443
444
|
rel: "noopener noreferrer",
|
|
444
445
|
className: "flex items-center gap-2 text-sm text-primary hover:underline",
|
|
445
|
-
children: [/* @__PURE__ */
|
|
446
|
-
}), e.contactEmail && /* @__PURE__ */
|
|
446
|
+
children: [/* @__PURE__ */ z(j, { size: 14 }), l("devportal.website", "Website")]
|
|
447
|
+
}), e.contactEmail && /* @__PURE__ */ B("a", {
|
|
447
448
|
href: `mailto:${e.contactEmail}`,
|
|
448
449
|
className: "flex items-center gap-2 text-sm text-primary hover:underline",
|
|
449
|
-
children: [/* @__PURE__ */
|
|
450
|
+
children: [/* @__PURE__ */ z(j, { size: 14 }), e.contactEmail]
|
|
450
451
|
})]
|
|
451
452
|
})
|
|
452
453
|
})
|
|
453
454
|
]
|
|
454
455
|
})]
|
|
455
456
|
});
|
|
456
|
-
},
|
|
457
|
-
let { t: a } =
|
|
457
|
+
}, pe = ({ org: e, apps: t, onNavigate: r, canCreateApps: i }) => {
|
|
458
|
+
let { t: a } = V(), o = (e, t) => {
|
|
458
459
|
let n = a(e);
|
|
459
460
|
return n === e ? t : n;
|
|
460
461
|
}, s = e.kind === "PHYSICAL", c = s ? "/seller/items/new" : "/apps/new", l = s ? o("devportal.createItem", "Create Item") : o("devportal.createApp", "Create App");
|
|
461
|
-
return /* @__PURE__ */
|
|
462
|
+
return /* @__PURE__ */ B("div", {
|
|
462
463
|
className: "space-y-6",
|
|
463
|
-
children: [/* @__PURE__ */
|
|
464
|
+
children: [/* @__PURE__ */ B("div", {
|
|
464
465
|
className: "flex items-center justify-between",
|
|
465
|
-
children: [/* @__PURE__ */
|
|
466
|
+
children: [/* @__PURE__ */ B("p", {
|
|
466
467
|
className: "text-sm text-text-secondary",
|
|
467
468
|
children: [
|
|
468
469
|
t.length,
|
|
469
470
|
" ",
|
|
470
471
|
t.length === 1 ? o("devportal.application", "application") : o("devportal.applications", "applications")
|
|
471
472
|
]
|
|
472
|
-
}), i ? /* @__PURE__ */
|
|
473
|
+
}), i ? /* @__PURE__ */ B("button", {
|
|
473
474
|
onClick: () => r(c),
|
|
474
475
|
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",
|
|
475
|
-
children: [/* @__PURE__ */
|
|
476
|
+
children: [/* @__PURE__ */ z(N, { size: 16 }), l]
|
|
476
477
|
}) : null]
|
|
477
|
-
}), t.length > 0 ? /* @__PURE__ */
|
|
478
|
+
}), t.length > 0 ? /* @__PURE__ */ z("div", {
|
|
478
479
|
className: "space-y-2",
|
|
479
|
-
children: t.map((e) => /* @__PURE__ */
|
|
480
|
+
children: t.map((e) => /* @__PURE__ */ z(p, {
|
|
480
481
|
app: e,
|
|
481
482
|
onClick: () => r(`/apps/${e.id}`)
|
|
482
483
|
}, e.id))
|
|
483
|
-
}) : /* @__PURE__ */
|
|
484
|
+
}) : /* @__PURE__ */ z(n, {
|
|
484
485
|
illustration: "empty-data",
|
|
485
|
-
icon: /* @__PURE__ */
|
|
486
|
+
icon: /* @__PURE__ */ z(T, { size: 32 }),
|
|
486
487
|
title: o("devportal.noApplications", "No applications"),
|
|
487
488
|
description: s ? o("devportal.createFirstItemForOrg", "List your first physical item for this organization") : o("devportal.createFirstAppForOrg", "Create your first application for this organization"),
|
|
488
|
-
action: i ? /* @__PURE__ */
|
|
489
|
+
action: i ? /* @__PURE__ */ B("button", {
|
|
489
490
|
onClick: () => r(c),
|
|
490
491
|
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",
|
|
491
|
-
children: [/* @__PURE__ */
|
|
492
|
+
children: [/* @__PURE__ */ z(N, { size: 16 }), l]
|
|
492
493
|
}) : void 0
|
|
493
494
|
})]
|
|
494
495
|
});
|
|
495
|
-
},
|
|
496
|
-
let { t: a } =
|
|
496
|
+
}, me = ({ members: e, onNavigate: n, orgId: r, canInviteMembers: i }) => {
|
|
497
|
+
let { t: a } = V(), o = (e, t) => {
|
|
497
498
|
let n = a(e);
|
|
498
499
|
return n === e ? t : n;
|
|
499
500
|
};
|
|
500
|
-
return /* @__PURE__ */
|
|
501
|
+
return /* @__PURE__ */ B("div", {
|
|
501
502
|
className: "space-y-6",
|
|
502
|
-
children: [/* @__PURE__ */
|
|
503
|
+
children: [/* @__PURE__ */ B("div", {
|
|
503
504
|
className: "flex items-center justify-between",
|
|
504
|
-
children: [/* @__PURE__ */
|
|
505
|
+
children: [/* @__PURE__ */ B("p", {
|
|
505
506
|
className: "text-sm text-text-secondary",
|
|
506
507
|
children: [
|
|
507
508
|
e.length,
|
|
508
509
|
" ",
|
|
509
510
|
e.length === 1 ? o("devportal.memberLower", "member") : o("devportal.membersLower", "members")
|
|
510
511
|
]
|
|
511
|
-
}), i ? /* @__PURE__ */
|
|
512
|
+
}), i ? /* @__PURE__ */ B("button", {
|
|
512
513
|
onClick: () => n(`/organizations/${r}/members`),
|
|
513
514
|
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__ */
|
|
515
|
+
children: [/* @__PURE__ */ z(N, { size: 16 }), o("devportal.inviteMember", "Invite Member")]
|
|
515
516
|
}) : null]
|
|
516
|
-
}), /* @__PURE__ */
|
|
517
|
+
}), /* @__PURE__ */ z(g, {
|
|
517
518
|
data: e,
|
|
518
519
|
keyField: "id",
|
|
519
520
|
columns: [
|
|
520
521
|
{
|
|
521
522
|
key: "email",
|
|
522
523
|
header: o("devportal.memberColumn", "Member"),
|
|
523
|
-
render: (e) => /* @__PURE__ */
|
|
524
|
+
render: (e) => /* @__PURE__ */ B("div", {
|
|
524
525
|
className: "flex items-center gap-3",
|
|
525
|
-
children: [/* @__PURE__ */
|
|
526
|
+
children: [/* @__PURE__ */ z("div", {
|
|
526
527
|
className: "h-8 w-8 rounded-full bg-action-primary-bg/10 flex items-center justify-center text-sm font-medium text-primary",
|
|
527
528
|
children: e.email?.charAt(0).toUpperCase() || "U"
|
|
528
|
-
}), /* @__PURE__ */
|
|
529
|
+
}), /* @__PURE__ */ z("span", {
|
|
529
530
|
className: "font-medium",
|
|
530
531
|
children: e.email
|
|
531
532
|
})]
|
|
@@ -534,7 +535,7 @@ var q = {
|
|
|
534
535
|
{
|
|
535
536
|
key: "role",
|
|
536
537
|
header: o("devportal.roleColumn", "Role"),
|
|
537
|
-
render: (e) => /* @__PURE__ */
|
|
538
|
+
render: (e) => /* @__PURE__ */ z("span", {
|
|
538
539
|
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"),
|
|
539
540
|
children: f[e.role]
|
|
540
541
|
})
|
|
@@ -547,11 +548,11 @@ var q = {
|
|
|
547
548
|
]
|
|
548
549
|
})]
|
|
549
550
|
});
|
|
550
|
-
},
|
|
551
|
-
let { t } =
|
|
551
|
+
}, J = ({ org: e }) => {
|
|
552
|
+
let { t } = V(), { allowed: n } = b(S.ORG_UPDATE), r = (e, n) => {
|
|
552
553
|
let r = t(e);
|
|
553
554
|
return r === e ? n : r;
|
|
554
|
-
}, [i, a] =
|
|
555
|
+
}, [i, a] = w({
|
|
555
556
|
name: e.name,
|
|
556
557
|
description: e.description ?? "",
|
|
557
558
|
websiteUrl: e.websiteUrl ?? "",
|
|
@@ -559,24 +560,24 @@ var q = {
|
|
|
559
560
|
supportEmail: e.supportEmail ?? "",
|
|
560
561
|
logoUrl: e.logoUrl ?? "",
|
|
561
562
|
bannerUrl: e.bannerUrl ?? ""
|
|
562
|
-
}), [o, u] =
|
|
563
|
+
}), [o, u] = w({
|
|
563
564
|
legalEntityName: e.legalEntityName ?? "",
|
|
564
565
|
legalEntityType: e.legalEntityType ?? ""
|
|
565
|
-
}), [f, p] =
|
|
566
|
+
}), [f, p] = w({
|
|
566
567
|
taxId: e.taxId ?? "",
|
|
567
568
|
taxCountry: e.taxCountry ?? ""
|
|
568
|
-
}), [m, h] =
|
|
569
|
+
}), [m, h] = w({ pickupPostalCode: e.pickupPostalCode ?? "" }), { locations: g, refetch: re } = ne(), [T, E] = w(!1), [D, O] = w(!1), [A, j] = w(null), [N, I] = w(null), [L, ae] = w("manual"), [H, oe] = w(!1), [W, le] = w(""), [K, fe] = w(""), [q, pe] = w(""), [me, J] = w(null), [he, ge] = w(!1), Y = me ?? {
|
|
569
570
|
verificationMethod: e.verificationMethod,
|
|
570
571
|
verificationRequestedAt: e.verificationRequestedAt,
|
|
571
572
|
verificationStatus: e.verificationStatus,
|
|
572
573
|
verificationRequestNotes: e.verificationRequestNotes,
|
|
573
574
|
verificationRejectedReason: e.verificationRejectedReason
|
|
574
|
-
},
|
|
575
|
-
i.contactEmail.trim() ?
|
|
576
|
-
let
|
|
577
|
-
|
|
578
|
-
let
|
|
579
|
-
|
|
575
|
+
}, X = [];
|
|
576
|
+
i.contactEmail.trim() ? de(i.contactEmail) || X.push(r("devportal.contactEmailInvalid", "Contact email must be valid")) : X.push(r("devportal.contactEmailRequired", "Contact email is required")), i.supportEmail.trim() && !de(i.supportEmail) && X.push(r("devportal.supportEmailInvalid", "Support email must be valid")), i.websiteUrl.trim() ? G(i.websiteUrl) || X.push(r("devportal.websiteInvalid", "Website URL must be valid")) : X.push(r("devportal.websiteRequired", "Website URL is required")), o.legalEntityName.trim() || X.push(r("devportal.legalEntityNameRequired", "Legal entity name is required")), o.legalEntityType.trim() || X.push(r("devportal.legalEntityTypeRequired", "Entity type is required")), f.taxId.trim() || X.push(r("devportal.taxIdRequired", "Tax ID is required")), f.taxCountry.trim() ? /^[A-Za-z]{2}$/.test(f.taxCountry.trim()) || X.push(r("devportal.taxCountryInvalid", "Tax country must be a 2-letter code")) : X.push(r("devportal.taxCountryRequired", "Tax country is required"));
|
|
577
|
+
let Z = [];
|
|
578
|
+
L === "domain" && !ue(q.trim()) && Z.push(r("devportal.verification.errors.domainRequired", "Enter a valid domain like burdenoff.com")), L === "document" && !G(K.trim()) && Z.push(r("devportal.verification.errors.evidenceUrlRequired", "Enter a valid evidence URL starting with http:// or https://")), L === "manual" && !W.trim() && Z.push(r("devportal.verification.errors.notesRequired", "Add notes so the reviewer knows what to verify"));
|
|
579
|
+
let _e = X.length === 0 && Z.length === 0 && !he && n, [Q, { loading: $ }] = l({ refetchQueries: ["GetOrganization"] }), [ve, { loading: ye }] = s({ refetchQueries: ["GetOrganization"] }), [be, { loading: xe }] = c({ refetchQueries: ["GetOrganization"] });
|
|
580
|
+
C(() => {
|
|
580
581
|
a({
|
|
581
582
|
name: e.name,
|
|
582
583
|
description: e.description ?? "",
|
|
@@ -592,17 +593,17 @@ var q = {
|
|
|
592
593
|
taxId: e.taxId ?? "",
|
|
593
594
|
taxCountry: e.taxCountry ?? ""
|
|
594
595
|
}), h({ pickupPostalCode: e.pickupPostalCode ?? "" });
|
|
595
|
-
}, [e.id]),
|
|
596
|
-
e.id &&
|
|
596
|
+
}, [e.id]), C(() => {
|
|
597
|
+
e.id && U({
|
|
597
598
|
gateway: "global",
|
|
598
|
-
query:
|
|
599
|
+
query: se,
|
|
599
600
|
variables: { id: e.id }
|
|
600
601
|
}).then((e) => J(e.data?.developerOrganization ?? null)).catch(() => J(null));
|
|
601
|
-
}, [e.id,
|
|
602
|
-
let
|
|
603
|
-
|
|
602
|
+
}, [e.id, H]);
|
|
603
|
+
let Se = async () => {
|
|
604
|
+
I(null), j(null);
|
|
604
605
|
try {
|
|
605
|
-
await
|
|
606
|
+
await Q({ variables: {
|
|
606
607
|
id: e.id,
|
|
607
608
|
input: {
|
|
608
609
|
name: i.name.trim() || void 0,
|
|
@@ -613,66 +614,66 @@ var q = {
|
|
|
613
614
|
logoUrl: i.logoUrl.trim() || null,
|
|
614
615
|
bannerUrl: i.bannerUrl.trim() || null
|
|
615
616
|
}
|
|
616
|
-
} }),
|
|
617
|
+
} }), j(r("devportal.organizationUpdated", "Organization details updated"));
|
|
617
618
|
} catch (e) {
|
|
618
|
-
|
|
619
|
+
I(e instanceof Error ? e.message : r("devportal.failedToUpdateOrganization", "Failed to update organization"));
|
|
619
620
|
}
|
|
620
|
-
},
|
|
621
|
-
|
|
621
|
+
}, Ce = async () => {
|
|
622
|
+
I(null), j(null);
|
|
622
623
|
try {
|
|
623
|
-
await
|
|
624
|
+
await ve({ variables: {
|
|
624
625
|
id: e.id,
|
|
625
626
|
input: {
|
|
626
627
|
legalEntityName: o.legalEntityName.trim() || null,
|
|
627
628
|
legalEntityType: o.legalEntityType.trim() || null
|
|
628
629
|
}
|
|
629
|
-
} }),
|
|
630
|
+
} }), j(r("devportal.legalInfoUpdated", "Legal information updated"));
|
|
630
631
|
} catch (e) {
|
|
631
|
-
|
|
632
|
+
I(e instanceof Error ? e.message : r("devportal.failedToUpdateLegalInfo", "Failed to update legal information"));
|
|
632
633
|
}
|
|
633
|
-
},
|
|
634
|
-
|
|
634
|
+
}, we = async () => {
|
|
635
|
+
I(null), j(null);
|
|
635
636
|
try {
|
|
636
|
-
await
|
|
637
|
+
await be({ variables: {
|
|
637
638
|
id: e.id,
|
|
638
639
|
input: {
|
|
639
640
|
taxId: f.taxId.trim() || null,
|
|
640
641
|
taxCountry: f.taxCountry.trim() || null
|
|
641
642
|
}
|
|
642
|
-
} }),
|
|
643
|
+
} }), j(r("devportal.taxInfoUpdated", "Tax information updated"));
|
|
643
644
|
} catch (e) {
|
|
644
|
-
|
|
645
|
+
I(e instanceof Error ? e.message : r("devportal.failedToUpdateTaxInfo", "Failed to update tax information"));
|
|
645
646
|
}
|
|
646
|
-
},
|
|
647
|
-
|
|
647
|
+
}, Te = async (t) => {
|
|
648
|
+
I(null), j(null);
|
|
648
649
|
try {
|
|
649
|
-
await
|
|
650
|
+
await Q({ variables: {
|
|
650
651
|
id: e.id,
|
|
651
652
|
input: { pickupPostalCode: t.trim() || null }
|
|
652
|
-
} }),
|
|
653
|
+
} }), h({ pickupPostalCode: t.trim() }), j(r("devportal.fulfillmentInfoUpdated", "Fulfillment settings updated"));
|
|
653
654
|
} catch (e) {
|
|
654
|
-
|
|
655
|
+
I(e instanceof Error ? e.message : r("devportal.failedToUpdateFulfillmentInfo", "Failed to update fulfillment settings"));
|
|
655
656
|
}
|
|
656
657
|
};
|
|
657
|
-
return /* @__PURE__ */
|
|
658
|
+
return /* @__PURE__ */ B("div", {
|
|
658
659
|
className: "space-y-6 max-w-2xl",
|
|
659
660
|
children: [
|
|
660
|
-
|
|
661
|
+
N && /* @__PURE__ */ z("div", {
|
|
661
662
|
className: "rounded-md border border-status-error-bg bg-status-error-bg-subtle px-4 py-3 text-sm text-status-error-text",
|
|
662
|
-
children:
|
|
663
|
+
children: N
|
|
663
664
|
}),
|
|
664
|
-
|
|
665
|
+
A && /* @__PURE__ */ z("div", {
|
|
665
666
|
className: "rounded-md border border-status-success-bg bg-status-success-bg-subtle px-4 py-3 text-sm text-status-success-text",
|
|
666
|
-
children:
|
|
667
|
+
children: A
|
|
667
668
|
}),
|
|
668
|
-
/* @__PURE__ */
|
|
669
|
+
/* @__PURE__ */ z(d, {
|
|
669
670
|
title: r("devportal.organizationDetails", "Organization Details"),
|
|
670
|
-
children: /* @__PURE__ */
|
|
671
|
+
children: /* @__PURE__ */ B("div", {
|
|
671
672
|
className: "space-y-4",
|
|
672
673
|
children: [
|
|
673
|
-
/* @__PURE__ */
|
|
674
|
+
/* @__PURE__ */ B("div", {
|
|
674
675
|
className: "grid gap-4 sm:grid-cols-2",
|
|
675
|
-
children: [/* @__PURE__ */
|
|
676
|
+
children: [/* @__PURE__ */ z(v, {
|
|
676
677
|
label: r("devportal.organizationName", "Organization Name"),
|
|
677
678
|
value: i.name,
|
|
678
679
|
onChange: (e) => a((t) => ({
|
|
@@ -681,14 +682,14 @@ var q = {
|
|
|
681
682
|
})),
|
|
682
683
|
disabled: !n,
|
|
683
684
|
required: !0
|
|
684
|
-
}), /* @__PURE__ */
|
|
685
|
+
}), /* @__PURE__ */ z(v, {
|
|
685
686
|
label: r("devportal.slug", "Slug"),
|
|
686
687
|
value: e.slug,
|
|
687
688
|
disabled: !0,
|
|
688
689
|
hint: r("devportal.slugReadOnly", "Slug cannot be changed here")
|
|
689
690
|
})]
|
|
690
691
|
}),
|
|
691
|
-
/* @__PURE__ */
|
|
692
|
+
/* @__PURE__ */ z(y, {
|
|
692
693
|
label: r("devportal.description", "Description"),
|
|
693
694
|
value: i.description,
|
|
694
695
|
onChange: (e) => a((t) => ({
|
|
@@ -698,10 +699,10 @@ var q = {
|
|
|
698
699
|
disabled: !n,
|
|
699
700
|
rows: 4
|
|
700
701
|
}),
|
|
701
|
-
/* @__PURE__ */
|
|
702
|
+
/* @__PURE__ */ B("div", {
|
|
702
703
|
className: "grid gap-4 sm:grid-cols-2",
|
|
703
704
|
children: [
|
|
704
|
-
/* @__PURE__ */
|
|
705
|
+
/* @__PURE__ */ z(v, {
|
|
705
706
|
label: r("devportal.website", "Website"),
|
|
706
707
|
type: "url",
|
|
707
708
|
value: i.websiteUrl,
|
|
@@ -711,7 +712,7 @@ var q = {
|
|
|
711
712
|
})),
|
|
712
713
|
disabled: !n
|
|
713
714
|
}),
|
|
714
|
-
/* @__PURE__ */
|
|
715
|
+
/* @__PURE__ */ z(v, {
|
|
715
716
|
label: r("devportal.contactEmail", "Contact Email"),
|
|
716
717
|
type: "email",
|
|
717
718
|
value: i.contactEmail,
|
|
@@ -721,7 +722,7 @@ var q = {
|
|
|
721
722
|
})),
|
|
722
723
|
disabled: !n
|
|
723
724
|
}),
|
|
724
|
-
/* @__PURE__ */
|
|
725
|
+
/* @__PURE__ */ z(v, {
|
|
725
726
|
label: r("devportal.supportEmail", "Support Email"),
|
|
726
727
|
type: "email",
|
|
727
728
|
value: i.supportEmail,
|
|
@@ -731,7 +732,7 @@ var q = {
|
|
|
731
732
|
})),
|
|
732
733
|
disabled: !n
|
|
733
734
|
}),
|
|
734
|
-
/* @__PURE__ */
|
|
735
|
+
/* @__PURE__ */ z(v, {
|
|
735
736
|
label: r("devportal.logoUrl", "Logo URL"),
|
|
736
737
|
type: "url",
|
|
737
738
|
value: i.logoUrl,
|
|
@@ -743,7 +744,7 @@ var q = {
|
|
|
743
744
|
})
|
|
744
745
|
]
|
|
745
746
|
}),
|
|
746
|
-
/* @__PURE__ */
|
|
747
|
+
/* @__PURE__ */ z(v, {
|
|
747
748
|
label: r("devportal.bannerUrl", "Banner URL"),
|
|
748
749
|
type: "url",
|
|
749
750
|
value: i.bannerUrl,
|
|
@@ -753,10 +754,10 @@ var q = {
|
|
|
753
754
|
})),
|
|
754
755
|
disabled: !n
|
|
755
756
|
}),
|
|
756
|
-
/* @__PURE__ */
|
|
757
|
+
/* @__PURE__ */ z(_, { items: [
|
|
757
758
|
{
|
|
758
759
|
label: r("devportal.organizationId", "Organization ID"),
|
|
759
|
-
value: /* @__PURE__ */
|
|
760
|
+
value: /* @__PURE__ */ z("code", {
|
|
760
761
|
className: "text-xs",
|
|
761
762
|
children: e.id
|
|
762
763
|
})
|
|
@@ -778,31 +779,31 @@ var q = {
|
|
|
778
779
|
value: `${(e.platformFeeRate * 100).toFixed(0)}%`
|
|
779
780
|
}
|
|
780
781
|
] }),
|
|
781
|
-
/* @__PURE__ */
|
|
782
|
+
/* @__PURE__ */ z("div", {
|
|
782
783
|
className: "flex justify-end",
|
|
783
|
-
children: /* @__PURE__ */
|
|
784
|
+
children: /* @__PURE__ */ B("button", {
|
|
784
785
|
type: "button",
|
|
785
|
-
disabled: !n ||
|
|
786
|
-
onClick: () => void
|
|
786
|
+
disabled: !n || $,
|
|
787
|
+
onClick: () => void Se(),
|
|
787
788
|
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",
|
|
788
|
-
children: [
|
|
789
|
+
children: [$ ? /* @__PURE__ */ z(M, {
|
|
789
790
|
size: 14,
|
|
790
791
|
className: "animate-spin"
|
|
791
|
-
}) : /* @__PURE__ */
|
|
792
|
+
}) : /* @__PURE__ */ z(P, { size: 14 }), r("devportal.saveChanges", "Save Changes")]
|
|
792
793
|
})
|
|
793
794
|
})
|
|
794
795
|
]
|
|
795
796
|
})
|
|
796
797
|
}),
|
|
797
|
-
/* @__PURE__ */
|
|
798
|
+
/* @__PURE__ */ z(d, {
|
|
798
799
|
title: r("devportal.legalInformation", "Legal Information"),
|
|
799
|
-
children: /* @__PURE__ */
|
|
800
|
+
children: /* @__PURE__ */ B("div", {
|
|
800
801
|
className: "space-y-4",
|
|
801
802
|
children: [
|
|
802
|
-
/* @__PURE__ */
|
|
803
|
+
/* @__PURE__ */ B("div", {
|
|
803
804
|
className: "grid gap-4 sm:grid-cols-2",
|
|
804
805
|
children: [
|
|
805
|
-
/* @__PURE__ */
|
|
806
|
+
/* @__PURE__ */ z(v, {
|
|
806
807
|
label: r("devportal.legalEntityName", "Legal Entity Name"),
|
|
807
808
|
value: o.legalEntityName,
|
|
808
809
|
onChange: (e) => u((t) => ({
|
|
@@ -811,7 +812,7 @@ var q = {
|
|
|
811
812
|
})),
|
|
812
813
|
disabled: !n
|
|
813
814
|
}),
|
|
814
|
-
/* @__PURE__ */
|
|
815
|
+
/* @__PURE__ */ z(v, {
|
|
815
816
|
label: r("devportal.entityType", "Entity Type"),
|
|
816
817
|
value: o.legalEntityType,
|
|
817
818
|
onChange: (e) => u((t) => ({
|
|
@@ -820,7 +821,7 @@ var q = {
|
|
|
820
821
|
})),
|
|
821
822
|
disabled: !n
|
|
822
823
|
}),
|
|
823
|
-
/* @__PURE__ */
|
|
824
|
+
/* @__PURE__ */ z(v, {
|
|
824
825
|
label: r("devportal.taxId", "Tax ID"),
|
|
825
826
|
value: f.taxId,
|
|
826
827
|
onChange: (e) => p((t) => ({
|
|
@@ -829,7 +830,7 @@ var q = {
|
|
|
829
830
|
})),
|
|
830
831
|
disabled: !n
|
|
831
832
|
}),
|
|
832
|
-
/* @__PURE__ */
|
|
833
|
+
/* @__PURE__ */ z(v, {
|
|
833
834
|
label: r("devportal.taxCountry", "Tax Country"),
|
|
834
835
|
value: f.taxCountry,
|
|
835
836
|
onChange: (e) => p((t) => ({
|
|
@@ -840,37 +841,37 @@ var q = {
|
|
|
840
841
|
})
|
|
841
842
|
]
|
|
842
843
|
}),
|
|
843
|
-
/* @__PURE__ */
|
|
844
|
+
/* @__PURE__ */ z(_, { items: [{
|
|
844
845
|
label: r("devportal.taxForm", "Tax Form"),
|
|
845
846
|
value: e.taxFormType || r("devportal.notSubmitted", "Not submitted")
|
|
846
847
|
}, {
|
|
847
848
|
label: r("devportal.taxFormStatus", "Tax Form Status"),
|
|
848
|
-
value: e.taxFormType ? e.taxFormVerified ? /* @__PURE__ */
|
|
849
|
+
value: e.taxFormType ? e.taxFormVerified ? /* @__PURE__ */ B("span", {
|
|
849
850
|
className: "text-status-success-text flex items-center gap-1",
|
|
850
851
|
children: [
|
|
851
|
-
/* @__PURE__ */
|
|
852
|
+
/* @__PURE__ */ z(k, { size: 14 }),
|
|
852
853
|
" ",
|
|
853
854
|
r("devportal.verified", "Verified")
|
|
854
855
|
]
|
|
855
856
|
}) : r("devportal.pendingVerification", "Pending verification") : r("devportal.notSubmitted", "Not submitted")
|
|
856
857
|
}] }),
|
|
857
|
-
/* @__PURE__ */
|
|
858
|
+
/* @__PURE__ */ B("div", {
|
|
858
859
|
className: "flex justify-end gap-2",
|
|
859
|
-
children: [/* @__PURE__ */
|
|
860
|
+
children: [/* @__PURE__ */ B("button", {
|
|
860
861
|
type: "button",
|
|
861
|
-
disabled: !n ||
|
|
862
|
-
onClick: () => void
|
|
862
|
+
disabled: !n || ye,
|
|
863
|
+
onClick: () => void Ce(),
|
|
863
864
|
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",
|
|
864
|
-
children: [
|
|
865
|
+
children: [ye ? /* @__PURE__ */ z(M, {
|
|
865
866
|
size: 14,
|
|
866
867
|
className: "animate-spin"
|
|
867
868
|
}) : null, r("devportal.saveLegalInfo", "Save Legal Info")]
|
|
868
|
-
}), /* @__PURE__ */
|
|
869
|
+
}), /* @__PURE__ */ B("button", {
|
|
869
870
|
type: "button",
|
|
870
|
-
disabled: !n ||
|
|
871
|
-
onClick: () => void
|
|
871
|
+
disabled: !n || xe,
|
|
872
|
+
onClick: () => void we(),
|
|
872
873
|
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",
|
|
873
|
-
children: [
|
|
874
|
+
children: [xe ? /* @__PURE__ */ z(M, {
|
|
874
875
|
size: 14,
|
|
875
876
|
className: "animate-spin"
|
|
876
877
|
}) : null, r("devportal.saveTaxInfo", "Save Tax Info")]
|
|
@@ -879,28 +880,28 @@ var q = {
|
|
|
879
880
|
]
|
|
880
881
|
})
|
|
881
882
|
}),
|
|
882
|
-
e.kind === "PHYSICAL" && /* @__PURE__ */
|
|
883
|
+
e.kind === "PHYSICAL" && /* @__PURE__ */ z(d, {
|
|
883
884
|
title: r("devportal.fulfillment", "Fulfillment"),
|
|
884
|
-
children: /* @__PURE__ */
|
|
885
|
+
children: /* @__PURE__ */ z("div", {
|
|
885
886
|
className: "space-y-3",
|
|
886
887
|
children: (() => {
|
|
887
888
|
let e = m.pickupPostalCode.trim(), t = g.find((t) => t.postalCode === e), i = g.length > 0;
|
|
888
|
-
return /* @__PURE__ */
|
|
889
|
-
e.length === 0 ? /* @__PURE__ */
|
|
889
|
+
return /* @__PURE__ */ B(R, { children: [
|
|
890
|
+
e.length === 0 ? /* @__PURE__ */ B("div", {
|
|
890
891
|
className: "rounded-md border border-border-seam bg-bg-sunken p-4",
|
|
891
|
-
children: [/* @__PURE__ */
|
|
892
|
+
children: [/* @__PURE__ */ z("p", {
|
|
892
893
|
className: "text-sm font-medium",
|
|
893
894
|
children: r("devportal.noPickupAddress", "No pickup address set up yet")
|
|
894
|
-
}), /* @__PURE__ */
|
|
895
|
+
}), /* @__PURE__ */ z("p", {
|
|
895
896
|
className: "mt-1 text-sm text-text-secondary",
|
|
896
897
|
children: r("devportal.noPickupAddressHint", "Buyers need to know where your physical orders actually ship from — a bare pincode isn't enough, two sellers can share one. Set up your real pickup address and we'll register it with our shipping carrier for you, free of charge.")
|
|
897
898
|
})]
|
|
898
|
-
}) : t ? /* @__PURE__ */
|
|
899
|
+
}) : t ? /* @__PURE__ */ B("div", {
|
|
899
900
|
className: "rounded-md border border-status-success-border bg-status-success-bg-subtle p-4",
|
|
900
|
-
children: [/* @__PURE__ */
|
|
901
|
+
children: [/* @__PURE__ */ z("p", {
|
|
901
902
|
className: "text-sm font-medium text-status-success-text",
|
|
902
903
|
children: r("devportal.pickupAddressRegistered", "Pickup address registered — ready for automated shipping")
|
|
903
|
-
}), /* @__PURE__ */
|
|
904
|
+
}), /* @__PURE__ */ B("p", {
|
|
904
905
|
className: "mt-1 text-sm text-text-secondary",
|
|
905
906
|
children: [
|
|
906
907
|
t.label,
|
|
@@ -908,15 +909,15 @@ var q = {
|
|
|
908
909
|
t.postalCode,
|
|
909
910
|
" ·",
|
|
910
911
|
" ",
|
|
911
|
-
|
|
912
|
+
x(t.carrier)
|
|
912
913
|
]
|
|
913
914
|
})]
|
|
914
|
-
}) : i ? /* @__PURE__ */
|
|
915
|
+
}) : i ? /* @__PURE__ */ B("div", {
|
|
915
916
|
className: "rounded-md border border-status-error-border bg-status-error-bg-subtle p-4",
|
|
916
|
-
children: [/* @__PURE__ */
|
|
917
|
+
children: [/* @__PURE__ */ z("p", {
|
|
917
918
|
className: "text-sm font-medium text-status-error-text",
|
|
918
919
|
children: r("devportal.pickupAddressNotRegistered", "Pickup address not registered")
|
|
919
|
-
}), /* @__PURE__ */
|
|
920
|
+
}), /* @__PURE__ */ B("p", {
|
|
920
921
|
className: "mt-1 text-sm text-text-secondary",
|
|
921
922
|
children: [
|
|
922
923
|
r("devportal.pickupAddressNotRegisteredHint", "Your saved pincode isn't registered with our shipping carrier yet — physical orders can't auto-ship until it's added."),
|
|
@@ -926,153 +927,166 @@ var q = {
|
|
|
926
927
|
")"
|
|
927
928
|
]
|
|
928
929
|
})]
|
|
929
|
-
}) : /* @__PURE__ */
|
|
930
|
+
}) : /* @__PURE__ */ B("div", {
|
|
930
931
|
className: "rounded-md border border-border-seam bg-bg-sunken p-4",
|
|
931
|
-
children: [/* @__PURE__ */
|
|
932
|
+
children: [/* @__PURE__ */ z("p", {
|
|
932
933
|
className: "text-sm font-medium",
|
|
933
934
|
children: e
|
|
934
|
-
}), /* @__PURE__ */
|
|
935
|
+
}), /* @__PURE__ */ z("p", {
|
|
935
936
|
className: "mt-1 text-sm text-text-secondary",
|
|
936
937
|
children: r("devportal.pickupAddressStatusUnavailable", "Couldn't check registration status right now.")
|
|
937
938
|
})]
|
|
938
939
|
}),
|
|
939
|
-
n && /* @__PURE__ */
|
|
940
|
+
n && /* @__PURE__ */ B("div", {
|
|
940
941
|
className: "flex items-center gap-4",
|
|
941
|
-
children: [/* @__PURE__ */
|
|
942
|
+
children: [/* @__PURE__ */ z("button", {
|
|
942
943
|
type: "button",
|
|
943
|
-
onClick: () =>
|
|
944
|
+
onClick: () => E(!0),
|
|
944
945
|
className: "text-sm font-medium text-action-primary-text hover:underline",
|
|
945
946
|
children: e.length === 0 ? r("devportal.setUpPickupAddressCta", "Set up pickup address") : t ? r("devportal.changePickupAddressCta", "Change pickup address") : r("devportal.registerPickupAddressCta", "Register this address with Shiprocket")
|
|
946
|
-
}), e.length > 0 && /* @__PURE__ */
|
|
947
|
+
}), e.length > 0 && /* @__PURE__ */ B("button", {
|
|
947
948
|
type: "button",
|
|
948
|
-
disabled:
|
|
949
|
-
onClick: () =>
|
|
950
|
-
className: "text-sm text-text
|
|
951
|
-
children: r("devportal.removePickupAddressCta", "
|
|
949
|
+
disabled: $,
|
|
950
|
+
onClick: () => O(!0),
|
|
951
|
+
className: "flex items-center gap-1.5 text-sm text-status-error-text hover:underline disabled:opacity-50",
|
|
952
|
+
children: [/* @__PURE__ */ z(ie, { className: "h-3.5 w-3.5" }), r("devportal.removePickupAddressCta", "Remove pickup address")]
|
|
952
953
|
})]
|
|
953
954
|
}),
|
|
954
|
-
|
|
955
|
-
open:
|
|
956
|
-
onOpenChange:
|
|
955
|
+
T && /* @__PURE__ */ z(te, {
|
|
956
|
+
open: T,
|
|
957
|
+
onOpenChange: E,
|
|
957
958
|
initialPostalCode: e,
|
|
958
959
|
carrier: "shiprocket",
|
|
959
960
|
onRegistered: (e) => {
|
|
960
|
-
|
|
961
|
+
Te(e), re();
|
|
962
|
+
}
|
|
963
|
+
}),
|
|
964
|
+
/* @__PURE__ */ z(ee, {
|
|
965
|
+
open: D,
|
|
966
|
+
onOpenChange: O,
|
|
967
|
+
variant: "danger",
|
|
968
|
+
loading: $,
|
|
969
|
+
title: r("devportal.removePickupAddressConfirmTitle", "Remove this pickup address?"),
|
|
970
|
+
description: r("devportal.removePickupAddressConfirmDesc", "We'll stop using it to quote and book shipments for this organization — you can register a different address any time. 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."),
|
|
971
|
+
confirmLabel: r("devportal.remove", "Remove"),
|
|
972
|
+
cancelLabel: r("devportal.cancel", "Cancel"),
|
|
973
|
+
onConfirm: async () => {
|
|
974
|
+
await Te(""), O(!1);
|
|
961
975
|
}
|
|
962
976
|
})
|
|
963
977
|
] });
|
|
964
978
|
})()
|
|
965
979
|
})
|
|
966
980
|
}),
|
|
967
|
-
/* @__PURE__ */
|
|
981
|
+
/* @__PURE__ */ B(d, {
|
|
968
982
|
title: r("devportal.verificationStatus", "Verification Status"),
|
|
969
|
-
children: [/* @__PURE__ */
|
|
983
|
+
children: [/* @__PURE__ */ z(_, { items: [{
|
|
970
984
|
label: r("devportal.verifiedLabel", "Verified"),
|
|
971
|
-
value:
|
|
985
|
+
value: Y.verificationStatus === "VERIFIED" ? /* @__PURE__ */ B("span", {
|
|
972
986
|
className: "text-status-success-text flex items-center gap-1",
|
|
973
987
|
children: [
|
|
974
|
-
/* @__PURE__ */
|
|
988
|
+
/* @__PURE__ */ z(k, { size: 14 }),
|
|
975
989
|
" ",
|
|
976
990
|
r("devportal.verifiedVia", "Verified via"),
|
|
977
991
|
" ",
|
|
978
|
-
|
|
992
|
+
Y.verificationMethod
|
|
979
993
|
]
|
|
980
|
-
}) :
|
|
994
|
+
}) : Y.verificationStatus === "PENDING" ? r("devportal.pendingVerification", "Pending verification") : Y.verificationStatus === "REJECTED" ? r("devportal.verificationRejected", "Rejected") : r("devportal.notVerified", "Not verified")
|
|
981
995
|
}, {
|
|
982
996
|
label: r("devportal.certifiedLabel", "Certified"),
|
|
983
|
-
value: e.isCertified ? /* @__PURE__ */
|
|
997
|
+
value: e.isCertified ? /* @__PURE__ */ B("span", {
|
|
984
998
|
className: "text-accent-blue flex items-center gap-1",
|
|
985
999
|
children: [
|
|
986
|
-
/* @__PURE__ */
|
|
1000
|
+
/* @__PURE__ */ z(F, { size: 14 }),
|
|
987
1001
|
" ",
|
|
988
1002
|
r("devportal.certifiedUntil", "Certified until"),
|
|
989
1003
|
" ",
|
|
990
1004
|
e.certificationExpiry ? new Date(e.certificationExpiry).toLocaleDateString() : "N/A"
|
|
991
1005
|
]
|
|
992
1006
|
}) : r("devportal.notCertified", "Not certified")
|
|
993
|
-
}] }),
|
|
1007
|
+
}] }), Y.verificationStatus !== "VERIFIED" && /* @__PURE__ */ z("div", {
|
|
994
1008
|
className: "mt-4 rounded-md border border-border-subtle p-4 space-y-3",
|
|
995
|
-
children:
|
|
1009
|
+
children: H ? /* @__PURE__ */ B("p", {
|
|
996
1010
|
className: "text-sm text-status-success-text flex items-center gap-2",
|
|
997
|
-
children: [/* @__PURE__ */
|
|
998
|
-
}) : /* @__PURE__ */
|
|
999
|
-
/* @__PURE__ */
|
|
1011
|
+
children: [/* @__PURE__ */ z(k, { size: 14 }), r("devportal.verificationRequested", "Verification request submitted. Our team will review and contact you.")]
|
|
1012
|
+
}) : /* @__PURE__ */ B(R, { children: [
|
|
1013
|
+
/* @__PURE__ */ z("p", {
|
|
1000
1014
|
className: "text-sm text-text-secondary",
|
|
1001
1015
|
children: r("devportal.requestVerificationHint", "Get your organization verified to build trust with users. Choose a verification method:")
|
|
1002
1016
|
}),
|
|
1003
|
-
|
|
1017
|
+
Y.verificationStatus === "PENDING" && /* @__PURE__ */ B("div", {
|
|
1004
1018
|
className: "rounded-md border border-border-subtle bg-bg-sunken/40 p-3 text-sm text-text-secondary",
|
|
1005
1019
|
children: [
|
|
1006
1020
|
r("devportal.pendingVerification", "Pending verification"),
|
|
1007
|
-
|
|
1008
|
-
|
|
1021
|
+
Y.verificationMethod ? ` · ${Y.verificationMethod}` : "",
|
|
1022
|
+
Y.verificationRequestNotes ? ` · ${Y.verificationRequestNotes}` : ""
|
|
1009
1023
|
]
|
|
1010
1024
|
}),
|
|
1011
|
-
|
|
1025
|
+
Y.verificationStatus === "REJECTED" && Y.verificationRejectedReason && /* @__PURE__ */ z("div", {
|
|
1012
1026
|
className: "rounded-md border border-status-error-border bg-status-error-bg-subtle p-3 text-sm text-status-error-text",
|
|
1013
|
-
children:
|
|
1027
|
+
children: Y.verificationRejectedReason
|
|
1014
1028
|
}),
|
|
1015
|
-
|
|
1029
|
+
X.length > 0 && /* @__PURE__ */ B("div", {
|
|
1016
1030
|
className: "rounded-md border border-border-subtle bg-bg-sunken/40 p-3 text-sm text-text-secondary",
|
|
1017
|
-
children: [/* @__PURE__ */
|
|
1031
|
+
children: [/* @__PURE__ */ z("div", {
|
|
1018
1032
|
className: "font-medium text-text-primary",
|
|
1019
1033
|
children: r("devportal.completeBeforeVerification", "Complete these details before submitting for review")
|
|
1020
|
-
}), /* @__PURE__ */
|
|
1034
|
+
}), /* @__PURE__ */ z("ul", {
|
|
1021
1035
|
className: "mt-2 list-disc pl-5 space-y-1",
|
|
1022
|
-
children:
|
|
1036
|
+
children: X.map((e) => /* @__PURE__ */ z("li", { children: e }, e))
|
|
1023
1037
|
})]
|
|
1024
1038
|
}),
|
|
1025
|
-
|
|
1026
|
-
/* @__PURE__ */
|
|
1039
|
+
Y.verificationStatus !== "PENDING" && /* @__PURE__ */ B(R, { children: [
|
|
1040
|
+
/* @__PURE__ */ z("div", {
|
|
1027
1041
|
className: "flex gap-2 flex-wrap",
|
|
1028
1042
|
children: [
|
|
1029
1043
|
"domain",
|
|
1030
1044
|
"document",
|
|
1031
1045
|
"manual"
|
|
1032
|
-
].map((e) => /* @__PURE__ */
|
|
1046
|
+
].map((e) => /* @__PURE__ */ z("button", {
|
|
1033
1047
|
type: "button",
|
|
1034
|
-
onClick: () =>
|
|
1035
|
-
className: `rounded-md border px-3 py-1 text-xs font-medium transition-colors ${
|
|
1048
|
+
onClick: () => ae(e),
|
|
1049
|
+
className: `rounded-md border px-3 py-1 text-xs font-medium transition-colors ${L === e ? "bg-action-primary-bg text-action-primary-text border-primary" : "border-border-subtle hover:bg-bg-sunken"}`,
|
|
1036
1050
|
children: e === "domain" ? r("devportal.domainVerification", "Domain") : e === "document" ? r("devportal.documentVerification", "Document") : r("devportal.manualVerification", "Manual review")
|
|
1037
1051
|
}, e))
|
|
1038
1052
|
}),
|
|
1039
|
-
|
|
1053
|
+
L === "domain" ? /* @__PURE__ */ z(v, {
|
|
1040
1054
|
label: r("devportal.domainVerification", "Domain"),
|
|
1041
1055
|
value: q,
|
|
1042
|
-
onChange: (e) =>
|
|
1056
|
+
onChange: (e) => pe(e.target.value),
|
|
1043
1057
|
placeholder: "example.com"
|
|
1044
|
-
}) :
|
|
1058
|
+
}) : L === "document" ? /* @__PURE__ */ z(v, {
|
|
1045
1059
|
label: r("devportal.evidenceUrl", "Evidence URL"),
|
|
1046
|
-
value:
|
|
1047
|
-
onChange: (e) =>
|
|
1060
|
+
value: K,
|
|
1061
|
+
onChange: (e) => fe(e.target.value),
|
|
1048
1062
|
placeholder: "https://..."
|
|
1049
1063
|
}) : null,
|
|
1050
|
-
/* @__PURE__ */
|
|
1064
|
+
/* @__PURE__ */ z(y, {
|
|
1051
1065
|
label: r("devportal.notes", "Notes"),
|
|
1052
|
-
value:
|
|
1053
|
-
onChange: (e) =>
|
|
1066
|
+
value: W,
|
|
1067
|
+
onChange: (e) => le(e.target.value),
|
|
1054
1068
|
placeholder: "What should reviewers validate?"
|
|
1055
1069
|
}),
|
|
1056
|
-
/* @__PURE__ */
|
|
1070
|
+
/* @__PURE__ */ B("button", {
|
|
1057
1071
|
type: "button",
|
|
1058
|
-
disabled: !
|
|
1072
|
+
disabled: !_e,
|
|
1059
1073
|
onClick: () => void (async () => {
|
|
1060
|
-
let t = q.trim(), n =
|
|
1061
|
-
if (
|
|
1062
|
-
|
|
1074
|
+
let t = q.trim(), n = K.trim(), a = W.trim();
|
|
1075
|
+
if (L === "domain" && !ue(t)) {
|
|
1076
|
+
I(r("devportal.verification.errors.domainRequired", "Enter a valid domain like burdenoff.com"));
|
|
1063
1077
|
return;
|
|
1064
1078
|
}
|
|
1065
|
-
if (
|
|
1066
|
-
|
|
1079
|
+
if (L === "document" && !G(n)) {
|
|
1080
|
+
I(r("devportal.verification.errors.evidenceUrlRequired", "Enter a valid evidence URL starting with http:// or https://"));
|
|
1067
1081
|
return;
|
|
1068
1082
|
}
|
|
1069
|
-
if (
|
|
1070
|
-
|
|
1083
|
+
if (L === "manual" && !a) {
|
|
1084
|
+
I(r("devportal.verification.errors.notesRequired", "Add notes so the reviewer knows what to verify"));
|
|
1071
1085
|
return;
|
|
1072
1086
|
}
|
|
1073
|
-
|
|
1087
|
+
I(null), j(null), ge(!0);
|
|
1074
1088
|
try {
|
|
1075
|
-
await
|
|
1089
|
+
await Q({ variables: {
|
|
1076
1090
|
id: e.id,
|
|
1077
1091
|
input: {
|
|
1078
1092
|
name: i.name.trim() || void 0,
|
|
@@ -1083,47 +1097,47 @@ var q = {
|
|
|
1083
1097
|
logoUrl: i.logoUrl.trim() || null,
|
|
1084
1098
|
bannerUrl: i.bannerUrl.trim() || null
|
|
1085
1099
|
}
|
|
1086
|
-
} }), await
|
|
1100
|
+
} }), await ve({ variables: {
|
|
1087
1101
|
id: e.id,
|
|
1088
1102
|
input: {
|
|
1089
1103
|
legalEntityName: o.legalEntityName.trim() || null,
|
|
1090
1104
|
legalEntityType: o.legalEntityType.trim() || null
|
|
1091
1105
|
}
|
|
1092
|
-
} }), await
|
|
1106
|
+
} }), await be({ variables: {
|
|
1093
1107
|
id: e.id,
|
|
1094
1108
|
input: {
|
|
1095
1109
|
taxId: f.taxId.trim() || null,
|
|
1096
1110
|
taxCountry: f.taxCountry.trim() || null
|
|
1097
1111
|
}
|
|
1098
1112
|
} });
|
|
1099
|
-
let s = await
|
|
1113
|
+
let s = await U({
|
|
1100
1114
|
gateway: "global",
|
|
1101
|
-
query:
|
|
1115
|
+
query: ce,
|
|
1102
1116
|
variables: {
|
|
1103
1117
|
id: e.id,
|
|
1104
|
-
method:
|
|
1118
|
+
method: L,
|
|
1105
1119
|
notes: a || null,
|
|
1106
|
-
evidenceUrl:
|
|
1107
|
-
domain:
|
|
1120
|
+
evidenceUrl: L === "domain" ? null : n || null,
|
|
1121
|
+
domain: L === "domain" && t || null
|
|
1108
1122
|
}
|
|
1109
1123
|
});
|
|
1110
1124
|
if (s.errors?.length) throw Error(s.errors[0]?.message || "Verification request failed");
|
|
1111
|
-
|
|
1125
|
+
oe(!0), j(r("devportal.verificationRequested", "Verification request submitted. Our team will review and contact you.")), J((await U({
|
|
1112
1126
|
gateway: "global",
|
|
1113
|
-
query:
|
|
1127
|
+
query: se,
|
|
1114
1128
|
variables: { id: e.id }
|
|
1115
1129
|
})).data?.developerOrganization ?? null);
|
|
1116
1130
|
} catch (e) {
|
|
1117
|
-
|
|
1131
|
+
I(e instanceof Error ? e.message : r("devportal.verificationRequestFailed", "Verification request failed"));
|
|
1118
1132
|
} finally {
|
|
1119
|
-
|
|
1133
|
+
ge(!1);
|
|
1120
1134
|
}
|
|
1121
1135
|
})(),
|
|
1122
1136
|
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",
|
|
1123
|
-
children: [
|
|
1137
|
+
children: [he ? /* @__PURE__ */ z(M, {
|
|
1124
1138
|
size: 14,
|
|
1125
1139
|
className: "animate-spin"
|
|
1126
|
-
}) : /* @__PURE__ */
|
|
1140
|
+
}) : /* @__PURE__ */ z(F, { size: 14 }), r("devportal.requestVerification", "Request Verification")]
|
|
1127
1141
|
})
|
|
1128
1142
|
] })
|
|
1129
1143
|
] })
|
|
@@ -1133,6 +1147,6 @@ var q = {
|
|
|
1133
1147
|
});
|
|
1134
1148
|
};
|
|
1135
1149
|
//#endregion
|
|
1136
|
-
export {
|
|
1150
|
+
export { fe as OrganizationDetailPage };
|
|
1137
1151
|
|
|
1138
1152
|
//# sourceMappingURL=OrganizationDetailPage.js.map
|