@burdenoff/microfe-devportal 2026.915.3 → 2026.915.5
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 +22 -0
- package/dist/devportal/components/RegisterPickupLocationModal.d.ts.map +1 -0
- package/dist/devportal/components/RegisterPickupLocationModal.js +197 -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/CreateOrganizationPage.d.ts.map +1 -1
- package/dist/devportal/pages/CreateOrganizationPage.js +76 -83
- 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 +309 -298
- package/dist/devportal/pages/OrganizationDetailPage.js.map +1 -1
- package/package.json +1 -1
|
@@ -8,20 +8,21 @@ import { ORG_ROLE_LABELS as f } from "../utils/constants.js";
|
|
|
8
8
|
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
|
-
import { InputField as v,
|
|
11
|
+
import { InputField as v, TextareaField as y } from "../components/FormField.js";
|
|
12
|
+
import { RegisterPickupLocationModal as ee } from "../components/RegisterPickupLocationModal.js";
|
|
12
13
|
import { useDevportalPermission as te } from "../hooks/usePermission.js";
|
|
13
14
|
import { capitalizeCarrierName as b, useCarrierPickupLocations as x } from "../hooks/useCarrierPickupLocations.js";
|
|
14
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
|
-
], { data:
|
|
147
|
+
], { data: y, previousData: ee, loading: te, error: b } = o({
|
|
147
148
|
variables: { id: p },
|
|
148
149
|
skip: !p
|
|
149
|
-
}), x =
|
|
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,
|
|
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(de, { 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
|
+
}, de = ({ 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 } = x(), [w, T] = C(
|
|
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, de] = C(!1), X = 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
|
}, Z = [];
|
|
574
|
-
i.contactEmail.trim() ?
|
|
575
|
+
i.contactEmail.trim() ? ce(i.contactEmail) || Z.push(r("devportal.contactEmailInvalid", "Contact email must be valid")) : Z.push(r("devportal.contactEmailRequired", "Contact email is required")), i.supportEmail.trim() && !ce(i.supportEmail) && Z.push(r("devportal.supportEmailInvalid", "Support email must be valid")), i.websiteUrl.trim() ? K(i.websiteUrl) || Z.push(r("devportal.websiteInvalid", "Website URL must be valid")) : Z.push(r("devportal.websiteRequired", "Website URL is required")), o.legalEntityName.trim() || Z.push(r("devportal.legalEntityNameRequired", "Legal entity name is required")), o.legalEntityType.trim() || Z.push(r("devportal.legalEntityTypeRequired", "Entity type is required")), f.taxId.trim() || Z.push(r("devportal.taxIdRequired", "Tax ID is required")), f.taxCountry.trim() ? /^[A-Za-z]{2}$/.test(f.taxCountry.trim()) || Z.push(r("devportal.taxCountryInvalid", "Tax country must be a 2-letter code")) : Z.push(r("devportal.taxCountryRequired", "Tax country is required"));
|
|
575
576
|
let Q = [];
|
|
576
|
-
|
|
577
|
-
let
|
|
577
|
+
M === "domain" && !se(q.trim()) && Q.push(r("devportal.verification.errors.domainRequired", "Enter a valid domain like burdenoff.com")), M === "document" && !K(G.trim()) && Q.push(r("devportal.verification.errors.evidenceUrlRequired", "Enter a valid evidence URL starting with http:// or https://")), M === "manual" && !V.trim() && Q.push(r("devportal.verification.errors.notesRequired", "Add notes so the reviewer knows what to verify"));
|
|
578
|
+
let fe = Z.length === 0 && Q.length === 0 && !Y && n, [pe, { loading: $ }] = 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 pe({ 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 () => {
|
|
647
|
+
A(null), D(null);
|
|
647
648
|
try {
|
|
648
|
-
await
|
|
649
|
+
await pe({ variables: {
|
|
649
650
|
id: e.id,
|
|
650
651
|
input: { pickupPostalCode: m.pickupPostalCode.trim() || null }
|
|
651
|
-
} }),
|
|
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
785
|
disabled: !n || $,
|
|
785
|
-
onClick: () => void
|
|
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: [$ ? /* @__PURE__ */
|
|
788
|
+
children: [$ ? /* @__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,36 +879,46 @@ 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
|
+
children: /* @__PURE__ */ z("div", {
|
|
884
885
|
className: "space-y-4",
|
|
885
|
-
children: [
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
886
|
+
children: [(() => {
|
|
887
|
+
let e = m.pickupPostalCode.trim(), t = g.find((t) => t.postalCode === e), i = g.length > 0, a = e.length > 0 && i && !t, o = e.length === 0 || !i ? void 0 : t ? `${r("devportal.pickupPostalCodeRegistered", "Registered with")} ${b(t.carrier)} — ${r("devportal.pickupPostalCodeRegisteredSuffix", "ready for automated shipping.")}` : r("devportal.pickupPostalCodeNotRegistered", "This pincode isn't registered with our shipping carrier yet — physical orders can't auto-ship until it's added.");
|
|
888
|
+
return /* @__PURE__ */ z("div", {
|
|
889
|
+
className: "space-y-2",
|
|
890
|
+
children: [
|
|
891
|
+
/* @__PURE__ */ R(v, {
|
|
892
|
+
label: r("devportal.pickupPostalCode", "Pickup Pincode"),
|
|
893
|
+
value: m.pickupPostalCode,
|
|
894
|
+
onChange: (e) => h({ pickupPostalCode: e.target.value }),
|
|
895
|
+
disabled: !n,
|
|
896
|
+
error: t ? void 0 : o,
|
|
897
|
+
hint: t ? o : r("devportal.pickupPostalCodeHint", "The postal code your physical orders actually ship from — used to quote real carrier shipping rates. If left blank, we fall back to your linked billing account's address.")
|
|
898
|
+
}),
|
|
899
|
+
a && n && /* @__PURE__ */ R("button", {
|
|
900
|
+
type: "button",
|
|
901
|
+
onClick: () => T(!0),
|
|
902
|
+
className: "text-sm font-medium text-action-primary-text hover:underline",
|
|
903
|
+
children: r("devportal.registerPickupAddressCta", "Register this address with Shiprocket")
|
|
904
|
+
}),
|
|
905
|
+
w && /* @__PURE__ */ R(ee, {
|
|
906
|
+
open: w,
|
|
907
|
+
onOpenChange: T,
|
|
908
|
+
postalCode: e,
|
|
909
|
+
carrier: "shiprocket",
|
|
910
|
+
onRegistered: re
|
|
911
|
+
})
|
|
912
|
+
]
|
|
913
|
+
});
|
|
914
|
+
})(), /* @__PURE__ */ R("div", {
|
|
904
915
|
className: "flex justify-end",
|
|
905
|
-
children: /* @__PURE__ */
|
|
916
|
+
children: /* @__PURE__ */ z("button", {
|
|
906
917
|
type: "button",
|
|
907
918
|
disabled: !n || $,
|
|
908
|
-
onClick: () => void
|
|
919
|
+
onClick: () => void xe(),
|
|
909
920
|
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",
|
|
910
|
-
children: [$ ? /* @__PURE__ */
|
|
921
|
+
children: [$ ? /* @__PURE__ */ R(j, {
|
|
911
922
|
size: 14,
|
|
912
923
|
className: "animate-spin"
|
|
913
924
|
}) : null, r("devportal.saveFulfillmentInfo", "Save Fulfillment Settings")]
|
|
@@ -915,14 +926,14 @@ var Y = {
|
|
|
915
926
|
})]
|
|
916
927
|
})
|
|
917
928
|
}),
|
|
918
|
-
/* @__PURE__ */
|
|
929
|
+
/* @__PURE__ */ z(d, {
|
|
919
930
|
title: r("devportal.verificationStatus", "Verification Status"),
|
|
920
|
-
children: [/* @__PURE__ */
|
|
931
|
+
children: [/* @__PURE__ */ R(_, { items: [{
|
|
921
932
|
label: r("devportal.verifiedLabel", "Verified"),
|
|
922
|
-
value: X.verificationStatus === "VERIFIED" ? /* @__PURE__ */
|
|
933
|
+
value: X.verificationStatus === "VERIFIED" ? /* @__PURE__ */ z("span", {
|
|
923
934
|
className: "text-status-success-text flex items-center gap-1",
|
|
924
935
|
children: [
|
|
925
|
-
/* @__PURE__ */
|
|
936
|
+
/* @__PURE__ */ R(O, { size: 14 }),
|
|
926
937
|
" ",
|
|
927
938
|
r("devportal.verifiedVia", "Verified via"),
|
|
928
939
|
" ",
|
|
@@ -931,27 +942,27 @@ var Y = {
|
|
|
931
942
|
}) : X.verificationStatus === "PENDING" ? r("devportal.pendingVerification", "Pending verification") : X.verificationStatus === "REJECTED" ? r("devportal.verificationRejected", "Rejected") : r("devportal.notVerified", "Not verified")
|
|
932
943
|
}, {
|
|
933
944
|
label: r("devportal.certifiedLabel", "Certified"),
|
|
934
|
-
value: e.isCertified ? /* @__PURE__ */
|
|
945
|
+
value: e.isCertified ? /* @__PURE__ */ z("span", {
|
|
935
946
|
className: "text-accent-blue flex items-center gap-1",
|
|
936
947
|
children: [
|
|
937
|
-
/* @__PURE__ */
|
|
948
|
+
/* @__PURE__ */ R(P, { size: 14 }),
|
|
938
949
|
" ",
|
|
939
950
|
r("devportal.certifiedUntil", "Certified until"),
|
|
940
951
|
" ",
|
|
941
952
|
e.certificationExpiry ? new Date(e.certificationExpiry).toLocaleDateString() : "N/A"
|
|
942
953
|
]
|
|
943
954
|
}) : r("devportal.notCertified", "Not certified")
|
|
944
|
-
}] }), X.verificationStatus !== "VERIFIED" && /* @__PURE__ */
|
|
955
|
+
}] }), X.verificationStatus !== "VERIFIED" && /* @__PURE__ */ R("div", {
|
|
945
956
|
className: "mt-4 rounded-md border border-border-subtle p-4 space-y-3",
|
|
946
|
-
children:
|
|
957
|
+
children: I ? /* @__PURE__ */ z("p", {
|
|
947
958
|
className: "text-sm text-status-success-text flex items-center gap-2",
|
|
948
|
-
children: [/* @__PURE__ */
|
|
949
|
-
}) : /* @__PURE__ */
|
|
950
|
-
/* @__PURE__ */
|
|
959
|
+
children: [/* @__PURE__ */ R(O, { size: 14 }), r("devportal.verificationRequested", "Verification request submitted. Our team will review and contact you.")]
|
|
960
|
+
}) : /* @__PURE__ */ z(L, { children: [
|
|
961
|
+
/* @__PURE__ */ R("p", {
|
|
951
962
|
className: "text-sm text-text-secondary",
|
|
952
963
|
children: r("devportal.requestVerificationHint", "Get your organization verified to build trust with users. Choose a verification method:")
|
|
953
964
|
}),
|
|
954
|
-
X.verificationStatus === "PENDING" && /* @__PURE__ */
|
|
965
|
+
X.verificationStatus === "PENDING" && /* @__PURE__ */ z("div", {
|
|
955
966
|
className: "rounded-md border border-border-subtle bg-bg-sunken/40 p-3 text-sm text-text-secondary",
|
|
956
967
|
children: [
|
|
957
968
|
r("devportal.pendingVerification", "Pending verification"),
|
|
@@ -959,71 +970,71 @@ var Y = {
|
|
|
959
970
|
X.verificationRequestNotes ? ` · ${X.verificationRequestNotes}` : ""
|
|
960
971
|
]
|
|
961
972
|
}),
|
|
962
|
-
X.verificationStatus === "REJECTED" && X.verificationRejectedReason && /* @__PURE__ */
|
|
973
|
+
X.verificationStatus === "REJECTED" && X.verificationRejectedReason && /* @__PURE__ */ R("div", {
|
|
963
974
|
className: "rounded-md border border-status-error-border bg-status-error-bg-subtle p-3 text-sm text-status-error-text",
|
|
964
975
|
children: X.verificationRejectedReason
|
|
965
976
|
}),
|
|
966
|
-
Z.length > 0 && /* @__PURE__ */
|
|
977
|
+
Z.length > 0 && /* @__PURE__ */ z("div", {
|
|
967
978
|
className: "rounded-md border border-border-subtle bg-bg-sunken/40 p-3 text-sm text-text-secondary",
|
|
968
|
-
children: [/* @__PURE__ */
|
|
979
|
+
children: [/* @__PURE__ */ R("div", {
|
|
969
980
|
className: "font-medium text-text-primary",
|
|
970
981
|
children: r("devportal.completeBeforeVerification", "Complete these details before submitting for review")
|
|
971
|
-
}), /* @__PURE__ */
|
|
982
|
+
}), /* @__PURE__ */ R("ul", {
|
|
972
983
|
className: "mt-2 list-disc pl-5 space-y-1",
|
|
973
|
-
children: Z.map((e) => /* @__PURE__ */
|
|
984
|
+
children: Z.map((e) => /* @__PURE__ */ R("li", { children: e }, e))
|
|
974
985
|
})]
|
|
975
986
|
}),
|
|
976
|
-
X.verificationStatus !== "PENDING" && /* @__PURE__ */
|
|
977
|
-
/* @__PURE__ */
|
|
987
|
+
X.verificationStatus !== "PENDING" && /* @__PURE__ */ z(L, { children: [
|
|
988
|
+
/* @__PURE__ */ R("div", {
|
|
978
989
|
className: "flex gap-2 flex-wrap",
|
|
979
990
|
children: [
|
|
980
991
|
"domain",
|
|
981
992
|
"document",
|
|
982
993
|
"manual"
|
|
983
|
-
].map((e) => /* @__PURE__ */
|
|
994
|
+
].map((e) => /* @__PURE__ */ R("button", {
|
|
984
995
|
type: "button",
|
|
985
|
-
onClick: () =>
|
|
986
|
-
className: `rounded-md border px-3 py-1 text-xs font-medium transition-colors ${
|
|
996
|
+
onClick: () => F(e),
|
|
997
|
+
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"}`,
|
|
987
998
|
children: e === "domain" ? r("devportal.domainVerification", "Domain") : e === "document" ? r("devportal.documentVerification", "Document") : r("devportal.manualVerification", "Manual review")
|
|
988
999
|
}, e))
|
|
989
1000
|
}),
|
|
990
|
-
|
|
1001
|
+
M === "domain" ? /* @__PURE__ */ R(v, {
|
|
991
1002
|
label: r("devportal.domainVerification", "Domain"),
|
|
992
|
-
value:
|
|
993
|
-
onChange: (e) =>
|
|
1003
|
+
value: q,
|
|
1004
|
+
onChange: (e) => le(e.target.value),
|
|
994
1005
|
placeholder: "example.com"
|
|
995
|
-
}) :
|
|
1006
|
+
}) : M === "document" ? /* @__PURE__ */ R(v, {
|
|
996
1007
|
label: r("devportal.evidenceUrl", "Evidence URL"),
|
|
997
|
-
value:
|
|
998
|
-
onChange: (e) =>
|
|
1008
|
+
value: G,
|
|
1009
|
+
onChange: (e) => oe(e.target.value),
|
|
999
1010
|
placeholder: "https://..."
|
|
1000
1011
|
}) : null,
|
|
1001
|
-
/* @__PURE__ */
|
|
1012
|
+
/* @__PURE__ */ R(y, {
|
|
1002
1013
|
label: r("devportal.notes", "Notes"),
|
|
1003
|
-
value:
|
|
1004
|
-
onChange: (e) =>
|
|
1014
|
+
value: V,
|
|
1015
|
+
onChange: (e) => ae(e.target.value),
|
|
1005
1016
|
placeholder: "What should reviewers validate?"
|
|
1006
1017
|
}),
|
|
1007
|
-
/* @__PURE__ */
|
|
1018
|
+
/* @__PURE__ */ z("button", {
|
|
1008
1019
|
type: "button",
|
|
1009
|
-
disabled: !
|
|
1020
|
+
disabled: !fe,
|
|
1010
1021
|
onClick: () => void (async () => {
|
|
1011
|
-
let t =
|
|
1012
|
-
if (
|
|
1013
|
-
|
|
1022
|
+
let t = q.trim(), n = G.trim(), a = V.trim();
|
|
1023
|
+
if (M === "domain" && !se(t)) {
|
|
1024
|
+
A(r("devportal.verification.errors.domainRequired", "Enter a valid domain like burdenoff.com"));
|
|
1014
1025
|
return;
|
|
1015
1026
|
}
|
|
1016
|
-
if (
|
|
1017
|
-
|
|
1027
|
+
if (M === "document" && !K(n)) {
|
|
1028
|
+
A(r("devportal.verification.errors.evidenceUrlRequired", "Enter a valid evidence URL starting with http:// or https://"));
|
|
1018
1029
|
return;
|
|
1019
1030
|
}
|
|
1020
|
-
if (
|
|
1021
|
-
|
|
1031
|
+
if (M === "manual" && !a) {
|
|
1032
|
+
A(r("devportal.verification.errors.notesRequired", "Add notes so the reviewer knows what to verify"));
|
|
1022
1033
|
return;
|
|
1023
1034
|
}
|
|
1024
|
-
|
|
1035
|
+
A(null), D(null), de(!0);
|
|
1025
1036
|
try {
|
|
1026
|
-
await
|
|
1037
|
+
await pe({ variables: {
|
|
1027
1038
|
id: e.id,
|
|
1028
1039
|
input: {
|
|
1029
1040
|
name: i.name.trim() || void 0,
|
|
@@ -1034,47 +1045,47 @@ var Y = {
|
|
|
1034
1045
|
logoUrl: i.logoUrl.trim() || null,
|
|
1035
1046
|
bannerUrl: i.bannerUrl.trim() || null
|
|
1036
1047
|
}
|
|
1037
|
-
} }), await
|
|
1048
|
+
} }), await me({ variables: {
|
|
1038
1049
|
id: e.id,
|
|
1039
1050
|
input: {
|
|
1040
1051
|
legalEntityName: o.legalEntityName.trim() || null,
|
|
1041
1052
|
legalEntityType: o.legalEntityType.trim() || null
|
|
1042
1053
|
}
|
|
1043
|
-
} }), await
|
|
1054
|
+
} }), await ge({ variables: {
|
|
1044
1055
|
id: e.id,
|
|
1045
1056
|
input: {
|
|
1046
1057
|
taxId: f.taxId.trim() || null,
|
|
1047
1058
|
taxCountry: f.taxCountry.trim() || null
|
|
1048
1059
|
}
|
|
1049
1060
|
} });
|
|
1050
|
-
let s = await
|
|
1061
|
+
let s = await H({
|
|
1051
1062
|
gateway: "global",
|
|
1052
|
-
query:
|
|
1063
|
+
query: W,
|
|
1053
1064
|
variables: {
|
|
1054
1065
|
id: e.id,
|
|
1055
|
-
method:
|
|
1066
|
+
method: M,
|
|
1056
1067
|
notes: a || null,
|
|
1057
|
-
evidenceUrl:
|
|
1058
|
-
domain:
|
|
1068
|
+
evidenceUrl: M === "domain" ? null : n || null,
|
|
1069
|
+
domain: M === "domain" && t || null
|
|
1059
1070
|
}
|
|
1060
1071
|
});
|
|
1061
1072
|
if (s.errors?.length) throw Error(s.errors[0]?.message || "Verification request failed");
|
|
1062
|
-
|
|
1073
|
+
ie(!0), D(r("devportal.verificationRequested", "Verification request submitted. Our team will review and contact you.")), J((await H({
|
|
1063
1074
|
gateway: "global",
|
|
1064
|
-
query:
|
|
1075
|
+
query: U,
|
|
1065
1076
|
variables: { id: e.id }
|
|
1066
1077
|
})).data?.developerOrganization ?? null);
|
|
1067
1078
|
} catch (e) {
|
|
1068
|
-
|
|
1079
|
+
A(e instanceof Error ? e.message : r("devportal.verificationRequestFailed", "Verification request failed"));
|
|
1069
1080
|
} finally {
|
|
1070
|
-
|
|
1081
|
+
de(!1);
|
|
1071
1082
|
}
|
|
1072
1083
|
})(),
|
|
1073
1084
|
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",
|
|
1074
|
-
children: [
|
|
1085
|
+
children: [Y ? /* @__PURE__ */ R(j, {
|
|
1075
1086
|
size: 14,
|
|
1076
1087
|
className: "animate-spin"
|
|
1077
|
-
}) : /* @__PURE__ */
|
|
1088
|
+
}) : /* @__PURE__ */ R(P, { size: 14 }), r("devportal.requestVerification", "Request Verification")]
|
|
1078
1089
|
})
|
|
1079
1090
|
] })
|
|
1080
1091
|
] })
|
|
@@ -1084,6 +1095,6 @@ var Y = {
|
|
|
1084
1095
|
});
|
|
1085
1096
|
};
|
|
1086
1097
|
//#endregion
|
|
1087
|
-
export {
|
|
1098
|
+
export { le as OrganizationDetailPage };
|
|
1088
1099
|
|
|
1089
1100
|
//# sourceMappingURL=OrganizationDetailPage.js.map
|