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