@burdenoff/microfe-proserviceworld 2026.624.1 → 2026.626.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 +396 -329
- package/dist/proserviceworld/pages/AdminReportsPage.js.map +1 -1
- package/dist/proserviceworld/pages/AdminUsersPage.js +261 -237
- package/dist/proserviceworld/pages/AdminUsersPage.js.map +1 -1
- package/dist/proserviceworld/pages/AnalyticsPage.js +373 -315
- package/dist/proserviceworld/pages/AnalyticsPage.js.map +1 -1
- package/dist/proserviceworld/pages/BookingsPage.js +221 -200
- package/dist/proserviceworld/pages/BookingsPage.js.map +1 -1
- package/dist/proserviceworld/pages/DashboardPage.js +474 -405
- package/dist/proserviceworld/pages/DashboardPage.js.map +1 -1
- package/dist/proserviceworld/pages/DocumentsPage.js +386 -317
- package/dist/proserviceworld/pages/DocumentsPage.js.map +1 -1
- package/dist/proserviceworld/pages/MessagesPage.js +201 -192
- package/dist/proserviceworld/pages/MessagesPage.js.map +1 -1
- package/dist/proserviceworld/pages/PaymentsPage.js +398 -340
- package/dist/proserviceworld/pages/PaymentsPage.js.map +1 -1
- package/dist/proserviceworld/pages/ProjectsPage.js +543 -463
- package/dist/proserviceworld/pages/ProjectsPage.js.map +1 -1
- package/dist/proserviceworld/pages/ProviderDetailPage.js +420 -346
- package/dist/proserviceworld/pages/ProviderDetailPage.js.map +1 -1
- package/dist/proserviceworld/pages/ProvidersPage.js +249 -244
- package/dist/proserviceworld/pages/ProvidersPage.js.map +1 -1
- package/dist/proserviceworld/pages/ReviewsPage.js +93 -76
- package/dist/proserviceworld/pages/ReviewsPage.js.map +1 -1
- package/dist/proserviceworld/pages/ServiceDetailsPage.js +377 -309
- package/dist/proserviceworld/pages/ServiceDetailsPage.js.map +1 -1
- package/dist/proserviceworld/pages/ServicesPage.js +116 -109
- package/dist/proserviceworld/pages/ServicesPage.js.map +1 -1
- package/dist/proserviceworld/pages/VerificationPage.js +264 -251
- 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, NextSteps as D, PagePurpose as O } from "@burdenoff/fe-libs/ui";
|
|
6
6
|
//#region src/proserviceworld/pages/AdminReportsPage.tsx
|
|
7
|
-
function
|
|
8
|
-
let { adminReportMetrics:
|
|
7
|
+
function k() {
|
|
8
|
+
let { adminReportMetrics: k, revenueData: A, servicePerformance: j, geographicData: M, adminUsers: N } = e(), [P, F] = t("overview"), [I, L] = t("30d"), R = [
|
|
9
9
|
{
|
|
10
10
|
key: "overview",
|
|
11
11
|
label: "Overview",
|
|
@@ -26,59 +26,104 @@ function w() {
|
|
|
26
26
|
label: "Bookings",
|
|
27
27
|
icon: d
|
|
28
28
|
}
|
|
29
|
-
],
|
|
29
|
+
], z = (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" }), B = (e) => e === "positive" ? "text-status-success-text" : e === "negative" ? "text-status-error-text" : "text-text-secondary", V = [
|
|
30
30
|
h,
|
|
31
31
|
u,
|
|
32
32
|
d,
|
|
33
33
|
o,
|
|
34
34
|
f,
|
|
35
35
|
n
|
|
36
|
-
],
|
|
36
|
+
], H = Math.max(...A.map((e) => e.value)), U = Math.max(...j.map((e) => e.value)), W = N.reduce((e, t) => (e[t.role] = (e[t.role] ?? 0) + 1, e), {}), G = N.reduce((e, t) => (e[t.status] = (e[t.status] ?? 0) + 1, e), {}), K = {
|
|
37
|
+
client: "bg-chart-1",
|
|
38
|
+
provider: "bg-chart-2",
|
|
39
|
+
admin: "bg-chart-3",
|
|
40
|
+
team_member: "bg-chart-4"
|
|
41
|
+
}, q = {
|
|
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
|
}),
|
|
74
|
+
/* @__PURE__ */ g(O, {
|
|
75
|
+
icon: /* @__PURE__ */ g(i, { className: "h-4 w-4" }),
|
|
76
|
+
children: "The operational pulse of the platform. Track headline KPIs, dig into revenue, user, and booking trends across time ranges, and export reports for stakeholders — use it to spot what is growing, what needs attention, and where to act next."
|
|
77
|
+
}),
|
|
78
|
+
/* @__PURE__ */ g(D, {
|
|
79
|
+
storageKey: "proserviceworld-admin-reports",
|
|
80
|
+
steps: [
|
|
81
|
+
{
|
|
82
|
+
id: "revenue",
|
|
83
|
+
label: "Review revenue trends",
|
|
84
|
+
description: "Open the Revenue tab to compare months and spot growth or dips.",
|
|
85
|
+
icon: /* @__PURE__ */ g(o, { className: "h-4 w-4" }),
|
|
86
|
+
onClick: () => F("revenue")
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
id: "users",
|
|
90
|
+
label: "Check user health",
|
|
91
|
+
description: "See role and status distribution plus your top spenders.",
|
|
92
|
+
icon: /* @__PURE__ */ g(h, { className: "h-4 w-4" }),
|
|
93
|
+
onClick: () => F("users")
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
id: "export",
|
|
97
|
+
label: "Export a report",
|
|
98
|
+
description: "Generate a shareable report or CSV for stakeholders.",
|
|
99
|
+
icon: /* @__PURE__ */ g(s, { className: "h-4 w-4" }),
|
|
100
|
+
onClick: () => {}
|
|
101
|
+
}
|
|
102
|
+
]
|
|
103
|
+
}),
|
|
61
104
|
/* @__PURE__ */ _("div", {
|
|
62
105
|
className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
|
|
63
106
|
children: [/* @__PURE__ */ g("div", {
|
|
64
|
-
className: "flex gap-1 border-b",
|
|
65
|
-
children:
|
|
66
|
-
onClick: () =>
|
|
67
|
-
|
|
107
|
+
className: "flex gap-1 border-b border-border-seam",
|
|
108
|
+
children: R.map(({ key: e, label: t, icon: n }) => /* @__PURE__ */ _("button", {
|
|
109
|
+
onClick: () => F(e),
|
|
110
|
+
"aria-pressed": P === e,
|
|
111
|
+
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 ${P === e ? "border-accent-blue text-accent-blue" : "border-transparent text-text-secondary hover:text-text-primary"}`,
|
|
68
112
|
children: [/* @__PURE__ */ g(n, { className: "h-4 w-4" }), t]
|
|
69
113
|
}, e))
|
|
70
114
|
}), /* @__PURE__ */ _("div", {
|
|
71
115
|
className: "flex items-center gap-2",
|
|
72
116
|
children: [/* @__PURE__ */ g(a, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ g("div", {
|
|
73
|
-
className: "flex rounded border",
|
|
117
|
+
className: "flex rounded border border-border-seam",
|
|
74
118
|
children: [
|
|
75
119
|
"7d",
|
|
76
120
|
"30d",
|
|
77
121
|
"90d",
|
|
78
122
|
"1y"
|
|
79
123
|
].map((e) => /* @__PURE__ */ g("button", {
|
|
80
|
-
onClick: () =>
|
|
81
|
-
|
|
124
|
+
onClick: () => L(e),
|
|
125
|
+
"aria-pressed": I === e,
|
|
126
|
+
className: `px-3 py-1 text-xs font-medium tabular-nums focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus ${I === e ? "bg-accent-blue text-action-primary-text" : "text-text-secondary hover:bg-bg-sunken"}`,
|
|
82
127
|
children: e
|
|
83
128
|
}, e))
|
|
84
129
|
})]
|
|
@@ -86,116 +131,130 @@ function w() {
|
|
|
86
131
|
}),
|
|
87
132
|
/* @__PURE__ */ g("div", {
|
|
88
133
|
className: "grid gap-4 sm:grid-cols-2 lg:grid-cols-3",
|
|
89
|
-
children:
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
className: "text-sm font-medium text-text-secondary",
|
|
98
|
-
children: e.label
|
|
99
|
-
})]
|
|
100
|
-
}), P(e.changeType)]
|
|
101
|
-
}),
|
|
102
|
-
/* @__PURE__ */ g("p", {
|
|
103
|
-
className: "mt-2 text-3xl font-bold",
|
|
104
|
-
children: e.value
|
|
105
|
-
}),
|
|
106
|
-
/* @__PURE__ */ _("p", {
|
|
107
|
-
className: `mt-1 flex items-center gap-1 text-xs ${e.changeType === "positive" ? "text-green-600" : e.changeType === "negative" ? "text-red-600" : "text-gray-500"}`,
|
|
108
|
-
children: [
|
|
109
|
-
/* @__PURE__ */ g(r, { className: "h-3 w-3" }),
|
|
110
|
-
e.change,
|
|
111
|
-
" vs last period"
|
|
112
|
-
]
|
|
113
|
-
})
|
|
114
|
-
]
|
|
115
|
-
}) }, t))
|
|
116
|
-
}),
|
|
117
|
-
k === "overview" && /* @__PURE__ */ _("div", {
|
|
118
|
-
className: "grid gap-6 lg:grid-cols-2",
|
|
119
|
-
children: [
|
|
120
|
-
/* @__PURE__ */ _(b, { children: [/* @__PURE__ */ g(S, { children: /* @__PURE__ */ _("div", {
|
|
121
|
-
className: "flex items-center justify-between",
|
|
122
|
-
children: [/* @__PURE__ */ g(C, {
|
|
123
|
-
className: "text-base",
|
|
124
|
-
children: "Platform Revenue"
|
|
125
|
-
}), /* @__PURE__ */ g(v, {
|
|
126
|
-
variant: "secondary",
|
|
127
|
-
children: "Monthly"
|
|
128
|
-
})]
|
|
129
|
-
}) }), /* @__PURE__ */ g(x, {
|
|
130
|
-
className: "space-y-3",
|
|
131
|
-
children: T.map((e) => /* @__PURE__ */ _("div", {
|
|
132
|
-
className: "flex items-center gap-3",
|
|
134
|
+
children: k.map((e, t) => {
|
|
135
|
+
let n = V[t % V.length] ?? i;
|
|
136
|
+
return /* @__PURE__ */ g(T, {
|
|
137
|
+
treatment: t === 0 ? "glass" : "metric",
|
|
138
|
+
glow: t === 0,
|
|
139
|
+
className: "border-border-seam",
|
|
140
|
+
children: /* @__PURE__ */ _(S, {
|
|
141
|
+
className: "pt-4",
|
|
133
142
|
children: [
|
|
134
|
-
/* @__PURE__ */
|
|
135
|
-
className: "
|
|
136
|
-
children:
|
|
143
|
+
/* @__PURE__ */ _("div", {
|
|
144
|
+
className: "flex items-center justify-between",
|
|
145
|
+
children: [/* @__PURE__ */ _("div", {
|
|
146
|
+
className: "flex items-center gap-2",
|
|
147
|
+
children: [/* @__PURE__ */ g(n, { className: "h-4 w-4 text-text-secondary" }), /* @__PURE__ */ g("p", {
|
|
148
|
+
className: "text-sm font-medium text-text-secondary",
|
|
149
|
+
children: e.label
|
|
150
|
+
})]
|
|
151
|
+
}), z(e.changeType)]
|
|
137
152
|
}),
|
|
138
|
-
/* @__PURE__ */ g("
|
|
139
|
-
className: "
|
|
140
|
-
children:
|
|
141
|
-
className: "h-5 bg-action-primary-bg rounded",
|
|
142
|
-
style: { width: `${e.value / I * 100}%` }
|
|
143
|
-
})
|
|
153
|
+
/* @__PURE__ */ g("p", {
|
|
154
|
+
className: "mt-2 text-3xl font-bold tabular-nums",
|
|
155
|
+
children: e.value
|
|
144
156
|
}),
|
|
145
|
-
/* @__PURE__ */ _("
|
|
146
|
-
className:
|
|
157
|
+
/* @__PURE__ */ _("p", {
|
|
158
|
+
className: `mt-1 flex items-center gap-1 text-xs ${B(e.changeType)}`,
|
|
147
159
|
children: [
|
|
148
|
-
"
|
|
149
|
-
|
|
150
|
-
"
|
|
160
|
+
/* @__PURE__ */ g(r, { className: "h-3 w-3" }),
|
|
161
|
+
e.change,
|
|
162
|
+
" vs last period"
|
|
151
163
|
]
|
|
152
164
|
})
|
|
153
165
|
]
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
166
|
+
})
|
|
167
|
+
}, t);
|
|
168
|
+
})
|
|
169
|
+
}),
|
|
170
|
+
P === "overview" && /* @__PURE__ */ _("div", {
|
|
171
|
+
className: "grid gap-6 lg:grid-cols-2",
|
|
172
|
+
children: [
|
|
173
|
+
/* @__PURE__ */ _(x, {
|
|
174
|
+
className: "border-border-seam",
|
|
175
|
+
children: [/* @__PURE__ */ g(C, { children: /* @__PURE__ */ _("div", {
|
|
176
|
+
className: "flex items-center justify-between",
|
|
177
|
+
children: [/* @__PURE__ */ g(w, {
|
|
178
|
+
className: "text-base",
|
|
179
|
+
children: "Platform Revenue"
|
|
180
|
+
}), /* @__PURE__ */ g(y, {
|
|
181
|
+
variant: "secondary",
|
|
182
|
+
children: "Monthly"
|
|
183
|
+
})]
|
|
184
|
+
}) }), /* @__PURE__ */ g(S, {
|
|
185
|
+
className: "space-y-3",
|
|
186
|
+
children: A.map((e) => /* @__PURE__ */ _("div", {
|
|
187
|
+
className: "flex items-center gap-3",
|
|
188
|
+
children: [
|
|
189
|
+
/* @__PURE__ */ g("span", {
|
|
190
|
+
className: "w-10 text-xs text-text-secondary",
|
|
191
|
+
children: e.name
|
|
192
|
+
}),
|
|
193
|
+
/* @__PURE__ */ g("div", {
|
|
194
|
+
className: "flex-1 h-5 bg-bg-sunken rounded overflow-hidden",
|
|
195
|
+
children: /* @__PURE__ */ g("div", {
|
|
196
|
+
className: "h-5 bg-accent-blue rounded",
|
|
197
|
+
style: { width: `${e.value / H * 100}%` }
|
|
198
|
+
})
|
|
199
|
+
}),
|
|
200
|
+
/* @__PURE__ */ _("span", {
|
|
201
|
+
className: "w-16 text-right text-xs font-medium tabular-nums",
|
|
202
|
+
children: [
|
|
203
|
+
"$",
|
|
204
|
+
(e.value / 1e3).toFixed(1),
|
|
205
|
+
"k"
|
|
206
|
+
]
|
|
207
|
+
})
|
|
208
|
+
]
|
|
209
|
+
}, e.name))
|
|
164
210
|
})]
|
|
165
|
-
})
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
211
|
+
}),
|
|
212
|
+
/* @__PURE__ */ _(x, {
|
|
213
|
+
className: "border-border-seam",
|
|
214
|
+
children: [/* @__PURE__ */ g(C, { children: /* @__PURE__ */ _("div", {
|
|
215
|
+
className: "flex items-center justify-between",
|
|
216
|
+
children: [/* @__PURE__ */ g(w, {
|
|
217
|
+
className: "text-base",
|
|
218
|
+
children: "Service Bookings"
|
|
219
|
+
}), /* @__PURE__ */ g(y, {
|
|
220
|
+
variant: "secondary",
|
|
221
|
+
children: "Total"
|
|
222
|
+
})]
|
|
223
|
+
}) }), /* @__PURE__ */ g(S, {
|
|
224
|
+
className: "space-y-3",
|
|
225
|
+
children: [...j].sort((e, t) => t.value - e.value).map((e) => /* @__PURE__ */ _("div", {
|
|
226
|
+
className: "flex items-center gap-3",
|
|
227
|
+
children: [
|
|
228
|
+
/* @__PURE__ */ g("span", {
|
|
229
|
+
className: "w-32 truncate text-xs text-text-secondary",
|
|
230
|
+
children: e.name
|
|
231
|
+
}),
|
|
232
|
+
/* @__PURE__ */ g("div", {
|
|
233
|
+
className: "flex-1 h-5 bg-bg-sunken rounded overflow-hidden",
|
|
234
|
+
children: /* @__PURE__ */ g("div", {
|
|
235
|
+
className: "h-5 bg-accent-purple rounded",
|
|
236
|
+
style: { width: `${e.value / U * 100}%` }
|
|
237
|
+
})
|
|
238
|
+
}),
|
|
239
|
+
/* @__PURE__ */ g("span", {
|
|
240
|
+
className: "w-12 text-right text-xs font-medium tabular-nums",
|
|
241
|
+
children: e.value
|
|
179
242
|
})
|
|
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, {
|
|
243
|
+
]
|
|
244
|
+
}, e.name))
|
|
245
|
+
})]
|
|
246
|
+
}),
|
|
247
|
+
/* @__PURE__ */ _(x, {
|
|
248
|
+
className: "lg:col-span-2 border-border-seam",
|
|
249
|
+
children: [/* @__PURE__ */ g(C, { children: /* @__PURE__ */ g(w, {
|
|
191
250
|
className: "text-base",
|
|
192
251
|
children: "Revenue by Region"
|
|
193
|
-
}) }), /* @__PURE__ */ g(
|
|
252
|
+
}) }), /* @__PURE__ */ g(S, { children: /* @__PURE__ */ g("div", {
|
|
194
253
|
className: "overflow-x-auto",
|
|
195
254
|
children: /* @__PURE__ */ _("table", {
|
|
196
255
|
className: "w-full text-sm",
|
|
197
256
|
children: [/* @__PURE__ */ g("thead", { children: /* @__PURE__ */ _("tr", {
|
|
198
|
-
className: "border-b text-left text-text-secondary",
|
|
257
|
+
className: "border-b border-border-seam text-left text-text-secondary",
|
|
199
258
|
children: [
|
|
200
259
|
/* @__PURE__ */ g("th", {
|
|
201
260
|
className: "p-3",
|
|
@@ -218,21 +277,21 @@ function w() {
|
|
|
218
277
|
children: "Share"
|
|
219
278
|
})
|
|
220
279
|
]
|
|
221
|
-
}) }), /* @__PURE__ */ g("tbody", { children:
|
|
222
|
-
let t =
|
|
280
|
+
}) }), /* @__PURE__ */ g("tbody", { children: M.map((e) => {
|
|
281
|
+
let t = M.reduce((e, t) => e + t.revenue, 0), n = Math.round(e.revenue / t * 100), r = Math.round(e.revenue / e.clients);
|
|
223
282
|
return /* @__PURE__ */ _("tr", {
|
|
224
|
-
className: "border-b hover:bg-bg-sunken
|
|
283
|
+
className: "border-b border-border-seam hover:bg-bg-sunken",
|
|
225
284
|
children: [
|
|
226
285
|
/* @__PURE__ */ g("td", {
|
|
227
286
|
className: "p-3 font-medium",
|
|
228
287
|
children: e.country
|
|
229
288
|
}),
|
|
230
289
|
/* @__PURE__ */ g("td", {
|
|
231
|
-
className: "p-3 text-right",
|
|
290
|
+
className: "p-3 text-right tabular-nums",
|
|
232
291
|
children: e.clients
|
|
233
292
|
}),
|
|
234
293
|
/* @__PURE__ */ _("td", {
|
|
235
|
-
className: "p-3 text-right font-medium",
|
|
294
|
+
className: "p-3 text-right font-medium tabular-nums",
|
|
236
295
|
children: [
|
|
237
296
|
"$",
|
|
238
297
|
(e.revenue / 1e3).toFixed(0),
|
|
@@ -240,7 +299,7 @@ function w() {
|
|
|
240
299
|
]
|
|
241
300
|
}),
|
|
242
301
|
/* @__PURE__ */ _("td", {
|
|
243
|
-
className: "p-3 text-right text-text-secondary",
|
|
302
|
+
className: "p-3 text-right text-text-secondary tabular-nums",
|
|
244
303
|
children: ["$", r.toLocaleString()]
|
|
245
304
|
}),
|
|
246
305
|
/* @__PURE__ */ g("td", {
|
|
@@ -250,11 +309,11 @@ function w() {
|
|
|
250
309
|
children: [/* @__PURE__ */ g("div", {
|
|
251
310
|
className: "h-2 flex-1 overflow-hidden rounded-full bg-bg-sunken",
|
|
252
311
|
children: /* @__PURE__ */ g("div", {
|
|
253
|
-
className: "h-2 rounded-full bg-
|
|
312
|
+
className: "h-2 rounded-full bg-accent-blue",
|
|
254
313
|
style: { width: `${n}%` }
|
|
255
314
|
})
|
|
256
315
|
}), /* @__PURE__ */ _("span", {
|
|
257
|
-
className: "w-10 text-right text-xs",
|
|
316
|
+
className: "w-10 text-right text-xs tabular-nums",
|
|
258
317
|
children: [n, "%"]
|
|
259
318
|
})]
|
|
260
319
|
})
|
|
@@ -267,100 +326,96 @@ function w() {
|
|
|
267
326
|
})
|
|
268
327
|
]
|
|
269
328
|
}),
|
|
270
|
-
|
|
329
|
+
P === "users" && /* @__PURE__ */ _("div", {
|
|
271
330
|
className: "grid gap-6 lg:grid-cols-2",
|
|
272
331
|
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
|
-
|
|
332
|
+
/* @__PURE__ */ _(x, {
|
|
333
|
+
className: "border-border-seam",
|
|
334
|
+
children: [/* @__PURE__ */ g(C, { children: /* @__PURE__ */ g(w, {
|
|
335
|
+
className: "text-base",
|
|
336
|
+
children: "User Role Distribution"
|
|
337
|
+
}) }), /* @__PURE__ */ g(S, {
|
|
338
|
+
className: "space-y-3",
|
|
339
|
+
children: Object.entries(W).map(([e, t]) => {
|
|
340
|
+
let n = Math.round(t / N.length * 100);
|
|
341
|
+
return /* @__PURE__ */ _("div", {
|
|
342
|
+
className: "flex items-center gap-3",
|
|
343
|
+
children: [
|
|
344
|
+
/* @__PURE__ */ g("span", {
|
|
345
|
+
className: "w-24 text-sm font-medium capitalize",
|
|
346
|
+
children: e.replace("_", " ")
|
|
347
|
+
}),
|
|
348
|
+
/* @__PURE__ */ g("div", {
|
|
349
|
+
className: "flex-1 h-5 bg-bg-sunken rounded overflow-hidden",
|
|
350
|
+
children: /* @__PURE__ */ g("div", {
|
|
351
|
+
className: `h-5 rounded ${K[e] ?? "bg-chart-6"}`,
|
|
352
|
+
style: { width: `${n}%` }
|
|
353
|
+
})
|
|
354
|
+
}),
|
|
355
|
+
/* @__PURE__ */ _("span", {
|
|
356
|
+
className: "w-16 text-right text-sm tabular-nums",
|
|
357
|
+
children: [
|
|
358
|
+
t,
|
|
359
|
+
" (",
|
|
360
|
+
n,
|
|
361
|
+
"%)"
|
|
362
|
+
]
|
|
297
363
|
})
|
|
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}%` }
|
|
364
|
+
]
|
|
365
|
+
}, e);
|
|
366
|
+
})
|
|
367
|
+
})]
|
|
368
|
+
}),
|
|
369
|
+
/* @__PURE__ */ _(x, {
|
|
370
|
+
className: "border-border-seam",
|
|
371
|
+
children: [/* @__PURE__ */ g(C, { children: /* @__PURE__ */ g(w, {
|
|
372
|
+
className: "text-base",
|
|
373
|
+
children: "User Status Distribution"
|
|
374
|
+
}) }), /* @__PURE__ */ g(S, {
|
|
375
|
+
className: "space-y-3",
|
|
376
|
+
children: Object.entries(G).map(([e, t]) => {
|
|
377
|
+
let n = Math.round(t / N.length * 100);
|
|
378
|
+
return /* @__PURE__ */ _("div", {
|
|
379
|
+
className: "flex items-center gap-3",
|
|
380
|
+
children: [
|
|
381
|
+
/* @__PURE__ */ g("span", {
|
|
382
|
+
className: "w-24 text-sm font-medium capitalize",
|
|
383
|
+
children: e
|
|
384
|
+
}),
|
|
385
|
+
/* @__PURE__ */ g("div", {
|
|
386
|
+
className: "flex-1 h-5 bg-bg-sunken rounded overflow-hidden",
|
|
387
|
+
children: /* @__PURE__ */ g("div", {
|
|
388
|
+
className: `h-5 rounded ${q[e] ?? "bg-chart-6"}`,
|
|
389
|
+
style: { width: `${n}%` }
|
|
390
|
+
})
|
|
391
|
+
}),
|
|
392
|
+
/* @__PURE__ */ _("span", {
|
|
393
|
+
className: "w-16 text-right text-sm tabular-nums",
|
|
394
|
+
children: [
|
|
395
|
+
t,
|
|
396
|
+
" (",
|
|
397
|
+
n,
|
|
398
|
+
"%)"
|
|
399
|
+
]
|
|
336
400
|
})
|
|
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, {
|
|
401
|
+
]
|
|
402
|
+
}, e);
|
|
403
|
+
})
|
|
404
|
+
})]
|
|
405
|
+
}),
|
|
406
|
+
/* @__PURE__ */ _(x, {
|
|
407
|
+
className: "lg:col-span-2 border-border-seam",
|
|
408
|
+
children: [/* @__PURE__ */ g(C, { children: /* @__PURE__ */ g(w, {
|
|
354
409
|
className: "text-base",
|
|
355
410
|
children: "Top Users by Spending"
|
|
356
|
-
}) }), /* @__PURE__ */ g(
|
|
411
|
+
}) }), /* @__PURE__ */ g(S, { children: /* @__PURE__ */ g("div", {
|
|
357
412
|
className: "space-y-2",
|
|
358
|
-
children: [...
|
|
359
|
-
className: "flex items-center justify-between rounded-lg border p-3",
|
|
413
|
+
children: [...N].filter((e) => e.totalSpent > 0).sort((e, t) => t.totalSpent - e.totalSpent).slice(0, 5).map((e, t) => /* @__PURE__ */ _("div", {
|
|
414
|
+
className: "flex items-center justify-between rounded-lg border border-border-seam p-3",
|
|
360
415
|
children: [/* @__PURE__ */ _("div", {
|
|
361
416
|
className: "flex items-center gap-3",
|
|
362
417
|
children: [/* @__PURE__ */ g("span", {
|
|
363
|
-
className: "flex h-8 w-8 items-center justify-center rounded-full bg-
|
|
418
|
+
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
419
|
children: t + 1
|
|
365
420
|
}), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("p", {
|
|
366
421
|
className: "font-medium",
|
|
@@ -372,10 +427,10 @@ function w() {
|
|
|
372
427
|
}), /* @__PURE__ */ _("div", {
|
|
373
428
|
className: "text-right",
|
|
374
429
|
children: [/* @__PURE__ */ _("p", {
|
|
375
|
-
className: "font-bold",
|
|
430
|
+
className: "font-bold tabular-nums",
|
|
376
431
|
children: ["$", e.totalSpent.toLocaleString()]
|
|
377
432
|
}), /* @__PURE__ */ _("p", {
|
|
378
|
-
className: "text-xs text-text-secondary",
|
|
433
|
+
className: "text-xs text-text-secondary tabular-nums",
|
|
379
434
|
children: [e.bookingsCount, " bookings"]
|
|
380
435
|
})]
|
|
381
436
|
})]
|
|
@@ -384,129 +439,141 @@ function w() {
|
|
|
384
439
|
})
|
|
385
440
|
]
|
|
386
441
|
}),
|
|
387
|
-
|
|
442
|
+
P === "revenue" && /* @__PURE__ */ g("div", {
|
|
388
443
|
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: [
|
|
444
|
+
children: /* @__PURE__ */ _(x, {
|
|
445
|
+
className: "border-border-seam",
|
|
446
|
+
children: [/* @__PURE__ */ g(C, { children: /* @__PURE__ */ g(w, {
|
|
447
|
+
className: "text-base",
|
|
448
|
+
children: "Monthly Revenue Comparison"
|
|
449
|
+
}) }), /* @__PURE__ */ g(S, {
|
|
450
|
+
className: "space-y-4",
|
|
451
|
+
children: A.map((e) => {
|
|
452
|
+
let t = e.prev ? ((e.value - e.prev) / e.prev * 100).toFixed(1) : "0", n = e.prev ? e.value >= e.prev : !0;
|
|
453
|
+
return /* @__PURE__ */ _("div", {
|
|
454
|
+
className: "rounded-lg border border-border-seam p-4",
|
|
455
|
+
children: [/* @__PURE__ */ _("div", {
|
|
456
|
+
className: "flex items-center justify-between",
|
|
457
|
+
children: [/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ _("p", {
|
|
458
|
+
className: "font-medium",
|
|
459
|
+
children: [e.name, " 2025"]
|
|
460
|
+
}), /* @__PURE__ */ _("div", {
|
|
461
|
+
className: "mt-1 flex items-center gap-4 text-sm text-text-secondary tabular-nums",
|
|
462
|
+
children: [/* @__PURE__ */ _("span", { children: [
|
|
463
|
+
"Current: $",
|
|
464
|
+
(e.value / 1e3).toFixed(1),
|
|
465
|
+
"k"
|
|
466
|
+
] }), /* @__PURE__ */ _("span", { children: [
|
|
467
|
+
"Previous: $",
|
|
468
|
+
((e.prev ?? 0) / 1e3).toFixed(1),
|
|
469
|
+
"k"
|
|
470
|
+
] })]
|
|
471
|
+
})] }), /* @__PURE__ */ _(y, {
|
|
472
|
+
variant: n ? "default" : "destructive",
|
|
473
|
+
children: [
|
|
474
|
+
n ? "+" : "",
|
|
475
|
+
t,
|
|
476
|
+
"%"
|
|
477
|
+
]
|
|
478
|
+
})]
|
|
403
479
|
}), /* @__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
|
-
]
|
|
480
|
+
className: "mt-3 flex gap-1 h-4",
|
|
481
|
+
children: [/* @__PURE__ */ g("div", {
|
|
482
|
+
className: "h-4 rounded bg-accent-blue-subtle",
|
|
483
|
+
style: { width: `${(e.prev ?? 0) / H * 100}%` }
|
|
484
|
+
}), /* @__PURE__ */ g("div", {
|
|
485
|
+
className: "h-4 rounded bg-accent-blue",
|
|
486
|
+
style: { width: `${Math.max(0, (e.value - (e.prev ?? 0)) / H * 100)}%` }
|
|
487
|
+
})]
|
|
421
488
|
})]
|
|
489
|
+
}, e.name);
|
|
490
|
+
})
|
|
491
|
+
})]
|
|
492
|
+
})
|
|
493
|
+
}),
|
|
494
|
+
P === "bookings" && /* @__PURE__ */ _("div", {
|
|
495
|
+
className: "grid gap-6 lg:grid-cols-2",
|
|
496
|
+
children: [/* @__PURE__ */ _(x, {
|
|
497
|
+
className: "border-border-seam",
|
|
498
|
+
children: [/* @__PURE__ */ g(C, { children: /* @__PURE__ */ g(w, {
|
|
499
|
+
className: "text-base",
|
|
500
|
+
children: "Bookings by Service Category"
|
|
501
|
+
}) }), /* @__PURE__ */ g(S, {
|
|
502
|
+
className: "space-y-3",
|
|
503
|
+
children: [...j].sort((e, t) => t.value - e.value).map((e, t) => /* @__PURE__ */ _("div", {
|
|
504
|
+
className: "flex items-center gap-3",
|
|
505
|
+
children: [/* @__PURE__ */ _("span", {
|
|
506
|
+
className: "w-6 text-sm font-bold text-text-secondary tabular-nums",
|
|
507
|
+
children: ["#", t + 1]
|
|
422
508
|
}), /* @__PURE__ */ _("div", {
|
|
423
|
-
className: "
|
|
424
|
-
children: [/* @__PURE__ */
|
|
425
|
-
className: "
|
|
426
|
-
|
|
509
|
+
className: "flex-1",
|
|
510
|
+
children: [/* @__PURE__ */ _("div", {
|
|
511
|
+
className: "flex items-center justify-between text-sm",
|
|
512
|
+
children: [/* @__PURE__ */ g("span", {
|
|
513
|
+
className: "font-medium",
|
|
514
|
+
children: e.name
|
|
515
|
+
}), /* @__PURE__ */ _("span", {
|
|
516
|
+
className: "tabular-nums",
|
|
517
|
+
children: [e.value, " bookings"]
|
|
518
|
+
})]
|
|
427
519
|
}), /* @__PURE__ */ g("div", {
|
|
428
|
-
className: "h-
|
|
429
|
-
|
|
520
|
+
className: "mt-1 h-2 overflow-hidden rounded-full bg-bg-sunken",
|
|
521
|
+
children: /* @__PURE__ */ g("div", {
|
|
522
|
+
className: "h-2 rounded-full bg-accent-blue",
|
|
523
|
+
style: { width: `${e.value / U * 100}%` }
|
|
524
|
+
})
|
|
430
525
|
})]
|
|
431
526
|
})]
|
|
432
|
-
}, e.name)
|
|
433
|
-
})
|
|
434
|
-
})
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
527
|
+
}, e.name))
|
|
528
|
+
})]
|
|
529
|
+
}), /* @__PURE__ */ _(x, {
|
|
530
|
+
className: "border-border-seam",
|
|
531
|
+
children: [/* @__PURE__ */ g(C, { children: /* @__PURE__ */ g(w, {
|
|
532
|
+
className: "text-base",
|
|
533
|
+
children: "Quick Stats"
|
|
534
|
+
}) }), /* @__PURE__ */ g(S, {
|
|
535
|
+
className: "space-y-4",
|
|
536
|
+
children: [
|
|
537
|
+
{
|
|
538
|
+
label: "Total Bookings",
|
|
539
|
+
value: j.reduce((e, t) => e + t.value, 0).toLocaleString(),
|
|
540
|
+
icon: d
|
|
541
|
+
},
|
|
542
|
+
{
|
|
543
|
+
label: "Avg. Booking Value",
|
|
544
|
+
value: "$3,804",
|
|
545
|
+
icon: o
|
|
546
|
+
},
|
|
547
|
+
{
|
|
548
|
+
label: "Completion Rate",
|
|
549
|
+
value: "96.5%",
|
|
550
|
+
icon: m
|
|
551
|
+
},
|
|
552
|
+
{
|
|
553
|
+
label: "Client Satisfaction",
|
|
554
|
+
value: "4.7/5.0",
|
|
555
|
+
icon: f
|
|
556
|
+
}
|
|
557
|
+
].map(({ label: e, value: t, icon: n }) => /* @__PURE__ */ _("div", {
|
|
558
|
+
className: "flex items-center justify-between rounded-lg border border-border-seam p-3",
|
|
450
559
|
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-action-primary-bg",
|
|
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-text-secondary" }), /* @__PURE__ */ g("span", {
|
|
496
|
-
className: "text-sm font-medium",
|
|
497
|
-
children: e
|
|
560
|
+
className: "flex items-center gap-3",
|
|
561
|
+
children: [/* @__PURE__ */ g(n, { className: "h-5 w-5 text-text-secondary" }), /* @__PURE__ */ g("span", {
|
|
562
|
+
className: "text-sm font-medium",
|
|
563
|
+
children: e
|
|
564
|
+
})]
|
|
565
|
+
}), /* @__PURE__ */ g("span", {
|
|
566
|
+
className: "text-lg font-bold tabular-nums",
|
|
567
|
+
children: t
|
|
498
568
|
})]
|
|
499
|
-
}
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
})]
|
|
503
|
-
}, e))
|
|
504
|
-
})] })]
|
|
569
|
+
}, e))
|
|
570
|
+
})]
|
|
571
|
+
})]
|
|
505
572
|
})
|
|
506
573
|
]
|
|
507
574
|
});
|
|
508
575
|
}
|
|
509
576
|
//#endregion
|
|
510
|
-
export {
|
|
577
|
+
export { k as AdminReportsPage };
|
|
511
578
|
|
|
512
579
|
//# sourceMappingURL=AdminReportsPage.js.map
|