@burdenoff/microfe-proserviceworld 2026.626.2 → 2026.706.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.
Files changed (75) hide show
  1. package/dist/index.js +2 -3
  2. package/dist/node_modules/clsx/dist/clsx.js +18 -0
  3. package/dist/node_modules/clsx/dist/clsx.js.map +1 -0
  4. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +1716 -0
  5. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -0
  6. package/dist/proserviceworld/ProServiceWorldRoot.js +92 -136
  7. package/dist/proserviceworld/ProServiceWorldRoot.js.map +1 -1
  8. package/dist/proserviceworld/ProServiceWorldRoutes.js +18 -26
  9. package/dist/proserviceworld/ProServiceWorldRoutes.js.map +1 -1
  10. package/dist/proserviceworld/components/ui.js +273 -0
  11. package/dist/proserviceworld/components/ui.js.map +1 -0
  12. package/dist/proserviceworld/hooks/useFiles.js +45 -0
  13. package/dist/proserviceworld/hooks/useFiles.js.map +1 -0
  14. package/dist/proserviceworld/hooks/useProServiceWorldApi.js +416 -0
  15. package/dist/proserviceworld/hooks/useProServiceWorldApi.js.map +1 -0
  16. package/dist/proserviceworld/index.js +0 -1
  17. package/dist/proserviceworld/pages/AnalyticsPage.js +163 -475
  18. package/dist/proserviceworld/pages/AnalyticsPage.js.map +1 -1
  19. package/dist/proserviceworld/pages/ClientDetailPage.js +238 -0
  20. package/dist/proserviceworld/pages/ClientDetailPage.js.map +1 -0
  21. package/dist/proserviceworld/pages/ClientsPage.js +295 -0
  22. package/dist/proserviceworld/pages/ClientsPage.js.map +1 -0
  23. package/dist/proserviceworld/pages/CompliancePage.js +307 -0
  24. package/dist/proserviceworld/pages/CompliancePage.js.map +1 -0
  25. package/dist/proserviceworld/pages/ConflictsPage.js +234 -0
  26. package/dist/proserviceworld/pages/ConflictsPage.js.map +1 -0
  27. package/dist/proserviceworld/pages/DashboardPage.js +179 -632
  28. package/dist/proserviceworld/pages/DashboardPage.js.map +1 -1
  29. package/dist/proserviceworld/pages/DocumentsPage.js +235 -539
  30. package/dist/proserviceworld/pages/DocumentsPage.js.map +1 -1
  31. package/dist/proserviceworld/pages/EngagementDetailPage.js +444 -0
  32. package/dist/proserviceworld/pages/EngagementDetailPage.js.map +1 -0
  33. package/dist/proserviceworld/pages/EngagementsPage.js +256 -0
  34. package/dist/proserviceworld/pages/EngagementsPage.js.map +1 -0
  35. package/dist/proserviceworld/pages/InvoicesPage.js +303 -0
  36. package/dist/proserviceworld/pages/InvoicesPage.js.map +1 -0
  37. package/dist/proserviceworld/pages/MattersPage.js +275 -0
  38. package/dist/proserviceworld/pages/MattersPage.js.map +1 -0
  39. package/dist/proserviceworld/pages/PracticeAreasPage.js +176 -0
  40. package/dist/proserviceworld/pages/PracticeAreasPage.js.map +1 -0
  41. package/dist/proserviceworld/pages/TimePage.js +310 -0
  42. package/dist/proserviceworld/pages/TimePage.js.map +1 -0
  43. package/dist/proserviceworld/utils/cn.js +10 -0
  44. package/dist/proserviceworld/utils/cn.js.map +1 -0
  45. package/dist/proserviceworld/utils/nav.js +11 -0
  46. package/dist/proserviceworld/utils/nav.js.map +1 -0
  47. package/package.json +3 -2
  48. package/dist/proserviceworld/pages/AdminReportsPage.js +0 -579
  49. package/dist/proserviceworld/pages/AdminReportsPage.js.map +0 -1
  50. package/dist/proserviceworld/pages/AdminUsersPage.js +0 -468
  51. package/dist/proserviceworld/pages/AdminUsersPage.js.map +0 -1
  52. package/dist/proserviceworld/pages/BookingsPage.js +0 -446
  53. package/dist/proserviceworld/pages/BookingsPage.js.map +0 -1
  54. package/dist/proserviceworld/pages/MessagesPage.js +0 -238
  55. package/dist/proserviceworld/pages/MessagesPage.js.map +0 -1
  56. package/dist/proserviceworld/pages/PaymentsPage.js +0 -537
  57. package/dist/proserviceworld/pages/PaymentsPage.js.map +0 -1
  58. package/dist/proserviceworld/pages/ProjectsPage.js +0 -627
  59. package/dist/proserviceworld/pages/ProjectsPage.js.map +0 -1
  60. package/dist/proserviceworld/pages/ProviderDetailPage.js +0 -538
  61. package/dist/proserviceworld/pages/ProviderDetailPage.js.map +0 -1
  62. package/dist/proserviceworld/pages/ProvidersPage.js +0 -347
  63. package/dist/proserviceworld/pages/ProvidersPage.js.map +0 -1
  64. package/dist/proserviceworld/pages/ReviewsPage.js +0 -356
  65. package/dist/proserviceworld/pages/ReviewsPage.js.map +0 -1
  66. package/dist/proserviceworld/pages/ServiceDetailsPage.js +0 -631
  67. package/dist/proserviceworld/pages/ServiceDetailsPage.js.map +0 -1
  68. package/dist/proserviceworld/pages/ServicesPage.js +0 -344
  69. package/dist/proserviceworld/pages/ServicesPage.js.map +0 -1
  70. package/dist/proserviceworld/pages/VerificationPage.js +0 -370
  71. package/dist/proserviceworld/pages/VerificationPage.js.map +0 -1
  72. package/dist/proserviceworld/store/proserviceworldStore.js +0 -2490
  73. package/dist/proserviceworld/store/proserviceworldStore.js.map +0 -1
  74. package/dist/proserviceworld/utils/i18n.js +0 -15
  75. package/dist/proserviceworld/utils/i18n.js.map +0 -1
