@burdenoff/microfe-devportal 2026.914.6 → 2026.915.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/devportal/components/ReportOrderIssueModal.d.ts +20 -0
- package/dist/devportal/components/ReportOrderIssueModal.d.ts.map +1 -0
- package/dist/devportal/components/ReportOrderIssueModal.js +157 -0
- package/dist/devportal/components/ReportOrderIssueModal.js.map +1 -0
- package/dist/devportal/components/index.d.ts +1 -0
- package/dist/devportal/components/index.d.ts.map +1 -1
- package/dist/devportal/components/index.js +1 -0
- package/dist/devportal/hooks/usePackageUpload.d.ts.map +1 -1
- package/dist/devportal/hooks/usePackageUpload.js.map +1 -1
- package/dist/devportal/pages/CreateOrganizationPage.d.ts.map +1 -1
- package/dist/devportal/pages/CreateOrganizationPage.js +11 -2
- package/dist/devportal/pages/CreateOrganizationPage.js.map +1 -1
- package/dist/devportal/pages/EditApplicationPage.d.ts.map +1 -1
- package/dist/devportal/pages/EditApplicationPage.js +4 -0
- package/dist/devportal/pages/EditApplicationPage.js.map +1 -1
- package/dist/devportal/pages/OrganizationDetailPage.d.ts.map +1 -1
- package/dist/devportal/pages/OrganizationDetailPage.js +145 -109
- package/dist/devportal/pages/OrganizationDetailPage.js.map +1 -1
- package/dist/devportal/pages/PublishPage.d.ts.map +1 -1
- package/dist/devportal/pages/PublishPage.js.map +1 -1
- package/dist/devportal/pages/RevenueDashboardPage.d.ts.map +1 -1
- package/dist/devportal/pages/RevenueDashboardPage.js +478 -258
- package/dist/devportal/pages/RevenueDashboardPage.js.map +1 -1
- package/dist/devportal/pages/SellerItemsPage.d.ts.map +1 -1
- package/dist/devportal/pages/SellerItemsPage.js.map +1 -1
- package/dist/devportal/pages/SellerOrdersPage.d.ts.map +1 -1
- package/dist/devportal/pages/SellerOrdersPage.js +186 -93
- package/dist/devportal/pages/SellerOrdersPage.js.map +1 -1
- package/dist/devportal/types/index.d.ts +1 -0
- package/dist/devportal/types/index.d.ts.map +1 -1
- package/dist/devportal/types/index.js.map +1 -1
- package/dist/generated/global-operations.d.ts +16 -0
- package/dist/generated/global-operations.d.ts.map +1 -1
- package/dist/generated/global-operations.js +74 -46
- package/dist/generated/global-operations.js.map +1 -1
- package/dist/generated/global-types.d.ts +15 -0
- package/dist/generated/global-types.d.ts.map +1 -1
- package/dist/generated/global-types.js +8 -0
- package/dist/generated/global-types.js.map +1 -0
- package/package.json +1 -1
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
import { useDevportal as e } from "../providers/DevportalProvider.js";
|
|
2
2
|
import { EmptyState as t } from "../components/EmptyState.js";
|
|
3
3
|
import { PageLayout as n } from "../components/PageLayout.js";
|
|
4
|
-
import {
|
|
4
|
+
import { ReportOrderIssueModal as r } from "../components/ReportOrderIssueModal.js";
|
|
5
|
+
import { PermissionGuard as i } from "../components/PermissionGuard.js";
|
|
5
6
|
import "../components/index.js";
|
|
6
|
-
import { useEffect as
|
|
7
|
-
import { AlertCircle as
|
|
8
|
-
import { Fragment as
|
|
7
|
+
import { useCallback as a, useEffect as o, useMemo as s, useState as c } from "react";
|
|
8
|
+
import { AlertCircle as l, CheckCircle2 as ee, ChevronDown as u, Flag as d, Loader2 as f, Package as te, ShoppingBag as ne } from "lucide-react";
|
|
9
|
+
import { Fragment as re, jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
9
10
|
import { useI18n as h } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
10
11
|
//#region src/devportal/pages/SellerOrdersPage.tsx
|
|
11
|
-
var
|
|
12
|
+
var ie = {
|
|
13
|
+
OUT_OF_STOCK: "Out of stock",
|
|
14
|
+
CANNOT_FULFILL: "Cannot fulfill",
|
|
15
|
+
WRONG_ADDRESS: "Wrong address",
|
|
16
|
+
OTHER: "Other"
|
|
17
|
+
}, g = {
|
|
12
18
|
PENDING: {
|
|
13
19
|
label: "Pending",
|
|
14
20
|
className: "text-status-warning-text bg-status-warning-bg-subtle"
|
|
@@ -66,7 +72,10 @@ var g = {
|
|
|
66
72
|
value: "CANCELLED",
|
|
67
73
|
label: "Cancelled"
|
|
68
74
|
}
|
|
69
|
-
],
|
|
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", se = "\n mutation ResolveOrderIssue($id: ID!, $organizationId: ID) {\n resolveOrderIssueFlag(id: $id, organizationId: $organizationId) {\n id\n status\n }\n }\n", v = "id category note status raisedByOrgId createdAt";
|
|
76
|
+
function y(e) {
|
|
77
|
+
return `query SellerOrderIssueFlags {\n ${e.map((e, t) => `f${t}: orderIssueFlags(orderId: ${JSON.stringify(e)}) { ${v} }`).join("\n ")}\n }`;
|
|
78
|
+
}
|
|
70
79
|
function b(e, t) {
|
|
71
80
|
return new Intl.NumberFormat("en-US", {
|
|
72
81
|
style: "currency",
|
|
@@ -74,7 +83,7 @@ function b(e, t) {
|
|
|
74
83
|
minimumFractionDigits: 2
|
|
75
84
|
}).format(e);
|
|
76
85
|
}
|
|
77
|
-
function
|
|
86
|
+
function ce(e) {
|
|
78
87
|
return new Date(e).toLocaleDateString("en-US", {
|
|
79
88
|
year: "numeric",
|
|
80
89
|
month: "short",
|
|
@@ -83,51 +92,51 @@ function x(e) {
|
|
|
83
92
|
minute: "2-digit"
|
|
84
93
|
});
|
|
85
94
|
}
|
|
86
|
-
function
|
|
95
|
+
function le(e, t) {
|
|
87
96
|
return e ? `#${e.slice(0, 8).toUpperCase()}` : `#${t.slice(0, 8).toUpperCase()}`;
|
|
88
97
|
}
|
|
89
|
-
var
|
|
90
|
-
let { apiGatewayUrl:
|
|
91
|
-
let n =
|
|
98
|
+
var x = () => {
|
|
99
|
+
let { apiGatewayUrl: v, authToken: x } = e(), { t: S } = h(), C = (e, t) => {
|
|
100
|
+
let n = S(e);
|
|
92
101
|
return n === e ? t : n;
|
|
93
|
-
},
|
|
102
|
+
}, w = v ?? "/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(() => ({
|
|
94
103
|
"Content-Type": "application/json",
|
|
95
|
-
Authorization: `Bearer ${
|
|
96
|
-
}), [
|
|
97
|
-
|
|
104
|
+
Authorization: `Bearer ${x ?? ""}`
|
|
105
|
+
}), [x]);
|
|
106
|
+
o(() => {
|
|
98
107
|
let e = !1;
|
|
99
|
-
return
|
|
108
|
+
return E(!0), (async () => {
|
|
100
109
|
try {
|
|
101
|
-
let t = await (await fetch(
|
|
110
|
+
let t = await (await fetch(w, {
|
|
102
111
|
method: "POST",
|
|
103
|
-
headers:
|
|
104
|
-
body: JSON.stringify({ query:
|
|
112
|
+
headers: W,
|
|
113
|
+
body: JSON.stringify({ query: ae })
|
|
105
114
|
})).json();
|
|
106
115
|
if (e) return;
|
|
107
116
|
let n = (t.data?.myDeveloperOrganizations ?? []).filter((e) => e.kind === "PHYSICAL");
|
|
108
|
-
|
|
117
|
+
ue(n), n.length > 0 && k(n[0].id);
|
|
109
118
|
} catch {} finally {
|
|
110
|
-
e ||
|
|
119
|
+
e || E(!1);
|
|
111
120
|
}
|
|
112
121
|
})(), () => {
|
|
113
122
|
e = !0;
|
|
114
123
|
};
|
|
115
|
-
}, [
|
|
116
|
-
if (!
|
|
124
|
+
}, [w, W]), o(() => {
|
|
125
|
+
if (!O) return;
|
|
117
126
|
let e = !1;
|
|
118
|
-
return
|
|
127
|
+
return j(!0), L(null), (async () => {
|
|
119
128
|
try {
|
|
120
129
|
let t = {
|
|
121
|
-
organizationId:
|
|
130
|
+
organizationId: O,
|
|
122
131
|
limit: 25,
|
|
123
|
-
offset:
|
|
132
|
+
offset: H * 25
|
|
124
133
|
};
|
|
125
|
-
|
|
126
|
-
let n = await fetch(
|
|
134
|
+
B && (t.status = B);
|
|
135
|
+
let n = await fetch(w, {
|
|
127
136
|
method: "POST",
|
|
128
|
-
headers:
|
|
137
|
+
headers: W,
|
|
129
138
|
body: JSON.stringify({
|
|
130
|
-
query:
|
|
139
|
+
query: oe,
|
|
131
140
|
variables: t
|
|
132
141
|
})
|
|
133
142
|
});
|
|
@@ -136,87 +145,127 @@ var C = () => {
|
|
|
136
145
|
if (e) return;
|
|
137
146
|
if (r.errors?.length) throw Error(r.errors[0]?.message ?? "GraphQL error");
|
|
138
147
|
let i = r.data?.developerOrgSales;
|
|
139
|
-
|
|
148
|
+
F(i?.totalCount ?? 0), N((i?.edges ?? []).map((e) => ({
|
|
140
149
|
...e.node,
|
|
141
150
|
status: e.node.status
|
|
142
151
|
})));
|
|
143
152
|
} catch (t) {
|
|
144
|
-
e ||
|
|
153
|
+
e || L(t instanceof Error ? t.message : "Failed to load orders");
|
|
145
154
|
} finally {
|
|
146
|
-
e ||
|
|
155
|
+
e || j(!1);
|
|
147
156
|
}
|
|
148
157
|
})(), () => {
|
|
149
158
|
e = !0;
|
|
150
159
|
};
|
|
151
160
|
}, [
|
|
152
|
-
|
|
161
|
+
O,
|
|
162
|
+
B,
|
|
163
|
+
H,
|
|
164
|
+
w,
|
|
165
|
+
W,
|
|
166
|
+
R
|
|
167
|
+
]);
|
|
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 = a(async () => {
|
|
169
|
+
if (Z.length === 0) {
|
|
170
|
+
K({});
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
try {
|
|
174
|
+
let e = await (await fetch(w, {
|
|
175
|
+
method: "POST",
|
|
176
|
+
headers: W,
|
|
177
|
+
body: JSON.stringify({ query: y(Z) })
|
|
178
|
+
})).json(), t = {};
|
|
179
|
+
Z.forEach((n, r) => {
|
|
180
|
+
t[n] = e.data?.[`f${r}`] ?? [];
|
|
181
|
+
}), K(t);
|
|
182
|
+
} catch {}
|
|
183
|
+
}, [
|
|
184
|
+
w,
|
|
153
185
|
W,
|
|
154
|
-
|
|
155
|
-
D,
|
|
156
|
-
J,
|
|
157
|
-
H
|
|
186
|
+
Z
|
|
158
187
|
]);
|
|
159
|
-
|
|
160
|
-
|
|
188
|
+
o(() => {
|
|
189
|
+
Q();
|
|
190
|
+
}, [Q]);
|
|
191
|
+
let fe = async (e, t) => {
|
|
192
|
+
X(e);
|
|
193
|
+
try {
|
|
194
|
+
await fetch(w, {
|
|
195
|
+
method: "POST",
|
|
196
|
+
headers: W,
|
|
197
|
+
body: JSON.stringify({
|
|
198
|
+
query: se,
|
|
199
|
+
variables: {
|
|
200
|
+
id: e,
|
|
201
|
+
organizationId: t
|
|
202
|
+
}
|
|
203
|
+
})
|
|
204
|
+
}), await Q();
|
|
205
|
+
} finally {
|
|
206
|
+
X(null);
|
|
207
|
+
}
|
|
208
|
+
}, $ = s(() => {
|
|
209
|
+
let e = G;
|
|
161
210
|
return {
|
|
162
|
-
total:
|
|
211
|
+
total: P,
|
|
163
212
|
pending: e.filter((e) => e.status === "PENDING").length,
|
|
164
213
|
completed: e.filter((e) => e.status === "COMPLETED").length,
|
|
165
214
|
refunded: e.filter((e) => e.status === "REFUNDED" || e.status === "PARTIAL_REFUND").length
|
|
166
215
|
};
|
|
167
|
-
}, [
|
|
168
|
-
return
|
|
169
|
-
title:
|
|
216
|
+
}, [G, P]);
|
|
217
|
+
return T ? /* @__PURE__ */ p(n, {
|
|
218
|
+
title: C("devportal.orders", "Orders"),
|
|
170
219
|
children: /* @__PURE__ */ p("div", {
|
|
171
220
|
className: "flex items-center justify-center py-20",
|
|
172
|
-
children: /* @__PURE__ */ p(
|
|
221
|
+
children: /* @__PURE__ */ p(f, { className: "h-8 w-8 animate-spin text-text-secondary" })
|
|
173
222
|
})
|
|
174
|
-
}) :
|
|
175
|
-
title:
|
|
176
|
-
description:
|
|
223
|
+
}) : D.length === 0 ? /* @__PURE__ */ p(n, {
|
|
224
|
+
title: C("devportal.orders", "Orders"),
|
|
225
|
+
description: C("devportal.ordersDesc", "Orders placed by customers for your physical items."),
|
|
177
226
|
children: /* @__PURE__ */ p(t, {
|
|
178
227
|
illustration: "empty-generic",
|
|
179
|
-
icon: /* @__PURE__ */ p(
|
|
180
|
-
title:
|
|
181
|
-
description:
|
|
228
|
+
icon: /* @__PURE__ */ p(ne, { size: 32 }),
|
|
229
|
+
title: C("devportal.noOrgForOrders", "No organization yet"),
|
|
230
|
+
description: C("devportal.createOrgToSell", "Create a developer organization to start selling physical products and receive orders.")
|
|
182
231
|
})
|
|
183
|
-
}) : /* @__PURE__ */
|
|
232
|
+
}) : /* @__PURE__ */ m(i, {
|
|
184
233
|
authOnly: !0,
|
|
185
|
-
children: /* @__PURE__ */ m(n, {
|
|
186
|
-
title:
|
|
187
|
-
description:
|
|
234
|
+
children: [/* @__PURE__ */ m(n, {
|
|
235
|
+
title: C("devportal.orders", "Orders"),
|
|
236
|
+
description: C("devportal.ordersDesc", "Orders placed by customers for your physical items."),
|
|
188
237
|
children: [
|
|
189
238
|
/* @__PURE__ */ m("div", {
|
|
190
239
|
className: "flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-6",
|
|
191
|
-
children: [
|
|
240
|
+
children: [D.length > 1 && /* @__PURE__ */ m("div", {
|
|
192
241
|
className: "relative",
|
|
193
242
|
children: [/* @__PURE__ */ p("select", {
|
|
194
|
-
value:
|
|
243
|
+
value: O ?? "",
|
|
195
244
|
onChange: (e) => {
|
|
196
|
-
|
|
245
|
+
k(e.target.value), U(0);
|
|
197
246
|
},
|
|
198
247
|
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",
|
|
199
|
-
children:
|
|
248
|
+
children: D.map((e) => /* @__PURE__ */ p("option", {
|
|
200
249
|
value: e.id,
|
|
201
250
|
children: e.name
|
|
202
251
|
}, e.id))
|
|
203
|
-
}), /* @__PURE__ */ p(
|
|
252
|
+
}), /* @__PURE__ */ p(u, {
|
|
204
253
|
size: 14,
|
|
205
254
|
className: "pointer-events-none absolute right-2.5 top-1/2 -translate-y-1/2 text-text-muted"
|
|
206
255
|
})]
|
|
207
256
|
}), /* @__PURE__ */ m("div", {
|
|
208
257
|
className: "relative",
|
|
209
258
|
children: [/* @__PURE__ */ p("select", {
|
|
210
|
-
value:
|
|
259
|
+
value: B,
|
|
211
260
|
onChange: (e) => {
|
|
212
|
-
|
|
261
|
+
V(e.target.value), U(0);
|
|
213
262
|
},
|
|
214
263
|
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",
|
|
215
264
|
children: _.map((e) => /* @__PURE__ */ p("option", {
|
|
216
265
|
value: e.value,
|
|
217
266
|
children: e.label
|
|
218
267
|
}, e.value))
|
|
219
|
-
}), /* @__PURE__ */ p(
|
|
268
|
+
}), /* @__PURE__ */ p(u, {
|
|
220
269
|
size: 14,
|
|
221
270
|
className: "pointer-events-none absolute right-2.5 top-1/2 -translate-y-1/2 text-text-muted"
|
|
222
271
|
})]
|
|
@@ -227,21 +276,21 @@ var C = () => {
|
|
|
227
276
|
children: [
|
|
228
277
|
{
|
|
229
278
|
label: "Total Orders",
|
|
230
|
-
value:
|
|
279
|
+
value: $.total
|
|
231
280
|
},
|
|
232
281
|
{
|
|
233
282
|
label: "Pending",
|
|
234
|
-
value:
|
|
283
|
+
value: $.pending,
|
|
235
284
|
color: "text-status-warning-text"
|
|
236
285
|
},
|
|
237
286
|
{
|
|
238
287
|
label: "Completed",
|
|
239
|
-
value:
|
|
288
|
+
value: $.completed,
|
|
240
289
|
color: "text-status-success-text"
|
|
241
290
|
},
|
|
242
291
|
{
|
|
243
292
|
label: "Refunded",
|
|
244
|
-
value:
|
|
293
|
+
value: $.refunded,
|
|
245
294
|
color: "text-status-error-text"
|
|
246
295
|
}
|
|
247
296
|
].map((e) => /* @__PURE__ */ m("div", {
|
|
@@ -251,37 +300,37 @@ var C = () => {
|
|
|
251
300
|
children: e.label
|
|
252
301
|
}), /* @__PURE__ */ p("p", {
|
|
253
302
|
className: "mt-1 text-xl font-semibold tabular-nums",
|
|
254
|
-
children:
|
|
303
|
+
children: A ? /* @__PURE__ */ p(f, { className: "h-4 w-4 animate-spin text-text-secondary" }) : e.value
|
|
255
304
|
})]
|
|
256
305
|
}, e.label))
|
|
257
306
|
}),
|
|
258
|
-
|
|
307
|
+
I && /* @__PURE__ */ m("div", {
|
|
259
308
|
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",
|
|
260
309
|
children: [
|
|
261
|
-
/* @__PURE__ */ p(
|
|
310
|
+
/* @__PURE__ */ p(l, {
|
|
262
311
|
size: 16,
|
|
263
312
|
className: "shrink-0 text-status-error-text"
|
|
264
313
|
}),
|
|
265
314
|
/* @__PURE__ */ p("span", {
|
|
266
315
|
className: "text-status-error-text",
|
|
267
|
-
children:
|
|
316
|
+
children: I
|
|
268
317
|
}),
|
|
269
318
|
/* @__PURE__ */ p("button", {
|
|
270
|
-
onClick: () =>
|
|
319
|
+
onClick: () => z((e) => e + 1),
|
|
271
320
|
className: "ml-auto text-xs font-medium text-status-error-text underline",
|
|
272
321
|
children: "Retry"
|
|
273
322
|
})
|
|
274
323
|
]
|
|
275
324
|
}),
|
|
276
|
-
|
|
325
|
+
A ? /* @__PURE__ */ p("div", {
|
|
277
326
|
className: "flex items-center justify-center py-16",
|
|
278
|
-
children: /* @__PURE__ */ p(
|
|
279
|
-
}) :
|
|
327
|
+
children: /* @__PURE__ */ p(f, { className: "h-6 w-6 animate-spin text-text-secondary" })
|
|
328
|
+
}) : G.length === 0 ? /* @__PURE__ */ p(t, {
|
|
280
329
|
illustration: "empty-data",
|
|
281
|
-
icon: /* @__PURE__ */ p(
|
|
282
|
-
title:
|
|
283
|
-
description:
|
|
284
|
-
}) : /* @__PURE__ */ m(
|
|
330
|
+
icon: /* @__PURE__ */ p(te, { size: 32 }),
|
|
331
|
+
title: B ? C("devportal.noOrdersForFilter", "No orders match this filter") : C("devportal.noOrdersYet", "No orders yet"),
|
|
332
|
+
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__ */ m(re, { children: [/* @__PURE__ */ p("div", {
|
|
285
334
|
className: "overflow-x-auto rounded-lg border border-border-seam",
|
|
286
335
|
children: /* @__PURE__ */ m("table", {
|
|
287
336
|
className: "w-full text-sm",
|
|
@@ -315,10 +364,14 @@ var C = () => {
|
|
|
315
364
|
/* @__PURE__ */ p("th", {
|
|
316
365
|
className: "px-4 py-3 text-left font-medium text-text-secondary",
|
|
317
366
|
children: "Date"
|
|
367
|
+
}),
|
|
368
|
+
/* @__PURE__ */ p("th", {
|
|
369
|
+
className: "px-4 py-3 text-left font-medium text-text-secondary",
|
|
370
|
+
children: "Fulfillment Issue"
|
|
318
371
|
})
|
|
319
372
|
]
|
|
320
|
-
}) }), /* @__PURE__ */ p("tbody", { children:
|
|
321
|
-
let t = g[e.status] ?? g.PENDING;
|
|
373
|
+
}) }), /* @__PURE__ */ p("tbody", { children: G.map((e) => {
|
|
374
|
+
let t = g[e.status] ?? g.PENDING, n = e.storeOrderId ? de[e.storeOrderId] ?? [] : [], r = n.find((e) => e.status === "OPEN");
|
|
322
375
|
return /* @__PURE__ */ m("tr", {
|
|
323
376
|
className: "border-b border-border-subtle last:border-0 hover:bg-bg-sunken/50 transition-colors",
|
|
324
377
|
children: [
|
|
@@ -326,7 +379,7 @@ var C = () => {
|
|
|
326
379
|
className: "px-4 py-3",
|
|
327
380
|
children: /* @__PURE__ */ p("span", {
|
|
328
381
|
className: "font-mono text-xs font-semibold text-text-primary",
|
|
329
|
-
children:
|
|
382
|
+
children: le(e.storeOrderId, e.id)
|
|
330
383
|
})
|
|
331
384
|
}),
|
|
332
385
|
/* @__PURE__ */ p("td", {
|
|
@@ -367,44 +420,84 @@ var C = () => {
|
|
|
367
420
|
}),
|
|
368
421
|
/* @__PURE__ */ p("td", {
|
|
369
422
|
className: "px-4 py-3 text-xs text-text-secondary whitespace-nowrap",
|
|
370
|
-
children:
|
|
423
|
+
children: ce(e.purchasedAt)
|
|
424
|
+
}),
|
|
425
|
+
/* @__PURE__ */ p("td", {
|
|
426
|
+
className: "px-4 py-3",
|
|
427
|
+
children: e.storeOrderId ? r ? /* @__PURE__ */ m("div", {
|
|
428
|
+
className: "flex items-center gap-2",
|
|
429
|
+
children: [/* @__PURE__ */ m("span", {
|
|
430
|
+
title: r.note ?? void 0,
|
|
431
|
+
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__ */ p(d, { size: 11 }), ie[r.category]]
|
|
433
|
+
}), r.raisedByOrgId === O && /* @__PURE__ */ p("button", {
|
|
434
|
+
onClick: () => void fe(r.id, r.raisedByOrgId),
|
|
435
|
+
disabled: Y === r.id,
|
|
436
|
+
className: "text-xs font-medium text-text-secondary underline hover:text-text-primary disabled:opacity-50",
|
|
437
|
+
children: Y === r.id ? /* @__PURE__ */ p(f, { className: "h-3 w-3 animate-spin" }) : "Mark Resolved"
|
|
438
|
+
})]
|
|
439
|
+
}) : /* @__PURE__ */ m("div", {
|
|
440
|
+
className: "flex items-center gap-2",
|
|
441
|
+
children: [n.length > 0 && /* @__PURE__ */ m("span", {
|
|
442
|
+
title: "Previously reported and resolved",
|
|
443
|
+
className: "flex items-center gap-1 text-xs text-status-success-text",
|
|
444
|
+
children: [/* @__PURE__ */ p(ee, { size: 11 }), "Resolved"]
|
|
445
|
+
}), /* @__PURE__ */ p("button", {
|
|
446
|
+
onClick: () => J(e.storeOrderId),
|
|
447
|
+
className: "text-xs font-medium text-text-secondary underline hover:text-text-primary",
|
|
448
|
+
children: "Report Issue"
|
|
449
|
+
})]
|
|
450
|
+
}) : /* @__PURE__ */ p("span", {
|
|
451
|
+
className: "text-xs text-text-muted",
|
|
452
|
+
children: "—"
|
|
453
|
+
})
|
|
371
454
|
})
|
|
372
455
|
]
|
|
373
456
|
}, e.id);
|
|
374
457
|
}) })]
|
|
375
458
|
})
|
|
376
|
-
}),
|
|
459
|
+
}), P > 25 && /* @__PURE__ */ m("div", {
|
|
377
460
|
className: "mt-4 flex items-center justify-between text-sm",
|
|
378
461
|
children: [/* @__PURE__ */ m("span", {
|
|
379
462
|
className: "text-text-secondary",
|
|
380
463
|
children: [
|
|
381
464
|
"Showing ",
|
|
382
|
-
|
|
465
|
+
H * 25 + 1,
|
|
383
466
|
"–",
|
|
384
|
-
Math.min((
|
|
467
|
+
Math.min((H + 1) * 25, P),
|
|
385
468
|
" of ",
|
|
386
|
-
|
|
469
|
+
P
|
|
387
470
|
]
|
|
388
471
|
}), /* @__PURE__ */ m("div", {
|
|
389
472
|
className: "flex items-center gap-2",
|
|
390
473
|
children: [/* @__PURE__ */ p("button", {
|
|
391
|
-
disabled:
|
|
392
|
-
onClick: () =>
|
|
474
|
+
disabled: H === 0,
|
|
475
|
+
onClick: () => U((e) => e - 1),
|
|
393
476
|
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",
|
|
394
477
|
children: "Previous"
|
|
395
478
|
}), /* @__PURE__ */ p("button", {
|
|
396
|
-
disabled: (
|
|
397
|
-
onClick: () =>
|
|
479
|
+
disabled: (H + 1) * 25 >= P,
|
|
480
|
+
onClick: () => U((e) => e + 1),
|
|
398
481
|
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",
|
|
399
482
|
children: "Next"
|
|
400
483
|
})]
|
|
401
484
|
})]
|
|
402
485
|
})] })
|
|
403
486
|
]
|
|
404
|
-
})
|
|
487
|
+
}), O && /* @__PURE__ */ p(r, {
|
|
488
|
+
open: q !== null,
|
|
489
|
+
onOpenChange: (e) => {
|
|
490
|
+
e || J(null);
|
|
491
|
+
},
|
|
492
|
+
orderId: q ?? "",
|
|
493
|
+
organizationId: O,
|
|
494
|
+
gqlUrl: w,
|
|
495
|
+
headers: W,
|
|
496
|
+
onReported: () => void Q()
|
|
497
|
+
})]
|
|
405
498
|
});
|
|
406
499
|
};
|
|
407
500
|
//#endregion
|
|
408
|
-
export {
|
|
501
|
+
export { x as SellerOrdersPage };
|
|
409
502
|
|
|
410
503
|
//# sourceMappingURL=SellerOrdersPage.js.map
|