@burdenoff/microfe-devportal 2026.622.2 → 2026.623.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/pages/AdminReviewPage.js +198 -140
- package/dist/devportal/pages/AdminReviewPage.js.map +1 -1
- package/dist/devportal/pages/ApplicationDetailPage.js +368 -345
- package/dist/devportal/pages/ApplicationDetailPage.js.map +1 -1
- package/dist/generated/global-operations.js +244 -186
- package/dist/generated/global-operations.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,337 +1,395 @@
|
|
|
1
1
|
import { useDevportal as e } from "../providers/DevportalProvider.js";
|
|
2
2
|
import { EmptyState as t } from "../components/EmptyState.js";
|
|
3
|
-
import { useApproveApplicationMutation as n,
|
|
4
|
-
import { getErrorMessage as
|
|
5
|
-
import { PageLayout as
|
|
6
|
-
import { PermissionGuard as
|
|
3
|
+
import { useApproveApplicationMutation as n, useGetApplicationForReviewQuery as r, useGetApplicationsQuery as i, useRejectApplicationMutation as a } from "../../generated/global-operations.js";
|
|
4
|
+
import { getErrorMessage as o } from "../hooks/useGraphQL.js";
|
|
5
|
+
import { PageLayout as s, PageSection as c } from "../components/PageLayout.js";
|
|
6
|
+
import { PermissionGuard as l } from "../components/PermissionGuard.js";
|
|
7
7
|
import "../components/index.js";
|
|
8
|
-
import { DEVPORTAL_PERMISSIONS as
|
|
9
|
-
import { useDevportalPermission as
|
|
8
|
+
import { DEVPORTAL_PERMISSIONS as u } from "../constants/permissions.js";
|
|
9
|
+
import { useDevportalPermission as d } from "../hooks/usePermission.js";
|
|
10
10
|
import "../hooks/index.js";
|
|
11
|
-
import { useState as
|
|
12
|
-
import { useI18n as
|
|
13
|
-
import { AlertCircle as
|
|
14
|
-
import { jsx as
|
|
11
|
+
import { useState as f } from "react";
|
|
12
|
+
import { useI18n as p } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
13
|
+
import { AlertCircle as m, CheckCircle as h, ChevronDown as g, ChevronUp as _, Clock as v, Download as y, Eye as b, FileJson as x, Loader2 as S, Search as C, XCircle as w } from "lucide-react";
|
|
14
|
+
import { jsx as T, jsxs as E } from "react/jsx-runtime";
|
|
15
15
|
//#region src/devportal/pages/AdminReviewPage.tsx
|
|
16
|
-
var
|
|
17
|
-
let
|
|
18
|
-
|
|
16
|
+
var D = ({ manifest: e, tr: t }) => {
|
|
17
|
+
let [n, r] = f(!1);
|
|
18
|
+
return /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ E("button", {
|
|
19
|
+
type: "button",
|
|
20
|
+
onClick: () => r((e) => !e),
|
|
21
|
+
className: "inline-flex items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground",
|
|
22
|
+
children: [/* @__PURE__ */ T(x, { size: 13 }), n ? t("devportal.hideManifest", "Hide manifest") : t("devportal.viewManifest", "View manifest.json")]
|
|
23
|
+
}), n && /* @__PURE__ */ T("pre", {
|
|
24
|
+
className: "mt-2 max-h-48 overflow-auto rounded-md bg-muted p-3 text-xs font-mono whitespace-pre-wrap break-all",
|
|
25
|
+
children: JSON.stringify(e, null, 2)
|
|
26
|
+
})] });
|
|
27
|
+
}, O = ({ app: t, onApprove: n, onReject: i, processing: a }) => {
|
|
28
|
+
let { navigate: o, basePath: s } = e(), { t: c } = p(), l = (e, t) => {
|
|
29
|
+
let n = c(e);
|
|
19
30
|
return n === e ? t : n;
|
|
20
|
-
}, [
|
|
21
|
-
|
|
31
|
+
}, [m, v] = f(!1), [x, C] = f(""), O = d(u.APP_APPROVE), k = d(u.APP_REJECT), { data: A } = r({
|
|
32
|
+
variables: { id: t.id },
|
|
33
|
+
skip: !m,
|
|
34
|
+
fetchPolicy: "cache-first"
|
|
35
|
+
}), j = A?.application?.versions?.edges?.[0]?.node;
|
|
36
|
+
return /* @__PURE__ */ E("div", {
|
|
22
37
|
className: "rounded-lg border bg-card overflow-hidden",
|
|
23
|
-
children: [/* @__PURE__ */
|
|
38
|
+
children: [/* @__PURE__ */ E("div", {
|
|
24
39
|
className: "flex items-center gap-4 p-4",
|
|
25
40
|
children: [
|
|
26
|
-
t.iconUrl ? /* @__PURE__ */
|
|
41
|
+
t.iconUrl ? /* @__PURE__ */ T("img", {
|
|
27
42
|
src: t.iconUrl,
|
|
28
43
|
alt: t.name,
|
|
29
44
|
className: "h-12 w-12 rounded-lg object-cover flex-shrink-0"
|
|
30
|
-
}) : /* @__PURE__ */
|
|
45
|
+
}) : /* @__PURE__ */ T("div", {
|
|
31
46
|
className: "h-12 w-12 rounded-lg bg-muted flex items-center justify-center flex-shrink-0",
|
|
32
|
-
children: /* @__PURE__ */
|
|
47
|
+
children: /* @__PURE__ */ T("span", {
|
|
33
48
|
className: "text-lg font-bold text-muted-foreground",
|
|
34
49
|
children: t.name.charAt(0).toUpperCase()
|
|
35
50
|
})
|
|
36
51
|
}),
|
|
37
|
-
/* @__PURE__ */
|
|
52
|
+
/* @__PURE__ */ E("div", {
|
|
38
53
|
className: "flex-1 min-w-0",
|
|
39
54
|
children: [
|
|
40
|
-
/* @__PURE__ */
|
|
55
|
+
/* @__PURE__ */ E("div", {
|
|
41
56
|
className: "flex items-center gap-2",
|
|
42
57
|
children: [
|
|
43
|
-
/* @__PURE__ */
|
|
58
|
+
/* @__PURE__ */ T("h3", {
|
|
44
59
|
className: "font-semibold truncate",
|
|
45
60
|
children: t.name
|
|
46
61
|
}),
|
|
47
|
-
/* @__PURE__ */
|
|
62
|
+
/* @__PURE__ */ T("span", {
|
|
48
63
|
className: "inline-flex items-center rounded-full bg-status-warning-bg-subtle px-2 py-0.5 text-xs font-medium text-status-warning-text",
|
|
49
64
|
children: t.status
|
|
50
65
|
}),
|
|
51
|
-
/* @__PURE__ */
|
|
66
|
+
/* @__PURE__ */ T("span", {
|
|
52
67
|
className: "inline-flex items-center rounded-full bg-muted px-2 py-0.5 text-xs text-muted-foreground",
|
|
53
68
|
children: t.appType.replace(/_/g, " ")
|
|
54
69
|
})
|
|
55
70
|
]
|
|
56
71
|
}),
|
|
57
|
-
/* @__PURE__ */
|
|
72
|
+
/* @__PURE__ */ T("p", {
|
|
58
73
|
className: "text-sm text-muted-foreground truncate",
|
|
59
|
-
children: t.shortDescription ?? t.description ??
|
|
74
|
+
children: t.shortDescription ?? t.description ?? l("devportal.noDescription", "No description")
|
|
60
75
|
}),
|
|
61
|
-
/* @__PURE__ */
|
|
76
|
+
/* @__PURE__ */ E("p", {
|
|
62
77
|
className: "text-xs text-muted-foreground mt-0.5",
|
|
63
78
|
children: [
|
|
64
|
-
|
|
79
|
+
l("devportal.submitted", "Submitted"),
|
|
65
80
|
":",
|
|
66
81
|
" ",
|
|
67
82
|
t.submittedAt ? new Date(t.submittedAt).toLocaleDateString(void 0, {
|
|
68
83
|
year: "numeric",
|
|
69
84
|
month: "short",
|
|
70
85
|
day: "numeric"
|
|
71
|
-
}) :
|
|
86
|
+
}) : l("devportal.unknown", "Unknown")
|
|
72
87
|
]
|
|
73
88
|
})
|
|
74
89
|
]
|
|
75
90
|
}),
|
|
76
|
-
/* @__PURE__ */
|
|
91
|
+
/* @__PURE__ */ E("div", {
|
|
77
92
|
className: "flex items-center gap-2 flex-shrink-0",
|
|
78
|
-
children: [/* @__PURE__ */
|
|
79
|
-
onClick: () =>
|
|
93
|
+
children: [/* @__PURE__ */ E("button", {
|
|
94
|
+
onClick: () => o?.(`${s}/apps/${t.id}`),
|
|
80
95
|
className: "inline-flex items-center gap-1.5 rounded-md border px-3 py-1.5 text-sm hover:bg-muted",
|
|
81
|
-
title:
|
|
82
|
-
children: [/* @__PURE__ */
|
|
83
|
-
}), /* @__PURE__ */
|
|
84
|
-
onClick: () =>
|
|
96
|
+
title: l("devportal.viewAppDetails", "View app details"),
|
|
97
|
+
children: [/* @__PURE__ */ T(b, { size: 14 }), l("devportal.view", "View")]
|
|
98
|
+
}), /* @__PURE__ */ E("button", {
|
|
99
|
+
onClick: () => v((e) => !e),
|
|
85
100
|
className: "inline-flex items-center gap-1.5 rounded-md border px-3 py-1.5 text-sm hover:bg-muted",
|
|
86
|
-
children: [
|
|
101
|
+
children: [T(m ? _ : g, { size: 14 }), l("devportal.review", "Review")]
|
|
87
102
|
})]
|
|
88
103
|
})
|
|
89
104
|
]
|
|
90
|
-
}),
|
|
105
|
+
}), m && /* @__PURE__ */ E("div", {
|
|
91
106
|
className: "border-t bg-muted/30 p-4 space-y-4",
|
|
92
107
|
children: [
|
|
93
|
-
t.reviewNotes && /* @__PURE__ */
|
|
108
|
+
t.reviewNotes && /* @__PURE__ */ E("div", {
|
|
94
109
|
className: "rounded-md border bg-background p-3",
|
|
95
|
-
children: [/* @__PURE__ */
|
|
110
|
+
children: [/* @__PURE__ */ T("p", {
|
|
96
111
|
className: "text-xs font-medium text-muted-foreground mb-1",
|
|
97
|
-
children:
|
|
98
|
-
}), /* @__PURE__ */
|
|
112
|
+
children: l("devportal.developerNotes", "Developer Notes")
|
|
113
|
+
}), /* @__PURE__ */ T("p", {
|
|
99
114
|
className: "text-sm",
|
|
100
115
|
children: t.reviewNotes
|
|
101
116
|
})]
|
|
102
117
|
}),
|
|
103
|
-
/* @__PURE__ */
|
|
118
|
+
/* @__PURE__ */ E("div", {
|
|
104
119
|
className: "grid grid-cols-2 gap-3 text-sm",
|
|
105
120
|
children: [
|
|
106
|
-
/* @__PURE__ */
|
|
121
|
+
/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ E("span", {
|
|
107
122
|
className: "text-muted-foreground",
|
|
108
123
|
children: [
|
|
109
|
-
|
|
124
|
+
l("devportal.category", "Category"),
|
|
110
125
|
":",
|
|
111
126
|
" "
|
|
112
127
|
]
|
|
113
|
-
}), /* @__PURE__ */
|
|
114
|
-
/* @__PURE__ */
|
|
128
|
+
}), /* @__PURE__ */ T("span", { children: t.category ?? "—" })] }),
|
|
129
|
+
/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ E("span", {
|
|
115
130
|
className: "text-muted-foreground",
|
|
116
131
|
children: [
|
|
117
|
-
|
|
132
|
+
l("devportal.pricing", "Pricing"),
|
|
118
133
|
":",
|
|
119
134
|
" "
|
|
120
135
|
]
|
|
121
|
-
}), /* @__PURE__ */
|
|
122
|
-
/* @__PURE__ */
|
|
136
|
+
}), /* @__PURE__ */ T("span", { children: t.pricingType ?? "FREE" })] }),
|
|
137
|
+
/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ E("span", {
|
|
123
138
|
className: "text-muted-foreground",
|
|
124
139
|
children: [
|
|
125
|
-
|
|
140
|
+
l("devportal.website", "Website"),
|
|
126
141
|
":",
|
|
127
142
|
" "
|
|
128
143
|
]
|
|
129
|
-
}), t.websiteUrl ? /* @__PURE__ */
|
|
144
|
+
}), t.websiteUrl ? /* @__PURE__ */ T("a", {
|
|
130
145
|
href: t.websiteUrl,
|
|
131
146
|
target: "_blank",
|
|
132
147
|
rel: "noopener noreferrer",
|
|
133
148
|
className: "text-primary underline hover:no-underline",
|
|
134
|
-
children:
|
|
135
|
-
}) : /* @__PURE__ */
|
|
136
|
-
/* @__PURE__ */
|
|
149
|
+
children: l("devportal.link", "Link")
|
|
150
|
+
}) : /* @__PURE__ */ T("span", { children: "—" })] }),
|
|
151
|
+
/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ E("span", {
|
|
137
152
|
className: "text-muted-foreground",
|
|
138
153
|
children: [
|
|
139
|
-
|
|
154
|
+
l("devportal.privacyPolicy", "Privacy Policy"),
|
|
140
155
|
":",
|
|
141
156
|
" "
|
|
142
157
|
]
|
|
143
|
-
}), t.privacyPolicyUrl ? /* @__PURE__ */
|
|
158
|
+
}), t.privacyPolicyUrl ? /* @__PURE__ */ T("a", {
|
|
144
159
|
href: t.privacyPolicyUrl,
|
|
145
160
|
target: "_blank",
|
|
146
161
|
rel: "noopener noreferrer",
|
|
147
162
|
className: "text-primary underline hover:no-underline",
|
|
148
|
-
children:
|
|
149
|
-
}) : /* @__PURE__ */
|
|
163
|
+
children: l("devportal.link", "Link")
|
|
164
|
+
}) : /* @__PURE__ */ T("span", {
|
|
150
165
|
className: "text-status-error-text",
|
|
151
|
-
children:
|
|
166
|
+
children: l("devportal.missing", "Missing")
|
|
152
167
|
})] })
|
|
153
168
|
]
|
|
154
169
|
}),
|
|
155
|
-
|
|
170
|
+
j && /* @__PURE__ */ E("div", {
|
|
171
|
+
className: "rounded-md border bg-background p-3 space-y-3",
|
|
172
|
+
children: [
|
|
173
|
+
/* @__PURE__ */ E("p", {
|
|
174
|
+
className: "text-xs font-medium text-muted-foreground",
|
|
175
|
+
children: [
|
|
176
|
+
l("devportal.latestVersion", "Latest Version"),
|
|
177
|
+
":",
|
|
178
|
+
" ",
|
|
179
|
+
/* @__PURE__ */ T("span", {
|
|
180
|
+
className: "font-mono text-foreground",
|
|
181
|
+
children: j.version
|
|
182
|
+
})
|
|
183
|
+
]
|
|
184
|
+
}),
|
|
185
|
+
/* @__PURE__ */ T("div", {
|
|
186
|
+
className: "flex flex-wrap gap-2",
|
|
187
|
+
children: j.packageUrl && /* @__PURE__ */ E("a", {
|
|
188
|
+
href: j.packageUrl,
|
|
189
|
+
download: !0,
|
|
190
|
+
target: "_blank",
|
|
191
|
+
rel: "noopener noreferrer",
|
|
192
|
+
className: "inline-flex items-center gap-1.5 rounded-md border px-3 py-1.5 text-sm hover:bg-muted",
|
|
193
|
+
children: [
|
|
194
|
+
/* @__PURE__ */ T(y, { size: 14 }),
|
|
195
|
+
l("devportal.downloadPackage", "Download Package"),
|
|
196
|
+
j.packageSize && /* @__PURE__ */ E("span", {
|
|
197
|
+
className: "text-muted-foreground text-xs ml-1",
|
|
198
|
+
children: [
|
|
199
|
+
"(",
|
|
200
|
+
j.packageSize,
|
|
201
|
+
")"
|
|
202
|
+
]
|
|
203
|
+
})
|
|
204
|
+
]
|
|
205
|
+
})
|
|
206
|
+
}),
|
|
207
|
+
j.manifest && /* @__PURE__ */ T(D, {
|
|
208
|
+
manifest: j.manifest,
|
|
209
|
+
tr: l
|
|
210
|
+
})
|
|
211
|
+
]
|
|
212
|
+
}),
|
|
213
|
+
/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("label", {
|
|
156
214
|
className: "text-sm font-medium",
|
|
157
|
-
children:
|
|
158
|
-
}), /* @__PURE__ */
|
|
159
|
-
value:
|
|
160
|
-
onChange: (e) =>
|
|
161
|
-
placeholder:
|
|
215
|
+
children: l("devportal.reviewNotes", "Review Notes")
|
|
216
|
+
}), /* @__PURE__ */ T("textarea", {
|
|
217
|
+
value: x,
|
|
218
|
+
onChange: (e) => C(e.target.value),
|
|
219
|
+
placeholder: l("devportal.reviewNotesPlaceholder", "Add feedback for the developer (required for rejection)..."),
|
|
162
220
|
rows: 3,
|
|
163
221
|
className: "mt-1 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring resize-none"
|
|
164
222
|
})] }),
|
|
165
|
-
/* @__PURE__ */
|
|
223
|
+
/* @__PURE__ */ E("div", {
|
|
166
224
|
className: "flex gap-3",
|
|
167
|
-
children: [/* @__PURE__ */
|
|
168
|
-
onClick: () => n(t.id,
|
|
169
|
-
disabled:
|
|
170
|
-
"aria-disabled":
|
|
171
|
-
title:
|
|
225
|
+
children: [/* @__PURE__ */ E("button", {
|
|
226
|
+
onClick: () => n(t.id, x),
|
|
227
|
+
disabled: a || !O.allowed,
|
|
228
|
+
"aria-disabled": a || !O.allowed,
|
|
229
|
+
title: O.allowed ? void 0 : l("devportal.common.noPermission", "You do not have permission to perform this action"),
|
|
172
230
|
className: "inline-flex items-center gap-2 rounded-md bg-status-success-bg px-4 py-2 text-sm font-medium text-white hover:bg-status-success-bg/90 disabled:opacity-50 disabled:cursor-not-allowed focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary",
|
|
173
|
-
children: [
|
|
231
|
+
children: [a ? /* @__PURE__ */ T(S, {
|
|
174
232
|
size: 14,
|
|
175
233
|
className: "animate-spin",
|
|
176
234
|
"aria-hidden": "true"
|
|
177
|
-
}) : /* @__PURE__ */
|
|
235
|
+
}) : /* @__PURE__ */ T(h, {
|
|
178
236
|
size: 14,
|
|
179
237
|
"aria-hidden": "true"
|
|
180
|
-
}),
|
|
181
|
-
}), /* @__PURE__ */
|
|
182
|
-
onClick: () =>
|
|
183
|
-
disabled:
|
|
184
|
-
"aria-disabled":
|
|
238
|
+
}), l("devportal.approve", "Approve")]
|
|
239
|
+
}), /* @__PURE__ */ E("button", {
|
|
240
|
+
onClick: () => i(t.id, x),
|
|
241
|
+
disabled: a || !x.trim() || !k.allowed,
|
|
242
|
+
"aria-disabled": a || !x.trim() || !k.allowed,
|
|
185
243
|
className: "inline-flex items-center gap-2 rounded-md bg-destructive px-4 py-2 text-sm font-medium text-destructive-foreground hover:bg-destructive/90 disabled:opacity-50 disabled:cursor-not-allowed focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary",
|
|
186
|
-
title:
|
|
187
|
-
children: [
|
|
244
|
+
title: k.allowed ? x.trim() ? void 0 : l("devportal.notesRequiredForRejection", "Notes required for rejection") : l("devportal.common.noPermission", "You do not have permission to perform this action"),
|
|
245
|
+
children: [a ? /* @__PURE__ */ T(S, {
|
|
188
246
|
size: 14,
|
|
189
247
|
className: "animate-spin",
|
|
190
248
|
"aria-hidden": "true"
|
|
191
|
-
}) : /* @__PURE__ */
|
|
249
|
+
}) : /* @__PURE__ */ T(w, {
|
|
192
250
|
size: 14,
|
|
193
251
|
"aria-hidden": "true"
|
|
194
|
-
}),
|
|
252
|
+
}), l("devportal.reject", "Reject")]
|
|
195
253
|
})]
|
|
196
254
|
})
|
|
197
255
|
]
|
|
198
256
|
})]
|
|
199
257
|
});
|
|
200
|
-
},
|
|
201
|
-
let { t: e } =
|
|
258
|
+
}, k = () => {
|
|
259
|
+
let { t: e } = p(), r = (t, n) => {
|
|
202
260
|
let r = e(t);
|
|
203
261
|
return r === t ? n : r;
|
|
204
|
-
}, [
|
|
262
|
+
}, [d, g] = f(""), [_, y] = f(/* @__PURE__ */ new Set()), [b, x] = f(null), [w, D] = f(null), k = (e) => y((t) => new Set(t).add(e)), A = (e) => y((t) => {
|
|
205
263
|
let n = new Set(t);
|
|
206
264
|
return n.delete(e), n;
|
|
207
|
-
}), { data: j, loading: M, error: N, refetch: P } =
|
|
265
|
+
}), { data: j, loading: M, error: N, refetch: P } = i({
|
|
208
266
|
variables: {
|
|
209
267
|
status: "SUBMITTED",
|
|
210
268
|
limit: 100
|
|
211
269
|
},
|
|
212
270
|
fetchPolicy: "cache-and-network"
|
|
213
|
-
}), [F] = n(), [I] =
|
|
214
|
-
k(e),
|
|
271
|
+
}), [F] = n(), [I] = a(), L = j?.applications?.edges?.map((e) => e.node) ?? [], R = d ? L.filter((e) => e.name.toLowerCase().includes(d.toLowerCase()) || (e.shortDescription ?? "").toLowerCase().includes(d.toLowerCase())) : L, z = async (e, t) => {
|
|
272
|
+
k(e), x(null), D(null);
|
|
215
273
|
try {
|
|
216
274
|
let n = await F({ variables: {
|
|
217
275
|
id: e,
|
|
218
276
|
notes: t || void 0
|
|
219
277
|
} });
|
|
220
278
|
if (n.error) throw n.error;
|
|
221
|
-
|
|
279
|
+
D(r("devportal.applicationApprovedSuccess", "Application approved successfully.")), await P();
|
|
222
280
|
} catch (e) {
|
|
223
|
-
|
|
281
|
+
x(e instanceof Error ? e.message : r("devportal.failedToApproveApplication", "Failed to approve application"));
|
|
224
282
|
} finally {
|
|
225
283
|
A(e);
|
|
226
284
|
}
|
|
227
285
|
}, B = async (e, t) => {
|
|
228
286
|
if (t.trim()) {
|
|
229
|
-
k(e),
|
|
287
|
+
k(e), x(null), D(null);
|
|
230
288
|
try {
|
|
231
289
|
let n = await I({ variables: {
|
|
232
290
|
id: e,
|
|
233
291
|
notes: t
|
|
234
292
|
} });
|
|
235
293
|
if (n.error) throw n.error;
|
|
236
|
-
|
|
294
|
+
D(r("devportal.applicationRejected", "Application rejected.")), await P();
|
|
237
295
|
} catch (e) {
|
|
238
|
-
|
|
296
|
+
x(e instanceof Error ? e.message : r("devportal.failedToRejectApplication", "Failed to reject application"));
|
|
239
297
|
} finally {
|
|
240
298
|
A(e);
|
|
241
299
|
}
|
|
242
300
|
}
|
|
243
301
|
};
|
|
244
|
-
return M && !j ? /* @__PURE__ */
|
|
245
|
-
title:
|
|
246
|
-
description:
|
|
247
|
-
children: /* @__PURE__ */
|
|
302
|
+
return M && !j ? /* @__PURE__ */ T(s, {
|
|
303
|
+
title: r("devportal.appReviewQueue", "App Review Queue"),
|
|
304
|
+
description: r("devportal.appReviewQueueDescription", "Review submitted applications for approval"),
|
|
305
|
+
children: /* @__PURE__ */ T("div", {
|
|
248
306
|
className: "flex items-center justify-center py-12",
|
|
249
|
-
children: /* @__PURE__ */ S
|
|
307
|
+
children: /* @__PURE__ */ T(S, { className: "h-8 w-8 animate-spin text-muted-foreground" })
|
|
250
308
|
})
|
|
251
|
-
}) : N ? /* @__PURE__ */
|
|
252
|
-
title:
|
|
253
|
-
description:
|
|
254
|
-
children: /* @__PURE__ */
|
|
309
|
+
}) : N ? /* @__PURE__ */ T(s, {
|
|
310
|
+
title: r("devportal.appReviewQueue", "App Review Queue"),
|
|
311
|
+
description: r("devportal.appReviewQueueDescription", "Review submitted applications for approval"),
|
|
312
|
+
children: /* @__PURE__ */ E("div", {
|
|
255
313
|
className: "rounded-lg border border-destructive/50 bg-destructive/10 p-6 text-center",
|
|
256
314
|
children: [
|
|
257
|
-
/* @__PURE__ */
|
|
258
|
-
/* @__PURE__ */
|
|
315
|
+
/* @__PURE__ */ T(m, { className: "mx-auto h-8 w-8 text-destructive" }),
|
|
316
|
+
/* @__PURE__ */ T("p", {
|
|
259
317
|
className: "mt-2 text-sm text-muted-foreground",
|
|
260
|
-
children:
|
|
318
|
+
children: o(N)
|
|
261
319
|
}),
|
|
262
|
-
/* @__PURE__ */
|
|
320
|
+
/* @__PURE__ */ T("button", {
|
|
263
321
|
onClick: () => P(),
|
|
264
322
|
className: "mt-4 rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90",
|
|
265
|
-
children:
|
|
323
|
+
children: r("devportal.retry", "Retry")
|
|
266
324
|
})
|
|
267
325
|
]
|
|
268
326
|
})
|
|
269
|
-
}) : /* @__PURE__ */
|
|
270
|
-
permission:
|
|
271
|
-
children: /* @__PURE__ */
|
|
272
|
-
title:
|
|
273
|
-
description:
|
|
274
|
-
actions: /* @__PURE__ */
|
|
327
|
+
}) : /* @__PURE__ */ T(l, {
|
|
328
|
+
permission: u.REVIEW_MANAGE,
|
|
329
|
+
children: /* @__PURE__ */ E(s, {
|
|
330
|
+
title: r("devportal.appReviewQueue", "App Review Queue"),
|
|
331
|
+
description: r("devportal.appReviewQueueFullDescription", "Review submitted applications for approval or rejection"),
|
|
332
|
+
actions: /* @__PURE__ */ T("button", {
|
|
275
333
|
onClick: () => P(),
|
|
276
334
|
className: "rounded-md border px-3 py-1.5 text-sm hover:bg-muted",
|
|
277
|
-
children:
|
|
335
|
+
children: r("devportal.refresh", "Refresh")
|
|
278
336
|
}),
|
|
279
337
|
children: [
|
|
280
|
-
/* @__PURE__ */
|
|
338
|
+
/* @__PURE__ */ E("div", {
|
|
281
339
|
className: "flex items-center gap-6 rounded-lg border bg-card p-4",
|
|
282
|
-
children: [/* @__PURE__ */
|
|
340
|
+
children: [/* @__PURE__ */ E("div", {
|
|
283
341
|
className: "flex items-center gap-2",
|
|
284
|
-
children: [/* @__PURE__ */
|
|
342
|
+
children: [/* @__PURE__ */ T(v, {
|
|
285
343
|
size: 18,
|
|
286
344
|
className: "text-status-warning-text"
|
|
287
|
-
}), /* @__PURE__ */
|
|
345
|
+
}), /* @__PURE__ */ E("span", {
|
|
288
346
|
className: "text-sm font-medium",
|
|
289
347
|
children: [
|
|
290
348
|
L.length,
|
|
291
349
|
" ",
|
|
292
|
-
|
|
350
|
+
r("devportal.pendingReview", "pending review")
|
|
293
351
|
]
|
|
294
352
|
})]
|
|
295
|
-
}),
|
|
353
|
+
}), _.size > 0 && /* @__PURE__ */ E("div", {
|
|
296
354
|
className: "flex items-center gap-2 text-sm text-muted-foreground",
|
|
297
|
-
children: [/* @__PURE__ */ S
|
|
355
|
+
children: [/* @__PURE__ */ T(S, {
|
|
298
356
|
size: 14,
|
|
299
357
|
className: "animate-spin"
|
|
300
|
-
}),
|
|
358
|
+
}), r("devportal.processing", "Processing...")]
|
|
301
359
|
})]
|
|
302
360
|
}),
|
|
303
|
-
|
|
361
|
+
w && /* @__PURE__ */ E("div", {
|
|
304
362
|
className: "flex items-center gap-2 rounded-lg border border-border-subtle bg-status-success-bg-subtle px-4 py-3 text-sm text-status-success-text",
|
|
305
|
-
children: [/* @__PURE__ */
|
|
363
|
+
children: [/* @__PURE__ */ T(h, { size: 16 }), w]
|
|
306
364
|
}),
|
|
307
|
-
|
|
365
|
+
b && /* @__PURE__ */ E("div", {
|
|
308
366
|
className: "flex items-center gap-2 rounded-lg border border-destructive/50 bg-destructive/10 px-4 py-3 text-sm text-destructive",
|
|
309
|
-
children: [/* @__PURE__ */
|
|
367
|
+
children: [/* @__PURE__ */ T(m, { size: 16 }), b]
|
|
310
368
|
}),
|
|
311
|
-
L.length > 0 && /* @__PURE__ */
|
|
369
|
+
L.length > 0 && /* @__PURE__ */ E("div", {
|
|
312
370
|
className: "relative max-w-sm",
|
|
313
|
-
children: [/* @__PURE__ */
|
|
371
|
+
children: [/* @__PURE__ */ T(C, {
|
|
314
372
|
size: 14,
|
|
315
373
|
className: "absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground"
|
|
316
|
-
}), /* @__PURE__ */
|
|
374
|
+
}), /* @__PURE__ */ T("input", {
|
|
317
375
|
type: "text",
|
|
318
|
-
placeholder:
|
|
319
|
-
value:
|
|
376
|
+
placeholder: r("devportal.searchSubmittedApps", "Search submitted apps..."),
|
|
377
|
+
value: d,
|
|
320
378
|
onChange: (e) => g(e.target.value),
|
|
321
379
|
className: "w-full rounded-md border bg-background pl-9 pr-4 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-primary"
|
|
322
380
|
})]
|
|
323
381
|
}),
|
|
324
|
-
/* @__PURE__ */
|
|
325
|
-
icon: /* @__PURE__ */
|
|
326
|
-
title:
|
|
327
|
-
description:
|
|
328
|
-
}) : /* @__PURE__ */
|
|
382
|
+
/* @__PURE__ */ T(c, { children: R.length === 0 ? /* @__PURE__ */ T(t, {
|
|
383
|
+
icon: /* @__PURE__ */ T(h, { size: 32 }),
|
|
384
|
+
title: r("devportal.noAppsPendingReview", "No apps pending review"),
|
|
385
|
+
description: d ? r("devportal.noAppsMatchSearch", "No apps match your search") : r("devportal.allApplicationsReviewed", "All submitted applications have been reviewed")
|
|
386
|
+
}) : /* @__PURE__ */ T("div", {
|
|
329
387
|
className: "space-y-3",
|
|
330
|
-
children: R.map((e) => /* @__PURE__ */
|
|
388
|
+
children: R.map((e) => /* @__PURE__ */ T(O, {
|
|
331
389
|
app: e,
|
|
332
390
|
onApprove: z,
|
|
333
391
|
onReject: B,
|
|
334
|
-
processing:
|
|
392
|
+
processing: _.has(e.id)
|
|
335
393
|
}, e.id))
|
|
336
394
|
}) })
|
|
337
395
|
]
|
|
@@ -339,6 +397,6 @@ var w = ({ app: t, onApprove: n, onReject: r, processing: i }) => {
|
|
|
339
397
|
});
|
|
340
398
|
};
|
|
341
399
|
//#endregion
|
|
342
|
-
export {
|
|
400
|
+
export { k as AdminReviewPage };
|
|
343
401
|
|
|
344
402
|
//# sourceMappingURL=AdminReviewPage.js.map
|