@@ -1,652 +1,199 @@
1
- import { useProServiceWorldStore as e } from "../store/proserviceworldStore.js";
2
- import { tWithFallback as t } from "../utils/i18n.js";
3
- import { useState as n } from "react";
4
- import { AlertCircle as r, BarChart3 as i, Bell as a, BookOpen as o, Calendar as s, CheckCircle as c, Clock as l, DollarSign as u, Eye as d, Plus as f, Star as p, TrendingUp as m, Users as h } from "lucide-react";
5
- import { useI18n as g } from "@burdenoff/fe-libs/shared/providers/shell";
6
- import { jsx as _, jsxs as v } from "react/jsx-runtime";
7
- import { AuroraBackground as y, Badge as b, Button as x, CTAOverflowMenu as S, Card as C, CardContent as w, CardHeader as T, CardTitle as E, EmphasisPanel as D, GlassCard as O, GradientText as k, IllustratedEmptyState as A, NextSteps as j, PagePurpose as M } from "@burdenoff/fe-libs/ui";
1
+ import { useDashboardStats as e } from "../hooks/useProServiceWorldApi.js";
2
+ import { useNav as t } from "../utils/nav.js";
3
+ import { ErrorState as n, LoadingBlock as r, MetricCard as i, PageHeader as a, SectionCard as o, StatusPill as s, fmtHours as c, fmtMoney as l } from "../components/ui.js";
4
+ import { ArrowRight as u, Briefcase as d, Clock as f, FolderKanban as p, GitBranch as m, Receipt as h, ShieldCheck as g, Users as _ } from "lucide-react";
5
+ import { jsx as v, jsxs as y } from "react/jsx-runtime";
8
6
  //#region src/proserviceworld/pages/DashboardPage.tsx
