@burdenoff/microfe-store 2026.525.3 → 2026.528.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/StoreAdminRoutes.js +10 -9
- package/dist/StoreAdminRoutes.js.map +1 -1
- package/dist/StoreRoutes.js +2 -1
- package/dist/StoreRoutes.js.map +1 -1
- package/dist/components/AccessDenied.js +23 -0
- package/dist/components/AccessDenied.js.map +1 -0
- package/dist/components/InstallAppModal.js +183 -129
- package/dist/components/InstallAppModal.js.map +1 -1
- package/dist/components/PermissionGuard.js +8 -0
- package/dist/components/PermissionGuard.js.map +1 -0
- package/dist/components/RouteGuards.js +7 -21
- package/dist/components/RouteGuards.js.map +1 -1
- package/dist/components/cart/CartDrawer.js +20 -14
- package/dist/components/cart/CartDrawer.js.map +1 -1
- package/dist/hooks/useStoreGraphQL.js +22 -20
- package/dist/hooks/useStoreGraphQL.js.map +1 -1
- package/dist/hooks/useStoreGraphQLWithContext.js.map +1 -1
- package/dist/hooks/useStorePermissions.js +4 -1
- package/dist/hooks/useStorePermissions.js.map +1 -1
- package/dist/index.js +4 -4
- package/dist/pages/AdminDashboardPage.js +182 -183
- package/dist/pages/AdminDashboardPage.js.map +1 -1
- package/dist/pages/AdminReviewModerationPage.js +7 -6
- package/dist/pages/AdminReviewModerationPage.js.map +1 -1
- package/dist/pages/AdminStoresPage.js +193 -185
- package/dist/pages/AdminStoresPage.js.map +1 -1
- package/dist/pages/AdminSubmissionsQueuePage.js +140 -142
- package/dist/pages/AdminSubmissionsQueuePage.js.map +1 -1
- package/dist/pages/AppDetailPage.js +6 -3
- package/dist/pages/AppDetailPage.js.map +1 -1
- package/dist/pages/AppSettingsPage.js +6 -3
- package/dist/pages/AppSettingsPage.js.map +1 -1
- package/dist/pages/CartPage.js +23 -15
- package/dist/pages/CartPage.js.map +1 -1
- package/dist/pages/InstalledAppsPage.js +26 -15
- package/dist/pages/InstalledAppsPage.js.map +1 -1
- package/dist/pages/MarketplaceHomePage.js +275 -247
- package/dist/pages/MarketplaceHomePage.js.map +1 -1
- package/dist/pages/MyLicensesPage.js +10 -8
- package/dist/pages/MyLicensesPage.js.map +1 -1
- package/dist/pages/OrderConfirmationPage.js +72 -75
- package/dist/pages/OrderConfirmationPage.js.map +1 -1
- package/dist/pages/OrdersPage.js +22 -20
- package/dist/pages/OrdersPage.js.map +1 -1
- package/dist/pages/ProductCategoryPage.js +3 -1
- package/dist/pages/ProductCategoryPage.js.map +1 -1
- package/dist/pages/ProductDetailPage.js +458 -443
- package/dist/pages/ProductDetailPage.js.map +1 -1
- package/dist/pages/ProductReviewsPage.js +4 -3
- package/dist/pages/ProductReviewsPage.js.map +1 -1
- package/dist/pages/PublisherDashboardPage.js +13 -7
- package/dist/pages/PublisherDashboardPage.js.map +1 -1
- package/dist/pages/PublisherRevenuePage.js +7 -5
- package/dist/pages/PublisherRevenuePage.js.map +1 -1
- package/dist/pages/PublisherSubmissionsPage.js +12 -7
- package/dist/pages/PublisherSubmissionsPage.js.map +1 -1
- package/dist/pages/PublisherSubmitPage.js +6 -0
- package/dist/pages/PublisherSubmitPage.js.map +1 -1
- package/dist/pages/SearchResultsPage.js +6 -3
- package/dist/pages/SearchResultsPage.js.map +1 -1
- package/dist/pages/StoresPage.js +73 -74
- package/dist/pages/StoresPage.js.map +1 -1
- package/dist/providers/StoreProvider.js +25 -25
- package/dist/providers/StoreProvider.js.map +1 -1
- package/dist/utils/index.js +29 -19
- package/dist/utils/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/components/index.js +0 -3
- package/dist/components/marketplace/ProductCard.js +0 -2
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { useStore as e } from "../providers/StoreProvider.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
2
|
+
import { formatPriceForModel as t } from "../utils/index.js";
|
|
3
|
+
import { useCallback as n, useEffect as r, useState as i } from "react";
|
|
4
|
+
import { ArrowLeft as a, Check as o, ChevronDown as s, ChevronUp as c, PackageCheck as l, RefreshCw as u, X as d } from "lucide-react";
|
|
5
|
+
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
6
|
+
import { useNavigate as m } from "react-router-dom";
|
|
7
|
+
import { graphqlFetch as h } from "@burdenoff/fe-libs/shared/graphql";
|
|
7
8
|
//#region src/pages/AdminSubmissionsQueuePage.tsx
|
|
8
|
-
var
|
|
9
|
+
var g = "\n query PendingReviewProducts($limit: Int, $offset: Int) {\n pendingReviewProducts(limit: $limit, offset: $offset) {\n totalCount\n products {\n id\n slug\n name\n type\n nature\n status\n pricingModel\n price\n currency\n description\n submittedAt\n submittedBy\n category\n icon\n publisher {\n id\n name\n email\n }\n }\n }\n }\n", _ = "\n query AdminProducts($limit: Int, $offset: Int, $status: ProductStatus) {\n products(filter: { status: $status }, limit: $limit, offset: $offset) {\n id\n slug\n name\n type\n nature\n status\n pricingModel\n price\n currency\n description\n submittedAt\n submittedBy\n category\n icon\n publisher {\n id\n name\n email\n }\n }\n }\n", v = "\n mutation ApproveProduct($id: ID!, $notes: String) {\n approveProduct(id: $id, notes: $notes) {\n id\n status\n publishedAt\n }\n }\n", y = "\n mutation RejectProduct($id: ID!, $reason: String!) {\n rejectProduct(id: $id, reason: $reason) {\n id\n status\n rejectedReason\n }\n }\n", b = [
|
|
9
10
|
{
|
|
10
11
|
label: "Pending review",
|
|
11
12
|
value: "PENDING_REVIEW"
|
|
@@ -22,276 +23,272 @@ var m = "\n query PendingReviewProducts($limit: Int, $offset: Int) {\n pendi
|
|
|
22
23
|
label: "All",
|
|
23
24
|
value: "ALL"
|
|
24
25
|
}
|
|
25
|
-
],
|
|
26
|
-
let
|
|
27
|
-
|
|
26
|
+
], x = () => {
|
|
27
|
+
let x = m(), { authToken: S, basePath: C } = e(), [w, T] = i([]), [E, D] = i(0), [O, k] = i(!1), [A, j] = i(null), [M, N] = i(null), [P, F] = i("PENDING_REVIEW"), [I, L] = i(null), [R, z] = i(""), [B, V] = i(null), H = n(async (e) => {
|
|
28
|
+
k(!0), j(null);
|
|
28
29
|
try {
|
|
29
30
|
if (e === "PENDING_REVIEW") {
|
|
30
|
-
let e = await
|
|
31
|
+
let e = await h({
|
|
31
32
|
gateway: "global",
|
|
32
|
-
query:
|
|
33
|
+
query: g,
|
|
33
34
|
variables: {
|
|
34
35
|
limit: 100,
|
|
35
36
|
offset: 0
|
|
36
37
|
},
|
|
37
|
-
authToken:
|
|
38
|
+
authToken: S || void 0
|
|
38
39
|
});
|
|
39
40
|
if (e.errors?.length) throw Error(e.errors[0]?.message ?? "Failed to load pending products");
|
|
40
|
-
|
|
41
|
+
T(e.data?.pendingReviewProducts.products ?? []), D(e.data?.pendingReviewProducts.totalCount ?? 0);
|
|
41
42
|
} else {
|
|
42
|
-
let t = await
|
|
43
|
+
let t = await h({
|
|
43
44
|
gateway: "global",
|
|
44
|
-
query:
|
|
45
|
+
query: _,
|
|
45
46
|
variables: {
|
|
46
47
|
limit: 100,
|
|
47
48
|
offset: 0,
|
|
48
49
|
...e !== "ALL" && { status: e }
|
|
49
50
|
},
|
|
50
|
-
authToken:
|
|
51
|
+
authToken: S || void 0
|
|
51
52
|
});
|
|
52
53
|
if (t.errors?.length) throw Error(t.errors[0]?.message ?? "Failed to load products");
|
|
53
54
|
let n = t.data?.products ?? [];
|
|
54
|
-
|
|
55
|
+
T(n), D(n.length);
|
|
55
56
|
}
|
|
56
57
|
} catch (e) {
|
|
57
|
-
|
|
58
|
+
j(e instanceof Error ? e.message : "Failed to load products");
|
|
58
59
|
} finally {
|
|
59
|
-
|
|
60
|
+
k(!1);
|
|
60
61
|
}
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}, [
|
|
65
|
-
let
|
|
66
|
-
|
|
62
|
+
}, [S]);
|
|
63
|
+
r(() => {
|
|
64
|
+
H(P);
|
|
65
|
+
}, [H, P]);
|
|
66
|
+
let U = async (e) => {
|
|
67
|
+
N(e), j(null);
|
|
67
68
|
try {
|
|
68
|
-
let t = await
|
|
69
|
+
let t = await h({
|
|
69
70
|
gateway: "global",
|
|
70
|
-
query:
|
|
71
|
+
query: v,
|
|
71
72
|
variables: {
|
|
72
73
|
id: e,
|
|
73
74
|
notes: null
|
|
74
75
|
},
|
|
75
|
-
authToken:
|
|
76
|
+
authToken: S || void 0
|
|
76
77
|
});
|
|
77
78
|
if (t.errors?.length) throw Error(t.errors[0]?.message ?? "Approval failed");
|
|
78
|
-
await
|
|
79
|
+
await H(P);
|
|
79
80
|
} catch (e) {
|
|
80
|
-
|
|
81
|
+
j(e instanceof Error ? e.message : "Approval failed");
|
|
81
82
|
} finally {
|
|
82
|
-
|
|
83
|
+
N(null);
|
|
83
84
|
}
|
|
84
|
-
},
|
|
85
|
-
if (!
|
|
86
|
-
|
|
85
|
+
}, W = async (e) => {
|
|
86
|
+
if (!R.trim()) {
|
|
87
|
+
j("Rejection reason is required");
|
|
87
88
|
return;
|
|
88
89
|
}
|
|
89
|
-
|
|
90
|
+
N(e), j(null);
|
|
90
91
|
try {
|
|
91
|
-
let t = await
|
|
92
|
+
let t = await h({
|
|
92
93
|
gateway: "global",
|
|
93
|
-
query:
|
|
94
|
+
query: y,
|
|
94
95
|
variables: {
|
|
95
96
|
id: e,
|
|
96
|
-
reason:
|
|
97
|
+
reason: R.trim()
|
|
97
98
|
},
|
|
98
|
-
authToken:
|
|
99
|
+
authToken: S || void 0
|
|
99
100
|
});
|
|
100
101
|
if (t.errors?.length) throw Error(t.errors[0]?.message ?? "Rejection failed");
|
|
101
|
-
|
|
102
|
+
L(null), z(""), await H(P);
|
|
102
103
|
} catch (e) {
|
|
103
|
-
|
|
104
|
+
j(e instanceof Error ? e.message : "Rejection failed");
|
|
104
105
|
} finally {
|
|
105
|
-
|
|
106
|
+
N(null);
|
|
106
107
|
}
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
currency: t || "USD"
|
|
110
|
-
}).format(e);
|
|
111
|
-
return /* @__PURE__ */ d("div", {
|
|
108
|
+
};
|
|
109
|
+
return /* @__PURE__ */ p("div", {
|
|
112
110
|
className: "min-h-screen bg-surface-default",
|
|
113
|
-
children: [/* @__PURE__ */
|
|
111
|
+
children: [/* @__PURE__ */ f("header", {
|
|
114
112
|
className: "border-b border-border-default bg-surface-raised",
|
|
115
|
-
children: /* @__PURE__ */
|
|
113
|
+
children: /* @__PURE__ */ p("div", {
|
|
116
114
|
className: "mx-auto max-w-7xl px-6 py-4",
|
|
117
|
-
children: [/* @__PURE__ */
|
|
115
|
+
children: [/* @__PURE__ */ p("div", {
|
|
118
116
|
className: "flex items-center justify-between",
|
|
119
|
-
children: [/* @__PURE__ */
|
|
117
|
+
children: [/* @__PURE__ */ p("div", {
|
|
120
118
|
className: "flex items-center gap-3",
|
|
121
|
-
children: [/* @__PURE__ */
|
|
119
|
+
children: [/* @__PURE__ */ p("button", {
|
|
122
120
|
type: "button",
|
|
123
|
-
onClick: () =>
|
|
121
|
+
onClick: () => x(`${C}/dashboard`),
|
|
124
122
|
className: "inline-flex items-center gap-2 rounded-md px-3 py-1.5 text-sm text-text-secondary hover:bg-surface-hover hover:text-text-primary",
|
|
125
|
-
children: [/* @__PURE__ */
|
|
126
|
-
}), /* @__PURE__ */
|
|
123
|
+
children: [/* @__PURE__ */ f(a, { className: "size-4" }), "Back"]
|
|
124
|
+
}), /* @__PURE__ */ p("div", {
|
|
127
125
|
className: "flex items-center gap-2",
|
|
128
126
|
children: [
|
|
129
|
-
/* @__PURE__ */
|
|
130
|
-
/* @__PURE__ */
|
|
127
|
+
/* @__PURE__ */ f(l, { className: "size-5 text-text-primary" }),
|
|
128
|
+
/* @__PURE__ */ f("h1", {
|
|
131
129
|
className: "text-xl font-semibold text-text-primary",
|
|
132
130
|
children: "Submission queue"
|
|
133
131
|
}),
|
|
134
|
-
/* @__PURE__ */
|
|
132
|
+
/* @__PURE__ */ f("span", {
|
|
135
133
|
className: "rounded-full bg-surface-accent-muted px-2 py-0.5 text-xs font-medium text-text-accent",
|
|
136
|
-
children:
|
|
134
|
+
children: E
|
|
137
135
|
})
|
|
138
136
|
]
|
|
139
137
|
})]
|
|
140
|
-
}), /* @__PURE__ */
|
|
138
|
+
}), /* @__PURE__ */ p("button", {
|
|
141
139
|
type: "button",
|
|
142
|
-
onClick: () => void
|
|
140
|
+
onClick: () => void H(P),
|
|
143
141
|
className: "inline-flex items-center gap-2 rounded-md border border-border-default bg-surface-default px-3 py-1.5 text-sm text-text-primary hover:bg-surface-hover",
|
|
144
|
-
disabled:
|
|
145
|
-
children: [/* @__PURE__ */ u
|
|
142
|
+
disabled: O,
|
|
143
|
+
children: [/* @__PURE__ */ f(u, { className: `size-4 ${O ? "animate-spin" : ""}` }), "Refresh"]
|
|
146
144
|
})]
|
|
147
|
-
}), /* @__PURE__ */
|
|
145
|
+
}), /* @__PURE__ */ f("div", {
|
|
148
146
|
className: "mt-4 flex gap-2",
|
|
149
|
-
children:
|
|
147
|
+
children: b.map((e) => /* @__PURE__ */ f("button", {
|
|
150
148
|
type: "button",
|
|
151
|
-
onClick: () =>
|
|
152
|
-
className: `rounded-full px-3 py-1 text-xs font-medium transition-colors ${
|
|
149
|
+
onClick: () => F(e.value),
|
|
150
|
+
className: `rounded-full px-3 py-1 text-xs font-medium transition-colors ${P === e.value ? "bg-surface-accent text-text-on-accent" : "bg-surface-muted text-text-secondary hover:bg-surface-hover"}`,
|
|
153
151
|
children: e.label
|
|
154
152
|
}, e.value))
|
|
155
153
|
})]
|
|
156
154
|
})
|
|
157
|
-
}), /* @__PURE__ */
|
|
158
|
-
className: "mx-auto max-w-7xl
|
|
159
|
-
children: [
|
|
155
|
+
}), /* @__PURE__ */ p("main", {
|
|
156
|
+
className: "mx-auto max-w-7xl p-6",
|
|
157
|
+
children: [A && /* @__PURE__ */ f("div", {
|
|
160
158
|
role: "alert",
|
|
161
159
|
className: "mb-4 rounded-md border border-border-danger bg-surface-danger-muted px-4 py-3 text-sm text-text-danger",
|
|
162
|
-
children:
|
|
163
|
-
}),
|
|
164
|
-
|
|
165
|
-
className: "py-16 text-center text-text-secondary",
|
|
160
|
+
children: A
|
|
161
|
+
}), O && w.length === 0 ? /* @__PURE__ */ f("output", {
|
|
162
|
+
className: "block py-16 text-center text-text-secondary",
|
|
166
163
|
children: "Loading submissions…"
|
|
167
|
-
}) :
|
|
164
|
+
}) : w.length === 0 ? /* @__PURE__ */ f("div", {
|
|
168
165
|
className: "py-16 text-center text-text-secondary",
|
|
169
166
|
children: "No products matching the current filter."
|
|
170
|
-
}) : /* @__PURE__ */
|
|
167
|
+
}) : /* @__PURE__ */ f("ul", {
|
|
171
168
|
className: "space-y-3",
|
|
172
|
-
children:
|
|
169
|
+
children: w.map((e) => /* @__PURE__ */ p("li", {
|
|
173
170
|
className: "overflow-hidden rounded-lg border border-border-default bg-surface-raised",
|
|
174
171
|
children: [
|
|
175
|
-
/* @__PURE__ */
|
|
172
|
+
/* @__PURE__ */ p("div", {
|
|
176
173
|
className: "flex items-start gap-4 p-4",
|
|
177
174
|
children: [
|
|
178
|
-
e.icon ? /* @__PURE__ */
|
|
175
|
+
e.icon ? /* @__PURE__ */ f("img", {
|
|
179
176
|
src: e.icon,
|
|
180
177
|
alt: "",
|
|
181
|
-
className: "
|
|
182
|
-
}) : /* @__PURE__ */
|
|
183
|
-
className: "flex
|
|
178
|
+
className: "size-14 flex-shrink-0 rounded-md object-cover"
|
|
179
|
+
}) : /* @__PURE__ */ f("div", {
|
|
180
|
+
className: "flex size-14 flex-shrink-0 items-center justify-center rounded-md bg-surface-muted text-xs text-text-secondary",
|
|
184
181
|
children: e.type
|
|
185
182
|
}),
|
|
186
|
-
/* @__PURE__ */
|
|
183
|
+
/* @__PURE__ */ p("div", {
|
|
187
184
|
className: "min-w-0 flex-1",
|
|
188
185
|
children: [
|
|
189
|
-
/* @__PURE__ */
|
|
186
|
+
/* @__PURE__ */ p("div", {
|
|
190
187
|
className: "flex items-center gap-2",
|
|
191
188
|
children: [
|
|
192
|
-
/* @__PURE__ */
|
|
189
|
+
/* @__PURE__ */ f("h3", {
|
|
193
190
|
className: "truncate text-base font-semibold text-text-primary",
|
|
194
191
|
children: e.name
|
|
195
192
|
}),
|
|
196
|
-
/* @__PURE__ */
|
|
193
|
+
/* @__PURE__ */ f("span", {
|
|
197
194
|
className: "rounded-full bg-surface-accent-muted px-2 py-0.5 text-xs font-medium text-text-accent",
|
|
198
195
|
children: e.type
|
|
199
196
|
}),
|
|
200
|
-
/* @__PURE__ */
|
|
197
|
+
/* @__PURE__ */ f("span", {
|
|
201
198
|
className: "rounded-full bg-surface-muted px-2 py-0.5 text-xs font-medium text-text-secondary",
|
|
202
199
|
children: e.nature
|
|
203
200
|
})
|
|
204
201
|
]
|
|
205
202
|
}),
|
|
206
|
-
/* @__PURE__ */
|
|
203
|
+
/* @__PURE__ */ f("div", {
|
|
207
204
|
className: "mt-0.5 text-xs text-text-tertiary",
|
|
208
205
|
children: e.slug
|
|
209
206
|
}),
|
|
210
|
-
/* @__PURE__ */
|
|
207
|
+
/* @__PURE__ */ p("div", {
|
|
211
208
|
className: "mt-1 flex items-center gap-3 text-xs text-text-secondary",
|
|
212
209
|
children: [
|
|
213
|
-
/* @__PURE__ */
|
|
214
|
-
/* @__PURE__ */
|
|
215
|
-
e.submittedAt && /* @__PURE__ */
|
|
210
|
+
/* @__PURE__ */ p("span", { children: ["Publisher: ", e.publisher?.name ?? "Unknown"] }),
|
|
211
|
+
/* @__PURE__ */ p("span", { children: ["Price: ", t(e.price, e.currency, e.pricingModel)] }),
|
|
212
|
+
e.submittedAt && /* @__PURE__ */ p("span", { children: ["Submitted ", new Date(e.submittedAt).toLocaleString()] })
|
|
216
213
|
]
|
|
217
214
|
}),
|
|
218
|
-
e.description && /* @__PURE__ */
|
|
215
|
+
e.description && /* @__PURE__ */ f("p", {
|
|
219
216
|
className: "mt-2 line-clamp-2 text-sm text-text-secondary",
|
|
220
217
|
children: e.description
|
|
221
218
|
})
|
|
222
219
|
]
|
|
223
220
|
}),
|
|
224
|
-
/* @__PURE__ */
|
|
221
|
+
/* @__PURE__ */ p("div", {
|
|
225
222
|
className: "flex flex-shrink-0 flex-col gap-2",
|
|
226
223
|
children: [
|
|
227
|
-
/* @__PURE__ */
|
|
224
|
+
/* @__PURE__ */ p("button", {
|
|
228
225
|
type: "button",
|
|
229
|
-
onClick: () =>
|
|
226
|
+
onClick: () => V(B === e.id ? null : e.id),
|
|
230
227
|
className: "inline-flex items-center gap-1 rounded-md border border-border-default px-3 py-1.5 text-xs text-text-secondary hover:bg-surface-hover",
|
|
231
|
-
children: [
|
|
228
|
+
children: [B === e.id ? /* @__PURE__ */ f(c, { className: "size-3.5" }) : /* @__PURE__ */ f(s, { className: "size-3.5" }), "Details"]
|
|
232
229
|
}),
|
|
233
|
-
/* @__PURE__ */
|
|
230
|
+
/* @__PURE__ */ p("button", {
|
|
234
231
|
type: "button",
|
|
235
|
-
onClick: () => void
|
|
236
|
-
disabled:
|
|
232
|
+
onClick: () => void U(e.id),
|
|
233
|
+
disabled: M === e.id,
|
|
237
234
|
className: "inline-flex items-center gap-1 rounded-md bg-surface-success px-3 py-1.5 text-xs font-medium text-text-on-success hover:bg-surface-success-hover disabled:opacity-60",
|
|
238
|
-
children: [/* @__PURE__ */
|
|
235
|
+
children: [/* @__PURE__ */ f(o, { className: "size-3.5" }), "Approve"]
|
|
239
236
|
}),
|
|
240
|
-
/* @__PURE__ */
|
|
237
|
+
/* @__PURE__ */ p("button", {
|
|
241
238
|
type: "button",
|
|
242
239
|
onClick: () => {
|
|
243
|
-
|
|
240
|
+
L(e.id), z("");
|
|
244
241
|
},
|
|
245
|
-
disabled:
|
|
242
|
+
disabled: M === e.id,
|
|
246
243
|
className: "inline-flex items-center gap-1 rounded-md border border-border-danger bg-surface-danger-muted px-3 py-1.5 text-xs font-medium text-text-danger hover:bg-surface-danger hover:text-text-on-danger disabled:opacity-60",
|
|
247
|
-
children: [/* @__PURE__ */
|
|
244
|
+
children: [/* @__PURE__ */ f(d, { className: "size-3.5" }), "Reject"]
|
|
248
245
|
})
|
|
249
246
|
]
|
|
250
247
|
})
|
|
251
248
|
]
|
|
252
249
|
}),
|
|
253
|
-
|
|
254
|
-
className: "border-t border-border-default bg-surface-muted
|
|
255
|
-
children: /* @__PURE__ */
|
|
250
|
+
B === e.id && /* @__PURE__ */ f("div", {
|
|
251
|
+
className: "border-t border-border-default bg-surface-muted p-4",
|
|
252
|
+
children: /* @__PURE__ */ p("dl", {
|
|
256
253
|
className: "grid grid-cols-2 gap-x-6 gap-y-3 text-xs sm:grid-cols-3",
|
|
257
254
|
children: [
|
|
258
|
-
/* @__PURE__ */
|
|
255
|
+
/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("dt", {
|
|
259
256
|
className: "font-medium text-text-secondary",
|
|
260
257
|
children: "Slug"
|
|
261
|
-
}), /* @__PURE__ */
|
|
258
|
+
}), /* @__PURE__ */ f("dd", {
|
|
262
259
|
className: "mt-0.5 font-mono text-text-primary",
|
|
263
260
|
children: e.slug
|
|
264
261
|
})] }),
|
|
265
|
-
/* @__PURE__ */
|
|
262
|
+
/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("dt", {
|
|
266
263
|
className: "font-medium text-text-secondary",
|
|
267
264
|
children: "Type"
|
|
268
|
-
}), /* @__PURE__ */
|
|
265
|
+
}), /* @__PURE__ */ f("dd", {
|
|
269
266
|
className: "mt-0.5 text-text-primary",
|
|
270
267
|
children: e.type
|
|
271
268
|
})] }),
|
|
272
|
-
/* @__PURE__ */
|
|
269
|
+
/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("dt", {
|
|
273
270
|
className: "font-medium text-text-secondary",
|
|
274
271
|
children: "Nature"
|
|
275
|
-
}), /* @__PURE__ */
|
|
272
|
+
}), /* @__PURE__ */ f("dd", {
|
|
276
273
|
className: "mt-0.5 text-text-primary",
|
|
277
274
|
children: e.nature
|
|
278
275
|
})] }),
|
|
279
|
-
e.category && /* @__PURE__ */
|
|
276
|
+
e.category && /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("dt", {
|
|
280
277
|
className: "font-medium text-text-secondary",
|
|
281
278
|
children: "Category"
|
|
282
|
-
}), /* @__PURE__ */
|
|
279
|
+
}), /* @__PURE__ */ f("dd", {
|
|
283
280
|
className: "mt-0.5 text-text-primary",
|
|
284
281
|
children: e.category
|
|
285
282
|
})] }),
|
|
286
|
-
/* @__PURE__ */
|
|
283
|
+
/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("dt", {
|
|
287
284
|
className: "font-medium text-text-secondary",
|
|
288
285
|
children: "Pricing"
|
|
289
|
-
}), /* @__PURE__ */
|
|
286
|
+
}), /* @__PURE__ */ p("dd", {
|
|
290
287
|
className: "mt-0.5 text-text-primary",
|
|
291
288
|
children: [
|
|
292
|
-
|
|
289
|
+
t(e.price, e.currency, e.pricingModel),
|
|
293
290
|
" ",
|
|
294
|
-
/* @__PURE__ */
|
|
291
|
+
/* @__PURE__ */ p("span", {
|
|
295
292
|
className: "text-text-tertiary",
|
|
296
293
|
children: [
|
|
297
294
|
"(",
|
|
@@ -301,36 +298,36 @@ var m = "\n query PendingReviewProducts($limit: Int, $offset: Int) {\n pendi
|
|
|
301
298
|
})
|
|
302
299
|
]
|
|
303
300
|
})] }),
|
|
304
|
-
/* @__PURE__ */
|
|
301
|
+
/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("dt", {
|
|
305
302
|
className: "font-medium text-text-secondary",
|
|
306
303
|
children: "Publisher"
|
|
307
|
-
}), /* @__PURE__ */
|
|
304
|
+
}), /* @__PURE__ */ p("dd", {
|
|
308
305
|
className: "mt-0.5 text-text-primary",
|
|
309
|
-
children: [e.publisher?.name ?? "—", e.publisher?.email && /* @__PURE__ */
|
|
306
|
+
children: [e.publisher?.name ?? "—", e.publisher?.email && /* @__PURE__ */ f("span", {
|
|
310
307
|
className: "block text-text-tertiary",
|
|
311
308
|
children: e.publisher.email
|
|
312
309
|
})]
|
|
313
310
|
})] }),
|
|
314
|
-
e.submittedBy && /* @__PURE__ */
|
|
311
|
+
e.submittedBy && /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("dt", {
|
|
315
312
|
className: "font-medium text-text-secondary",
|
|
316
313
|
children: "Submitted by"
|
|
317
|
-
}), /* @__PURE__ */
|
|
314
|
+
}), /* @__PURE__ */ f("dd", {
|
|
318
315
|
className: "mt-0.5 font-mono text-text-primary",
|
|
319
316
|
children: e.submittedBy
|
|
320
317
|
})] }),
|
|
321
|
-
e.submittedAt && /* @__PURE__ */
|
|
318
|
+
e.submittedAt && /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("dt", {
|
|
322
319
|
className: "font-medium text-text-secondary",
|
|
323
320
|
children: "Submitted at"
|
|
324
|
-
}), /* @__PURE__ */
|
|
321
|
+
}), /* @__PURE__ */ f("dd", {
|
|
325
322
|
className: "mt-0.5 text-text-primary",
|
|
326
323
|
children: new Date(e.submittedAt).toLocaleString()
|
|
327
324
|
})] }),
|
|
328
|
-
e.description && /* @__PURE__ */
|
|
325
|
+
e.description && /* @__PURE__ */ p("div", {
|
|
329
326
|
className: "col-span-2 sm:col-span-3",
|
|
330
|
-
children: [/* @__PURE__ */
|
|
327
|
+
children: [/* @__PURE__ */ f("dt", {
|
|
331
328
|
className: "font-medium text-text-secondary",
|
|
332
329
|
children: "Description"
|
|
333
|
-
}), /* @__PURE__ */
|
|
330
|
+
}), /* @__PURE__ */ f("dd", {
|
|
334
331
|
className: "mt-0.5 whitespace-pre-wrap text-text-primary",
|
|
335
332
|
children: e.description
|
|
336
333
|
})]
|
|
@@ -338,37 +335,38 @@ var m = "\n query PendingReviewProducts($limit: Int, $offset: Int) {\n pendi
|
|
|
338
335
|
]
|
|
339
336
|
})
|
|
340
337
|
}),
|
|
341
|
-
|
|
338
|
+
I === e.id && /* @__PURE__ */ p("div", {
|
|
342
339
|
className: "border-t border-border-default bg-surface-muted px-4 py-3",
|
|
343
340
|
children: [
|
|
344
|
-
/* @__PURE__ */
|
|
341
|
+
/* @__PURE__ */ f("label", {
|
|
345
342
|
htmlFor: `reject-reason-${e.id}`,
|
|
346
343
|
className: "block text-xs font-medium text-text-secondary",
|
|
347
344
|
children: "Rejection reason (required)"
|
|
348
345
|
}),
|
|
349
|
-
/* @__PURE__ */
|
|
346
|
+
/* @__PURE__ */ f("textarea", {
|
|
350
347
|
id: `reject-reason-${e.id}`,
|
|
351
|
-
|
|
352
|
-
|
|
348
|
+
"aria-label": "Rejection reason",
|
|
349
|
+
value: R,
|
|
350
|
+
onChange: (e) => z(e.target.value),
|
|
353
351
|
rows: 3,
|
|
354
352
|
required: !0,
|
|
355
353
|
"aria-required": "true",
|
|
356
354
|
className: "mt-1 w-full rounded-md border border-border-default bg-surface-default px-3 py-2 text-sm text-text-primary focus:border-border-accent focus:outline-none",
|
|
357
355
|
placeholder: "Explain why this submission is being rejected…"
|
|
358
356
|
}),
|
|
359
|
-
/* @__PURE__ */
|
|
357
|
+
/* @__PURE__ */ p("div", {
|
|
360
358
|
className: "mt-2 flex justify-end gap-2",
|
|
361
|
-
children: [/* @__PURE__ */
|
|
359
|
+
children: [/* @__PURE__ */ f("button", {
|
|
362
360
|
type: "button",
|
|
363
361
|
onClick: () => {
|
|
364
|
-
|
|
362
|
+
L(null), z("");
|
|
365
363
|
},
|
|
366
364
|
className: "rounded-md border border-border-default bg-surface-default px-3 py-1 text-xs text-text-primary hover:bg-surface-hover",
|
|
367
365
|
children: "Cancel"
|
|
368
|
-
}), /* @__PURE__ */
|
|
366
|
+
}), /* @__PURE__ */ f("button", {
|
|
369
367
|
type: "button",
|
|
370
|
-
onClick: () => void
|
|
371
|
-
disabled: !
|
|
368
|
+
onClick: () => void W(e.id),
|
|
369
|
+
disabled: !R.trim() || M === e.id,
|
|
372
370
|
className: "rounded-md bg-surface-danger px-3 py-1 text-xs font-medium text-text-on-danger hover:bg-surface-danger-hover disabled:opacity-60",
|
|
373
371
|
children: "Submit rejection"
|
|
374
372
|
})]
|
|
@@ -382,6 +380,6 @@ var m = "\n query PendingReviewProducts($limit: Int, $offset: Int) {\n pendi
|
|
|
382
380
|
});
|
|
383
381
|
};
|
|
384
382
|
//#endregion
|
|
385
|
-
export {
|
|
383
|
+
export { x as AdminSubmissionsQueuePage };
|
|
386
384
|
|
|
387
385
|
//# sourceMappingURL=AdminSubmissionsQueuePage.js.map
|