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