9
- function N() {
10
- let { t: N } = g(), P = (e, n, r) => t(N, e, n, r), { bookings: F, providers: I, services: L, reviews: R, notifications: z } = e(), [B, V] = n("client"), H = F.filter((e) => e.status === "in_progress"), U = F.filter((e) => e.status === "completed"), W = F.filter((e) => e.status === "pending"), G = F.filter((e) => e.paymentStatus === "completed").reduce((e, t) => e + t.budget, 0), K = z.filter((e) => !e.read).length, q = [
11
- {
12
- id: "client",
13
- label: P("proserviceworld.dashboard.views.client", "Client")
14
- },
15
- {
16
- id: "provider",
17
- label: P("proserviceworld.dashboard.views.provider", "Provider")
18
- },
19
- {
20
- id: "admin",
21
- label: P("proserviceworld.dashboard.views.admin", "Admin")
22
- },
23
- {
24
- id: "team",
25
- label: P("proserviceworld.dashboard.views.team", "Team")
26
- }
27
- ], J = (e) => e === "completed" ? P("proserviceworld.shared.bookingStatus.completed", "completed") : e === "in_progress" ? P("proserviceworld.shared.bookingStatus.inProgress", "in progress") : e === "pending" ? P("proserviceworld.shared.bookingStatus.pending", "pending") : P("proserviceworld.shared.bookingStatus.cancelled", "cancelled");
28
- return /* @__PURE__ */ v("div", {
29
- className: "space-y-6 p-6 bg-bg-canvas min-h-screen",
7
+ var b = [
8
+ {
9
+ label: "Clients",
10
+ to: "clients",
11
+ icon: /* @__PURE__ */ v(_, { className: "h-4 w-4" })
12
+ },
13
+ {
14
+ label: "Engagements",
15
+ to: "engagements",
16
+ icon: /* @__PURE__ */ v(d, { className: "h-4 w-4" })
17
+ },
18
+ {
19
+ label: "Matters",
20
+ to: "matters",
21
+ icon: /* @__PURE__ */ v(p, { className: "h-4 w-4" })
22
+ },
23
+ {
24
+ label: "Time",
25
+ to: "time",
26
+ icon: /* @__PURE__ */ v(f, { className: "h-4 w-4" })
27
+ },
28
+ {
29
+ label: "Invoices",
30
+ to: "invoices",
31
+ icon: /* @__PURE__ */ v(h, { className: "h-4 w-4" })
32
+ },
33
+ {
34
+ label: "Compliance",
35
+ to: "compliance",
36
+ icon: /* @__PURE__ */ v(g, { className: "h-4 w-4" })
37
+ }
38
+ ], x = () => {
39
+ let s = t(), { data: x, isLoading: w, error: T, refetch: E } = e();
40
+ return w ? /* @__PURE__ */ v(r, { label: "Loading practice overview…" }) : T ? /* @__PURE__ */ v(n, {
41
+ error: T,
42
+ onRetry: () => void E()
43
+ }) : x ? /* @__PURE__ */ y("div", {
44
+ className: "space-y-6",
30
45
  children: [
31
- /* @__PURE__ */ v("div", {
32
- className: "relative overflow-hidden rounded-card -mx-2 px-2 pt-1",
33
- children: [/* @__PURE__ */ _(y, { intensity: "subtle" }), /* @__PURE__ */ v("div", {
34
- className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
35
- children: [/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("h1", {
36
- className: "text-2xl font-semibold tracking-tight",
37
- children: /* @__PURE__ */ _(k, { children: P("proserviceworld.dashboard.title", "Dashboard") })
38
- }), /* @__PURE__ */ _("p", {
39
- className: "text-sm text-text-secondary",
40
- children: P("proserviceworld.dashboard.subtitle", "Welcome back! Here is your activity overview.")
41
- })] }), /* @__PURE__ */ v("div", {
42
- className: "flex items-center gap-2",
43
- children: [/* @__PURE__ */ _("div", {
44
- className: "flex bg-bg-sunken rounded-lg p-1",
45
- children: q.map((e) => /* @__PURE__ */ _("button", {
46
- onClick: () => V(e.id),
47
- "aria-pressed": B === e.id,
48
- className: `px-3 py-1.5 rounded text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus ${B === e.id ? "bg-bg-surface text-text-primary shadow-sm" : "text-text-secondary hover:text-text-primary"}`,
49
- children: e.label
50
- }, e.id))
51
- }), K > 0 && /* @__PURE__ */ v(x, {
52
- variant: "outline",
53
- size: "sm",
54
- "aria-label": `${K} unread`,
55
- children: [/* @__PURE__ */ _(a, { className: "h-4 w-4 mr-1" }), /* @__PURE__ */ _("span", {
56
- className: "tabular-nums",
57
- children: K
58
- })]
59
- })]
60
- })]
61
- })]
62
- }),
63
- /* @__PURE__ */ _(M, {
64
- icon: /* @__PURE__ */ _(i, { className: "h-4 w-4" }),
65
- children: P("proserviceworld.dashboard.purpose", "Your command center for ProServiceWorld. Switch between Client, Provider, Admin, and Team views to track bookings, monitor earnings and ratings, watch platform activity, and jump straight to the actions that matter to your role.")
66
- }),
67
- /* @__PURE__ */ _(j, {
68
- storageKey: "proserviceworld-dashboard",
69
- steps: [
70
- {
71
- id: "find-services",
72
- label: P("proserviceworld.dashboard.nextSteps.findServices", "Find a service to book"),
73
- description: P("proserviceworld.dashboard.nextSteps.findServicesDesc", "Browse verified providers and book the help you need."),
74
- icon: /* @__PURE__ */ _(o, { className: "h-4 w-4" }),
75
- onClick: () => V("client")
76
- },
77
- {
78
- id: "review-bookings",
79
- label: P("proserviceworld.dashboard.nextSteps.reviewBookings", "Review active bookings"),
80
- description: P("proserviceworld.dashboard.nextSteps.reviewBookingsDesc", "Check progress and status on work in flight."),
81
- icon: /* @__PURE__ */ _(s, { className: "h-4 w-4" }),
82
- onClick: () => V("client"),
83
- done: H.length > 0
84
- },
85
- {
86
- id: "provider-view",
87
- label: P("proserviceworld.dashboard.nextSteps.providerView", "Grow your provider business"),
88
- description: P("proserviceworld.dashboard.nextSteps.providerViewDesc", "Switch to the Provider view to manage services and earnings."),
89
- icon: /* @__PURE__ */ _(m, { className: "h-4 w-4" }),
90
- onClick: () => V("provider")
91
- }
92
- ]
46
+ /* @__PURE__ */ v(a, {
47
+ title: "Practice overview",
48
+ subtitle: "One governed view of clients, engagements, matters, time and billing across your firm."
93
49
  }),
94
- B === "client" && /* @__PURE__ */ v("div", {
95
- className: "space-y-6",
50
+ /* @__PURE__ */ y("div", {
51
+ className: "grid grid-cols-2 gap-3 lg:grid-cols-4",
96
52
  children: [
97
- /* @__PURE__ */ _(D, { children: /* @__PURE__ */ v("div", {
98
- className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
99
- children: [/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("h2", {
100
- className: "text-xl font-bold tracking-tight",
101
- children: P("proserviceworld.dashboard.client.welcomeTitle", "Welcome back, Alex!")
102
- }), /* @__PURE__ */ _("p", {
103
- className: "text-text-secondary mt-1",
104
- children: P("proserviceworld.dashboard.client.welcomeSubtitle", "Manage your services, bookings, and find new providers")
105
- })] }), /* @__PURE__ */ v(x, {
106
- size: "sm",
107
- children: [/* @__PURE__ */ _(f, { className: "h-4 w-4 mr-2" }), P("proserviceworld.dashboard.client.actions.findServices", "Find Services")]
108
- })]
109
- }) }),
110
- /* @__PURE__ */ v("div", {
111
- className: "grid gap-4 md:grid-cols-4",
112
- children: [
113
- /* @__PURE__ */ _(O, {
114
- treatment: "metric",
115
- className: "border-border-seam",
116
- children: /* @__PURE__ */ v("div", {
117
- className: "flex items-center",
118
- children: [/* @__PURE__ */ _(s, { className: "h-8 w-8 text-accent-blue" }), /* @__PURE__ */ v("div", {
119
- className: "ml-4",
120
- children: [/* @__PURE__ */ _("p", {
121
- className: "text-2xl font-bold tabular-nums",
122
- children: H.length
123
- }), /* @__PURE__ */ _("p", {
124
- className: "text-sm text-text-secondary",
125
- children: P("proserviceworld.dashboard.client.metrics.activeBookings", "Active Bookings")
126
- })]
127
- })]
128
- })
129
- }),
130
- /* @__PURE__ */ _(O, {
131
- treatment: "metric",
132
- className: "border-border-seam",
133
- children: /* @__PURE__ */ v("div", {
134
- className: "flex items-center",
135
- children: [/* @__PURE__ */ _(p, { className: "h-8 w-8 text-status-warning-text" }), /* @__PURE__ */ v("div", {
136
- className: "ml-4",
137
- children: [/* @__PURE__ */ _("p", {
138
- className: "text-2xl font-bold tabular-nums",
139
- children: "4.8"
140
- }), /* @__PURE__ */ _("p", {
141
- className: "text-sm text-text-secondary",
142
- children: P("proserviceworld.dashboard.client.metrics.avgRatingGiven", "Avg. Rating Given")
143
- })]
144
- })]
145
- })
146
- }),
147
- /* @__PURE__ */ _(O, {
148
- treatment: "metric",
149
- className: "border-border-seam",
150
- children: /* @__PURE__ */ v("div", {
151
- className: "flex items-center",
152
- children: [/* @__PURE__ */ _(c, { className: "h-8 w-8 text-status-success-text" }), /* @__PURE__ */ v("div", {
153
- className: "ml-4",
154
- children: [/* @__PURE__ */ _("p", {
155
- className: "text-2xl font-bold tabular-nums",
156
- children: U.length
157
- }), /* @__PURE__ */ _("p", {
158
- className: "text-sm text-text-secondary",
159
- children: P("proserviceworld.dashboard.client.metrics.completedProjects", "Completed Projects")
160
- })]
161
- })]
162
- })
163
- }),
164
- /* @__PURE__ */ _(O, {
165
- treatment: "glass",
166
- glow: !0,
167
- className: "border-border-seam",
168
- children: /* @__PURE__ */ v("div", {
169
- className: "flex items-center",
170
- children: [/* @__PURE__ */ _(u, { className: "h-8 w-8 text-accent-blue" }), /* @__PURE__ */ v("div", {
171
- className: "ml-4",
172
- children: [/* @__PURE__ */ v("p", {
173
- className: "text-2xl font-bold tabular-nums",
174
- children: ["$", G.toLocaleString()]
175
- }), /* @__PURE__ */ _("p", {
176
- className: "text-sm text-text-secondary",
177
- children: P("proserviceworld.dashboard.client.metrics.totalSpent", "Total Spent")
178
- })]
179
- })]
180
- })
181
- })
182
- ]
53
+ /* @__PURE__ */ v(i, {
54
+ label: "Active clients",
55
+ value: x.activeClients,
56
+ hint: `${x.totalClients} total`,
57
+ icon: /* @__PURE__ */ v(_, { className: "h-4 w-4" }),
58
+ tone: "success"
183
59
  }),
184
- /* @__PURE__ */ v(C, {
185
- className: "border-border-seam",
186
- children: [/* @__PURE__ */ _(T, { children: /* @__PURE__ */ v("div", {
187
- className: "flex items-center justify-between",
188
- children: [/* @__PURE__ */ _(E, { children: P("proserviceworld.dashboard.client.sections.recentBookings", "Recent Bookings") }), /* @__PURE__ */ _(x, {
189
- variant: "outline",
190
- size: "sm",
191
- children: P("proserviceworld.shared.actions.viewAll", "View All")
192
- })]
193
- }) }), /* @__PURE__ */ _(w, {
194
- className: "space-y-4",
195
- children: F.slice(0, 5).map((e) => /* @__PURE__ */ v("div", {
196
- className: "flex items-center justify-between p-4 border border-border-seam rounded-lg transition-shadow hover:shadow-pop",
197
- children: [/* @__PURE__ */ v("div", {
198
- className: "flex items-center space-x-4",
199
- children: [/* @__PURE__ */ _("div", {
200
- className: "h-10 w-10 rounded-full bg-accent-soft flex items-center justify-center",
201
- children: /* @__PURE__ */ _(o, { className: "h-5 w-5 text-text-primary" })
202
- }), /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
203
- className: "font-medium",
204
- children: e.title
205
- }), /* @__PURE__ */ _("p", {
206
- className: "text-sm text-text-secondary",
207
- children: P("proserviceworld.dashboard.client.booking.provider", "Provider: {{name}}", { name: e.providerName })
208
- })] })]
209
- }), /* @__PURE__ */ v("div", {
210
- className: "text-right",
211
- children: [/* @__PURE__ */ v("p", {
212
- className: "font-medium text-sm tabular-nums",
213
- children: ["$", e.budget.toLocaleString()]
214
- }), /* @__PURE__ */ _(b, {
215
- variant: e.status === "completed" ? "default" : e.status === "in_progress" ? "secondary" : "outline",
216
- children: J(e.status)
217
- })]
218
- })]
219
- }, e.id))
220
- })]
221
- })
222
- ]
223
- }),
224
- B === "provider" && /* @__PURE__ */ v("div", {
225
- className: "space-y-6",
226
- children: [
227
- /* @__PURE__ */ _(D, { children: /* @__PURE__ */ v("div", {
228
- className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
229
- children: [/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("h2", {
230
- className: "text-xl font-bold tracking-tight",
231
- children: P("proserviceworld.dashboard.provider.welcomeTitle", "Welcome back, Provider!")
232
- }), /* @__PURE__ */ _("p", {
233
- className: "text-text-secondary mt-1",
234
- children: P("proserviceworld.dashboard.provider.welcomeSubtitle", "Manage your services, bookings, and grow your business")
235
- })] }), /* @__PURE__ */ _(S, {
236
- primary: {
237
- label: P("proserviceworld.dashboard.provider.actions.editProfile", "Edit Profile"),
238
- onSelect: () => {},
239
- icon: /* @__PURE__ */ _(d, { className: "h-4 w-4" })
240
- },
241
- actions: [{
242
- label: P("proserviceworld.dashboard.provider.actions.addService", "Add Service"),
243
- onSelect: () => {},
244
- icon: /* @__PURE__ */ _(f, { className: "h-4 w-4" })
245
- }]
246
- })]
247
- }) }),
248
- /* @__PURE__ */ v("div", {
249
- className: "grid gap-4 md:grid-cols-4",
250
- children: [
251
- /* @__PURE__ */ _(O, {
252
- treatment: "glass",
253
- glow: !0,
254
- className: "border-border-seam",
255
- children: /* @__PURE__ */ v("div", {
256
- className: "flex items-center",
257
- children: [/* @__PURE__ */ _(p, { className: "h-8 w-8 text-status-warning-text" }), /* @__PURE__ */ v("div", {
258
- className: "ml-4",
259
- children: [/* @__PURE__ */ _("p", {
260
- className: "text-2xl font-bold tabular-nums",
261
- children: "4.9"
262
- }), /* @__PURE__ */ _("p", {
263
- className: "text-sm text-text-secondary",
264
- children: P("proserviceworld.dashboard.provider.metrics.rating", "Rating ({{count}} reviews)", { count: R.length })
265
- })]
266
- })]
267
- })
268
- }),
269
- /* @__PURE__ */ _(O, {
270
- treatment: "metric",
271
- className: "border-border-seam",
272
- children: /* @__PURE__ */ v("div", {
273
- className: "flex items-center",
274
- children: [/* @__PURE__ */ _(s, { className: "h-8 w-8 text-accent-blue" }), /* @__PURE__ */ v("div", {
275
- className: "ml-4",
276
- children: [/* @__PURE__ */ _("p", {
277
- className: "text-2xl font-bold tabular-nums",
278
- children: H.length
279
- }), /* @__PURE__ */ _("p", {
280
- className: "text-sm text-text-secondary",
281
- children: P("proserviceworld.dashboard.provider.metrics.activeProjects", "Active Projects")
282
- })]
283
- })]
284
- })
285
- }),
286
- /* @__PURE__ */ _(O, {
287
- treatment: "metric",
288
- className: "border-border-seam",
289
- children: /* @__PURE__ */ v("div", {
290
- className: "flex items-center",
291
- children: [/* @__PURE__ */ _(m, { className: "h-8 w-8 text-status-success-text" }), /* @__PURE__ */ v("div", {
292
- className: "ml-4",
293
- children: [/* @__PURE__ */ _("p", {
294
- className: "text-2xl font-bold tabular-nums",
295
- children: "98%"
296
- }), /* @__PURE__ */ _("p", {
297
- className: "text-sm text-text-secondary",
298
- children: P("proserviceworld.dashboard.provider.metrics.completionRate", "Completion Rate")
299
- })]
300
- })]
301
- })
302
- }),
303
- /* @__PURE__ */ _(O, {
304
- treatment: "metric",
305
- className: "border-border-seam",
306
- children: /* @__PURE__ */ v("div", {
307
- className: "flex items-center",
308
- children: [/* @__PURE__ */ _(u, { className: "h-8 w-8 text-accent-blue" }), /* @__PURE__ */ v("div", {
309
- className: "ml-4",
310
- children: [/* @__PURE__ */ _("p", {
311
- className: "text-2xl font-bold tabular-nums",
312
- children: "$12,850"
313
- }), /* @__PURE__ */ _("p", {
314
- className: "text-sm text-text-secondary",
315
- children: P("proserviceworld.dashboard.provider.metrics.thisMonth", "This Month")
316
- })]
317
- })]
318
- })
319
- })
320
- ]
60
+ /* @__PURE__ */ v(i, {
61
+ label: "Active engagements",
62
+ value: x.activeEngagements,
63
+ icon: /* @__PURE__ */ v(d, { className: "h-4 w-4" }),
64
+ tone: "accent"
321
65
  }),
322
- /* @__PURE__ */ v(C, {
323
- className: "border-border-seam",
324
- children: [/* @__PURE__ */ _(T, { children: /* @__PURE__ */ v("div", {
325
- className: "flex items-center justify-between",
326
- children: [/* @__PURE__ */ _(E, { children: P("proserviceworld.dashboard.provider.sections.yourServices", "Your Services") }), /* @__PURE__ */ _(S, {
327
- primary: {
328
- label: P("proserviceworld.dashboard.provider.actions.addService", "Add Service"),
329
- onSelect: () => {},
330
- icon: /* @__PURE__ */ _(f, { className: "h-4 w-4" })
331
- },
332
- actions: [{
333
- label: P("proserviceworld.shared.actions.viewAll", "View All"),
334
- onSelect: () => {},
335
- icon: /* @__PURE__ */ _(d, { className: "h-4 w-4" })
336
- }]
337
- })]
338
- }) }), /* @__PURE__ */ _(w, { children: /* @__PURE__ */ _("div", {
339
- className: "grid gap-4 md:grid-cols-3",
340
- children: L.slice(0, 3).map((e) => /* @__PURE__ */ v("div", {
341
- className: "border border-border-seam rounded-lg p-4 transition-shadow hover:shadow-pop",
342
- children: [
343
- /* @__PURE__ */ _("h4", {
344
- className: "font-medium mb-1",
345
- children: e.title
346
- }),
347
- /* @__PURE__ */ _("p", {
348
- className: "text-sm text-text-secondary mb-2 line-clamp-2",
349
- children: e.description
350
- }),
351
- /* @__PURE__ */ v("div", {
352
- className: "flex items-center justify-between",
353
- children: [/* @__PURE__ */ _("span", {
354
- className: "text-sm font-medium tabular-nums",
355
- children: P("proserviceworld.services.card.pricing.from", "From ${{amount}}", { amount: e.pricing.basePrice.toLocaleString() })
356
- }), /* @__PURE__ */ _(b, {
357
- variant: "secondary",
358
- children: P("proserviceworld.dashboard.provider.service.bookings", "{{count}} bookings", { count: e.totalBookings })
359
- })]
360
- })
361
- ]
362
- }, e.id))
363
- }) })]
364
- })
365
- ]
366
- }),
367
- B === "admin" && /* @__PURE__ */ v("div", {
368
- className: "space-y-6",
369
- children: [
370
- /* @__PURE__ */ _(D, { children: /* @__PURE__ */ v("div", {
371
- className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
372
- children: [/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("h2", {
373
- className: "text-xl font-bold tracking-tight",
374
- children: P("proserviceworld.dashboard.admin.title", "Admin Dashboard")
375
- }), /* @__PURE__ */ _("p", {
376
- className: "text-text-secondary mt-1",
377
- children: P("proserviceworld.dashboard.admin.subtitle", "Monitor platform activity and manage users")
378
- })] }), /* @__PURE__ */ _(S, {
379
- primary: {
380
- label: P("proserviceworld.dashboard.admin.actions.viewReports", "View Reports"),
381
- onSelect: () => {},
382
- icon: /* @__PURE__ */ _(i, { className: "h-4 w-4" })
383
- },
384
- actions: [{
385
- label: P("proserviceworld.dashboard.admin.actions.manageUsers", "Manage Users"),
386
- onSelect: () => {},
387
- icon: /* @__PURE__ */ _(h, { className: "h-4 w-4" })
388
- }]
389
- })]
390
- }) }),
391
- /* @__PURE__ */ v("div", {
392
- className: "grid gap-4 md:grid-cols-4",
393
- children: [
394
- /* @__PURE__ */ _(O, {
395
- treatment: "metric",
396
- className: "border-border-seam",
397
- children: /* @__PURE__ */ v("div", {
398
- className: "flex items-center",
399
- children: [/* @__PURE__ */ _(h, { className: "h-8 w-8 text-accent-blue" }), /* @__PURE__ */ v("div", {
400
- className: "ml-4",
401
- children: [/* @__PURE__ */ _("p", {
402
- className: "text-2xl font-bold tabular-nums",
403
- children: I.length
404
- }), /* @__PURE__ */ _("p", {
405
- className: "text-sm text-text-secondary",
406
- children: P("proserviceworld.dashboard.admin.metrics.totalProviders", "Total Providers")
407
- })]
408
- })]
409
- })
410
- }),
411
- /* @__PURE__ */ _(O, {
412
- treatment: "metric",
413
- className: "border-border-seam",
414
- children: /* @__PURE__ */ v("div", {
415
- className: "flex items-center",
416
- children: [/* @__PURE__ */ _(o, { className: "h-8 w-8 text-status-success-text" }), /* @__PURE__ */ v("div", {
417
- className: "ml-4",
418
- children: [/* @__PURE__ */ _("p", {
419
- className: "text-2xl font-bold tabular-nums",
420
- children: L.length
421
- }), /* @__PURE__ */ _("p", {
422
- className: "text-sm text-text-secondary",
423
- children: P("proserviceworld.dashboard.admin.metrics.totalServices", "Total Services")
424
- })]
425
- })]
426
- })
427
- }),
428
- /* @__PURE__ */ _(O, {
429
- treatment: "metric",
430
- className: "border-border-seam",
431
- children: /* @__PURE__ */ v("div", {
432
- className: "flex items-center",
433
- children: [/* @__PURE__ */ _(s, { className: "h-8 w-8 text-accent-blue" }), /* @__PURE__ */ v("div", {
434
- className: "ml-4",
435
- children: [/* @__PURE__ */ _("p", {
436
- className: "text-2xl font-bold tabular-nums",
437
- children: F.length
438
- }), /* @__PURE__ */ _("p", {
439
- className: "text-sm text-text-secondary",
440
- children: P("proserviceworld.dashboard.admin.metrics.totalBookings", "Total Bookings")
441
- })]
442
- })]
443
- })
444
- }),
445
- /* @__PURE__ */ _(O, {
446
- treatment: "glass",
447
- glow: !0,
448
- className: "border-border-seam",
449
- children: /* @__PURE__ */ v("div", {
450
- className: "flex items-center",
451
- children: [/* @__PURE__ */ _(u, { className: "h-8 w-8 text-status-warning-text" }), /* @__PURE__ */ v("div", {
452
- className: "ml-4",
453
- children: [/* @__PURE__ */ _("p", {
454
- className: "text-2xl font-bold tabular-nums",
455
- children: "$45,670"
456
- }), /* @__PURE__ */ _("p", {
457
- className: "text-sm text-text-secondary",
458
- children: P("proserviceworld.dashboard.admin.metrics.totalRevenue", "Total Revenue")
459
- })]
460
- })]
461
- })
462
- })
463
- ]
66
+ /* @__PURE__ */ v(i, {
67
+ label: "Open matters",
68
+ value: x.openMatters,
69
+ icon: /* @__PURE__ */ v(p, { className: "h-4 w-4" }),
70
+ tone: "info"
464
71
  }),
465
- /* @__PURE__ */ v("div", {
466
- className: "grid gap-4 md:grid-cols-2",
467
- children: [/* @__PURE__ */ v(C, {
468
- className: "border-border-seam",
469
- children: [/* @__PURE__ */ _(T, { children: /* @__PURE__ */ _(E, { children: P("proserviceworld.dashboard.admin.sections.recentProviders", "Recent Providers") }) }), /* @__PURE__ */ _(w, {
470
- className: "space-y-4",
471
- children: I.slice(0, 3).map((e) => /* @__PURE__ */ v("div", {
472
- className: "flex items-center space-x-4",
473
- children: [
474
- /* @__PURE__ */ _("div", {
475
- className: "h-10 w-10 rounded-full bg-accent-soft flex items-center justify-center",
476
- children: /* @__PURE__ */ _("span", {
477
- className: "text-text-primary font-medium",
478
- children: e.name.charAt(0)
479
- })
480
- }),
481
- /* @__PURE__ */ v("div", {
482
- className: "flex-1",
483
- children: [/* @__PURE__ */ _("p", {
484
- className: "font-medium",
485
- children: e.businessName
486
- }), /* @__PURE__ */ _("p", {
487
- className: "text-sm text-text-secondary",
488
- children: e.specializations[0]
489
- })]
490
- }),
491
- /* @__PURE__ */ v("div", {
492
- className: "flex items-center text-sm",
493
- children: [/* @__PURE__ */ _(p, { className: "h-4 w-4 text-status-warning-text mr-1" }), /* @__PURE__ */ _("span", {
494
- className: "tabular-nums",
495
- children: e.rating.toFixed(1)
496
- })]
497
- })
498
- ]
499
- }, e.id))
500
- })]
501
- }), /* @__PURE__ */ v(C, {
502
- className: "border-border-seam",
503
- children: [/* @__PURE__ */ _(T, { children: /* @__PURE__ */ _(E, { children: P("proserviceworld.dashboard.admin.sections.platformAlerts", "Platform Alerts") }) }), /* @__PURE__ */ v(w, {
504
- className: "space-y-4",
505
- children: [
506
- /* @__PURE__ */ v("div", {
507
- className: "flex items-start space-x-3",
508
- children: [/* @__PURE__ */ _(r, { className: "h-5 w-5 text-status-warning-text mt-0.5" }), /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
509
- className: "font-medium text-sm",
510
- children: P("proserviceworld.dashboard.admin.alerts.pendingVerifications.title", "Pending Verifications")
511
- }), /* @__PURE__ */ _("p", {
512
- className: "text-sm text-text-secondary",
513
- children: P("proserviceworld.dashboard.admin.alerts.pendingVerifications.description", "3 providers awaiting verification")
514
- })] })]
515
- }),
516
- /* @__PURE__ */ v("div", {
517
- className: "flex items-start space-x-3",
518
- children: [/* @__PURE__ */ _(c, { className: "h-5 w-5 text-status-success-text mt-0.5" }), /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
519
- className: "font-medium text-sm",
520
- children: P("proserviceworld.dashboard.admin.alerts.systemStatus.title", "System Status")
521
- }), /* @__PURE__ */ _("p", {
522
- className: "text-sm text-text-secondary",
523
- children: P("proserviceworld.dashboard.admin.alerts.systemStatus.description", "All systems operational")
524
- })] })]
525
- }),
526
- /* @__PURE__ */ v("div", {
527
- className: "flex items-start space-x-3",
528
- children: [/* @__PURE__ */ _(a, { className: "h-5 w-5 text-accent-blue mt-0.5" }), /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
529
- className: "font-medium text-sm",
530
- children: P("proserviceworld.dashboard.admin.alerts.newReviews.title", "New Reviews")
531
- }), /* @__PURE__ */ _("p", {
532
- className: "text-sm text-text-secondary",
533
- children: P("proserviceworld.dashboard.admin.alerts.newReviews.description", "12 new reviews this week")
534
- })] })]
535
- })
536
- ]
537
- })]
538
- })]
72
+ /* @__PURE__ */ v(i, {
73
+ label: "Unbilled hours",
74
+ value: c(x.unbilledHours),
75
+ hint: `${c(x.billedHours)} billed`,
76
+ icon: /* @__PURE__ */ v(f, { className: "h-4 w-4" }),
77
+ tone: "warning"
78
+ }),
79
+ /* @__PURE__ */ v(i, {
80
+ label: "Outstanding",
81
+ value: l(x.outstandingInvoiceTotal),
82
+ hint: "Sent + overdue",
83
+ icon: /* @__PURE__ */ v(h, { className: "h-4 w-4" }),
84
+ tone: "warning"
85
+ }),
86
+ /* @__PURE__ */ v(i, {
87
+ label: "Collected",
88
+ value: l(x.paidInvoiceTotal),
89
+ icon: /* @__PURE__ */ v(h, { className: "h-4 w-4" }),
90
+ tone: "success"
91
+ }),
92
+ /* @__PURE__ */ v(i, {
93
+ label: "Compliance due",
94
+ value: x.pendingComplianceChecks,
95
+ icon: /* @__PURE__ */ v(g, { className: "h-4 w-4" }),
96
+ tone: x.pendingComplianceChecks ? "warning" : "success"
97
+ }),
98
+ /* @__PURE__ */ v(i, {
99
+ label: "Open conflicts",
100
+ value: x.openConflictChecks,
101
+ icon: /* @__PURE__ */ v(m, { className: "h-4 w-4" }),
102
+ tone: x.openConflictChecks ? "danger" : "success"
539
103
  })
