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