@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
|
@@ -4,17 +4,18 @@ import { PageLayout as n } from "../components/PageLayout.js";
|
|
|
4
4
|
import { ReportOrderIssueModal as r } from "../components/ReportOrderIssueModal.js";
|
|
5
5
|
import { PermissionGuard as i } from "../components/PermissionGuard.js";
|
|
6
6
|
import "../components/index.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
7
|
+
import { formatCurrency as a } from "../utils/currency.js";
|
|
8
|
+
import { useCallback as ee, useEffect as o, useMemo as s, useState as c } from "react";
|
|
9
|
+
import { AlertCircle as l, CheckCircle2 as u, ChevronDown as d, Flag as f, Loader2 as p, Package as m, ShoppingBag as te } from "lucide-react";
|
|
10
|
+
import { Fragment as ne, jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
11
|
+
import { useI18n as re } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
11
12
|
//#region src/devportal/pages/SellerOrdersPage.tsx
|
|
12
13
|
var ie = {
|
|
13
14
|
OUT_OF_STOCK: "Out of stock",
|
|
14
15
|
CANNOT_FULFILL: "Cannot fulfill",
|
|
15
16
|
WRONG_ADDRESS: "Wrong address",
|
|
16
17
|
OTHER: "Other"
|
|
17
|
-
},
|
|
18
|
+
}, _ = {
|
|
18
19
|
PENDING: {
|
|
19
20
|
label: "Pending",
|
|
20
21
|
className: "text-status-warning-text bg-status-warning-bg-subtle"
|
|
@@ -43,7 +44,7 @@ var ie = {
|
|
|
43
44
|
label: "Cancelled",
|
|
44
45
|
className: "text-text-muted bg-bg-muted"
|
|
45
46
|
}
|
|
46
|
-
},
|
|
47
|
+
}, v = [
|
|
47
48
|
{
|
|
48
49
|
value: "",
|
|
49
50
|
label: "All Orders"
|
|
@@ -72,18 +73,11 @@ var ie = {
|
|
|
72
73
|
value: "CANCELLED",
|
|
73
74
|
label: "Cancelled"
|
|
74
75
|
}
|
|
75
|
-
], ae = "\n query SellerOrdersOrgs {\n myDeveloperOrganizations {\n id\n name\n slug\n kind\n }\n }\n", oe = "\n query SellerOrders($organizationId: ID!, $status: SaleStatus, $limit: Int, $offset: Int) {\n developerOrgSales(\n organizationId: $organizationId\n status: $status\n limit: $limit\n offset: $offset\n ) {\n totalCount\n edges {\n node {\n id\n storeOrderId\n storeProductId\n grossAmount\n netAmount\n platformFee\n currency\n status\n buyerUserId\n purchasedAt\n refundAmount\n refundedAt\n refundReason\n discountAmount\n taxAmount\n }\n }\n pageInfo { hasNextPage hasPreviousPage }\n }\n }\n",
|
|
76
|
-
function
|
|
77
|
-
return `query SellerOrderIssueFlags {\n ${e.map((e, t) => `f${t}: orderIssueFlags(orderId: ${JSON.stringify(e)}) { ${
|
|
76
|
+
], ae = "\n query SellerOrdersOrgs {\n myDeveloperOrganizations {\n id\n name\n slug\n kind\n }\n }\n", oe = "\n query SellerOrders($organizationId: ID!, $status: SaleStatus, $limit: Int, $offset: Int) {\n developerOrgSales(\n organizationId: $organizationId\n status: $status\n limit: $limit\n offset: $offset\n ) {\n totalCount\n edges {\n node {\n id\n storeOrderId\n storeProductId\n grossAmount\n netAmount\n platformFee\n currency\n status\n buyerUserId\n purchasedAt\n refundAmount\n refundedAt\n refundReason\n discountAmount\n taxAmount\n }\n }\n pageInfo { hasNextPage hasPreviousPage }\n }\n }\n", y = "\n mutation ResolveOrderIssue($id: ID!, $organizationId: ID) {\n resolveOrderIssueFlag(id: $id, organizationId: $organizationId) {\n id\n status\n }\n }\n", b = "id category note status raisedByOrgId createdAt";
|
|
77
|
+
function x(e) {
|
|
78
|
+
return `query SellerOrderIssueFlags {\n ${e.map((e, t) => `f${t}: orderIssueFlags(orderId: ${JSON.stringify(e)}) { ${b} }`).join("\n ")}\n }`;
|
|
78
79
|
}
|
|
79
|
-
function
|
|
80
|
-
return new Intl.NumberFormat("en-US", {
|
|
81
|
-
style: "currency",
|
|
82
|
-
currency: t || "USD",
|
|
83
|
-
minimumFractionDigits: 2
|
|
84
|
-
}).format(e);
|
|
85
|
-
}
|
|
86
|
-
function ce(e) {
|
|
80
|
+
function se(e) {
|
|
87
81
|
return new Date(e).toLocaleDateString("en-US", {
|
|
88
82
|
year: "numeric",
|
|
89
83
|
month: "short",
|
|
@@ -92,17 +86,17 @@ function ce(e) {
|
|
|
92
86
|
minute: "2-digit"
|
|
93
87
|
});
|
|
94
88
|
}
|
|
95
|
-
function
|
|
89
|
+
function ce(e, t) {
|
|
96
90
|
return e ? `#${e.slice(0, 8).toUpperCase()}` : `#${t.slice(0, 8).toUpperCase()}`;
|
|
97
91
|
}
|
|
98
|
-
var
|
|
99
|
-
let { apiGatewayUrl:
|
|
100
|
-
let n =
|
|
92
|
+
var S = () => {
|
|
93
|
+
let { apiGatewayUrl: b, authToken: S } = e(), { t: le } = re(), C = (e, t) => {
|
|
94
|
+
let n = le(e);
|
|
101
95
|
return n === e ? t : n;
|
|
102
|
-
}, w =
|
|
96
|
+
}, w = b ?? "/global/graphql", [T, E] = c(!0), [D, ue] = c([]), [O, k] = c(null), [A, j] = c(!1), [M, N] = c([]), [P, F] = c(0), [I, L] = c(null), [R, z] = c(0), [B, V] = c(""), [H, U] = c(0), W = s(() => ({
|
|
103
97
|
"Content-Type": "application/json",
|
|
104
|
-
Authorization: `Bearer ${
|
|
105
|
-
}), [
|
|
98
|
+
Authorization: `Bearer ${S ?? ""}`
|
|
99
|
+
}), [S]);
|
|
106
100
|
o(() => {
|
|
107
101
|
let e = !1;
|
|
108
102
|
return E(!0), (async () => {
|
|
@@ -165,7 +159,7 @@ var x = () => {
|
|
|
165
159
|
W,
|
|
166
160
|
R
|
|
167
161
|
]);
|
|
168
|
-
let G = s(() => M.filter((e) => e.storeProductId !== null), [M]), [de, K] = c({}), [q, J] = c(null), [Y, X] = c(null), Z = s(() => G.map((e) => e.storeOrderId).filter((e) => e !== null), [G]), Q =
|
|
162
|
+
let G = s(() => M.filter((e) => e.storeProductId !== null), [M]), [de, K] = c({}), [q, J] = c(null), [Y, X] = c(null), Z = s(() => G.map((e) => e.storeOrderId).filter((e) => e !== null), [G]), Q = ee(async () => {
|
|
169
163
|
if (Z.length === 0) {
|
|
170
164
|
K({});
|
|
171
165
|
return;
|
|
@@ -174,7 +168,7 @@ var x = () => {
|
|
|
174
168
|
let e = await (await fetch(w, {
|
|
175
169
|
method: "POST",
|
|
176
170
|
headers: W,
|
|
177
|
-
body: JSON.stringify({ query:
|
|
171
|
+
body: JSON.stringify({ query: x(Z) })
|
|
178
172
|
})).json(), t = {};
|
|
179
173
|
Z.forEach((n, r) => {
|
|
180
174
|
t[n] = e.data?.[`f${r}`] ?? [];
|
|
@@ -195,7 +189,7 @@ var x = () => {
|
|
|
195
189
|
method: "POST",
|
|
196
190
|
headers: W,
|
|
197
191
|
body: JSON.stringify({
|
|
198
|
-
query:
|
|
192
|
+
query: y,
|
|
199
193
|
variables: {
|
|
200
194
|
id: e,
|
|
201
195
|
organizationId: t
|
|
@@ -214,64 +208,64 @@ var x = () => {
|
|
|
214
208
|
refunded: e.filter((e) => e.status === "REFUNDED" || e.status === "PARTIAL_REFUND").length
|
|
215
209
|
};
|
|
216
210
|
}, [G, P]);
|
|
217
|
-
return T ? /* @__PURE__ */
|
|
211
|
+
return T ? /* @__PURE__ */ h(n, {
|
|
218
212
|
title: C("devportal.orders", "Orders"),
|
|
219
|
-
children: /* @__PURE__ */
|
|
213
|
+
children: /* @__PURE__ */ h("div", {
|
|
220
214
|
className: "flex items-center justify-center py-20",
|
|
221
|
-
children: /* @__PURE__ */ p
|
|
215
|
+
children: /* @__PURE__ */ h(p, { className: "h-8 w-8 animate-spin text-text-secondary" })
|
|
222
216
|
})
|
|
223
|
-
}) : D.length === 0 ? /* @__PURE__ */
|
|
217
|
+
}) : D.length === 0 ? /* @__PURE__ */ h(n, {
|
|
224
218
|
title: C("devportal.orders", "Orders"),
|
|
225
219
|
description: C("devportal.ordersDesc", "Orders placed by customers for your physical items."),
|
|
226
|
-
children: /* @__PURE__ */
|
|
220
|
+
children: /* @__PURE__ */ h(t, {
|
|
227
221
|
illustration: "empty-generic",
|
|
228
|
-
icon: /* @__PURE__ */
|
|
222
|
+
icon: /* @__PURE__ */ h(te, { size: 32 }),
|
|
229
223
|
title: C("devportal.noOrgForOrders", "No organization yet"),
|
|
230
224
|
description: C("devportal.createOrgToSell", "Create a developer organization to start selling physical products and receive orders.")
|
|
231
225
|
})
|
|
232
|
-
}) : /* @__PURE__ */
|
|
226
|
+
}) : /* @__PURE__ */ g(i, {
|
|
233
227
|
authOnly: !0,
|
|
234
|
-
children: [/* @__PURE__ */
|
|
228
|
+
children: [/* @__PURE__ */ g(n, {
|
|
235
229
|
title: C("devportal.orders", "Orders"),
|
|
236
230
|
description: C("devportal.ordersDesc", "Orders placed by customers for your physical items."),
|
|
237
231
|
children: [
|
|
238
|
-
/* @__PURE__ */
|
|
232
|
+
/* @__PURE__ */ g("div", {
|
|
239
233
|
className: "flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-6",
|
|
240
|
-
children: [D.length > 1 && /* @__PURE__ */
|
|
234
|
+
children: [D.length > 1 && /* @__PURE__ */ g("div", {
|
|
241
235
|
className: "relative",
|
|
242
|
-
children: [/* @__PURE__ */
|
|
236
|
+
children: [/* @__PURE__ */ h("select", {
|
|
243
237
|
value: O ?? "",
|
|
244
238
|
onChange: (e) => {
|
|
245
239
|
k(e.target.value), U(0);
|
|
246
240
|
},
|
|
247
241
|
className: "appearance-none rounded-md border border-border-seam bg-bg-surface pl-3 pr-8 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-primary",
|
|
248
|
-
children: D.map((e) => /* @__PURE__ */
|
|
242
|
+
children: D.map((e) => /* @__PURE__ */ h("option", {
|
|
249
243
|
value: e.id,
|
|
250
244
|
children: e.name
|
|
251
245
|
}, e.id))
|
|
252
|
-
}), /* @__PURE__ */
|
|
246
|
+
}), /* @__PURE__ */ h(d, {
|
|
253
247
|
size: 14,
|
|
254
248
|
className: "pointer-events-none absolute right-2.5 top-1/2 -translate-y-1/2 text-text-muted"
|
|
255
249
|
})]
|
|
256
|
-
}), /* @__PURE__ */
|
|
250
|
+
}), /* @__PURE__ */ g("div", {
|
|
257
251
|
className: "relative",
|
|
258
|
-
children: [/* @__PURE__ */
|
|
252
|
+
children: [/* @__PURE__ */ h("select", {
|
|
259
253
|
value: B,
|
|
260
254
|
onChange: (e) => {
|
|
261
255
|
V(e.target.value), U(0);
|
|
262
256
|
},
|
|
263
257
|
className: "appearance-none rounded-md border border-border-seam bg-bg-surface pl-3 pr-8 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-primary",
|
|
264
|
-
children:
|
|
258
|
+
children: v.map((e) => /* @__PURE__ */ h("option", {
|
|
265
259
|
value: e.value,
|
|
266
260
|
children: e.label
|
|
267
261
|
}, e.value))
|
|
268
|
-
}), /* @__PURE__ */
|
|
262
|
+
}), /* @__PURE__ */ h(d, {
|
|
269
263
|
size: 14,
|
|
270
264
|
className: "pointer-events-none absolute right-2.5 top-1/2 -translate-y-1/2 text-text-muted"
|
|
271
265
|
})]
|
|
272
266
|
})]
|
|
273
267
|
}),
|
|
274
|
-
/* @__PURE__ */
|
|
268
|
+
/* @__PURE__ */ h("div", {
|
|
275
269
|
className: "grid grid-cols-2 gap-3 sm:grid-cols-4 mb-6",
|
|
276
270
|
children: [
|
|
277
271
|
{
|
|
@@ -293,161 +287,161 @@ var x = () => {
|
|
|
293
287
|
value: $.refunded,
|
|
294
288
|
color: "text-status-error-text"
|
|
295
289
|
}
|
|
296
|
-
].map((e) => /* @__PURE__ */
|
|
290
|
+
].map((e) => /* @__PURE__ */ g("div", {
|
|
297
291
|
className: "rounded-lg border border-border-seam bg-bg-surface px-4 py-3",
|
|
298
|
-
children: [/* @__PURE__ */
|
|
292
|
+
children: [/* @__PURE__ */ h("p", {
|
|
299
293
|
className: `text-xs ${e.color ?? "text-text-secondary"}`,
|
|
300
294
|
children: e.label
|
|
301
|
-
}), /* @__PURE__ */
|
|
295
|
+
}), /* @__PURE__ */ h("p", {
|
|
302
296
|
className: "mt-1 text-xl font-semibold tabular-nums",
|
|
303
|
-
children: A ? /* @__PURE__ */ p
|
|
297
|
+
children: A ? /* @__PURE__ */ h(p, { className: "h-4 w-4 animate-spin text-text-secondary" }) : e.value
|
|
304
298
|
})]
|
|
305
299
|
}, e.label))
|
|
306
300
|
}),
|
|
307
|
-
I && /* @__PURE__ */
|
|
301
|
+
I && /* @__PURE__ */ g("div", {
|
|
308
302
|
className: "mb-4 flex items-center gap-3 rounded-lg border border-status-error-border/50 bg-status-error-bg/10 px-4 py-3 text-sm",
|
|
309
303
|
children: [
|
|
310
|
-
/* @__PURE__ */
|
|
304
|
+
/* @__PURE__ */ h(l, {
|
|
311
305
|
size: 16,
|
|
312
306
|
className: "shrink-0 text-status-error-text"
|
|
313
307
|
}),
|
|
314
|
-
/* @__PURE__ */
|
|
308
|
+
/* @__PURE__ */ h("span", {
|
|
315
309
|
className: "text-status-error-text",
|
|
316
310
|
children: I
|
|
317
311
|
}),
|
|
318
|
-
/* @__PURE__ */
|
|
312
|
+
/* @__PURE__ */ h("button", {
|
|
319
313
|
onClick: () => z((e) => e + 1),
|
|
320
314
|
className: "ml-auto text-xs font-medium text-status-error-text underline",
|
|
321
315
|
children: "Retry"
|
|
322
316
|
})
|
|
323
317
|
]
|
|
324
318
|
}),
|
|
325
|
-
A ? /* @__PURE__ */
|
|
319
|
+
A ? /* @__PURE__ */ h("div", {
|
|
326
320
|
className: "flex items-center justify-center py-16",
|
|
327
|
-
children: /* @__PURE__ */ p
|
|
328
|
-
}) : G.length === 0 ? /* @__PURE__ */
|
|
321
|
+
children: /* @__PURE__ */ h(p, { className: "h-6 w-6 animate-spin text-text-secondary" })
|
|
322
|
+
}) : G.length === 0 ? /* @__PURE__ */ h(t, {
|
|
329
323
|
illustration: "empty-data",
|
|
330
|
-
icon: /* @__PURE__ */
|
|
324
|
+
icon: /* @__PURE__ */ h(m, { size: 32 }),
|
|
331
325
|
title: B ? C("devportal.noOrdersForFilter", "No orders match this filter") : C("devportal.noOrdersYet", "No orders yet"),
|
|
332
326
|
description: B ? C("devportal.tryDifferentFilter", "Try selecting a different status filter") : C("devportal.ordersWillAppear", "Orders placed for your physical items will appear here once customers make purchases.")
|
|
333
|
-
}) : /* @__PURE__ */
|
|
327
|
+
}) : /* @__PURE__ */ g(ne, { children: [/* @__PURE__ */ h("div", {
|
|
334
328
|
className: "overflow-x-auto rounded-lg border border-border-seam",
|
|
335
|
-
children: /* @__PURE__ */
|
|
329
|
+
children: /* @__PURE__ */ g("table", {
|
|
336
330
|
className: "w-full text-sm",
|
|
337
|
-
children: [/* @__PURE__ */
|
|
331
|
+
children: [/* @__PURE__ */ h("thead", { children: /* @__PURE__ */ g("tr", {
|
|
338
332
|
className: "border-b border-border-seam bg-bg-sunken",
|
|
339
333
|
children: [
|
|
340
|
-
/* @__PURE__ */
|
|
334
|
+
/* @__PURE__ */ h("th", {
|
|
341
335
|
className: "px-4 py-3 text-left font-medium text-text-secondary",
|
|
342
336
|
children: "Order"
|
|
343
337
|
}),
|
|
344
|
-
/* @__PURE__ */
|
|
338
|
+
/* @__PURE__ */ h("th", {
|
|
345
339
|
className: "px-4 py-3 text-left font-medium text-text-secondary",
|
|
346
340
|
children: "Product ID"
|
|
347
341
|
}),
|
|
348
|
-
/* @__PURE__ */
|
|
342
|
+
/* @__PURE__ */ h("th", {
|
|
349
343
|
className: "px-4 py-3 text-left font-medium text-text-secondary",
|
|
350
344
|
children: "Buyer"
|
|
351
345
|
}),
|
|
352
|
-
/* @__PURE__ */
|
|
346
|
+
/* @__PURE__ */ h("th", {
|
|
353
347
|
className: "px-4 py-3 text-right font-medium text-text-secondary",
|
|
354
348
|
children: "Gross"
|
|
355
349
|
}),
|
|
356
|
-
/* @__PURE__ */
|
|
350
|
+
/* @__PURE__ */ h("th", {
|
|
357
351
|
className: "px-4 py-3 text-right font-medium text-text-secondary",
|
|
358
352
|
children: "Your Earnings"
|
|
359
353
|
}),
|
|
360
|
-
/* @__PURE__ */
|
|
354
|
+
/* @__PURE__ */ h("th", {
|
|
361
355
|
className: "px-4 py-3 text-left font-medium text-text-secondary",
|
|
362
356
|
children: "Status"
|
|
363
357
|
}),
|
|
364
|
-
/* @__PURE__ */
|
|
358
|
+
/* @__PURE__ */ h("th", {
|
|
365
359
|
className: "px-4 py-3 text-left font-medium text-text-secondary",
|
|
366
360
|
children: "Date"
|
|
367
361
|
}),
|
|
368
|
-
/* @__PURE__ */
|
|
362
|
+
/* @__PURE__ */ h("th", {
|
|
369
363
|
className: "px-4 py-3 text-left font-medium text-text-secondary",
|
|
370
364
|
children: "Fulfillment Issue"
|
|
371
365
|
})
|
|
372
366
|
]
|
|
373
|
-
}) }), /* @__PURE__ */
|
|
374
|
-
let t =
|
|
375
|
-
return /* @__PURE__ */
|
|
367
|
+
}) }), /* @__PURE__ */ h("tbody", { children: G.map((e) => {
|
|
368
|
+
let t = _[e.status] ?? _.PENDING, n = e.storeOrderId ? de[e.storeOrderId] ?? [] : [], r = n.find((e) => e.status === "OPEN");
|
|
369
|
+
return /* @__PURE__ */ g("tr", {
|
|
376
370
|
className: "border-b border-border-subtle last:border-0 hover:bg-bg-sunken/50 transition-colors",
|
|
377
371
|
children: [
|
|
378
|
-
/* @__PURE__ */
|
|
372
|
+
/* @__PURE__ */ h("td", {
|
|
379
373
|
className: "px-4 py-3",
|
|
380
|
-
children: /* @__PURE__ */
|
|
374
|
+
children: /* @__PURE__ */ h("span", {
|
|
381
375
|
className: "font-mono text-xs font-semibold text-text-primary",
|
|
382
|
-
children:
|
|
376
|
+
children: ce(e.storeOrderId, e.id)
|
|
383
377
|
})
|
|
384
378
|
}),
|
|
385
|
-
/* @__PURE__ */
|
|
379
|
+
/* @__PURE__ */ h("td", {
|
|
386
380
|
className: "px-4 py-3",
|
|
387
|
-
children: /* @__PURE__ */
|
|
381
|
+
children: /* @__PURE__ */ h("span", {
|
|
388
382
|
className: "font-mono text-xs text-text-secondary",
|
|
389
383
|
children: e.storeProductId ? `…${e.storeProductId.slice(-8)}` : "—"
|
|
390
384
|
})
|
|
391
385
|
}),
|
|
392
|
-
/* @__PURE__ */
|
|
386
|
+
/* @__PURE__ */ h("td", {
|
|
393
387
|
className: "px-4 py-3",
|
|
394
|
-
children: /* @__PURE__ */
|
|
388
|
+
children: /* @__PURE__ */ h("span", {
|
|
395
389
|
className: "font-mono text-xs text-text-secondary",
|
|
396
390
|
children: `…${e.buyerUserId.slice(-8)}`
|
|
397
391
|
})
|
|
398
392
|
}),
|
|
399
|
-
/* @__PURE__ */
|
|
393
|
+
/* @__PURE__ */ h("td", {
|
|
400
394
|
className: "px-4 py-3 text-right tabular-nums text-text-primary",
|
|
401
|
-
children:
|
|
395
|
+
children: a(e.grossAmount, e.currency)
|
|
402
396
|
}),
|
|
403
|
-
/* @__PURE__ */
|
|
397
|
+
/* @__PURE__ */ h("td", {
|
|
404
398
|
className: "px-4 py-3 text-right tabular-nums text-status-success-text",
|
|
405
|
-
children:
|
|
399
|
+
children: a(e.netAmount, e.currency)
|
|
406
400
|
}),
|
|
407
|
-
/* @__PURE__ */
|
|
401
|
+
/* @__PURE__ */ g("td", {
|
|
408
402
|
className: "px-4 py-3",
|
|
409
|
-
children: [/* @__PURE__ */
|
|
403
|
+
children: [/* @__PURE__ */ h("span", {
|
|
410
404
|
className: `rounded-full px-2.5 py-0.5 text-xs font-medium ${t.className}`,
|
|
411
405
|
children: t.label
|
|
412
|
-
}), e.refundAmount != null && e.refundAmount > 0 && /* @__PURE__ */
|
|
406
|
+
}), e.refundAmount != null && e.refundAmount > 0 && /* @__PURE__ */ g("p", {
|
|
413
407
|
className: "mt-0.5 text-[11px] text-status-error-text",
|
|
414
408
|
children: [
|
|
415
409
|
"Refunded",
|
|
416
410
|
" ",
|
|
417
|
-
|
|
411
|
+
a(e.refundAmount, e.currency)
|
|
418
412
|
]
|
|
419
413
|
})]
|
|
420
414
|
}),
|
|
421
|
-
/* @__PURE__ */
|
|
415
|
+
/* @__PURE__ */ h("td", {
|
|
422
416
|
className: "px-4 py-3 text-xs text-text-secondary whitespace-nowrap",
|
|
423
|
-
children:
|
|
417
|
+
children: se(e.purchasedAt)
|
|
424
418
|
}),
|
|
425
|
-
/* @__PURE__ */
|
|
419
|
+
/* @__PURE__ */ h("td", {
|
|
426
420
|
className: "px-4 py-3",
|
|
427
|
-
children: e.storeOrderId ? r ? /* @__PURE__ */
|
|
421
|
+
children: e.storeOrderId ? r ? /* @__PURE__ */ g("div", {
|
|
428
422
|
className: "flex items-center gap-2",
|
|
429
|
-
children: [/* @__PURE__ */
|
|
423
|
+
children: [/* @__PURE__ */ g("span", {
|
|
430
424
|
title: r.note ?? void 0,
|
|
431
425
|
className: "flex items-center gap-1 rounded-full bg-status-warning-bg-subtle px-2.5 py-0.5 text-xs font-medium text-status-warning-text",
|
|
432
|
-
children: [/* @__PURE__ */
|
|
433
|
-
}), r.raisedByOrgId === O && /* @__PURE__ */
|
|
426
|
+
children: [/* @__PURE__ */ h(f, { size: 11 }), ie[r.category]]
|
|
427
|
+
}), r.raisedByOrgId === O && /* @__PURE__ */ h("button", {
|
|
434
428
|
onClick: () => void fe(r.id, r.raisedByOrgId),
|
|
435
429
|
disabled: Y === r.id,
|
|
436
430
|
className: "text-xs font-medium text-text-secondary underline hover:text-text-primary disabled:opacity-50",
|
|
437
|
-
children: Y === r.id ? /* @__PURE__ */ p
|
|
431
|
+
children: Y === r.id ? /* @__PURE__ */ h(p, { className: "h-3 w-3 animate-spin" }) : "Mark Resolved"
|
|
438
432
|
})]
|
|
439
|
-
}) : /* @__PURE__ */
|
|
433
|
+
}) : /* @__PURE__ */ g("div", {
|
|
440
434
|
className: "flex items-center gap-2",
|
|
441
|
-
children: [n.length > 0 && /* @__PURE__ */
|
|
435
|
+
children: [n.length > 0 && /* @__PURE__ */ g("span", {
|
|
442
436
|
title: "Previously reported and resolved",
|
|
443
437
|
className: "flex items-center gap-1 text-xs text-status-success-text",
|
|
444
|
-
children: [/* @__PURE__ */
|
|
445
|
-
}), /* @__PURE__ */
|
|
438
|
+
children: [/* @__PURE__ */ h(u, { size: 11 }), "Resolved"]
|
|
439
|
+
}), /* @__PURE__ */ h("button", {
|
|
446
440
|
onClick: () => J(e.storeOrderId),
|
|
447
441
|
className: "text-xs font-medium text-text-secondary underline hover:text-text-primary",
|
|
448
442
|
children: "Report Issue"
|
|
449
443
|
})]
|
|
450
|
-
}) : /* @__PURE__ */
|
|
444
|
+
}) : /* @__PURE__ */ h("span", {
|
|
451
445
|
className: "text-xs text-text-muted",
|
|
452
446
|
children: "—"
|
|
453
447
|
})
|
|
@@ -456,9 +450,9 @@ var x = () => {
|
|
|
456
450
|
}, e.id);
|
|
457
451
|
}) })]
|
|
458
452
|
})
|
|
459
|
-
}), P > 25 && /* @__PURE__ */
|
|
453
|
+
}), P > 25 && /* @__PURE__ */ g("div", {
|
|
460
454
|
className: "mt-4 flex items-center justify-between text-sm",
|
|
461
|
-
children: [/* @__PURE__ */
|
|
455
|
+
children: [/* @__PURE__ */ g("span", {
|
|
462
456
|
className: "text-text-secondary",
|
|
463
457
|
children: [
|
|
464
458
|
"Showing ",
|
|
@@ -468,14 +462,14 @@ var x = () => {
|
|
|
468
462
|
" of ",
|
|
469
463
|
P
|
|
470
464
|
]
|
|
471
|
-
}), /* @__PURE__ */
|
|
465
|
+
}), /* @__PURE__ */ g("div", {
|
|
472
466
|
className: "flex items-center gap-2",
|
|
473
|
-
children: [/* @__PURE__ */
|
|
467
|
+
children: [/* @__PURE__ */ h("button", {
|
|
474
468
|
disabled: H === 0,
|
|
475
469
|
onClick: () => U((e) => e - 1),
|
|
476
470
|
className: "rounded-md border border-border-seam px-3 py-1.5 text-xs font-medium text-text-secondary hover:bg-bg-sunken disabled:opacity-40 disabled:cursor-not-allowed transition-colors",
|
|
477
471
|
children: "Previous"
|
|
478
|
-
}), /* @__PURE__ */
|
|
472
|
+
}), /* @__PURE__ */ h("button", {
|
|
479
473
|
disabled: (H + 1) * 25 >= P,
|
|
480
474
|
onClick: () => U((e) => e + 1),
|
|
481
475
|
className: "rounded-md border border-border-seam px-3 py-1.5 text-xs font-medium text-text-secondary hover:bg-bg-sunken disabled:opacity-40 disabled:cursor-not-allowed transition-colors",
|
|
@@ -484,7 +478,7 @@ var x = () => {
|
|
|
484
478
|
})]
|
|
485
479
|
})] })
|
|
486
480
|
]
|
|
487
|
-
}), O && /* @__PURE__ */
|
|
481
|
+
}), O && /* @__PURE__ */ h(r, {
|
|
488
482
|
open: q !== null,
|
|
489
483
|
onOpenChange: (e) => {
|
|
490
484
|
e || J(null);
|
|
@@ -498,6 +492,6 @@ var x = () => {
|
|
|
498
492
|
});
|
|
499
493
|
};
|
|
500
494
|
//#endregion
|
|
501
|
-
export {
|
|
495
|
+
export { S as SellerOrdersPage };
|
|
502
496
|
|
|
503
497
|
//# sourceMappingURL=SellerOrdersPage.js.map
|