540
104
  ]
541
105
  }),
542
- B === "team" && /* @__PURE__ */ v("div", {
543
- className: "space-y-6",
106
+ /* @__PURE__ */ y("div", {
107
+ className: "grid grid-cols-1 gap-4 lg:grid-cols-3",
544
108
  children: [
545
- /* @__PURE__ */ _(D, { children: /* @__PURE__ */ v("div", {
546
- className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
547
- children: [/* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("h2", {
548
- className: "text-xl font-bold tracking-tight",
549
- children: P("proserviceworld.dashboard.team.title", "Welcome, Team Member!")
550
- }), /* @__PURE__ */ _("p", {
551
- className: "text-text-secondary mt-1",
552
- children: P("proserviceworld.dashboard.team.subtitle", "Manage assigned tasks and projects")
553
- })] }), /* @__PURE__ */ v(x, {
554
- variant: "outline",
555
- size: "sm",
556
- children: [/* @__PURE__ */ _(s, { className: "h-4 w-4 mr-2" }), P("proserviceworld.dashboard.team.actions.myTasks", "My Tasks")]
557
- })]
558
- }) }),
559
- /* @__PURE__ */ v("div", {
560
- className: "grid gap-4 md:grid-cols-4",
561
- children: [
562
- /* @__PURE__ */ _(O, {
563
- treatment: "metric",
564
- className: "border-border-seam",
565
- children: /* @__PURE__ */ v("div", {
566
- className: "flex items-center",
567
- children: [/* @__PURE__ */ _(c, { className: "h-8 w-8 text-status-success-text" }), /* @__PURE__ */ v("div", {
568
- className: "ml-4",
569
- children: [/* @__PURE__ */ _("p", {
570
- className: "text-2xl font-bold tabular-nums",
571
- children: "8"
572
- }), /* @__PURE__ */ _("p", {
573
- className: "text-sm text-text-secondary",
574
- children: P("proserviceworld.dashboard.team.metrics.tasksCompleted", "Tasks Completed")
575
- })]
576
- })]
577
- })
578
- }),
579
- /* @__PURE__ */ _(O, {
580
- treatment: "metric",
581
- className: "border-border-seam",
582
- children: /* @__PURE__ */ v("div", {
583
- className: "flex items-center",
584
- children: [/* @__PURE__ */ _(l, { className: "h-8 w-8 text-status-warning-text" }), /* @__PURE__ */ v("div", {
585
- className: "ml-4",
586
- children: [/* @__PURE__ */ _("p", {
587
- className: "text-2xl font-bold tabular-nums",
588
- children: W.length
589
- }), /* @__PURE__ */ _("p", {
590
- className: "text-sm text-text-secondary",
591
- children: P("proserviceworld.dashboard.team.metrics.pendingTasks", "Pending Tasks")
592
- })]
593
- })]
594
- })
595
- }),
596
- /* @__PURE__ */ _(O, {
597
- treatment: "glass",
598
- glow: !0,
599
- className: "border-border-seam",
600
- children: /* @__PURE__ */ v("div", {
601
- className: "flex items-center",
602
- children: [/* @__PURE__ */ _(p, { className: "h-8 w-8 text-accent-blue" }), /* @__PURE__ */ v("div", {
603
- className: "ml-4",
604
- children: [/* @__PURE__ */ _("p", {
605
- className: "text-2xl font-bold tabular-nums",
606
- children: "4.9"
607
- }), /* @__PURE__ */ _("p", {
608
- className: "text-sm text-text-secondary",
609
- children: P("proserviceworld.dashboard.team.metrics.performanceScore", "Performance Score")
610
- })]
611
- })]
612
- })
613
- }),
614
- /* @__PURE__ */ _(O, {
615
- treatment: "metric",
616
- className: "border-border-seam",
617
- children: /* @__PURE__ */ v("div", {
618
- className: "flex items-center",
619
- children: [/* @__PURE__ */ _(h, { className: "h-8 w-8 text-accent-blue" }), /* @__PURE__ */ v("div", {
620
- className: "ml-4",
621
- children: [/* @__PURE__ */ _("p", {
622
- className: "text-2xl font-bold tabular-nums",
623
- children: H.length
624
- }), /* @__PURE__ */ _("p", {
625
- className: "text-sm text-text-secondary",
626
- children: P("proserviceworld.dashboard.team.metrics.activeProjects", "Active Projects")
627
- })]
628
- })]
629
- })
630
- })
631
- ]
109
+ /* @__PURE__ */ v(o, {
110
+ title: "Engagements by status",
111
+ children: /* @__PURE__ */ v(S, { items: x.engagementsByStatus })
112
+ }),
113
+ /* @__PURE__ */ v(o, {
114
+ title: "Matters by status",
115
+ children: /* @__PURE__ */ v(S, { items: x.mattersByStatus })
632
116
  }),
633
- /* @__PURE__ */ v(C, {
634
- className: "border-border-seam",
635
- children: [/* @__PURE__ */ _(T, { children: /* @__PURE__ */ _(E, { children: P("proserviceworld.dashboard.team.sections.recentActivity", "Recent Activity") }) }), /* @__PURE__ */ _(w, {
636
- className: "py-4",
637
- children: /* @__PURE__ */ _(A, {
638
- illustration: "empty-notifications",
639
- title: P("proserviceworld.dashboard.team.sections.comingSoonTitle", "No recent activity yet"),
640
- description: P("proserviceworld.dashboard.team.sections.comingSoon", "Team member features are on the way — assigned tasks and project updates will show up here.")
641
- })
642
- })]
117
+ /* @__PURE__ */ v(o, {
118
+ title: "Revenue (last months)",
119
+ children: /* @__PURE__ */ v(C, { data: x.revenueByMonth })
643
120
  })
644
121
  ]
122
+ }),
123
+ /* @__PURE__ */ v(o, {
124
+ title: "Jump to",
125
+ children: /* @__PURE__ */ v("div", {
126
+ className: "grid grid-cols-2 gap-2 sm:grid-cols-3",
127
+ children: b.map((e) => /* @__PURE__ */ y("button", {
128
+ type: "button",
129
+ onClick: () => s(e.to),
130
+ className: "flex items-center justify-between rounded-lg border border-border-seam bg-bg-canvas px-3 py-2.5 text-sm text-text-primary transition hover:border-accent",
131
+ children: [/* @__PURE__ */ y("span", {
132
+ className: "flex items-center gap-2",
133
+ children: [/* @__PURE__ */ v("span", {
134
+ className: "text-accent",
135
+ children: e.icon
136
+ }), e.label]
137
+ }), /* @__PURE__ */ v(u, { className: "h-4 w-4 text-text-tertiary" })]
138
+ }, e.to))
139
+ })
645
140
  })
646
141
  ]
142
+ }) : null;
143
+ }, S = ({ items: e }) => {
144
+ if (!e.length) return /* @__PURE__ */ v("p", {
145
+ className: "text-sm text-text-tertiary",
146
+ children: "No records yet."
147
+ });
148
+ let t = Math.max(...e.map((e) => e.count), 1);
149
+ return /* @__PURE__ */ v("ul", {
150
+ className: "space-y-2.5",
151
+ children: e.map((e) => /* @__PURE__ */ y("li", {
152
+ className: "flex items-center gap-3",
153
+ children: [
154
+ /* @__PURE__ */ v("div", {
155
+ className: "w-28 shrink-0",
156
+ children: /* @__PURE__ */ v(s, { status: e.status })
157
+ }),
158
+ /* @__PURE__ */ v("div", {
159
+ className: "h-2 flex-1 overflow-hidden rounded-full bg-bg-sunken",
160
+ children: /* @__PURE__ */ v("div", {
161
+ className: "h-full rounded-full bg-accent",
162
+ style: { width: `${e.count / t * 100}%` }
163
+ })
164
+ }),
165
+ /* @__PURE__ */ v("span", {
166
+ className: "w-8 text-right text-sm font-medium text-text-primary",
167
+ children: e.count
168
+ })
169
+ ]
170
+ }, e.status))
171
+ });
172
+ }, C = ({ data: e }) => {
173
+ if (!e.length) return /* @__PURE__ */ v("p", {
174
+ className: "text-sm text-text-tertiary",
175
+ children: "No invoiced revenue yet."
176
+ });
177
+ let t = Math.max(...e.map((e) => e.amount), 1);
178
+ return /* @__PURE__ */ v("div", {
179
+ className: "flex h-40 items-end gap-1.5",
180
+ children: e.map((e) => /* @__PURE__ */ y("div", {
181
+ className: "flex flex-1 flex-col items-center gap-1",
182
+ children: [/* @__PURE__ */ v("div", {
183
+ className: "flex w-full flex-1 items-end",
184
+ children: /* @__PURE__ */ v("div", {
185
+ className: "w-full rounded-t bg-accent/80",
186
+ style: { height: `${Math.max(e.amount / t * 100, 2)}%` },
187
+ title: l(e.amount)
188
+ })
189
+ }), /* @__PURE__ */ v("span", {
190
+ className: "text-[10px] text-text-tertiary",
191
+ children: e.month.slice(5)
192
+ })]
193
+ }, e.month))
647
194
  });
648
- }
195
+ };
649
196
  //#endregion
650
- export { N as DashboardPage };
197
+ export { x as DashboardPage };
651
198
 
652
199
  //# sourceMappingURL=DashboardPage.js.map