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