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