@burdenoff/microfe-proserviceworld 2026.525.1 → 2026.625.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/proserviceworld/pages/AdminReportsPage.js +368 -335
- package/dist/proserviceworld/pages/AdminReportsPage.js.map +1 -1
- package/dist/proserviceworld/pages/AdminUsersPage.js +262 -242
- package/dist/proserviceworld/pages/AdminUsersPage.js.map +1 -1
- package/dist/proserviceworld/pages/AnalyticsPage.js +346 -318
- package/dist/proserviceworld/pages/AnalyticsPage.js.map +1 -1
- package/dist/proserviceworld/pages/BookingsPage.js +202 -185
- package/dist/proserviceworld/pages/BookingsPage.js.map +1 -1
- package/dist/proserviceworld/pages/DashboardPage.js +400 -363
- package/dist/proserviceworld/pages/DashboardPage.js.map +1 -1
- package/dist/proserviceworld/pages/DocumentsPage.js +389 -324
- package/dist/proserviceworld/pages/DocumentsPage.js.map +1 -1
- package/dist/proserviceworld/pages/MessagesPage.js +77 -82
- package/dist/proserviceworld/pages/MessagesPage.js.map +1 -1
- package/dist/proserviceworld/pages/PaymentsPage.js +373 -346
- package/dist/proserviceworld/pages/PaymentsPage.js.map +1 -1
- package/dist/proserviceworld/pages/ProjectsPage.js +432 -385
- package/dist/proserviceworld/pages/ProjectsPage.js.map +1 -1
- package/dist/proserviceworld/pages/ProviderDetailPage.js +396 -352
- package/dist/proserviceworld/pages/ProviderDetailPage.js.map +1 -1
- package/dist/proserviceworld/pages/ProvidersPage.js +245 -244
- package/dist/proserviceworld/pages/ProvidersPage.js.map +1 -1
- package/dist/proserviceworld/pages/ReviewsPage.js +31 -31
- package/dist/proserviceworld/pages/ReviewsPage.js.map +1 -1
- package/dist/proserviceworld/pages/ServiceDetailsPage.js +349 -316
- package/dist/proserviceworld/pages/ServiceDetailsPage.js.map +1 -1
- package/dist/proserviceworld/pages/ServicesPage.js +163 -160
- package/dist/proserviceworld/pages/ServicesPage.js.map +1 -1
- package/dist/proserviceworld/pages/VerificationPage.js +265 -256
- package/dist/proserviceworld/pages/VerificationPage.js.map +1 -1
- package/package.json +2 -2
|
@@ -2,10 +2,10 @@ import { useProServiceWorldStore as e } from "../store/proserviceworldStore.js";
|
|
|
2
2
|
import { useState as t } from "react";
|
|
3
3
|
import { AlertTriangle as n, ArrowUpRight as r, BarChart3 as i, Calendar as a, DollarSign as o, Download as s, FileText as c, Minus as l, Shield as u, ShoppingCart as d, Star as f, TrendingDown as p, TrendingUp as m, Users as h } from "lucide-react";
|
|
4
4
|
import { jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
5
|
-
import {
|
|
5
|
+
import { AuroraBackground as v, Badge as y, CTAOverflowMenu as b, Card as x, CardContent as S, CardHeader as C, CardTitle as w, GlassCard as T, GradientText as E } from "@burdenoff/fe-libs/ui";
|
|
6
6
|
//#region src/proserviceworld/pages/AdminReportsPage.tsx
|
|
7
|
-
function
|
|
8
|
-
let { adminReportMetrics:
|
|
7
|
+
function D() {
|
|
8
|
+
let { adminReportMetrics: D, revenueData: O, servicePerformance: k, geographicData: A, adminUsers: j } = e(), [M, N] = t("overview"), [P, F] = t("30d"), I = [
|
|
9
9
|
{
|
|
10
10
|
key: "overview",
|
|
11
11
|
label: "Overview",
|
|
@@ -26,59 +26,74 @@ function w() {
|
|
|
26
26
|
label: "Bookings",
|
|
27
27
|
icon: d
|
|
28
28
|
}
|
|
29
|
-
],
|
|
29
|
+
], L = (e) => e === "positive" ? /* @__PURE__ */ g(m, { className: "h-4 w-4 text-status-success-text" }) : e === "negative" ? /* @__PURE__ */ g(p, { className: "h-4 w-4 text-status-error-text" }) : /* @__PURE__ */ g(l, { className: "h-4 w-4 text-text-secondary" }), R = (e) => e === "positive" ? "text-status-success-text" : e === "negative" ? "text-status-error-text" : "text-text-secondary", z = [
|
|
30
30
|
h,
|
|
31
31
|
u,
|
|
32
32
|
d,
|
|
33
33
|
o,
|
|
34
34
|
f,
|
|
35
35
|
n
|
|
36
|
-
],
|
|
36
|
+
], B = Math.max(...O.map((e) => e.value)), V = Math.max(...k.map((e) => e.value)), H = j.reduce((e, t) => (e[t.role] = (e[t.role] ?? 0) + 1, e), {}), U = j.reduce((e, t) => (e[t.status] = (e[t.status] ?? 0) + 1, e), {}), W = {
|
|
37
|
+
client: "bg-chart-1",
|
|
38
|
+
provider: "bg-chart-2",
|
|
39
|
+
admin: "bg-chart-3",
|
|
40
|
+
team_member: "bg-chart-4"
|
|
41
|
+
}, G = {
|
|
42
|
+
active: "bg-status-success-text",
|
|
43
|
+
suspended: "bg-status-warning-text",
|
|
44
|
+
pending: "bg-chart-5",
|
|
45
|
+
banned: "bg-status-error-text"
|
|
46
|
+
};
|
|
37
47
|
return /* @__PURE__ */ _("div", {
|
|
38
|
-
className: "space-y-6 p-6",
|
|
48
|
+
className: "space-y-6 p-6 bg-bg-canvas min-h-screen",
|
|
39
49
|
children: [
|
|
40
50
|
/* @__PURE__ */ _("div", {
|
|
41
|
-
className: "
|
|
42
|
-
children: [/* @__PURE__ */
|
|
43
|
-
className: "
|
|
44
|
-
children: "
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
51
|
+
className: "relative overflow-hidden rounded-card -mx-2 px-2 pt-1",
|
|
52
|
+
children: [/* @__PURE__ */ g(v, { intensity: "subtle" }), /* @__PURE__ */ _("div", {
|
|
53
|
+
className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
|
|
54
|
+
children: [/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("h1", {
|
|
55
|
+
className: "text-2xl font-semibold tracking-tight",
|
|
56
|
+
children: /* @__PURE__ */ g(E, { children: "Admin Reports" })
|
|
57
|
+
}), /* @__PURE__ */ g("p", {
|
|
58
|
+
className: "text-sm text-text-secondary",
|
|
59
|
+
children: "Platform analytics, performance metrics, and operational reports."
|
|
60
|
+
})] }), /* @__PURE__ */ g(b, {
|
|
61
|
+
primary: {
|
|
62
|
+
label: "Generate Report",
|
|
63
|
+
onSelect: () => {},
|
|
64
|
+
icon: /* @__PURE__ */ g(c, { className: "h-4 w-4" })
|
|
65
|
+
},
|
|
66
|
+
actions: [{
|
|
67
|
+
label: "Export CSV",
|
|
68
|
+
onSelect: () => {},
|
|
69
|
+
icon: /* @__PURE__ */ g(s, { className: "h-4 w-4" })
|
|
70
|
+
}]
|
|
58
71
|
})]
|
|
59
72
|
})]
|
|
60
73
|
}),
|
|
61
74
|
/* @__PURE__ */ _("div", {
|
|
62
75
|
className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
|
|
63
76
|
children: [/* @__PURE__ */ g("div", {
|
|
64
|
-
className: "flex gap-1 border-b",
|
|
65
|
-
children:
|
|
66
|
-
onClick: () =>
|
|
67
|
-
|
|
77
|
+
className: "flex gap-1 border-b border-border-seam",
|
|
78
|
+
children: I.map(({ key: e, label: t, icon: n }) => /* @__PURE__ */ _("button", {
|
|
79
|
+
onClick: () => N(e),
|
|
80
|
+
"aria-pressed": M === e,
|
|
81
|
+
className: `flex items-center gap-2 border-b-2 px-4 py-2 text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus ${M === e ? "border-accent-blue text-accent-blue" : "border-transparent text-text-secondary hover:text-text-primary"}`,
|
|
68
82
|
children: [/* @__PURE__ */ g(n, { className: "h-4 w-4" }), t]
|
|
69
83
|
}, e))
|
|
70
84
|
}), /* @__PURE__ */ _("div", {
|
|
71
85
|
className: "flex items-center gap-2",
|
|
72
|
-
children: [/* @__PURE__ */ g(a, { className: "h-4 w-4 text-
|
|
73
|
-
className: "flex rounded border",
|
|
86
|
+
children: [/* @__PURE__ */ g(a, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ g("div", {
|
|
87
|
+
className: "flex rounded border border-border-seam",
|
|
74
88
|
children: [
|
|
75
89
|
"7d",
|
|
76
90
|
"30d",
|
|
77
91
|
"90d",
|
|
78
92
|
"1y"
|
|
79
93
|
].map((e) => /* @__PURE__ */ g("button", {
|
|
80
|
-
onClick: () =>
|
|
81
|
-
|
|
94
|
+
onClick: () => F(e),
|
|
95
|
+
"aria-pressed": P === e,
|
|
96
|
+
className: `px-3 py-1 text-xs font-medium tabular-nums focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus ${P === e ? "bg-accent-blue text-action-primary-text" : "text-text-secondary hover:bg-bg-sunken"}`,
|
|
82
97
|
children: e
|
|
83
98
|
}, e))
|
|
84
99
|
})]
|
|
@@ -86,116 +101,126 @@ function w() {
|
|
|
86
101
|
}),
|
|
87
102
|
/* @__PURE__ */ g("div", {
|
|
88
103
|
className: "grid gap-4 sm:grid-cols-2 lg:grid-cols-3",
|
|
89
|
-
children:
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
e.
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
104
|
+
children: D.map((e, t) => /* @__PURE__ */ g(T, {
|
|
105
|
+
treatment: "metric",
|
|
106
|
+
className: "border-border-seam",
|
|
107
|
+
children: /* @__PURE__ */ _(S, {
|
|
108
|
+
className: "pt-4",
|
|
109
|
+
children: [
|
|
110
|
+
/* @__PURE__ */ _("div", {
|
|
111
|
+
className: "flex items-center justify-between",
|
|
112
|
+
children: [/* @__PURE__ */ _("div", {
|
|
113
|
+
className: "flex items-center gap-2",
|
|
114
|
+
children: [/* @__PURE__ */ g(z[t % z.length] ?? i, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ g("p", {
|
|
115
|
+
className: "text-sm font-medium text-text-secondary",
|
|
116
|
+
children: e.label
|
|
117
|
+
})]
|
|
118
|
+
}), L(e.changeType)]
|
|
119
|
+
}),
|
|
120
|
+
/* @__PURE__ */ g("p", {
|
|
121
|
+
className: "mt-2 text-3xl font-bold tabular-nums",
|
|
122
|
+
children: e.value
|
|
123
|
+
}),
|
|
124
|
+
/* @__PURE__ */ _("p", {
|
|
125
|
+
className: `mt-1 flex items-center gap-1 text-xs ${R(e.changeType)}`,
|
|
126
|
+
children: [
|
|
127
|
+
/* @__PURE__ */ g(r, { className: "h-3 w-3" }),
|
|
128
|
+
e.change,
|
|
129
|
+
" vs last period"
|
|
130
|
+
]
|
|
131
|
+
})
|
|
132
|
+
]
|
|
133
|
+
})
|
|
134
|
+
}, t))
|
|
116
135
|
}),
|
|
117
|
-
|
|
136
|
+
M === "overview" && /* @__PURE__ */ _("div", {
|
|
118
137
|
className: "grid gap-6 lg:grid-cols-2",
|
|
119
138
|
children: [
|
|
120
|
-
/* @__PURE__ */ _(
|
|
121
|
-
className: "
|
|
122
|
-
children: [/* @__PURE__ */ g(C, {
|
|
123
|
-
className: "
|
|
124
|
-
children:
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
className: "
|
|
133
|
-
children:
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
className: "h-5 bg-
|
|
142
|
-
|
|
139
|
+
/* @__PURE__ */ _(x, {
|
|
140
|
+
className: "border-border-seam",
|
|
141
|
+
children: [/* @__PURE__ */ g(C, { children: /* @__PURE__ */ _("div", {
|
|
142
|
+
className: "flex items-center justify-between",
|
|
143
|
+
children: [/* @__PURE__ */ g(w, {
|
|
144
|
+
className: "text-base",
|
|
145
|
+
children: "Platform Revenue"
|
|
146
|
+
}), /* @__PURE__ */ g(y, {
|
|
147
|
+
variant: "secondary",
|
|
148
|
+
children: "Monthly"
|
|
149
|
+
})]
|
|
150
|
+
}) }), /* @__PURE__ */ g(S, {
|
|
151
|
+
className: "space-y-3",
|
|
152
|
+
children: O.map((e) => /* @__PURE__ */ _("div", {
|
|
153
|
+
className: "flex items-center gap-3",
|
|
154
|
+
children: [
|
|
155
|
+
/* @__PURE__ */ g("span", {
|
|
156
|
+
className: "w-10 text-xs text-text-secondary",
|
|
157
|
+
children: e.name
|
|
158
|
+
}),
|
|
159
|
+
/* @__PURE__ */ g("div", {
|
|
160
|
+
className: "flex-1 h-5 bg-bg-sunken rounded overflow-hidden",
|
|
161
|
+
children: /* @__PURE__ */ g("div", {
|
|
162
|
+
className: "h-5 bg-accent-blue rounded",
|
|
163
|
+
style: { width: `${e.value / B * 100}%` }
|
|
164
|
+
})
|
|
165
|
+
}),
|
|
166
|
+
/* @__PURE__ */ _("span", {
|
|
167
|
+
className: "w-16 text-right text-xs font-medium tabular-nums",
|
|
168
|
+
children: [
|
|
169
|
+
"$",
|
|
170
|
+
(e.value / 1e3).toFixed(1),
|
|
171
|
+
"k"
|
|
172
|
+
]
|
|
143
173
|
})
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
className: "w-16 text-right text-xs font-medium",
|
|
147
|
-
children: [
|
|
148
|
-
"$",
|
|
149
|
-
(e.value / 1e3).toFixed(1),
|
|
150
|
-
"k"
|
|
151
|
-
]
|
|
152
|
-
})
|
|
153
|
-
]
|
|
154
|
-
}, e.name))
|
|
155
|
-
})] }),
|
|
156
|
-
/* @__PURE__ */ _(b, { children: [/* @__PURE__ */ g(S, { children: /* @__PURE__ */ _("div", {
|
|
157
|
-
className: "flex items-center justify-between",
|
|
158
|
-
children: [/* @__PURE__ */ g(C, {
|
|
159
|
-
className: "text-base",
|
|
160
|
-
children: "Service Bookings"
|
|
161
|
-
}), /* @__PURE__ */ g(v, {
|
|
162
|
-
variant: "secondary",
|
|
163
|
-
children: "Total"
|
|
174
|
+
]
|
|
175
|
+
}, e.name))
|
|
164
176
|
})]
|
|
165
|
-
})
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
177
|
+
}),
|
|
178
|
+
/* @__PURE__ */ _(x, {
|
|
179
|
+
className: "border-border-seam",
|
|
180
|
+
children: [/* @__PURE__ */ g(C, { children: /* @__PURE__ */ _("div", {
|
|
181
|
+
className: "flex items-center justify-between",
|
|
182
|
+
children: [/* @__PURE__ */ g(w, {
|
|
183
|
+
className: "text-base",
|
|
184
|
+
children: "Service Bookings"
|
|
185
|
+
}), /* @__PURE__ */ g(y, {
|
|
186
|
+
variant: "secondary",
|
|
187
|
+
children: "Total"
|
|
188
|
+
})]
|
|
189
|
+
}) }), /* @__PURE__ */ g(S, {
|
|
190
|
+
className: "space-y-3",
|
|
191
|
+
children: [...k].sort((e, t) => t.value - e.value).map((e) => /* @__PURE__ */ _("div", {
|
|
192
|
+
className: "flex items-center gap-3",
|
|
193
|
+
children: [
|
|
194
|
+
/* @__PURE__ */ g("span", {
|
|
195
|
+
className: "w-32 truncate text-xs text-text-secondary",
|
|
196
|
+
children: e.name
|
|
197
|
+
}),
|
|
198
|
+
/* @__PURE__ */ g("div", {
|
|
199
|
+
className: "flex-1 h-5 bg-bg-sunken rounded overflow-hidden",
|
|
200
|
+
children: /* @__PURE__ */ g("div", {
|
|
201
|
+
className: "h-5 bg-accent-purple rounded",
|
|
202
|
+
style: { width: `${e.value / V * 100}%` }
|
|
203
|
+
})
|
|
204
|
+
}),
|
|
205
|
+
/* @__PURE__ */ g("span", {
|
|
206
|
+
className: "w-12 text-right text-xs font-medium tabular-nums",
|
|
207
|
+
children: e.value
|
|
179
208
|
})
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
})] }),
|
|
188
|
-
/* @__PURE__ */ _(b, {
|
|
189
|
-
className: "lg:col-span-2",
|
|
190
|
-
children: [/* @__PURE__ */ g(S, { children: /* @__PURE__ */ g(C, {
|
|
209
|
+
]
|
|
210
|
+
}, e.name))
|
|
211
|
+
})]
|
|
212
|
+
}),
|
|
213
|
+
/* @__PURE__ */ _(x, {
|
|
214
|
+
className: "lg:col-span-2 border-border-seam",
|
|
215
|
+
children: [/* @__PURE__ */ g(C, { children: /* @__PURE__ */ g(w, {
|
|
191
216
|
className: "text-base",
|
|
192
217
|
children: "Revenue by Region"
|
|
193
|
-
}) }), /* @__PURE__ */ g(
|
|
218
|
+
}) }), /* @__PURE__ */ g(S, { children: /* @__PURE__ */ g("div", {
|
|
194
219
|
className: "overflow-x-auto",
|
|
195
220
|
children: /* @__PURE__ */ _("table", {
|
|
196
221
|
className: "w-full text-sm",
|
|
197
222
|
children: [/* @__PURE__ */ g("thead", { children: /* @__PURE__ */ _("tr", {
|
|
198
|
-
className: "border-b text-left text-
|
|
223
|
+
className: "border-b border-border-seam text-left text-text-secondary",
|
|
199
224
|
children: [
|
|
200
225
|
/* @__PURE__ */ g("th", {
|
|
201
226
|
className: "p-3",
|
|
@@ -218,21 +243,21 @@ function w() {
|
|
|
218
243
|
children: "Share"
|
|
219
244
|
})
|
|
220
245
|
]
|
|
221
|
-
}) }), /* @__PURE__ */ g("tbody", { children:
|
|
222
|
-
let t =
|
|
246
|
+
}) }), /* @__PURE__ */ g("tbody", { children: A.map((e) => {
|
|
247
|
+
let t = A.reduce((e, t) => e + t.revenue, 0), n = Math.round(e.revenue / t * 100), r = Math.round(e.revenue / e.clients);
|
|
223
248
|
return /* @__PURE__ */ _("tr", {
|
|
224
|
-
className: "border-b hover:bg-
|
|
249
|
+
className: "border-b border-border-seam hover:bg-bg-sunken",
|
|
225
250
|
children: [
|
|
226
251
|
/* @__PURE__ */ g("td", {
|
|
227
252
|
className: "p-3 font-medium",
|
|
228
253
|
children: e.country
|
|
229
254
|
}),
|
|
230
255
|
/* @__PURE__ */ g("td", {
|
|
231
|
-
className: "p-3 text-right",
|
|
256
|
+
className: "p-3 text-right tabular-nums",
|
|
232
257
|
children: e.clients
|
|
233
258
|
}),
|
|
234
259
|
/* @__PURE__ */ _("td", {
|
|
235
|
-
className: "p-3 text-right font-medium",
|
|
260
|
+
className: "p-3 text-right font-medium tabular-nums",
|
|
236
261
|
children: [
|
|
237
262
|
"$",
|
|
238
263
|
(e.revenue / 1e3).toFixed(0),
|
|
@@ -240,7 +265,7 @@ function w() {
|
|
|
240
265
|
]
|
|
241
266
|
}),
|
|
242
267
|
/* @__PURE__ */ _("td", {
|
|
243
|
-
className: "p-3 text-right text-
|
|
268
|
+
className: "p-3 text-right text-text-secondary tabular-nums",
|
|
244
269
|
children: ["$", r.toLocaleString()]
|
|
245
270
|
}),
|
|
246
271
|
/* @__PURE__ */ g("td", {
|
|
@@ -248,13 +273,13 @@ function w() {
|
|
|
248
273
|
children: /* @__PURE__ */ _("div", {
|
|
249
274
|
className: "flex items-center gap-2",
|
|
250
275
|
children: [/* @__PURE__ */ g("div", {
|
|
251
|
-
className: "h-2 flex-1 overflow-hidden rounded-full bg-
|
|
276
|
+
className: "h-2 flex-1 overflow-hidden rounded-full bg-bg-sunken",
|
|
252
277
|
children: /* @__PURE__ */ g("div", {
|
|
253
|
-
className: "h-2 rounded-full bg-
|
|
278
|
+
className: "h-2 rounded-full bg-accent-blue",
|
|
254
279
|
style: { width: `${n}%` }
|
|
255
280
|
})
|
|
256
281
|
}), /* @__PURE__ */ _("span", {
|
|
257
|
-
className: "w-10 text-right text-xs",
|
|
282
|
+
className: "w-10 text-right text-xs tabular-nums",
|
|
258
283
|
children: [n, "%"]
|
|
259
284
|
})]
|
|
260
285
|
})
|
|
@@ -267,115 +292,111 @@ function w() {
|
|
|
267
292
|
})
|
|
268
293
|
]
|
|
269
294
|
}),
|
|
270
|
-
|
|
295
|
+
M === "users" && /* @__PURE__ */ _("div", {
|
|
271
296
|
className: "grid gap-6 lg:grid-cols-2",
|
|
272
297
|
children: [
|
|
273
|
-
/* @__PURE__ */ _(
|
|
274
|
-
className: "
|
|
275
|
-
children:
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
className:
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
298
|
+
/* @__PURE__ */ _(x, {
|
|
299
|
+
className: "border-border-seam",
|
|
300
|
+
children: [/* @__PURE__ */ g(C, { children: /* @__PURE__ */ g(w, {
|
|
301
|
+
className: "text-base",
|
|
302
|
+
children: "User Role Distribution"
|
|
303
|
+
}) }), /* @__PURE__ */ g(S, {
|
|
304
|
+
className: "space-y-3",
|
|
305
|
+
children: Object.entries(H).map(([e, t]) => {
|
|
306
|
+
let n = Math.round(t / j.length * 100);
|
|
307
|
+
return /* @__PURE__ */ _("div", {
|
|
308
|
+
className: "flex items-center gap-3",
|
|
309
|
+
children: [
|
|
310
|
+
/* @__PURE__ */ g("span", {
|
|
311
|
+
className: "w-24 text-sm font-medium capitalize",
|
|
312
|
+
children: e.replace("_", " ")
|
|
313
|
+
}),
|
|
314
|
+
/* @__PURE__ */ g("div", {
|
|
315
|
+
className: "flex-1 h-5 bg-bg-sunken rounded overflow-hidden",
|
|
316
|
+
children: /* @__PURE__ */ g("div", {
|
|
317
|
+
className: `h-5 rounded ${W[e] ?? "bg-chart-6"}`,
|
|
318
|
+
style: { width: `${n}%` }
|
|
319
|
+
})
|
|
320
|
+
}),
|
|
321
|
+
/* @__PURE__ */ _("span", {
|
|
322
|
+
className: "w-16 text-right text-sm tabular-nums",
|
|
323
|
+
children: [
|
|
324
|
+
t,
|
|
325
|
+
" (",
|
|
326
|
+
n,
|
|
327
|
+
"%)"
|
|
328
|
+
]
|
|
297
329
|
})
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
}[e] ?? "bg-gray-400"}`,
|
|
335
|
-
style: { width: `${n}%` }
|
|
330
|
+
]
|
|
331
|
+
}, e);
|
|
332
|
+
})
|
|
333
|
+
})]
|
|
334
|
+
}),
|
|
335
|
+
/* @__PURE__ */ _(x, {
|
|
336
|
+
className: "border-border-seam",
|
|
337
|
+
children: [/* @__PURE__ */ g(C, { children: /* @__PURE__ */ g(w, {
|
|
338
|
+
className: "text-base",
|
|
339
|
+
children: "User Status Distribution"
|
|
340
|
+
}) }), /* @__PURE__ */ g(S, {
|
|
341
|
+
className: "space-y-3",
|
|
342
|
+
children: Object.entries(U).map(([e, t]) => {
|
|
343
|
+
let n = Math.round(t / j.length * 100);
|
|
344
|
+
return /* @__PURE__ */ _("div", {
|
|
345
|
+
className: "flex items-center gap-3",
|
|
346
|
+
children: [
|
|
347
|
+
/* @__PURE__ */ g("span", {
|
|
348
|
+
className: "w-24 text-sm font-medium capitalize",
|
|
349
|
+
children: e
|
|
350
|
+
}),
|
|
351
|
+
/* @__PURE__ */ g("div", {
|
|
352
|
+
className: "flex-1 h-5 bg-bg-sunken rounded overflow-hidden",
|
|
353
|
+
children: /* @__PURE__ */ g("div", {
|
|
354
|
+
className: `h-5 rounded ${G[e] ?? "bg-chart-6"}`,
|
|
355
|
+
style: { width: `${n}%` }
|
|
356
|
+
})
|
|
357
|
+
}),
|
|
358
|
+
/* @__PURE__ */ _("span", {
|
|
359
|
+
className: "w-16 text-right text-sm tabular-nums",
|
|
360
|
+
children: [
|
|
361
|
+
t,
|
|
362
|
+
" (",
|
|
363
|
+
n,
|
|
364
|
+
"%)"
|
|
365
|
+
]
|
|
336
366
|
})
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
]
|
|
346
|
-
})
|
|
347
|
-
]
|
|
348
|
-
}, e);
|
|
349
|
-
})
|
|
350
|
-
})] }),
|
|
351
|
-
/* @__PURE__ */ _(b, {
|
|
352
|
-
className: "lg:col-span-2",
|
|
353
|
-
children: [/* @__PURE__ */ g(S, { children: /* @__PURE__ */ g(C, {
|
|
367
|
+
]
|
|
368
|
+
}, e);
|
|
369
|
+
})
|
|
370
|
+
})]
|
|
371
|
+
}),
|
|
372
|
+
/* @__PURE__ */ _(x, {
|
|
373
|
+
className: "lg:col-span-2 border-border-seam",
|
|
374
|
+
children: [/* @__PURE__ */ g(C, { children: /* @__PURE__ */ g(w, {
|
|
354
375
|
className: "text-base",
|
|
355
376
|
children: "Top Users by Spending"
|
|
356
|
-
}) }), /* @__PURE__ */ g(
|
|
377
|
+
}) }), /* @__PURE__ */ g(S, { children: /* @__PURE__ */ g("div", {
|
|
357
378
|
className: "space-y-2",
|
|
358
|
-
children: [...
|
|
359
|
-
className: "flex items-center justify-between rounded-lg border p-3",
|
|
379
|
+
children: [...j].filter((e) => e.totalSpent > 0).sort((e, t) => t.totalSpent - e.totalSpent).slice(0, 5).map((e, t) => /* @__PURE__ */ _("div", {
|
|
380
|
+
className: "flex items-center justify-between rounded-lg border border-border-seam p-3",
|
|
360
381
|
children: [/* @__PURE__ */ _("div", {
|
|
361
382
|
className: "flex items-center gap-3",
|
|
362
383
|
children: [/* @__PURE__ */ g("span", {
|
|
363
|
-
className: "flex h-8 w-8 items-center justify-center rounded-full bg-
|
|
384
|
+
className: "flex h-8 w-8 items-center justify-center rounded-full bg-accent-soft text-sm font-bold text-text-primary tabular-nums",
|
|
364
385
|
children: t + 1
|
|
365
386
|
}), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
366
387
|
className: "font-medium",
|
|
367
388
|
children: e.name
|
|
368
389
|
}), /* @__PURE__ */ g("p", {
|
|
369
|
-
className: "text-xs text-
|
|
390
|
+
className: "text-xs text-text-secondary",
|
|
370
391
|
children: e.email
|
|
371
392
|
})] })]
|
|
372
393
|
}), /* @__PURE__ */ _("div", {
|
|
373
394
|
className: "text-right",
|
|
374
395
|
children: [/* @__PURE__ */ _("p", {
|
|
375
|
-
className: "font-bold",
|
|
396
|
+
className: "font-bold tabular-nums",
|
|
376
397
|
children: ["$", e.totalSpent.toLocaleString()]
|
|
377
398
|
}), /* @__PURE__ */ _("p", {
|
|
378
|
-
className: "text-xs text-
|
|
399
|
+
className: "text-xs text-text-secondary tabular-nums",
|
|
379
400
|
children: [e.bookingsCount, " bookings"]
|
|
380
401
|
})]
|
|
381
402
|
})]
|
|
@@ -384,129 +405,141 @@ function w() {
|
|
|
384
405
|
})
|
|
385
406
|
]
|
|
386
407
|
}),
|
|
387
|
-
|
|
408
|
+
M === "revenue" && /* @__PURE__ */ g("div", {
|
|
388
409
|
className: "space-y-6",
|
|
389
|
-
children: /* @__PURE__ */ _(
|
|
390
|
-
className: "
|
|
391
|
-
children:
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
className: "
|
|
400
|
-
children: [/* @__PURE__ */ _("div", {
|
|
401
|
-
className: "
|
|
402
|
-
children: [
|
|
410
|
+
children: /* @__PURE__ */ _(x, {
|
|
411
|
+
className: "border-border-seam",
|
|
412
|
+
children: [/* @__PURE__ */ g(C, { children: /* @__PURE__ */ g(w, {
|
|
413
|
+
className: "text-base",
|
|
414
|
+
children: "Monthly Revenue Comparison"
|
|
415
|
+
}) }), /* @__PURE__ */ g(S, {
|
|
416
|
+
className: "space-y-4",
|
|
417
|
+
children: O.map((e) => {
|
|
418
|
+
let t = e.prev ? ((e.value - e.prev) / e.prev * 100).toFixed(1) : "0", n = e.prev ? e.value >= e.prev : !0;
|
|
419
|
+
return /* @__PURE__ */ _("div", {
|
|
420
|
+
className: "rounded-lg border border-border-seam p-4",
|
|
421
|
+
children: [/* @__PURE__ */ _("div", {
|
|
422
|
+
className: "flex items-center justify-between",
|
|
423
|
+
children: [/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ _("p", {
|
|
424
|
+
className: "font-medium",
|
|
425
|
+
children: [e.name, " 2025"]
|
|
426
|
+
}), /* @__PURE__ */ _("div", {
|
|
427
|
+
className: "mt-1 flex items-center gap-4 text-sm text-text-secondary tabular-nums",
|
|
428
|
+
children: [/* @__PURE__ */ _("span", { children: [
|
|
429
|
+
"Current: $",
|
|
430
|
+
(e.value / 1e3).toFixed(1),
|
|
431
|
+
"k"
|
|
432
|
+
] }), /* @__PURE__ */ _("span", { children: [
|
|
433
|
+
"Previous: $",
|
|
434
|
+
((e.prev ?? 0) / 1e3).toFixed(1),
|
|
435
|
+
"k"
|
|
436
|
+
] })]
|
|
437
|
+
})] }), /* @__PURE__ */ _(y, {
|
|
438
|
+
variant: n ? "default" : "destructive",
|
|
439
|
+
children: [
|
|
440
|
+
n ? "+" : "",
|
|
441
|
+
t,
|
|
442
|
+
"%"
|
|
443
|
+
]
|
|
444
|
+
})]
|
|
403
445
|
}), /* @__PURE__ */ _("div", {
|
|
404
|
-
className: "mt-
|
|
405
|
-
children: [/* @__PURE__ */
|
|
406
|
-
|
|
407
|
-
(e.
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
"k"
|
|
413
|
-
] })]
|
|
414
|
-
})] }), /* @__PURE__ */ _(v, {
|
|
415
|
-
variant: n ? "default" : "destructive",
|
|
416
|
-
children: [
|
|
417
|
-
n ? "+" : "",
|
|
418
|
-
t,
|
|
419
|
-
"%"
|
|
420
|
-
]
|
|
446
|
+
className: "mt-3 flex gap-1 h-4",
|
|
447
|
+
children: [/* @__PURE__ */ g("div", {
|
|
448
|
+
className: "h-4 rounded bg-accent-blue-subtle",
|
|
449
|
+
style: { width: `${(e.prev ?? 0) / B * 100}%` }
|
|
450
|
+
}), /* @__PURE__ */ g("div", {
|
|
451
|
+
className: "h-4 rounded bg-accent-blue",
|
|
452
|
+
style: { width: `${Math.max(0, (e.value - (e.prev ?? 0)) / B * 100)}%` }
|
|
453
|
+
})]
|
|
421
454
|
})]
|
|
455
|
+
}, e.name);
|
|
456
|
+
})
|
|
457
|
+
})]
|
|
458
|
+
})
|
|
459
|
+
}),
|
|
460
|
+
M === "bookings" && /* @__PURE__ */ _("div", {
|
|
461
|
+
className: "grid gap-6 lg:grid-cols-2",
|
|
462
|
+
children: [/* @__PURE__ */ _(x, {
|
|
463
|
+
className: "border-border-seam",
|
|
464
|
+
children: [/* @__PURE__ */ g(C, { children: /* @__PURE__ */ g(w, {
|
|
465
|
+
className: "text-base",
|
|
466
|
+
children: "Bookings by Service Category"
|
|
467
|
+
}) }), /* @__PURE__ */ g(S, {
|
|
468
|
+
className: "space-y-3",
|
|
469
|
+
children: [...k].sort((e, t) => t.value - e.value).map((e, t) => /* @__PURE__ */ _("div", {
|
|
470
|
+
className: "flex items-center gap-3",
|
|
471
|
+
children: [/* @__PURE__ */ _("span", {
|
|
472
|
+
className: "w-6 text-sm font-bold text-text-secondary tabular-nums",
|
|
473
|
+
children: ["#", t + 1]
|
|
422
474
|
}), /* @__PURE__ */ _("div", {
|
|
423
|
-
className: "
|
|
424
|
-
children: [/* @__PURE__ */
|
|
425
|
-
className: "
|
|
426
|
-
|
|
475
|
+
className: "flex-1",
|
|
476
|
+
children: [/* @__PURE__ */ _("div", {
|
|
477
|
+
className: "flex items-center justify-between text-sm",
|
|
478
|
+
children: [/* @__PURE__ */ g("span", {
|
|
479
|
+
className: "font-medium",
|
|
480
|
+
children: e.name
|
|
481
|
+
}), /* @__PURE__ */ _("span", {
|
|
482
|
+
className: "tabular-nums",
|
|
483
|
+
children: [e.value, " bookings"]
|
|
484
|
+
})]
|
|
427
485
|
}), /* @__PURE__ */ g("div", {
|
|
428
|
-
className: "h-
|
|
429
|
-
|
|
486
|
+
className: "mt-1 h-2 overflow-hidden rounded-full bg-bg-sunken",
|
|
487
|
+
children: /* @__PURE__ */ g("div", {
|
|
488
|
+
className: "h-2 rounded-full bg-accent-blue",
|
|
489
|
+
style: { width: `${e.value / V * 100}%` }
|
|
490
|
+
})
|
|
430
491
|
})]
|
|
431
492
|
})]
|
|
432
|
-
}, e.name)
|
|
433
|
-
})
|
|
434
|
-
})
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
493
|
+
}, e.name))
|
|
494
|
+
})]
|
|
495
|
+
}), /* @__PURE__ */ _(x, {
|
|
496
|
+
className: "border-border-seam",
|
|
497
|
+
children: [/* @__PURE__ */ g(C, { children: /* @__PURE__ */ g(w, {
|
|
498
|
+
className: "text-base",
|
|
499
|
+
children: "Quick Stats"
|
|
500
|
+
}) }), /* @__PURE__ */ g(S, {
|
|
501
|
+
className: "space-y-4",
|
|
502
|
+
children: [
|
|
503
|
+
{
|
|
504
|
+
label: "Total Bookings",
|
|
505
|
+
value: k.reduce((e, t) => e + t.value, 0).toLocaleString(),
|
|
506
|
+
icon: d
|
|
507
|
+
},
|
|
508
|
+
{
|
|
509
|
+
label: "Avg. Booking Value",
|
|
510
|
+
value: "$3,804",
|
|
511
|
+
icon: o
|
|
512
|
+
},
|
|
513
|
+
{
|
|
514
|
+
label: "Completion Rate",
|
|
515
|
+
value: "96.5%",
|
|
516
|
+
icon: m
|
|
517
|
+
},
|
|
518
|
+
{
|
|
519
|
+
label: "Client Satisfaction",
|
|
520
|
+
value: "4.7/5.0",
|
|
521
|
+
icon: f
|
|
522
|
+
}
|
|
523
|
+
].map(({ label: e, value: t, icon: n }) => /* @__PURE__ */ _("div", {
|
|
524
|
+
className: "flex items-center justify-between rounded-lg border border-border-seam p-3",
|
|
450
525
|
children: [/* @__PURE__ */ _("div", {
|
|
451
|
-
className: "flex items-center
|
|
452
|
-
children: [/* @__PURE__ */ g("span", {
|
|
453
|
-
className: "font-medium",
|
|
454
|
-
children: e
|
|
455
|
-
})
|
|
456
|
-
}), /* @__PURE__ */ g("
|
|
457
|
-
className: "
|
|
458
|
-
children:
|
|
459
|
-
className: "h-2 rounded-full bg-primary",
|
|
460
|
-
style: { width: `${e.value / L * 100}%` }
|
|
461
|
-
})
|
|
462
|
-
})]
|
|
463
|
-
})]
|
|
464
|
-
}, e.name))
|
|
465
|
-
})] }), /* @__PURE__ */ _(b, { children: [/* @__PURE__ */ g(S, { children: /* @__PURE__ */ g(C, {
|
|
466
|
-
className: "text-base",
|
|
467
|
-
children: "Quick Stats"
|
|
468
|
-
}) }), /* @__PURE__ */ g(x, {
|
|
469
|
-
className: "space-y-4",
|
|
470
|
-
children: [
|
|
471
|
-
{
|
|
472
|
-
label: "Total Bookings",
|
|
473
|
-
value: E.reduce((e, t) => e + t.value, 0).toLocaleString(),
|
|
474
|
-
icon: d
|
|
475
|
-
},
|
|
476
|
-
{
|
|
477
|
-
label: "Avg. Booking Value",
|
|
478
|
-
value: "$3,804",
|
|
479
|
-
icon: o
|
|
480
|
-
},
|
|
481
|
-
{
|
|
482
|
-
label: "Completion Rate",
|
|
483
|
-
value: "96.5%",
|
|
484
|
-
icon: m
|
|
485
|
-
},
|
|
486
|
-
{
|
|
487
|
-
label: "Client Satisfaction",
|
|
488
|
-
value: "4.7/5.0",
|
|
489
|
-
icon: f
|
|
490
|
-
}
|
|
491
|
-
].map(({ label: e, value: t, icon: n }) => /* @__PURE__ */ _("div", {
|
|
492
|
-
className: "flex items-center justify-between rounded-lg border p-3",
|
|
493
|
-
children: [/* @__PURE__ */ _("div", {
|
|
494
|
-
className: "flex items-center gap-3",
|
|
495
|
-
children: [/* @__PURE__ */ g(n, { className: "h-5 w-5 text-muted-foreground" }), /* @__PURE__ */ g("span", {
|
|
496
|
-
className: "text-sm font-medium",
|
|
497
|
-
children: e
|
|
526
|
+
className: "flex items-center gap-3",
|
|
527
|
+
children: [/* @__PURE__ */ g(n, { className: "h-5 w-5 text-text-secondary" }), /* @__PURE__ */ g("span", {
|
|
528
|
+
className: "text-sm font-medium",
|
|
529
|
+
children: e
|
|
530
|
+
})]
|
|
531
|
+
}), /* @__PURE__ */ g("span", {
|
|
532
|
+
className: "text-lg font-bold tabular-nums",
|
|
533
|
+
children: t
|
|
498
534
|
})]
|
|
499
|
-
}
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
})]
|
|
503
|
-
}, e))
|
|
504
|
-
})] })]
|
|
535
|
+
}, e))
|
|
536
|
+
})]
|
|
537
|
+
})]
|
|
505
538
|
})
|
|
506
539
|
]
|
|
507
540
|
});
|
|
508
541
|
}
|
|
509
542
|
//#endregion
|
|
510
|
-
export {
|
|
543
|
+
export { D as AdminReportsPage };
|
|
511
544
|
|
|
512
545
|
//# sourceMappingURL=AdminReportsPage.js.map
|